Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Gabryjelski <henrygab@users.noreply.github.com>2019-08-13 04:46:25 +0300
committerDaniel Garcia <danielgarcia@gmail.com>2019-08-13 04:46:25 +0300
commit443259740cc7e6b120d1e4aae0c4b4b8d1dfef52 (patch)
tree491be20303c3f717546f555ce39fdd1c4e54dc7d
parent083423bb22ecefc21fdefa6b46d2d579de2c3ac7 (diff)
Fixes #856. (#860)
Initialization of pins may cause change in pin output. Fix may be to initialize th epin state in Init(), and call mWait.mark() to prevent showPixels() from sending actual LED data to the strand until any potential prior data had time to latch.
-rw-r--r--platforms/arm/nrf52/clockless_arm_nrf52.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/platforms/arm/nrf52/clockless_arm_nrf52.h b/platforms/arm/nrf52/clockless_arm_nrf52.h
index d8a5da98..94fd3ed8 100644
--- a/platforms/arm/nrf52/clockless_arm_nrf52.h
+++ b/platforms/arm/nrf52/clockless_arm_nrf52.h
@@ -156,6 +156,11 @@ public:
FASTLED_NRF52_DEBUGPRINT(" T0H == %d", _T0H);
FASTLED_NRF52_DEBUGPRINT(" T1H == %d", _T1H);
FASTLED_NRF52_DEBUGPRINT(" TOP == %d\n", _TOP);
+ // to avoid pin initialization from causing first LED to have invalid color,
+ // call mWait.mark() to ensure data latches before color data gets sent.
+ startPwmPlayback_InitializePinState();
+ mWait.mark();
+
}
virtual uint16_t getMaxRefreshRate() const { return 800; }