File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 51
51
//| fixed outputs first.
52
52
//|
53
53
//| :param ~microcontroller.Pin pin: The pin to output to
54
- //| :param int duty : The fraction of each pulse which is high. 16-bit
54
+ //| :param int duty_cycle : The fraction of each pulse which is high. 16-bit
55
55
//| :param int frequency: The target frequency in Hertz (32-bit)
56
56
//| :param bool variable_frequency: True if the frequency will change over time
57
57
//|
@@ -155,7 +155,7 @@ STATIC mp_obj_t pulseio_pwmout_obj_set_duty_cycle(mp_obj_t self_in, mp_obj_t dut
155
155
pulseio_pwmout_obj_t * self = MP_OBJ_TO_PTR (self_in );
156
156
mp_int_t duty = mp_obj_get_int (duty_cycle );
157
157
if (duty < 0 || duty > 0xffff ) {
158
- mp_raise_ValueError ("PWM duty must be between 0 and 65536 (16 bit resolution)" );
158
+ mp_raise_ValueError ("PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" );
159
159
}
160
160
common_hal_pulseio_pwmout_set_duty_cycle (self , duty );
161
161
return mp_const_none ;
You can’t perform that action at this time.
0 commit comments