1.1.7.4.10 DRV_SDSPI_IsAttached Function

C

bool DRV_SDSPI_IsAttached
(
    const DRV_HANDLE handle
)

Summary

Returns the physical attach status of the SD Card.

Description

This function returns the physical attach status of the SD Card.

Precondition

The DRV_SDSPI_Initialize routine must have been called for the specified SDSPI driver instance.

The DRV_SDSPI_Open routine must have been called to obtain a valid opened device handle.

Parameters

ParamDescription
handleA valid open-instance handle, returned from the driver's open function

Returns

true - If the SD Card is attached and initialized by the SDSPI driver.

false - If the handle is invalid

Example

bool isSDSPIAttached;

// mySDSPIHandle is the handle returned by the DRV_SDSPI_Open function.
isSDSPIAttached = DRV_SDSPI_IsAttached(mySDSPIHandle);

if (isSDSPIAttached == true)
{
    // SD Card is attached and initialized by the SDSPI driver.
}

Remarks

None.