39#define FLOW_BRIDGE_ADDR_7BIT 0x3Bu
40#define FLOW_BRIDGE_WHO_AM_I 0xF1u
41#define FLOW_REG_WHO_AM_I 0x00u
42#define FLOW_REG_VERSION 0x01u
43#define FLOW_REG_FRAME 0x02u
44#define FLOW_FRAME_LEN 11u
45#define FLOW_REG_CTRL 0x10u
47#define FLOW_ST_SENSOR_OK 0x01u
48#define FLOW_ST_NEW 0x02u
49#define FLOW_ST_OVERFLOW 0x04u
50#define FLOW_ST_REJECTED 0x08u
int32_t flow_read(flow_t *f, flow_frame_t *fr)
1 = new data, 0 = none, <0 error
int32_t flow_init(flow_t *f, const sensor_bus_t *bus)
0 = bridge found
void flow_decode(const uint8_t raw[FLOW_FRAME_LEN], flow_frame_t *fr)
pure decoder (host tests)
Platform-independent bus interface.
static int status(w25q_t *d, uint8_t *sr)