PIC24 Support Libraries
|
Go to the source code of this file.
Macros | |
Remappable peripheral input support | |
These funcions map an input internal to the PIC to an input pin. For example, CONFIG_INT1_TO_RP(10) maps the INT1 edge-triggered interrupt to port P, pin 10. | |
#define | CONFIG_INT1_TO_RP(pin) _INT1R = pin |
#define | CONFIG_INT2_TO_RP(pin) _INT2R = pin |
#define | CONFIG_INT3_TO_RP(pin) _INT3R = pin |
#define | CONFIG_INT4_TO_RP(pin) _INT4R = pin |
#define | CONFIG_T1CK_TO_RP(pin) _T1CKR = pin |
#define | CONFIG_T2CK_TO_RP(pin) _T2CKR = pin |
#define | CONFIG_T3CK_TO_RP(pin) _T3CKR = pin |
#define | CONFIG_T4CK_TO_RP(pin) _T4CKR = pin |
#define | CONFIG_T5CK_TO_RP(pin) _T5CKR = pin |
#define | CONFIG_T6CK_TO_RP(pin) _T6CKR = pin |
#define | CONFIG_T7CK_TO_RP(pin) _T7CKR = pin |
#define | CONFIG_T8CK_TO_RP(pin) _T8CKR = pin |
#define | CONFIG_T9CK_TO_RP(pin) _T9CKR = pin |
#define | CONFIG_IC1_TO_RP(pin) _IC1R = pin |
#define | CONFIG_IC2_TO_RP(pin) _IC2R = pin |
#define | CONFIG_IC3_TO_RP(pin) _IC3R = pin |
#define | CONFIG_IC4_TO_RP(pin) _IC4R = pin |
#define | CONFIG_IC5_TO_RP(pin) _IC5R = pin |
#define | CONFIG_IC6_TO_RP(pin) _IC6R = pin |
#define | CONFIG_IC7_TO_RP(pin) _IC7R = pin |
#define | CONFIG_IC8_TO_RP(pin) _IC8R = pin |
#define | CONFIG_OCFA_TO_RP(pin) _OCFAR = pin |
#define | CONFIG_OCFB_TO_RP(pin) _OCFBR = pin |
#define | CONFIG_U1RX_TO_RP(pin) _U1RXR = pin |
#define | CONFIG_U1CTS_TO_RP(pin) _U1CTSR = pin |
#define | CONFIG_U2RX_TO_RP(pin) _U2RXR = pin |
#define | CONFIG_U2CTS_TO_RP(pin) _U2CTSR = pin |
#define | CONFIG_SDI1_TO_RP(pin) _SDI1R = pin |
#define | CONFIG_SCK1IN_TO_RP(pin) _SCK1R = pin |
#define | CONFIG_SS1IN_TO_RP(pin) _SS1R = pin |
#define | CONFIG_SDI2_TO_RP(pin) _SDI2R = pin |
#define | CONFIG_SCK2IN_TO_RP(pin) _SCK2R = pin |
#define | CONFIG_SS2IN_TO_RP(pin) _SS2R = pin |
#define | CONFIG_CDSI_TO_RP(pin) _CSDIR = pin |
#define | CONFIG_CSCKIN_TO_RP(pin) _CSCKINR = pin |
#define | CONFIG_COFSIN_TO_RP(pin) _COFSINR = pin |
#define | CONFIG_C1RX_TO_RP(pin) _C1RXR = pin |
#define | CONFIG_C2RX_TO_RP(pin) _C2RXR = pin |
Remappable peripheral output support | |
These functions maps an output internal to the PIC to an output pin. For example, CONFIG_C1OUT_TO_RP(10) maps the C1OUT comparator output to port P, pin 10. Not all devices support remappable peripherals. In these cases, the macros below evalaute to nothing: CONFIG_C1OUT_TO_RP(10) is a valid C statement which does nothing. | |
#define | CONFIG_NULL_TO_RP(Rxy_RP) _CONFIG_NULL_TO_RP(Rxy_RP) |
#define | _CONFIG_NULL_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = 0) |
#define | CONFIG_C1OUT_TO_RP(Rxy_RP) _CONFIG_C1OUT_TO_RP(Rxy_RP) |
#define | _CONFIG_C1OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_C1OUT) |
#define | CONFIG_C2OUT_TO_RP(Rxy_RP) _CONFIG_C2OUT_TO_RP(Rxy_RP) |
#define | _CONFIG_C2OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_C2OUT) |
#define | CONFIG_U1TX_TO_RP(Rxy_RP) _CONFIG_U1TX_TO_RP(Rxy_RP) |
#define | _CONFIG_U1TX_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_U1TX) |
#define | CONFIG_U1RTS_TO_RP(Rxy_RP) _CONFIG_U1RTS_TO_RP(Rxy_RP) |
#define | _CONFIG_U1RTS_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_U1RTS) |
#define | CONFIG_U2TX_TO_RP(Rxy_RP) _CONFIG_U2TX_TO_RP(Rxy_RP) |
#define | _CONFIG_U2TX_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_U2TX) |
#define | CONFIG_U2RTS_TO_RP(Rxy_RP) _CONFIG_U2RTS_TO_RP(Rxy_RP) |
#define | _CONFIG_U2RTS_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_U2RTS) |
#define | CONFIG_SDO1_TO_RP(Rxy_RP) _CONFIG_SDO1_TO_RP(Rxy_RP) |
#define | _CONFIG_SDO1_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_SDO1) |
#define | CONFIG_SCK1OUT_TO_RP(Rxy_RP) _CONFIG_SCK1OUT_TO_RP(Rxy_RP) |
#define | _CONFIG_SCK1OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_SCK1OUT) |
#define | CONFIG_SS1OUT_TO_RP(Rxy_RP) _CONFIG_SS1OUT_TO_RP(Rxy_RP) |
#define | _CONFIG_SS1OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_SS1OUT) |
#define | CONFIG_SDO2_TO_RP(Rxy_RP) _CONFIG_SDO2_TO_RP(Rxy_RP) |
#define | _CONFIG_SDO2_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_SDO2) |
#define | CONFIG_SCK2OUT_TO_RP(Rxy_RP) _CONFIG_SCK2OUT_TO_RP(Rxy_RP) |
#define | _CONFIG_SCK2OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_SCK2OUT) |
#define | CONFIG_SS2OUT_TO_RP(Rxy_RP) _CONFIG_SS2OUT_TO_RP(Rxy_RP) |
#define | _CONFIG_SS2OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_SS2OUT) |
#define | CONFIG_C1TX_TO_RP(Rxy_RP) _CONFIG_C1TX_TO_RP(Rxy_RP) |
#define | _CONFIG_C1TX_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_C1TX) |
#define | CONFIG_OC1_TO_RP(Rxy_RP) _CONFIG_OC1_TO_RP(Rxy_RP) |
#define | _CONFIG_OC1_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_OC1) |
#define | CONFIG_OC2_TO_RP(Rxy_RP) _CONFIG_OC2_TO_RP(Rxy_RP) |
#define | _CONFIG_OC2_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_OC2) |
#define | CONFIG_OC3_TO_RP(Rxy_RP) _CONFIG_OC3_TO_RP(Rxy_RP) |
#define | _CONFIG_OC3_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_OC3) |
#define | CONFIG_OC4_TO_RP(Rxy_RP) _CONFIG_OC4_TO_RP(Rxy_RP) |
#define | _CONFIG_OC4_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_OC4) |
#define | CONFIG_OC5_TO_RP(Rxy_RP) _CONFIG_OC5_TO_RP(Rxy_RP) |
#define | _CONFIG_OC5_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = _RPOUT_OC5) |
This file defines a series of macros which provide GPIO and related configuration for each pin of a given PIC24/dsPIC33. Configuration is first defined at a low level, by providing the following:
Related low-level configuration:
Combining these produces higher-level configuration:
Definition in file pic24_ports.h.
#define CONFIG_C1OUT_TO_RP | ( | Rxy_RP | ) | _CONFIG_C1OUT_TO_RP(Rxy_RP) |
Maps C1OUT to a remappable pin; see remappable peripheral output support for more information.
Definition at line 427 of file pic24_ports.h.
#define CONFIG_C1RX_TO_RP | ( | pin | ) | _C1RXR = pin |
Maps C1RX to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 378 of file pic24_ports.h.
#define CONFIG_C1TX_TO_RP | ( | Rxy_RP | ) | _CONFIG_C1TX_TO_RP(Rxy_RP) |
Maps C1TX to a remappable pin; see remappable peripheral output support for more information.
Definition at line 523 of file pic24_ports.h.
#define CONFIG_C2OUT_TO_RP | ( | Rxy_RP | ) | _CONFIG_C2OUT_TO_RP(Rxy_RP) |
Maps C2OUT to a remappable pin; see remappable peripheral output support for more information.
Definition at line 435 of file pic24_ports.h.
#define CONFIG_C2RX_TO_RP | ( | pin | ) | _C2RXR = pin |
Maps C2RX to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 385 of file pic24_ports.h.
#define CONFIG_CDSI_TO_RP | ( | pin | ) | _CSDIR = pin |
Maps CSDI to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 357 of file pic24_ports.h.
#define CONFIG_COFSIN_TO_RP | ( | pin | ) | _COFSINR = pin |
Maps COFSIN to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 371 of file pic24_ports.h.
#define CONFIG_CSCKIN_TO_RP | ( | pin | ) | _CSCKINR = pin |
Maps CSCKIN to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 364 of file pic24_ports.h.
#define CONFIG_IC1_TO_RP | ( | pin | ) | _IC1R = pin |
Maps IC1 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 215 of file pic24_ports.h.
#define CONFIG_IC2_TO_RP | ( | pin | ) | _IC2R = pin |
Maps IC2 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 222 of file pic24_ports.h.
#define CONFIG_IC3_TO_RP | ( | pin | ) | _IC3R = pin |
Maps IC3 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 229 of file pic24_ports.h.
#define CONFIG_IC4_TO_RP | ( | pin | ) | _IC4R = pin |
Maps IC4 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 236 of file pic24_ports.h.
#define CONFIG_IC5_TO_RP | ( | pin | ) | _IC5R = pin |
Maps IC5 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 243 of file pic24_ports.h.
#define CONFIG_IC6_TO_RP | ( | pin | ) | _IC6R = pin |
Maps IC6 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 250 of file pic24_ports.h.
#define CONFIG_IC7_TO_RP | ( | pin | ) | _IC7R = pin |
Maps IC7 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 257 of file pic24_ports.h.
#define CONFIG_IC8_TO_RP | ( | pin | ) | _IC8R = pin |
Maps IC8 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 264 of file pic24_ports.h.
#define CONFIG_INT1_TO_RP | ( | pin | ) | _INT1R = pin |
Maps INT1 to a remappable pin; see remappable peripheral input support for more information.
Definition at line 124 of file pic24_ports.h.
#define CONFIG_INT2_TO_RP | ( | pin | ) | _INT2R = pin |
Maps INT2 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 131 of file pic24_ports.h.
#define CONFIG_INT3_TO_RP | ( | pin | ) | _INT3R = pin |
Maps INT3 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 138 of file pic24_ports.h.
#define CONFIG_INT4_TO_RP | ( | pin | ) | _INT4R = pin |
Maps INT4 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 145 of file pic24_ports.h.
#define CONFIG_NULL_TO_RP | ( | Rxy_RP | ) | _CONFIG_NULL_TO_RP(Rxy_RP) |
CONFIG_NULL_TO_RP(n) returns RPn to an 'unmapped' state (i.e, the reset condition).
Definition at line 419 of file pic24_ports.h.
#define CONFIG_OC1_TO_RP | ( | Rxy_RP | ) | _CONFIG_OC1_TO_RP(Rxy_RP) |
Maps OC1 to a remappable pin; see remappable peripheral output support for more information.
Definition at line 531 of file pic24_ports.h.
#define CONFIG_OC2_TO_RP | ( | Rxy_RP | ) | _CONFIG_OC2_TO_RP(Rxy_RP) |
Maps OC2 to a remappable pin; see remappable peripheral output support for more information.
Definition at line 539 of file pic24_ports.h.
#define CONFIG_OC3_TO_RP | ( | Rxy_RP | ) | _CONFIG_OC3_TO_RP(Rxy_RP) |
Maps OC3 to a remappable pin; see remappable peripheral output support for more information.
Definition at line 547 of file pic24_ports.h.
#define CONFIG_OC4_TO_RP | ( | Rxy_RP | ) | _CONFIG_OC4_TO_RP(Rxy_RP) |
Maps OC4 to a remappable pin; see remappable peripheral output support for more information.
Definition at line 555 of file pic24_ports.h.
#define CONFIG_OC5_TO_RP | ( | Rxy_RP | ) | _CONFIG_OC5_TO_RP(Rxy_RP) |
Maps OC5 to a remappable pin; see remappable peripheral output support for more information.
Definition at line 563 of file pic24_ports.h.
#define CONFIG_OCFA_TO_RP | ( | pin | ) | _OCFAR = pin |
Maps OCFA to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 271 of file pic24_ports.h.
#define CONFIG_OCFB_TO_RP | ( | pin | ) | _OCFBR = pin |
Maps OCFB to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 278 of file pic24_ports.h.
#define CONFIG_SCK1IN_TO_RP | ( | pin | ) | _SCK1R = pin |
Maps SCK1 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 322 of file pic24_ports.h.
#define CONFIG_SCK1OUT_TO_RP | ( | Rxy_RP | ) | _CONFIG_SCK1OUT_TO_RP(Rxy_RP) |
Maps SCK1OUT to a remappable pin; see remappable peripheral output support for more information.
Definition at line 483 of file pic24_ports.h.
#define CONFIG_SCK2IN_TO_RP | ( | pin | ) | _SCK2R = pin |
Maps SCK2 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 343 of file pic24_ports.h.
#define CONFIG_SCK2OUT_TO_RP | ( | Rxy_RP | ) | _CONFIG_SCK2OUT_TO_RP(Rxy_RP) |
Maps SCK2OUT to a remappable pin; see remappable peripheral output support for more information.
Definition at line 507 of file pic24_ports.h.
#define CONFIG_SDI1_TO_RP | ( | pin | ) | _SDI1R = pin |
Maps SDI1 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 315 of file pic24_ports.h.
#define CONFIG_SDI2_TO_RP | ( | pin | ) | _SDI2R = pin |
Maps SDI2 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 336 of file pic24_ports.h.
#define CONFIG_SDO1_TO_RP | ( | Rxy_RP | ) | _CONFIG_SDO1_TO_RP(Rxy_RP) |
Maps SDO1 to a remappable pin; see remappable peripheral output support for more information.
Definition at line 475 of file pic24_ports.h.
#define CONFIG_SDO2_TO_RP | ( | Rxy_RP | ) | _CONFIG_SDO2_TO_RP(Rxy_RP) |
Maps SDO2 to a remappable pin; see remappable peripheral output support for more information.
Definition at line 499 of file pic24_ports.h.
#define CONFIG_SS1IN_TO_RP | ( | pin | ) | _SS1R = pin |
Maps SS1 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 329 of file pic24_ports.h.
#define CONFIG_SS1OUT_TO_RP | ( | Rxy_RP | ) | _CONFIG_SS1OUT_TO_RP(Rxy_RP) |
Maps SS11OUT to a remappable pin; see remappable peripheral output support for more information.
Definition at line 491 of file pic24_ports.h.
#define CONFIG_SS2IN_TO_RP | ( | pin | ) | _SS2R = pin |
Maps SS2 to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 350 of file pic24_ports.h.
#define CONFIG_SS2OUT_TO_RP | ( | Rxy_RP | ) | _CONFIG_SS2OUT_TO_RP(Rxy_RP) |
Maps SS2OUT to a remappable pin; see remappable peripheral output support for more information.
Definition at line 515 of file pic24_ports.h.
#define CONFIG_T1CK_TO_RP | ( | pin | ) | _T1CKR = pin |
Maps T1CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 152 of file pic24_ports.h.
#define CONFIG_T2CK_TO_RP | ( | pin | ) | _T2CKR = pin |
Maps T2CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 159 of file pic24_ports.h.
#define CONFIG_T3CK_TO_RP | ( | pin | ) | _T3CKR = pin |
Maps T3CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 166 of file pic24_ports.h.
#define CONFIG_T4CK_TO_RP | ( | pin | ) | _T4CKR = pin |
Maps T4CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 173 of file pic24_ports.h.
#define CONFIG_T5CK_TO_RP | ( | pin | ) | _T5CKR = pin |
Maps T5CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 180 of file pic24_ports.h.
#define CONFIG_T6CK_TO_RP | ( | pin | ) | _T6CKR = pin |
Maps T6CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 187 of file pic24_ports.h.
#define CONFIG_T7CK_TO_RP | ( | pin | ) | _T7CKR = pin |
Maps T7CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 194 of file pic24_ports.h.
#define CONFIG_T8CK_TO_RP | ( | pin | ) | _T8CKR = pin |
Maps T8CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 201 of file pic24_ports.h.
#define CONFIG_T9CK_TO_RP | ( | pin | ) | _T9CKR = pin |
Maps T9CK to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 208 of file pic24_ports.h.
#define CONFIG_U1CTS_TO_RP | ( | pin | ) | _U1CTSR = pin |
Maps U1CTS to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 294 of file pic24_ports.h.
#define CONFIG_U1RTS_TO_RP | ( | Rxy_RP | ) | _CONFIG_U1RTS_TO_RP(Rxy_RP) |
Maps U1RTS to a remappable pin; see remappable peripheral output support for more information.
Definition at line 451 of file pic24_ports.h.
#define CONFIG_U1RX_TO_RP | ( | pin | ) | _U1RXR = pin |
Maps U1RX to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 287 of file pic24_ports.h.
Referenced by __esos_configUART1(), and configUART1().
#define CONFIG_U1TX_TO_RP | ( | Rxy_RP | ) | _CONFIG_U1TX_TO_RP(Rxy_RP) |
Maps U1TX to a remappable pin; see remappable peripheral output support for more information.
Definition at line 443 of file pic24_ports.h.
Referenced by __esos_configUART1(), and configUART1().
#define CONFIG_U2CTS_TO_RP | ( | pin | ) | _U2CTSR = pin |
Maps U2CTS to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 308 of file pic24_ports.h.
#define CONFIG_U2RTS_TO_RP | ( | Rxy_RP | ) | _CONFIG_U2RTS_TO_RP(Rxy_RP) |
Maps U2RTS to a remappable pin; see remappable peripheral output support for more information.
Definition at line 467 of file pic24_ports.h.
#define CONFIG_U2RX_TO_RP | ( | pin | ) | _U2RXR = pin |
Maps U2RX to a remappable pin; see remappable peripheral input support for more informatino.
Definition at line 301 of file pic24_ports.h.
#define CONFIG_U2TX_TO_RP | ( | Rxy_RP | ) | _CONFIG_U2TX_TO_RP(Rxy_RP) |
Maps U2TX to a remappable pin; see remappable peripheral output support for more information.
Definition at line 459 of file pic24_ports.h.