Skip to content

Commit 2b163cc

Browse files
committed
Fix incorrect deinit mask
1 parent 1b00d94 commit 2b163cc

File tree

1 file changed

+1
-1
lines changed
  • ports/raspberrypi/common-hal/pwmio

1 file changed

+1
-1
lines changed

ports/raspberrypi/common-hal/pwmio/PWMOut.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t* self) {
164164
uint32_t channel_mask = _mask(self->slice, self->channel);
165165
channel_use &= ~channel_mask;
166166
never_reset_channel &= ~channel_mask;
167-
uint32_t slice_mask = ((1 << CHANNELS_PER_SLICE) - 1) << (self->slice * CHANNELS_PER_SLICE + self->channel);
167+
uint32_t slice_mask = ((1 << CHANNELS_PER_SLICE) - 1) << (self->slice * CHANNELS_PER_SLICE);
168168
if ((channel_use & slice_mask) == 0) {
169169
target_slice_frequencies[self->slice] = 0;
170170
slice_variable_frequency &= ~(1 << self->slice);

0 commit comments

Comments
 (0)