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
31 #define USE_INTERNAL_FLASH 0
35 #define IGNITE_ON_P2 1
36 #define IGNITE_ON_P0 0
37 #define PACKET_HAS_MASTER 0
38 #define PACKET_HAS_SLAVE 1
41 #define HAS_COMPANION 1
42 #define COMPANION_CS_ON_P1 1
43 #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
44 #define COMPANION_CS P1_2
47 #define LEDS_AVAILABLE (AO_LED_RED)
48 #define HAS_EXTERNAL_TEMP 0
49 #define HAS_ACCEL_REF 0
55 #if defined(TELEMETRUM_V_1_1)
60 #define HAS_SERIAL_1 1
61 #define USE_SERIAL_STDIN 0
65 #define USE_INTERNAL_FLASH 0
69 #define IGNITE_ON_P2 1
70 #define IGNITE_ON_P0 0
71 #define PACKET_HAS_MASTER 0
72 #define PACKET_HAS_SLAVE 1
74 #define HAS_COMPANION 1
75 #define COMPANION_CS_ON_P1 1
76 #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
77 #define COMPANION_CS P1_2
80 #define LEDS_AVAILABLE (AO_LED_RED)
81 #define HAS_EXTERNAL_TEMP 0
82 #define HAS_ACCEL_REF 1
83 #define SPI_CS_ON_P1 1
84 #define SPI_CS_ON_P0 0
85 #define M25_CS_MASK 0x02 /* CS0 is P1_1 */
86 #define M25_MAX_CHIPS 1
92 #if defined(TELEDONGLE_V_0_2)
96 #define HAS_SERIAL_1 0
97 #define USE_SERIAL_STDIN 0
104 #define IGNITE_ON_P2 0
105 #define IGNITE_ON_P0 0
106 #define PACKET_HAS_MASTER 1
107 #define PACKET_HAS_SLAVE 0
109 #define AO_LED_GREEN 2
110 #define AO_MONITOR_LED AO_LED_GREEN
111 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
112 #define SPI_CS_ON_P1 1
113 #define SPI_CS_ON_P0 0
115 #define HAS_MONITOR 1
116 #define LEGACY_MONITOR 1
121 #if defined(TELEMINI_V_1_0)
126 #define HAS_SERIAL_1 0
127 #define USE_SERIAL_STDIN 0
131 #define USE_INTERNAL_FLASH 1
133 #define IGNITE_ON_P2 0
134 #define IGNITE_ON_P0 1
135 #define PACKET_HAS_MASTER 0
136 #define PACKET_HAS_SLAVE 1
137 #define USE_FAST_ASCENT_LOG 1
139 #define AO_LED_GREEN 1
141 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
142 #define HAS_EXTERNAL_TEMP 0
145 #define HAS_MONITOR 0
148 #if defined(TELENANO_V_0_1)
153 #define HAS_SERIAL_1 0
154 #define USE_SERIAL_STDIN 0
158 #define USE_INTERNAL_FLASH 1
160 #define IGNITE_ON_P2 0
161 #define IGNITE_ON_P0 1
162 #define PACKET_HAS_MASTER 0
163 #define PACKET_HAS_SLAVE 1
165 #define AO_LED_GREEN 1
167 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
168 #define HAS_EXTERNAL_TEMP 0
171 #define HAS_MONITOR 0
174 #if defined(TELEMETRUM_V_0_1)
179 #define HAS_SERIAL_1 1
180 #define USE_SERIAL_STDIN 0
185 #define USE_INTERNAL_FLASH 0
188 #define IGNITE_ON_P2 1
189 #define IGNITE_ON_P0 0
190 #define PACKET_HAS_MASTER 0
191 #define PACKET_HAS_SLAVE 1
193 #define AO_LED_GREEN 1
194 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
195 #define HAS_EXTERNAL_TEMP 1
196 #define HAS_ACCEL_REF 0
197 #define SPI_CS_ON_P1 1
198 #define SPI_CS_ON_P0 0
201 #define HAS_MONITOR 0
204 #if defined(TELEDONGLE_V_0_1)
208 #define HAS_SERIAL_1 0
209 #define USE_SERIAL_STDIN 0
216 #define IGNITE_ON_P2 0
217 #define IGNITE_ON_P0 0
218 #define PACKET_HAS_MASTER 1
219 #define PACKET_HAS_SLAVE 0
221 #define AO_LED_GREEN 1
222 #define AO_MONITOR_LED AO_LED_GREEN
223 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
224 #define SPI_CS_ON_P1 0
225 #define SPI_CS_ON_P0 1
227 #define HAS_MONITOR 1
228 #define LEGACY_MONITOR 1
233 #if defined(TIDONGLE)
237 #define HAS_SERIAL_1 0
238 #define USE_SERIAL_STDIN 0
245 #define IGNITE_ON_P2 0
246 #define IGNITE_ON_P0 0
247 #define PACKET_HAS_MASTER 1
248 #define PACKET_HAS_SLAVE 0
250 #define AO_MONITOR_LED AO_LED_RED
251 #define LEDS_AVAILABLE (AO_LED_RED)
252 #define SPI_CS_ON_P1 0
253 #define SPI_CS_ON_P0 1
255 #define HAS_MONITOR 1
256 #define LEGACY_MONITOR 1
261 #if defined(TELEBT_V_0_0)
265 #define HAS_SERIAL_1 1
266 #define USE_SERIAL_STDIN 1
274 #define IGNITE_ON_P2 0
275 #define IGNITE_ON_P0 0
276 #define PACKET_HAS_MASTER 1
277 #define PACKET_HAS_SLAVE 0
279 #define AO_LED_GREEN 1
280 #define AO_MONITOR_LED AO_LED_RED
281 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
282 #define SPI_CS_ON_P1 1
283 #define SPI_CS_ON_P0 0
285 #define HAS_IGNITE_REPORT 1
286 #define BT_LINK_ON_P2 1
287 #define BT_LINK_ON_P1 0
288 #define BT_LINK_PIN_INDEX 7
289 #define BT_LINK_PIN P2_1
290 #define HAS_MONITOR 1
291 #define LEGACY_MONITOR 1
296 #if defined(TELEBT_V_0_1)
300 #define HAS_SERIAL_1 1
301 #define HAS_SERIAL_1_ALT_1 1
302 #define HAS_SERIAL_1_ALT_2 0
303 #define HAS_SERIAL_1_HW_FLOW 1
304 #define USE_SERIAL_STDIN 1
309 #define USE_INTERNAL_FLASH 0
313 #define IGNITE_ON_P2 0
314 #define IGNITE_ON_P0 0
315 #define PACKET_HAS_MASTER 1
316 #define PACKET_HAS_SLAVE 0
318 #define AO_LED_GREEN 2
319 #define AO_MONITOR_LED AO_LED_RED
320 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
321 #define SPI_CS_ON_P1 1
322 #define SPI_CS_ON_P0 0
323 #define M25_CS_MASK 0x04 /* CS0 is P1_2 */
324 #define M25_MAX_CHIPS 1
327 #define HAS_IGNITE_REPORT 1
328 #define BT_LINK_ON_P2 0
329 #define BT_LINK_ON_P1 1
330 #define BT_LINK_PIN_INDEX 7
331 #define BT_LINK_PIN P1_7
332 #define HAS_MONITOR 1
333 #define LEGACY_MONITOR 1
338 #if defined(TELELAUNCH_V_0_1)
343 #define HAS_SERIAL_1 1
344 #define USE_SERIAL_STDIN 0
349 #define USE_INTERNAL_FLASH 1
352 #define IGNITE_ON_P2 1
353 #define IGNITE_ON_P0 0
354 #define PACKET_HAS_MASTER 0
355 #define PACKET_HAS_SLAVE 0
357 #define AO_LED_GREEN 1
358 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
359 #define HAS_EXTERNAL_TEMP 1
360 #define HAS_ACCEL_REF 0
361 #define SPI_CS_ON_P1 1
362 #define SPI_CS_ON_P0 0
365 #define HAS_MONITOR 0
371 #define DBG_CLOCK (1 << 4) /* mi0 */
372 #define DBG_DATA (1 << 5) /* mo0 */
373 #define DBG_RESET_N (1 << 3) /* c0 */
375 #define DBG_CLOCK_PIN (P1_4)
376 #define DBG_DATA_PIN (P1_5)
377 #define DBG_RESET_N_PIN (P1_3)
379 #define DBG_PORT_NUM 1
381 #define DBG_PORT_SEL P1SEL
382 #define DBG_PORT_INP P1INP
383 #define DBG_PORT_DIR P1DIR
385 #endif /* DBG_ON_P1 */
389 #define DBG_CLOCK (1 << 3)
390 #define DBG_DATA (1 << 4)
391 #define DBG_RESET_N (1 << 5)
393 #define DBG_CLOCK_PIN (P0_3)
394 #define DBG_DATA_PIN (P0_4)
395 #define DBG_RESET_N_PIN (P0_5)
397 #define DBG_PORT_NUM 0
399 #define DBG_PORT_SEL P0SEL
400 #define DBG_PORT_INP P0INP
401 #define DBG_PORT_DIR P0DIR
403 #endif /* DBG_ON_P0 */
405 #if COMPANION_CS_ON_P1
406 #define COMPANION_CS_PORT P1
407 #define COMPANION_CS_SEL P1SEL
408 #define COMPANION_CS_DIR P1DIR
412 #define SPI_CS_PORT P1
413 #define SPI_CS_SEL P1SEL
414 #define SPI_CS_DIR P1DIR
418 #define SPI_CS_PORT P0
419 #define SPI_CS_SEL P0SEL
420 #define SPI_CS_DIR P0DIR
424 #error Please define IGNITE_ON_P2
428 #error Please define IGNITE_ON_P0
432 #error Please define HAS_SERIAL_1
435 #ifndef USE_SERIAL_STDIN
436 #error Please define USE_SERIAL_STDIN
440 #error Please define HAS_ADC
444 #error Please define HAS_EEPROM
448 #error Please define HAS_LOG
452 #ifndef USE_INTERNAL_FLASH
453 #error Please define USE_INTERNAL_FLASH
458 #error Please define HAS_DBG
462 #error Please define HAS_IGNITE
466 #define HAS_IGNITE_REPORT 1
469 #ifndef PACKET_HAS_MASTER
470 #error Please define PACKET_HAS_MASTER
473 #ifndef PACKET_HAS_SLAVE
474 #error Please define PACKET_HAS_SLAVE
478 #error Please define HAS_MONITOR
483 #error Please define HAS_RSSI
488 #error Please define HAS_ADC
494 #ifndef HAS_ACCEL_REF
495 #error Please define HAS_ACCEL_REF
498 #define HAS_ACCEL_REF 0
504 #define AO_IGNITER_DROGUE P2_3
505 #define AO_IGNITER_MAIN P2_4
506 #define AO_IGNITER_DIR P2DIR
507 #define AO_IGNITER_DROGUE_BIT (1 << 3)
508 #define AO_IGNITER_MAIN_BIT (1 << 4)
512 #define AO_IGNITER_DROGUE P0_5
513 #define AO_IGNITER_MAIN P0_4
514 #define AO_IGNITER_DIR P0DIR
515 #define AO_IGNITER_DROGUE_BIT (1 << 5)
516 #define AO_IGNITER_MAIN_BIT (1 << 4)
519 /* test these values with real igniters */
520 #define AO_IGNITER_OPEN 1000
521 #define AO_IGNITER_CLOSED 7000
522 #define AO_IGNITER_FIRE_TIME AO_MS_TO_TICKS(50)
523 #define AO_IGNITER_CHARGE_TIME AO_MS_TO_TICKS(2000)
525 #endif /* _AO_PINS_H_ */