Skip to content

Commit

Permalink
Merge pull request adafruit#6741 from tannewt/remove_pulseout_pwm_param
Browse files Browse the repository at this point in the history
Remove PWMOut parameter to PulseOut
  • Loading branch information
dhalbert authored Aug 11, 2022
2 parents 9a44e12 + 35f3773 commit 5a2d870
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions shared-bindings/onewireio/OneWire.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
//|
//| :param ~microcontroller.Pin pin: Pin connected to the OneWire bus
//|
//| .. note:: The OneWire class is available on `busio` and `bitbangio` in CircuitPython
//| 7.x for backwards compatibility but will be removed in CircuitPython 8.0.0.
//|
//| Read a short series of pulses::
//|
//| import onewireio
Expand Down
11 changes: 0 additions & 11 deletions shared-bindings/pulseio/PulseOut.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
//| :param int frequency: Carrier signal frequency in Hertz
//| :param int duty_cycle: 16-bit duty cycle of carrier frequency (0 - 65536)
//|
//| For backwards compatibility, ``pin`` may be a PWMOut object used as the carrier. This
//| compatibility will be removed in CircuitPython 8.0.0.
//|
//| Send a short series of pulses::
//|
//| import array
Expand Down Expand Up @@ -82,14 +79,6 @@ STATIC mp_obj_t pulseio_pulseout_make_new(const mp_obj_type_t *type, size_t n_ar
const mcu_pin_obj_t *pin = args[ARG_pin].u_obj;
mp_int_t frequency = args[ARG_frequency].u_int;
mp_int_t duty_cycle = args[ARG_duty_cycle].u_int;
if (mp_obj_is_type(args[ARG_pin].u_obj, &pwmio_pwmout_type)) {
pwmio_pwmout_obj_t *pwmout = args[ARG_pin].u_obj;
duty_cycle = common_hal_pwmio_pwmout_get_duty_cycle(pwmout);
frequency = common_hal_pwmio_pwmout_get_frequency(pwmout);
pin = common_hal_pwmio_pwmout_get_pin(pwmout);
// Deinit the pin so we can use it.
common_hal_pwmio_pwmout_deinit(pwmout);
}
validate_obj_is_free_pin(MP_OBJ_FROM_PTR(pin));
pulseio_pulseout_obj_t *self = m_new_obj(pulseio_pulseout_obj_t);
self->base.type = &pulseio_pulseout_type;
Expand Down

0 comments on commit 5a2d870

Please sign in to comment.