2010-10-25 09:03:38 +00:00
|
|
|
/** @file mems.h
|
|
|
|
* @brief Header for MB851 mems APIS
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
|
|
|
|
*/
|
|
|
|
|
2013-11-24 15:57:08 +00:00
|
|
|
#ifndef MEMS_H_
|
|
|
|
#define MEMS_H_
|
2010-10-25 09:03:38 +00:00
|
|
|
|
2013-03-15 15:14:09 +00:00
|
|
|
#include "hal/micro/mems-regs.h"
|
2010-10-25 09:03:38 +00:00
|
|
|
|
|
|
|
/** @brief Mems data type: three acceleration values each related to a specific direction
|
2014-06-19 12:28:13 +00:00
|
|
|
Watch out: only lower data values (e.g. those terminated by the _l) are
|
2010-10-25 09:03:38 +00:00
|
|
|
currently used by the device */
|
|
|
|
|
|
|
|
typedef struct {
|
2013-03-15 15:14:09 +00:00
|
|
|
uint8_t outx_l;
|
|
|
|
uint8_t outx_h;
|
|
|
|
uint8_t outy_l;
|
|
|
|
uint8_t outy_h;
|
|
|
|
uint8_t outz_l;
|
|
|
|
uint8_t outz_h;
|
2010-10-25 09:03:38 +00:00
|
|
|
} t_mems_data;
|
|
|
|
|
|
|
|
|
|
|
|
/** @brief Mems Initialization function
|
|
|
|
*/
|
2013-03-15 15:14:09 +00:00
|
|
|
uint8_t mems_Init(void);
|
2010-10-25 09:03:38 +00:00
|
|
|
|
|
|
|
/** @brief Get mems acceleration values
|
|
|
|
*/
|
2013-03-15 15:14:09 +00:00
|
|
|
uint8_t mems_GetValue(t_mems_data *mems_data);
|
2010-10-25 09:03:38 +00:00
|
|
|
|
2013-11-24 15:57:08 +00:00
|
|
|
#endif /*MEMS_H_ */
|
2010-10-25 09:03:38 +00:00
|
|
|
|