2 * Joshua Henderson <joshua.henderson@microchip.com>
3 * Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 #ifndef _PIC32MZDA_EARLY_PIN_H
15 #define _PIC32MZDA_EARLY_PIN_H
18 * This is a complete, yet overly simplistic and unoptimized, PIC32MZDA PPS
19 * configuration only useful before we have full pinctrl initialized.
22 /* Input PPS Functions */
102 #define IN_RPD15 0x0B
104 #define IN_RPA15 0x0D
109 #define IN_RPB15 0x03
114 #define IN_RPF12 0x09
115 #define IN_RPD12 0x0A
121 #define IN_RPB14 0x02
127 #define IN_RPF13 0x09
132 /* Output PPS Pins */
189 /* Output PPS Functions */
190 #define OUT_FUNC_U3TX 0x01
191 #define OUT_FUNC_U4RTS 0x02
192 #define OUT_FUNC_SDO1 0x05
193 #define OUT_FUNC_SDO2 0x06
194 #define OUT_FUNC_SDO3 0x07
195 #define OUT_FUNC_SDO5 0x09
196 #define OUT_FUNC_SS6 0x0A
197 #define OUT_FUNC_OC3 0x0B
198 #define OUT_FUNC_OC6 0x0C
199 #define OUT_FUNC_REFCLKO4 0x0D
200 #define OUT_FUNC_C2OUT 0x0E
201 #define OUT_FUNC_C1TX 0x0F
202 #define OUT_FUNC_U1TX 0x01
203 #define OUT_FUNC_U2RTS 0x02
204 #define OUT_FUNC_U5TX 0x03
205 #define OUT_FUNC_U6RTS 0x04
206 #define OUT_FUNC_SDO1 0x05
207 #define OUT_FUNC_SDO2 0x06
208 #define OUT_FUNC_SDO3 0x07
209 #define OUT_FUNC_SDO4 0x08
210 #define OUT_FUNC_SDO5 0x09
211 #define OUT_FUNC_OC4 0x0B
212 #define OUT_FUNC_OC7 0x0C
213 #define OUT_FUNC_REFCLKO1 0x0F
214 #define OUT_FUNC_U3RTS 0x01
215 #define OUT_FUNC_U4TX 0x02
216 #define OUT_FUNC_U6TX 0x04
217 #define OUT_FUNC_SS1 0x05
218 #define OUT_FUNC_SS3 0x07
219 #define OUT_FUNC_SS4 0x08
220 #define OUT_FUNC_SS5 0x09
221 #define OUT_FUNC_SDO6 0x0A
222 #define OUT_FUNC_OC5 0x0B
223 #define OUT_FUNC_OC8 0x0C
224 #define OUT_FUNC_C1OUT 0x0E
225 #define OUT_FUNC_REFCLKO3 0x0F
226 #define OUT_FUNC_U1RTS 0x01
227 #define OUT_FUNC_U2TX 0x02
228 #define OUT_FUNC_U5RTS 0x03
229 #define OUT_FUNC_U6TX 0x04
230 #define OUT_FUNC_SS2 0x06
231 #define OUT_FUNC_SDO4 0x08
232 #define OUT_FUNC_SDO6 0x0A
233 #define OUT_FUNC_OC2 0x0B
234 #define OUT_FUNC_OC1 0x0C
235 #define OUT_FUNC_OC9 0x0D
236 #define OUT_FUNC_C2TX 0x0F
238 void pic32_pps_input(int function
, int pin
);
239 void pic32_pps_output(int function
, int pin
);