1.1.6.4.5 DRV_SDMMC_Close Function

C

void DRV_SDMMC_Close ( 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_SDMMC_Initialize routine must have been called for the specified SD Card driver instance.

DRV_SDMMC_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_SDMMC_Open

DRV_SDMMC_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_SDMMC_Open before the caller may use the driver again.

If any requests were queued by the client, the driver will remove those requests from the queue and issue a DRV_SDMMC_EVENT_COMMAND_ERROR event, (if an event handler is registered by the client) before the client is closed.