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.

Table 16-33. Parameters
Data directionParameter nameDescription

[in]

module

Pointer to USART software instance struct

[in]

transceiver_type

Transfer type to check

Returns

Status of the given job.

Table 16-34. Return Values
Return valueDescription

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