| Ucs_Return_t Ucs_Gpio_ReadPort | ( | Ucs_Inst_t * | self, |
| uint16_t | destination_address, | ||
| uint16_t | gpio_port_handle, | ||
| Ucs_Gpio_PinStateResCb_t | result_fptr | ||
| ) |
Reads the pin state of the given GPIO port.
| This function corresponds with the INIC function INIC.GPIOPortPinState. |
| self | The UNICENS instance pointer | ||
| destination_address | Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device. The following address ranges are supported:
| ||
| gpio_port_handle | The GPIO Port resource handle.
| ||
| result_fptr | Required result callback function pointer. |
| Value | Description |
|---|---|
| UCS_RET_SUCCESS | No error |
| UCS_RET_ERR_PARAM | At least one parameter is wrong |
| UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available |
| UCS_RET_ERR_API_LOCKED | API is currently locked |
| UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized |
Example