Jump to main content

##

# 2.105.8 SDHCx_IsWriteProtected Function

## C

    /* x = SDHC instance number (x is applicable only on devices with more than one instances of SDHC) */

    bool SDHCx_IsWriteProtected ( void )

## Summary

Returns the write protect switch pin level

## Description

Returns the write protect switch pin level

## Precondition

SDHCx_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 (SDHC1_IsWriteProtected() == false)
    {
        // Card is not write protected
    }

## Remarks

None.