*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
#define HAS_FLIGHT 1
#define HAS_USB 1
#define HAS_BEEP 1
+ #define HAS_BATTERY_REPORT 1
#define HAS_GPS 1
#define HAS_SERIAL_1 1
- #define USE_SERIAL_STDIN 0
#define HAS_ADC 1
#define HAS_EEPROM 1
#define HAS_LOG 1
#define PACKET_HAS_SLAVE 1
#define HAS_COMPANION 1
- #define COMPANION_CS_ON_P1 1
- #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
- #define COMPANION_CS P1_2
+ #define AO_COMPANION_CS_PORT P1
+ #define AO_COMPANION_CS_PIN 2
+ #define AO_COMPANION_CS P1_2
#define AO_LED_RED 1
#define LEDS_AVAILABLE (AO_LED_RED)
#define HAS_ACCEL_REF 1
#define SPI_CS_ON_P1 1
#define SPI_CS_ON_P0 0
- #define M25_CS_MASK 0x02 /* CS0 is P1_1 */
+ #define AO_M25_SPI_CS_MASK 0x02 /* CS0 is P1_1 */
#define M25_MAX_CHIPS 1
#define HAS_ACCEL 1
#define HAS_IGNITE 0
#define SPI_CS_DIR P0DIR
#endif
+#define AO_M25_SPI_CS_PORT SPI_CS_PORT
+
#ifndef IGNITE_ON_P2
#error Please define IGNITE_ON_P2
#endif
#error Please define HAS_SERIAL_1
#endif
-#ifndef USE_SERIAL_STDIN
-#error Please define USE_SERIAL_STDIN
-#endif
-
#ifndef HAS_ADC
#error Please define HAS_ADC
#endif
#define AO_IGNITER_FIRE_TIME AO_MS_TO_TICKS(50)
#define AO_IGNITER_CHARGE_TIME AO_MS_TO_TICKS(2000)
+struct ao_adc {
+ int16_t accel; /* accelerometer */
+ int16_t pres; /* pressure sensor */
+ int16_t temp; /* temperature sensor */
+ int16_t v_batt; /* battery voltage */
+ int16_t sense_d; /* drogue continuity sense */
+ int16_t sense_m; /* main continuity sense */
+#if HAS_ACCEL_REF
+ uint16_t accel_ref; /* acceleration reference */
+#endif
+};
+
#endif /* _AO_PINS_H_ */