Skip to content

Commit 4a81817

Browse files
committed
esp32_rmt,machine_bitstream: Fixes to make pre-commit happy.
Signed-off-by: Rick Sorensen <[email protected]>
1 parent b358171 commit 4a81817

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

ports/esp32/esp32_rmt.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ static mp_obj_t esp32_rmt_make_new(const mp_obj_type_t *type, size_t n_args, siz
120120
.gpio_num = self->pin,
121121
.resolution_hz = APB_CLK_FREQ / clock_div,
122122
.trans_queue_depth = 4,
123-
#if SOC_RMT_SUPPORT_DMA
124-
#warning "INFO: esp32_rmt.c: RMT using DMA"
125-
.mem_block_symbols = num_symbols,
126-
.flags.with_dma = 1,
127-
#else
128-
#warning "INFO: esp32_rmt.c: RMT not using DMA"
123+
#if SOC_RMT_SUPPORT_DMA
124+
#warning "INFO: esp32_rmt.c: RMT using DMA"
129125
.mem_block_symbols = num_symbols,
130-
.flags.with_dma = 0,
131-
#endif
126+
.flags.with_dma = 1,
127+
#else
128+
#warning "INFO: esp32_rmt.c: RMT not using DMA"
129+
.mem_block_symbols = num_symbols,
130+
.flags.with_dma = 0,
131+
#endif
132132
};
133133

134134
check_esp_err(rmt_new_tx_channel(&tx_chan_config, &self->channel));

ports/esp32/machine_bitstream.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ static void machine_bitstream_high_low_rmt(mp_hal_pin_obj_t pin, uint32_t *timin
115115
.gpio_num = pin,
116116
.resolution_hz = APB_CLK_FREQ / clock_div,
117117
.trans_queue_depth = 1, // should this be biggert
118-
#if SOC_RMT_SUPPORT_DMA
119-
#warning "INFO: machine_bitstream rmt using DMA"
118+
#if SOC_RMT_SUPPORT_DMA
119+
#warning "INFO: machine_bitstream rmt using DMA"
120120
.mem_block_symbols = 1024,
121-
.flags.with_dma = 1,
122-
#else
123-
#warning "INFO: machine_bitstream rmt no DMA"
121+
.flags.with_dma = 1,
122+
#else
123+
#warning "INFO: machine_bitstream rmt no DMA"
124124
.mem_block_symbols = 64,
125-
.flags.with_dma = 0,
126-
#endif
125+
.flags.with_dma = 0,
126+
#endif
127127
};
128128
check_esp_err(rmt_new_tx_channel(&tx_chan_config, &channel));
129129
check_esp_err(rmt_enable(channel));

0 commit comments

Comments
 (0)