My fork
Dependencies: BLE_API mbed-dev-bin nRF51822-bluetooth-mdw
Fork of microbit-dal-bluetooth-mdw by
Diff: source/drivers/MicroBitRadio.cpp
- Revision:
- 70:ce33cdf741b5
- Parent:
- 69:b62f231e51ce
diff -r b62f231e51ce -r ce33cdf741b5 source/drivers/MicroBitRadio.cpp --- a/source/drivers/MicroBitRadio.cpp Wed Jul 13 12:18:49 2016 +0100 +++ b/source/drivers/MicroBitRadio.cpp Wed Jul 13 12:18:50 2016 +0100 @@ -452,8 +452,14 @@ if (p) { + // Protect shared resource from ISR activity + NVIC_DisableIRQ(RADIO_IRQn); + rxQueue = rxQueue->next; queueDepth--; + + // Allow ISR access to shared resource + NVIC_EnableIRQ(RADIO_IRQn); } return p;