| 
   
    MIDI Control Surface library for Arduino 
   | 
 
 
 
 
Go to the documentation of this file.
    4 #include "ExtendedIOElement.hpp" 
   14     return target >= start && target < end;
 
   18     for (
auto &el : ExtendedIOElement::getAll())
 
   19         if (pin < el.getStart())
 
   21         else if (
inRange(pin, el.getStart(), el.getEnd()))
 
   25         F(
"The given pin does not correspond to an Extended IO element."),
 
   39     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
   51     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
   63     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
   76     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
   89     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
  105     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
  119     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
  133     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
  146     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
  159     else if (pin < NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS) {
 
  181     for (i = 0; i < 8; i++) {
 
  182         if (bitOrder == LSBFIRST)
 
  
void pinModeBuffered(int pin, PinMode_t mode)
A buffered ExtIO version of the Arduino function.
 
void analogWrite(pin_t pin, int val)
An ExtIO version of the Arduino function.
 
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
 
virtual void digitalWrite(pin_t pin, PinStatus_t state)
Set the output of the given pin to the given state.
 
virtual analog_t analogReadBuffered(pin_t pin)=0
Read the analog value of the given pin from the software buffer.
 
virtual void analogWrite(pin_t pin, analog_t val)
Write an analog (or PWM) value to the given pin.
 
#define AH_DIAGNOSTIC_POP()
 
An abstract base class for Extended Input/Output elements.
 
analog_t analogReadBuffered(int pin)
A buffered ExtIO version of the Arduino function.
 
#define FATAL_ERROR(msg, errc)
Print the error message and error code, and stop the execution.
 
virtual analog_t analogRead(pin_t pin)
Read the analog value of the given pin.
 
virtual void pinModeBuffered(pin_t pin, PinMode_t mode)=0
Set the mode of a given pin in the software buffer.
 
int digitalRead(int pin)
An ExtIO version of the Arduino function.
 
pin_t getStart() const
Get the smallest global extended IO pin number that belongs to this extended IO element.
 
virtual void pinMode(pin_t pin, PinMode_t mode)
Set the mode of a given pin.
 
ExtendedIOElement & getIOElementOfPin(pin_t pin)
Find the IO element of a given extended IO pin number.
 
constexpr pin_t NO_PIN
A special pin number that indicates an unused or invalid pin.
 
uint16_t analog_t
The type returned from analogRead and similar functions.
 
analog_t analogRead(int pin)
An ExtIO version of the Arduino function.
 
virtual int digitalReadBuffered(pin_t pin)=0
Read the state of the given pin from the software buffer.
 
virtual int digitalRead(pin_t pin)
Read the state of the given pin.
 
void shiftOut(int dataPin, int clockPin, BitOrder_t bitOrder, uint8_t val)
An ExtIO version of the Arduino function.
 
void analogWriteBuffered(pin_t pin, int val)
A buffered ExtIO version of the Arduino function.
 
void pinMode(int pin, PinMode_t mode)
An ExtIO version of the Arduino function.
 
void digitalWriteBuffered(int pin, PinStatus_t val)
A buffered ExtIO version of the Arduino function.
 
void digitalWrite(int pin, PinStatus_t val)
An ExtIO version of the Arduino function.
 
virtual void digitalWriteBuffered(pin_t pin, PinStatus_t state)=0
Set the output of a given pin in the software buffer.
 
int digitalReadBuffered(int pin)
A buffered ExtIO version of the Arduino function.
 
#define AH_DIAGNOSTIC_WERROR()
 
#define BEGIN_AH_NAMESPACE
 
virtual void analogWriteBuffered(pin_t pin, analog_t val)=0
Write an analog (or PWM) value to the software buffer given pin.
 
bool inRange(T target, T start, T end)