X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Ftelemini-v3.0%2Fao_pins.h;h=0551e1fcbb0707150390d4e5522634345c6c05fd;hp=6672a8daa469cd8509c6b83332e9cd46252045dd;hb=2b014fe9fa64e7aead586bc682251346d000c8cc;hpb=efdeb402d04e7f04ad4bd2764f8f1ca7270b3dff diff --git a/src/telemini-v3.0/ao_pins.h b/src/telemini-v3.0/ao_pins.h index 6672a8da..0551e1fc 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 @@ -16,11 +17,10 @@ */ #define HAS_BEEP 1 +#define HAS_SERIAL_1 0 #define HAS_BATTERY_REPORT 1 -#define AO_STACK_SIZE 384 - -#define RELOCATE_INTERRUPT 0 +#define AO_STACK_SIZE 448 #define IS_FLASH_LOADER 0 @@ -40,13 +40,15 @@ #define AO_APB_PRESCALER 1 #define AO_RCC_CFGR_PPRE_DIV STM_RCC_CFGR_PPRE_DIV_1 -#define HAS_USB 0 +#define HAS_USB 1 #define AO_USB_DIRECTIO 0 -#define AO_PA11_PA12_RMP 0 +#define AO_PA11_PA12_RMP 1 +#define AO_USB_FORCE_IDLE 1 #define PACKET_HAS_SLAVE 1 -#define AO_LOG_FORMAT AO_LOG_FORMAT_EASYMINI +#define AO_LOG_FORMAT AO_LOG_FORMAT_TELEMINI3 +#define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX ((uint32_t) 112 * (uint32_t) 1024) #define HAS_BOOT_RADIO 0 @@ -57,59 +59,47 @@ #define HAS_FLIGHT 1 #define HAS_EEPROM 1 #define HAS_TELEMETRY 1 +#define AO_SEND_MINI AO_TELEMETRY_MINI3 #define HAS_APRS 0 #define HAS_LOG 1 #define USE_INTERNAL_FLASH 0 #define HAS_IGNITE 1 #define HAS_IGNITE_REPORT 1 +#define AO_SMALL_ALTITUDE_TABLE 1 /* Beeper is on Tim1 CH3 */ -#define BEEPER_CHANNEL 3 - -/* LED */ -#define LED_PORT_ENABLE STM_RCC_AHBENR_IOPAEN -#define LED_PORT (&stm_gpioa) -#define LED_PIN_GREEN 15 -#define AO_LED_GREEN (1 << 15) -#define AO_LED_PANIC AO_LED_GREEN - -#define LEDS_AVAILABLE AO_LED_GREEN - -/* USART */ - -#define HAS_SERIAL 0 -#define USE_SERIAL_0_STDIN 1 -#define SERIAL_0_18_19 1 -#define SERIAL_0_14_15 0 -#define SERIAL_0_17_18 0 -#define SERIAL_0_26_27 0 +#define BEEPER_CHANNEL 4 +#define BEEPER_TIMER 2 +#define BEEPER_PORT (&stm_gpioa) +#define BEEPER_PIN 3 /* SPI */ #define HAS_SPI_1 1 -#define SPI_SCK1_P1_15 1 -#define SPI_MISO1_P0_22 1 -#define SPI_MOSI1_P0_21 1 +#define SPI_1_PA5_PA6_PA7 1 +#define SPI_1_PB3_PB4_PB5 1 +#define SPI_1_OSPEEDR STM_OSPEEDR_MEDIUM /* M25 */ #define M25_MAX_CHIPS 1 #define AO_M25_SPI_CS_PORT (&stm_gpioa) -#define AO_M25_SPI_CS_MASK (1 << 3) +#define AO_M25_SPI_CS_MASK (1 << 4) #define AO_M25_SPI_BUS AO_SPI_1_PA5_PA6_PA7 /* MS5607 */ #define HAS_MS5607 1 #define HAS_MS5611 0 -#define AO_MS5607_PRIVATE_PINS 0 +#define AO_MS5607_PRIVATE_PINS 1 #define AO_MS5607_CS_PORT (&stm_gpioa) -#define AO_MS5607_CS_PIN 4 +#define AO_MS5607_CS_PIN 15 #define AO_MS5607_CS_MASK (1 << AO_MS5607_CS_PIN) #define AO_MS5607_MISO_PORT (&stm_gpiob) #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 */ @@ -117,10 +107,12 @@ #define AO_RADIO_CAL_DEFAULT 5695717 #define AO_FEC_DEBUG 0 +#define CC1200_DEBUG 0 #define AO_CC1200_SPI_CS_PORT (&stm_gpiob) #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 @@ -137,13 +129,13 @@ #define HAS_ADC 1 -#define AO_ADC_PIN0_PORT (&stm_gpioa) +#define AO_ADC_PIN0_PORT (&stm_gpioa) /* sense_m */ #define AO_ADC_PIN0_PIN 0 #define AO_ADC_PIN0_CH 0 -#define AO_ADC_PIN1_PORT (&stm_gpioa) +#define AO_ADC_PIN1_PORT (&stm_gpioa) /* sense_a */ #define AO_ADC_PIN1_PIN 1 #define AO_ADC_PIN1_CH 1 -#define AO_ADC_PIN2_PORT (&stm_gpioa) +#define AO_ADC_PIN2_PORT (&stm_gpioa) /* v_batt */ #define AO_ADC_PIN2_PIN 2 #define AO_ADC_PIN2_CH 2 @@ -152,8 +144,8 @@ #define AO_NUM_ADC 3 struct ao_adc { - int16_t sense_a; int16_t sense_m; + int16_t sense_a; int16_t v_batt; };