Skip to content

Commit c53496a

Browse files
committed
remove redundant NOPs
1 parent 45a6b03 commit c53496a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ports/stm32f4/common-hal/neopixel_write/__init__.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,9 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout
7676
cyc = (pix & mask) ? t1 : t0;
7777
start = DWT->CYCCNT;
7878
LL_GPIO_SetOutputPin(p_port, p_mask);
79-
while((DWT->CYCCNT - start) < cyc) {
80-
__asm__ __volatile__("nop");
81-
}
79+
while((DWT->CYCCNT - start) < cyc);
8280
LL_GPIO_ResetOutputPin(p_port, p_mask);
83-
while((DWT->CYCCNT - start) < interval) {
84-
__asm__ __volatile__("nop");
85-
}
81+
while((DWT->CYCCNT - start) < interval);
8682
if(!(mask >>= 1)) {
8783
if(p >= end) break;
8884
pix = *p++;

0 commit comments

Comments
 (0)