From 6416fa8d0b3c80506a0a9086a16731d7ea91fc3a Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 23 Jul 2013 12:50:42 -0300 Subject: [PATCH] atusb/fw/mac.c: add section titles --- atusb/fw/mac.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/atusb/fw/mac.c b/atusb/fw/mac.c index 33c891b..05d16d6 100644 --- a/atusb/fw/mac.c +++ b/atusb/fw/mac.c @@ -34,6 +34,9 @@ static bool queued_rx = 0; static uint8_t next_seq, this_seq, queued_seq; +/* ----- Register access --------------------------------------------------- */ + + static uint8_t reg_read(uint8_t reg) { uint8_t value; @@ -56,6 +59,9 @@ static void reg_write(uint8_t reg, uint8_t value) } +/* ----- Interrupt handling ------------------------------------------------ */ + + static void receive_frame(void); @@ -137,6 +143,9 @@ static bool handle_irq(void) } +/* ----- TX/RX ------------------------------------------------------------- */ + + static void change_state(uint8_t new) { while ((reg_read(REG_TRX_STATUS) & TRX_STATUS_MASK) ==