mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
cleaned up bmp085 driver
added ms5611 driver refactored pressure sensor subsystem to allow multiple sensors couple changes in PWM driver to make motor/servo arrangement for airplane mode more intuitive moved MAX_MOTORS/MAX_SERVOS etc into drv_pwm.h staring to merge back in airplane/flyingwing mixes fix for tri servo display - mwc moved it to servo[5] again, gui was broken, function not. will probably implement custom mixer soon (motors only, no servos) git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@198 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
ee76242525
commit
e6cb4a0b1c
15 changed files with 3042 additions and 2698 deletions
14
src/board.h
14
src/board.h
|
@ -51,6 +51,7 @@ typedef enum {
|
|||
|
||||
typedef void (* sensorInitFuncPtr)(void); // sensor init prototype
|
||||
typedef void (* sensorReadFuncPtr)(int16_t *data); // sensor read and align prototype
|
||||
typedef int32_t (* baroCalculateFuncPtr)(void); // baro calculation (returns altitude in cm based on static data collected)
|
||||
typedef void (* uartReceiveCallbackPtr)(uint16_t data); // used by uart2 driver to return frames to app
|
||||
typedef uint16_t (* rcReadRawDataPtr)(uint8_t chan); // used by receiver driver to return channel data
|
||||
|
||||
|
@ -62,6 +63,18 @@ typedef struct sensor_t
|
|||
sensorReadFuncPtr temperature;
|
||||
} sensor_t;
|
||||
|
||||
typedef struct baro_t
|
||||
{
|
||||
uint16_t ut_delay;
|
||||
uint16_t up_delay;
|
||||
uint16_t repeat_delay;
|
||||
sensorInitFuncPtr start_ut;
|
||||
sensorInitFuncPtr get_ut;
|
||||
sensorInitFuncPtr start_up;
|
||||
sensorInitFuncPtr get_up;
|
||||
baroCalculateFuncPtr calculate;
|
||||
} baro_t;
|
||||
|
||||
#define digitalHi(p, i) { p->BSRR = i; }
|
||||
#define digitalLo(p, i) { p->BRR = i; }
|
||||
#define digitalToggle(p, i) { p->ODR ^= i; }
|
||||
|
@ -133,6 +146,7 @@ typedef struct sensor_t
|
|||
#include "drv_adc.h"
|
||||
#include "drv_adxl345.h"
|
||||
#include "drv_bmp085.h"
|
||||
#include "drv_ms5611.h"
|
||||
#include "drv_hmc5883l.h"
|
||||
#include "drv_i2c.h"
|
||||
#include "drv_ledring.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue