aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/USBCore.h
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2014-11-18 20:03:23 +0100
committerCristian Maglie <c.maglie@bug.st>2014-11-25 15:56:11 +0100
commit1e699c360006f62ba75f123b093facaa776e2398 (patch)
tree1a1cc4dff6f5986575efba58446340378ad9fd92 /cores/arduino/USBCore.h
parent00f5ed6b4516f5f39576089b5367f31e15fa6998 (diff)
Fix atomicity issues in SPI::beginTransaction and SPI::endTransaction (Andrew Kroll)
Previously, it could happen that SPI::beginTransaction was interrupted by an ISR, while it is changing the SPI_AVR_EIMSK register or interruptSave variable (it seems that there is a small window after changing SPI_AVR_EIMSK where an interrupt might still occur). If this happens, interruptSave is overwritten with an invalid value, permanently disabling the pin interrupts. To prevent this, disable interrupts globally while changing these values.
Diffstat (limited to 'cores/arduino/USBCore.h')
0 files changed, 0 insertions, 0 deletions