Remove PWMOut parameter to PulseOut

Fixes #3264
This commit is contained in:
Scott Shawcroft 2022-08-09 14:55:13 -07:00
parent 5084de1b73
commit 35f3773e94
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
2 changed files with 0 additions and 14 deletions

View File

@ -42,9 +42,6 @@
//| //|
//| :param ~microcontroller.Pin pin: Pin connected to the OneWire bus //| :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:: //| Read a short series of pulses::
//| //|
//| import onewireio //| import onewireio

View File

@ -48,9 +48,6 @@
//| :param int frequency: Carrier signal frequency in Hertz //| :param int frequency: Carrier signal frequency in Hertz
//| :param int duty_cycle: 16-bit duty cycle of carrier frequency (0 - 65536) //| :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:: //| Send a short series of pulses::
//| //|
//| import array //| import array
@ -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; const mcu_pin_obj_t *pin = args[ARG_pin].u_obj;
mp_int_t frequency = args[ARG_frequency].u_int; mp_int_t frequency = args[ARG_frequency].u_int;
mp_int_t duty_cycle = args[ARG_duty_cycle].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)); validate_obj_is_free_pin(MP_OBJ_FROM_PTR(pin));
pulseio_pulseout_obj_t *self = m_new_obj(pulseio_pulseout_obj_t); pulseio_pulseout_obj_t *self = m_new_obj(pulseio_pulseout_obj_t);
self->base.type = &pulseio_pulseout_type; self->base.type = &pulseio_pulseout_type;