Skip to content

Commit 9fd9cf1

Browse files
committed
canio: fix bugs in shared-bindings
1 parent 59580d0 commit 9fd9cf1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

shared-bindings/canio/CAN.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
//| ...
6565
//|
6666
STATIC mp_obj_t canio_can_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
67-
enum { ARG_rx, ARG_tx, ARG_baudrate, ARG_loopback, ARG_silent, ARG_auto_restart, NUM_ARGS };
67+
enum { ARG_tx, ARG_rx, ARG_baudrate, ARG_loopback, ARG_silent, ARG_auto_restart, NUM_ARGS };
6868
static const mp_arg_t allowed_args[] = {
6969
{ MP_QSTR_tx, MP_ARG_OBJ | MP_ARG_REQUIRED },
7070
{ MP_QSTR_rx, MP_ARG_OBJ | MP_ARG_REQUIRED },
@@ -380,7 +380,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_can_deinit_obj, canio_can_deinit);
380380
STATIC mp_obj_t canio_can_enter(mp_obj_t self_in) {
381381
canio_can_obj_t *self = MP_OBJ_TO_PTR(self_in);
382382
common_hal_canio_can_check_for_deinit(self);
383-
return mp_const_none;
383+
return self_in;
384384
}
385385
STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_can_enter_obj, canio_can_enter);
386386

shared-bindings/canio/Listener.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_listener_deinit_obj, canio_listener_deini
133133
STATIC mp_obj_t canio_listener_enter(mp_obj_t self_in) {
134134
canio_listener_obj_t *self = MP_OBJ_TO_PTR(self_in);
135135
common_hal_canio_listener_check_for_deinit(self);
136-
return mp_const_none;
136+
return self_in;
137137
}
138138
STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_listener_enter_obj, canio_listener_enter);
139139

0 commit comments

Comments
 (0)