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 70:ce33cdf741b5, committed 2016-07-13
- Comitter:
- LancasterUniversity
- Date:
- Wed Jul 13 12:18:50 2016 +0100
- Parent:
- 69:b62f231e51ce
- Child:
- 71:2f5caf7dd454
- Commit message:
- Synchronized with git rev 4fd5b0b6
Author: Charles Hemming
Protection from ISR added to queueDepth counter (#175 )
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: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;
