1- /*
2- pins_arduino.h - Pin definition functions for Arduino
3- Part of Arduino - http://www.arduino.cc/
4-
5- Copyright (c) 2007 David A. Mellis
6-
7- This library is free software; you can redistribute it and/or
8- modify it under the terms of the GNU Lesser General Public
9- License as published by the Free Software Foundation; either
10- version 2.1 of the License, or (at your option) any later version.
11-
12- This library is distributed in the hope that it will be useful,
13- but WITHOUT ANY WARRANTY; without even the implied warranty of
14- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15- Lesser General Public License for more details.
16-
17- You should have received a copy of the GNU Lesser General
18- Public License along with this library; if not, write to the
19- Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20- Boston, MA 02111-1307 USA
21-
22- $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
23- */
24-
25- //****************** Special definitions for the Papilio Platform **************************
26- //Papilio Pin Swaps
27- #define PWM0_LOC *(byte *) 0x1000
28- #define PWM1A_LOC *(byte *) 0x1001
29- #define PWM1B_LOC *(byte *) 0x1002
30- #define PWM2_LOC *(byte *) 0x1003
31- #define SPI1_mosi_LOC *(byte *) 0x1004
32- #define SPI1_miso_LOC *(byte *) 0x1005
33- #define SPI1_sck_LOC *(byte *) 0x1006
34- #define SPI1_cs_LOC *(byte *) 0x1007
35-
36- //Papilio Stepper Core definitions
37- #define SM1_LOC *(byte *) 0x2000
38- #define SM1CONTROL_L *(byte *) 0x2001
39- #define SM1CONTROL_H *(byte *) 0x2002
40- #define SM1TIMEBASE_L *(byte *) 0x2003
41- #define SM1TIMEBASE_H *(byte *) 0x2004
42- #define SM1PERIOD_L *(byte *) 0x2005
43- #define SM1PERIOD_H *(byte *) 0x2006
44- #define SM1STEPCNT_L *(byte *) 0x2007
45- #define SM1STEPCNT_H *(byte *) 0x2008
46- #define SM1STEPS_L *(byte *) 0x2009
47- #define SM1STEPS_H *(byte *) 0x2010
48-
49- //Papilio Button/LED Core definitions
50- #define BL1_LOC *(byte *) 0x3000
51- #define BL1CONTROL_L *(byte *) 0x3001
52- #define BL1CONTROL_H *(byte *) 0x3002
53-
54- //Papilio Wing Slots
55- #define NO_SLOT 0
56- #define AL 1
57- #define AH 2
58- #define BL 3
59- #define BH 4
60- #define CL 5
61- #define CH 6
62-
63-
64- //Papilio One Pin definitions
65- //Wing 1 Column A
66- #define A0 0
67- #define A1 1
68- #define A2 2
69- #define A3 3
70- #define A4 4
71- #define A5 5
72- #define A6 6
73- #define A7 7
74- #define A8 8
75- #define A9 9
76- #define A10 10
77- #define A11 11
78- #define A12 12
79- #define A13 13
80- #define A14 14
81- #define A15 15
82-
83- //Wing 1 Column B
84- #define B0 16 //This doesn't work for some reason!
85- #define B1 17
86- #define B2 18
87- #define B3 19
88- #define B4 20
89- #define B5 21
90- #define B6 22
91- #define B7 23
92- #define B8 24
93- #define B9 25
94- #define B10 26
95- #define B11 27
96- #define B12 28
97- #define B13 29
98- #define B14 30
99- #define B15 31
100-
101- //Wing 2 Column C
102- #define C0 32
103- #define C1 33
104- #define C2 34
105- #define C3 35
106- #define C4 36
107- #define C5 37
108- #define C6 38
109- #define C7 39
110- #define C8 40
111- #define C9 41
112- #define C10 42
113- #define C11 43
114- #define C12 44
115- #define C13 45
116- #define C14 46
117- #define C15 47
118-
119- // ******** Define AH/AL syntax
120- //Wing 1 Column A
121- #define AL0 0
122- #define AL1 1
123- #define AL2 2
124- #define AL3 3
125- #define AL4 4
126- #define AL5 5
127- #define AL6 6
128- #define AL7 7
129- #define AH0 8
130- #define AH1 9
131- #define AH2 10
132- #define AH3 11
133- #define AH4 12
134- #define AH5 13
135- #define AH6 14
136- #define AH7 15
137-
138- //Wing 1 Column B
139- #define BL0 16 //This doesn't work for some reason!
140- #define BL1 17
141- #define BL2 18
142- #define BL3 19
143- #define BL4 20
144- #define BL5 21
145- #define BL6 22
146- #define BL7 23
147- #define BH0 24
148- #define BH1 25
149- #define BH2 26
150- #define BH3 27
151- #define BH4 28
152- #define BH5 29
153- #define BH6 30
154- #define BH7 31
155-
156- //Wing 2 Column C
157- #define CL0 32
158- #define CL1 33
159- #define CL2 34
160- #define CL3 35
161- #define CL4 36
162- #define CL5 37
163- #define CL6 38
164- #define CL7 39
165- #define CH0 40
166- #define CH1 41
167- #define CH2 42
168- #define CH3 43
169- #define CH4 44
170- #define CH5 45
171- #define CH6 46
172- #define CH7 47
0 commit comments