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

◆ _FL_DEFINE_PORT3

#define _FL_DEFINE_PORT3 ( L,
LC,
BASE )
Value:
template<> struct __FL_PORT_INFO<LC> { \
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 letters. The first parameter will be the letter, the second parameter will be an integer/counter of some kind. This is because attempts to turn macro parameters into character constants break in some compilers.

Parameters
Lthe letter of the port
LCan integer counter
BASEthe data type for the register

Definition at line 386 of file fastpin.h.

386#define _FL_DEFINE_PORT3(L, LC, BASE) template<> struct __FL_PORT_INFO<LC> { \
387 static bool hasPort() { return 1; } \
388 static const char *portName() { return #L; } \
389 typedef BASE __t_baseType; \
390 static const void *portAddr() { return (void*)&__t_baseType::r(); } };