Merge pull request #2147 from jepler/issue2146

nRF: PWMOut: At deinit, make pin available again
This commit is contained in:
Scott Shawcroft 2019-09-13 09:32:28 -07:00 committed by GitHub
commit 3422e53bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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) {