15 for (
auto &
el : ExtendedIOElement::getAll())
27 F(
"The given pin does not correspond to an Extended IO element."),
55 ::digitalWrite(pin,
val);
69 return ::digitalRead(pin);
83 return ::analogRead(pin);
96 ::analogWrite(pin,
val);
117 ::pinMode(pin, mode);
128 ::digitalWrite(pin,
val);
139 return ::digitalRead(pin);
150 return ::analogRead(pin);
163 ::analogWrite(pin,
val);
175 if (dataPin == NO_PIN || clockPin == NO_PIN)
179 ::shiftOut((
int)dataPin, (
int)clockPin, bitOrder,
val);
209#if UINT16_MAX != UINT_MAX
210void pinMode(
unsigned int pin,
PinMode_t mode) {
213void digitalWrite(
unsigned int pin,
PinStatus_t val) {
214 ::digitalWrite(arduino_pin_cast(pin), val);
#define BEGIN_AH_NAMESPACE
constexpr PinStatus_t LOW
AH::function_traits< decltype(::digitalWrite)>::argument_t< 1 > PinStatus_t
constexpr PinStatus_t HIGH
AH::function_traits< decltype(::pinMode)>::argument_t< 1 > PinMode_t
AH::function_traits< decltype(::digitalWrite)>::argument_t< 0 > ArduinoPin_t
An abstract base class for Extended Input/Output elements.
pin_t getStart() const
Get the smallest global extended IO pin number that belongs to this extended IO element.
pin_t getEnd() const
Get the largest global extended IO pin number that belongs to this extended IO element.
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
analog_t analogReadBuffered(pin_t pin) override __attribute__((deprecated))
The analogRead function is deprecated because a shift is always digital.
void analogWrite(pin_t pin, analog_t val) override __attribute__((deprecated))
The analogWrite function is not deprecated because a shift is always digital.
PinStatus_t digitalReadBuffered(pin_t pin) override
Get the current state of a given output pin.
PinStatus_t digitalRead(pin_t pin) override
Get the current state of a given output pin.
void digitalWrite(pin_t pin, PinStatus_t val) override
Set the state of a given output pin.
void pinMode(pin_t pin, PinMode_t mode) override __attribute__((deprecated))
The pinMode function is not implemented because the mode is OUTPUT by definition.
analog_t analogRead(pin_t pin) override __attribute__((deprecated))
The analogRead function is deprecated because a shift is always digital.
void pinModeBuffered(pin_t pin, PinMode_t mode) override __attribute__((deprecated))
The pinMode function is not implemented because the mode is OUTPUT by definition.
void analogWriteBuffered(pin_t pin, analog_t val) override __attribute__((deprecated))
The analogWrite function is not deprecated because a shift is always digital.
void digitalWriteBuffered(pin_t pin, PinStatus_t val) override
Set the output of a given pin in the software buffer.
#define FATAL_ERROR(msg, errc)
Print the error message and error code, and stop the execution.
void analogWriteBuffered(pin_t pin, analog_t val)
A buffered ExtIO version of the Arduino function.
bool isNativePin(pin_t pin)
Check if the given pin number is a real Arduino pin number, and not an ExtIO pin number.
void pinModeBuffered(pin_t pin, PinMode_t mode)
A buffered ExtIO version of the Arduino function.
ExtendedIOElement * getIOElementOfPin(pin_t pin)
Find the IO element of a given extended IO pin number.
void digitalWriteBuffered(pin_t pin, PinStatus_t val)
A buffered ExtIO version of the Arduino function.
void analogWrite(pin_t pin, analog_t val)
An ExtIO version of the Arduino function.
void pinMode(pin_t pin, PinMode_t mode)
An ExtIO version of the Arduino function.
ExtendedIOElement * getIOElementOfPinOrNull(pin_t pin)
Find the IO element of a given extended IO pin number.
PinStatus_t digitalReadBuffered(pin_t pin)
A buffered ExtIO version of the Arduino function.
analog_t analogRead(pin_t pin)
An ExtIO version of the Arduino function.
analog_t analogReadBuffered(pin_t pin)
A buffered ExtIO version of the Arduino function.
PinStatus_t digitalRead(pin_t pin)
An ExtIO version of the Arduino function.
void shiftOut(pin_t dataPin, pin_t clockPin, BitOrder_t bitOrder, uint8_t val)
An ExtIO version of the Arduino function.
void digitalWrite(pin_t pin, PinStatus_t val)
An ExtIO version of the Arduino function.
static bool inRange(T target, T start, T end)
uint16_t analog_t
The type returned from analogRead and similar functions.
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
ArduinoPin_t arduino_pin_cast(T t)