FastLED 3.9.15
Loading...
Searching...
No Matches
led_sysdefs.h
Go to the documentation of this file.
1#pragma once
2
3#ifndef __INC_LED_SYSDEFS_H
4#define __INC_LED_SYSDEFS_H
5
6#include "FastLED.h"
7
8#include "fastled_config.h"
9
10// Include ARM platform detection before any ARM headers
11#include "platforms/arm/is_arm.h"
12
13// Arduino.h needed for convenience functions digitalPinToPort/BitMask/portOutputRegister and the pinMode methods.
14#if defined(ARDUINO) && !defined(__EMSCRIPTEN__)
15#include <Arduino.h> // ok include
16#endif
17
20
21#if defined(NRF51) || defined(__RFduino__) || defined (__Simblee__)
22#include "platforms/arm/nrf51/led_sysdefs_arm_nrf51.h"
23#elif defined(NRF52_SERIES) || defined(NRF52840_XXAA)
24#include "platforms/arm/nrf52/led_sysdefs_arm_nrf52.h"
25#elif defined(__MK20DX128__) || defined(__MK20DX256__)
26// Include k20/T3 headers
27#include "platforms/arm/k20/led_sysdefs_arm_k20.h"
28#elif defined(__MK66FX1M0__) || defined(__MK64FX512__)
29// Include k66/T3.6 headers
30#include "platforms/arm/k66/led_sysdefs_arm_k66.h"
31#elif defined(__MKL26Z64__)
32// Include kl26/T-LC headers
33#include "platforms/arm/kl26/led_sysdefs_arm_kl26.h"
34#elif defined(__IMXRT1062__)
35// teensy4
36#include "platforms/arm/mxrt1062/led_sysdefs_arm_mxrt1062.h"
37#elif defined(__SAM3X8E__)
38// Include sam/due headers
39#include "platforms/arm/sam/led_sysdefs_arm_sam.h"
40#elif defined(STM32F1) || defined(STM32F2XX) || defined(STM32F4)
41#include "platforms/arm/stm32/led_sysdefs_arm_stm32.h"
42#elif defined(__SAMD21G18A__) || defined(__SAMD21J18A__) || defined(__SAMD21E17A__) || defined(__SAMD21E18A__)
43#include "platforms/arm/d21/led_sysdefs_arm_d21.h"
44#elif defined(__SAMD51G19A__) || defined(__SAMD51J19A__) || defined(__SAME51J19A__) || defined(__SAMD51P19A__) || defined(__SAMD51P20A__)
45#include "platforms/arm/d51/led_sysdefs_arm_d51.h"
46#elif defined(ARDUINO_ARCH_RP2040) // not sure a pico-sdk define for this
47// RP2040 (Raspberry Pi Pico etc)
48#include "platforms/arm/rp2040/led_sysdefs_arm_rp2040.h"
49#elif defined(ESP8266)
50#include "platforms/esp/8266/led_sysdefs_esp8266.h"
51#elif defined(ESP32)
52#include "platforms/esp/32/led_sysdefs_esp32.h"
53#elif defined(__AVR__) || defined(__AVR_ATmega4809__)
54// AVR platforms
55#include "platforms/avr/led_sysdefs_avr.h"
56#elif defined(ARDUINO_ARCH_APOLLO3)
57// Apollo3 platforms (e.g. the Ambiq Micro Apollo3 Blue as used by the SparkFun Artemis platforms)
58#include "platforms/apollo3/led_sysdefs_apollo3.h"
59#elif defined(ARDUINO_ARCH_RENESAS) || defined(ARDUINO_ARCH_RENESAS_UNO) || defined(ARDUINO_ARCH_RENESAS_PORTENTA)
60#include "platforms/arm/renesas/led_sysdef_arm_renesas.h"
61#elif defined(ARDUINO_GIGA)|| defined(ARDUINO_GIGA_M7)
62#include "platforms/arm/giga/led_sysdef_arm_giga.h"
63#elif defined(ARDUINO_ARCH_SILABS)
64// Silicon Labs MGM240 (Arduino Nano Matter, SparkFun Thing Plus Matter)
65#include "platforms/arm/mgm240/led_sysdefs_arm_mgm240.h"
66#elif defined(__x86_64__) || defined(FASTLED_STUB_IMPL) || defined(__APPLE__) || defined(__linux__) || defined(__unix__) || defined(__EMSCRIPTEN__)
67// Not on a microcontroller
68//# ifdef FASTLED_HAS_PRAGMA_MESSAGE
69//# pragma message "Using stub, no data will be written to pins"
70//# else
71//# warning "Using stub, no data will be written to pins"
72//# endif
73#include "platforms/stub/led_sysdefs_stub.h"
74#else
75//
76// We got here because we don't recognize the platform that you're
77// trying to compile for: it's not AVR, or an ESP or ARM that we recognize.
78//
79// If you're reading this because you got the error below,
80// and if this new platform is just a minor variant of an
81// existing supported ARM platform, you may be able to add
82// a new 'defined(XXX)' selector in the apporpriate code above.
83//
84// If this platform is a new microcontroller, see "PORTING.md".
85//
86#error "This platform isn't recognized by FastLED... yet. See comments in FastLED/led_sysdefs.h for options."
87#endif
88
89#include "fl/namespace.h"
90
93#define CLKS_PER_US (F_CPU/1000000)
94
95#endif
central include file for FastLED, defines the CFastLED class/object
Contains definitions that can be used to configure FastLED at compile time.
Implements the FastLED namespace macros.