Value:
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.
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
-
L | the number of the port |
BASE | the 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(); } };