21#if defined(__DOXYGEN__)
22inline constexpr void togglePin(uint8_t pin);
24inline constexpr void setPinON(uint8_t pin);
27inline constexpr void setPinOFF(uint8_t pin);
35inline constexpr void togglePin(uint8_t pin) __attribute__((always_inline));
37inline constexpr void setPinON(uint8_t pin) __attribute__((always_inline));
38inline void setPinsON(uint16_t pins) __attribute__((always_inline));
40inline constexpr void setPinOFF(uint8_t pin) __attribute__((always_inline));
41inline void setPinsOFF(uint16_t pins) __attribute__((always_inline));
43inline constexpr bool getPinState(uint8_t pin) __attribute__((always_inline));
45inline void setPinsAsOutput(uint16_t pins) __attribute__((always_inline));
75inline constexpr void setPinState(
const uint8_t pin,
const bool bState)
92inline constexpr void setPinON(
const uint8_t pin)
115 PORTD |= lowByte(pins);
116 PORTB |= highByte(pins);
147 PORTD &= ~lowByte(pins);
148 PORTB &= ~highByte(pins);
181 DDRD |= lowByte(pins);
182 DDRB |= highByte(pins);
193 DDRD &= ~lowByte(pins);
194 DDRB &= ~highByte(pins);
197 PORTD |= lowByte(pins);
198 PORTB |= highByte(pins);
Bit manipulation utility functions.
constexpr void bit_set(T &_dest, const uint8_t bit)
Set the specified bit to 1.
constexpr uint8_t bit_read(const T &_src, const uint8_t bit)
Read the specified bit.
constexpr uint8_t bit_clear(T &_dest, const uint8_t bit)
Clear the specified bit.
constexpr bool getPinState(uint8_t pin)
Get the Pin State.
void setPinsOFF(uint16_t pins)
Set the Pins state to OFF.
constexpr void setPinState(const uint8_t pin, const bool bState)
Set the Pin state for the specified pin.
constexpr void togglePin(uint8_t pin)
Toggle the specified pin.
void setPinsAsInputPullup(uint16_t pins)
Set the pins as INPUT_PULLUP.
constexpr void setPinON(uint8_t pin)
Set the Pin state to ON for the specified pin.
void setPinsAsOutput(uint16_t pins)
Set the pins as OUTPUT.
constexpr void setPinOFF(uint8_t pin)
Set the Pin state to OFF for the specified pin.
void setPinsON(uint16_t pins)
Set the Pins state to ON.
constexpr uint8_t unused_pin