OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
internals::inputs::validate Namespace Reference

Validation of user-defined input hardware. More...

Functions

template<typename GPIOtype >
void reserve (const std::set< GPIOtype > &collection)
 Reserve a collection of GPIO pins.
 
void buttonMatrix (const ButtonMatrix &matrix)
 Validate a button matrix.
 
template<typename PinTags >
void analogMultiplexer (const OutputGPIOCollection &selectors, const AnalogMultiplexerGroup< PinTags > chips)
 Validate a group of analog multiplexers.
 
void shiftRegisterChain (OutputGPIO loadPin, OutputGPIO nextPin, InputGPIO inputPin, const ShiftRegisterChain &chain)
 Validate a chain of PISO shift registers.
 
template<typename PinTags >
void GPIOExpander (const GPIOExpanderChip< PinTags > &chip)
 Validate a GPIO expander.
 
void rotaryEncoder (InputGPIO dtPin, InputGPIO clkPin, InputNumber cw, InputNumber ccw)
 Validate a rotary encoder.
 
void button (InputGPIO pin, InputNumber inputNumber)
 Validate a single button.
 
void joystick (ADC_GPIO xAxisPin, ADC_GPIO yAxisPin, InputNumber up, InputNumber down, InputNumber left, InputNumber right)
 Validate a joystick.
 

Detailed Description

Validation of user-defined input hardware.

Function Documentation

◆ analogMultiplexer()

template<typename PinTags >
void internals::inputs::validate::analogMultiplexer ( const OutputGPIOCollection & selectors,
const AnalogMultiplexerGroup< PinTags > chips )
inline

Validate a group of analog multiplexers.

Template Parameters
PinTagsPin tags
Parameters
selectorsCollection of selector pins
chipsCollections of chips

Definition at line 85 of file InputValidation.hpp.

◆ button()

void internals::inputs::validate::button ( InputGPIO pin,
InputNumber inputNumber )
inline

Validate a single button.

Parameters
pinInput pin
inputNumberInput number

Definition at line 173 of file InputValidation.hpp.

◆ buttonMatrix()

void internals::inputs::validate::buttonMatrix ( const ButtonMatrix & matrix)
inline

Validate a button matrix.

Parameters
matrixButton matrix to validate

Definition at line 52 of file InputValidation.hpp.

◆ GPIOExpander()

template<typename PinTags >
void internals::inputs::validate::GPIOExpander ( const GPIOExpanderChip< PinTags > & chip)
inline

Validate a GPIO expander.

Template Parameters
PinTagsPin tags
Parameters
chipChip instance

Definition at line 129 of file InputValidation.hpp.

◆ joystick()

void internals::inputs::validate::joystick ( ADC_GPIO xAxisPin,
ADC_GPIO yAxisPin,
InputNumber up,
InputNumber down,
InputNumber left,
InputNumber right )
inline

Validate a joystick.

Parameters
xAxisPinADC-capable pin for the horizontal axis
yAxisPinADC-capable pin for the vertical axis
upInput number assigned to the "up" direction
downInput number assigned to the "down" direction
leftInput number assigned to the "left" direction
rightInput number assigned to the "right" direction

Definition at line 191 of file InputValidation.hpp.

◆ reserve()

template<typename GPIOtype >
void internals::inputs::validate::reserve ( const std::set< GPIOtype > & collection)
inline

Reserve a collection of GPIO pins.

Template Parameters
GPIOtypeGPIO or subtype
Parameters
collectionPins to reserve

Definition at line 41 of file InputValidation.hpp.

◆ rotaryEncoder()

void internals::inputs::validate::rotaryEncoder ( InputGPIO dtPin,
InputGPIO clkPin,
InputNumber cw,
InputNumber ccw )
inline

Validate a rotary encoder.

Parameters
dtPinDT pin
clkPinCLK pin
cwInput number for clockwise rotation
ccwInput number for counter-clockwise rotation

Definition at line 146 of file InputValidation.hpp.

◆ shiftRegisterChain()

void internals::inputs::validate::shiftRegisterChain ( OutputGPIO loadPin,
OutputGPIO nextPin,
InputGPIO inputPin,
const ShiftRegisterChain & chain )
inline

Validate a chain of PISO shift registers.

Parameters
loadPinOutput GPIO attached to LOAD
nextPinOutput GPIO attached to NEXT
inputPinInput GPIO pin
chainCollection of chips

Definition at line 103 of file InputValidation.hpp.