Retune neopixel timings on SAMD51. They were too slow.

Fixes #1083
This commit is contained in:
Scott Shawcroft 2018-08-07 16:58:37 -07:00
parent f5fab358aa
commit b0dd645e27
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59

View File

@ -111,14 +111,14 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t* digitalinout,
#ifdef SAMD51
delay_cycles(3);
#endif
if(p & bitMask) {
if((p & bitMask) != 0) {
// This is the high delay unique to a one bit.
// For the SK6812 its 0.3us
#ifdef SAMD21
asm("nop; nop; nop; nop; nop; nop; nop;");
#endif
#ifdef SAMD51
delay_cycles(11);
delay_cycles(3);
#endif
*clr = pinMask;
} else {
@ -140,7 +140,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t* digitalinout,
asm("nop; nop; nop; nop; nop;");
#endif
#ifdef SAMD51
delay_cycles(20);
delay_cycles(4);
#endif
} else {
if(ptr >= end) break;
@ -151,7 +151,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t* digitalinout,
// above operations take.
// For the SK6812 its 0.6us +- 0.15us
#ifdef SAMD51
delay_cycles(15);
delay_cycles(3);
#endif
}
}