1.2.20.4 SDMMCx_IsWriteProtected Function

C

/* x = SDMMC instance number */

bool SDMMCx_IsWriteProtected ( void )

Summary

Returns the write protect switch pin level.

Description

Returns the write protect switch pin level.

Precondition

SDMMCx_Initialize() must have been called first for the associated instance.

Parameters

None.

Returns

true - If the card is write protected.

false - If the card is write enabled.

Example

if (SDMMC1_IsWriteProtected() == false)
{
    // Card is not write protected
}

Remarks

None.