1.1.6.4.12 DRV_SDMMC_IsWriteProtected Function

C

bool DRV_SDMMC_IsWriteProtected ( const DRV_HANDLE handle );

Summary

Returns the write protect status of the SDMMC.

Description

This function returns the physical write status of the SDMMC. This function returns true if the SD Card is write protected otherwise it returns false.

Precondition

The DRV_SDMMC_Initialize routine must have been called for the specified SDMMC driver instance.

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

Returns true if the attached SD Card is write protected.

Returns false if the handle is not valid, or if the SD Card is not write protected, or if the write protection check is not enabled.

Example

bool isWriteProtected;
isWriteProtected = DRV_SDMMC_IsWriteProtected(drvSDMMCHandle);

Remarks

None.