3.26.9.1 pac-driver

3.26.9.1.1 Module Documentation

PAC Driver

PAC(Peripheral Access Controller) is used to prevent accidental enabling or disabling of critical peripherals. The module implements an OR gate between the associated peripheralâ??s PACCONx lock bit and the inverse of the PACCONx write enable bit.

Module description

PAC(Peripheral Access Controller) is used to prevent accidental enabling or disabling of critical peripherals. The module implements an OR gate between the associated peripheralâ??s PACCONx lock bit and the inverse of the PACCONx write enable bit.

Enumerations

Function Documentation

PAC_PeripheralIsProtected()

bool PAC_PeripheralIsProtected (enum PAC_PERIPHERALS peripheral)

Returns the status of PAC peripheral.

Parameters:
in peripheral

- Selected peripheral for write protection

Returns:

true - peripheral write protection is enabled false - peripheral write protection is disabled

PAC_PeripheralProtectSetup()

void PAC_PeripheralProtectSetup (enum PAC_PERIPHERALS peripheral, enum PAC_PROTECTION operation)

Setup the peripheral write protection of selected peripheral.

Parameters:
in peripheral

- Selected peripheral

in operation

- operation of PAC protection

Returns:

none

Enumeration Type Documentation

PAC_PERIPHERALS

enum PAC_PERIPHERALS

Defines the available peripherals for PAC.

PAC_PERIPHERAL_IVTBASE
PAC_PERIPHERAL_IVTCREG
PAC_PERIPHERAL_BMXIRAML
PAC_PERIPHERAL_BMXIRAMH
PAC_PERIPHERAL_PCLKCON
PAC_PERIPHERAL_IOIM1CON
PAC_PERIPHERAL_IOIM2CON
PAC_PERIPHERAL_IOIM3CON
PAC_PERIPHERAL_IOIM4CON
PAC_PERIPHERAL_NVMCON
PAC_PERIPHERAL_OSCCTRL
PAC_PERIPHERAL_CM1CON
PAC_PERIPHERAL_CM1RANGE
PAC_PERIPHERAL_CM2CON
PAC_PERIPHERAL_CM2RANGE
PAC_PERIPHERAL_CM3CON
PAC_PERIPHERAL_CM3RANGE
PAC_PERIPHERAL_CM4CON
PAC_PERIPHERAL_CM4RANGE
PAC_PERIPHERAL_WDTCON
PAC_PERIPHERAL_RPCON
PAC_PERIPHERAL_MBISTCON
PAC_PROTECTION

enum PAC_PROTECTION

Defines PAC protection state enumeration for pac.

PAC_PROTECTION_CLEAR

Clear the peripheral write control protection

PAC_PROTECTION_SET

Set the peripheral write control protection

PAC_PROTECTION_SET_AND_LOCK

Set and lock the peripheral write control until the next hardware reset

3.26.9.1.2 File Documentation

source/pac.h File Reference

#include <xc.h>
#include <stdbool.h>

Enumerations

Detailed Description

PAC Generated Driver Header File