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