diff options
Diffstat (limited to 'ports/teensy/uart.c')
| -rw-r--r-- | ports/teensy/uart.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/teensy/uart.c b/ports/teensy/uart.c index 1b74fe7d5..fa50c6753 100644 --- a/ports/teensy/uart.c +++ b/ports/teensy/uart.c @@ -287,7 +287,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, uint n_args, const mp // init UART (if it fails, it's because the port doesn't exist) if (!uart_init2(self)) { - mp_raise_msg_varg(&mp_type_ValueError, "UART port %d does not exist", self->uart_id); + mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("UART port %d does not exist"), self->uart_id); } #endif @@ -334,7 +334,7 @@ STATIC mp_obj_t pyb_uart_make_new(const mp_obj_type_t *type, uint n_args, uint n o->uart_id = PYB_UART_YB; #endif } else { - mp_raise_msg_varg(&mp_type_ValueError, "UART port %s does not exist", port); + mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("UART port %s does not exist"), port); } } else { o->uart_id = mp_obj_get_int(args[0]); @@ -410,7 +410,7 @@ STATIC mp_obj_t pyb_uart_send(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar if (status != HAL_OK) { // TODO really need a HardwareError object, or something - mp_raise_msg_varg(&mp_type_Exception, "HAL_UART_Transmit failed with code %d", status); + mp_raise_msg_varg(&mp_type_Exception, MP_ERROR_TEXT("HAL_UART_Transmit failed with code %d"), status); } #else (void)self; @@ -457,7 +457,7 @@ STATIC mp_obj_t pyb_uart_recv(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar if (status != HAL_OK) { // TODO really need a HardwareError object, or something - mp_raise_msg_varg(&mp_type_Exception, "HAL_UART_Receive failed with code %d", status); + mp_raise_msg_varg(&mp_type_Exception, MP_ERROR_TEXT("HAL_UART_Receive failed with code %d"), status); } // return the received data |
