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:354

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 370 of file fastpin.h.

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