FastLED 3.9.15
Loading...
Searching...
No Matches

◆ _FL_DEFINE_PORT

#define _FL_DEFINE_PORT ( L,
BASE )
Value:
template<> struct __FL_PORT_INFO<L> { \
static bool hasPort() { return 1; } \
static const char *portName() { return #L; } \
typedef BASE __t_baseType; \
static const void *portAddr() { return (void*)&__t_baseType::r(); } };
Utility template for tracking down information about pins and ports.
Definition fastpin.h:356

Macro to create the instantiations for defined ports.

We're going to abuse this later for auto discovery of pin/port mappings for new variants.
Use this for ports that are numeric in nature, e.g. GPIO0, GPIO1, etc.

Parameters
Lthe number of the port
BASEthe data type for the register

Definition at line 372 of file fastpin.h.

372#define _FL_DEFINE_PORT(L, BASE) template<> struct __FL_PORT_INFO<L> { \
373 static bool hasPort() { return 1; } \
374 static const char *portName() { return #L; } \
375 typedef BASE __t_baseType; \
376 static const void *portAddr() { return (void*)&__t_baseType::r(); } };