PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

led_sysdefs.h 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef __INC_LED_SYSDEFS_H
  2. #define __INC_LED_SYSDEFS_H
  3. #include "FastLED.h"
  4. #include "fastled_config.h"
  5. #if defined(NRF51) || defined(__RFduino__) || defined (__Simblee__)
  6. #include "platforms/arm/nrf51/led_sysdefs_arm_nrf51.h"
  7. #elif defined(NRF52_SERIES)
  8. #include "platforms/arm/nrf52/led_sysdefs_arm_nrf52.h"
  9. #elif defined(__MK20DX128__) || defined(__MK20DX256__)
  10. // Include k20/T3 headers
  11. #include "platforms/arm/k20/led_sysdefs_arm_k20.h"
  12. #elif defined(__MK66FX1M0__) || defined(__MK64FX512__)
  13. // Include k66/T3.6 headers
  14. #include "platforms/arm/k66/led_sysdefs_arm_k66.h"
  15. #elif defined(__MKL26Z64__)
  16. // Include kl26/T-LC headers
  17. #include "platforms/arm/kl26/led_sysdefs_arm_kl26.h"
  18. #elif defined(__IMXRT1062__)
  19. // teensy4
  20. #include "platforms/arm/mxrt1062/led_sysdefs_arm_mxrt1062.h"
  21. #elif defined(__SAM3X8E__)
  22. // Include sam/due headers
  23. #include "platforms/arm/sam/led_sysdefs_arm_sam.h"
  24. #elif defined(STM32F10X_MD) || defined(__STM32F1__)
  25. #include "platforms/arm/stm32/led_sysdefs_arm_stm32.h"
  26. #elif defined(__SAMD21G18A__) || defined(__SAMD21J18A__) || defined(__SAMD21E17A__) || defined(__SAMD21E18A__) || defined(__SAMD51G19A__) || defined(__SAMD51J19A__)
  27. #include "platforms/arm/d21/led_sysdefs_arm_d21.h"
  28. #elif defined(ESP8266)
  29. #include "platforms/esp/8266/led_sysdefs_esp8266.h"
  30. #elif defined(ESP32)
  31. #include "platforms/esp/32/led_sysdefs_esp32.h"
  32. #elif defined(__AVR__)
  33. // AVR platforms
  34. #include "platforms/avr/led_sysdefs_avr.h"
  35. #elif defined(ARDUINO_ARCH_APOLLO3)
  36. // Apollo3 platforms (e.g. the Ambiq Micro Apollo3 Blue as used by the SparkFun Artemis platforms)
  37. #include "platforms/apollo3/led_sysdefs_apollo3.h"
  38. #else
  39. //
  40. // We got here because we don't recognize the platform that you're
  41. // trying to compile for: it's not AVR, or an ESP or ARM that we recognize.
  42. //
  43. // If you're reading this because you got the error below,
  44. // and if this new platform is just a minor variant of an
  45. // existing supported ARM platform, you may be able to add
  46. // a new 'defined(XXX)' selector in the apporpriate code above.
  47. //
  48. // If this platform is a new microcontroller, see "PORTING.md".
  49. //
  50. #error "This platform isn't recognized by FastLED... yet. See comments in FastLED/led_sysdefs.h for options."
  51. #endif
  52. #ifndef FASTLED_NAMESPACE_BEGIN
  53. #define FASTLED_NAMESPACE_BEGIN
  54. #define FASTLED_NAMESPACE_END
  55. #define FASTLED_USING_NAMESPACE
  56. #endif
  57. // Arduino.h needed for convenience functions digitalPinToPort/BitMask/portOutputRegister and the pinMode methods.
  58. #ifdef ARDUINO
  59. #include <Arduino.h>
  60. #endif
  61. #define CLKS_PER_US (F_CPU/1000000)
  62. #endif