Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: CanNucleoF0_example
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/spi_api.c
- Revision:
- 227:7bd0639b8911
- Parent:
- 215:83cf97a28428
- Child:
- 233:1bbc1451db33
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/spi_api.c Wed Jun 11 09:45:09 2014 +0100
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/spi_api.c Wed Jun 11 16:00:09 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_AF5_SPI1)},
@@ -111,10 +111,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) {
