first draft
Dependencies: LMiC SX1272Libx mbed
Fork of LoRaWAN-lmic-app by
Diff: main.cpp
- Revision:
- 10:497ef83ca19f
- Parent:
- 9:0b63a0a90205
diff -r 0b63a0a90205 -r 497ef83ca19f main.cpp --- a/main.cpp Thu Feb 25 21:29:13 2016 +0000 +++ b/main.cpp Fri Feb 26 13:27:54 2016 +0000 @@ -72,6 +72,13 @@ #define LED_RED PTA1 #define LED_YEL PTA2 +/* version history */ +/* version date comments */ +/* 0.1 02/26/16 first working join - no tx/rx */ + +#define MAJOR 0 +#define MINOR 1 + DigitalOut led1(LED_RED); DigitalOut led2(LED_YEL); @@ -168,6 +175,7 @@ static void onRxLed( osjob_t* j ) { + led2 = 0; debug_val("LED2 = ", 0 ); } @@ -275,8 +283,9 @@ osjob_t initjob; led1=1; + led2=1; pc.baud(115200); - printf( "\r\nLoRaWan Demo Application TJM\r\n" ); + printf( "\r\nLoRaWan Demo Application TJM V %d.%d\r\n",MAJOR, MINOR ); // initialize runtime env os_init( ); // setup initial job @@ -308,6 +317,7 @@ // Check if we have a downlink on either Rx1 or Rx2 windows if( ( LMIC.txrxFlags & ( TXRX_DNW1 | TXRX_DNW2 ) ) != 0 ) { + led2 = 1; debug_val( "LED2 = ", 1 ); os_setTimedCallback( &rxLedJob, os_getTime( ) + ms2osticks( 25 ), onRxLed );