1.3.16.3 1.4.15.3 1.5.15.3 1.6.17.3 1.7.18.3 1.9.14.3 1.29.16.3 1.30.11.2 1.31.11.2 1.32.17.3 1.33.11.2 1.37.11.2 1.38.15.3 1.39.12.3 1.40.14.3 PAC_PeripheralProtectSetup Function

C

void PAC_PeripheralProtectSetup(PAC_PERIPHERAL peripheral, PAC_PROTECTION operation)

Summary

This function configures PAC protection for the specified peripheral.

Description

This function configures PAC protection for the specified peripheral.

Precondition

Protection status return by PAC_PeripheralIsProtected() function needs to be used before calling this function.

Parameters

Param Description
peripheral Peripheral to be operated on.
operation PAC operation to be performed. Refer to the description of the PAC_PROTECTION enumeration for possible operations.

Returns

None.

Example

bool status = false;

status = PAC_PeripheralIsProtected(PAC_PERIPHERAL_DSU);

if (status == true)
{
    PAC_PeripheralProtectSetup(PAC_PERIPHERAL_DSU, PAC_PROTECTION_CLEAR);
}
else
{
    PAC_PeripheralProtectSetup(PAC_PERIPHERAL_DSU, PAC_PROTECTION_SET);
}

Remarks

None.