![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
Platform-independent bus interface. More...
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | sensor_bus_t |
Typedefs | |
| typedef int32_t(* | bus_write_fn) (void *handle, uint8_t reg, const uint8_t *data, uint16_t len) |
| All functions return 0 on success, != 0 on error. | |
| typedef int32_t(* | bus_read_fn) (void *handle, uint8_t reg, uint8_t *data, uint16_t len) |
| typedef void(* | bus_delay_fn) (uint32_t ms) |
Platform-independent bus interface.
Sensor drivers include NEITHER HAL nor RTOS: they only receive these function pointers. The same library therefore runs on STM32 (HAL binding, see bsp/imu_i2c.c), on another MCU, or on a PC with a simulated bus.
Definition in file sensor_bus.h.
| typedef int32_t(* bus_write_fn) (void *handle, uint8_t reg, const uint8_t *data, uint16_t len) |
All functions return 0 on success, != 0 on error.
Definition at line 15 of file sensor_bus.h.
| typedef int32_t(* bus_read_fn) (void *handle, uint8_t reg, uint8_t *data, uint16_t len) |
Definition at line 16 of file sensor_bus.h.
| typedef void(* bus_delay_fn) (uint32_t ms) |
Definition at line 17 of file sensor_bus.h.