![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
first draft
Dependencies: LMiC SX1272Libx mbed
Fork of LoRaWAN-lmic-app by
Revision 10:497ef83ca19f, committed 2016-02-26
- Comitter:
- tmulrooney
- Date:
- Fri Feb 26 13:27:54 2016 +0000
- Parent:
- 9:0b63a0a90205
- Commit message:
- version 0.1
Changed in this revision
debug.cpp | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0b63a0a90205 -r 497ef83ca19f debug.cpp --- a/debug.cpp Thu Feb 25 21:29:13 2016 +0000 +++ b/debug.cpp Fri Feb 26 13:27:54 2016 +0000 @@ -59,6 +59,8 @@ } void debug_val (const u1_t* label, u4_t val) { + debug_uint(osticks2ms(hal_ticks())); + debug_str(" "); debug_str( label ); debug_uint( val ); debug_char( '\r' ); @@ -84,6 +86,8 @@ [EV_LINK_DEAD] = "LINK_DEAD", [EV_LINK_ALIVE] = "LINK_ALIVE", }; + debug_uint(osticks2ms(hal_ticks())); + debug_str(" "); debug_str(evnames[ev]); debug_char('\r'); debug_char('\n');
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 );