This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
Functions
ExtIO Namespace Reference

A namespace with alternatives to the standard Arduino IO functions that can be used with extended IO pin numbers. More...

Functions

template<class T >
bool inRange (T target, T start, T end)
 
ExtendedIOElementgetIOElementOfPin (pin_t pin)
 Find the IO element of a given extended IO pin number. More...
 
void pinMode (pin_t pin, uint8_t mode)
 An ExtIO version of the Arduino function. More...
 
void pinMode (int pin, uint8_t mode)
 An ExtIO version of the Arduino function. More...
 
void digitalWrite (pin_t pin, uint8_t val)
 An ExtIO version of the Arduino function. More...
 
void digitalWrite (int pin, uint8_t val)
 An ExtIO version of the Arduino function. More...
 
int digitalRead (pin_t pin)
 An ExtIO version of the Arduino function. More...
 
int digitalRead (int pin)
 An ExtIO version of the Arduino function. More...
 
void shiftOut (pin_t dataPin, pin_t clockPin, uint8_t bitOrder, uint8_t val)
 An ExtIO version of the Arduino function. More...
 
void shiftOut (int dataPin, int clockPin, uint8_t bitOrder, uint8_t val)
 An ExtIO version of the Arduino function. More...
 
analog_t analogRead (pin_t pin)
 An ExtIO version of the Arduino function. More...
 
analog_t analogRead (int pin)
 An ExtIO version of the Arduino function. More...
 

Detailed Description

A namespace with alternatives to the standard Arduino IO functions that can be used with extended IO pin numbers.

Function Documentation

◆ inRange()

template<class T >
bool ExtIO::inRange ( target,
start,
end 
)

Definition at line 11 of file ExtendedInputOutput.cpp.

◆ getIOElementOfPin()

ExtendedIOElement & ExtIO::getIOElementOfPin ( pin_t  pin)

Find the IO element of a given extended IO pin number.

Parameters
pinThe extended IO pin number to find the IO element of.
Returns
A pointer to the extended IO element that the given pin belongs to.

Definition at line 15 of file ExtendedInputOutput.cpp.

◆ pinMode() [1/2]

void ExtIO::pinMode ( pin_t  pin,
uint8_t  mode 
)

An ExtIO version of the Arduino function.

Examples
1.SPI-Blink.ino, 2.BitBang-Blink.ino, and MIDI-Controller-Finished-Example.ino.

Definition at line 34 of file ExtendedInputOutput.cpp.

◆ pinMode() [2/2]

void ExtIO::pinMode ( int  pin,
uint8_t  mode 
)

An ExtIO version of the Arduino function.

Definition at line 43 of file ExtendedInputOutput.cpp.

◆ digitalWrite() [1/2]

void ExtIO::digitalWrite ( pin_t  pin,
uint8_t  val 
)

An ExtIO version of the Arduino function.

Examples
1.SPI-Blink.ino, 2.BitBang-Blink.ino, 2.RGB-LED-Chaser.ino, and MIDI-Controller-Finished-Example.ino.

Definition at line 45 of file ExtendedInputOutput.cpp.

◆ digitalWrite() [2/2]

void ExtIO::digitalWrite ( int  pin,
uint8_t  val 
)

An ExtIO version of the Arduino function.

Definition at line 54 of file ExtendedInputOutput.cpp.

◆ digitalRead() [1/2]

int ExtIO::digitalRead ( pin_t  pin)

An ExtIO version of the Arduino function.

Examples
2.DigitalReadSerial.ino, and MIDI-Controller-Finished-Example.ino.

Definition at line 56 of file ExtendedInputOutput.cpp.

◆ digitalRead() [2/2]

int ExtIO::digitalRead ( int  pin)

An ExtIO version of the Arduino function.

Definition at line 65 of file ExtendedInputOutput.cpp.

◆ shiftOut() [1/2]

void ExtIO::shiftOut ( pin_t  dataPin,
pin_t  clockPin,
uint8_t  bitOrder,
uint8_t  val 
)

An ExtIO version of the Arduino function.

Definition at line 67 of file ExtendedInputOutput.cpp.

◆ shiftOut() [2/2]

void ExtIO::shiftOut ( int  dataPin,
int  clockPin,
uint8_t  bitOrder,
uint8_t  val 
)

An ExtIO version of the Arduino function.

Definition at line 80 of file ExtendedInputOutput.cpp.

◆ analogRead() [1/2]

analog_t ExtIO::analogRead ( pin_t  pin)

An ExtIO version of the Arduino function.

Examples
1.AnalogReadSerial.ino.

Definition at line 84 of file ExtendedInputOutput.cpp.

◆ analogRead() [2/2]

analog_t ExtIO::analogRead ( int  pin)

An ExtIO version of the Arduino function.

Definition at line 93 of file ExtendedInputOutput.cpp.