Senet-ized LMIC for MOTE_L152RC
Fork of lmic_MOTE_L152RC by
Diff: TARGET_MOTE_L152RC/hal.cpp
- Revision:
- 6:dfc048cda33f
- Parent:
- 4:1a9a62cf220f
- Child:
- 9:83ae7f34e88c
--- a/TARGET_MOTE_L152RC/hal.cpp Fri Jul 17 21:09:16 2015 +0000 +++ b/TARGET_MOTE_L152RC/hal.cpp Sat Jul 18 00:18:44 2015 +0000 @@ -21,7 +21,7 @@ DigitalOut rfsw1(RFSW1); DigitalOut rfsw2(RFSW2); -DigitalOut hdr_fem_ctx(PC_1); +DigitalOut hdr_fem_csd(PC_0); static InterruptIn dio0(PC_6); static InterruptIn dio1(PC_10); @@ -123,7 +123,7 @@ NVIC_SetVector(RTC_WKUP_IRQn, (uint32_t)rtc_wkup_irq); NVIC_EnableIRQ(RTC_WKUP_IRQn); - hdr_fem_ctx = 0; + hdr_fem_csd = 0; hal_enableIRQs(); @@ -243,7 +243,7 @@ #ifdef SLEEP_DEBUG start_tick = hal_ticks(); #endif /* SLEEP_DEBUG */ - //hdr_fem_ctx = 1; + if (deep_sleep) { #ifndef USE_DEBUGGER @@ -260,7 +260,6 @@ } else sleep(); // blocks until waking - //hdr_fem_ctx = 0; #ifdef SLEEP_DEBUG end_tick = hal_ticks(); time_asleep = end_tick - start_tick; @@ -305,15 +304,15 @@ rfsw2 = 1; rfsw1 = 0; } - //hdr_fem_ctx = 0; // debug + hdr_fem_csd = 0; // debug } else if (mode == OPMODE_RX || mode == OPMODE_RX_SINGLE || mode == OPMODE_CAD) { // start of reception rfsw2 = 1; rfsw1 = 1; - //hdr_fem_ctx = 1; // debug + hdr_fem_csd = 1; // debug } else { // RF switch shutdown rfsw2 = 0; rfsw1 = 0; - //hdr_fem_ctx = 0; // debug + hdr_fem_csd = 0; // debug } }