Skip to content

Commit 996f703

Browse files
jimmodpgeorge
authored andcommitted
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 <[email protected]>
1 parent b51e7e9 commit 996f703

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

Diff for: ports/esp32/machine_bitstream.c

-2
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,11 @@ void IRAM_ATTR machine_bitstream_high_low(mp_hal_pin_obj_t pin, uint32_t *timing
6969
GPIO_REG_WRITE(gpio_reg_set, pin_mask);
7070
uint32_t start_ticks = mp_hal_ticks_cpu();
7171
uint32_t *t = &timing_ns[b >> 6 & 2];
72-
uint32_t end_ticks = start_ticks + t[0];
7372
while (mp_hal_ticks_cpu() - start_ticks < t[0]) {
7473
;
7574
}
7675
GPIO_REG_WRITE(gpio_reg_clear, pin_mask);
7776
b <<= 1;
78-
end_ticks += t[1];
7977
while (mp_hal_ticks_cpu() - start_ticks < t[1]) {
8078
;
8179
}

Diff for: ports/esp8266/machine_bitstream.c

-2
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ void machine_bitstream_high_low(mp_hal_pin_obj_t pin, uint32_t *timing_ns, const
5757
GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pin_mask);
5858
uint32_t start_ticks = mp_hal_ticks_cpu();
5959
uint32_t *t = &timing_ns[b >> 6 & 2];
60-
uint32_t end_ticks = start_ticks + t[0];
6160
while (mp_hal_ticks_cpu() - start_ticks < t[0]) {
6261
;
6362
}
6463
GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pin_mask);
6564
b <<= 1;
66-
end_ticks += t[1];
6765
while (mp_hal_ticks_cpu() - start_ticks < t[1]) {
6866
;
6967
}

0 commit comments

Comments
 (0)