1#define FASTLED_INTERNAL
7#if defined(__SAM3X8E__)
8volatile uint32_t fuckit;
11FASTLED_NAMESPACE_BEGIN
21static uint32_t lastshow = 0;
39 m_nPowerData = 0xFFFFFFFF;
44 int nLedsOrOffset,
int nLedsIfOffset) {
45 int nOffset = (nLedsIfOffset > 0) ? nLedsOrOffset : 0;
46 int nLeds = (nLedsIfOffset > 0) ? nLedsIfOffset : nLedsOrOffset;
49 pLed->
setLeds(data + nOffset, nLeds);
56 while(m_nMinMicros && ((micros()-lastshow) < m_nMinMicros));
61 scale = (*m_pPowerFunc)(scale, m_nPowerData);
98 while(m_nMinMicros && ((micros()-lastshow) < m_nMinMicros));
103 scale = (*m_pPowerFunc)(scale, m_nPowerData);
133 unsigned long start = millis();
135#ifndef FASTLED_ACCURATE_CLOCK
143 while((millis()-start) < ms);
223 static uint32_t lastframe = 0;
225 if(br++ >= nFrames) {
226 uint32_t now = millis();
231 m_nFPS = (br * 1000) / now;
233 lastframe = millis();
242 m_nMinMicros = ((1000000 / refresh) > m_nMinMicros) ? (1000000 / refresh) : m_nMinMicros;
244 }
else if(refresh > 0) {
245 m_nMinMicros = 1000000 / refresh;
254extern "C" int atexit(
void (* )()) {
return 0; }
256#ifdef FASTLED_NEEDS_YIELD
257extern "C" void yield(
void) { }
263 #if !defined(ESP8266) && !defined(ESP32)
264 extern "C" void __cxa_pure_virtual (
void) {}
270 __extension__
typedef int __guard __attribute__((mode(__DI__)));
272 extern "C" int __cxa_guard_acquire (__guard *) __attribute__((weak));
273 extern "C" void __cxa_guard_release (__guard *) __attribute__((weak));
274 extern "C" void __cxa_guard_abort (__guard *) __attribute__((weak));
276 extern "C" int __cxa_guard_acquire (__guard *g)
278 return !*(
char *)(g);
281 extern "C" void __cxa_guard_release (__guard *g)
286 extern "C" void __cxa_guard_abort (__guard *)
uint32_t _retry_cnt
Global frame retry counter, used for debugging ESP implementations.
void * pSmartMatrix
Pointer to the matrix object when using the Smart Matrix Library.
int atexit(void(*)())
Called at program exit when run in a desktop environment.
CFastLED FastLED
Global LED strip management instance.
int noise_max
Unused value.
uint32_t _frame_cnt
Global frame counter, used for debugging ESP implementations.
int noise_min
Unused value.
central include file for FastLED, defines the CFastLED class/object
CFastLED FastLED
Global LED strip management instance.
High level controller interface for FastLED.
void setMaxRefreshRate(uint16_t refresh, bool constrain=false)
Set the maximum refresh rate.
void setTemperature(const struct CRGB &temp)
Set a global color temperature.
void show()
Update all our controllers with the current led colors.
void countFPS(int nFrames=25)
For debugging, this will keep track of time between calls to countFPS().
CLEDController & operator[](int x)
Get a reference to a registered controller.
void delay(unsigned long ms)
Delay for the given number of milliseconds.
void showColor(const struct CRGB &color, uint8_t scale)
Set all leds on all controllers to the given color/scale.
void setDither(uint8_t ditherMode=BINARY_DITHER)
Set the dithering mode.
void clearData()
Clear out the local data array.
void setCorrection(const struct CRGB &correction)
Set a global color correction.
int count()
Get how many controllers have been registered.
void clear(bool writeData=false)
Clear the leds, wiping the local array of data.
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
Base definition for an LED controller.
virtual void showColor(const struct CRGB &data, int nLeds, CRGB scale)=0
Set all the LEDs to a given color.
CLEDController * next()
Get the next controller in the linked list after this one.
CLEDController & setDither(uint8_t ditherMode=BINARY_DITHER)
Set the dithering mode for this controller to use.
virtual uint16_t getMaxRefreshRate() const
Gets the maximum possible refresh rate of the strip.
uint8_t getDither()
Get the dithering option currently set for this controller.
CLEDController & setLeds(CRGB *data, int nLeds)
Set the default array of LEDs to be used by this controller.
void clearLedData()
Zero out the LED data managed by this controller.
CLEDController & setCorrection(CRGB correction)
The color corrction to use for this controller, expressed as a CRGB object.
static CLEDController * head()
Get the first LED controller in the linked list of controllers.
CLEDController & setTemperature(CRGB temperature)
Set the color temperature, aka white point, for this controller.
void showLeds(uint8_t brightness=255)
Write the data to the LEDs managed by this controller.
static CLEDController * m_pTail
pointer to the last LED controller in the linked list
virtual void init()=0
Initialize the LED controller.
static CLEDController * m_pHead
pointer to the first LED controller in the linked list
Representation of an RGB pixel (Red, Green, Blue)