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.
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/spi_api.c
- Revision:
- 239:8cadf13dff33
- Parent:
- 233:1bbc1451db33
- Child:
- 335:6848febe3436
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/spi_api.c Thu Jun 26 09:00:08 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/spi_api.c Thu Jun 26 09:15:07 2014 +0100 @@ -27,6 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************* */ +#include "mbed_assert.h" #include "spi_api.h" #if DEVICE_SPI @@ -34,7 +35,6 @@ #include <math.h> #include "cmsis.h" #include "pinmap.h" -#include "error.h" static const PinMap PinMap_SPI_MOSI[] = { {PA_7, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)}, @@ -103,10 +103,7 @@ SPIName spi_cntl = (SPIName)pinmap_merge(spi_sclk, spi_ssel); obj->spi = (SPIName)pinmap_merge(spi_data, spi_cntl); - - if (obj->spi == (SPIName)NC) { - error("SPI error: pinout mapping failed."); - } + MBED_ASSERT(obj->spi != (SPIName)NC); // Enable SPI clock if (obj->spi == SPI_1) {