| GND PB13 |
| GND PB12 |
+--------------------+
+
+The green LED flashes when we receive a packet.
+The yellow LED shines when a transmit is in progress (including waiting
+for idle bus and for the reply).
* 16-bit CRC
*/
-enum bsb_address {
- BSB_ADDR_BOILER = 0,
- BSB_ADDR_EXT_BOARD = 3,
- BSB_ADDR_ROOM1 = 6,
- BSB_ADDR_ROOM2 = 7,
- BSB_ADDR_GATEWAY = 0x42,
- BSB_ADDR_BROADCAST = 0x7f,
-};
-
// Positions of fields in a frame
enum bsb_frame {
BF_SOF,
BF_OP,
};
+enum bsb_address {
+ BSB_ADDR_BOILER = 0,
+ BSB_ADDR_EXT_BOARD = 3,
+ BSB_ADDR_ROOM1 = 6,
+ BSB_ADDR_ROOM2 = 7,
+ BSB_ADDR_GATEWAY = 0x42, // That's us
+ BSB_ADDR_BROADCAST = 0x7f,
+};
+
enum bsb_op {
BSB_OP_REQUEST_INFO = 1,
BSB_OP_INFO = 2,
static void bsb_check_reply(void)
{
// Match received frame in bsb_rx_status_and_frame to expected replies
- // and set the status byte in byte 0.
+ // and set the status in byte 0.
byte *frame = bsb_rx_status_and_frame + 1;
// XXX: This might be executed too fast, so we can still be in TX_STATE_SENT