Skip to content

Commit 8437209

Browse files
authored
Merge pull request #11092 from dixi83/FlyingRC_F4WingMini
New target: FlyingRC F4wing mini
2 parents 8cf99f7 + c0e4f34 commit 8437209

File tree

4 files changed

+182
-0
lines changed

4 files changed

+182
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target_stm32f405xg(FLYINGRCF4WINGMINI)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* This file is part of INAV.
3+
*
4+
* INAV 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, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* INAV is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#include <stdint.h>
19+
#include "platform.h"
20+
#include "fc/fc_msp_box.h"
21+
#include "fc/config.h"
22+
#include "io/piniobox.h"
23+
24+
void targetConfiguration(void)
25+
{
26+
27+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* This file is part of INAV.
3+
*
4+
* INAV 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, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* INAV is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#include <stdbool.h>
19+
#include <platform.h>
20+
21+
#include "drivers/bus.h"
22+
#include "drivers/io.h"
23+
#include "drivers/pwm_mapping.h"
24+
#include "drivers/timer.h"
25+
#include "drivers/sensor.h"
26+
#include "drivers/timer_def_stm32f4xx.h"
27+
28+
timerHardware_t timerHardware[] = {
29+
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 D(2,7,7) UP217
30+
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 D(2,2,0) UP217
31+
DEF_TIM(TIM1, CH3N, PB15, TIM_USE_OUTPUT_AUTO, 0, 0), // S3 D(2,6,0) UP256
32+
DEF_TIM(TIM1, CH1, PA8, TIM_USE_OUTPUT_AUTO, 0, 1), // S4 D(2,1,6) UP256
33+
34+
DEF_TIM(TIM2, CH4, PB11, TIM_USE_OUTPUT_AUTO, 0, 0), // S5 D(1,7,3) UP173
35+
DEF_TIM(TIM2, CH3, PB10, TIM_USE_OUTPUT_AUTO, 0, 0), // S6 D(1,1,3) UP173
36+
37+
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // 2812LED D(1,2,5)
38+
39+
DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), //TX2 softserial1_Tx
40+
};
41+
42+
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
* This file is part of INAV.
3+
*
4+
* INAV 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, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* INAV is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#pragma once
19+
#define USE_TARGET_CONFIG
20+
21+
#define TARGET_BOARD_IDENTIFIER "FRF4WM"
22+
#define USBD_PRODUCT_STRING "FLYINGRCF4WINGMINI"
23+
24+
#define LED0 PA14 //Blue
25+
#define LED1 PA13 //Green
26+
27+
// *************** SPI1 IMU & OSD *******************
28+
#define USE_SPI
29+
#define USE_SPI_DEVICE_1
30+
31+
#define SPI1_SCK_PIN PA5
32+
#define SPI1_MISO_PIN PB4
33+
#define SPI1_MOSI_PIN PA7
34+
35+
#define USE_IMU_ICM42605
36+
#define IMU_ICM42605_ALIGN CW90_DEG_FLIP
37+
#define ICM42605_SPI_BUS BUS_SPI1
38+
#define ICM42605_CS_PIN PC14
39+
40+
// *************** I2C /Baro/Mag *********************
41+
#define USE_I2C
42+
#define USE_I2C_DEVICE_1
43+
#define I2C1_SCL PB8
44+
#define I2C1_SDA PB7
45+
46+
#define USE_BARO
47+
#define BARO_I2C_BUS BUS_I2C1
48+
#define USE_BARO_SPL06
49+
#define USE_BARO_BMP280
50+
#define USE_BARO_MS5611
51+
#define USE_BARO_DPS310
52+
53+
#define USE_MAG
54+
#define MAG_I2C_BUS BUS_I2C1
55+
#define USE_MAG_ALL
56+
57+
#define USE_RANGEFINDER
58+
#define RANGEFINDER_I2C_BUS BUS_I2C1
59+
#define PITOT_I2C_BUS BUS_I2C1
60+
#define TEMPERATURE_I2C_BUS BUS_I2C1
61+
62+
// *************** UART *****************************
63+
#define USE_VCP
64+
65+
#define USE_UART1
66+
#define UART1_TX_PIN PA9
67+
#define UART1_RX_PIN PA10
68+
69+
#define USE_UART2
70+
#define UART2_TX_PIN PA2
71+
#define UART2_RX_PIN PA3
72+
73+
#define USE_UART4
74+
#define UART4_TX_PIN PA0
75+
#define UART4_RX_PIN PA1
76+
77+
#define USE_UART5
78+
#define UART5_TX_PIN PC12
79+
#define UART5_RX_PIN PD2
80+
81+
#define USE_SOFTSERIAL1
82+
#define SOFTSERIAL_1_TX_PIN PA2
83+
#define SOFTSERIAL_1_RX_PIN PA2
84+
85+
#define SERIAL_PORT_COUNT 6
86+
87+
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
88+
#define SERIALRX_PROVIDER SERIALRX_CRSF
89+
#define SERIALRX_UART SERIAL_PORT_USART1
90+
91+
// *************** ADC ***************************
92+
#define USE_ADC
93+
#define ADC_INSTANCE ADC1
94+
#define ADC1_DMA_STREAM DMA2_Stream4
95+
#define ADC_CHANNEL_1_PIN PC4
96+
#define VBAT_ADC_CHANNEL ADC_CHN_1
97+
98+
// *************** others ************************
99+
#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
100+
#define VBAT_SCALE_DEFAULT 2100
101+
#define CURRENT_METER_SCALE 150
102+
103+
#define TARGET_IO_PORTA 0xffff
104+
#define TARGET_IO_PORTB 0xffff
105+
#define TARGET_IO_PORTC 0xffff
106+
#define TARGET_IO_PORTD (BIT(2))
107+
108+
#define MAX_PWM_OUTPUT_PORTS 7
109+
110+
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
111+
#define USE_DSHOT
112+
#define USE_ESC_SENSOR

0 commit comments

Comments
 (0)