diff options
Diffstat (limited to 'shared-bindings/pulseio')
| -rw-r--r-- | shared-bindings/pulseio/PWMOut.c | 2 | ||||
| -rw-r--r-- | shared-bindings/pulseio/PulseOut.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/shared-bindings/pulseio/PWMOut.c b/shared-bindings/pulseio/PWMOut.c index 9b7094b4e..362b8123d 100644 --- a/shared-bindings/pulseio/PWMOut.c +++ b/shared-bindings/pulseio/PWMOut.c @@ -192,7 +192,7 @@ STATIC mp_obj_t pulseio_pwmout_obj_set_frequency(mp_obj_t self_in, mp_obj_t freq raise_error_if_deinited(common_hal_pulseio_pwmout_deinited(self)); if (!common_hal_pulseio_pwmout_get_variable_frequency(self)) { mp_raise_AttributeError(translate( - "PWM frequency not writeable when variable_frequency is False on " + "PWM frequency not writable when variable_frequency is False on " "construction.")); } common_hal_pulseio_pwmout_set_frequency(self, mp_obj_get_int(frequency)); diff --git a/shared-bindings/pulseio/PulseOut.c b/shared-bindings/pulseio/PulseOut.c index 1c97c37c3..e9834c12a 100644 --- a/shared-bindings/pulseio/PulseOut.c +++ b/shared-bindings/pulseio/PulseOut.c @@ -47,7 +47,7 @@ //| //| .. class:: PulseOut(carrier) //| -//| Create a PulseOut object associated with the given PWM out experience. +//| Create a PulseOut object associated with the given PWMout object. //| //| :param ~pulseio.PWMOut carrier: PWMOut that is set to output on the desired pin. //| @@ -57,9 +57,10 @@ //| import pulseio //| import board //| -//| pwm = pulseio.PWMOut(board.D13, duty_cycle=2 ** 15) +//| # 50% duty cycle at 38kHz. +//| pwm = pulseio.PWMOut(board.D13, frequency=38000, duty_cycle=32768) //| pulse = pulseio.PulseOut(pwm) -//| # on off on off on +//| # on off on off on //| pulses = array.array('H', [65000, 1000, 65000, 65000, 1000]) //| pulse.send(pulses) //| |
