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

Detailed Description

Wrapper definitions to allow seamless use of PROGMEM in environments that have it.

This is a compatibility layer for devices that do or don't have "PROGMEM" and the associated pgm_ accessors.

If a platform supports PROGMEM, it should define FASTLED_USE_PROGMEM as 1, otherwise FastLED will fall back to NOT using PROGMEM.

Whether or not pgmspace.h is #included is separately controllable by FASTLED_INCLUDE_PGMSPACE, if needed.

Definition in file fastled_progmem.h.

#include "fl/namespace.h"
+ Include dependency graph for fastled_progmem.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FASTLED_INCLUDE_PGMSPACE   1
 
#define FASTLED_USE_PROGMEM   1
 Determine whether the current platform supports PROGMEM.
 
#define FL_ALIGN_PROGMEM   __attribute__ ((aligned (4)))
 Helps to force 4-byte alignment for platforms with unaligned access.
 
#define FL_PROGMEM   PROGMEM
 PROGMEM keyword for storage.
 
PROGMEM Read Functions

Functions for reading data from PROGMEM memory.

Note that only the "near" memory wrappers are provided. If you're using "far" memory, you already have portability issues to work through, but you could add more support here if needed.

#define FL_PGM_READ_BYTE_NEAR(x)
 Read a byte (8-bit) from PROGMEM memory.
 
#define FL_PGM_READ_DWORD_NEAR(x)
 Read a double word (32-bit) from PROGMEM memory.
 
#define FL_PGM_READ_WORD_NEAR(x)
 Read a word (16-bit) from PROGMEM memory.