Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LMiC by
Diff: radio.cpp
- Revision:
- 7:29058a7ccf23
- Parent:
- 6:eed5fd627a2b
- Child:
- 8:5879e83f632a
--- a/radio.cpp Thu Feb 25 15:39:28 2016 +0000
+++ b/radio.cpp Thu Feb 25 21:28:23 2016 +0000
@@ -240,7 +240,7 @@
void os_radio( u1_t mode )
{
-debug_val("os_radio enter ",mode);
+//debug_val("os_radio enter ",mode);
hal_disableIRQs( );
switch( mode )
{
@@ -772,7 +772,7 @@
static void txfsk ()
{
-debug("txfsk enter\r\n");
+debug_str("txfsk enter\r\n");
// select FSK modem (from sleep mode)
writeReg(RegOpMode, 0x10); // FSK, BT=0.5
ASSERT(readReg(RegOpMode) == 0x10);
@@ -824,7 +824,7 @@
static void txlora ()
{
-debug("txlora enter\r\n");
+debug_str("txlora enter\r\n");
// select LoRa modem (from sleep mode)
//writeReg(RegOpMode, OPMODE_LORA);
opmodeLora();
@@ -871,7 +871,7 @@
// start transmitter (buf=LMIC.frame, len=LMIC.dataLen)
static void starttx ()
{
-debug("starttx enter\r\n");
+debug_str("starttx enter\r\n");
ASSERT( (readReg(RegOpMode) & OPMODE_MASK) == OPMODE_SLEEP );
if(getSf(LMIC.rps) == FSK) { // FSK modem
txfsk();
@@ -893,7 +893,7 @@
// start LoRa receiver (time=LMIC.rxtime, timeout=LMIC.rxsyms, result=LMIC.frame[LMIC.dataLen])
static void rxlora (u1_t rxmode)
{
-debug("rxlora enter\r\n");
+debug_str("rxlora enter\r\n");
// select LoRa modem (from sleep mode)
opmodeLora();
ASSERT((readReg(RegOpMode) & OPMODE_LORA) != 0);
@@ -951,7 +951,7 @@
static void rxfsk (u1_t rxmode)
{
-debug("rxfsk enter\r\n");
+debug_str("rxfsk enter\r\n");
// only single rx (no continuous scanning, no noise sampling)
ASSERT( rxmode == RXMODE_SINGLE );
// select FSK modem (from sleep mode)
@@ -1011,7 +1011,7 @@
static void startrx (u1_t rxmode)
{
-debug("startrx enter\r\n");
+debug_str("startrx enter\r\n");
ASSERT( (readReg(RegOpMode) & OPMODE_MASK) == OPMODE_SLEEP );
if(getSf(LMIC.rps) == FSK) { // FSK modem
rxfsk(rxmode);
@@ -1131,7 +1131,7 @@
// (radio goes to stanby mode after tx/rx operations)
void radio_irq_handler (u1_t dio)
{
-debug("radio_irq_handler enter %d\r\n",dio);
+debug_val("radio_irq_handler enter %d\r\n",dio);
ostime_t now = os_getTime();
if( (readReg(RegOpMode) & OPMODE_LORA) != 0) { // LORA modem
u1_t flags = readReg(LORARegIrqFlags);
@@ -1197,8 +1197,8 @@
void os_radio (u1_t mode)
{
-debug("os_radio enter\r\n");
- hal_disableIRQs();
+//debug("os_radio enter\r\n");
+ // hal_disableIRQs();
switch (mode) {
case RADIO_RST:
// put radio to sleep
