![]() |
|
Uniot Core
|
| 0.8.1 |
#include <GpioRegister.h>
Public Member Functions | |
| GpioRegister () | |
| Default constructor. | |
| ~GpioRegister () | |
| Destructor. | |
| GpioRegister (GpioRegister const &)=delete | |
| Deleted copy constructor to prevent copying. | |
| void | operator= (GpioRegister const &)=delete |
| Deleted assignment operator to prevent assignment. | |
| template<typename... Args> | |
| void | setDigitalInput (uint8_t first, Args... args) |
| Configure pins as digital inputs. | |
| template<typename... Args> | |
| void | setDigitalOutput (uint8_t first, Args... args) |
| Configure pins as digital outputs. | |
| template<typename... Args> | |
| void | setAnalogInput (uint8_t first, Args... args) |
| Configure pins as analog inputs. | |
| template<typename... Args> | |
| void | setAnalogOutput (uint8_t first, Args... args) |
| Configure pins as analog outputs. | |
Public Member Functions inherited from uniot::Register< uint8_t > | |
| Register (Register const &)=delete | |
| Deleted copy constructor to prevent unintended copying. | |
| Register () | |
| Constructs an empty Register. | |
| void | operator= (Register const &)=delete |
| Deleted assignment operator to prevent unintended copying. | |
| bool | setRegister (const String &name, const uint8_t *values, size_t count) |
| Sets or replaces a register with the given name and array of values. | |
| bool | addToRegister (const String &name, const uint8_t &value) |
| Adds a single value to an existing register or creates a new one. | |
| bool | getRegisterValue (const String &name, size_t idx, uint8_t &outValue) const |
| Retrieves a value from the register by name and index. | |
| bool | setRegisterValue (const String &name, size_t idx, const uint8_t &value) |
| Updates a value in the register at the specified index. | |
| size_t | getRegisterLength (const String &name) const |
| Gets the number of values in the specified register. | |
| void | iterateRegisters (IteratorCallback callback) const |
| Iterates through all registers and calls the callback function for each one. | |
Protected Member Functions | |
| virtual void | _processRegister (const String &name, const uint8_t &value) override |
| Override method to process register values. | |
Additional Inherited Members | |
Public Types inherited from uniot::Register< uint8_t > | |
| using | IteratorCallback |
| Function type used for iterating through registers. | |
|
inline |
Default constructor.
Initializes a new instance of the GpioRegister class.
|
inline |
Destructor.
|
delete |
Deleted copy constructor to prevent copying.
|
inlineoverrideprotectedvirtual |
Override method to process register values.
Configures the pin mode based on the register name:
| name | The register name (dread, dwrite, aread, or awrite). |
| value | The pin number to configure. |
Reimplemented from uniot::Register< uint8_t >.
|
delete |
Deleted assignment operator to prevent assignment.
|
inline |
Configure pins as analog inputs.
Sets up one or more pins as analog inputs using Arduino's INPUT mode. These pins typically connect to ADC channels.
| Args | Variadic template for accepting multiple pin numbers. |
| first | The first pin number to configure. |
| args | Additional pin numbers to configure. |
|
inline |
Configure pins as analog outputs.
Sets up one or more pins as analog outputs using Arduino's OUTPUT mode. These pins typically connect to PWM or DAC channels.
| Args | Variadic template for accepting multiple pin numbers. |
| first | The first pin number to configure. |
| args | Additional pin numbers to configure. |
|
inline |
Configure pins as digital inputs.
Sets up one or more pins as digital inputs using Arduino's INPUT mode.
| Args | Variadic template for accepting multiple pin numbers. |
| first | The first pin number to configure. |
| args | Additional pin numbers to configure. |
|
inline |
Configure pins as digital outputs.
Sets up one or more pins as digital outputs using Arduino's OUTPUT mode.
| Args | Variadic template for accepting multiple pin numbers. |
| first | The first pin number to configure. |
| args | Additional pin numbers to configure. |