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; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
22 #if defined(TELESHIELD_V_0_1)
26 #define HAS_SERIAL_1 1
27 #define HAS_SERIAL_1_ALT_1 1
28 #define HAS_SERIAL_1_ALT_2 0
29 #define HAS_SERIAL_1_HW_FLOW 1
30 #define USE_SERIAL_1_STDIN 1
31 #define HAS_SERIAL_0 1
32 #define HAS_SERIAL_0_ALT_1 0
33 #define HAS_SERIAL_0_ALT_2 1
34 #define HAS_SERIAL_0_HW_FLOW 0
39 #define USE_INTERNAL_FLASH 1
43 #define IGNITE_ON_P2 0
44 #define IGNITE_ON_P0 0
45 #define PACKET_HAS_MASTER 0
46 #define PACKET_HAS_SLAVE 1
48 #define AO_LED_GREEN 2
49 #define AO_MONITOR_LED AO_LED_RED
50 #define AO_BT_LED AO_LED_GREEN
51 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
52 #define SPI_CS_ON_P1 1
53 #define SPI_CS_ON_P0 0
56 #define HAS_IGNITE_REPORT 0
57 #define BT_LINK_ON_P2 0
58 #define BT_LINK_ON_P1 1
59 #define BT_LINK_PIN_INDEX 7
60 #define BT_LINK_PIN P1_7
62 #define LEGACY_MONITOR 0
66 #define HAS_TELEMETRY 0
71 #define DBG_CLOCK (1 << 4) /* mi0 */
72 #define DBG_DATA (1 << 5) /* mo0 */
73 #define DBG_RESET_N (1 << 3) /* c0 */
75 #define DBG_CLOCK_PIN (P1_4)
76 #define DBG_DATA_PIN (P1_5)
77 #define DBG_RESET_N_PIN (P1_3)
79 #define DBG_PORT_NUM 1
81 #define DBG_PORT_SEL P1SEL
82 #define DBG_PORT_INP P1INP
83 #define DBG_PORT_DIR P1DIR
85 #endif /* DBG_ON_P1 */
89 #define DBG_CLOCK (1 << 3)
90 #define DBG_DATA (1 << 4)
91 #define DBG_RESET_N (1 << 5)
93 #define DBG_CLOCK_PIN (P0_3)
94 #define DBG_DATA_PIN (P0_4)
95 #define DBG_RESET_N_PIN (P0_5)
97 #define DBG_PORT_NUM 0
99 #define DBG_PORT_SEL P0SEL
100 #define DBG_PORT_INP P0INP
101 #define DBG_PORT_DIR P0DIR
103 #endif /* DBG_ON_P0 */
105 #if COMPANION_CS_ON_P1
106 #define COMPANION_CS_PORT P1
107 #define COMPANION_CS_SEL P1SEL
108 #define COMPANION_CS_DIR P1DIR
112 #define SPI_CS_PORT P1
113 #define SPI_CS_SEL P1SEL
114 #define SPI_CS_DIR P1DIR
118 #define SPI_CS_PORT P0
119 #define SPI_CS_SEL P0SEL
120 #define SPI_CS_DIR P0DIR
124 #error Please define IGNITE_ON_P2
128 #error Please define IGNITE_ON_P0
132 #error Please define HAS_SERIAL_1
136 #error Please define HAS_ADC
140 #error Please define HAS_EEPROM
144 #error Please define HAS_LOG
148 #ifndef USE_INTERNAL_FLASH
149 #error Please define USE_INTERNAL_FLASH
154 #error Please define HAS_DBG
158 #error Please define HAS_IGNITE
162 #define HAS_IGNITE_REPORT 1
165 #ifndef PACKET_HAS_MASTER
166 #error Please define PACKET_HAS_MASTER
169 #ifndef PACKET_HAS_SLAVE
170 #error Please define PACKET_HAS_SLAVE
174 #error Please define HAS_MONITOR
179 #error Please define HAS_RSSI
184 #error Please define HAS_ADC
190 #ifndef HAS_ACCEL_REF
191 #error Please define HAS_ACCEL_REF
194 #define HAS_ACCEL_REF 0
200 #define AO_IGNITER_DROGUE P2_3
201 #define AO_IGNITER_MAIN P2_4
202 #define AO_IGNITER_DIR P2DIR
203 #define AO_IGNITER_DROGUE_BIT (1 << 3)
204 #define AO_IGNITER_MAIN_BIT (1 << 4)
208 #define AO_IGNITER_DROGUE P0_5
209 #define AO_IGNITER_MAIN P0_4
210 #define AO_IGNITER_DIR P0DIR
211 #define AO_IGNITER_DROGUE_BIT (1 << 5)
212 #define AO_IGNITER_MAIN_BIT (1 << 4)
215 /* test these values with real igniters */
216 #define AO_IGNITER_OPEN 1000
217 #define AO_IGNITER_CLOSED 7000
218 #define AO_IGNITER_FIRE_TIME AO_MS_TO_TICKS(50)
219 #define AO_IGNITER_CHARGE_TIME AO_MS_TO_TICKS(2000)
222 ao_ardu_serial_init (void);
225 #endif /* _AO_PINS_H_ */