X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Ftelegps-v0.1%2Fao_pins.h;h=5afc9498c7d22bcdd01d1032ba85e86a5cf602b1;hp=77b2373dad70ce31a6f1fa9891ac4e2235ecde3e;hb=2f87e182d9f0b3c2856f62149371ad70b16148cf;hpb=50dd268a715224a01f8a6b481670a4ae6621cb28 diff --git a/src/telegps-v0.1/ao_pins.h b/src/telegps-v0.1/ao_pins.h index 77b2373d..5afc9498 100644 --- a/src/telegps-v0.1/ao_pins.h +++ b/src/telegps-v0.1/ao_pins.h @@ -3,7 +3,8 @@ * * 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 @@ -64,17 +65,28 @@ #define ao_gps_set_speed ao_serial2_set_speed #define ao_gps_fifo (ao_stm_usart2.rx_fifo) -#define HAS_EEPROM 0 +#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 0 -#define HAS_RADIO 0 -#define HAS_TELEMETRY 0 +#define HAS_RADIO 1 +#define HAS_TELEMETRY 1 +#define HAS_APRS 1 +#define HAS_RADIO_RECV 0 -#define HAS_SPI_1 0 -#define SPI_1_PA5_PA6_PA7 0 +#define HAS_SPI_1 1 +#define SPI_1_PA5_PA6_PA7 1 /* SD card */ #define SPI_1_PB3_PB4_PB5 0 #define SPI_1_PE13_PE14_PE15 0 +#define SPI_1_OSPEEDR STM_OSPEEDR_10MHz + +#define SPI_1_PORT (&stm_gpioa) +#define SPI_1_SCK_PIN 5 +#define SPI_1_MISO_PIN 6 +#define SPI_1_MOSI_PIN 7 #define HAS_SPI_2 1 #define SPI_2_PB13_PB14_PB15 1 /* CC115L */ @@ -108,7 +120,7 @@ #define LEDS_AVAILABLE (AO_LED_RED | AO_LED_GREEN) -#define HAS_GPS 0 +#define HAS_GPS 1 #define HAS_FLIGHT 0 #define HAS_ADC 0 #define HAS_LOG 0 @@ -122,37 +134,58 @@ #define AO_MONITOR_LED AO_LED_GREEN /* - * Radio (cc115) + * Radio (cc115l) */ /* gets pretty close to 434.550 */ -#define AO_RADIO_CAL_DEFAULT 0x6ca333 +#define AO_RADIO_CAL_DEFAULT 0x10b6a5 + +#define HAS_RADIO_POWER 1 #define AO_FEC_DEBUG 0 -#define AO_CC1120_SPI_CS_PORT (&stm_gpioa) -#define AO_CC1120_SPI_CS_PIN 0 -#define AO_CC1120_SPI_BUS AO_SPI_2_PB13_PB14_PB15 -#define AO_CC1120_SPI stm_spi2 +#define AO_CC115L_SPI_CS_PORT (&stm_gpiob) +#define AO_CC115L_SPI_CS_PIN 12 +#define AO_CC115L_SPI_BUS AO_SPI_2_PB13_PB14_PB15 +#define AO_CC115L_SPI stm_spi2 +#define AO_CC115L_SPI_SPEED AO_SPI_SPEED_4MHz -#define AO_CC1120_INT_PORT (&stm_gpioc) -#define AO_CC1120_INT_PIN 13 +#define AO_CC115L_FIFO_INT_GPIO_IOCFG CC115L_IOCFG2 +#define AO_CC115L_FIFO_INT_PORT (&stm_gpioa) +#define AO_CC115L_FIFO_INT_PIN (9) -#define AO_CC1120_MCU_WAKEUP_PORT (&stm_gpioc) -#define AO_CC1120_MCU_WAKEUP_PIN (0) +#define AO_CC115L_DONE_INT_GPIO_IOCFG CC115L_IOCFG0 +#define AO_CC115L_DONE_INT_PORT (&stm_gpioa) +#define AO_CC115L_DONE_INT_PIN (10) -#define AO_CC1120_INT_GPIO 2 -#define AO_CC1120_INT_GPIO_IOCFG CC1120_IOCFG2 +#define HAS_RADIO_AMP 1 + +/* + * Power amplifier (RFPA0133) + */ -#define AO_CC1120_MARC_GPIO 3 -#define AO_CC1120_MARC_GPIO_IOCFG CC1120_IOCFG3 +#define AO_PA_POWER_GPIO (&stm_gpiob) +#define AO_PA_POWER_PIN 1 +#define AO_PA_GAIN_8_GPIO (&stm_gpiob) +#define AO_PA_GAIN_8_PIN 10 +#define AO_PA_GAIN_16_GPIO (&stm_gpiob) +#define AO_PA_GAIN_16_PIN 11 /* - * Profiling Viterbi decoding + * SD card */ -#ifndef AO_PROFILE -#define AO_PROFILE 0 -#endif +#define AO_SDCARD_SPI_BUS AO_SPI_1_PA5_PA6_PA7 +#define AO_SDCARD_SPI_PORT SPI_1_PORT +#define AO_SDCARD_SPI_SCK_PIN SPI_1_SCK_PIN +#define AO_SDCARD_SPI_MISO_PIN SPI_1_MISO_PIN +#define AO_SDCARD_SPI_MOSI_PIN SPI_1_MOSI_PIN +#define AO_SDCARD_SPI_CS_PORT (&stm_gpioa) +#define AO_SDCARD_SPI_CS_PIN 4 +#define AO_SDCARD_SPI stm_spi1 + +#define SDCARD_DEBUG 1 +#define SDCARD_WARN 1 +#define SDCARD_TRACE 1 #endif /* _AO_PINS_H_ */