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:
- 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