@@ -90,6 +90,7 @@ static void IRAM_ATTR machine_bitstream_high_low_bitbang(mp_hal_pin_obj_t pin, u
9090 mp_hal_quiet_timing_exit (irq_state );
9191}
9292
93+ #if SOC_RMT_SUPPORTED
9394/******************************************************************************/
9495// RMT implementation
9596
@@ -166,16 +167,17 @@ static void machine_bitstream_high_low_rmt(mp_hal_pin_obj_t pin, uint32_t *timin
166167 esp_rom_gpio_connect_out_signal (pin , SIG_GPIO_OUT_IDX , false, false);
167168}
168169
170+ #endif
169171/******************************************************************************/
170172// Interface to machine.bitstream
171173
172174void machine_bitstream_high_low (mp_hal_pin_obj_t pin , uint32_t * timing_ns , const uint8_t * buf , size_t len ) {
173- if (false) {
174- // TODO test whether channel creation was successful?
175- machine_bitstream_high_low_bitbang ( pin , timing_ns , buf , len );
176- } else {
177- machine_bitstream_high_low_rmt (pin , timing_ns , buf , len );
178- }
175+ # if SOC_RMT_SUPPORTED
176+ machine_bitstream_high_low_rmt ( pin , timing_ns , buf , len );
177+ #else
178+ // TODO test whether channel creation was successful?
179+ machine_bitstream_high_low_bitbang (pin , timing_ns , buf , len );
180+ #endif
179181}
180182
181183#endif // MICROPY_PY_MACHINE_BITSTREAM
0 commit comments