75 __attribute__((always_inline))
93 __attribute__((always_inline))
106 operator bool() const
107 __attribute__((always_inline))
118 __attribute__((always_inline))
137 __attribute__((always_inline))
156 __attribute__((always_inline))
167 __attribute__((always_inline))
169 const uint8_t mask =
MASK(pin);
186 __attribute__((always_inline))
188 const uint8_t mask =
MASK(pin);
189 if ((*
DDR(pin) & mask) != 0)
191 if ((*
PORT(pin) & mask) != 0)
203 __attribute__((always_inline))
205 return ((*
PIN(pin) &
MASK(pin)) != 0);
216 __attribute__((always_inline))
218 volatile uint8_t* port =
PORT(pin);
219 const uint8_t mask =
MASK(pin);
223 if (((
int) port < PORTH)
224 && __builtin_constant_p(pin)
225 && __builtin_constant_p(value)) {
227 if (__builtin_constant_p(pin) && __builtin_constant_p(value)) {
255 __attribute__((always_inline))
257 volatile uint8_t* port =
PIN(pin);
258 const uint8_t mask =
MASK(pin);
262 if (((
int) port < PORTH) && __builtin_constant_p(pin))
264 if (__builtin_constant_p(pin))
285 volatile uint8_t*
PIN()
const 294 volatile uint8_t*
DDR()
const 314 static uint8_t
MASK(uint8_t pin)
315 __attribute__((always_inline))
317 return (_BV(Board::BIT(pin)));
324 static volatile uint8_t*
PIN(uint8_t pin)
325 __attribute__((always_inline))
327 return (Board::SFR(pin));
336 static volatile uint8_t*
DDR(uint8_t pin)
337 __attribute__((always_inline))
339 return (Board::SFR(pin) + 1);
347 static volatile uint8_t*
PORT(uint8_t pin)
348 __attribute__((always_inline))
350 return (Board::SFR(pin) + 2);
volatile uint8_t *const m_sfr
static void toggle(Board::DigitalPin pin)
static Mode mode(Board::DigitalPin pin)
GPIO(Board::DigitalPin pin, Mode mode=INPUT_MODE, bool value=0)
volatile uint8_t * DDR() const
void mode(Mode mode) const
static void write(Board::DigitalPin pin, bool value)
GPIO & operator=(bool value)
static bool read(Board::DigitalPin pin)
volatile uint8_t * PORT() const
static volatile uint8_t * PIN(uint8_t pin)
static uint8_t MASK(uint8_t pin)
static void mode(Board::DigitalPin pin, Mode mode)
static volatile uint8_t * DDR(uint8_t pin)
volatile uint8_t * PIN() const
GPIO & operator=(const GPIO &rhs)
static volatile uint8_t * PORT(uint8_t pin)