@@ -252,7 +252,7 @@ STATIC mp_obj_t canio_can_restart(mp_obj_t self_in) {
252
252
}
253
253
STATIC MP_DEFINE_CONST_FUN_OBJ_1 (canio_can_restart_obj , canio_can_restart );
254
254
255
- //| def listen(self, match : Optional[Sequence[Match]]=None, *, timeout: float=10) -> Listener:
255
+ //| def listen(self, matches : Optional[Sequence[Match]]=None, *, timeout: float=10) -> Listener:
256
256
//| """Start receiving messages that match any one of the filters.
257
257
//|
258
258
//| Creating a listener is an expensive operation and can interfere with reception of messages by other listeners.
@@ -272,9 +272,9 @@ STATIC mp_obj_t canio_can_listen(size_t n_args, const mp_obj_t *pos_args, mp_map
272
272
canio_can_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
273
273
common_hal_canio_can_check_for_deinit (self );
274
274
275
- enum { ARG_match , ARG_timeout , NUM_ARGS };
275
+ enum { ARG_matches , ARG_timeout , NUM_ARGS };
276
276
static const mp_arg_t allowed_args [] = {
277
- { MP_QSTR_match , MP_ARG_OBJ , {.u_obj = 0 } },
277
+ { MP_QSTR_matches , MP_ARG_OBJ , {.u_obj = 0 } },
278
278
{ MP_QSTR_timeout , MP_ARG_OBJ , {.u_obj = 0 } },
279
279
};
280
280
mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
@@ -285,8 +285,8 @@ STATIC mp_obj_t canio_can_listen(size_t n_args, const mp_obj_t *pos_args, mp_map
285
285
size_t nmatch = 0 ;
286
286
mp_obj_t * match_objects = NULL ;
287
287
288
- if (args [ARG_match ].u_obj ) {
289
- mp_obj_get_array (args [ARG_match ].u_obj , & nmatch , & match_objects );
288
+ if (args [ARG_matches ].u_obj ) {
289
+ mp_obj_get_array (args [ARG_matches ].u_obj , & nmatch , & match_objects );
290
290
}
291
291
292
292
canio_match_obj_t * matches [nmatch ];
0 commit comments