Skip to content

Commit 720212b

Browse files
author
gychang
committed
pre-commit fixes
1 parent 04a5441 commit 720212b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ports/espressif/common-hal/audiobusio/I2SOut.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self,
3535
const mcu_pin_obj_t *data, const mcu_pin_obj_t *main_clock, bool left_justified) {
3636
port_i2s_allocate_init(&self->i2s, left_justified);
3737

38-
#ifdef CIRCUITPY_AUDIOBUSIO_PDMOUT
38+
#ifdef CIRCUITPY_AUDIOBUSIO_PDMOUT
3939
i2s_pdm_tx_config_t pdm_tx_cfg = {
4040
.clk_cfg = I2S_PDM_TX_CLK_DEFAULT_CONFIG(16000),
4141
.slot_cfg = I2S_PDM_TX_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_MONO),
@@ -47,7 +47,7 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self,
4747
},
4848
};
4949
CHECK_ESP_RESULT(i2s_channel_init_pdm_tx_mode(self->i2s.handle, &pdm_tx_cfg));
50-
#else
50+
#else
5151
i2s_std_config_t i2s_config = {
5252
.clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(48000),
5353
.slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO),
@@ -60,7 +60,7 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self,
6060
}
6161
};
6262
CHECK_ESP_RESULT(i2s_channel_init_std_mode(self->i2s.handle, &i2s_config));
63-
#endif
63+
#endif
6464
self->bit_clock = bit_clock;
6565
self->word_select = word_select;
6666
self->mclk = main_clock;

ports/espressif/common-hal/audiobusio/__init__.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop) {
175175

176176
uint32_t sample_rate = audiosample_get_sample_rate(sample);
177177

178-
#ifdef CIRCUITPY_AUDIOBUSIO_PDMOUT
178+
#ifdef CIRCUITPY_AUDIOBUSIO_PDMOUT
179179
i2s_pdm_tx_clk_config_t clk_config = I2S_PDM_TX_CLK_DEFAULT_CONFIG(sample_rate);
180180
CHECK_ESP_RESULT(i2s_channel_reconfig_pdm_tx_clock(self->handle, &clk_config));
181181
size_t frame_size = sizeof(uint16_t);
182-
#else
182+
#else
183183
i2s_std_clk_config_t clk_config = I2S_STD_CLK_DEFAULT_CONFIG(sample_rate);
184184
CHECK_ESP_RESULT(i2s_channel_reconfig_std_clock(self->handle, &clk_config));
185185
size_t frame_size = sizeof(uint32_t);
186-
#endif
186+
#endif
187187

188188
// preload the data
189189
self->playing = true;

0 commit comments

Comments
 (0)