1.34.6.8 HSMCI_DataErrorGet Function

C

uint16_t HSMCI_DataErrorGet(void)

Summary

Returns the errors associated with a data transfer.

Description

Returns the errors associated with a data transfer. For a data transfer, the returned value is a bit wise OR of the errors defined in the HSMCI_ERROR_FLAGS enum.

The error flags are cleared after a call to this API.

Precondition

A command containing a data stage must have been initiated using the HSMCI_CommandSend() function.

Parameters

None.

Returns

Bit wise OR of the data error flags defined under the enum HSMCI_ERROR_FLAGS - HSMCI_DATA_TIMEOUT_ERROR, HSMCI_DATA_CRC_ERROR, HSMCI_DATA_UNDERRUN_ERROR, HSMCI_DATA_OVERRUN_ERROR.

Example

uint16_t data_error = HSMCI_DataErrorGet();

if (data_error & (HSMCI_DATA_TIMEOUT_ERROR | HSMCI_DATA_CRC_ERROR |
HSMCI_DATA_UNDERRUN_ERROR | HSMCI_DATA_OVERRUN_ERROR))
{
    // Handle data error
}

Remarks

None.