updates

Dependencies:   BLE_API mbed-dev-bin nRF51822

Fork of microbit-dal-eddystone by Martin Woolley

Files at this revision

API Documentation at this revision

Comitter:
LancasterUniversity
Date:
Wed Jul 13 12:17:48 2016 +0100
Parent:
17:b15c83c64043
Child:
19:ebc07f856999
Commit message:
Synchronized with git rev a82254b9
Author: Joe Finney
microbit: MicroBitRadio support for multiple enable/disable operations

MicroBitRadio::disable neglected to reset the internal status flag indicating
that the radio has bene initialised, which prevent subsequent enable()
operations completing properly.

Changed in this revision

source/drivers/MicroBitRadio.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/source/drivers/MicroBitRadio.cpp	Wed Jul 13 12:17:42 2016 +0100
+++ b/source/drivers/MicroBitRadio.cpp	Wed Jul 13 12:17:48 2016 +0100
@@ -356,6 +356,9 @@
     // deregister ourselves from the callback event used to empty the receive queue.
     fiber_remove_idle_component(this);
 
+    // record that the radio is now disabled
+    status &= ~MICROBIT_RADIO_STATUS_INITIALISED;
+
     return MICROBIT_OK;
 }
 
@@ -509,4 +512,4 @@
     NVIC_EnableIRQ(RADIO_IRQn);
 
     return MICROBIT_OK;
-}
+}
\ No newline at end of file