Configure and control the FlexSense External Digital I/O interface.
More...
|
|
typedef void(* | FLEX_IOWakeupHandler) (void) |
| | Wakeup Handler Function Pointer Declaration.
|
| |
Configure and control the FlexSense External Digital I/O interface.
◆ FLEX_DigitalIOPin
Available Digital I/O Pins.
| Enumerator |
|---|
| FLEX_EXT_DIGITAL_IO_1 | Digital I/O Pin 1.
|
| FLEX_EXT_DIGITAL_IO_2 | Digital I/O Pin 2.
|
◆ FLEX_DigitalIOLevel
Digital I/O level Options.
| Enumerator |
|---|
| FLEX_EXT_DIGITAL_IO_LOW | Digital I/O level Low.
|
| FLEX_EXT_DIGITAL_IO_HIGH | Digital I/O level High.
|
◆ FLEX_ExtDigitalIOWakeupModifyAction
External Digital I/O Wakeup Modify Actions.
| Enumerator |
|---|
| FLEX_EXT_DIGITAL_IO_WAKEUP_ENABLE | Action to enable wakeup for an External Digital I/O pin.
|
| FLEX_EXT_DIGITAL_IO_WAKEUP_DISABLE | Action to disable wakeup for an External Digital I/O pin.
|
◆ FLEX_ExtDigitalIOSet()
Set the level of an external Digital I/O pin to High or Low.
- Parameters
-
| [in] | PinNum | the external Digital I/O pin number. |
| [in] | Level | the required Digital I/O level for the selected pin. |
- Returns
- FLEX_SUCCESS (0) if succeeded and < 0 if failed.
- Return values
-
| -FLEX_ERROR_IO_EXPANDER | failed to initialise or configure expander device |
| -FLEX_ERROR_EINVAL | Invalid level parameter |
| -FLEX_ERROR_I2C | Error with i2c device when setting IO |
◆ FLEX_ExtDigitalIOGet()
Get the level of an External Digital I/O pin.
- Parameters
-
| [in] | PinNum | the external Digital I/O pin number. |
- Returns
- FLEX_DigitalIOLevel if succeeded and < 0 if failed.
- Return values
-
| -FLEX_ERROR_IO_EXPANDER | failed to initialise or configure expander device |
| -FLEX_ERROR_GPIO | Error with GPIO device when setting IO |
◆ FLEX_ExtDigitalIOWakeupModify()
Enable/Disable an External Digital IO with wakeup capability for the next wakeup. This wakes up on a falling edge of the External Digital IO.
- Parameters
-
| [in] | PinNum | the external Digital I/O pin number. |
| [in] | Action | Enable/Disable wakeup for the selected Digital I/O pin. |
- Returns
- FLEX_SUCCESS (0) if succeeded and < 0 if failed.
- Return values
-
| -FLEX_ERROR_GPIO | Error with GPIO device when setting IO |
◆ FLEX_ExtDigitalIOWakeupHandlerModify()
Add or remove an external Digital I/O wakeup handler that will be called on a falling edge on the external Digital I/O pin.
- Parameters
-
| [in] | Handler | function pointer of the external Digital I/O wakeup handler. |
| [in] | Action | Add/Remove the input IO wakeup handler. |
- Returns
- FLEX_SUCCESS (0) if succeeded and < 0 if failed.
- Return values
-
| -FLEX_ERROR_EALREADY | handler already exists, remove first |
| -FLEX_ERROR_EINVAL | attempt to remove non-existent handler |