Public functions of the PPS PRAL driver. More...
Functions | |
volatile uint16_t | PPS_LockIO (void) |
Locks the Peripheral Pin Select Configuration registers against accidental changes. More... | |
volatile uint16_t | PPS_UnlockIO (void) |
Unlocks the Peripheral Pin Select Configuration registers to enable changes. More... | |
volatile uint16_t | PPS_RemapOutput (volatile uint8_t pinno, volatile uint8_t peripheral) |
Assigns a digital function output to a pin. More... | |
volatile uint16_t | PPS_RemapInput (volatile uint8_t pinno, volatile uint8_t *peripheral) |
Assigns a pin to a digital function input. More... | |
volatile uint16_t | PPS_UnmapOutput (volatile uint8_t pinno) |
Disconnects a pin from a digital function output. More... | |
volatile uint16_t | PPS_UnmapInput (volatile uint8_t *peripheral) |
Disconnects a pin from a digital function input. More... | |
Public functions of the PPS PRAL driver.
This is the detailed description of public functions of the PPS PRAL driver
uint16_t PPS_LockIO | ( | void | ) |
Locks the Peripheral Pin Select Configuration registers against accidental changes.
This inline-assembly routine locks the Port Multiplexing Configuration registers by keeping the required number of cycles during the Lock pocess. This function has to be called once before digital functions are mapped to a specific pin. Once called, a series of assignments can be executed.
Definition at line 75 of file p33c_pps.c.
uint16_t PPS_RemapInput | ( | volatile uint8_t | pinno, |
volatile uint8_t * | peripheral | ||
) |
Assigns a pin to a digital function input.
pinno | Index number of the RPx-pin of type uint8_t, which should be assigned to the function |
peripheral | Pointer to peripheral/function of type uint8_t, which should be assigned to the pin |
Any RPx pin can be assigned to a supported digital function input (e.g. UART RxD). To assign a pin to a function input, call
smpsPPS_RemapInput([RP-NUMBER], [FUNCTION])
Definition at line 174 of file p33c_pps.c.
uint16_t PPS_RemapOutput | ( | volatile uint8_t | pinno, |
volatile uint8_t | peripheral | ||
) |
Assigns a digital function output to a pin.
pinno | Index number of the RPx-pin of type uint8_t, which should be assigned to the function |
peripheral | Peripheral/Function ID of type uint8_t, which should be assigned to the pin |
Any supported digital function output (e.g. UART TxD) can be assigned to one of the RPx pins of the MCU/DSC. To assign a function output to a pin, call
smpsPPS_RemapOutput([RP-NUMBER], [FUNCTION])
Definition at line 133 of file p33c_pps.c.
uint16_t PPS_UnlockIO | ( | void | ) |
Unlocks the Peripheral Pin Select Configuration registers to enable changes.
This inline-assembly routine unlocks the Port Multiplexing Configuration registers by keeping the required number of cycles during the unlock process. This function has to be called once after digital functions have been mapped to a specific pin, to prevent accidental changes.
Definition at line 102 of file p33c_pps.c.
uint16_t PPS_UnmapInput | ( | volatile uint8_t * | peripheral | ) |
Disconnects a pin from a digital function input.
peripheral | Pointer to peripheral of type uint8_t, which should be assigned to the pin |
An existing assignment between any RPx pin and a supported digital function input will be dissolved.
smpsPPS_UnmapInput([RP-NUMBER])
Definition at line 240 of file p33c_pps.c.
uint16_t PPS_UnmapOutput | ( | volatile uint8_t | pinno | ) |
Disconnects a pin from a digital function output.
pinno | Index number of the RPx-pin of type uint8_t, which should be assigned to the function |
An existing assignment between any RPx pin and a supported digital function output will be dissolved.
smpsPPS_UnmapOutput([RP-NUMBER])
Definition at line 207 of file p33c_pps.c.