FastLED 3.9.15
Loading...
Searching...
No Matches
FastLED.h File Reference

Detailed Description

central include file for FastLED, defines the CFastLED class/object

Definition in file FastLED.h.

#include "fl/stl/stdint.h"
#include "fl/system/dll.h"
#include "platforms/is_platform.h"
#include <SmartMatrix.h>
#include <OctoWS2811.h>
#include "fl/task/executor.h"
#include "fl/system/sketch_macros.h"
#include "fl/channels/rx.h"
#include "fl/stl/array.h"
#include "fl/stl/vector.h"
#include "fl/stl/cstring.h"
#include "fl/system/pin.h"
#include "fl/stl/compiler_control.h"
#include "fl/stl/static_assert.h"
#include "cpp_compat.h"
#include "fastled_config.h"
#include "led_sysdefs.h"
#include "fl/system/fastled.h"
#include "fl/channels/channel.h"
#include "fl/channels/channel_events.h"
#include "fl/wdt/watchdog.h"
#include "fl/channels/manager.h"
#include "fl/channels/config.h"
#include "fl/channels/bus.h"
#include "fl/channels/bus_traits.h"
#include "fl/channels/channel_typed.h"
#include "fl/channels/rx/channel.h"
#include "fl/audio/input.h"
#include "fl/audio/audio_processor.h"
#include "fl/ui/ui.h"
#include "fastled_delay.h"
#include "bitswap.h"
#include "lib8tion.h"
#include "controller.h"
#include "fastpin.h"
#include "fastspi_types.h"
#include "dmx.h"
#include "platforms.h"
#include "platforms/ldf_headers.h"
#include "fl/math/math.h"
#include "fastled_progmem.h"
#include "pixeltypes.h"
#include "hsv2rgb.h"
#include "colorutils.h"
#include "pixelset.h"
#include "colorpalettes.h"
#include "noise.h"
#include "power_mgt.h"
#include "fastspi.h"
#include "chipsets.h"
#include "fl/system/engine_events.h"
#include "fl/gfx/leds.h"
#include "fl/gfx/rgbw.h"
#include "fl/chipsets/spi_chipsets.h"
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CFastLED
 High level controller interface for FastLED. More...
 
struct  CFastLED::ClockedChipsetHelper< CHIPSET, DATA_PIN, CLOCK_PIN >
 

Macros

#define __INC_FASTSPI_LED2_H
 
#define __PROG_TYPES_COMPAT__
 avr-libc define to expose progmem typedefs.
 
#define FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS   0
 
#define FASTLED_HAS_CHANNELS   0
 
#define FASTLED_LOOP_RUNS_ASYNC   0
 
#define FASTLED_SPI_USES_CHANNEL_API   0
 
#define FASTLED_VERSION   3010004
 Current FastLED version number, as an integer.
 
#define FastSPI_LED   FastLED
 Alias of the FastLED instance for legacy purposes.
 
#define FastSPI_LED2   FastLED
 Alias of the FastLED instance for legacy purposes.
 
#define LEDS   FastLED
 Alias of the FastLED instance for legacy purposes.
 
#define NO_HARDWARE_PIN_SUPPORT
 If no pin/port mappings are found, sends a warning message to the user during compilation.
 
Adding SPI-based controllers

Add an SPI based CLEDController instance to the world.

There are two ways to call this method (as well as the other addLeds() variations). The first is with 2 arguments, in which case the arguments are a pointer to led data, and the number of leds used by this controller. The second is with 3 arguments, in which case the first argument is the same, the second argument is an offset into the CRGB data where this controller's CRGB data begins, and the third argument is the number of leds for this controller object.

