mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
84:f54042cbc282
Parent:
80:66393a7b209d
Child:
118:b44c45162f28
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/spi_api.c	Fri Jan 31 10:15:06 2014 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/spi_api.c	Mon Feb 03 09:30:05 2014 +0000
@@ -114,7 +114,7 @@
     obj->bits = SPI_DataSize_8b;
     obj->cpol = SPI_CPOL_Low;
     obj->cpha = SPI_CPHA_1Edge;
-    obj->br_presc = SPI_BaudRatePrescaler_64; // Closest to 1MHz (72MHz/64 = 1.125MHz)
+    obj->br_presc = SPI_BaudRatePrescaler_16; // 1 MHz
     
     if (ssel == NC) { // Master
         obj->mode = SPI_Mode_Master;
@@ -176,7 +176,7 @@
 
 void spi_frequency(spi_t *obj, int hz) {
     // Get SPI clock frequency
-    uint32_t PCLK = SystemCoreClock >> 1;
+    uint32_t PCLK = SystemCoreClock;
 
     // Choose the baud rate divisor (between 2 and 256)
     uint32_t divisor = PCLK / hz;