Contiki-Inga 3.x
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  uint8_t outx_l;
19  uint8_t outx_h;
20  uint8_t outy_l;
21  uint8_t outy_h;
22  uint8_t outz_l;
23  uint8_t outz_h;
24 } t_mems_data;
25 
26 
27 /** @brief Mems Initialization function
28  */
29 uint8_t mems_Init(void);
30 
31 /** @brief Get mems acceleration values
32  */
33 uint8_t mems_GetValue(t_mems_data *mems_data);
34 
35 #endif /*MEMS_H_ */
36