1.1.7.4.4 DRV_SDSPI_Close Function

C

void DRV_SDSPI_Close
(
    const DRV_HANDLE handle
)

Summary

Closes an opened-instance of the SD Card driver.

Description

This routine closes an opened-instance of the SD Card driver, invalidating the handle.

Precondition

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

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

Parameters

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

Returns

None

Example

DRV_HANDLE handle; // Returned from DRV_SDSPI_Open

DRV_SDSPI_Close (handle);

Remarks

After calling this routine, the handle passed in "handle" must not be used with any of the remaining driver routines. A new handle must be obtained by calling DRV_SDSPI_Open before the caller may use the driver again. This routine may block for other client-level operations to complete.

Note: Usually there is no need for the driver client to verify that the Close operation has completed.