@@ -95,19 +95,19 @@ STATIC mp_obj_t nativeio_pwmout_make_new(const mp_obj_type_t *type, size_t n_arg
95
95
96
96
mp_map_t kw_args ;
97
97
mp_map_init_fixed_table (& kw_args , n_kw , args + n_args );
98
- enum { ARG_duty , ARG_frequency , ARG_variable_frequency };
98
+ enum { ARG_duty_cycle , ARG_frequency , ARG_variable_frequency };
99
99
static const mp_arg_t allowed_args [] = {
100
100
{ MP_QSTR_duty_cycle , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = 0 } },
101
101
{ MP_QSTR_frequency , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = 500 } },
102
102
{ MP_QSTR_variable_frequency , MP_ARG_KW_ONLY | MP_ARG_BOOL , {.u_bool = false} },
103
103
};
104
104
mp_arg_val_t parsed_args [MP_ARRAY_SIZE (allowed_args )];
105
105
mp_arg_parse_all (n_args - 1 , args + 1 , & kw_args , MP_ARRAY_SIZE (allowed_args ), allowed_args , parsed_args );
106
- uint8_t duty = parsed_args [ARG_duty ].u_int ;
106
+ uint16_t duty_cycle = parsed_args [ARG_duty_cycle ].u_int ;
107
107
uint32_t frequency = parsed_args [ARG_frequency ].u_int ;
108
108
bool variable_frequency = parsed_args [ARG_variable_frequency ].u_int ;
109
109
110
- common_hal_nativeio_pwmout_construct (self , pin , duty , frequency , variable_frequency );
110
+ common_hal_nativeio_pwmout_construct (self , pin , duty_cycle , frequency , variable_frequency );
111
111
112
112
return MP_OBJ_FROM_PTR (self );
113
113
}
0 commit comments