1.32.17.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.