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
117 #if defined(TELEMINI_V_1_0)
122 #define HAS_SERIAL_1 0
123 #define USE_SERIAL_STDIN 0
127 #define USE_INTERNAL_FLASH 1
129 #define IGNITE_ON_P2 0
130 #define IGNITE_ON_P0 1
131 #define PACKET_HAS_MASTER 0
132 #define PACKET_HAS_SLAVE 1
133 #define USE_FAST_ASCENT_LOG 1
135 #define AO_LED_GREEN 1
137 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
138 #define HAS_EXTERNAL_TEMP 0
141 #define HAS_MONITOR 0
144 #if defined(TELENANO_V_0_1)
149 #define HAS_SERIAL_1 0
150 #define USE_SERIAL_STDIN 0
154 #define USE_INTERNAL_FLASH 1
156 #define IGNITE_ON_P2 0
157 #define IGNITE_ON_P0 1
158 #define PACKET_HAS_MASTER 0
159 #define PACKET_HAS_SLAVE 1
161 #define AO_LED_GREEN 1
163 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
164 #define HAS_EXTERNAL_TEMP 0
167 #define HAS_MONITOR 0
170 #if defined(TELEMETRUM_V_0_1)
175 #define HAS_SERIAL_1 1
176 #define USE_SERIAL_STDIN 0
181 #define USE_INTERNAL_FLASH 0
184 #define IGNITE_ON_P2 1
185 #define IGNITE_ON_P0 0
186 #define PACKET_HAS_MASTER 0
187 #define PACKET_HAS_SLAVE 1
189 #define AO_LED_GREEN 1
190 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
191 #define HAS_EXTERNAL_TEMP 1
192 #define HAS_ACCEL_REF 0
193 #define SPI_CS_ON_P1 1
194 #define SPI_CS_ON_P0 0
197 #define HAS_MONITOR 0
200 #if defined(TELEDONGLE_V_0_1)
204 #define HAS_SERIAL_1 0
205 #define USE_SERIAL_STDIN 0
212 #define IGNITE_ON_P2 0
213 #define IGNITE_ON_P0 0
214 #define PACKET_HAS_MASTER 1
215 #define PACKET_HAS_SLAVE 0
217 #define AO_LED_GREEN 1
218 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
219 #define SPI_CS_ON_P1 0
220 #define SPI_CS_ON_P0 1
222 #define HAS_MONITOR 1
226 #if defined(TIDONGLE)
230 #define HAS_SERIAL_1 0
231 #define USE_SERIAL_STDIN 0
238 #define IGNITE_ON_P2 0
239 #define IGNITE_ON_P0 0
240 #define PACKET_HAS_MASTER 1
241 #define PACKET_HAS_SLAVE 0
243 #define LEDS_AVAILABLE (AO_LED_RED)
244 #define SPI_CS_ON_P1 0
245 #define SPI_CS_ON_P0 1
247 #define HAS_MONITOR 1
251 #if defined(TELEBT_V_0_0)
255 #define HAS_SERIAL_1 1
256 #define USE_SERIAL_STDIN 1
264 #define IGNITE_ON_P2 0
265 #define IGNITE_ON_P0 0
266 #define PACKET_HAS_MASTER 1
267 #define PACKET_HAS_SLAVE 0
269 #define AO_LED_GREEN 1
270 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
271 #define SPI_CS_ON_P1 1
272 #define SPI_CS_ON_P0 0
274 #define BT_LINK_ON_P2 1
275 #define BT_LINK_ON_P1 0
276 #define BT_LINK_PIN_INDEX 7
277 #define BT_LINK_PIN P2_1
278 #define HAS_MONITOR 1
282 #if defined(TELEBT_V_0_1)
286 #define HAS_SERIAL_1 1
287 #define HAS_SERIAL_1_ALT_1 1
288 #define HAS_SERIAL_1_ALT_2 0
289 #define HAS_SERIAL_1_HW_FLOW 1
290 #define USE_SERIAL_STDIN 1
295 #define USE_INTERNAL_FLASH 0
299 #define IGNITE_ON_P2 0
300 #define IGNITE_ON_P0 0
301 #define PACKET_HAS_MASTER 1
302 #define PACKET_HAS_SLAVE 0
304 #define AO_LED_GREEN 2
305 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
306 #define SPI_CS_ON_P1 1
307 #define SPI_CS_ON_P0 0
308 #define M25_CS_MASK 0x04 /* CS0 is P1_2 */
309 #define M25_MAX_CHIPS 1
312 #define BT_LINK_ON_P2 0
313 #define BT_LINK_ON_P1 1
314 #define BT_LINK_PIN_INDEX 7
315 #define BT_LINK_PIN P1_7
316 #define HAS_MONITOR 1
320 #if defined(TELELAUNCH_V_0_1)
325 #define HAS_SERIAL_1 1
326 #define USE_SERIAL_STDIN 0
331 #define USE_INTERNAL_FLASH 1
334 #define IGNITE_ON_P2 1
335 #define IGNITE_ON_P0 0
336 #define PACKET_HAS_MASTER 0
337 #define PACKET_HAS_SLAVE 0
339 #define AO_LED_GREEN 1
340 #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
341 #define HAS_EXTERNAL_TEMP 1
342 #define HAS_ACCEL_REF 0
343 #define SPI_CS_ON_P1 1
344 #define SPI_CS_ON_P0 0
347 #define HAS_MONITOR 0
353 #define DBG_CLOCK (1 << 4) /* mi0 */
354 #define DBG_DATA (1 << 5) /* mo0 */
355 #define DBG_RESET_N (1 << 3) /* c0 */
357 #define DBG_CLOCK_PIN (P1_4)
358 #define DBG_DATA_PIN (P1_5)
359 #define DBG_RESET_N_PIN (P1_3)
361 #define DBG_PORT_NUM 1
363 #define DBG_PORT_SEL P1SEL
364 #define DBG_PORT_INP P1INP
365 #define DBG_PORT_DIR P1DIR
367 #endif /* DBG_ON_P1 */
371 #define DBG_CLOCK (1 << 3)
372 #define DBG_DATA (1 << 4)
373 #define DBG_RESET_N (1 << 5)
375 #define DBG_CLOCK_PIN (P0_3)
376 #define DBG_DATA_PIN (P0_4)
377 #define DBG_RESET_N_PIN (P0_5)
379 #define DBG_PORT_NUM 0
381 #define DBG_PORT_SEL P0SEL
382 #define DBG_PORT_INP P0INP
383 #define DBG_PORT_DIR P0DIR
385 #endif /* DBG_ON_P0 */
387 #if COMPANION_CS_ON_P1
388 #define COMPANION_CS_PORT P1
389 #define COMPANION_CS_SEL P1SEL
390 #define COMPANION_CS_DIR P1DIR
394 #define SPI_CS_PORT P1
395 #define SPI_CS_SEL P1SEL
396 #define SPI_CS_DIR P1DIR
400 #define SPI_CS_PORT P0
401 #define SPI_CS_SEL P0SEL
402 #define SPI_CS_DIR P0DIR
406 #error Please define IGNITE_ON_P2
410 #error Please define IGNITE_ON_P0
414 #error Please define HAS_SERIAL_1
417 #ifndef USE_SERIAL_STDIN
418 #error Please define USE_SERIAL_STDIN
422 #error Please define HAS_ADC
426 #error Please define HAS_EEPROM
430 #error Please define HAS_LOG
434 #ifndef USE_INTERNAL_FLASH
435 #error Please define USE_INTERNAL_FLASH
440 #error Please define HAS_DBG
444 #error Please define HAS_IGNITE
447 #ifndef PACKET_HAS_MASTER
448 #error Please define PACKET_HAS_MASTER
451 #ifndef PACKET_HAS_SLAVE
452 #error Please define PACKET_HAS_SLAVE
456 #error Please define HAS_MONITOR
460 #error Please define HAS_ADC
466 #ifndef HAS_ACCEL_REF
467 #error Please define HAS_ACCEL_REF
470 #define HAS_ACCEL_REF 0
476 #define AO_IGNITER_DROGUE P2_3
477 #define AO_IGNITER_MAIN P2_4
478 #define AO_IGNITER_DIR P2DIR
479 #define AO_IGNITER_DROGUE_BIT (1 << 3)
480 #define AO_IGNITER_MAIN_BIT (1 << 4)
484 #define AO_IGNITER_DROGUE P0_5
485 #define AO_IGNITER_MAIN P0_4
486 #define AO_IGNITER_DIR P0DIR
487 #define AO_IGNITER_DROGUE_BIT (1 << 5)
488 #define AO_IGNITER_MAIN_BIT (1 << 4)
491 /* test these values with real igniters */
492 #define AO_IGNITER_OPEN 1000
493 #define AO_IGNITER_CLOSED 7000
494 #define AO_IGNITER_FIRE_TIME AO_MS_TO_TICKS(50)
495 #define AO_IGNITER_CHARGE_TIME AO_MS_TO_TICKS(2000)
497 #endif /* _AO_PINS_H_ */