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
40 #define HAS_COMPANION 1
41 #define COMPANION_CS_ON_P1 1
42 #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
43 #define COMPANION_CS P1_2
46 #define LEDS_AVAILABLE (AO_LED_RED)
47 #define HAS_EXTERNAL_TEMP 0
48 #define HAS_ACCEL_REF 0
54 #if defined(TELEMETRUM_V_1_1)
59 #define HAS_SERIAL_1 1
60 #define USE_SERIAL_STDIN 0
64 #define USE_INTERNAL_FLASH 0
68 #define IGNITE_ON_P2 1
69 #define IGNITE_ON_P0 0
70 #define PACKET_HAS_MASTER 0
71 #define PACKET_HAS_SLAVE 1
73 #define HAS_COMPANION 1
74 #define COMPANION_CS_ON_P1 1
75 #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
76 #define COMPANION_CS P1_2
79 #define LEDS_AVAILABLE (AO_LED_RED)
80 #define HAS_EXTERNAL_TEMP 0
81 #define HAS_ACCEL_REF 1
82 #define SPI_CS_ON_P1 1
83 #define SPI_CS_ON_P0 0
84 #define M25_CS_MASK 0x02 /* CS0 is P1_1 */
85 #define M25_MAX_CHIPS 1
91 #if defined(TELEDONGLE_V_0_2)
95 #define HAS_SERIAL_1 0
96 #define USE_SERIAL_STDIN 0
103 #define IGNITE_ON_P2 0
104 #define IGNITE_ON_P0 0
105 #define PACKET_HAS_MASTER 1
106 #define PACKET_HAS_SLAVE 0
108 #define AO_LED_GREEN 2
109 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
110 #define SPI_CS_ON_P1 1
111 #define SPI_CS_ON_P0 0
113 #define HAS_MONITOR 1
118 #if defined(TELEMINI_V_1_0)
123 #define HAS_SERIAL_1 0
124 #define USE_SERIAL_STDIN 0
128 #define USE_INTERNAL_FLASH 1
130 #define IGNITE_ON_P2 0
131 #define IGNITE_ON_P0 1
132 #define PACKET_HAS_MASTER 0
133 #define PACKET_HAS_SLAVE 1
134 #define USE_FAST_ASCENT_LOG 1
136 #define AO_LED_GREEN 1
138 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
139 #define HAS_EXTERNAL_TEMP 0
142 #define HAS_MONITOR 0
145 #if defined(TELENANO_V_0_1)
150 #define HAS_SERIAL_1 0
151 #define USE_SERIAL_STDIN 0
155 #define USE_INTERNAL_FLASH 1
157 #define IGNITE_ON_P2 0
158 #define IGNITE_ON_P0 1
159 #define PACKET_HAS_MASTER 0
160 #define PACKET_HAS_SLAVE 1
162 #define AO_LED_GREEN 1
164 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
165 #define HAS_EXTERNAL_TEMP 0
168 #define HAS_MONITOR 0
171 #if defined(TELEMETRUM_V_0_1)
176 #define HAS_SERIAL_1 1
177 #define USE_SERIAL_STDIN 0
182 #define USE_INTERNAL_FLASH 0
185 #define IGNITE_ON_P2 1
186 #define IGNITE_ON_P0 0
187 #define PACKET_HAS_MASTER 0
188 #define PACKET_HAS_SLAVE 1
190 #define AO_LED_GREEN 1
191 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
192 #define HAS_EXTERNAL_TEMP 1
193 #define HAS_ACCEL_REF 0
194 #define SPI_CS_ON_P1 1
195 #define SPI_CS_ON_P0 0
198 #define HAS_MONITOR 0
201 #if defined(TELEDONGLE_V_0_1)
205 #define HAS_SERIAL_1 0
206 #define USE_SERIAL_STDIN 0
213 #define IGNITE_ON_P2 0
214 #define IGNITE_ON_P0 0
215 #define PACKET_HAS_MASTER 1
216 #define PACKET_HAS_SLAVE 0
218 #define AO_LED_GREEN 1
219 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
220 #define SPI_CS_ON_P1 0
221 #define SPI_CS_ON_P0 1
223 #define HAS_MONITOR 1
228 #if defined(TIDONGLE)
232 #define HAS_SERIAL_1 0
233 #define USE_SERIAL_STDIN 0
240 #define IGNITE_ON_P2 0
241 #define IGNITE_ON_P0 0
242 #define PACKET_HAS_MASTER 1
243 #define PACKET_HAS_SLAVE 0
245 #define LEDS_AVAILABLE (AO_LED_RED)
246 #define SPI_CS_ON_P1 0
247 #define SPI_CS_ON_P0 1
249 #define HAS_MONITOR 1
254 #if defined(TELEBT_V_0_0)
258 #define HAS_SERIAL_1 1
259 #define USE_SERIAL_STDIN 1
267 #define IGNITE_ON_P2 0
268 #define IGNITE_ON_P0 0
269 #define PACKET_HAS_MASTER 1
270 #define PACKET_HAS_SLAVE 0
272 #define AO_LED_GREEN 1
273 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
274 #define SPI_CS_ON_P1 1
275 #define SPI_CS_ON_P0 0
277 #define BT_LINK_ON_P2 1
278 #define BT_LINK_ON_P1 0
279 #define BT_LINK_PIN_INDEX 7
280 #define BT_LINK_PIN P2_1
281 #define HAS_MONITOR 1
286 #if defined(TELEBT_V_0_1)
290 #define HAS_SERIAL_1 1
291 #define HAS_SERIAL_1_ALT_1 1
292 #define HAS_SERIAL_1_ALT_2 0
293 #define HAS_SERIAL_1_HW_FLOW 1
294 #define USE_SERIAL_STDIN 1
299 #define USE_INTERNAL_FLASH 0
303 #define IGNITE_ON_P2 0
304 #define IGNITE_ON_P0 0
305 #define PACKET_HAS_MASTER 1
306 #define PACKET_HAS_SLAVE 0
308 #define AO_LED_GREEN 2
309 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
310 #define SPI_CS_ON_P1 1
311 #define SPI_CS_ON_P0 0
312 #define M25_CS_MASK 0x04 /* CS0 is P1_2 */
313 #define M25_MAX_CHIPS 1
316 #define BT_LINK_ON_P2 0
317 #define BT_LINK_ON_P1 1
318 #define BT_LINK_PIN_INDEX 7
319 #define BT_LINK_PIN P1_7
320 #define HAS_MONITOR 1
325 #if defined(TELELAUNCH_V_0_1)
330 #define HAS_SERIAL_1 1
331 #define USE_SERIAL_STDIN 0
336 #define USE_INTERNAL_FLASH 1
339 #define IGNITE_ON_P2 1
340 #define IGNITE_ON_P0 0
341 #define PACKET_HAS_MASTER 0
342 #define PACKET_HAS_SLAVE 0
344 #define AO_LED_GREEN 1
345 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
346 #define HAS_EXTERNAL_TEMP 1
347 #define HAS_ACCEL_REF 0
348 #define SPI_CS_ON_P1 1
349 #define SPI_CS_ON_P0 0
352 #define HAS_MONITOR 0
358 #define DBG_CLOCK (1 << 4) /* mi0 */
359 #define DBG_DATA (1 << 5) /* mo0 */
360 #define DBG_RESET_N (1 << 3) /* c0 */
362 #define DBG_CLOCK_PIN (P1_4)
363 #define DBG_DATA_PIN (P1_5)
364 #define DBG_RESET_N_PIN (P1_3)
366 #define DBG_PORT_NUM 1
368 #define DBG_PORT_SEL P1SEL
369 #define DBG_PORT_INP P1INP
370 #define DBG_PORT_DIR P1DIR
372 #endif /* DBG_ON_P1 */
376 #define DBG_CLOCK (1 << 3)
377 #define DBG_DATA (1 << 4)
378 #define DBG_RESET_N (1 << 5)
380 #define DBG_CLOCK_PIN (P0_3)
381 #define DBG_DATA_PIN (P0_4)
382 #define DBG_RESET_N_PIN (P0_5)
384 #define DBG_PORT_NUM 0
386 #define DBG_PORT_SEL P0SEL
387 #define DBG_PORT_INP P0INP
388 #define DBG_PORT_DIR P0DIR
390 #endif /* DBG_ON_P0 */
392 #if COMPANION_CS_ON_P1
393 #define COMPANION_CS_PORT P1
394 #define COMPANION_CS_SEL P1SEL
395 #define COMPANION_CS_DIR P1DIR
399 #define SPI_CS_PORT P1
400 #define SPI_CS_SEL P1SEL
401 #define SPI_CS_DIR P1DIR
405 #define SPI_CS_PORT P0
406 #define SPI_CS_SEL P0SEL
407 #define SPI_CS_DIR P0DIR
411 #error Please define IGNITE_ON_P2
415 #error Please define IGNITE_ON_P0
419 #error Please define HAS_SERIAL_1
422 #ifndef USE_SERIAL_STDIN
423 #error Please define USE_SERIAL_STDIN
427 #error Please define HAS_ADC
431 #error Please define HAS_EEPROM
435 #error Please define HAS_LOG
439 #ifndef USE_INTERNAL_FLASH
440 #error Please define USE_INTERNAL_FLASH
445 #error Please define HAS_DBG
449 #error Please define HAS_IGNITE
452 #ifndef PACKET_HAS_MASTER
453 #error Please define PACKET_HAS_MASTER
456 #ifndef PACKET_HAS_SLAVE
457 #error Please define PACKET_HAS_SLAVE
461 #error Please define HAS_MONITOR
466 #error Please define HAS_RSSI
471 #error Please define HAS_ADC
477 #ifndef HAS_ACCEL_REF
478 #error Please define HAS_ACCEL_REF
481 #define HAS_ACCEL_REF 0
487 #define AO_IGNITER_DROGUE P2_3
488 #define AO_IGNITER_MAIN P2_4
489 #define AO_IGNITER_DIR P2DIR
490 #define AO_IGNITER_DROGUE_BIT (1 << 3)
491 #define AO_IGNITER_MAIN_BIT (1 << 4)
495 #define AO_IGNITER_DROGUE P0_5
496 #define AO_IGNITER_MAIN P0_4
497 #define AO_IGNITER_DIR P0DIR
498 #define AO_IGNITER_DROGUE_BIT (1 << 5)
499 #define AO_IGNITER_MAIN_BIT (1 << 4)
502 /* test these values with real igniters */
503 #define AO_IGNITER_OPEN 1000
504 #define AO_IGNITER_CLOSED 7000
505 #define AO_IGNITER_FIRE_TIME AO_MS_TO_TICKS(50)
506 #define AO_IGNITER_CHARGE_TIME AO_MS_TO_TICKS(2000)
508 #endif /* _AO_PINS_H_ */