ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
flow_bridge.c File Reference
#include "flow_bridge.h"
Include dependency graph for flow_bridge.c:

Go to the source code of this file.

Functions

static int16_t le16 (const uint8_t *p)
 
int32_t flow_init (flow_t *f, const sensor_bus_t *bus)
 0 = bridge found
 
void flow_decode (const uint8_t r[FLOW_FRAME_LEN], flow_frame_t *fr)
 pure decoder (host tests)
 
int32_t flow_read (flow_t *f, flow_frame_t *fr)
 1 = new data, 0 = none, <0 error
 

Function Documentation

◆ le16()

static int16_t le16 ( const uint8_t *  p)
static

Definition at line 6 of file flow_bridge.c.

Referenced by flow_decode().

Here is the caller graph for this function:

◆ flow_init()

int32_t flow_init ( flow_t *  f,
const sensor_bus_t *  bus 
)

0 = bridge found

Definition at line 8 of file flow_bridge.c.

References flow_t::bus, FLOW_BRIDGE_WHO_AM_I, FLOW_REG_WHO_AM_I, sensor_bus_t::handle, flow_t::ok, sensor_bus_t::read, and flow_t::version.

Referenced by ext_step().

Here is the caller graph for this function:

◆ flow_decode()

void flow_decode ( const uint8_t  r[FLOW_FRAME_LEN],
flow_frame_t *  fr 
)

pure decoder (host tests)

Definition at line 20 of file flow_bridge.c.

References flow_frame_t::count, flow_frame_t::dt_s, flow_frame_t::dx, flow_frame_t::dy, le16(), flow_frame_t::shutter, flow_frame_t::squal, and flow_frame_t::status.

Referenced by flow_read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flow_read()

int32_t flow_read ( flow_t *  f,
flow_frame_t *  fr 
)

1 = new data, 0 = none, <0 error

Definition at line 31 of file flow_bridge.c.

References flow_t::bus, flow_decode(), FLOW_FRAME_LEN, FLOW_REG_FRAME, FLOW_ST_NEW, sensor_bus_t::handle, flow_t::ok, sensor_bus_t::read, and flow_frame_t::status.

Referenced by ext_step().

Here is the call graph for this function:
Here is the caller graph for this function: