Go to the documentation of this file.
20 #define USE_QUAD_MIXER_ONLY 0
21 #define TARGET_BOARD_IDENTIFIER "AFNA" // AFroNAze - NAZE might be considered misleading on Naze clones like the flip32.
22 #define USE_HARDWARE_REVISION_DETECTION
24 #define BOARD_HAS_VOLTAGE_DIVIDER
26 #define LED0_GPIO GPIOB
27 #define LED0_PIN Pin_3 // PB3 (LED)
28 #define LED0_PERIPHERAL RCC_APB2Periph_GPIOB
29 #define LED1_GPIO GPIOB
30 #define LED1_PIN Pin_4 // PB4 (LED)
31 #define LED1_PERIPHERAL RCC_APB2Periph_GPIOB
33 #define BEEP_GPIO GPIOA
34 #define BEEP_PIN Pin_12 // PA12 (Beeper)
35 #define BEEP_PERIPHERAL RCC_APB2Periph_GPIOA
37 #define BARO_XCLR_GPIO GPIOC
38 #define BARO_XCLR_PIN Pin_13
39 #define BARO_EOC_GPIO GPIOC
40 #define BARO_EOC_PIN Pin_14
41 #define BARO_APB2_PERIPHERALS RCC_APB2Periph_GPIOC
43 #define INVERTER_PIN Pin_2 // PB2 (BOOT1) abused as inverter select GPIO
44 #define INVERTER_GPIO GPIOB
45 #define INVERTER_PERIPHERAL RCC_APB2Periph_GPIOB
46 #define INVERTER_USART USART2
55 #define USE_SPI_DEVICE_2
57 #define NAZE_SPI_INSTANCE SPI2
58 #define NAZE_SPI_CS_GPIO GPIOB
59 #define NAZE_SPI_CS_PIN GPIO_Pin_12
60 #define NAZE_CS_GPIO_CLK_PERIPHERAL RCC_APB2Periph_GPIOB
63 #define M25P16_CS_GPIO NAZE_SPI_CS_GPIO
64 #define M25P16_CS_PIN NAZE_SPI_CS_PIN
65 #define M25P16_SPI_INSTANCE NAZE_SPI_INSTANCE
67 #define MPU6500_CS_GPIO_CLK_PERIPHERAL NAZE_CS_GPIO_CLK_PERIPHERAL
68 #define MPU6500_CS_GPIO NAZE_SPI_CS_GPIO
69 #define MPU6500_CS_PIN NAZE_SPI_CS_PIN
70 #define MPU6500_SPI_INSTANCE NAZE_SPI_INSTANCE
75 #define USE_FLASH_M25P16
77 #define EXTI_CALLBACK_HANDLER_COUNT 3 // MPU data ready, MAG data ready, BMP085 EOC
80 #define USE_MPU_DATA_READY_SIGNAL
83 #define USE_MAG_DATA_READY_SIGNAL
86 #define USE_GYRO_MPU3050
87 #define USE_GYRO_MPU6050
88 #define USE_GYRO_MPU6500
89 #define USE_GYRO_SPI_MPU6500
92 #define GYRO_MPU3050_ALIGN CW0_DEG
93 #define GYRO_MPU6050_ALIGN CW0_DEG
94 #define GYRO_MPU6500_ALIGN CW0_DEG
97 #define USE_ACC_ADXL345
98 #define USE_ACC_BMA280
99 #define USE_ACC_MMA8452
100 #define USE_ACC_MPU6050
101 #define USE_ACC_MPU6500
102 #define USE_ACC_SPI_MPU6500
104 #define ACC_ADXL345_ALIGN CW270_DEG
105 #define ACC_MPU6050_ALIGN CW0_DEG
106 #define ACC_MMA8452_ALIGN CW90_DEG
107 #define ACC_BMA280_ALIGN CW0_DEG
108 #define ACC_MPU6500_ALIGN CW0_DEG
111 #define USE_BARO_MS5611
112 #define USE_BARO_BMP085
113 #define USE_BARO_BMP280
116 #define USE_MAG_HMC5883
118 #define MAG_HMC5883_ALIGN CW180_DEG
128 #define SONAR_PWM_TRIGGER_PIN Pin_8 // PWM5 (PB8) - 5v tolerant
129 #define SONAR_PWM_TRIGGER_GPIO GPIOB
130 #define SONAR_PWM_ECHO_PIN Pin_9 // PWM6 (PB9) - 5v tolerant
131 #define SONAR_PWM_ECHO_GPIO GPIOB
132 #define SONAR_PWM_EXTI_LINE EXTI_Line9
133 #define SONAR_PWM_EXTI_PIN_SOURCE GPIO_PinSource9
134 #define SONAR_PWM_EXTI_IRQN EXTI9_5_IRQn
135 #define SONAR_TRIGGER_PIN Pin_0 // RX7 (PB0) - only 3.3v ( add a 1K Ohms resistor )
136 #define SONAR_TRIGGER_GPIO GPIOB
137 #define SONAR_ECHO_PIN Pin_1 // RX8 (PB1) - only 3.3v ( add a 1K Ohms resistor )
138 #define SONAR_ECHO_GPIO GPIOB
139 #define SONAR_EXTI_LINE EXTI_Line1
140 #define SONAR_EXTI_PIN_SOURCE GPIO_PinSource1
141 #define SONAR_EXTI_IRQN EXTI1_IRQn
147 #define USE_SOFTSERIAL1
148 #define USE_SOFTSERIAL2
149 #define SERIAL_PORT_COUNT 5
151 #define SOFTSERIAL_1_TIMER TIM3
152 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5
153 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6
154 #define SOFTSERIAL_2_TIMER TIM3
155 #define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7
156 #define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8
159 #define UART3_RX_PIN Pin_11
160 #define UART3_TX_PIN Pin_10
161 #define UART3_GPIO GPIOB
162 #define UART3_APB1_PERIPHERALS RCC_APB1Periph_USART3
163 #define UART3_APB2_PERIPHERALS RCC_APB2Periph_GPIOB
166 #define I2C_DEVICE (I2CDEV_2)
174 #define CURRENT_METER_ADC_GPIO GPIOB
175 #define CURRENT_METER_ADC_GPIO_PIN GPIO_Pin_1
176 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_9
178 #define VBAT_ADC_GPIO GPIOA
179 #define VBAT_ADC_GPIO_PIN GPIO_Pin_4
180 #define VBAT_ADC_CHANNEL ADC_Channel_4
182 #define RSSI_ADC_GPIO GPIOA
183 #define RSSI_ADC_GPIO_PIN GPIO_Pin_1
184 #define RSSI_ADC_CHANNEL ADC_Channel_1
186 #define EXTERNAL1_ADC_GPIO GPIOA
187 #define EXTERNAL1_ADC_GPIO_PIN GPIO_Pin_5
188 #define EXTERNAL1_ADC_CHANNEL ADC_Channel_5
192 #define LED_STRIP_TIMER TIM3
193 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC6
194 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH6_HANDLER
207 #define BIND_PORT GPIOA
208 #define BIND_PIN Pin_3
210 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
214 #undef TARGET_BOARD_IDENTIFIER
215 #define TARGET_BOARD_IDENTIFIER "AFF1" // AlienFlight F1.
216 #undef BOARD_HAS_VOLTAGE_DIVIDER
218 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
219 #define DEFAULT FEATURES FEATURE_MOTOR_STOP
221 #define HARDWARE_BIND_PLUG
224 #define BINDPLUG_PORT GPIOB
225 #define BINDPLUG_PIN Pin_5