Browse Source

Fall back to slower bitrate if hardware isn't fast enough

main_ledos
PaulStoffregen 6 years ago
parent
commit
732b6fadc1
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      WS2812Serial.cpp

+ 1
- 0
WS2812Serial.cpp View File

if (!dma) return false; // unable to allocate DMA channel if (!dma) return false; // unable to allocate DMA channel
} }
#if defined(KINETISK) #if defined(KINETISK)
if (divisor < 32) divisor = 32;
uart->BDH = (divisor >> 13) & 0x1F; uart->BDH = (divisor >> 13) & 0x1F;
uart->BDL = (divisor >> 5) & 0xFF; uart->BDL = (divisor >> 5) & 0xFF;
uart->C4 = divisor & 0x1F; uart->C4 = divisor & 0x1F;

Loading…
Cancel
Save