EU 868Mhz configured version of LMiC 1.5
Dependents: STM32F103C8T6_LoRaWAN-lmic-app
Fork of LMiC by
Diff: radio.cpp
- Revision:
- 3:519c71d29a06
- Parent:
- 1:d3b7bde3995c
- Child:
- 4:85b2b647cb64
--- a/radio.cpp Tue Mar 31 13:36:56 2015 +0000 +++ b/radio.cpp Thu Nov 26 12:46:56 2015 +0000 @@ -63,10 +63,15 @@ */ void OnCadDone( void ); +/*! + * Radio events function pointer + */ +static RadioEvents_t RadioEvents; + /* * Radio object declraration */ -SX1276MB1xAS Radio( OnTxDone, OnTxTimeout, OnRxDone, OnRxTimeout, OnRxError, NULL, NULL ); +SX1276MB1xAS Radio( NULL ); static const u2_t LORA_RXDONE_FIXUP[] = { [FSK] = us2osticks(0), // ( 0 ticks) @@ -162,6 +167,14 @@ void radio_init( void ) { hal_disableIRQs( ); + + // Initialize Radio driver + RadioEvents.TxDone = OnTxDone; + RadioEvents.RxDone = OnRxDone; + RadioEvents.RxError = OnRxError; + RadioEvents.TxTimeout = OnTxTimeout; + RadioEvents.RxTimeout = OnRxTimeout; + Radio.Init( &RadioEvents ); // seed 15-byte randomness via noise rssi // Set LoRa modem ON