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
28 #define USE_SERIAL_STDIN 0
30 #define USE_INTERNAL_FLASH 0
34 #define IGNITE_ON_P2 1
35 #define IGNITE_ON_P0 0
36 #define PACKET_HAS_MASTER 0
37 #define PACKET_HAS_SLAVE 1
39 #define HAS_COMPANION 1
40 #define COMPANION_CS_ON_P1 1
41 #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
42 #define COMPANION_CS P1_2
45 #define LEDS_AVAILABLE (AO_LED_RED)
46 #define HAS_EXTERNAL_TEMP 0
47 #define HAS_ACCEL_REF 0
53 #if defined(TELEMETRUM_V_1_1)
58 #define HAS_SERIAL_1 1
59 #define USE_SERIAL_STDIN 0
62 #define USE_INTERNAL_FLASH 0
66 #define IGNITE_ON_P2 1
67 #define IGNITE_ON_P0 0
68 #define PACKET_HAS_MASTER 0
69 #define PACKET_HAS_SLAVE 1
71 #define HAS_COMPANION 1
72 #define COMPANION_CS_ON_P1 1
73 #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
74 #define COMPANION_CS P1_2
77 #define LEDS_AVAILABLE (AO_LED_RED)
78 #define HAS_EXTERNAL_TEMP 0
79 #define HAS_ACCEL_REF 1
80 #define SPI_CS_ON_P1 1
81 #define SPI_CS_ON_P0 0
82 #define M25_CS_MASK 0x02 /* CS0 is P1_1 */
83 #define M25_MAX_CHIPS 1
89 #if defined(TELEDONGLE_V_0_2)
93 #define HAS_SERIAL_1 0
94 #define USE_SERIAL_STDIN 0
100 #define IGNITE_ON_P2 0
101 #define IGNITE_ON_P0 0
102 #define PACKET_HAS_MASTER 1
103 #define PACKET_HAS_SLAVE 0
105 #define AO_LED_GREEN 2
106 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
107 #define SPI_CS_ON_P1 1
108 #define SPI_CS_ON_P0 0
110 #define HAS_MONITOR 1
114 #if defined(TELEMINI_V_1_0)
119 #define HAS_SERIAL_1 0
120 #define USE_SERIAL_STDIN 0
123 #define USE_INTERNAL_FLASH 1
125 #define IGNITE_ON_P2 0
126 #define IGNITE_ON_P0 1
127 #define PACKET_HAS_MASTER 0
128 #define PACKET_HAS_SLAVE 1
129 #define USE_FAST_ASCENT_LOG 1
131 #define AO_LED_GREEN 1
133 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
134 #define HAS_EXTERNAL_TEMP 0
137 #define HAS_MONITOR 0
140 #if defined(TELENANO_V_0_1)
145 #define HAS_SERIAL_1 0
146 #define USE_SERIAL_STDIN 0
149 #define USE_INTERNAL_FLASH 1
151 #define IGNITE_ON_P2 0
152 #define IGNITE_ON_P0 1
153 #define PACKET_HAS_MASTER 0
154 #define PACKET_HAS_SLAVE 1
156 #define AO_LED_GREEN 1
158 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
159 #define HAS_EXTERNAL_TEMP 0
162 #define HAS_MONITOR 0
165 #if defined(TELEMETRUM_V_0_1)
170 #define HAS_SERIAL_1 1
171 #define USE_SERIAL_STDIN 0
175 #define USE_INTERNAL_FLASH 0
178 #define IGNITE_ON_P2 1
179 #define IGNITE_ON_P0 0
180 #define PACKET_HAS_MASTER 0
181 #define PACKET_HAS_SLAVE 1
183 #define AO_LED_GREEN 1
184 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
185 #define HAS_EXTERNAL_TEMP 1
186 #define HAS_ACCEL_REF 0
187 #define SPI_CS_ON_P1 1
188 #define SPI_CS_ON_P0 0
191 #define HAS_MONITOR 0
194 #if defined(TELEDONGLE_V_0_1)
198 #define HAS_SERIAL_1 0
199 #define USE_SERIAL_STDIN 0
205 #define IGNITE_ON_P2 0
206 #define IGNITE_ON_P0 0
207 #define PACKET_HAS_MASTER 1
208 #define PACKET_HAS_SLAVE 0
210 #define AO_LED_GREEN 1
211 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
212 #define SPI_CS_ON_P1 0
213 #define SPI_CS_ON_P0 1
215 #define HAS_MONITOR 1
219 #if defined(TIDONGLE)
223 #define HAS_SERIAL_1 0
224 #define USE_SERIAL_STDIN 0
230 #define IGNITE_ON_P2 0
231 #define IGNITE_ON_P0 0
232 #define PACKET_HAS_MASTER 1
233 #define PACKET_HAS_SLAVE 0
235 #define LEDS_AVAILABLE (AO_LED_RED)
236 #define SPI_CS_ON_P1 0
237 #define SPI_CS_ON_P0 1
239 #define HAS_MONITOR 1
243 #if defined(TELEBT_V_0_0)
247 #define HAS_SERIAL_1 1
248 #define USE_SERIAL_STDIN 1
255 #define IGNITE_ON_P2 0
256 #define IGNITE_ON_P0 0
257 #define PACKET_HAS_MASTER 1
258 #define PACKET_HAS_SLAVE 0
260 #define AO_LED_GREEN 1
261 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
262 #define SPI_CS_ON_P1 1
263 #define SPI_CS_ON_P0 0
265 #define BT_LINK_ON_P2 1
266 #define BT_LINK_ON_P1 0
267 #define BT_LINK_PIN_INDEX 7
268 #define BT_LINK_PIN P2_1
269 #define HAS_MONITOR 1
272 #if defined(TELEBT_V_0_1)
276 #define HAS_SERIAL_1 1
277 #define HAS_SERIAL_1_ALT_1 1
278 #define HAS_SERIAL_1_ALT_2 0
279 #define HAS_SERIAL_1_HW_FLOW 1
280 #define USE_SERIAL_STDIN 1
284 #define USE_INTERNAL_FLASH 0
288 #define IGNITE_ON_P2 0
289 #define IGNITE_ON_P0 0
290 #define PACKET_HAS_MASTER 1
291 #define PACKET_HAS_SLAVE 0
293 #define AO_LED_GREEN 2
294 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
295 #define SPI_CS_ON_P1 1
296 #define SPI_CS_ON_P0 0
297 #define M25_CS_MASK 0x04 /* CS0 is P1_2 */
298 #define M25_MAX_CHIPS 1
301 #define BT_LINK_ON_P2 0
302 #define BT_LINK_ON_P1 1
303 #define BT_LINK_PIN_INDEX 7
304 #define BT_LINK_PIN P1_7
305 #define HAS_MONITOR 1
309 #if defined(TELELAUNCH_V_0_1)
314 #define HAS_SERIAL_1 1
315 #define USE_SERIAL_STDIN 0
319 #define USE_INTERNAL_FLASH 0
322 #define IGNITE_ON_P2 1
323 #define IGNITE_ON_P0 0
324 #define PACKET_HAS_MASTER 0
325 #define PACKET_HAS_SLAVE 1
327 #define AO_LED_GREEN 1
328 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
329 #define HAS_EXTERNAL_TEMP 1
330 #define HAS_ACCEL_REF 0
331 #define SPI_CS_ON_P1 1
332 #define SPI_CS_ON_P0 0
335 #define HAS_MONITOR 0
340 #define DBG_CLOCK (1 << 4) /* mi0 */
341 #define DBG_DATA (1 << 5) /* mo0 */
342 #define DBG_RESET_N (1 << 3) /* c0 */
344 #define DBG_CLOCK_PIN (P1_4)
345 #define DBG_DATA_PIN (P1_5)
346 #define DBG_RESET_N_PIN (P1_3)
348 #define DBG_PORT_NUM 1
350 #define DBG_PORT_SEL P1SEL
351 #define DBG_PORT_INP P1INP
352 #define DBG_PORT_DIR P1DIR
354 #endif /* DBG_ON_P1 */
358 #define DBG_CLOCK (1 << 3)
359 #define DBG_DATA (1 << 4)
360 #define DBG_RESET_N (1 << 5)
362 #define DBG_CLOCK_PIN (P0_3)
363 #define DBG_DATA_PIN (P0_4)
364 #define DBG_RESET_N_PIN (P0_5)
366 #define DBG_PORT_NUM 0
368 #define DBG_PORT_SEL P0SEL
369 #define DBG_PORT_INP P0INP
370 #define DBG_PORT_DIR P0DIR
372 #endif /* DBG_ON_P0 */
374 #if COMPANION_CS_ON_P1
375 #define COMPANION_CS_PORT P1
376 #define COMPANION_CS_SEL P1SEL
377 #define COMPANION_CS_DIR P1DIR
381 #define SPI_CS_PORT P1
382 #define SPI_CS_SEL P1SEL
383 #define SPI_CS_DIR P1DIR
387 #define SPI_CS_PORT P0
388 #define SPI_CS_SEL P0SEL
389 #define SPI_CS_DIR P0DIR
393 #error Please define IGNITE_ON_P2
397 #error Please define IGNITE_ON_P0
401 #error Please define HAS_SERIAL_1
404 #ifndef USE_SERIAL_STDIN
405 #error Please define USE_SERIAL_STDIN
409 #error Please define HAS_ADC
413 #error Please define HAS_EEPROM
417 #ifndef USE_INTERNAL_FLASH
418 #error Please define USE_INTERNAL_FLASH
423 #error Please define HAS_DBG
427 #error Please define HAS_IGNITE
430 #ifndef PACKET_HAS_MASTER
431 #error Please define PACKET_HAS_MASTER
434 #ifndef PACKET_HAS_SLAVE
435 #error Please define PACKET_HAS_SLAVE
439 #error Please define HAS_MONITOR
443 #error Please define HAS_ADC
449 #ifndef HAS_ACCEL_REF
450 #error Please define HAS_ACCEL_REF
453 #define HAS_ACCEL_REF 0
458 #endif /* _AO_PINS_H_ */