1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 23:35:34 +03:00

Updating accgyro files so they do not include "board.h". It is now

clear what all accgyro drivers need to compile and what was
unnecessarily included before.
This commit is contained in:
Dominic Clifton 2014-04-16 17:33:47 +01:00
parent c493a1579c
commit f75f7a7e17
21 changed files with 208 additions and 83 deletions

18
src/sensors_common.h Normal file
View file

@ -0,0 +1,18 @@
#pragma once
typedef void (* sensorInitFuncPtr)(sensor_align_e align); // sensor init prototype
typedef void (* sensorReadFuncPtr)(int16_t *data); // sensor read and align prototype
typedef struct sensor_t
{
sensorInitFuncPtr init; // initialize function
sensorReadFuncPtr read; // read 3 axis data function
sensorReadFuncPtr temperature; // read temperature if available
float scale; // scalefactor (currently used for gyro only, todo for accel)
} sensor_t;
typedef enum {
X = 0,
Y,
Z
} sensor_axis_e;