Commit 996f7031 authored by Jim Mussared's avatar Jim Mussared Committed by Damien George
Browse files

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: default avatarJim Mussared <jim.mussared@gmail.com>
parent b51e7e9d
......@@ -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]) {
;
}
......
......@@ -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]) {
;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment