diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-07-16 21:31:29 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-07-16 21:31:29 +0300 |
commit | 8363d09520ae4727c3112a0bb2a4710cddbf92c7 (patch) | |
tree | a56cb11ace161a586375b783f51894f7494c4d39 /src/Fans | |
parent | fce586901d2767a82b08926d423d019853d6d662 (diff) |
More changes for alternaive direct-connect LCDs
Diffstat (limited to 'src/Fans')
-rw-r--r-- | src/Fans/DotStarLed.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/Fans/DotStarLed.cpp b/src/Fans/DotStarLed.cpp index e3aaac02..4bed7992 100644 --- a/src/Fans/DotStarLed.cpp +++ b/src/Fans/DotStarLed.cpp @@ -297,10 +297,9 @@ namespace DotStarLed if (!following) { const uint8_t *q = chunkBuffer; + uint32_t nextDelay = T0L; cpu_irq_disable(); -#if 1 uint32_t lastTransitionTime = SysTick->VAL & 0x00FFFFFF; - uint32_t nextDelay = SystemCoreClockFreq/1000000; while (q < p) { uint8_t c = *q++; @@ -325,31 +324,6 @@ namespace DotStarLed c <<= 1; } } -#else - while (q < p) - { - uint8_t c = *q++; - for (unsigned int i = 0; i < 8; ++i) - { - // The delays in the following have been adjusted to work on the SAMD51 with cache disabled - if (c & 0x80) - { - fastDigitalWriteHigh(LcdNeopixelOutPin); - delayCycles3(10); // about 800ns total high time - fastDigitalWriteLow(LcdNeopixelOutPin); - delayCycles3(7); // about 475ns total low time - } - else - { - fastDigitalWriteHigh(LcdNeopixelOutPin); - delayCycles3(7); // about 350ns total high time - fastDigitalWriteLow(LcdNeopixelOutPin); - delayCycles3(11); // about 850ns total low time - } - c <<= 1; - } - } -#endif cpu_irq_enable(); numAlreadyInBuffer = 0; whenDmaFinished = StepTimer::GetTimerTicks(); |