diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2019-09-13 09:32:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-13 09:32:28 -0700 |
| commit | 3422e53bd12025d584e7d69f67ea63b9e98f9c36 (patch) | |
| tree | df4dd8fa0d00c65aaf96de0a3db525231a3d9544 | |
| parent | 42d37c5c516778dde8d582ff09c86a70573a2e40 (diff) | |
| parent | df48312ce78016dfb453a94c8e3e37d6e9ca37dd (diff) | |
Merge pull request #2147 from jepler/issue2146
nRF: PWMOut: At deinit, make pin available again
| -rw-r--r-- | ports/nrf/common-hal/pulseio/PWMOut.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/nrf/common-hal/pulseio/PWMOut.c b/ports/nrf/common-hal/pulseio/PWMOut.c index b827470d3..6921091f8 100644 --- a/ports/nrf/common-hal/pulseio/PWMOut.c +++ b/ports/nrf/common-hal/pulseio/PWMOut.c @@ -256,6 +256,9 @@ void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self) { self->pwm = NULL; pwmout_free_channel(pwm, self->channel); + + reset_pin_number(self->pin_number); + self->pin_number = NO_PIN; } void common_hal_pulseio_pwmout_set_duty_cycle(pulseio_pwmout_obj_t* self, uint16_t duty_cycle) { |
