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;
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++;