16.6.4.6.6 Function usart_get_job_status()
Get status from the ongoing or last asynchronous transfer operation.
enum status_code usart_get_job_status( struct usart_module *const module, enum usart_transceiver_type transceiver_type)
Returns the error from a given ongoing or last asynchronous transfer operation. Either from a read or write transfer.
| Data direction | Parameter name | Description |
|---|---|---|
|
[in] |
module |
Pointer to USART software instance struct |
|
[in] |
transceiver_type |
Transfer type to check |
Returns
Status of the given job.
| Return value | Description |
|---|---|
|
STATUS_OK |
No error occurred during the last transfer |
|
STATUS_BUSY |
A transfer is ongoing |
|
STATUS_ERR_BAD_DATA |
The last operation was aborted due to a parity error. The transfer could be affected by external noise |
|
STATUS_ERR_BAD_FORMAT |
The last operation was aborted due to a frame error |
|
STATUS_ERR_OVERFLOW |
The last operation was aborted due to a buffer overflow |
|
STATUS_ERR_INVALID_ARG |
An invalid transceiver enum given |