Parameters
database pointer to an array of CRGB data structures
nLedsOrOffsetnumber of leds (3 argument version) or offset into the data array
nLedsIfOffsetnumber of leds (4 argument version)
Template Parameters
CHIPSETthe chipset type
DATA_PINthe optional data pin for the leds (if omitted, will default to the first hardware SPI MOSI pin)
CLOCK_PINthe optional clock pin for the leds (if omitted, will default to the first hardware SPI clock pin)
RGB_ORDERthe rgb ordering for the leds (e.g. what order red, green, and blue data is written out in)
SPI_DATA_RATEthe data rate to drive the SPI clock at, defined using DATA_RATE_MHZ or DATA_RATE_KHZ macros
Returns
a reference to the added controller
#define _FL_MAP_CLOCKED_CHIPSET(CHIPSET_ENUM, CONTROLLER_CLASS)
 

Typedefs

typedef fl::u8(* power_func) (fl::u8 scale, fl::u32 data)
 Typedef for a power consumption calculation function.
 

Enumerations

enum class  ClearFlags : fl::u32 {
  NONE = 0 , CHANNELS = 1 << 0 , POWER_SETTINGS = 1 << 1 , BRIGHTNESS = 1 << 2 ,
  REFRESH_RATE = 1 << 3 , FPS_COUNTER = 1 << 4 , CHANNEL_ENGINES = 1 << 5
}
 Flags for FastLED.clear() to control what state gets cleared/reset. More...
 
enum  EBlockChipsets
 Blockless output port enum. More...
 
enum  ESM { SMART_MATRIX }
 Smart Matrix Library controller type. More...
 
enum  ESPIChipsets {
  LPD6803 = static_cast<int>(fl::SpiChipset::LPD6803) , LPD8806 = static_cast<int>(fl::SpiChipset::LPD8806) , WS2801 = static_cast<int>(fl::SpiChipset::WS2801) , WS2803 = static_cast<int>(fl::SpiChipset::WS2803) ,
  SM16716 = static_cast<int>(fl::SpiChipset::SM16716) , P9813 = static_cast<int>(fl::SpiChipset::P9813) , APA102 = static_cast<int>(fl::SpiChipset::APA102) , SK9822 = static_cast<int>(fl::SpiChipset::SK9822) ,
  SK9822HD = static_cast<int>(fl::SpiChipset::SK9822HD) , DOTSTAR = static_cast<int>(fl::SpiChipset::DOTSTAR) , DOTSTARHD = static_cast<int>(fl::SpiChipset::DOTSTARHD) , APA102HD = static_cast<int>(fl::SpiChipset::APA102HD) ,
  HD107 = static_cast<int>(fl::SpiChipset::HD107) , HD107HD = static_cast<int>(fl::SpiChipset::HD107HD) , HD108 = static_cast<int>(fl::SpiChipset::HD108)
}
 Backwards compatibility enum - allows old code to use unscoped names (e.g., APA102 instead of fl::SpiChipset::APA102) More...
 
enum  OWS2811 { OCTOWS2811 , OCTOWS2811_400 , OCTOWS2813 }
 Octo WS2811 LED Library controller types. More...
 
enum  SWS2812 { WS2812SERIAL }
 WS2812Serial Library controller type. More...
 

Functions

template<typename T>
constexpr enable_if< is_fixed_point< T >::value, T >::type abs (T x) FL_NOEXCEPT
 
template<typename T>
constexprdegrees (T rad) FL_NOEXCEPT
 
template<typename T, typename U>
constexpr common_type_t< T, U > max (T a, U b) FL_NOEXCEPT
 
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min (T a, U b) FL_NOEXCEPT
 Memory functions are available in fl:: namespace via fl/stl/cstring.h Using declarations cannot work because system headers define memset/memcpy/memmove before FastLED.h is fully processed, causing signature conflicts even though fl::size and size_t refer to the same underlying type.
 
ClearFlags operator& (ClearFlags a, ClearFlags b)
 Enable bitwise AND for ClearFlags.
 
ClearFlags operator| (ClearFlags a, ClearFlags b)
 Enable bitwise OR for ClearFlags.
 
ClearFlagsoperator|= (ClearFlags &a, ClearFlags b)
 Enable bitwise OR assignment for ClearFlags.
 
template<typename T>
constexprradians (T deg) FL_NOEXCEPT
 

Variables

CFastLED FastLED
 Global LED strip management instance.