Line No. | Rev | Author | Line |
---|---|---|---|
1 | 32 | kaklik | /******************************************************************** |
2 | FileName: pps-macro.h |
||
3 | Dependencies: See INCLUDES section |
||
4 | Processor: PIC24 Microcontrollers |
||
5 | Hardware: This demo is natively intended to be used on Exp 16 board. |
||
6 | This demo can be modified for use on other hardware platforms. |
||
7 | Complier: Microchip C30 (for PIC24) |
||
8 | Company: Microchip Technology, Inc. |
||
9 | |||
10 | Software License Agreement: |
||
11 | |||
12 | The software supplied herewith by Microchip Technology Incorporated |
||
13 | (the Company) for its PIC® Microcontroller is intended and |
||
14 | supplied to you, the Companys customer, for use solely and |
||
15 | exclusively on Microchip PIC Microcontroller products. The |
||
16 | software is owned by the Company and/or its supplier, and is |
||
17 | protected under applicable copyright laws. All rights are reserved. |
||
18 | Any use in violation of the foregoing restrictions may subject the |
||
19 | user to criminal sanctions under applicable laws, as well as to |
||
20 | civil liability for the breach of the terms and conditions of this |
||
21 | license. |
||
22 | |||
23 | THIS SOFTWARE IS PROVIDED IN AN AS IS CONDITION. NO WARRANTIES, |
||
24 | WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED |
||
25 | TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
||
26 | PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, |
||
27 | IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR |
||
28 | CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
||
29 | |||
30 | ******************************************************************** |
||
31 | File Description: |
||
32 | |||
33 | Change History: |
||
34 | Rev Description |
||
35 | ---- ----------------------------------------- |
||
36 | 1.0 Initial release |
||
37 | 1.01 No Change |
||
38 | ********************************************************************/ |
||
39 | |||
40 | #define PPSOut(pin,func) (_##pin##R = func) |
||
41 | #define PPSIn(pin,func) (func = pin) |
||
42 | |||
43 | /* |
||
44 | * PPS Pin codes Definitions |
||
45 | * |
||
46 | */ |
||
47 | |||
48 | #define RP0 0 //RB0 |
||
49 | #define RP1 1 //RB1 |
||
50 | #define RP2 2 //RD8 |
||
51 | #define RP3 3 //RD10 |
||
52 | #define RP4 4 //RD9 |
||
53 | #define RP5 5 //RD15 |
||
54 | #define RP6 6 //RB6 |
||
55 | #define RP7 7 //RB7 |
||
56 | #define RP8 8 //RB8 |
||
57 | #define RP9 9 //RB9 |
||
58 | #define RP10 10 //RF4 |
||
59 | #define RP11 11 //RD0 |
||
60 | #define RP12 12 //RD11 |
||
61 | #define RP13 13 //RB2 |
||
62 | #define RP14 14 //RB14 |
||
63 | #define RP15 15 //RF8 |
||
64 | #define RP16 16 //RF3 |
||
65 | #define RP17 17 //RF5 |
||
66 | #define RP18 18 //RB5 |
||
67 | #define RP19 19 //RG8 |
||
68 | #define RP20 20 //RD5 |
||
69 | #define RP21 21 //RG6 |
||
70 | #define RP22 22 //RD3 |
||
71 | #define RP23 23 //RD2 |
||
72 | #define RP24 24 //RD1 |
||
73 | #define RP25 25 //RD4 |
||
74 | #define RP26 26 //RG7 |
||
75 | #define RP27 27 //RG9 |
||
76 | #define RP28 28 //RB4 |
||
77 | #define RP29 29 //RB15 |
||
78 | #define RP30 30 //RF2 |
||
79 | #define RP31 31 //RF13 |
||
80 | |||
81 | //The following pin codes 32..43 are for input functions only |
||
82 | |||
83 | #define RPI32 32 //RF12 |
||
84 | #define RPI33 33 //RE8 |
||
85 | #define RPI34 34 //RE9 |
||
86 | #define RPI35 35 //RA15 |
||
87 | #define RPI36 36 //RA14 |
||
88 | #define RPI37 37 |
||
89 | #define RPI38 38 //RC1 |
||
90 | #define RPI39 39 //RC2 |
||
91 | #define RPI40 40 //RC3 |
||
92 | #define RPI41 41 //RC4 |
||
93 | #define RPI42 42 //RD12 |
||
94 | #define RPI43 43 //RD14 |
||
95 | |||
96 | |||
97 | /* |
||
98 | * PPS Output Function Definitions |
||
99 | * |
||
100 | */ |
||
101 | |||
102 | #define C1OUT_FUNC 1 |
||
103 | #define C2OUT_FUNC 2 |
||
104 | #define U1TX_FUNC 3 |
||
105 | #define U1RTS_FUNC 4 |
||
106 | #define U2TX_FUNC 5 |
||
107 | #define U2RTS_FUNC 6 |
||
108 | #define SDO1_FUNC 7 |
||
109 | #define SCK1OUT_FUNC 8 |
||
110 | #define SS1OUT_FUNC 9 |
||
111 | #define SDO2_FUNC 10 |
||
112 | #define SCK2OUT_FUNC 11 |
||
113 | #define SS2OUT_FUNC 12 |
||
114 | #define OC1_FUNC 18 |
||
115 | #define OC2_FUNC 19 |
||
116 | #define OC3_FUNC 20 |
||
117 | #define OC4_FUNC 21 |
||
118 | #define OC5_FUNC 22 |
||
119 | #define OC6_FUNC 23 |
||
120 | #define OC7_FUNC 24 |
||
121 | #define OC8_FUNC 25 |
||
122 | #define OC9_FUNC 35 |
||
123 | #define U3TX_FUNC 28 |
||
124 | #define U3RTS_FUNC 29 |
||
125 | #define U4TX_FUNC 30 |
||
126 | #define U4RTS_FUNC 31 |
||
127 | #define SDO3_FUNC 32 |
||
128 | #define SCK3OUT_FUNC 33 |
||
129 | #define SS3OUT_FUNC 34 |
||
130 | |||
131 | |||
132 | /* |
||
133 | * PPS Input Function Definitions |
||
134 | * |
||
135 | */ |
||
136 | |||
137 | #define INT1_FUNC _INT1R |
||
138 | #define INT2_FUNC _INT2R |
||
139 | #define INT3_FUNC _INT3R |
||
140 | #define INT4_FUNC _INT4R |
||
141 | |||
142 | #define IC1_FUNC _IC1R |
||
143 | #define IC2_FUNC _IC2R |
||
144 | #define IC3_FUNC _IC3R |
||
145 | #define IC4_FUNC _IC4R |
||
146 | #define IC5_FUNC _IC5R |
||
147 | #define IC6_FUNC _IC6R |
||
148 | #define IC7_FUNC _IC7R |
||
149 | #define IC8_FUNC _IC8R |
||
150 | #define IC9_FUNC _IC9R |
||
151 | |||
152 | #define OCFA_FUNC _OCFAR |
||
153 | #define OCFB_FUNC _OCFBR |
||
154 | |||
155 | #define SCK1IN_FUNC _SCK1R |
||
156 | #define SDI1_FUNC _SDI1R |
||
157 | #define SS1IN_FUNC _SS1R |
||
158 | #define SCK2IN_FUNC _SCK2R |
||
159 | #define SDI2_FUNC _SDI2R |
||
160 | #define SS2IN_FUNC _SS2R |
||
161 | #define SCK3IN_FUNC _SCK3R |
||
162 | #define SDI3_FUNC _SDI3R |
||
163 | #define SS3IN_FUNC _SS3R |
||
164 | |||
165 | #define T1CK_FUNC _T1CKR |
||
166 | #define T2CK_FUNC _T2CKR |
||
167 | #define T3CK_FUNC _T3CKR |
||
168 | #define T4CK_FUNC _T4CKR |
||
169 | #define T5CK_FUNC _T5CKR |
||
170 | |||
171 | #define T1GATE_FUNC _T1CKR |
||
172 | #define T2GATE_FUNC _T2CKR |
||
173 | #define T3GATE_FUNC _T3CKR |
||
174 | #define T4GATE_FUNC _T4CKR |
||
175 | #define T5GATE_FUNC _T5CKR |
||
176 | |||
177 | #define U1CTS_FUNC _U1CTSR |
||
178 | #define U1RX_FUNC _U1RXR |
||
179 | #define U2CTS_FUNC _U2CTSR |
||
180 | #define U2RX_FUNC _U2RXR |
||
181 | #define U3CTS_FUNC _U3CTSR |
||
182 | #define U3RX_FUNC _U3RXR |
||
183 | #define U4CTS_FUNC _U4CTSR |
||
184 | #define U4RX_FUNC _U4RXR |
||
185 | |||
186 | |||
187 | |||
188 |
Powered by WebSVN v2.8.3