Commit Graph

10 Commits

Author SHA1 Message Date
Cristian Maglie 17ad4fe5ef Corrected some email contacts. 2015-02-05 16:47:22 +01:00
Cristian Maglie 1e699c3600 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.
2014-11-25 15:56:11 +01:00
Cristian Maglie 4948bf5650 [avr] Added SPI.notUsingInterrupt() (Andrew Kroll) 2014-11-25 15:56:11 +01:00
Cristian Maglie 6cfc5c23cc [avr] Made SPI.begin() and SPI.end() synchronized (Andrew Kroll) 2014-11-25 15:49:17 +01:00
Cristian Maglie d4edece7e6 [avr] Improved SPI speed on 16bit transfer.
From https://github.com/arduino/Arduino/pull/2376#issuecomment-59671152

Quoting Andrew Kroll:

   [..this commit..] introduces a small delay that can prevent the wait
   loop form iterating when running at the maximum speed. This gives
   you a little more speed, even if it seems counter-intuitive. At
   lower speeds, it is unnoticed. Watch the output on an oscilloscope
   when running full SPI speed, and you should see closer back-to-back
   writes.

Quoting Paul Stoffregen:

   I did quite a bit of experimenting with the NOP addition. The one
   that's in my copy gives about a 10% speedup on AVR.
2014-11-25 15:49:17 +01:00
Cristian Maglie 39b2b39234 [avr] Small comments and headers fixes in SPI 2014-11-14 00:23:11 +01:00
PaulStoffregen 48f5256789 SPI Transactions for AVR 2014-08-01 05:38:27 -07:00
Cristian Maglie 66ca83a809 Revert "SPI library to new format" 2013-11-21 15:05:36 +01:00
Fede85 fd8c367304 SPI library to the new format and moved Robot_Motor and Robot_Control libraries 2013-07-03 22:00:02 +02:00
Cristian Maglie 8c2b5b979a Moved libraries folder inside platform folder. Now libraries and examples are searched per board/platform 2012-01-04 15:14:51 +01:00