remove redundant NOPs

crypto-aes
Hierophect 3 years ago
parent 45a6b03d40
commit c53496a55e
  1. 8
      ports/stm32f4/common-hal/neopixel_write/__init__.c

@ -76,13 +76,9 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout
cyc = (pix & mask) ? t1 : t0;
start = DWT->CYCCNT;
LL_GPIO_SetOutputPin(p_port, p_mask);
while((DWT->CYCCNT - start) < cyc) {
__asm__ __volatile__("nop");
}
while((DWT->CYCCNT - start) < cyc);
LL_GPIO_ResetOutputPin(p_port, p_mask);
while((DWT->CYCCNT - start) < interval) {
__asm__ __volatile__("nop");
}
while((DWT->CYCCNT - start) < interval);
if(!(mask >>= 1)) {
if(p >= end) break;
pix = *p++;

Loading…
Cancel
Save