update native_uart implementation
This commit is contained in:
parent
fc975d6147
commit
916bd92b0c
@ -145,8 +145,8 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
|
||||
|
||||
|
||||
// Helper to ensure we have the native super class instead of a subclass.
|
||||
busio_uart_obj_t* native_uart(mp_obj_t uart_obj) {
|
||||
mp_obj_t native_uart = mp_instance_cast_to_native_base(uart_obj, &busio_uart_type);
|
||||
busio_uart_obj_t *native_uart(mp_obj_t uart_obj) {
|
||||
mp_obj_t native_uart = mp_obj_cast_to_native_base(uart_obj, &busio_uart_type);
|
||||
if (native_uart == MP_OBJ_NULL) {
|
||||
mp_raise_ValueError_varg(translate("Must be a %q subclass."), MP_QSTR_UART);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user