Class that provides functions for reading and interacting with digital inputs and outputs.
More...
#include <Wippersnapper_DigitalGPIO.h>
|
| Wippersnapper_DigitalGPIO (int32_t totalDigitalInputPins) |
| Initializes DigitalGPIO class. More...
|
|
| ~Wippersnapper_DigitalGPIO () |
| Digital GPIO destructor.
|
|
void | initDigitalPin (wippersnapper_pin_v1_ConfigurePinRequest_Direction direction, uint8_t pinName, float period, wippersnapper_pin_v1_ConfigurePinRequest_Pull pull) |
| Configures a digital pin to behave as an input or an output. More...
|
|
void | deinitDigitalPin (wippersnapper_pin_v1_ConfigurePinRequest_Direction direction, uint8_t pinName) |
| Deinitializes a previously configured digital pin. More...
|
|
int | digitalReadSvc (int pinName) |
| High-level digitalRead service impl. which performs a digitalRead. More...
|
|
void | digitalWriteSvc (uint8_t pinName, int pinValue) |
| Writes a value to a pin. More...
|
|
void | processDigitalInputs () |
| Iterates thru digital inputs, checks if they should send data to the broker.
|
|
Class that provides functions for reading and interacting with digital inputs and outputs.
◆ Wippersnapper_DigitalGPIO()
Wippersnapper_DigitalGPIO::Wippersnapper_DigitalGPIO |
( |
int32_t |
totalDigitalInputPins | ) |
|
Initializes DigitalGPIO class.
- Parameters
-
totalDigitalInputPins | Total number of digital gpio input-capable pins to allocate. |
◆ initDigitalPin()
void Wippersnapper_DigitalGPIO::initDigitalPin |
( |
wippersnapper_pin_v1_ConfigurePinRequest_Direction |
direction, |
|
|
uint8_t |
pinName, |
|
|
float |
period, |
|
|
wippersnapper_pin_v1_ConfigurePinRequest_Pull |
pull |
|
) |
| |
Configures a digital pin to behave as an input or an output.
- Parameters
-
direction | The pin's direction. |
pinName | The pin's name. |
period | The pin's period, in seconds. |
pull | The pin's pull mode. |
◆ deinitDigitalPin()
void Wippersnapper_DigitalGPIO::deinitDigitalPin |
( |
wippersnapper_pin_v1_ConfigurePinRequest_Direction |
direction, |
|
|
uint8_t |
pinName |
|
) |
| |
Deinitializes a previously configured digital pin.
- Parameters
-
direction | The pin's direction. |
pinName | The pin's name. |
◆ digitalReadSvc()
int Wippersnapper_DigitalGPIO::digitalReadSvc |
( |
int |
pinName | ) |
|
High-level digitalRead service impl. which performs a digitalRead.
- Parameters
-
- Returns
- The pin's value.
◆ digitalWriteSvc()
void Wippersnapper_DigitalGPIO::digitalWriteSvc |
( |
uint8_t |
pinName, |
|
|
int |
pinValue |
|
) |
| |
Writes a value to a pin.
- Parameters
-
pinName | The pin's name. |
pinValue | The pin's value. |
◆ _digital_input_pins
Array of gpio pin objects
The documentation for this class was generated from the following files: