Senet-ized LMIC for MOTE_L152RC
Fork of lmic_MOTE_L152RC by
Diff: TARGET_MOTE_L152RC/debug.cpp
- Revision:
- 12:be4139e16c6f
- Parent:
- 9:83ae7f34e88c
--- a/TARGET_MOTE_L152RC/debug.cpp Mon Mar 07 17:54:50 2016 +0000 +++ b/TARGET_MOTE_L152RC/debug.cpp Tue Mar 08 08:19:44 2016 -0500 @@ -26,22 +26,23 @@ void debug_event (int ev) { - static const u1_t* evnames[] = { - [EV_SCAN_TIMEOUT] = "SCAN_TIMEOUT", - [EV_BEACON_FOUND] = "BEACON_FOUND", - [EV_BEACON_MISSED] = "BEACON_MISSED", - [EV_BEACON_TRACKED] = "BEACON_TRACKED", - [EV_JOINING] = "JOINING", - [EV_JOINED] = "JOINED", - [EV_RFU1] = "RFU1", - [EV_JOIN_FAILED] = "JOIN_FAILED", - [EV_REJOIN_FAILED] = "REJOIN_FAILED", - [EV_TXCOMPLETE] = "TXCOMPLETE", - [EV_LOST_TSYNC] = "LOST_TSYNC", - [EV_RESET] = "RESET", - [EV_RXCOMPLETE] = "RXCOMPLETE", - [EV_LINK_DEAD] = "LINK_DEAD", - [EV_LINK_ALIVE] = "LINK_ALIVE", + static const char* evnames[16] = { + "???", + "SCAN_TIMEOUT", + "BEACON_FOUND", + "BEACON_MISSED", + "BEACON_TRACKED", + "JOINING", + "JOINED", + "RFU1", + "JOIN_FAILED", + "REJOIN_FAILED", + "TXCOMPLETE", + "LOST_TSYNC", + "RESET", + "RXCOMPLETE", + "LINK_DEAD", + "LINK_ALIVE" }; debug("%s\r\n", evnames[ev]); @@ -70,12 +71,7 @@ void debug_done() { - volatile int i; - /* block until last bit sent out debug UART */ while (!(USART2->SR & UART_FLAG_TC)) __NOP(); - - for (i = 0; i < 0x200; i++) - __nop(); }