remove redundant NOPs

This commit is contained in:
Hierophect 2019-12-05 12:45:09 -05:00
parent 45a6b03d40
commit c53496a55e

View File

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