1.1.6.4.20 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
| Parameters | Description |
|---|---|
| handle | A 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.
