Common definitions for I/O adapters.
More...
|
| file | ad.h |
| | Adapters shared definitions.
|
| |
Common definitions for I/O adapters.
◆ AD_IO_CONF_STATE
Adapters IO configuration state.
| Enumerator |
|---|
| AD_IO_CONF_OFF | Off configuration
|
| AD_IO_CONF_ON | On configuration
|
◆ AD_IO_ERROR
ad_io_configure return value
| Enumerator |
|---|
| AD_IO_ERROR_NONE | Configuration set
|
| AD_IO_ERROR_INVALID_PIN | Invalid pin passed
|
| AD_IO_ERROR_INVALID_CFG | Invalid IO configuration passed
|
◆ AD_IO_PAD_LATCHES_OP
Pad latch operation.
| Enumerator |
|---|
| AD_IO_PAD_LATCHES_OP_DISABLE | Pad latch disabled. The pad retains its current state (e.g. during sleep).
|
| AD_IO_PAD_LATCHES_OP_ENABLE | Pad latch enabled. The pad can change state, either by external drive (input) or by us (output).
|
| AD_IO_PAD_LATCHES_OP_TOGGLE | Pad latch enabled and then disabled
|
◆ ad_io_configure()
Apply a list of IO configurations.
This function applies the on or off configuration of a list of IO pins. It configures :
- IO pin function
- Pad voltage level
- Parameters
-
| [in] | io | list of configurations of gpio pins |
| [in] | size | number of pins to configure |
| [in] | state | configuration to be applied (AD_IO_CONF_OFF/AD_IO_CONF_ON) |
- Returns
- AD_IO_ERROR
◆ ad_io_set_pad_latch()
Apply a list of io pad latch operations.
- Parameters
-
| [in] | io | list of configurations of io pins |
| [in] | size | number of pins to configure |
| [in] | operation | latch state |
- Returns
- AD_IO_ERROR