@@ -320,8 +320,8 @@ STATIC mp_obj_t pyb_i2c_init_helper(pyb_i2c_obj_t *self, const mp_arg_val_t *arg
320320STATIC const mp_arg_t pyb_i2c_init_args [] = {
321321 { MP_QSTR_id , MP_ARG_INT , {.u_int = 0 } },
322322 { MP_QSTR_mode , MP_ARG_INT , {.u_int = PYBI2C_MASTER } },
323- { MP_QSTR_baudrate , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = 100000 } },
324- { MP_QSTR_pins , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = MP_OBJ_NULL } },
323+ { MP_QSTR_baudrate , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = 100000 } },
324+ { MP_QSTR_pins , MP_ARG_KW_ONLY | MP_ARG_OBJ , {.u_obj = MP_OBJ_NULL } },
325325};
326326STATIC mp_obj_t pyb_i2c_make_new (mp_obj_t type_in , mp_uint_t n_args , mp_uint_t n_kw , const mp_obj_t * all_args ) {
327327 // parse args
@@ -414,7 +414,7 @@ STATIC mp_obj_t pyb_i2c_readfrom_into(mp_uint_t n_args, const mp_obj_t *pos_args
414414 // return the number of bytes received
415415 return mp_obj_new_int (vstr .len );
416416}
417- STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_readfrom_into_obj , 3 , pyb_i2c_readfrom_into );
417+ STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_readfrom_into_obj , 1 , pyb_i2c_readfrom_into );
418418
419419STATIC mp_obj_t pyb_i2c_writeto (mp_uint_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
420420 STATIC const mp_arg_t pyb_i2c_writeto_args [] = {
@@ -442,7 +442,7 @@ STATIC mp_obj_t pyb_i2c_writeto(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m
442442 // return the number of bytes written
443443 return mp_obj_new_int (bufinfo .len );
444444}
445- STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_writeto_obj , 3 , pyb_i2c_writeto );
445+ STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_writeto_obj , 1 , pyb_i2c_writeto );
446446
447447STATIC mp_obj_t pyb_i2c_readfrom_mem (mp_uint_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
448448 STATIC const mp_arg_t pyb_i2c_readfrom_mem_args [] = {
@@ -460,7 +460,7 @@ STATIC mp_obj_t pyb_i2c_readfrom_mem(mp_uint_t n_args, const mp_obj_t *pos_args,
460460 pyb_i2c_readmem_into (args , & vstr );
461461 return mp_obj_new_str_from_vstr (& mp_type_bytes , & vstr );
462462}
463- STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_readfrom_mem_obj , 4 , pyb_i2c_readfrom_mem );
463+ STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_readfrom_mem_obj , 1 , pyb_i2c_readfrom_mem );
464464
465465STATIC const mp_arg_t pyb_i2c_readfrom_mem_into_args [] = {
466466 { MP_QSTR_addr , MP_ARG_REQUIRED | MP_ARG_INT , },
@@ -479,7 +479,7 @@ STATIC mp_obj_t pyb_i2c_readfrom_mem_into(mp_uint_t n_args, const mp_obj_t *pos_
479479 pyb_i2c_readmem_into (args , & vstr );
480480 return mp_obj_new_int (vstr .len );
481481}
482- STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_readfrom_mem_into_obj , 4 , pyb_i2c_readfrom_mem_into );
482+ STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_readfrom_mem_into_obj , 1 , pyb_i2c_readfrom_mem_into );
483483
484484STATIC mp_obj_t pyb_i2c_writeto_mem (mp_uint_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
485485 // parse args
@@ -507,7 +507,7 @@ STATIC mp_obj_t pyb_i2c_writeto_mem(mp_uint_t n_args, const mp_obj_t *pos_args,
507507
508508 nlr_raise (mp_obj_new_exception_msg (& mp_type_OSError , mpexception_os_operation_failed ));
509509}
510- STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_writeto_mem_obj , 4 , pyb_i2c_writeto_mem );
510+ STATIC MP_DEFINE_CONST_FUN_OBJ_KW (pyb_i2c_writeto_mem_obj , 1 , pyb_i2c_writeto_mem );
511511
512512STATIC const mp_map_elem_t pyb_i2c_locals_dict_table [] = {
513513 // instance methods
0 commit comments