2d524188679a211d3bc1af7e1f0b8327144edccf
[fw/altos] / src / cc1111 / ao_pins.h
1 /*
2  * Copyright © 2010 Keith Packard <keithp@keithp.com>
3  *
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.
7  *
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.
12  *
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.
16  */
17
18 #ifndef _AO_PINS_H_
19 #define _AO_PINS_H_
20
21 #define HAS_RADIO               1
22 #define DISABLE_LOG_SPACE       1
23
24 #if defined(TELEMETRUM_V_1_0)
25         /* Discontinued and was never built with CC1111 chips needing this */
26         #define NEEDS_CC1111_CLOCK_HACK 0
27         #define HAS_FLIGHT              1
28         #define HAS_USB                 1
29         #define HAS_BEEP                1
30         #define HAS_BEEP_CONFIG         0
31         #define HAS_GPS                 1
32         #define HAS_SERIAL_1            1
33         #define HAS_ADC                 1
34         #define HAS_EEPROM              1
35         #define HAS_LOG                 1
36         #define USE_INTERNAL_FLASH      0
37         #define HAS_DBG                 1
38         #define DBG_ON_P1               1
39         #define DBG_ON_P0               0
40         #define IGNITE_ON_P2            1
41         #define IGNITE_ON_P0            0
42         #define PACKET_HAS_MASTER       0
43         #define PACKET_HAS_SLAVE        1
44         #define NOISY_ACCEL             1
45
46         #define HAS_COMPANION           1
47         #define COMPANION_CS_ON_P1      1
48         #define AO_COMPANION_CS_PORT    P1
49         #define AO_COMPANION_CS_PIN     2
50         #define AO_COMPANION_CS         P1_2
51
52         #define AO_LED_RED              1
53         #define LEDS_AVAILABLE          (AO_LED_RED)
54         #define HAS_EXTERNAL_TEMP       0
55         #define HAS_ACCEL_REF           0
56         #define HAS_ACCEL               1
57         #define HAS_IGNITE              1
58         #define HAS_MONITOR             0
59         #define HAS_TELEMETRY           1
60 #endif
61
62 #if defined(TELEMETRUM_V_1_1)
63         /* Discontinued and was never built with CC1111 chips needing this */
64         #define NEEDS_CC1111_CLOCK_HACK 0
65         #define HAS_FLIGHT              1
66         #define HAS_USB                 1
67         #define HAS_BEEP                1
68         #define HAS_BEEP_CONFIG         0
69         #define HAS_BATTERY_REPORT      1
70         #define HAS_GPS                 1
71         #define HAS_SERIAL_1            1
72         #define HAS_ADC                 1
73         #define HAS_EEPROM              1
74         #define HAS_LOG                 1
75         #define USE_INTERNAL_FLASH      0
76         #define HAS_DBG                 1
77         #define DBG_ON_P1               1
78         #define DBG_ON_P0               0
79         #define IGNITE_ON_P2            1
80         #define IGNITE_ON_P0            0
81         #define PACKET_HAS_MASTER       0
82         #define PACKET_HAS_SLAVE        1
83
84         #define HAS_COMPANION           1
85         #define AO_COMPANION_CS_PORT    P1
86         #define AO_COMPANION_CS_PIN     2
87         #define AO_COMPANION_CS         P1_2
88
89         #define AO_LED_RED              1
90         #define LEDS_AVAILABLE          (AO_LED_RED)
91         #define HAS_EXTERNAL_TEMP       0
92         #define HAS_ACCEL_REF           1
93         #define SPI_CS_ON_P1            1
94         #define SPI_CS_ON_P0            0
95         #define AO_M25_SPI_CS_MASK      0x02    /* CS0 is P1_1 */
96         #define M25_MAX_CHIPS           1
97         #define HAS_ACCEL               1
98         #define HAS_IGNITE              1
99         #define HAS_MONITOR             0
100         #define HAS_TELEMETRY           1
101 #endif
102
103 #if defined(TELEMETRUM_V_1_2)
104         /* Discontinued and was never built with CC1111 chips needing this */
105         #define NEEDS_CC1111_CLOCK_HACK 0
106         #define HAS_FLIGHT              1
107         #define HAS_USB                 1
108         #define HAS_BEEP                1
109         #define HAS_BEEP_CONFIG         0
110         #define HAS_BATTERY_REPORT      1
111         #define HAS_GPS                 1
112         #define HAS_SERIAL_1            1
113         #define HAS_ADC                 1
114         #define HAS_EEPROM              1
115         #define HAS_LOG                 1
116         #define USE_INTERNAL_FLASH      0
117         #define HAS_DBG                 1
118         #define DBG_ON_P1               1
119         #define DBG_ON_P0               0
120         #define IGNITE_ON_P2            1
121         #define IGNITE_ON_P0            0
122         #define PACKET_HAS_MASTER       0
123         #define PACKET_HAS_SLAVE        1
124
125         #define HAS_COMPANION           1
126         #define AO_COMPANION_CS_PORT    P1
127         #define AO_COMPANION_CS_PIN     2
128         #define AO_COMPANION_CS         P1_2
129
130         #define AO_LED_RED              1
131         #define LEDS_AVAILABLE          (AO_LED_RED)
132         #define HAS_EXTERNAL_TEMP       0
133         #define HAS_ACCEL_REF           1
134         #define SPI_CS_ON_P1            1
135         #define SPI_CS_ON_P0            0
136         #define AO_M25_SPI_CS_MASK      0x02    /* CS0 is P1_1 */
137         #define M25_MAX_CHIPS           1
138         #define HAS_ACCEL               1
139         #define HAS_IGNITE              1
140         #define HAS_MONITOR             0
141         #define HAS_TELEMETRY           1
142 #endif
143
144 #if defined(TELEDONGLE_V_0_2)
145         #define HAS_FLIGHT              0
146         #define HAS_USB                 1
147         #define HAS_BEEP                0
148         #define HAS_SERIAL_1            0
149         #define HAS_ADC                 0
150         #define HAS_DBG                 1
151         #define HAS_EEPROM              0
152         #define HAS_LOG                 0
153         #define DBG_ON_P1               1
154         #define DBG_ON_P0               0
155         #define IGNITE_ON_P2            0
156         #define IGNITE_ON_P0            0
157         #define PACKET_HAS_MASTER       1
158         #define PACKET_HAS_SLAVE        0
159         #define AO_LED_RED              1
160         #define AO_LED_GREEN            2
161         #define AO_MONITOR_LED          AO_LED_GREEN
162         #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
163         #define SPI_CS_ON_P1            1
164         #define SPI_CS_ON_P0            0
165         #define HAS_IGNITE              0
166         #define HAS_MONITOR             1
167         #define LEGACY_MONITOR          1
168         #define HAS_RSSI                1
169         #define HAS_AES                 0
170         #define HAS_TELEMETRY           0
171         #define AO_RADIO_REG_TEST       1
172 #endif
173
174 #if defined(TELEMINI_V_1_0)
175         /* Discontinued and was never built with CC1111 chips needing this */
176         #define NEEDS_CC1111_CLOCK_HACK 0
177         #define HAS_FLIGHT              1
178         #define HAS_USB                 0
179         #define HAS_BEEP                0
180         #define HAS_GPS                 0
181         #define HAS_SERIAL_1            0
182         #define HAS_ADC                 1
183         #define HAS_EEPROM              1
184         #define HAS_LOG                 1
185         #define HAS_FORCE_FREQ          1
186         #define USE_INTERNAL_FLASH      1
187         #define HAS_DBG                 0
188         #define IGNITE_ON_P2            0
189         #define IGNITE_ON_P0            1
190         #define PACKET_HAS_MASTER       0
191         #define PACKET_HAS_SLAVE        1
192         #define USE_FAST_ASCENT_LOG     1
193
194         #define AO_LED_GREEN            1
195         #define AO_LED_RED              2
196         #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
197         #define HAS_EXTERNAL_TEMP       0
198         #define HAS_ACCEL               0
199         #define HAS_IGNITE              1
200         #define HAS_MONITOR             0
201         #define HAS_TELEMETRY           1
202         #define HAS_RADIO_RATE          0       /* not enough space for this */
203 #endif
204
205 #if defined(TELENANO_V_0_1)
206         /* Discontinued and was never built with CC1111 chips needing this */
207         #define NEEDS_CC1111_CLOCK_HACK 0
208         #define HAS_FLIGHT              1
209         #define HAS_USB                 0
210         #define HAS_BEEP                0
211         #define HAS_GPS                 0
212         #define HAS_SERIAL_1            0
213         #define HAS_ADC                 1
214         #define HAS_EEPROM              1
215         #define HAS_LOG                 1
216         #define USE_INTERNAL_FLASH      1
217         #define HAS_DBG                 0
218         #define IGNITE_ON_P2            0
219         #define IGNITE_ON_P0            1
220         #define PACKET_HAS_MASTER       0
221         #define PACKET_HAS_SLAVE        1
222
223         #define AO_LED_GREEN            1
224         #define AO_LED_RED              2
225         #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
226         #define HAS_EXTERNAL_TEMP       0
227         #define HAS_ACCEL               0
228         #define HAS_IGNITE              0
229         #define HAS_MONITOR             0
230         #define HAS_TELEMETRY           1
231         #define HAS_RADIO_RATE          0       /* not enough space for this */
232 #endif
233
234 #if defined(TELEMETRUM_V_0_1)
235         /* Discontinued and was never built with CC1111 chips needing this */
236         #define NEEDS_CC1111_CLOCK_HACK 0
237         #define HAS_FLIGHT              1
238         #define HAS_USB                 1
239         #define HAS_BEEP                1
240         #define HAS_BEEP_CONFIG         0
241         #define HAS_GPS                 1
242         #define HAS_SERIAL_1            1
243         #define HAS_ADC                 1
244         #define HAS_DBG                 0
245         #define HAS_EEPROM              1
246         #define HAS_LOG                 1
247         #define USE_INTERNAL_FLASH      0
248         #define DBG_ON_P1               0
249         #define DBG_ON_P0               1
250         #define IGNITE_ON_P2            1
251         #define IGNITE_ON_P0            0
252         #define PACKET_HAS_MASTER       0
253         #define PACKET_HAS_SLAVE        1
254         #define AO_LED_RED              2
255         #define AO_LED_GREEN            1
256         #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
257         #define HAS_EXTERNAL_TEMP       1
258         #define HAS_ACCEL_REF           0
259         #define SPI_CS_ON_P1            1
260         #define SPI_CS_ON_P0            0
261         #define HAS_ACCEL               1
262         #define HAS_IGNITE              1
263         #define HAS_MONITOR             0
264         #define HAS_TELEMETRY           1
265         #define HAS_RADIO_RATE          0       /* not enough space for this */
266         #define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX        ((uint32_t) 127 * (uint32_t) 1024)
267 #endif
268
269 #if defined(TELEDONGLE_V_0_1)
270         /* Discontinued and was never built with CC1111 chips needing this */
271         #define NEEDS_CC1111_CLOCK_HACK 0
272         #define HAS_FLIGHT              0
273         #define HAS_USB                 1
274         #define HAS_BEEP                0
275         #define HAS_SERIAL_1            0
276         #define HAS_ADC                 0
277         #define HAS_DBG                 0
278         #define HAS_EEPROM              0
279         #define HAS_LOG                 0
280         #define DBG_ON_P1               0
281         #define DBG_ON_P0               1
282         #define IGNITE_ON_P2            0
283         #define IGNITE_ON_P0            0
284         #define PACKET_HAS_MASTER       1
285         #define PACKET_HAS_SLAVE        0
286         #define AO_LED_RED              2
287         #define AO_LED_GREEN            1
288         #define AO_MONITOR_LED          AO_LED_GREEN
289         #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
290         #define SPI_CS_ON_P1            0
291         #define SPI_CS_ON_P0            1
292         #define HAS_IGNITE              0
293         #define HAS_MONITOR             1
294         #define LEGACY_MONITOR          1
295         #define HAS_RSSI                1
296         #define HAS_AES                 0
297         #define HAS_TELEMETRY           0
298 #endif
299
300 #if defined(TIDONGLE)
301         /* Discontinued and was never built with CC1111 chips needing this */
302         #define NEEDS_CC1111_CLOCK_HACK 0
303         #define HAS_FLIGHT              0
304         #define HAS_USB                 1
305         #define HAS_BEEP                0
306         #define HAS_SERIAL_1            0
307         #define HAS_ADC                 0
308         #define HAS_DBG                 1
309         #define HAS_EEPROM              0
310         #define HAS_LOG                 0
311         #define DBG_ON_P1               0
312         #define DBG_ON_P0               1
313         #define IGNITE_ON_P2            0
314         #define IGNITE_ON_P0            0
315         #define PACKET_HAS_MASTER       1
316         #define PACKET_HAS_SLAVE        0
317         #define AO_LED_RED              2
318         #define AO_MONITOR_LED          AO_LED_RED
319         #define LEDS_AVAILABLE          (AO_LED_RED)
320         #define SPI_CS_ON_P1            0
321         #define SPI_CS_ON_P0            1
322         #define HAS_IGNITE              0
323         #define HAS_MONITOR             1
324         #define LEGACY_MONITOR          1
325         #define HAS_RSSI                1
326         #define HAS_AES                 0
327         #define HAS_TELEMETRY           0
328 #endif
329
330 #if defined(TELEBT_V_0_0)
331         /* Discontinued and was never built with CC1111 chips needing this */
332         #define NEEDS_CC1111_CLOCK_HACK 0
333         #define HAS_FLIGHT              0
334         #define HAS_USB                 1
335         #define HAS_BEEP                0
336         #define HAS_SERIAL_1            1
337         #define USE_SERIAL_1_STDIN      1
338         #define DELAY_SERIAL_1_STDIN    1
339         #define HAS_ADC                 0
340         #define HAS_DBG                 1
341         #define HAS_EEPROM              0
342         #define HAS_LOG                 0
343         #define HAS_BTM                 1
344         #define DBG_ON_P1               0
345         #define DBG_ON_P0               1
346         #define IGNITE_ON_P2            0
347         #define IGNITE_ON_P0            0
348         #define PACKET_HAS_MASTER       1
349         #define PACKET_HAS_SLAVE        0
350         #define AO_LED_RED              2
351         #define AO_LED_GREEN            1
352         #define AO_MONITOR_LED          AO_LED_RED
353         #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
354         #define SPI_CS_ON_P1            1
355         #define SPI_CS_ON_P0            0
356         #define HAS_IGNITE              0
357         #define HAS_IGNITE_REPORT       1
358         #define BT_LINK_ON_P2           1
359         #define BT_LINK_ON_P1           0
360         #define BT_LINK_PIN_INDEX       7
361         #define BT_LINK_PIN             P2_1
362         #define HAS_MONITOR             1
363         #define LEGACY_MONITOR          1
364         #define HAS_RSSI                0
365         #define HAS_AES                 0
366         #define HAS_TELEMETRY           0
367         #define AO_RADIO_REG_TEST       1
368 #endif
369
370 #if defined(TELEBT_V_0_1)
371         /* Discontinued and was never built with CC1111 chips needing this */
372         #define NEEDS_CC1111_CLOCK_HACK 0
373         #define HAS_FLIGHT              0
374         #define HAS_USB                 1
375         #define HAS_BEEP                1
376         #define HAS_BEEP_CONFIG         0
377         #define HAS_SERIAL_1            1
378         #define HAS_SERIAL_1_ALT_1      1
379         #define HAS_SERIAL_1_ALT_2      0
380         #define HAS_SERIAL_1_HW_FLOW    1
381         #define USE_SERIAL_1_STDIN      1
382         #define DELAY_SERIAL_1_STDIN    1
383         #define HAS_ADC                 0
384         #define HAS_DBG                 1
385         #define HAS_EEPROM              1
386         #define HAS_LOG                 1
387         #define USE_INTERNAL_FLASH      0
388         #define HAS_BTM                 1
389         #define DBG_ON_P1               1
390         #define DBG_ON_P0               0
391         #define IGNITE_ON_P2            0
392         #define IGNITE_ON_P0            0
393         #define PACKET_HAS_MASTER       1
394         #define PACKET_HAS_SLAVE        0
395         #define AO_LED_RED              1
396         #define AO_LED_GREEN            2
397         #define AO_MONITOR_LED          AO_LED_RED
398         #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
399         #define SPI_CS_ON_P1            1
400         #define SPI_CS_ON_P0            0
401         #define AO_M25_SPI_CS_MASK      0x04    /* CS0 is P1_2 */
402         #define M25_MAX_CHIPS           1
403         #define HAS_ACCEL               0
404         #define HAS_IGNITE              0
405         #define HAS_IGNITE_REPORT       1
406         #define BT_LINK_ON_P2           0
407         #define BT_LINK_ON_P1           1
408         #define BT_LINK_PIN_INDEX       7
409         #define BT_LINK_PIN             P1_7
410         #define HAS_MONITOR             1
411         #define LEGACY_MONITOR          1
412         #define HAS_RSSI                0
413         #define HAS_AES                 0
414         #define HAS_TELEMETRY           0
415         #define AO_RADIO_REG_TEST       1
416 #endif
417
418 #if defined(TELELAUNCH_V_0_1)
419         /* Discontinued and was never built with CC1111 chips needing this */
420         #define NEEDS_CC1111_CLOCK_HACK 0
421         #define HAS_FLIGHT              0
422         #define HAS_USB                 1
423         #define HAS_BEEP                1
424         #define HAS_GPS                 0
425         #define HAS_SERIAL_1            1
426         #define HAS_ADC                 1
427         #define HAS_DBG                 0
428         #define HAS_EEPROM              1
429         #define HAS_LOG                 0
430         #define USE_INTERNAL_FLASH      1
431         #define DBG_ON_P1               0
432         #define DBG_ON_P0               1
433         #define IGNITE_ON_P2            1
434         #define IGNITE_ON_P0            0
435         #define PACKET_HAS_MASTER       0
436         #define PACKET_HAS_SLAVE        0
437         #define AO_LED_RED              2
438         #define AO_LED_GREEN            1
439         #define LEDS_AVAILABLE          (AO_LED_RED|AO_LED_GREEN)
440         #define HAS_EXTERNAL_TEMP       1
441         #define HAS_ACCEL_REF           0
442         #define SPI_CS_ON_P1            1
443         #define SPI_CS_ON_P0            0
444         #define HAS_ACCEL               0
445         #define HAS_IGNITE              1
446         #define HAS_MONITOR             0
447         #define HAS_AES                 1
448         #define HAS_TELEMETRY           0
449 #endif
450
451 #if DBG_ON_P1
452
453         #define DBG_CLOCK       (1 << 4)        /* mi0 */
454         #define DBG_DATA        (1 << 5)        /* mo0 */
455         #define DBG_RESET_N     (1 << 3)        /* c0 */
456
457         #define DBG_CLOCK_PIN   (P1_4)
458         #define DBG_DATA_PIN    (P1_5)
459         #define DBG_RESET_N_PIN (P1_3)
460
461         #define DBG_PORT_NUM    1
462         #define DBG_PORT        P1
463         #define DBG_PORT_SEL    P1SEL
464         #define DBG_PORT_INP    P1INP
465         #define DBG_PORT_DIR    P1DIR
466
467 #endif /* DBG_ON_P1 */
468
469 #if DBG_ON_P0
470
471         #define DBG_CLOCK       (1 << 3)
472         #define DBG_DATA        (1 << 4)
473         #define DBG_RESET_N     (1 << 5)
474
475         #define DBG_CLOCK_PIN   (P0_3)
476         #define DBG_DATA_PIN    (P0_4)
477         #define DBG_RESET_N_PIN (P0_5)
478
479         #define DBG_PORT_NUM    0
480         #define DBG_PORT        P0
481         #define DBG_PORT_SEL    P0SEL
482         #define DBG_PORT_INP    P0INP
483         #define DBG_PORT_DIR    P0DIR
484
485 #endif /* DBG_ON_P0 */
486
487 #if COMPANION_CS_ON_P1
488         #define COMPANION_CS_PORT       P1
489         #define COMPANION_CS_SEL        P1SEL
490         #define COMPANION_CS_DIR        P1DIR
491 #endif
492
493 #if SPI_CS_ON_P1
494         #define SPI_CS_PORT     P1
495         #define SPI_CS_SEL      P1SEL
496         #define SPI_CS_DIR      P1DIR
497 #endif
498
499 #if SPI_CS_ON_P0
500         #define SPI_CS_PORT     P0
501         #define SPI_CS_SEL      P0SEL
502         #define SPI_CS_DIR      P0DIR
503 #endif
504
505 #define AO_M25_SPI_CS_PORT      SPI_CS_PORT
506
507 #ifndef IGNITE_ON_P2
508 #error Please define IGNITE_ON_P2
509 #endif
510
511 #ifndef IGNITE_ON_P0
512 #error Please define IGNITE_ON_P0
513 #endif
514
515 #ifndef HAS_ADC
516 #error Please define HAS_ADC
517 #endif
518
519 #ifndef HAS_EEPROM
520 #error Please define HAS_EEPROM
521 #endif
522
523 #ifndef HAS_LOG
524 #error Please define HAS_LOG
525 #endif
526
527 #if HAS_EEPROM
528 #ifndef USE_INTERNAL_FLASH
529 #error Please define USE_INTERNAL_FLASH
530 #endif
531 #endif
532
533 #ifndef HAS_DBG
534 #error Please define HAS_DBG
535 #endif
536
537 #ifndef HAS_IGNITE
538 #error Please define HAS_IGNITE
539 #endif
540
541 #if HAS_IGNITE
542 #define HAS_IGNITE_REPORT 1
543 #endif
544
545 #ifndef PACKET_HAS_MASTER
546 #error Please define PACKET_HAS_MASTER
547 #endif
548
549 #ifndef PACKET_HAS_SLAVE
550 #error Please define PACKET_HAS_SLAVE
551 #endif
552
553 #ifndef HAS_MONITOR
554 #error Please define HAS_MONITOR
555 #endif
556
557 #if HAS_MONITOR
558 #ifndef HAS_RSSI
559 #error Please define HAS_RSSI
560 #endif
561 #endif
562
563 #ifndef HAS_ADC
564 #error Please define HAS_ADC
565 #endif
566
567 #if HAS_ADC
568
569 #if HAS_ACCEL
570 #ifndef HAS_ACCEL_REF
571 #error Please define HAS_ACCEL_REF
572 #endif
573 #else
574 #define HAS_ACCEL_REF 0
575 #endif
576
577 #endif /* HAS_ADC */
578
579 #if IGNITE_ON_P2
580 #define AO_IGNITER_PORT         P2
581 #define AO_IGNITER_DROGUE_PORT  AO_IGNITER_PORT
582 #define AO_IGNITER_DROGUE       P2_3
583 #define AO_IGNITER_MAIN         P2_4
584 #define AO_IGNITER_DIR          P2DIR
585 #define AO_IGNITER_DROGUE_BIT   (1 << 3)
586 #define AO_IGNITER_MAIN_BIT     (1 << 4)
587 #define AO_IGNITER_DROGUE_PIN   3
588 #define AO_IGNITER_MAIN_PIN     4
589 #endif
590
591 #if IGNITE_ON_P0
592 #define AO_IGNITER_PORT         P0
593 #define AO_IGNITER_DROGUE       P0_5
594 #define AO_IGNITER_MAIN         P0_4
595 #define AO_IGNITER_DIR          P0DIR
596 #define AO_IGNITER_DROGUE_BIT   (1 << 5)
597 #define AO_IGNITER_MAIN_BIT     (1 << 4)
598 #define AO_IGNITER_DROGUE_PIN   5
599 #define AO_IGNITER_MAIN_PIN     4
600 #endif
601
602 #define AO_IGNITER_DROGUE_PORT  AO_IGNITER_PORT
603 #define AO_IGNITER_MAIN_PORT    AO_IGNITER_PORT
604
605 /* test these values with real igniters */
606 #define AO_IGNITER_OPEN         1000
607 #define AO_IGNITER_CLOSED       7000
608 #define AO_IGNITER_FIRE_TIME    AO_MS_TO_TICKS(50)
609 #define AO_IGNITER_CHARGE_TIME  AO_MS_TO_TICKS(2000)
610
611 struct ao_adc {
612         int16_t         accel;          /* accelerometer */
613         int16_t         pres;           /* pressure sensor */
614         int16_t         temp;           /* temperature sensor */
615         int16_t         v_batt;         /* battery voltage */
616         int16_t         sense_d;        /* drogue continuity sense */
617         int16_t         sense_m;        /* main continuity sense */
618 #if HAS_ACCEL_REF
619         uint16_t        accel_ref;      /* acceleration reference */
620 #endif
621 };
622
623 /*
624  * Voltage divider on ADC battery sampler
625  */
626 #define AO_BATTERY_DIV_PLUS     5       /* 5k */
627 #define AO_BATTERY_DIV_MINUS    10      /* 10k */
628
629 /*
630  * Voltage divider on ADC igniter samplers
631  */
632 #define AO_IGNITE_DIV_PLUS      100     /* 100k */
633 #define AO_IGNITE_DIV_MINUS     27      /* 27k */
634
635 /*
636  * ADC reference in decivolts
637  */
638 #define AO_ADC_REFERENCE_DV     33
639
640 #endif /* _AO_PINS_H_ */