1.34.6.10 HSMCI_CommandErrorGet Function

C

uint16_t HSMCI_CommandErrorGet(void)

Summary

Returns the errors associated with a command transfer.

Description

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

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

Precondition

A command must have been initiated using the HSMCI_CommandSend() function.

Parameters

None.

Returns

Bit wise OR of the command error flags defined under the enum HSMCI_ERROR_FLAGS - HSMCI_CMD_TIMEOUT_ERROR, HSMCI_CMD_CRC_ERROR, HSMCI_CMD_END_BIT_ERROR, HSMCI_CMD_INDEX_ERROR.

Example

uint16_t cmd_error = HSMCI_CommandErrorGet();

if (cmd_error & (HSMCI_CMD_TIMEOUT_ERROR | HSMCI_CMD_CRC_ERROR |
HSMCI_CMD_END_BIT_ERROR | HSMCI_CMD_INDEX_ERROR))
{
    // Handle command error
}

Remarks

None.