Control Surface new-input
MIDI Control Surface library for Arduino
Classes | Typedefs | Functions
Extended Input/Output

Detailed Description

All Elements that extend the number of IO pins of the Arduino: Currently only shift registers and multiplexers.

+ Collaboration diagram for Extended Input/Output:

Classes

class  AnalogMultiplex< N >
 A class for reading multiplexed analog inputs. More...
 
class  ShiftRegisterOut< N >
 A class for serial-in/parallel-out shift registers, like the 74HC595. More...
 
class  ShiftRegisterOutBase< N >
 A class for serial-in/parallel-out shift registers, like the 74HC595. More...
 
class  SPIShiftRegisterOut< N, SPIDriver >
 A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bus. More...
 

Typedefs

using CD74HC4067 = AnalogMultiplex< 4 >
 An alias for AnalogMultiplex<4> to use with CD74HC4067 analog multiplexers.
 
using CD74HC4051 = AnalogMultiplex< 3 >
 An alias for AnalogMultiplex<3> to use with CD74HC4051 analog multiplexers.
 

Functions

ExtendedIOElementgetIOElementOfPin (pin_t pin)
 Find the IO element of a given extended IO pin number. More...
 
void pinMode (pin_t pin, PinMode_t mode)
 An ExtIO version of the Arduino function. More...
 
void pinMode (int pin, PinMode_t mode)
 Overload to Arduino pinMode function.
 
void digitalWrite (pin_t pin, PinStatus_t val)
 An ExtIO version of the Arduino function. More...
 
void digitalWrite (int pin, PinStatus_t val)
 Overload to Arduino digitalWrite function.
 
PinStatus_t digitalRead (pin_t pin)
 An ExtIO version of the Arduino function. More...
 
PinStatus_t digitalRead (int pin)
 Overload to Arduino digitalRead function.
 
analog_t analogRead (pin_t pin)
 An ExtIO version of the Arduino function. More...
 
analog_t analogRead (int pin)
 Overload to Arduino analogRead function.
 
void analogWrite (pin_t pin, analog_t val)
 An ExtIO version of the Arduino function. More...
 
void analogWrite (pin_t pin, int val)
 An ExtIO version of the Arduino function. More...
 
void analogWrite (int pin, analog_t val)
 Overload to Arduino analogWrite function.
 
void analogWrite (int pin, int val)
 Overload to Arduino analogWrite function.
 
void shiftOut (pin_t dataPin, pin_t clockPin, BitOrder_t bitOrder, uint8_t val)
 An ExtIO version of the Arduino function.
 
void shiftOut (int dataPin, int clockPin, BitOrder_t bitOrder, uint8_t val)
 Overload to Arduino shiftOut function.
 
void pinModeBuffered (pin_t pin, PinMode_t mode)
 A buffered ExtIO version of the Arduino function. More...
 
void digitalWriteBuffered (pin_t pin, PinStatus_t val)
 A buffered ExtIO version of the Arduino function. More...
 
PinStatus_t digitalReadBuffered (pin_t pin)
 A buffered ExtIO version of the Arduino function. More...
 
analog_t analogReadBuffered (pin_t pin)
 A buffered ExtIO version of the Arduino function. More...
 
void analogWriteBuffered (pin_t pin, analog_t val)
 A buffered ExtIO version of the Arduino function. More...
 
void analogWriteBuffered (pin_t pin, int val)
 A buffered ExtIO version of the Arduino function. More...
 

Function Documentation

◆ getIOElementOfPin()

ExtendedIOElement * 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 21 of file ExtendedInputOutput.cpp.

◆ pinMode()

void pinMode ( pin_t  pin,
PinMode_t  mode 
)

◆ digitalWrite()

void digitalWrite ( pin_t  pin,
PinStatus_t  val 
)

◆ digitalRead()

PinStatus_t digitalRead ( pin_t  pin)

◆ analogRead()

analog_t analogRead ( pin_t  pin)

An ExtIO version of the Arduino function.

See also
ExtendedIOElement::analogRead
Examples
1.AnalogReadSerial.ino.

Definition at line 81 of file ExtendedInputOutput.cpp.

◆ analogWrite() [1/2]

void analogWrite ( pin_t  pin,
analog_t  val 
)

An ExtIO version of the Arduino function.

See also
ExtendedIOElement::analogWrite
Examples
Custom-Note-LED-Input-Element-Callback.ino.

Definition at line 93 of file ExtendedInputOutput.cpp.

◆ analogWrite() [2/2]

void analogWrite ( pin_t  pin,
int  val 
)

An ExtIO version of the Arduino function.

See also
ExtendedIOElement::analogWrite

Definition at line 105 of file ExtendedInputOutput.cpp.

◆ pinModeBuffered()

void pinModeBuffered ( pin_t  pin,
PinMode_t  mode 
)

A buffered ExtIO version of the Arduino function.

See also
ExtendedIOElement::pinModeBuffered

Definition at line 115 of file ExtendedInputOutput.cpp.

◆ digitalWriteBuffered()

void digitalWriteBuffered ( pin_t  pin,
PinStatus_t  val 
)

A buffered ExtIO version of the Arduino function.

See also
ExtendedIOElement::digitalWriteBuffered

Definition at line 126 of file ExtendedInputOutput.cpp.

◆ digitalReadBuffered()

PinStatus_t digitalReadBuffered ( pin_t  pin)

A buffered ExtIO version of the Arduino function.

See also
ExtendedIOElement::digitalReadBuffered

Definition at line 137 of file ExtendedInputOutput.cpp.

◆ analogReadBuffered()

analog_t analogReadBuffered ( pin_t  pin)

A buffered ExtIO version of the Arduino function.

See also
ExtendedIOElement::analogReadBuffered

Definition at line 148 of file ExtendedInputOutput.cpp.

◆ analogWriteBuffered() [1/2]

void analogWriteBuffered ( pin_t  pin,
analog_t  val 
)

A buffered ExtIO version of the Arduino function.

See also
ExtendedIOElement::analogWriteBuffered

Definition at line 160 of file ExtendedInputOutput.cpp.

◆ analogWriteBuffered() [2/2]

void analogWriteBuffered ( pin_t  pin,
int  val 
)

A buffered ExtIO version of the Arduino function.

See also
ExtendedIOElement::analogWriteBuffered

Definition at line 172 of file ExtendedInputOutput.cpp.