mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
184:08ed48f1de7f
Parent:
180:96ed750bd169
Child:
187:0387e8f68319
--- a/drivers/SPI.cpp	Tue Mar 20 17:01:51 2018 +0000
+++ b/drivers/SPI.cpp	Thu Apr 19 17:12:19 2018 +0100
@@ -17,7 +17,7 @@
 #include "platform/mbed_critical.h"
 
 #if DEVICE_SPI_ASYNCH
-#include "platform/mbed_sleep.h"
+#include "platform/mbed_power_mgmt.h"
 #endif
 
 #if DEVICE_SPI
@@ -49,8 +49,8 @@
     lock();
     _bits = bits;
     _mode = mode;
-    // If changing format while you are the owner than just
-    // update format, but if owner is changed than even frequency should be
+    // If changing format while you are the owner then just
+    // update format, but if owner is changed then even frequency should be
     // updated which is done by acquire.
     if (_owner == this) {
         spi_format(&_spi, _bits, _mode, 0);
@@ -63,8 +63,8 @@
 void SPI::frequency(int hz) {
     lock();
     _hz = hz;
-    // If changing format while you are the owner than just
-    // update frequency, but if owner is changed than even frequency should be
+    // If changing format while you are the owner then just
+    // update frequency, but if owner is changed then even frequency should be
     // updated which is done by acquire.
     if (_owner == this) {
         spi_frequency(&_spi, _hz);
@@ -77,7 +77,7 @@
 SPI* SPI::_owner = NULL;
 SingletonPtr<PlatformMutex> SPI::_mutex;
 
-// ignore the fact there are multiple physical spis, and always update if it wasnt us last
+// ignore the fact there are multiple physical spis, and always update if it wasn't us last
 void SPI::aquire() {
     lock();
      if (_owner != this) {
@@ -252,7 +252,7 @@
     }
 #if TRANSACTION_QUEUE_SIZE_SPI
     if (event & (SPI_EVENT_ALL | SPI_EVENT_INTERNAL_TRANSFER_COMPLETE)) {
-        // SPI peripheral is free (event happend), dequeue transaction
+        // SPI peripheral is free (event happened), dequeue transaction
         dequeue_transaction();
     }
 #endif