Skip to content

Commit 35aac3d

Browse files
committed
display SPI now 10MHz; set PWM duty cycle to zero at stop to quiet output
1 parent 24e61a7 commit 35aac3d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void board_init(void) {
6969
&pin_GPIO24, // Command or data
7070
&pin_GPIO22, // Chip select
7171
&pin_GPIO23, // Reset
72-
1000000, // Baudrate
72+
10000000, // Baudrate
7373
0, // Polarity
7474
0); // Phase
7575

ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,11 @@ void common_hal_audiopwmio_pwmaudioout_stop(audiopwmio_pwmaudioout_obj_t *self)
225225
audio_dma_stop(&self->dma);
226226

227227
// Set to quiescent level.
228-
pwm_hw->slice[self->left_pwm.slice].cc = self->quiescent_value;
228+
common_hal_pwmio_pwmout_set_duty_cycle(&self->left_pwm, self->quiescent_value);
229+
pwmio_pwmout_set_top(&self->left_pwm, PWM_TOP);
229230
if (self->stereo) {
230-
pwm_hw->slice[self->right_pwm.slice].cc = self->quiescent_value;
231+
common_hal_pwmio_pwmout_set_duty_cycle(&self->right_pwm, self->quiescent_value);
232+
pwmio_pwmout_set_top(&self->right_pwm, PWM_TOP);
231233
}
232234
}
233235

0 commit comments

Comments
 (0)