X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Ftelemini-v3.0%2Fao_pins.h;h=28b3540bb88d910cc05c636bceecbdd3f35b0d56;hp=351d28d8c502e7d3c3cf72003d76853ff431e506;hb=7f46240dfc57164f0c1b0c4c4ed9695bca63860d;hpb=d1ba276c6e54564f82920f65bf4c19df85c9ea56 diff --git a/src/telemini-v3.0/ao_pins.h b/src/telemini-v3.0/ao_pins.h index 351d28d8..28b3540b 100644 --- a/src/telemini-v3.0/ao_pins.h +++ b/src/telemini-v3.0/ao_pins.h @@ -1,9 +1,10 @@ /* - * Copyright © 2013 Keith Packard + * Copyright © 2017 Keith Packard * * 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 @@ -66,7 +67,14 @@ #define HAS_IGNITE_REPORT 1 #define AO_SMALL_ALTITUDE_TABLE 1 -/* Beeper is on Tim1 CH3 */ +/* Use debug connector clock for recovery mode */ +#define HAS_FORCE_FREQ 1 +#define AO_RECOVERY_PORT (&stm_gpioa) +#define AO_RECOVERY_PIN 14 +#define AO_RECOVERY_VALUE 0 +#define AO_RECOVERY_MODE AO_EXTI_MODE_PULL_UP + +/* Beeper is on Tim2 CH4 */ #define BEEPER_CHANNEL 4 #define BEEPER_TIMER 2 #define BEEPER_PORT (&stm_gpioa) @@ -98,7 +106,6 @@ #define AO_MS5607_MISO_PIN 4 #define AO_MS5607_MISO_MASK (1 << AO_MS5607_MISO_PIN) #define AO_MS5607_SPI_INDEX AO_SPI_1_PB3_PB4_PB5 -#define AO_MS5607_SPI_SPEED AO_SPI_SPEED_12MHz /* CC1200 */ @@ -111,7 +118,6 @@ #define AO_CC1200_SPI_CS_PIN 0 #define AO_CC1200_SPI_BUS AO_SPI_1_PA5_PA6_PA7 #define AO_CC1200_SPI stm_spi1 -#define AO_CC1200_SPI_SPEED AO_SPI_SPEED_12MHz #define AO_CC1200_INT_PORT (&stm_gpiob) #define AO_CC1200_INT_PIN 1 @@ -157,17 +163,15 @@ struct ao_adc { #define AO_IGNITER_DROGUE_PORT (&stm_gpiob) #define AO_IGNITER_DROGUE_PIN 7 -#define AO_IGNITER_SET_DROGUE(v) ao_gpio_set(AO_IGNITER_DROGUE_PORT, AO_IGNITER_DROGUE_PIN, AO_IGNITER_DROGUE, v) #define AO_IGNITER_MAIN_PORT (&stm_gpiob) #define AO_IGNITER_MAIN_PIN 6 -#define AO_IGNITER_SET_MAIN(v) ao_gpio_set(AO_IGNITER_MAIN_PORT, AO_IGNITER_MAIN_PIN, AO_IGNITER_MAIN, v) #define AO_SENSE_DROGUE(p) ((p)->adc.sense_a) #define AO_SENSE_MAIN(p) ((p)->adc.sense_m) #define AO_ADC_DUMP(p) \ - printf("tick: %5u apogee: %5d main: %5d batt: %5d\n", \ + printf("tick: %5lu apogee: %5d main: %5d batt: %5d\n", \ (p)->tick, (p)->adc.sense_a, (p)->adc.sense_m, (p)->adc.v_batt) /*