diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2021-02-25 14:57:46 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2021-02-25 14:57:46 -0800 |
| commit | 2b163ccd6a9f934a71cd8450b385977fb009bff5 (patch) | |
| tree | b331726acf3432d0d0a1285766f47f377748da35 | |
| parent | 1b00d94b23cc3529dc1762b060f773ac0d8db98c (diff) | |
Fix incorrect deinit mask
| -rw-r--r-- | ports/raspberrypi/common-hal/pwmio/PWMOut.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/raspberrypi/common-hal/pwmio/PWMOut.c b/ports/raspberrypi/common-hal/pwmio/PWMOut.c index b2e55ce6b..f690528ae 100644 --- a/ports/raspberrypi/common-hal/pwmio/PWMOut.c +++ b/ports/raspberrypi/common-hal/pwmio/PWMOut.c @@ -164,7 +164,7 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t* self) { uint32_t channel_mask = _mask(self->slice, self->channel); channel_use &= ~channel_mask; never_reset_channel &= ~channel_mask; - uint32_t slice_mask = ((1 << CHANNELS_PER_SLICE) - 1) << (self->slice * CHANNELS_PER_SLICE + self->channel); + uint32_t slice_mask = ((1 << CHANNELS_PER_SLICE) - 1) << (self->slice * CHANNELS_PER_SLICE); if ((channel_use & slice_mask) == 0) { target_slice_frequencies[self->slice] = 0; slice_variable_frequency &= ~(1 << self->slice); |
