diff options
-rw-r--r-- | ports/esp32/machine_bitstream.c | 2 | ||||
-rw-r--r-- | ports/esp8266/machine_bitstream.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/ports/esp32/machine_bitstream.c b/ports/esp32/machine_bitstream.c index a60fe1b1c..9d2bb5724 100644 --- a/ports/esp32/machine_bitstream.c +++ b/ports/esp32/machine_bitstream.c @@ -69,13 +69,11 @@ void IRAM_ATTR machine_bitstream_high_low(mp_hal_pin_obj_t pin, uint32_t *timing GPIO_REG_WRITE(gpio_reg_set, pin_mask); uint32_t start_ticks = mp_hal_ticks_cpu(); uint32_t *t = &timing_ns[b >> 6 & 2]; - uint32_t end_ticks = start_ticks + t[0]; while (mp_hal_ticks_cpu() - start_ticks < t[0]) { ; } GPIO_REG_WRITE(gpio_reg_clear, pin_mask); b <<= 1; - end_ticks += t[1]; while (mp_hal_ticks_cpu() - start_ticks < t[1]) { ; } diff --git a/ports/esp8266/machine_bitstream.c b/ports/esp8266/machine_bitstream.c index bc16aea44..13666f3d0 100644 --- a/ports/esp8266/machine_bitstream.c +++ b/ports/esp8266/machine_bitstream.c @@ -57,13 +57,11 @@ void machine_bitstream_high_low(mp_hal_pin_obj_t pin, uint32_t *timing_ns, const GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pin_mask); uint32_t start_ticks = mp_hal_ticks_cpu(); uint32_t *t = &timing_ns[b >> 6 & 2]; - uint32_t end_ticks = start_ticks + t[0]; while (mp_hal_ticks_cpu() - start_ticks < t[0]) { ; } GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pin_mask); b <<= 1; - end_ticks += t[1]; while (mp_hal_ticks_cpu() - start_ticks < t[1]) { ; } |