2 * Copyright © 2015 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 #define LED_PORT_ENABLE STM_RCC_AHBENR_IOPAEN
22 #define LED_PORT (&stm_gpioa)
24 #define AO_LED_RED (1 << LED_PIN_RED)
26 #define LEDS_AVAILABLE (AO_LED_RED)
30 /* 48MHz clock based on USB */
32 #define AO_HSE 16000000
33 #define AO_RCC_CFGR_PLLMUL STM_RCC_CFGR_PLLMUL_3
38 #define AO_AHB_PRESCALER 1
39 #define AO_RCC_CFGR_HPRE_DIV STM_RCC_CFGR_HPRE_DIV_1
42 #define AO_APB_PRESCALER 1
43 #define AO_RCC_CFGR_PPRE_DIV STM_RCC_CFGR_PPRE_DIV_1
46 #define AO_USB_DIRECTIO 0
47 #define AO_PA11_PA12_RMP 1
49 #define IS_FLASH_LOADER 0
51 #define AO_DATA_RING 16
61 #define AO_LOG_FORMAT AO_LOG_FORMAT_DETHERM
63 #define USE_INTERNAL_FLASH 0
68 #define SPI_1_PA5_PA6_PA7 1
69 #define SPI_1_PB3_PB4_PB5 1
70 #define SPI_1_OSPEEDR STM_OSPEEDR_HIGH
75 #define AO_MS5607_CS_PORT (&stm_gpioa)
76 #define AO_MS5607_CS_PIN 0
77 #define AO_MS5607_SPI_INDEX AO_SPI_1_PB3_PB4_PB5
78 #define AO_MS5607_MISO_PORT (&stm_gpiob)
79 #define AO_MS5607_MISO_PIN 4
80 #define AO_MS5607_PRIVATE_PINS 1
81 #define AO_MS5607_SPI_SPEED AO_SPI_SPEED_6MHz
85 #define M25_MAX_CHIPS 1
86 #define AO_M25_SPI_CS_PORT (&stm_gpioa)
87 #define AO_M25_SPI_CS_MASK (1 << 4)
88 #define AO_M25_SPI_BUS AO_SPI_1_PA5_PA6_PA7
93 #define AO_PWM_TIMER (&stm_tim3)
94 #define AO_PWM_0_GPIO (&stm_gpiob)
95 #define AO_PWM_0_PIN 1
98 #define AO_PWM_TIMER_ENABLE STM_RCC_APB1ENR_TIM3EN
99 #define AO_PWM_TIMER_SCALE 32
103 #define AO_SERVO_DIR_PORT (&stm_gpiob)
104 #define AO_SERVO_DIR_BIT 0
105 #define AO_SERVO_SPEED_PWM 0
108 #define AO_SERVO_LIMIT_FORE_PORT (&stm_gpiob)
109 #define AO_SERVO_LIMIT_FORE_BIT 6
112 #define AO_SERVO_LIMIT_BACK_PORT (&stm_gpiob)
113 #define AO_SERVO_LIMIT_BACK_BIT 7
115 #endif /* _AO_PINS_H_ */