20#include <initializer_list>
100 uint8_t currentPulseWidth;
104 bool pressEventNotified;
106 static void isrh(
void *instance);
107 static void isrhAlternateEncoding(
void *instance);
139 bool useAlternateEncoding =
false);
151 if ((multiplier > 0) && (multiplier < 7) &&
188 bool negativeLogic =
false);
206 ::std::vector<OutputGPIO> selectorPins{};
207 ::std::vector<InputGPIO> inputPins{};
208 ::std::vector<uint8_t> inputNumber{};
263 ::std::initializer_list<OutputGPIO> selectorPins,
264 const ::std::vector<InputGPIO> &inputPins);
291 uint8_t address7Bits,
292 I2CBus bus = I2CBus::PRIMARY,
293 uint8_t max_speed_mult = 1);
306 bool getGPIOstate(uint8_t &state);
318 uint8_t address7Bits,
319 I2CBus bus = I2CBus::PRIMARY);
332 bool getGPIOstate(uint16_t &state);
345 uint8_t address7Bits,
346 I2CBus bus = I2CBus::PRIMARY);
366 ::std::vector<uint8_t> inputNumber{};
368 bool nextHighToLowOrLowToHigh;
401 const bool loadHighOrLow =
false,
402 const bool nextHighToLowOrLowToHigh =
false,
403 const bool negativeLogic =
true);
449 virtual void read(uint8_t &value,
bool &autoCalibrated) = 0;
486 void read(uint8_t &value,
bool &autoCalibrated)
override;
545 uint8_t xCenter = 127,
546 uint8_t yCenter = 127,
547 uint8_t xDeadZone = 63,
548 uint8_t yDeadZone = 63,
549 bool xAxisReverse =
false,
550 bool yAxisReverse =
false);
581 state = (state & (_instance->
mask)) |
606 _leftOrRight = leftOrRight;
607 _instance = instance;
623 void read(uint8_t &value,
bool &autoCalibrated)
625 autoCalibrated =
false;
Types and constants used everywhere for firmware implementation.
@ VALUE
Unspecified value.
I2CBus
I2C bus controller.
Fake analog input for testing.
void getCalibrationData(int &minReading, int &maxReading) override
Get auto-calibration data. Required for persistent storage.
void resetCalibrationData() override
Force auto-calibration.
void setCalibrationData(int minReading, int maxReading) override
Set auto-calibration data (loaded from persistent storage).
FakeAxis(FakeInput *instance, bool leftOrRight)
Construct a new Fake Digital Input object.
void read(uint8_t &value, bool &autoCalibrated)
Read current axis position. The axis must go from one end to the other for auto- calibration.
ADC-capable GPIO pin number.
Output-capable GPIO pin number.