mbed library sources. Supersedes mbed-src.

Fork of mbed by teralytic

Revision:
119:3921aeca8633
Parent:
0:9b334a45a8ff
Child:
144:ef7eb2e8f9f7
--- a/common/SPI.cpp	Wed Apr 27 19:30:12 2016 +0100
+++ b/common/SPI.cpp	Fri Apr 29 01:15:11 2016 +0100
@@ -124,7 +124,12 @@
     if (_transaction_buffer.full()) {
         return -1; // the buffer is full
     } else {
+        __disable_irq();
         _transaction_buffer.push(transaction);
+        if (!spi_active(&_spi)) {
+            dequeue_transaction();
+        }
+        __enable_irq();
         return 0;
     }
 #else