X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Feasymega-v1.0%2Fao_pins.h;h=d6490ba59cb34866d91170418530e21960e6f780;hb=3842735e303f0bf6f46ed8cb659c92d8bb9bd137;hp=0b6c0f0700813d1dfe5eab91ca6469d51afce89e;hpb=ca0bf9fb2d6323d7a454e5ce04b48d11366eee67;p=fw%2Faltos diff --git a/src/easymega-v1.0/ao_pins.h b/src/easymega-v1.0/ao_pins.h index 0b6c0f07..d6490ba5 100644 --- a/src/easymega-v1.0/ao_pins.h +++ b/src/easymega-v1.0/ao_pins.h @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Keith Packard + * Copyright © 2014 Bdale Garbee * * 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 @@ -46,7 +46,7 @@ #define HAS_SERIAL_1 0 #define USE_SERIAL_1_STDIN 0 #define SERIAL_1_PB6_PB7 0 -#define SERIAL_1_PA9_PA10 1 +#define SERIAL_1_PA9_PA10 0 #define HAS_SERIAL_2 0 #define USE_SERIAL_2_STDIN 0 @@ -56,16 +56,25 @@ #define HAS_SERIAL_3 0 #define USE_SERIAL_3_STDIN 0 #define SERIAL_3_PB10_PB11 0 -#define SERIAL_3_PC10_PC11 1 +#define SERIAL_3_PC10_PC11 0 #define SERIAL_3_PD8_PD9 0 +#define ao_gps_getchar ao_serial1_getchar +#define ao_gps_putchar ao_serial1_putchar +#define ao_gps_set_speed ao_serial1_set_speed +#define ao_gps_fifo (ao_stm_usart1.rx_fifo) + #define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX (1024 * 1024) +#define AO_CONFIG_MAX_SIZE 1024 +#define LOG_ERASE_MARK 0x55 +#define LOG_MAX_ERASE 128 #define HAS_EEPROM 1 #define USE_INTERNAL_FLASH 0 #define USE_EEPROM_CONFIG 1 #define USE_STORAGE_CONFIG 0 #define HAS_USB 1 #define HAS_BEEP 1 +#define HAS_BATTERY_REPORT 1 #define HAS_RADIO 0 #define HAS_TELEMETRY 0 #define HAS_APRS 0 @@ -73,7 +82,7 @@ #define HAS_SPI_1 1 #define SPI_1_PA5_PA6_PA7 1 /* Barometer */ #define SPI_1_PB3_PB4_PB5 1 /* Accelerometer, Gyro */ -#define SPI_1_PE13_PE14_PE15 0 +#define SPI_1_PE13_PE14_PE15 0 #define SPI_1_OSPEEDR STM_OSPEEDR_10MHz #define HAS_SPI_2 1 @@ -81,12 +90,10 @@ #define SPI_2_PD1_PD3_PD4 0 #define SPI_2_OSPEEDR STM_OSPEEDR_10MHz -#if 0 #define SPI_2_PORT (&stm_gpiob) #define SPI_2_SCK_PIN 13 #define SPI_2_MISO_PIN 14 #define SPI_2_MOSI_PIN 15 -#endif #define HAS_I2C_1 1 #define I2C_1_PB8_PB9 1 @@ -99,7 +106,7 @@ #define LOW_LEVEL_DEBUG 0 -#define LED_PORT_ENABLE STM_RCC_AHBENR_GPIOCEN +#define LED_PORT_ENABLE STM_RCC_AHBENR_GPIOAEN #define LED_PORT (&stm_gpioa) #define LED_PIN_RED 9 #define LED_PIN_GREEN 10 @@ -199,7 +206,7 @@ struct ao_adc { #define AO_ADC_SENSE_MAIN 10 #define AO_ADC_SENSE_MAIN_PORT (&stm_gpioc) -#define AO_ADC_SENSE_MAIN_PIN 0 +#define AO_ADC_SENSE_MAIN_PIN 0 #define AO_ADC_V_BATT 8 #define AO_ADC_V_BATT_PORT (&stm_gpiob) @@ -211,7 +218,8 @@ struct ao_adc { #define AO_ADC_TEMP 16 -#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_GPIOEEN) | \ +#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_GPIOAEN) | \ + (1 << STM_RCC_AHBENR_GPIOEEN) | \ (1 << STM_RCC_AHBENR_GPIOBEN)) #define AO_NUM_ADC_PIN (AO_ADC_NUM_SENSE + 2) @@ -270,10 +278,10 @@ struct ao_adc { #define AO_MS5607_PRIVATE_PINS 1 #define AO_MS5607_CS_PORT (&stm_gpioa) #define AO_MS5607_CS_PIN 3 -#define AO_MS5607_CS_MASK (1 << AO_MS5607_CS) +#define AO_MS5607_CS_MASK (1 << AO_MS5607_CS_PIN) #define AO_MS5607_MISO_PORT (&stm_gpioa) #define AO_MS5607_MISO_PIN 6 -#define AO_MS5607_MISO_MASK (1 << AO_MS5607_MISO) +#define AO_MS5607_MISO_MASK (1 << AO_MS5607_MISO_PIN) #define AO_MS5607_SPI_INDEX AO_SPI_1_PA5_PA6_PA7 /* @@ -282,7 +290,8 @@ struct ao_adc { #define M25_MAX_CHIPS 1 #define AO_M25_SPI_CS_PORT (&stm_gpiob) -#define AO_M25_SPI_CS_MASK (1 << 12) +#define AO_M25_SPI_CS_PIN 12 +#define AO_M25_SPI_CS_MASK (1 << AO_M25_SPI_CS_PIN) #define AO_M25_SPI_BUS AO_SPI_2_PB13_PB14_PB15 /*