28 lines
497 B
C
28 lines
497 B
C
/*
|
|
* sensor_interface.h
|
|
*
|
|
* Created on: 7 déc. 2019
|
|
* Author: JackCarterSmith
|
|
*/
|
|
|
|
#ifndef SENSOR_INTERFACE_H_
|
|
#define SENSOR_INTERFACE_H_
|
|
|
|
#include "stm32412g_discovery.h"
|
|
|
|
#define MEMS_ADD_RD 0x00D7
|
|
#define MEMS_ADD_WR 0x00D6
|
|
#define CTRL1_XL_REGISTER 0x10
|
|
#define CTRL1_OUT_REGISTER 0x11
|
|
|
|
typedef struct {
|
|
int16_t Pitch;
|
|
int16_t Yaw;
|
|
int16_t Roll;
|
|
}PP_GyroAnglesTypeDef;
|
|
|
|
void initGyro();
|
|
void getAnglesFromSensor();
|
|
|
|
#endif /* SENSOR_INTERFACE_H_ */
|