3.23 SRPORT - Signal Routing Port
3.23.1 Introduction
The MPLAB® Code Configurator (MCC) Melody Signal Routing Port Peripheral Library (PLIBs) drivers generates APIs to support SRPORT-specific peripheral functionality on target MCUs.
The Signal Routing Port (SRPORT) module allows for interconnection of multiple peripherals internal to a device without the need for an external I/O pin. A device may contain multiple Signal Routing Ports, each Signal Routing Port consisting of eight pins that are represented by eight bits similar to regular device ports.
3.23.2 Supported Device Families
PIC18F-Q20 | PIC18F-Q71 |
3.23.3 Required header files:
#include "mcc_generated_files/srport/portw.h"
3.23.4 Module Documentation
3.23.4.1 PORTW
This is the generated header file for the PIC18 MCU PORTW driver.
3.23.4.1.1 Module description
This is the generated header file for the PIC18 MCU PORTW driver.
Functions
static void RW0_DefaultInterruptHandler (void)
Default interrupt handler for the RW0 signal routing pin. This is a predefined interrupt handler to be used together with the RW0_SetInterruptHandler() method.
static void RW1_DefaultInterruptHandler (void)
Default interrupt handler for the RW1 signal routing pin. This is a predefined interrupt handler to be used together with the RW1_SetInterruptHandler() method.
static void RW2_DefaultInterruptHandler (void)
Default interrupt handler for the RW2 signal routing pin. This is a predefined interrupt handler to be used together with the RW2_SetInterruptHandler() method.
static void RW3_DefaultInterruptHandler (void)
Default interrupt handler for the RW3 signal routing pin. This is a predefined interrupt handler to be used together with the RW3_SetInterruptHandler() method.
static void RW4_DefaultInterruptHandler (void)
Default interrupt handler for the RW4 signal routing pin. This is a predefined interrupt handler to be used together with the RW4_SetInterruptHandler() method.
static void RW5_DefaultInterruptHandler (void)
Default interrupt handler for the RW5 signal routing pin. This is a predefined interrupt handler to be used together with the RW5_SetInterruptHandler() method.
static void RW6_DefaultInterruptHandler (void)
Default interrupt handler for the RW6 signal routing pin. This is a predefined interrupt handler to be used together with the RW6_SetInterruptHandler() method.
static void RW7_DefaultInterruptHandler (void)
Default interrupt handler for the RW7 signal routing pin. This is a predefined interrupt handler to be used together with the RW7_SetInterruptHandler() method.
void __interrupt (irq(IOCSR), base(8), low_priority)
Implements the ISR for the PORTW low priority vectored interrupt.
void __interrupt (irq(IOCSR), base(8))
Implements the ISR for the PORTW high priority vectored interrupt.
void PORTW_Initialize (void)
Initializes the PORTW signal routing port.
void PORTW_ClockEnable (void)
Enables the PORTW clock.
void PORTW_ClockDisable (void)
Disables the PORTW clock.
void RW0_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW0 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW0 at application run-time.
void RW1_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW1 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW1 at application run-time.
void RW2_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW2 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW2 at application run-time.
void RW3_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW3 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW3 at application run-time.
void RW4_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW4 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW4 at application run-time.
void RW5_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW5 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW5 at application run-time.
void RW6_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW6 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW6 at application run-time.
void RW7_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW7 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW7 at application run-time.
void PORTW_ISR (void)
Implements the Interrupt Service Routine (ISR) for the PORTW non-vectored interrupt.
3.23.4.1.2 Function Documentation
__interrupt() for Low-Priority Vectored Interrupts
void __interrupt (irq(IOCSR) , base(8) , low_priority )
Implements the ISR for the PORTW low priority vectored interrupt.
None. |
None. |
__interrupt() for High-Priority Vectored Interrupts
void __interrupt (irq(IOCSR) , base(8) )
Implements the ISR for the PORTW high priority vectored interrupt.
None. |
None. |
PORTW_ClockDisable()
void PORTW_ClockDisable (void )
Disables the PORTW clock.
None. |
None. |
PORTW_ClockEnable()
void PORTW_ClockEnable (void )
Enables the PORTW clock.
None. |
None. |
PORTW_Initialize()
void PORTW_Initialize (void )
Initializes the PORTW signal routing port.
Section: PORTW APIs
None. |
None. |
Section: PORTW APIs
PORTW_ISR() for Non-Vectored Interrupts
void PORTW_ISR (void )
Implements the Interrupt Service Routine (ISR) for the PORTW non-vectored interrupt.
None. |
None. |
RW0_DefaultInterruptHandler()
static void RW0_DefaultInterruptHandler (void )[static]
Default interrupt handler for the RW0 signal routing pin. This is a predefined interrupt handler to be used together with the RW0_SetInterruptHandler() method.
None. |
None. |
RW0_SetInterruptHandler()
void RW0_SetInterruptHandler (void (* InterruptHandler)(void))
Interrupt handler setter for the RW0 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW0 at application run-time.
*InterruptHandler |
- Function pointer to custom callback. |
None. |
RW1_DefaultInterruptHandler()
static void RW1_DefaultInterruptHandler (void )[static]
Default interrupt handler for the RW1 signal routing pin. This is a predefined interrupt handler to be used together with the RW1_SetInterruptHandler() method.
None. |
None. |
RW1_SetInterruptHandler()
void RW1_SetInterruptHandler (void (* InterruptHandler)(void))
Interrupt handler setter for the RW1 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW1 at application run-time.
*InterruptHandler |
- Function pointer to custom callback. |
None. |
RW2_DefaultInterruptHandler()
static void RW2_DefaultInterruptHandler (void )[static]
Default interrupt handler for the RW2 signal routing pin. This is a predefined interrupt handler to be used together with the RW2_SetInterruptHandler() method.
None. |
None. |
RW2_SetInterruptHandler()
void RW2_SetInterruptHandler (void (* InterruptHandler)(void))
Interrupt handler setter for the RW2 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW2 at application run-time.
*InterruptHandler |
- Function pointer to custom callback. |
None. |
RW3_DefaultInterruptHandler()
static void RW3_DefaultInterruptHandler (void )[static]
Default interrupt handler for the RW3 signal routing pin. This is a predefined interrupt handler to be used together with the RW3_SetInterruptHandler() method.
None. |
None. |
RW3_SetInterruptHandler()
void RW3_SetInterruptHandler (void (* InterruptHandler)(void))
Interrupt handler setter for the RW3 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW3 at application run-time.
*InterruptHandler |
- Function pointer to custom callback. |
None. |
RW4_DefaultInterruptHandler()
static void RW4_DefaultInterruptHandler (void )[static]
Default interrupt handler for the RW4 signal routing pin. This is a predefined interrupt handler to be used together with the RW4_SetInterruptHandler() method.
None. |
None. |
RW4_SetInterruptHandler()
void RW4_SetInterruptHandler (void (* InterruptHandler)(void))
Interrupt handler setter for the RW4 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW4 at application run-time.
*InterruptHandler |
- Function pointer to custom callback. |
None. |
RW5_DefaultInterruptHandler()
static void RW5_DefaultInterruptHandler (void )[static]
Default interrupt handler for the RW5 signal routing pin. This is a predefined interrupt handler to be used together with the RW5_SetInterruptHandler() method.
None. |
None. |
RW5_SetInterruptHandler()
void RW5_SetInterruptHandler (void (* InterruptHandler)(void))
Interrupt handler setter for the RW5 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW5 at application run-time.
*InterruptHandler |
- Function pointer to custom callback. |
None. |
RW6_DefaultInterruptHandler()
static void RW6_DefaultInterruptHandler (void )[static]
Default interrupt handler for the RW6 signal routing pin. This is a predefined interrupt handler to be used together with the RW6_SetInterruptHandler() method.
None. |
None. |
RW6_SetInterruptHandler()
void RW6_SetInterruptHandler (void (* InterruptHandler)(void))
Interrupt handler setter for the RW6 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW6 at application run-time.
*InterruptHandler |
- Function pointer to custom callback. |
None. |
RW7_DefaultInterruptHandler()
static void RW7_DefaultInterruptHandler (void )[static]
Default interrupt handler for the RW7 signal routing pin. This is a predefined interrupt handler to be used together with the RW7_SetInterruptHandler() method.
None. |
None. |
RW7_SetInterruptHandler()
void RW7_SetInterruptHandler (void (* InterruptHandler)(void))
Interrupt handler setter for the RW7 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW7 at application run-time.
*InterruptHandler |
- Function pointer to custom callback. |
None. |
3.23.5 File Documentation
3.23.5.1 source/portw.c File Reference
This is the generated driver implementation file for the PIC18 MCU PORTW.
#include <xc.h> #include "../portw.h"
3.23.5.1.1 Functions
static void RW0_DefaultInterruptHandler (void)
Default interrupt handler for the RW0 signal routing pin. This is a predefined interrupt handler to be used together with the RW0_SetInterruptHandler() method.
static void RW1_DefaultInterruptHandler (void)
Default interrupt handler for the RW1 signal routing pin. This is a predefined interrupt handler to be used together with the RW1_SetInterruptHandler() method.
static void RW2_DefaultInterruptHandler (void)
Default interrupt handler for the RW2 signal routing pin. This is a predefined interrupt handler to be used together with the RW2_SetInterruptHandler() method.
static void RW3_DefaultInterruptHandler (void)
Default interrupt handler for the RW3 signal routing pin. This is a predefined interrupt handler to be used together with the RW3_SetInterruptHandler() method.
static void RW4_DefaultInterruptHandler (void)
Default interrupt handler for the RW4 signal routing pin. This is a predefined interrupt handler to be used together with the RW4_SetInterruptHandler() method.
static void RW5_DefaultInterruptHandler (void)
Default interrupt handler for the RW5 signal routing pin. This is a predefined interrupt handler to be used together with the RW5_SetInterruptHandler() method.
static void RW6_DefaultInterruptHandler (void)
Default interrupt handler for the RW6 signal routing pin. This is a predefined interrupt handler to be used together with the RW6_SetInterruptHandler() method.
static void RW7_DefaultInterruptHandler (void)
Default interrupt handler for the RW7 signal routing pin. This is a predefined interrupt handler to be used together with the RW7_SetInterruptHandler() method.
void PORTW_Initialize (void)
Initializes the PORTW signal routing port.
void PORTW_ClockEnable (void)
Enables the PORTW clock.
void PORTW_ClockDisable (void)
Disables the PORTW clock.
void PORTW_ISR (void)
Implements the Interrupt Service Routine (ISR) for the PORTW non-vectored interrupt.
void RW0_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW0 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW0 at application run-time.
void RW1_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW1 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW1 at application run-time.
void RW2_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW2 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW2 at application run-time.
void RW3_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW3 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW3 at application run-time.
void RW4_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW4 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW4 at application run-time.
void RW5_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW5 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW5 at application run-time.
void RW6_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW6 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW6 at application run-time.
void RW7_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW7 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW7 at application run-time.
void __interrupt (irq(IOCSR), base(8), low_priority)
Implements the ISR for the PORTW low priority vectored interrupt.
void __interrupt (irq(IOCSR), base(8))
Implements the ISR for the PORTW high priority vectored interrupt.
3.23.5.1.2 Variables
static void(* RW0_InterruptHandler )(void)
static void(* RW1_InterruptHandler )(void)
static void(* RW2_InterruptHandler )(void)
static void(* RW3_InterruptHandler )(void)
static void(* RW4_InterruptHandler )(void)
static void(* RW5_InterruptHandler )(void)
static void(* RW6_InterruptHandler )(void)
static void(* RW7_InterruptHandler )(void)
3.23.5.1.3 Detailed Description
This is the generated driver implementation file for the PIC18 MCU PORTW.
PORTW Generated Driver File
3.23.5.1.4 Variable Documentation
RW0_InterruptHandler
void(* RW0_InterruptHandler) (void)[static]
Section: Included Files
RW1_InterruptHandler
void(* RW1_InterruptHandler) (void)[static]
RW2_InterruptHandler
void(* RW2_InterruptHandler) (void)[static]
RW3_InterruptHandler
void(* RW3_InterruptHandler) (void)[static]
RW4_InterruptHandler
void(* RW4_InterruptHandler) (void)[static]
RW5_InterruptHandler
void(* RW5_InterruptHandler) (void)[static]
RW6_InterruptHandler
void(* RW6_InterruptHandler) (void)[static]
RW7_InterruptHandler
void(* RW7_InterruptHandler) (void)[static]
3.23.5.2 source/portw.h File Reference
3.23.5.2.1 Functions
void PORTW_Initialize (void)
Initializes the PORTW signal routing port.
void PORTW_ClockEnable (void)
Enables the PORTW clock.
void PORTW_ClockDisable (void)
Disables the PORTW clock.
void RW0_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW0 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW0 at application run-time.
void RW1_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW1 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW1 at application run-time.
void RW2_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW2 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW2 at application run-time.
void RW3_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW3 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW3 at application run-time.
void RW4_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW4 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW4 at application run-time.
void RW5_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW5 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW5 at application run-time.
void RW6_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW6 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW6 at application run-time.
void RW7_SetInterruptHandler (void(*InterruptHandler)(void))
Interrupt handler setter for the RW7 signal routing pin interrupt-on-change functionality. Allows selecting an interrupt handler for RW7 at application run-time.
void PORTW_ISR (void)
Implements the Interrupt Service Routine (ISR) for the PORTW non-vectored interrupt.
3.23.5.2.2 Detailed Description
PORTW Generated Driver API Header File