Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
ExtendedInputOutput.hpp
Go to the documentation of this file.
1/* ✔ */
2
3#pragma once
4
6#include <AH/STL/climits>
8
10
11class ExtendedIOElement;
12
17namespace ExtIO {
18
21
24inline bool isNativePin(pin_t pin) {
26}
27
35ExtendedIOElement *getIOElementOfPinOrNull(pin_t pin);
38ExtendedIOElement *getIOElementOfPin(pin_t pin);
39
42void pinMode(pin_t pin, PinMode_t mode);
45void digitalWrite(pin_t pin, PinStatus_t val);
48PinStatus_t digitalRead(pin_t pin);
49
52analog_t analogRead(pin_t pin);
55void analogWrite(pin_t pin, analog_t val);
58void analogWrite(pin_t pin, int val);
59
61void shiftOut(pin_t dataPin, pin_t clockPin, BitOrder_t bitOrder, uint8_t val);
62
65void pinModeBuffered(pin_t pin, PinMode_t mode);
68void digitalWriteBuffered(pin_t pin, PinStatus_t val);
71PinStatus_t digitalReadBuffered(pin_t pin);
72
75analog_t analogReadBuffered(pin_t pin);
78void analogWriteBuffered(pin_t pin, analog_t val);
81void analogWriteBuffered(pin_t pin, int val);
82
84
85} // namespace ExtIO
86
#define END_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
AH::function_traits< decltype(::digitalWrite)>::argument_t< 1 > PinStatus_t
uint8_t BitOrder_t
AH::function_traits< decltype(::pinMode)>::argument_t< 1 > PinMode_t
An abstract base class for Extended Input/Output elements.
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
bool isNativePin(pin_t pin)
Check if the given pin number is a real Arduino pin number, and not an ExtIO pin number.
Type for storing pin numbers of Extended Input/Output elements.
pin_int_t pin
The actual underlying pin number.