/* Get status from the ongoing or last asynchronous transfer operation. 
Returns the error from a given ongoing or last asynchronous transfer operation. Either from a read or write transfer. */
enum status_code usart_get_job_status(struct usart_module *const module, enum usart_transceiver_type transceiver_type)
/* Get status from the ongoing or last asynchronous transfer operation. 
Returns the error from a given ongoing or last asynchronous transfer operation. Either from a read or write transfer. */
enum status_code usart_get_job_status(struct usart_module *const module, enum usart_transceiver_type transceiver_type)
{
	Assert(module);
	enum status_code status_code;
	switch(transceiver_type) {
	case USART_TRANSCEIVER_RX:
			status_code = module->rx_status;
			break;
	case USART_TRANSCEIVER_TX:
			status_code = module->tx_status;
			break;
	default:
			status_code = STATUS_ERR_INVALID_ARG;
			break;
	}
	return status_code;
}