diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2021-08-20 12:09:36 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-08-24 23:55:08 +1000 |
| commit | 996f703166d8c57122756f35f7f0185666237f2b (patch) | |
| tree | 6b5e6121e997f86f94f5dde01f9fd035e7a1b936 | |
| parent | b51e7e9d01a696cdfefada2e374db51752d1b803 (diff) | |
esp32,esp8266: Remove dead code for end_ticks in machine_bitstream.
The compiler was optimising this out already so it's a no-op change.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
| -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]) { ; } |
