PIC24 Support Libraries
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pic24_ports.h
Go to the documentation of this file.
1 /*
2  * "Copyright (c) 2008 Robert B. Reese, Bryan A. Jones, J. W. Bruce ("AUTHORS")"
3  * All rights reserved.
4  * (R. Reese, reese_AT_ece.msstate.edu, Mississippi State University)
5  * (B. A. Jones, bjones_AT_ece.msstate.edu, Mississippi State University)
6  * (J. W. Bruce, jwbruce_AT_ece.msstate.edu, Mississippi State University)
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation for any purpose, without fee, and without written agreement is
10  * hereby granted, provided that the above copyright notice, the following
11  * two paragraphs and the authors appear in all copies of this software.
12  *
13  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
14  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
15  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
16  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17  *
18  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
19  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
22  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
23  *
24  * Please maintain this header in its entirety when copying/modifying
25  * these files.
26  *
27  *
28  */
29 
30 
31 #pragma once
32 
33 // Documentation for this file. If the \file tag isn't present,
34 // this file won't be documented.
35 /** \file
36  * This file defines a series of macros which provide GPIO and related configuration for
37  * each pin of a given PIC24/dsPIC33. Configuration is first defined at a low level,
38  * by providing the following:
39  *
40  * * Analog/digital configuration: ENABLE/DISABLE_Rxy_ANALOG(). The DISABLE version
41  * will always exist; the ENABLE version exists only if the given pin has analog
42  * capability.
43  * * Input/output configuration: CONFIG_Rxy_AS_INPUT/OUTPUT(). This exists for every pin.
44  * * Open collector/normal (totem-pole) output driver configuration:
45  * ENABLE/DISABLE_Rxy_OPENDRAIN(). The DISABLE version
46  * will always exist; the ENABLE version exists only if the given pin has open-drain
47  * capability.
48  * * Pullup/pulldown configuration: ENABLE/DISABLE_Rxy_PULLUP/DOWN(). The DISABLE version
49  * will always exist; the ENABLE version exists only if the given pin has pullup/pulldown
50  * capability.
51  *
52  * Related low-level configuration:
53  * * Change notification interrupts: ENABLE/DISABLE_Rxy_CN_INTERRUPT(). The DISABLE version
54  * will always exist; the ENABLE version exists only if the given pin has change notification
55  * capability.
56  * * Remappable pin to Rxy translation: the Rxy_RP macro identifies the RPy value for
57  * the given Rxy port. Typical usage with the remappable macros: CONFIG_INT1_TO(RB4_RP);
58  * * Analog port to Rxy translation: The Rxy_AN macro identifies the ANn value for
59  * the given Rxy port. Typical usage: configADC1_ManualCH0(RB4_AN, 31, 0).
60  * * Change notification pin to Rxy translation: The Rxy_CN macro identifies the CNm value for
61  * the given Rxy port. Rather than directly using this value, the ENABLE/DISABLE_Rxy_PULLUP/DOWN()
62  * and ENABLE/DISABLE_Rxy_CN_INTERRUPT() are typically used.
63  *
64  * Combining these produces higher-level configuration:
65  * * CONFIG_Rxy_AS_ANALOG(): disables pullups/pulldowns, makes pin an input, and
66  * of course enables analog.
67  * * CONFIG_Rxy_AS_DIG_INPUT/OUTPUT(): disables analog, pullups/pulldowns, and
68  * open-drain.
69  *
70  * Implementation notes
71  * --------------------
72  * \todo Explain double macros
73  */
74 
75 
76 // Port configuration
77 // ==================
78 // Port configuration macros
79 // -------------------------
80 // The macros below are used by the following include files to define GPIO macros.
81 //
82 // Analog
83 // ^^^^^^
84 // Return the PCFG pin for the given Rxy_AN value.
85 #define RXY_GPIO_PCFG(Rxy_AN) _RXY_GPIO_PCFG(Rxy_AN)
86 #define _RXY_GPIO_PCFG(Rxy_AN) (_PCFG ## Rxy_AN)
87 
88 // Change notification / pullups and pulldowns
89 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90 // Return the _CNmPUE pin for the given Rxy_CN value.
91 #define RXY_GPIO_CNPUE(Rxy_CN) _RXY_GPIO_CNPUE(Rxy_CN)
92 #define _RXY_GPIO_CNPUE(Rxy_CN) (_CN ## Rxy_CN ## PUE)
93 // Return the _CNmIE pin for the given Rxy_CN value.
94 #define RXY_GPIO_CNIE(Rxy_CN) _RXY_GPIO_CNIE(Rxy_CN)
95 #define _RXY_GPIO_CNIE(Rxy_CN) (_CN ## Rxy_CN ## IE)
96 
97 // Return true if the given Rxy_CN pin has pulldown capabilities.
98 #define RXY_HAS_CNPDE(Rxy_CN) _RXY_HAS_CNPDE(Rxy_CN)
99 #define _RXY_HAS_CNPDE(Rxy_CN) defined(_CN ## Rxy_CN ## PDE)
100 // Return the _CNmPDE pin for the given Rxy_GPIO value.
101 #define RXY_GPIO_CNPDE(Rxy_CN) _RXY_GPIO_CNPDE(Rxy_CN)
102 #define _RXY_GPIO_CNPDE(Rxy_CN) (_CN ## Rxy_CN ## PDE)
103 
104 // Include the table data used to drive GPIO config.
105 #include "pic24_ports_mapping.h"
106 
107 // Using the above macros, transform the table data into GPIO config.
108 #include "pic24_ports_config.h"
109 
110 
111 
112 /** \name Remappable peripheral input support
113  * <a name="remappableInputs">These</a> funcions map an input internal
114  * to the PIC to an input pin.
115  * For example, CONFIG_INT1_TO_RP(10) maps the INT1 edge-triggered
116  * interrupt to port P, pin 10.
117  */
118 //@{
119 
120 #if defined(_INT1R) || defined(__DOXYGEN__)
121 /// Maps INT1 to a remappable pin;
122 /// see <a href="#remappableInputs">remappable peripheral input support</a>
123 /// for more information.
124 # define CONFIG_INT1_TO_RP(pin) _INT1R = pin
125 #endif
126 
127 /// Maps INT2 to a remappable pin;
128 /// see <a href="#remappableInputs">remappable peripheral input support</a>
129 /// for more informatino.
130 #if defined(_INT2R) || defined(__DOXYGEN__)
131 # define CONFIG_INT2_TO_RP(pin) _INT2R = pin
132 #endif
133 
134 /// Maps INT3 to a remappable pin;
135 /// see <a href="#remappableInputs">remappable peripheral input support</a>
136 /// for more informatino.
137 #if defined(_INT3R) || defined(__DOXYGEN__)
138 # define CONFIG_INT3_TO_RP(pin) _INT3R = pin
139 #endif
140 
141 /// Maps INT4 to a remappable pin;
142 /// see <a href="#remappableInputs">remappable peripheral input support</a>
143 /// for more informatino.
144 #if defined(_INT4R) || defined(__DOXYGEN__)
145 #define CONFIG_INT4_TO_RP(pin) _INT4R = pin
146 #endif
147 
148 /// Maps T1CK to a remappable pin;
149 /// see <a href="#remappableInputs">remappable peripheral input support</a>
150 /// for more informatino.
151 #if defined(_T1CKR) || defined(__DOXYGEN__)
152 #define CONFIG_T1CK_TO_RP(pin) _T1CKR = pin
153 #endif
154 
155 /// Maps T2CK to a remappable pin;
156 /// see <a href="#remappableInputs">remappable peripheral input support</a>
157 /// for more informatino.
158 #if defined(_T2CKR) || defined(__DOXYGEN__)
159 #define CONFIG_T2CK_TO_RP(pin) _T2CKR = pin
160 #endif
161 
162 /// Maps T3CK to a remappable pin;
163 /// see <a href="#remappableInputs">remappable peripheral input support</a>
164 /// for more informatino.
165 #if defined(_T3CKR) || defined(__DOXYGEN__)
166 #define CONFIG_T3CK_TO_RP(pin) _T3CKR = pin
167 #endif
168 
169 /// Maps T4CK to a remappable pin;
170 /// see <a href="#remappableInputs">remappable peripheral input support</a>
171 /// for more informatino.
172 #if defined(_T4CKR) || defined(__DOXYGEN__)
173 #define CONFIG_T4CK_TO_RP(pin) _T4CKR = pin
174 #endif
175 
176 /// Maps T5CK to a remappable pin;
177 /// see <a href="#remappableInputs">remappable peripheral input support</a>
178 /// for more informatino.
179 #if defined(_T5CKR) || defined(__DOXYGEN__)
180 #define CONFIG_T5CK_TO_RP(pin) _T5CKR = pin
181 #endif
182 
183 /// Maps T6CK to a remappable pin;
184 /// see <a href="#remappableInputs">remappable peripheral input support</a>
185 /// for more informatino.
186 #if defined(_T6CKR) || defined(__DOXYGEN__)
187 #define CONFIG_T6CK_TO_RP(pin) _T6CKR = pin
188 #endif
189 
190 /// Maps T7CK to a remappable pin;
191 /// see <a href="#remappableInputs">remappable peripheral input support</a>
192 /// for more informatino.
193 #if defined(_T7CKR) || defined(__DOXYGEN__)
194 #define CONFIG_T7CK_TO_RP(pin) _T7CKR = pin
195 #endif
196 
197 /// Maps T8CK to a remappable pin;
198 /// see <a href="#remappableInputs">remappable peripheral input support</a>
199 /// for more informatino.
200 #if defined(_T8CKR) || defined(__DOXYGEN__)
201 #define CONFIG_T8CK_TO_RP(pin) _T8CKR = pin
202 #endif
203 
204 /// Maps T9CK to a remappable pin;
205 /// see <a href="#remappableInputs">remappable peripheral input support</a>
206 /// for more informatino.
207 #if defined(_T9CKR) || defined(__DOXYGEN__)
208 #define CONFIG_T9CK_TO_RP(pin) _T9CKR = pin
209 #endif
210 
211 /// Maps IC1 to a remappable pin;
212 /// see <a href="#remappableInputs">remappable peripheral input support</a>
213 /// for more informatino.
214 #if defined(_IC1R) || defined(__DOXYGEN__)
215 #define CONFIG_IC1_TO_RP(pin) _IC1R = pin
216 #endif
217 
218 /// Maps IC2 to a remappable pin;
219 /// see <a href="#remappableInputs">remappable peripheral input support</a>
220 /// for more informatino.
221 #if defined(_IC2R) || defined(__DOXYGEN__)
222 #define CONFIG_IC2_TO_RP(pin) _IC2R = pin
223 #endif
224 
225 /// Maps IC3 to a remappable pin;
226 /// see <a href="#remappableInputs">remappable peripheral input support</a>
227 /// for more informatino.
228 #if defined(_IC3R) || defined(__DOXYGEN__)
229 #define CONFIG_IC3_TO_RP(pin) _IC3R = pin
230 #endif
231 
232 /// Maps IC4 to a remappable pin;
233 /// see <a href="#remappableInputs">remappable peripheral input support</a>
234 /// for more informatino.
235 #if defined(_IC4R) || defined(__DOXYGEN__)
236 #define CONFIG_IC4_TO_RP(pin) _IC4R = pin
237 #endif
238 
239 /// Maps IC5 to a remappable pin;
240 /// see <a href="#remappableInputs">remappable peripheral input support</a>
241 /// for more informatino.
242 #if defined(_IC5R) || defined(__DOXYGEN__)
243 #define CONFIG_IC5_TO_RP(pin) _IC5R = pin
244 #endif
245 
246 /// Maps IC6 to a remappable pin;
247 /// see <a href="#remappableInputs">remappable peripheral input support</a>
248 /// for more informatino.
249 #if defined(_IC6R) || defined(__DOXYGEN__)
250 #define CONFIG_IC6_TO_RP(pin) _IC6R = pin
251 #endif
252 
253 /// Maps IC7 to a remappable pin;
254 /// see <a href="#remappableInputs">remappable peripheral input support</a>
255 /// for more informatino.
256 #if defined(_IC7R) || defined(__DOXYGEN__)
257 #define CONFIG_IC7_TO_RP(pin) _IC7R = pin
258 #endif
259 
260 /// Maps IC8 to a remappable pin;
261 /// see <a href="#remappableInputs">remappable peripheral input support</a>
262 /// for more informatino.
263 #if defined(_IC8R) || defined(__DOXYGEN__)
264 #define CONFIG_IC8_TO_RP(pin) _IC8R = pin
265 #endif
266 
267 /// Maps OCFA to a remappable pin;
268 /// see <a href="#remappableInputs">remappable peripheral input support</a>
269 /// for more informatino.
270 #if defined(_OCFAR) || defined(__DOXYGEN__)
271 #define CONFIG_OCFA_TO_RP(pin) _OCFAR = pin
272 #endif
273 
274 /// Maps OCFB to a remappable pin;
275 /// see <a href="#remappableInputs">remappable peripheral input support</a>
276 /// for more informatino.
277 #if defined(_OCFBR) || defined(__DOXYGEN__)
278 #define CONFIG_OCFB_TO_RP(pin) _OCFBR = pin
279 #endif
280 
281 /// \todo More mapping for dsPIC33E missing here, starting with FLT1.
282 
283 /// Maps U1RX to a remappable pin;
284 /// see <a href="#remappableInputs">remappable peripheral input support</a>
285 /// for more informatino.
286 #if defined(_U1RXR) || defined(__DOXYGEN__)
287 #define CONFIG_U1RX_TO_RP(pin) _U1RXR = pin
288 #endif
289 
290 /// Maps U1CTS to a remappable pin;
291 /// see <a href="#remappableInputs">remappable peripheral input support</a>
292 /// for more informatino.
293 #if defined(_U1CTSR) || defined(__DOXYGEN__)
294 #define CONFIG_U1CTS_TO_RP(pin) _U1CTSR = pin
295 #endif
296 
297 /// Maps U2RX to a remappable pin;
298 /// see <a href="#remappableInputs">remappable peripheral input support</a>
299 /// for more informatino.
300 #if defined(_U2RXR) || defined(__DOXYGEN__)
301 #define CONFIG_U2RX_TO_RP(pin) _U2RXR = pin
302 #endif
303 
304 /// Maps U2CTS to a remappable pin;
305 /// see <a href="#remappableInputs">remappable peripheral input support</a>
306 /// for more informatino.
307 #if defined(_U2CTSR) || defined(__DOXYGEN__)
308 #define CONFIG_U2CTS_TO_RP(pin) _U2CTSR = pin
309 #endif
310 
311 /// Maps SDI1 to a remappable pin;
312 /// see <a href="#remappableInputs">remappable peripheral input support</a>
313 /// for more informatino.
314 #if defined(_SDI1R) || defined(__DOXYGEN__)
315 #define CONFIG_SDI1_TO_RP(pin) _SDI1R = pin
316 #endif
317 
318 /// Maps SCK1 to a remappable pin;
319 /// see <a href="#remappableInputs">remappable peripheral input support</a>
320 /// for more informatino.
321 #if defined(_SCK1R) || defined(__DOXYGEN__)
322 #define CONFIG_SCK1IN_TO_RP(pin) _SCK1R = pin
323 #endif
324 
325 /// Maps SS1 to a remappable pin;
326 /// see <a href="#remappableInputs">remappable peripheral input support</a>
327 /// for more informatino.
328 #if defined(_SS1R) || defined(__DOXYGEN__)
329 #define CONFIG_SS1IN_TO_RP(pin) _SS1R = pin
330 #endif
331 
332 /// Maps SDI2 to a remappable pin;
333 /// see <a href="#remappableInputs">remappable peripheral input support</a>
334 /// for more informatino.
335 #if defined(_SDI2R) || defined(__DOXYGEN__)
336 #define CONFIG_SDI2_TO_RP(pin) _SDI2R = pin
337 #endif
338 
339 /// Maps SCK2 to a remappable pin;
340 /// see <a href="#remappableInputs">remappable peripheral input support</a>
341 /// for more informatino.
342 #if defined(_SCK2R) || defined(__DOXYGEN__)
343 #define CONFIG_SCK2IN_TO_RP(pin) _SCK2R = pin
344 #endif
345 
346 /// Maps SS2 to a remappable pin;
347 /// see <a href="#remappableInputs">remappable peripheral input support</a>
348 /// for more informatino.
349 #if defined(_SS2R) || defined(__DOXYGEN__)
350 #define CONFIG_SS2IN_TO_RP(pin) _SS2R = pin
351 #endif
352 
353 /// Maps CSDI to a remappable pin;
354 /// see <a href="#remappableInputs">remappable peripheral input support</a>
355 /// for more informatino.
356 #if defined(_CSDIR) || defined(__DOXYGEN__)
357 #define CONFIG_CDSI_TO_RP(pin) _CSDIR = pin
358 #endif
359 
360 /// Maps CSCKIN to a remappable pin;
361 /// see <a href="#remappableInputs">remappable peripheral input support</a>
362 /// for more informatino.
363 #if defined(_CSCKINR) || defined(__DOXYGEN__)
364 #define CONFIG_CSCKIN_TO_RP(pin) _CSCKINR = pin
365 #endif
366 
367 /// Maps COFSIN to a remappable pin;
368 /// see <a href="#remappableInputs">remappable peripheral input support</a>
369 /// for more informatino.
370 #if defined(_COFSINR) || defined(__DOXYGEN__)
371 #define CONFIG_COFSIN_TO_RP(pin) _COFSINR = pin
372 #endif
373 
374 /// Maps C1RX to a remappable pin;
375 /// see <a href="#remappableInputs">remappable peripheral input support</a>
376 /// for more informatino.
377 #if defined(_C1RXR) || defined(__DOXYGEN__)
378 #define CONFIG_C1RX_TO_RP(pin) _C1RXR = pin
379 #endif
380 
381 /// Maps C2RX to a remappable pin;
382 /// see <a href="#remappableInputs">remappable peripheral input support</a>
383 /// for more informatino.
384 #if defined(_C2RXR) || defined(__DOXYGEN__)
385 #define CONFIG_C2RX_TO_RP(pin) _C2RXR = pin
386 #endif
387 
388 /// \todo More mappings, starting with U3RX for the dsPIC33E.
389 //@}
390 
391 
392 /** \name Remappable peripheral output support
393  * <a name="remappableOutputs">These</a> functions maps an output
394  * internal to the PIC to an output pin.
395  * For example, CONFIG_C1OUT_TO_RP(10) maps the C1OUT comparator
396  * output to port P, pin 10.
397  *
398  * Not all devices support remappable peripherals. In these cases,
399  * the macros below evalaute to nothing: CONFIG_C1OUT_TO_RP(10) is
400  * a valid C statement which does nothing.
401  */
402 //@{
403 
404 /// Define peripheral pins.
405 /// This is defined in pps.h or PPS.h as e.g. OUT_FN_PPS_U1TX, but that file doesn't exist for the 24H, 33F, 24E, or 33E.
406 #if defined(__PIC24E__) || defined(__dsPIC33E__)
407 # define RPMAP_NONE 0
408 # define RPMAP_U1TX 1
409 # define RPMAP_U1RTS 2
410 # define RPMAP_U2TX 3
411 # define RPMAP_U2RTS 4
412 # define RPMAP_SD01 5
413 # define RPMAP_SCK1OUT 6
414 # define RPMAP_SS1OUT 7
415 # define RPMAP_SDO2 8
416 # define RPMAP_SCK2OUT 9
417 # define RPMAP_SS2OUT 10
418 # define RPMAP_CSDO 11
419 # define RPMAP_CSCKOUT 12
420 # define RPMAP_COFSOUT 13
421 # define RPMAP_C1TX 14
422 # define RPMAP_C2TX 15
423 # define RPMAP_OC1 16
424 # define RPMAP_OC2 17
425 # define RPMAP_OC3 18
426 # define RPMAP_OC4 19
427 # define RPMAP_OC5 20
428 # define RPMAP_OC6 21
429 # define RPMAP_OC7 22
430 # define RPMAP_OC8 23
431 # define RPMAP_C1OUT 24
432 # define RPMAP_C2OUT 25
433 # define RPMAP_C3OUT 26
434 /// \todo More mappings for the dsPIC33E.
435 # define RPMAP_SYNCO1 45
436 # define RPMAP_QE1CCMP 47
437 # define RPMAP_REFCLKO 49
438 # define RPMAP_C4OUT 50
439 
440 #else
441 
442 # define RPMAP_NONE 0
443 # define RPMAP_C1OUT 1
444 # define RPMAP_C2OUT 2
445 # define RPMAP_U1TX 3
446 # define RPMAP_U1RTS 4
447 # define RPMAP_U2TX 5
448 # define RPMAP_U2RTS 6
449 # define RPMAP_SD01 7
450 # define RPMAP_SCK1OUT 8
451 # define RPMAP_SS1OUT 9
452 # define RPMAP_SDO2 10
453 # define RPMAP_SCK2OUT 11
454 # define RPMAP_SS2OUT 12
455 # define RPMAP_C1TX 16
456 # define RPMAP_OC1 18
457 # define RPMAP_OC2 19
458 # define RPMAP_OC3 20
459 # define RPMAP_OC4 21
460 # define RPMAP_OC5 22
461 
462 #endif
463 
464 /*****************************************************************************
465 ***
466 *** Look for a way so that the compiler can determine whether or not the
467 *** target chip supports remappable perihperals. So, we will look for
468 *** a bit field in the lowest possible RPORx registers. Unfortunately,
469 *** Microchip has redefined these over the families and even within families.
470 ***
471 *** xxxxxx devices start with _RP0R
472 *** dsPIC33E 50x devices start with _RP20R
473 *** dsPIC33E 80x devices start with _RP64R
474 ***
475 *****************************************************************************/
476 #if defined(_RP0R) || defined(_RP20R) || defined(_RP64R) || defined(__DOXYGEN__)
477 
478 /// CONFIG_NULL_TO_RP(n) returns RPn to an 'unmapped' state
479 /// (i.e, the reset condition).
480 # define CONFIG_NULL_TO_RP(Rxy_RP) _CONFIG_NULL_TO_RP(Rxy_RP)
481 # define _CONFIG_NULL_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_NONE)
482 
483 /// Maps C1OUT to a remappable pin;
484 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
485 /// for more information.
486 # define CONFIG_C1OUT_TO_RP(Rxy_RP) _CONFIG_C1OUT_TO_RP(Rxy_RP)
487 # define _CONFIG_C1OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_C1OUT)
488 
489 /// Maps C2OUT to a remappable pin;
490 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
491 /// for more information.
492 # define CONFIG_C2OUT_TO_RP(Rxy_RP) _CONFIG_C2OUT_TO_RP(Rxy_RP)
493 # define _CONFIG_C2OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_C2OUT)
494 
495 /// Maps U1TX to a remappable pin;
496 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
497 /// for more information.
498 # define CONFIG_U1TX_TO_RP(Rxy_RP) _CONFIG_U1TX_TO_RP(Rxy_RP)
499 # define _CONFIG_U1TX_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_U1TX)
500 
501 /// Maps U1RTS to a remappable pin;
502 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
503 /// for more information.
504 # define CONFIG_U1RTS_TO_RP(Rxy_RP) _CONFIG_U1RTS_TO_RP(Rxy_RP)
505 # define _CONFIG_U1RTS_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_U1RTS)
506 
507 /// Maps U2TX to a remappable pin;
508 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
509 /// for more information.
510 # define CONFIG_U2TX_TO_RP(Rxy_RP) _CONFIG_U2TX_TO_RP(Rxy_RP)
511 # define _CONFIG_U2TX_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_U2TX)
512 
513 /// Maps U2RTS to a remappable pin;
514 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
515 /// for more information.
516 # define CONFIG_U2RTS_TO_RP(Rxy_RP) _CONFIG_U2RTS_TO_RP(Rxy_RP)
517 # define _CONFIG_U2RTS_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_U2RTS)
518 
519 /// Maps SDO1 to a remappable pin;
520 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
521 /// for more information.
522 # define CONFIG_SDO1_TO_RP(Rxy_RP) _CONFIG_SDO1_TO_RP(Rxy_RP)
523 # define _CONFIG_SDO1_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_SD01)
524 
525 /// Maps SCK1OUT to a remappable pin;
526 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
527 /// for more information.
528 # define CONFIG_SCK1OUT_TO_RP(Rxy_RP) _CONFIG_SCK1OUT_TO_RP(Rxy_RP)
529 # define _CONFIG_SCK1OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_SCK1OUT)
530 
531 /// Maps SS11OUT to a remappable pin;
532 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
533 /// for more information.
534 # define CONFIG_SS1OUT_TO_RP(Rxy_RP) _CONFIG_SS1OUT_TO_RP(Rxy_RP)
535 # define _CONFIG_SS1OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_SS1OUT)
536 
537 /// Maps SDO2 to a remappable pin;
538 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
539 /// for more information.
540 # define CONFIG_SDO2_TO_RP(Rxy_RP) _CONFIG_SDO2_TO_RP(Rxy_RP)
541 # define _CONFIG_SDO2_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_SDO2)
542 
543 /// Maps SCK2OUT to a remappable pin;
544 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
545 /// for more information.
546 # define CONFIG_SCK2OUT_TO_RP(Rxy_RP) _CONFIG_SCK2OUT_TO_RP(Rxy_RP)
547 # define _CONFIG_SCK2OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_SCK2OUT)
548 
549 /// Maps SS2OUT to a remappable pin;
550 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
551 /// for more information.
552 # define CONFIG_SS2OUT_TO_RP(Rxy_RP) _CONFIG_SS2OUT_TO_RP(Rxy_RP)
553 # define _CONFIG_SS2OUT_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_SS2OUT)
554 
555 /// Maps C1TX to a remappable pin;
556 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
557 /// for more information.
558 # define CONFIG_C1TX_TO_RP(Rxy_RP) _CONFIG_C1TX_TO_RP(Rxy_RP)
559 # define _CONFIG_C1TX_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_C1TX)
560 
561 /// Maps OC1 to a remappable pin;
562 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
563 /// for more information.
564 # define CONFIG_OC1_TO_RP(Rxy_RP) _CONFIG_OC1_TO_RP(Rxy_RP)
565 # define _CONFIG_OC1_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_OC1)
566 
567 /// Maps OC2 to a remappable pin;
568 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
569 /// for more information.
570 # define CONFIG_OC2_TO_RP(Rxy_RP) _CONFIG_OC2_TO_RP(Rxy_RP)
571 # define _CONFIG_OC2_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_OC2)
572 
573 /// Maps OC3 to a remappable pin;
574 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
575 /// for more information.
576 # define CONFIG_OC3_TO_RP(Rxy_RP) _CONFIG_OC3_TO_RP(Rxy_RP)
577 # define _CONFIG_OC3_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_OC3)
578 
579 /// Maps OC4 to a remappable pin;
580 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
581 /// for more information.
582 # define CONFIG_OC4_TO_RP(Rxy_RP) _CONFIG_OC4_TO_RP(Rxy_RP)
583 # define _CONFIG_OC4_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_OC4)
584 
585 /// Maps OC5 to a remappable pin;
586 /// see <a href="#remappableOutputs">remappable peripheral output support</a>
587 /// for more information.
588 # define CONFIG_OC5_TO_RP(Rxy_RP) _CONFIG_OC5_TO_RP(Rxy_RP)
589 # define _CONFIG_OC5_TO_RP(Rxy_RP) (_RP##Rxy_RP##R = RPMAP_OC5)
590 #endif //END THE BIG LONG #ifdefined _RP0R || _RP20R || _RP64R) || __DOXYGEN__
591 //@}