]> mj.ucw.cz Git - home-hw.git/blob - bsb/firmware/interface.h
BSB: Transmit implemented
[home-hw.git] / bsb / firmware / interface.h
1 /*
2  *      Boiler System Bus Gateway -- Interface Definitions
3  *
4  *      (c) 2020 Martin Mareš <mj@ucw.cz>
5  */
6
7 enum bsb_tx_result {
8         TX_RESULT_NONE,
9         TX_RESULT_OK,
10         TX_RESULT_OVERRUN,
11         TX_RESULT_MALFORMED,
12         TX_RESULT_FORBIDDEN,
13         TX_RESULT_TIMEOUT,
14         TX_RESULT_TOO_MANY_RETRIES,
15 };
16
17 // Sent via USB in little-endian format
18 struct bsb_stats {
19         u32 rx_noise;
20         u32 rx_errors;
21         u32 rx_invalid;
22         u32 rx_overruns;
23         u32 rx_timeouts;
24         u32 rx_bad_crc;
25         u32 rx_ok;
26         u32 tx_overruns;
27         u32 tx_rejects;
28         u32 tx_timeouts;
29         u32 tx_collisions;
30         u32 tx_ok;
31 };
32