Doly C++ SDK v1.00
Loading...
Searching...
No Matches
IoControl Namespace Reference

Functions

int8_t writePin (uint16_t id, uint8_t io_pin, GpioState state)
 Write a GPIO state to an IO port pin.
GpioState readPin (uint16_t id, uint8_t io_pin)
 Read the current GPIO state of an IO port pin.
float getVersion ()
 Get current library version.

Function Documentation

◆ getVersion()

float IoControl::getVersion ( )

Get current library version.

Original note: format 0.XYZ (3 digits after major).

Returns
Version as float.
Examples
IoControl/main.cpp.

◆ readPin()

GpioState IoControl::readPin ( uint16_t id,
uint8_t io_pin )

Read the current GPIO state of an IO port pin.

Parameters
idUser-defined identifier used for internal tracking/logging (can be any value).
io_pinIO port pin number (valid range: 0..5).
Returns
Current GPIO state. If io_pin is invalid or a read error occurs, the returned value is implementation-defined (see underlying GPIO layer).
Examples
IoControl/main.cpp.

◆ writePin()

int8_t IoControl::writePin ( uint16_t id,
uint8_t io_pin,
GpioState state )

Write a GPIO state to an IO port pin.

Parameters
idUser-defined identifier used for internal tracking/logging (can be any value).
io_pinIO port pin number (valid range: 0..5).
stateDesired GPIO output state.
Returns
Status code:
  • 0 : success
  • -1 : invalid GPIO pin (must be IO port pin number 0..5)
  • -2 : GPIO write error
Examples
IoControl/main.cpp.