wrong arg type for PWMOut variable_frequency
This commit is contained in:
parent
2169a62409
commit
97140e6a62
@ -102,6 +102,8 @@ void pwmout_reset(void) {
|
|||||||
}
|
}
|
||||||
tcc_channels[i] = mask;
|
tcc_channels[i] = mask;
|
||||||
tccs[i]->CTRLA.bit.SWRST = 1;
|
tccs[i]->CTRLA.bit.SWRST = 1;
|
||||||
|
while (tccs[i]->CTRLA.bit.SWRST == 1) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Tc *tcs[TC_INST_NUM] = TC_INSTS;
|
Tc *tcs[TC_INST_NUM] = TC_INSTS;
|
||||||
for (int i = 0; i < TC_INST_NUM; i++) {
|
for (int i = 0; i < TC_INST_NUM; i++) {
|
||||||
|
@ -103,7 +103,7 @@ STATIC mp_obj_t pulseio_pwmout_make_new(const mp_obj_type_t *type, size_t n_args
|
|||||||
|
|
||||||
uint16_t duty_cycle = parsed_args[ARG_duty_cycle].u_int;
|
uint16_t duty_cycle = parsed_args[ARG_duty_cycle].u_int;
|
||||||
uint32_t frequency = parsed_args[ARG_frequency].u_int;
|
uint32_t frequency = parsed_args[ARG_frequency].u_int;
|
||||||
bool variable_frequency = parsed_args[ARG_variable_frequency].u_int;
|
bool variable_frequency = parsed_args[ARG_variable_frequency].u_bool;
|
||||||
|
|
||||||
// create PWM object from the given pin
|
// create PWM object from the given pin
|
||||||
pulseio_pwmout_obj_t *self = m_new_obj(pulseio_pwmout_obj_t);
|
pulseio_pwmout_obj_t *self = m_new_obj(pulseio_pwmout_obj_t);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user