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.
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
Revision 18:e2f92ac26450, committed 2016-07-13
- 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
