UDMA Timeout
- group UDMA_TIMEOUT
Timeout.
This API provides support to handle timeout feature on UDMA channels.
Enums
-
enum pi_udma_timeout_mode_e
UDMA timeout mode enum.
Values:
-
enumerator PI_UDMA_TIMEOUT_MODE_SW_TRIGGER = 0
Timeout triggered by SW.
-
enumerator PI_UDMA_TIMEOUT_MODE_TRANSFER = 1
Timeout triggered at the beginning of transfer.
-
enumerator PI_UDMA_TIMEOUT_MODE_RXTX = 2
Timeout triggered at the beginning of transfer and cleared at each data received.
-
enumerator PI_UDMA_TIMEOUT_MODE_SW_TRIGGER = 0
-
enum pi_udma_timeout_ioctl_cmd
UDMA timeout ioctl commands.
Values:
-
enumerator PI_UDMA_TIMEOUT_IOCTL_START = 0
Start timeout counter.
Start UDMA timeout counter.
Note
This is to be used with
PI_UDMA_TIMEOUT_MODE_SW_TRIGGER
.
-
enumerator PI_UDMA_TIMEOUT_IOCTL_STOP = 1
Stop timeout counter.
Stop UDMA timeout counter and reset it.
-
enumerator PI_UDMA_TIMEOUT_IOCTL_START = 0
Functions
-
int32_t pi_udma_timeout_alloc(pi_udma_timeout_mode_e mode)
Allocate a UDMA timeout channel.
This function is called to allocate a UDMA timeout channel before using it. A UDMA timeout channel must be allocated before calling timeout functions.
- Parameters:
mode – UDMA timeout channel mode.
- Return values:
-1 – If no UDMA timeout channel available.
UTID – UDMA timeout channel ID.
-
void pi_udma_timeout_free(int32_t timeout_id)
Free a UDMA timeout channel.
This function frees an allocated a UDMA timeout channel.
- Parameters:
timeout_id – UDMA timeout channel to free.
-
int32_t pi_udma_timeout_ioctl(int32_t timeout_id, uint32_t cmd, void *arg)
Ioctl commands.
This function is used to configure UDMA timeout channels.
- Return values:
-1 – If wrong ioctl command.
Value – Otherwise return value depending on ioctl command.
-
enum pi_udma_timeout_mode_e