Contiki 2.5
mems.h
1 /** @file mems.h
2  * @brief Header for MB851 mems APIS
3  *
4  *
5  * <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
6  */
7 
8 #ifndef _MEMS_H_
9 #define _MEMS_H_
10 
11 #include "hal/micro/mems_regs.h"
12 
13 /** @brief Mems data type: three acceleration values each related to a specific direction
14  Watch out: only lower data values (e.g. those terminated by the _l) are
15  currently used by the device */
16 
17 typedef struct {
18  int8u outx_l;
19  int8u outx_h;
20  int8u outy_l;
21  int8u outy_h;
22  int8u outz_l;
23  int8u outz_h;
24 } t_mems_data;
25 
26 
27 /** @brief Mems Initialization function
28  */
29 int8u mems_Init(void);
30 
31 /** @brief Get mems acceleration values
32  */
33 int8u mems_GetValue(t_mems_data *mems_data);
34 
35 #endif /* _MEMS_H_ */
36