2 * Copyright © 2010 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 #if defined(TELEMETRUM_V_1_0)
26 #define HAS_SERIAL_1 1
32 #define IGNITE_ON_P2 1
33 #define IGNITE_ON_P0 0
34 #define PACKET_HAS_MASTER 0
35 #define PACKET_HAS_SLAVE 1
38 #define LEDS_AVAILABLE (AO_LED_RED)
39 #define HAS_EXTERNAL_TEMP 0
40 #define HAS_ACCEL_REF 0
44 #if defined(TELEMETRUM_V_1_1)
49 #define HAS_SERIAL_1 1
55 #define IGNITE_ON_P2 1
56 #define IGNITE_ON_P0 0
57 #define PACKET_HAS_MASTER 0
58 #define PACKET_HAS_SLAVE 1
61 #define LEDS_AVAILABLE (AO_LED_RED)
62 #define HAS_EXTERNAL_TEMP 0
63 #define HAS_ACCEL_REF 1
64 #define SPI_CS_ON_P1 1
65 #define SPI_CS_ON_P0 0
66 #define M25_CS_MASK 0x02 /* CS0 is P1_1 */
67 #define M25_MAX_CHIPS 1
71 #if defined(TELEDONGLE_V_0_2)
75 #define HAS_SERIAL_1 0
81 #define IGNITE_ON_P2 0
82 #define IGNITE_ON_P0 0
83 #define PACKET_HAS_MASTER 1
84 #define PACKET_HAS_SLAVE 0
86 #define AO_LED_GREEN 2
87 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
88 #define SPI_CS_ON_P1 1
89 #define SPI_CS_ON_P0 0
92 #if defined(TELEMINI_V_0_1)
97 #define HAS_SERIAL_1 0
101 #define IGNITE_ON_P2 0
102 #define IGNITE_ON_P0 1
103 #define PACKET_HAS_MASTER 0
104 #define PACKET_HAS_SLAVE 1
106 #define AO_LED_GREEN 1
108 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
109 #define HAS_EXTERNAL_TEMP 0
113 #if defined(TELEMETRUM_V_0_1)
118 #define HAS_SERIAL_1 1
124 #define IGNITE_ON_P2 1
125 #define IGNITE_ON_P0 0
126 #define PACKET_HAS_MASTER 0
127 #define PACKET_HAS_SLAVE 1
129 #define AO_LED_GREEN 1
130 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
131 #define HAS_EXTERNAL_TEMP 1
132 #define HAS_ACCEL_REF 0
133 #define SPI_CS_ON_P1 1
134 #define SPI_CS_ON_P0 0
138 #if defined(TELEDONGLE_V_0_1)
142 #define HAS_SERIAL_1 0
148 #define IGNITE_ON_P2 0
149 #define IGNITE_ON_P0 0
150 #define PACKET_HAS_MASTER 1
151 #define PACKET_HAS_SLAVE 0
153 #define AO_LED_GREEN 1
154 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
155 #define SPI_CS_ON_P1 0
156 #define SPI_CS_ON_P0 1
159 #if defined(TIDONGLE)
163 #define HAS_SERIAL_1 0
169 #define IGNITE_ON_P2 0
170 #define IGNITE_ON_P0 0
171 #define PACKET_HAS_MASTER 1
172 #define PACKET_HAS_SLAVE 0
174 #define LEDS_AVAILABLE (AO_LED_RED)
175 #define SPI_CS_ON_P1 0
176 #define SPI_CS_ON_P0 1
181 #define DBG_CLOCK (1 << 4) /* mi0 */
182 #define DBG_DATA (1 << 5) /* mo0 */
183 #define DBG_RESET_N (1 << 3) /* c0 */
185 #define DBG_CLOCK_PIN (P1_4)
186 #define DBG_DATA_PIN (P1_5)
187 #define DBG_RESET_N_PIN (P1_3)
189 #define DBG_PORT_NUM 1
191 #define DBG_PORT_SEL P1SEL
192 #define DBG_PORT_INP P1INP
193 #define DBG_PORT_DIR P1DIR
195 #endif /* DBG_ON_P1 */
199 #define DBG_CLOCK (1 << 3)
200 #define DBG_DATA (1 << 4)
201 #define DBG_RESET_N (1 << 5)
203 #define DBG_CLOCK_PIN (P0_3)
204 #define DBG_DATA_PIN (P0_4)
205 #define DBG_RESET_N_PIN (P0_5)
207 #define DBG_PORT_NUM 0
209 #define DBG_PORT_SEL P0SEL
210 #define DBG_PORT_INP P0INP
211 #define DBG_PORT_DIR P0DIR
213 #endif /* DBG_ON_P0 */
216 #define SPI_CS_PORT P1
217 #define SPI_CS_SEL P1SEL
218 #define SPI_CS_DIR P1DIR
222 #define SPI_CS_PORT P0
223 #define SPI_CS_SEL P0SEL
224 #define SPI_CS_DIR P0DIR
228 #error Please define IGNITE_ON_P2
232 #error Please define IGNITE_ON_P0
236 #error Please define HAS_SERIAL_1
240 #error Please define HAS_ADC
244 #error Please define HAS_EEPROM
248 #error Please define HAS_DBG
251 #ifndef PACKET_HAS_MASTER
252 #error Please define PACKET_HAS_MASTER
255 #ifndef PACKET_HAS_SLAVE
256 #error Please define PACKET_HAS_SLAVE
259 #endif /* _AO_PINS_H_ */