ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
sensor_bus.h File Reference

Platform-independent bus interface. More...

#include <stdint.h>
Include dependency graph for sensor_bus.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

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 Documentation

◆ bus_write_fn

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.

◆ bus_read_fn

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.

◆ bus_delay_fn

typedef void(* bus_delay_fn) (uint32_t ms)

Definition at line 17 of file sensor_bus.h.