2 * Boiler System Bus Gateway -- Interface Definitions
4 * (c) 2020 Martin Mareš <mj@ucw.cz>
7 #define BSB_USB_VENDOR 0x4242
8 #define BSB_USB_PRODUCT 0x0003
9 #define BSB_USB_VERSION 0x0100
14 * 0x00 = control endpoint
15 * Vendor-defined request 0x00 sends struct bsb_stats in little endian.
17 * 0x01 = bulk endpoint
18 * Used for sending frames to BSB.
20 * 0x82 = interrupt endpoint
21 * Used for receiving frames from BSB.
22 * Also transmits 1-byte status reports on frames sent on endpoint 0x01.
25 // Status sent on the interrupt endpoint
26 #define BSB_TX_RESULTS \
36 #define P(x) TX_RESULT_##x,
41 // Statistics sent on the control endpoint
76 * Structure of BSB frames
78 * start of frame (0xdc)
79 * source address XOR 0x80
83 * <parameters depending on operation>
89 BSB_ADDR_EXT_BOARD = 3,
92 BSB_ADDR_GATEWAY = 0x42,
93 BSB_ADDR_BROADCAST = 0x7f,
97 BSB_OP_REQUEST_INFO = 1,
105 BSB_OP_QUERY_DEFAULT = 0x0f,
106 BSB_OP_ANSWER_DEFAULT = 0x10,