mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/serial_api.c
- Revision:
- 239:8cadf13dff33
- Parent:
- 219:993c9b0acbcc
- Child:
- 242:7074e42da0b2
diff -r bda0417c579a -r 8cadf13dff33 targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/serial_api.c --- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/serial_api.c Thu Jun 26 09:00:08 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/serial_api.c Thu Jun 26 09:15:07 2014 +0100 @@ -27,13 +27,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************* */ +#include "mbed_assert.h" #include "serial_api.h" #if DEVICE_SERIAL #include "cmsis.h" #include "pinmap.h" -#include "error.h" #include <string.h> static const PinMap PinMap_UART_TX[] = { @@ -100,10 +100,7 @@ // Get the peripheral name (UART_1, UART_2, ...) from the pin and assign it to the object obj->uart = (UARTName)pinmap_merge(uart_tx, uart_rx); - - if (obj->uart == (UARTName)NC) { - error("Serial error: pinout mapping failed."); - } + MBED_ASSERT(obj->uart != (UARTName)NC); // Enable USART clock if (obj->uart == UART_1) {