@@ -252,7 +252,7 @@ STATIC mp_obj_t canio_can_restart(mp_obj_t self_in) {
252252}
253253STATIC MP_DEFINE_CONST_FUN_OBJ_1 (canio_can_restart_obj , canio_can_restart );
254254
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:
256256//| """Start receiving messages that match any one of the filters.
257257//|
258258//| 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
272272 canio_can_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
273273 common_hal_canio_can_check_for_deinit (self );
274274
275- enum { ARG_match , ARG_timeout , NUM_ARGS };
275+ enum { ARG_matches , ARG_timeout , NUM_ARGS };
276276 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 } },
278278 { MP_QSTR_timeout , MP_ARG_OBJ , {.u_obj = 0 } },
279279 };
280280 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
285285 size_t nmatch = 0 ;
286286 mp_obj_t * match_objects = NULL ;
287287
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 );
290290 }
291291
292292 canio_match_obj_t * matches [nmatch ];
0 commit comments