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