From bf2153163cdb6edbb1e4c83e5fc048f43c34f53b Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:33:34 -0500 Subject: [PATCH 01/21] fix compiler warnings for ACC_2_ALIGN identical branches (#1051) --- src/main/sensors/acceleration.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/sensors/acceleration.c b/src/main/sensors/acceleration.c index 6a45d357b4..f2cd4a7f96 100644 --- a/src/main/sensors/acceleration.c +++ b/src/main/sensors/acceleration.c @@ -370,11 +370,15 @@ bool accInit(void) { acc.dev.mpuDetectionResult = *gyroMpuDetectionResult(); acc.dev.acc_high_fsr = accelerometerConfig()->acc_high_fsr; #ifdef USE_DUAL_GYRO + #if defined ACC_2_ALIGN if (gyroConfig()->gyro_to_use == GYRO_CONFIG_USE_GYRO_2) { acc.dev.accAlign = ACC_2_ALIGN; - } else { - acc.dev.accAlign = ACC_1_ALIGN; } + #elif defined ACC_1_ALIGN + acc.dev.accAlign = ACC_1_ALIGN; + #else + acc.dev.accAlign = ALIGN_DEFAULT; + #endif #else acc.dev.accAlign = ALIGN_DEFAULT; #endif From c68a4a1c4791006776d4d2baf467f696595c2081 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:43:47 -0500 Subject: [PATCH 02/21] [target] fix FLYWOOF7DUAL timer count (#1052) --- src/main/target/FLYWOOF7DUAL/target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/target/FLYWOOF7DUAL/target.h b/src/main/target/FLYWOOF7DUAL/target.h index 943d6ab3c8..7fa34f9a1d 100755 --- a/src/main/target/FLYWOOF7DUAL/target.h +++ b/src/main/target/FLYWOOF7DUAL/target.h @@ -179,5 +179,5 @@ #define TARGET_IO_PORTC 0xffff #define TARGET_IO_PORTD (BIT(2)) -#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USABLE_TIMER_CHANNEL_COUNT 13 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(10) ) From c6d496feb7e526d5168b37cdb0492397ecb98f2b Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 26 Apr 2024 12:51:50 -0500 Subject: [PATCH 03/21] Revert "fix compiler warnings for ACC_2_ALIGN identical branches (#1051)" (#1053) This reverts commit bf2153163cdb6edbb1e4c83e5fc048f43c34f53b. --- src/main/sensors/acceleration.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/sensors/acceleration.c b/src/main/sensors/acceleration.c index f2cd4a7f96..6a45d357b4 100644 --- a/src/main/sensors/acceleration.c +++ b/src/main/sensors/acceleration.c @@ -370,15 +370,11 @@ bool accInit(void) { acc.dev.mpuDetectionResult = *gyroMpuDetectionResult(); acc.dev.acc_high_fsr = accelerometerConfig()->acc_high_fsr; #ifdef USE_DUAL_GYRO - #if defined ACC_2_ALIGN if (gyroConfig()->gyro_to_use == GYRO_CONFIG_USE_GYRO_2) { acc.dev.accAlign = ACC_2_ALIGN; - } - #elif defined ACC_1_ALIGN + } else { acc.dev.accAlign = ACC_1_ALIGN; - #else - acc.dev.accAlign = ALIGN_DEFAULT; - #endif + } #else acc.dev.accAlign = ALIGN_DEFAULT; #endif From b76ced4fecc9261735b03916e3473a8ceacf3d97 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:19:18 -0500 Subject: [PATCH 04/21] [target] fix NBD_INFINITYAIOV2 adding USE_ADC (#1054) --- src/main/target/NBD_INFINITYAIOV2/target.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/target/NBD_INFINITYAIOV2/target.h b/src/main/target/NBD_INFINITYAIOV2/target.h index 0d042c69ac..3c7edf95d2 100644 --- a/src/main/target/NBD_INFINITYAIOV2/target.h +++ b/src/main/target/NBD_INFINITYAIOV2/target.h @@ -111,8 +111,10 @@ #define MAX7456_SPI_CS_PIN PA15 #define MAX7456_SPI_INSTANCE SPI3 +#define USE_ADC #define VBAT_ADC_PIN PC1 #define CURRENT_METER_ADC_PIN PC2 +#define ADC1_DMA_OPT 1 #define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC From a7bf26450a2b40152bfb4e091c7eba8561a0fbe6 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:33:37 -0500 Subject: [PATCH 05/21] [targets] bulk target import (partial) (#1056) --- src/main/target/AIRBOTF4/target.c | 48 ++++++ src/main/target/AIRBOTF4/target.h | 133 ++++++++++++++ src/main/target/AIRBOTF4/target.mk | 20 +++ src/main/target/AOCODAF405/target.c | 44 +++++ src/main/target/AOCODAF405/target.h | 137 +++++++++++++++ src/main/target/AOCODAF405/target.mk | 16 ++ src/main/target/AOCODAF405V2MPU6000/target.c | 45 +++++ src/main/target/AOCODAF405V2MPU6000/target.h | 140 +++++++++++++++ src/main/target/AOCODAF405V2MPU6000/target.mk | 15 ++ src/main/target/AOCODAF405V2MPU6500/target.c | 45 +++++ src/main/target/AOCODAF405V2MPU6500/target.h | 140 +++++++++++++++ src/main/target/AOCODAF405V2MPU6500/target.mk | 16 ++ src/main/target/AOCODAF722BLE/target.c | 44 +++++ src/main/target/AOCODAF722BLE/target.h | 134 ++++++++++++++ src/main/target/AOCODAF722BLE/target.mk | 14 ++ src/main/target/AOCODARCF405V3/target.c | 45 +++++ src/main/target/AOCODARCF405V3/target.h | 158 +++++++++++++++++ src/main/target/AOCODARCF405V3/target.mk | 18 ++ src/main/target/AOCODARCF405_AIO/target.c | 41 +++++ src/main/target/AOCODARCF405_AIO/target.h | 155 +++++++++++++++++ src/main/target/AOCODARCF405_AIO/target.mk | 18 ++ src/main/target/AOCODARCF411_AIO/target.c | 43 +++++ src/main/target/AOCODARCF411_AIO/target.h | 132 ++++++++++++++ src/main/target/AOCODARCF411_AIO/target.mk | 17 ++ src/main/target/AOCODARCF722_AIO/target.c | 49 ++++++ src/main/target/AOCODARCF722_AIO/target.h | 160 +++++++++++++++++ src/main/target/AOCODARCF722_AIO/target.mk | 20 +++ src/main/target/AOCODARCF7DUAL/target.c | 45 +++++ src/main/target/AOCODARCF7DUAL/target.h | 148 ++++++++++++++++ src/main/target/AOCODARCF7DUAL/target.mk | 16 ++ src/main/target/ARESF7/target.c | 42 +++++ src/main/target/ARESF7/target.h | 135 +++++++++++++++ src/main/target/ARESF7/target.mk | 15 ++ src/main/target/ARGUSF7AIO/target.c | 40 +++++ src/main/target/ARGUSF7AIO/target.h | 140 +++++++++++++++ src/main/target/ARGUSF7AIO/target.mk | 15 ++ src/main/target/ATOMRCF405/target.c | 44 +++++ src/main/target/ATOMRCF405/target.h | 140 +++++++++++++++ src/main/target/ATOMRCF405/target.mk | 14 ++ src/main/target/ATOMRCF411/target.c | 41 +++++ src/main/target/ATOMRCF411/target.h | 110 ++++++++++++ src/main/target/ATOMRCF411/target.mk | 13 ++ src/main/target/ATOMRCF722/target.c | 44 +++++ src/main/target/ATOMRCF722/target.h | 134 ++++++++++++++ src/main/target/ATOMRCF722/target.mk | 13 ++ src/main/target/AXISFLYINGF7PRO/target.c | 46 +++++ src/main/target/AXISFLYINGF7PRO/target.h | 153 ++++++++++++++++ src/main/target/AXISFLYINGF7PRO/target.mk | 17 ++ src/main/target/BEASTFPVF722/target.c | 44 +++++ src/main/target/BEASTFPVF722/target.h | 149 ++++++++++++++++ src/main/target/BEASTFPVF722/target.mk | 17 ++ src/main/target/CADDXF4/target.c | 46 +++++ src/main/target/CADDXF4/target.h | 156 +++++++++++++++++ src/main/target/CADDXF4/target.mk | 18 ++ src/main/target/CRAZYBEEF405/target.c | 46 +++++ src/main/target/CRAZYBEEF405/target.h | 139 +++++++++++++++ src/main/target/CRAZYBEEF405/target.mk | 17 ++ src/main/target/CYCLONEF405_PRO/target.c | 46 +++++ src/main/target/CYCLONEF405_PRO/target.h | 138 +++++++++++++++ src/main/target/CYCLONEF405_PRO/target.mk | 15 ++ src/main/target/CYCLONEF722_PRO/target.c | 46 +++++ src/main/target/CYCLONEF722_PRO/target.h | 141 +++++++++++++++ src/main/target/CYCLONEF722_PRO/target.mk | 16 ++ src/main/target/DAKEFPVF405/target.c | 46 +++++ src/main/target/DAKEFPVF405/target.h | 163 ++++++++++++++++++ src/main/target/DAKEFPVF405/target.mk | 20 +++ src/main/target/DAKEFPVF411/target.c | 43 +++++ src/main/target/DAKEFPVF411/target.h | 132 ++++++++++++++ src/main/target/DAKEFPVF411/target.mk | 16 ++ src/main/target/DAKEFPVF722/target.c | 47 +++++ src/main/target/DAKEFPVF722/target.h | 161 +++++++++++++++++ src/main/target/DAKEFPVF722/target.mk | 19 ++ src/main/target/DFR_F722_DUAL_HD/target.c | 46 +++++ src/main/target/DFR_F722_DUAL_HD/target.h | 146 ++++++++++++++++ src/main/target/DFR_F722_DUAL_HD/target.mk | 16 ++ src/main/target/DREAMFLYF405/target.c | 46 +++++ src/main/target/DREAMFLYF405/target.h | 157 +++++++++++++++++ src/main/target/DREAMFLYF405/target.mk | 18 ++ src/main/target/DREAMFLYF411/target.c | 42 +++++ src/main/target/DREAMFLYF411/target.h | 122 +++++++++++++ src/main/target/DREAMFLYF411/target.mk | 15 ++ src/main/target/DYSF44530D/target.c | 47 +++++ src/main/target/DYSF44530D/target.h | 127 ++++++++++++++ src/main/target/DYSF44530D/target.mk | 13 ++ src/main/target/DYSF4PRO/target.c | 49 ++++++ src/main/target/DYSF4PRO/target.h | 129 ++++++++++++++ src/main/target/DYSF4PRO/target.mk | 16 ++ src/main/target/EACHINEF411_AIO/target.c | 44 +++++ src/main/target/EACHINEF411_AIO/target.h | 107 ++++++++++++ src/main/target/EACHINEF411_AIO/target.mk | 13 ++ src/main/target/EACHINEF722_AIO/target.c | 48 ++++++ src/main/target/EACHINEF722_AIO/target.h | 135 +++++++++++++++ src/main/target/EACHINEF722_AIO/target.mk | 16 ++ src/main/target/ELINF405/target.c | 43 +++++ src/main/target/ELINF405/target.h | 134 ++++++++++++++ src/main/target/ELINF405/target.mk | 16 ++ src/main/target/EMAX_BABYHAWK_II_HD/target.c | 49 ++++++ src/main/target/EMAX_BABYHAWK_II_HD/target.h | 126 ++++++++++++++ src/main/target/EMAX_BABYHAWK_II_HD/target.mk | 17 ++ src/main/target/EXUAVF4PRO/target.c | 50 ++++++ src/main/target/EXUAVF4PRO/target.h | 123 +++++++++++++ src/main/target/EXUAVF4PRO/target.mk | 17 ++ src/main/target/FENIX_F405/target.c | 40 +++++ src/main/target/FENIX_F405/target.h | 112 ++++++++++++ src/main/target/FENIX_F405/target.mk | 13 ++ src/main/target/FF_FORTINIF4_REV03/target.c | 42 +++++ src/main/target/FF_FORTINIF4_REV03/target.h | 138 +++++++++++++++ src/main/target/FF_FORTINIF4_REV03/target.mk | 16 ++ src/main/target/FF_PIKOF4OSD/target.c | 42 +++++ src/main/target/FF_PIKOF4OSD/target.h | 118 +++++++++++++ src/main/target/FF_PIKOF4OSD/target.mk | 15 ++ src/main/target/FLASHHOBBYF405/target.c | 46 +++++ src/main/target/FLASHHOBBYF405/target.h | 156 +++++++++++++++++ src/main/target/FLASHHOBBYF405/target.mk | 18 ++ src/main/target/FLASHHOBBYF722/target.c | 46 +++++ src/main/target/FLASHHOBBYF722/target.h | 152 ++++++++++++++++ src/main/target/FLASHHOBBYF722/target.mk | 18 ++ src/main/target/FLYCOLORF4/target.c | 46 +++++ src/main/target/FLYCOLORF4/target.h | 138 +++++++++++++++ src/main/target/FLYCOLORF4/target.mk | 15 ++ src/main/target/FLYCOLORF7MINI/target.c | 46 +++++ src/main/target/FLYCOLORF7MINI/target.h | 149 ++++++++++++++++ src/main/target/FLYCOLORF7MINI/target.mk | 16 ++ src/main/target/FLYCOLORF7V2/target.c | 47 +++++ src/main/target/FLYCOLORF7V2/target.h | 149 ++++++++++++++++ src/main/target/FLYCOLORF7V2/target.mk | 17 ++ src/main/target/FLYCOLORF7_AIO_HD/target.c | 46 +++++ src/main/target/FLYCOLORF7_AIO_HD/target.h | 137 +++++++++++++++ src/main/target/FLYCOLORF7_AIO_HD/target.mk | 16 ++ src/main/target/FLYWOOF405NANO/target.c | 45 +++++ src/main/target/FLYWOOF405NANO/target.h | 149 ++++++++++++++++ src/main/target/FLYWOOF405NANO/target.mk | 17 ++ src/main/target/FLYWOOF405PRO/target.c | 45 +++++ src/main/target/FLYWOOF405PRO/target.h | 141 +++++++++++++++ src/main/target/FLYWOOF405PRO/target.mk | 16 ++ src/main/target/FLYWOOF411HEX/target.c | 45 +++++ src/main/target/FLYWOOF411HEX/target.h | 112 ++++++++++++ src/main/target/FLYWOOF411HEX/target.mk | 14 ++ src/main/target/FLYWOOF722PRO/target.c | 48 ++++++ src/main/target/FLYWOOF722PRO/target.h | 147 ++++++++++++++++ src/main/target/FLYWOOF722PRO/target.mk | 13 ++ src/main/target/FLYWOOF722PROV2/target.c | 48 ++++++ src/main/target/FLYWOOF722PROV2/target.h | 145 ++++++++++++++++ src/main/target/FLYWOOF722PROV2/target.mk | 13 ++ src/main/target/FLYWOOF745AIO/target.c | 46 +++++ src/main/target/FLYWOOF745AIO/target.h | 148 ++++++++++++++++ src/main/target/FLYWOOF745AIO/target.mk | 16 ++ src/main/target/FOXEERF405V2/target.c | 46 +++++ src/main/target/FOXEERF405V2/target.h | 152 ++++++++++++++++ src/main/target/FOXEERF405V2/target.mk | 18 ++ src/main/target/FOXEERF722V2/target.c | 44 +++++ src/main/target/FOXEERF722V2/target.h | 132 ++++++++++++++ src/main/target/FOXEERF722V2/target.mk | 14 ++ src/main/target/FOXEERF722V3/target.c | 44 +++++ src/main/target/FOXEERF722V3/target.h | 139 +++++++++++++++ src/main/target/FOXEERF722V3/target.mk | 15 ++ src/main/target/FOXEERF745V4_AIO/target.c | 41 +++++ src/main/target/FOXEERF745V4_AIO/target.h | 140 +++++++++++++++ src/main/target/FOXEERF745V4_AIO/target.mk | 15 ++ src/main/target/FPVM_BETAFLIGHTF7/target.c | 48 ++++++ src/main/target/FPVM_BETAFLIGHTF7/target.h | 130 ++++++++++++++ src/main/target/FPVM_BETAFLIGHTF7/target.mk | 16 ++ src/main/target/FURYF4OSD/target.c | 42 +++++ src/main/target/FURYF4OSD/target.h | 154 +++++++++++++++++ src/main/target/FURYF4OSD/target.mk | 19 ++ src/main/target/GEELANGF411/target.c | 44 +++++ src/main/target/GEELANGF411/target.h | 110 ++++++++++++ src/main/target/GEELANGF411/target.mk | 14 ++ src/main/target/GEMEF411/target.c | 45 +++++ src/main/target/GEMEF411/target.h | 125 ++++++++++++++ src/main/target/GEMEF411/target.mk | 15 ++ src/main/target/GEPRCF405_BT_HD/target.c | 45 +++++ src/main/target/GEPRCF405_BT_HD/target.h | 162 +++++++++++++++++ src/main/target/GEPRCF405_BT_HD/target.mk | 18 ++ src/main/target/HAKRCF405V2/target.c | 46 +++++ src/main/target/HAKRCF405V2/target.h | 156 +++++++++++++++++ src/main/target/HAKRCF405V2/target.mk | 18 ++ src/main/target/HAKRCF411D/target.c | 46 +++++ src/main/target/HAKRCF411D/target.h | 134 ++++++++++++++ src/main/target/HAKRCF411D/target.mk | 17 ++ src/main/target/HAKRCF722V2/target.c | 44 +++++ src/main/target/HAKRCF722V2/target.h | 155 +++++++++++++++++ src/main/target/HAKRCF722V2/target.mk | 18 ++ src/main/target/HAKRCF7230D/target.c | 49 ++++++ src/main/target/HAKRCF7230D/target.h | 148 ++++++++++++++++ src/main/target/HAKRCF7230D/target.mk | 18 ++ src/main/target/HELSEL_STRIKERF7/target.c | 41 +++++ src/main/target/HELSEL_STRIKERF7/target.h | 116 +++++++++++++ src/main/target/HELSEL_STRIKERF7/target.mk | 14 ++ src/main/target/HGLRCF411ELRS/target.c | 44 +++++ src/main/target/HGLRCF411ELRS/target.h | 124 +++++++++++++ src/main/target/HGLRCF411ELRS/target.mk | 14 ++ src/main/target/HGLRCF722AIO/target.c | 48 ++++++ src/main/target/HGLRCF722AIO/target.h | 155 +++++++++++++++++ src/main/target/HGLRCF722AIO/target.mk | 18 ++ src/main/target/HGLRCF722E/target.c | 48 ++++++ src/main/target/HGLRCF722E/target.h | 140 +++++++++++++++ src/main/target/HGLRCF722E/target.mk | 16 ++ src/main/target/HGLRCF722MINI/target.c | 44 +++++ src/main/target/HGLRCF722MINI/target.h | 151 ++++++++++++++++ src/main/target/HGLRCF722MINI/target.mk | 18 ++ src/main/target/HGLRCF722MINIV2/target.c | 48 ++++++ src/main/target/HGLRCF722MINIV2/target.h | 152 ++++++++++++++++ src/main/target/HGLRCF722MINIV2/target.mk | 18 ++ .../target/IFLIGHT_BLITZ_F722_X1/target.c | 43 +++++ .../target/IFLIGHT_BLITZ_F722_X1/target.h | 148 ++++++++++++++++ .../target/IFLIGHT_BLITZ_F722_X1/target.mk | 16 ++ src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c | 47 +++++ src/main/target/IFLIGHT_BLITZ_F7_AIO/target.h | 156 +++++++++++++++++ .../target/IFLIGHT_BLITZ_F7_AIO/target.mk | 15 ++ .../target/IFLIGHT_DEFENDER_F411/target.c | 41 +++++ .../target/IFLIGHT_DEFENDER_F411/target.h | 131 ++++++++++++++ .../target/IFLIGHT_DEFENDER_F411/target.mk | 15 ++ src/main/target/JHEF411HD/target.c | 46 +++++ src/main/target/JHEF411HD/target.h | 130 ++++++++++++++ src/main/target/JHEF411HD/target.mk | 16 ++ src/main/target/JHEF722HD/target.c | 44 +++++ src/main/target/JHEF722HD/target.h | 150 ++++++++++++++++ src/main/target/JHEF722HD/target.mk | 18 ++ src/main/target/JMIF722A/target.c | 40 +++++ src/main/target/JMIF722A/target.h | 140 +++++++++++++++ src/main/target/JMIF722A/target.mk | 15 ++ src/main/target/KAKUTEF4V2/target.c | 41 +++++ src/main/target/KAKUTEF4V2/target.h | 140 +++++++++++++++ src/main/target/KAKUTEF4V2/target.mk | 16 ++ src/main/target/KAKUTEF7MINI/target.c | 44 +++++ src/main/target/KAKUTEF7MINI/target.h | 145 ++++++++++++++++ src/main/target/KAKUTEF7MINI/target.mk | 16 ++ src/main/target/LUXAIO/target.c | 41 +++++ src/main/target/LUXAIO/target.h | 134 ++++++++++++++ src/main/target/LUXAIO/target.mk | 14 ++ src/main/target/LUXF4OSD/target.c | 49 ++++++ src/main/target/LUXF4OSD/target.h | 131 ++++++++++++++ src/main/target/LUXF4OSD/target.mk | 16 ++ src/main/target/MAMBAF722_2022B/target.c | 46 +++++ src/main/target/MAMBAF722_2022B/target.h | 152 ++++++++++++++++ src/main/target/MAMBAF722_2022B/target.mk | 17 ++ src/main/target/MAMBAF722_I2C/target.c | 42 +++++ src/main/target/MAMBAF722_I2C/target.h | 149 ++++++++++++++++ src/main/target/MAMBAF722_I2C/target.mk | 18 ++ src/main/target/MAMBAF722_X8/target.c | 46 +++++ src/main/target/MAMBAF722_X8/target.h | 139 +++++++++++++++ src/main/target/MAMBAF722_X8/target.mk | 15 ++ src/main/target/MATEKF405MINI/target.c | 47 +++++ src/main/target/MATEKF405MINI/target.h | 135 +++++++++++++++ src/main/target/MATEKF405MINI/target.mk | 14 ++ src/main/target/MATEKF722MINI/target.c | 48 ++++++ src/main/target/MATEKF722MINI/target.h | 149 ++++++++++++++++ src/main/target/MATEKF722MINI/target.mk | 16 ++ src/main/target/MEPSF411/target.c | 41 +++++ src/main/target/MEPSF411/target.h | 122 +++++++++++++ src/main/target/MEPSF411/target.mk | 15 ++ src/main/target/MERAKRCF405/target.c | 44 +++++ src/main/target/MERAKRCF405/target.h | 133 ++++++++++++++ src/main/target/MERAKRCF405/target.mk | 14 ++ src/main/target/MERAKRCF722/target.c | 44 +++++ src/main/target/MERAKRCF722/target.h | 129 ++++++++++++++ src/main/target/MERAKRCF722/target.mk | 14 ++ src/main/target/NAMIMNOF722/target.c | 44 +++++ src/main/target/NAMIMNOF722/target.h | 152 ++++++++++++++++ src/main/target/NAMIMNOF722/target.mk | 17 ++ src/main/target/NBD_CRICKETF7/target.c | 40 +++++ src/main/target/NBD_CRICKETF7/target.h | 112 ++++++++++++ src/main/target/NBD_CRICKETF7/target.mk | 13 ++ src/main/target/NBD_CRICKETF7V2/target.c | 40 +++++ src/main/target/NBD_CRICKETF7V2/target.h | 113 ++++++++++++ src/main/target/NBD_CRICKETF7V2/target.mk | 13 ++ src/main/target/NBD_INFINITY200RS/target.c | 41 +++++ src/main/target/NBD_INFINITY200RS/target.h | 141 +++++++++++++++ src/main/target/NBD_INFINITY200RS/target.mk | 14 ++ src/main/target/NBD_INFINITYF4/target.c | 42 +++++ src/main/target/NBD_INFINITYF4/target.h | 131 ++++++++++++++ src/main/target/NBD_INFINITYF4/target.mk | 14 ++ src/main/target/NEUTRONRCF407/target.c | 45 +++++ src/main/target/NEUTRONRCF407/target.h | 156 +++++++++++++++++ src/main/target/NEUTRONRCF407/target.mk | 17 ++ src/main/target/NEUTRONRCF411AIO/target.c | 44 +++++ src/main/target/NEUTRONRCF411AIO/target.h | 136 +++++++++++++++ src/main/target/NEUTRONRCF411AIO/target.mk | 16 ++ src/main/target/NEUTRONRCF722AIO/target.c | 46 +++++ src/main/target/NEUTRONRCF722AIO/target.h | 129 ++++++++++++++ src/main/target/NEUTRONRCF722AIO/target.mk | 14 ++ src/main/target/NEUTRONRCF7AIO/target.c | 45 +++++ src/main/target/NEUTRONRCF7AIO/target.h | 161 +++++++++++++++++ src/main/target/NEUTRONRCF7AIO/target.mk | 17 ++ src/main/target/NIDICI_F4/target.c | 44 +++++ src/main/target/NIDICI_F4/target.h | 135 +++++++++++++++ src/main/target/NIDICI_F4/target.mk | 15 ++ src/main/target/ODDITYRCF7AIO/target.c | 40 +++++ src/main/target/ODDITYRCF7AIO/target.h | 134 ++++++++++++++ src/main/target/ODDITYRCF7AIO/target.mk | 14 ++ src/main/target/OMNIBUSF4V6/target.c | 49 ++++++ src/main/target/OMNIBUSF4V6/target.h | 134 ++++++++++++++ src/main/target/OMNIBUSF4V6/target.mk | 17 ++ src/main/target/OMNINXT4/target.c | 56 ++++++ src/main/target/OMNINXT4/target.h | 146 ++++++++++++++++ src/main/target/OMNINXT4/target.mk | 16 ++ src/main/target/OMNINXT7/target.c | 56 ++++++ src/main/target/OMNINXT7/target.h | 141 +++++++++++++++ src/main/target/OMNINXT7/target.mk | 16 ++ src/main/target/PLUMF4/target.c | 40 +++++ src/main/target/PLUMF4/target.h | 111 ++++++++++++ src/main/target/PLUMF4/target.mk | 13 ++ src/main/target/PODIUMF4/target.c | 47 +++++ src/main/target/PODIUMF4/target.h | 119 +++++++++++++ src/main/target/PODIUMF4/target.mk | 17 ++ src/main/target/RUSHF7AIO/target.c | 45 +++++ src/main/target/RUSHF7AIO/target.h | 153 ++++++++++++++++ src/main/target/RUSHF7AIO/target.mk | 17 ++ src/main/target/RUSRACE_F4/target.c | 44 +++++ src/main/target/RUSRACE_F4/target.h | 129 ++++++++++++++ src/main/target/RUSRACE_F4/target.mk | 14 ++ src/main/target/RUSRACE_F7/target.c | 44 +++++ src/main/target/RUSRACE_F7/target.h | 126 ++++++++++++++ src/main/target/RUSRACE_F7/target.mk | 14 ++ src/main/target/SOLOGOODF405/target.c | 44 +++++ src/main/target/SOLOGOODF405/target.h | 155 +++++++++++++++++ src/main/target/SOLOGOODF405/target.mk | 18 ++ src/main/target/SOLOGOODF722/target.c | 44 +++++ src/main/target/SOLOGOODF722/target.h | 151 ++++++++++++++++ src/main/target/SOLOGOODF722/target.mk | 17 ++ src/main/target/SOULF4/target.c | 47 +++++ src/main/target/SOULF4/target.h | 126 ++++++++++++++ src/main/target/SOULF4/target.mk | 20 +++ src/main/target/SPCMAKERF411/target.c | 41 +++++ src/main/target/SPCMAKERF411/target.h | 118 +++++++++++++ src/main/target/SPCMAKERF411/target.mk | 13 ++ src/main/target/SPEDIXF405/target.c | 46 +++++ src/main/target/SPEDIXF405/target.h | 156 +++++++++++++++++ src/main/target/SPEDIXF405/target.mk | 18 ++ src/main/target/SPEDIXF722/target.c | 46 +++++ src/main/target/SPEDIXF722/target.h | 153 ++++++++++++++++ src/main/target/SPEDIXF722/target.mk | 18 ++ src/main/target/SPEEDYBEEF405MINI/target.c | 42 +++++ src/main/target/SPEEDYBEEF405MINI/target.h | 141 +++++++++++++++ src/main/target/SPEEDYBEEF405MINI/target.mk | 15 ++ src/main/target/SPEEDYBEEF7MINIV2/target.c | 48 ++++++ src/main/target/SPEEDYBEEF7MINIV2/target.h | 132 ++++++++++++++ src/main/target/SPEEDYBEEF7MINIV2/target.mk | 15 ++ src/main/target/STELLARF4/target.c | 47 +++++ src/main/target/STELLARF4/target.h | 135 +++++++++++++++ src/main/target/STELLARF4/target.mk | 14 ++ src/main/target/STELLARF7/target.c | 42 +++++ src/main/target/STELLARF7/target.h | 157 +++++++++++++++++ src/main/target/STELLARF7/target.mk | 16 ++ src/main/target/STELLARF7V2/target.c | 42 +++++ src/main/target/STELLARF7V2/target.h | 157 +++++++++++++++++ src/main/target/STELLARF7V2/target.mk | 16 ++ src/main/target/SUB250F411/target.c | 41 +++++ src/main/target/SUB250F411/target.h | 127 ++++++++++++++ src/main/target/SUB250F411/target.mk | 16 ++ src/main/target/SUB250REDFOXF722AIO/target.c | 44 +++++ src/main/target/SUB250REDFOXF722AIO/target.h | 155 +++++++++++++++++ src/main/target/SUB250REDFOXF722AIO/target.mk | 18 ++ src/main/target/SYNERGYF4/target.c | 49 ++++++ src/main/target/SYNERGYF4/target.h | 129 ++++++++++++++ src/main/target/SYNERGYF4/target.mk | 16 ++ src/main/target/TAKERF411/target.c | 41 +++++ src/main/target/TAKERF411/target.h | 127 ++++++++++++++ src/main/target/TAKERF411/target.mk | 16 ++ src/main/target/TAKERF722SE/target.c | 46 +++++ src/main/target/TAKERF722SE/target.h | 157 +++++++++++++++++ src/main/target/TAKERF722SE/target.mk | 17 ++ src/main/target/TCMMF411/target.c | 44 +++++ src/main/target/TCMMF411/target.h | 117 +++++++++++++ src/main/target/TCMMF411/target.mk | 14 ++ src/main/target/TMOTORF7_AIO/target.c | 46 +++++ src/main/target/TMOTORF7_AIO/target.h | 136 +++++++++++++++ src/main/target/TMOTORF7_AIO/target.mk | 16 ++ src/main/target/TMOTORVELOXF7V2/target.c | 45 +++++ src/main/target/TMOTORVELOXF7V2/target.h | 133 ++++++++++++++ src/main/target/TMOTORVELOXF7V2/target.mk | 14 ++ src/main/target/TMPACERF7MINI/target.c | 41 +++++ src/main/target/TMPACERF7MINI/target.h | 128 ++++++++++++++ src/main/target/TMPACERF7MINI/target.mk | 14 ++ src/main/target/TMVELOXF411/target.c | 41 +++++ src/main/target/TMVELOXF411/target.h | 116 +++++++++++++ src/main/target/TMVELOXF411/target.mk | 14 ++ src/main/target/TMVELOXF7/target.c | 47 +++++ src/main/target/TMVELOXF7/target.h | 146 ++++++++++++++++ src/main/target/TMVELOXF7/target.mk | 15 ++ src/main/target/TRANSTECF411AIO/target.c | 45 +++++ src/main/target/TRANSTECF411AIO/target.h | 103 +++++++++++ src/main/target/TRANSTECF411AIO/target.mk | 13 ++ src/main/target/TRANSTECF411HD/target.c | 40 +++++ src/main/target/TRANSTECF411HD/target.h | 99 +++++++++++ src/main/target/TRANSTECF411HD/target.mk | 13 ++ src/main/target/TRANSTECF7HD/target.c | 43 +++++ src/main/target/TRANSTECF7HD/target.h | 118 +++++++++++++ src/main/target/TRANSTECF7HD/target.mk | 13 ++ src/main/target/TUNERCF411/target.c | 42 +++++ src/main/target/TUNERCF411/target.h | 111 ++++++++++++ src/main/target/TUNERCF411/target.mk | 11 ++ src/main/target/VGOODRCF405_DJI/target.c | 42 +++++ src/main/target/VGOODRCF405_DJI/target.h | 133 ++++++++++++++ src/main/target/VGOODRCF405_DJI/target.mk | 14 ++ src/main/target/XRACERF4/target.c | 49 ++++++ src/main/target/XRACERF4/target.h | 119 +++++++++++++ src/main/target/XRACERF4/target.mk | 16 ++ 399 files changed, 26353 insertions(+) create mode 100644 src/main/target/AIRBOTF4/target.c create mode 100644 src/main/target/AIRBOTF4/target.h create mode 100644 src/main/target/AIRBOTF4/target.mk create mode 100644 src/main/target/AOCODAF405/target.c create mode 100644 src/main/target/AOCODAF405/target.h create mode 100644 src/main/target/AOCODAF405/target.mk create mode 100644 src/main/target/AOCODAF405V2MPU6000/target.c create mode 100644 src/main/target/AOCODAF405V2MPU6000/target.h create mode 100644 src/main/target/AOCODAF405V2MPU6000/target.mk create mode 100644 src/main/target/AOCODAF405V2MPU6500/target.c create mode 100644 src/main/target/AOCODAF405V2MPU6500/target.h create mode 100644 src/main/target/AOCODAF405V2MPU6500/target.mk create mode 100644 src/main/target/AOCODAF722BLE/target.c create mode 100644 src/main/target/AOCODAF722BLE/target.h create mode 100644 src/main/target/AOCODAF722BLE/target.mk create mode 100644 src/main/target/AOCODARCF405V3/target.c create mode 100644 src/main/target/AOCODARCF405V3/target.h create mode 100644 src/main/target/AOCODARCF405V3/target.mk create mode 100644 src/main/target/AOCODARCF405_AIO/target.c create mode 100644 src/main/target/AOCODARCF405_AIO/target.h create mode 100644 src/main/target/AOCODARCF405_AIO/target.mk create mode 100644 src/main/target/AOCODARCF411_AIO/target.c create mode 100644 src/main/target/AOCODARCF411_AIO/target.h create mode 100644 src/main/target/AOCODARCF411_AIO/target.mk create mode 100644 src/main/target/AOCODARCF722_AIO/target.c create mode 100644 src/main/target/AOCODARCF722_AIO/target.h create mode 100644 src/main/target/AOCODARCF722_AIO/target.mk create mode 100644 src/main/target/AOCODARCF7DUAL/target.c create mode 100644 src/main/target/AOCODARCF7DUAL/target.h create mode 100644 src/main/target/AOCODARCF7DUAL/target.mk create mode 100644 src/main/target/ARESF7/target.c create mode 100644 src/main/target/ARESF7/target.h create mode 100644 src/main/target/ARESF7/target.mk create mode 100644 src/main/target/ARGUSF7AIO/target.c create mode 100644 src/main/target/ARGUSF7AIO/target.h create mode 100644 src/main/target/ARGUSF7AIO/target.mk create mode 100644 src/main/target/ATOMRCF405/target.c create mode 100644 src/main/target/ATOMRCF405/target.h create mode 100644 src/main/target/ATOMRCF405/target.mk create mode 100644 src/main/target/ATOMRCF411/target.c create mode 100644 src/main/target/ATOMRCF411/target.h create mode 100644 src/main/target/ATOMRCF411/target.mk create mode 100644 src/main/target/ATOMRCF722/target.c create mode 100644 src/main/target/ATOMRCF722/target.h create mode 100644 src/main/target/ATOMRCF722/target.mk create mode 100644 src/main/target/AXISFLYINGF7PRO/target.c create mode 100644 src/main/target/AXISFLYINGF7PRO/target.h create mode 100644 src/main/target/AXISFLYINGF7PRO/target.mk create mode 100644 src/main/target/BEASTFPVF722/target.c create mode 100644 src/main/target/BEASTFPVF722/target.h create mode 100644 src/main/target/BEASTFPVF722/target.mk create mode 100644 src/main/target/CADDXF4/target.c create mode 100644 src/main/target/CADDXF4/target.h create mode 100644 src/main/target/CADDXF4/target.mk create mode 100644 src/main/target/CRAZYBEEF405/target.c create mode 100644 src/main/target/CRAZYBEEF405/target.h create mode 100644 src/main/target/CRAZYBEEF405/target.mk create mode 100644 src/main/target/CYCLONEF405_PRO/target.c create mode 100644 src/main/target/CYCLONEF405_PRO/target.h create mode 100644 src/main/target/CYCLONEF405_PRO/target.mk create mode 100644 src/main/target/CYCLONEF722_PRO/target.c create mode 100644 src/main/target/CYCLONEF722_PRO/target.h create mode 100644 src/main/target/CYCLONEF722_PRO/target.mk create mode 100644 src/main/target/DAKEFPVF405/target.c create mode 100644 src/main/target/DAKEFPVF405/target.h create mode 100644 src/main/target/DAKEFPVF405/target.mk create mode 100644 src/main/target/DAKEFPVF411/target.c create mode 100644 src/main/target/DAKEFPVF411/target.h create mode 100644 src/main/target/DAKEFPVF411/target.mk create mode 100644 src/main/target/DAKEFPVF722/target.c create mode 100644 src/main/target/DAKEFPVF722/target.h create mode 100644 src/main/target/DAKEFPVF722/target.mk create mode 100644 src/main/target/DFR_F722_DUAL_HD/target.c create mode 100644 src/main/target/DFR_F722_DUAL_HD/target.h create mode 100644 src/main/target/DFR_F722_DUAL_HD/target.mk create mode 100644 src/main/target/DREAMFLYF405/target.c create mode 100644 src/main/target/DREAMFLYF405/target.h create mode 100644 src/main/target/DREAMFLYF405/target.mk create mode 100644 src/main/target/DREAMFLYF411/target.c create mode 100644 src/main/target/DREAMFLYF411/target.h create mode 100644 src/main/target/DREAMFLYF411/target.mk create mode 100644 src/main/target/DYSF44530D/target.c create mode 100644 src/main/target/DYSF44530D/target.h create mode 100644 src/main/target/DYSF44530D/target.mk create mode 100644 src/main/target/DYSF4PRO/target.c create mode 100644 src/main/target/DYSF4PRO/target.h create mode 100644 src/main/target/DYSF4PRO/target.mk create mode 100644 src/main/target/EACHINEF411_AIO/target.c create mode 100644 src/main/target/EACHINEF411_AIO/target.h create mode 100644 src/main/target/EACHINEF411_AIO/target.mk create mode 100644 src/main/target/EACHINEF722_AIO/target.c create mode 100644 src/main/target/EACHINEF722_AIO/target.h create mode 100644 src/main/target/EACHINEF722_AIO/target.mk create mode 100644 src/main/target/ELINF405/target.c create mode 100644 src/main/target/ELINF405/target.h create mode 100644 src/main/target/ELINF405/target.mk create mode 100644 src/main/target/EMAX_BABYHAWK_II_HD/target.c create mode 100644 src/main/target/EMAX_BABYHAWK_II_HD/target.h create mode 100644 src/main/target/EMAX_BABYHAWK_II_HD/target.mk create mode 100644 src/main/target/EXUAVF4PRO/target.c create mode 100644 src/main/target/EXUAVF4PRO/target.h create mode 100644 src/main/target/EXUAVF4PRO/target.mk create mode 100644 src/main/target/FENIX_F405/target.c create mode 100644 src/main/target/FENIX_F405/target.h create mode 100644 src/main/target/FENIX_F405/target.mk create mode 100644 src/main/target/FF_FORTINIF4_REV03/target.c create mode 100644 src/main/target/FF_FORTINIF4_REV03/target.h create mode 100644 src/main/target/FF_FORTINIF4_REV03/target.mk create mode 100644 src/main/target/FF_PIKOF4OSD/target.c create mode 100644 src/main/target/FF_PIKOF4OSD/target.h create mode 100644 src/main/target/FF_PIKOF4OSD/target.mk create mode 100644 src/main/target/FLASHHOBBYF405/target.c create mode 100644 src/main/target/FLASHHOBBYF405/target.h create mode 100644 src/main/target/FLASHHOBBYF405/target.mk create mode 100644 src/main/target/FLASHHOBBYF722/target.c create mode 100644 src/main/target/FLASHHOBBYF722/target.h create mode 100644 src/main/target/FLASHHOBBYF722/target.mk create mode 100644 src/main/target/FLYCOLORF4/target.c create mode 100644 src/main/target/FLYCOLORF4/target.h create mode 100644 src/main/target/FLYCOLORF4/target.mk create mode 100644 src/main/target/FLYCOLORF7MINI/target.c create mode 100644 src/main/target/FLYCOLORF7MINI/target.h create mode 100644 src/main/target/FLYCOLORF7MINI/target.mk create mode 100644 src/main/target/FLYCOLORF7V2/target.c create mode 100644 src/main/target/FLYCOLORF7V2/target.h create mode 100644 src/main/target/FLYCOLORF7V2/target.mk create mode 100644 src/main/target/FLYCOLORF7_AIO_HD/target.c create mode 100644 src/main/target/FLYCOLORF7_AIO_HD/target.h create mode 100644 src/main/target/FLYCOLORF7_AIO_HD/target.mk create mode 100644 src/main/target/FLYWOOF405NANO/target.c create mode 100644 src/main/target/FLYWOOF405NANO/target.h create mode 100644 src/main/target/FLYWOOF405NANO/target.mk create mode 100644 src/main/target/FLYWOOF405PRO/target.c create mode 100644 src/main/target/FLYWOOF405PRO/target.h create mode 100644 src/main/target/FLYWOOF405PRO/target.mk create mode 100644 src/main/target/FLYWOOF411HEX/target.c create mode 100644 src/main/target/FLYWOOF411HEX/target.h create mode 100644 src/main/target/FLYWOOF411HEX/target.mk create mode 100644 src/main/target/FLYWOOF722PRO/target.c create mode 100644 src/main/target/FLYWOOF722PRO/target.h create mode 100644 src/main/target/FLYWOOF722PRO/target.mk create mode 100644 src/main/target/FLYWOOF722PROV2/target.c create mode 100644 src/main/target/FLYWOOF722PROV2/target.h create mode 100644 src/main/target/FLYWOOF722PROV2/target.mk create mode 100644 src/main/target/FLYWOOF745AIO/target.c create mode 100644 src/main/target/FLYWOOF745AIO/target.h create mode 100644 src/main/target/FLYWOOF745AIO/target.mk create mode 100644 src/main/target/FOXEERF405V2/target.c create mode 100644 src/main/target/FOXEERF405V2/target.h create mode 100644 src/main/target/FOXEERF405V2/target.mk create mode 100644 src/main/target/FOXEERF722V2/target.c create mode 100644 src/main/target/FOXEERF722V2/target.h create mode 100644 src/main/target/FOXEERF722V2/target.mk create mode 100644 src/main/target/FOXEERF722V3/target.c create mode 100644 src/main/target/FOXEERF722V3/target.h create mode 100644 src/main/target/FOXEERF722V3/target.mk create mode 100644 src/main/target/FOXEERF745V4_AIO/target.c create mode 100644 src/main/target/FOXEERF745V4_AIO/target.h create mode 100644 src/main/target/FOXEERF745V4_AIO/target.mk create mode 100644 src/main/target/FPVM_BETAFLIGHTF7/target.c create mode 100644 src/main/target/FPVM_BETAFLIGHTF7/target.h create mode 100644 src/main/target/FPVM_BETAFLIGHTF7/target.mk create mode 100644 src/main/target/FURYF4OSD/target.c create mode 100644 src/main/target/FURYF4OSD/target.h create mode 100644 src/main/target/FURYF4OSD/target.mk create mode 100644 src/main/target/GEELANGF411/target.c create mode 100644 src/main/target/GEELANGF411/target.h create mode 100644 src/main/target/GEELANGF411/target.mk create mode 100644 src/main/target/GEMEF411/target.c create mode 100644 src/main/target/GEMEF411/target.h create mode 100644 src/main/target/GEMEF411/target.mk create mode 100644 src/main/target/GEPRCF405_BT_HD/target.c create mode 100644 src/main/target/GEPRCF405_BT_HD/target.h create mode 100644 src/main/target/GEPRCF405_BT_HD/target.mk create mode 100644 src/main/target/HAKRCF405V2/target.c create mode 100644 src/main/target/HAKRCF405V2/target.h create mode 100644 src/main/target/HAKRCF405V2/target.mk create mode 100644 src/main/target/HAKRCF411D/target.c create mode 100644 src/main/target/HAKRCF411D/target.h create mode 100644 src/main/target/HAKRCF411D/target.mk create mode 100644 src/main/target/HAKRCF722V2/target.c create mode 100644 src/main/target/HAKRCF722V2/target.h create mode 100644 src/main/target/HAKRCF722V2/target.mk create mode 100644 src/main/target/HAKRCF7230D/target.c create mode 100644 src/main/target/HAKRCF7230D/target.h create mode 100644 src/main/target/HAKRCF7230D/target.mk create mode 100644 src/main/target/HELSEL_STRIKERF7/target.c create mode 100644 src/main/target/HELSEL_STRIKERF7/target.h create mode 100644 src/main/target/HELSEL_STRIKERF7/target.mk create mode 100644 src/main/target/HGLRCF411ELRS/target.c create mode 100644 src/main/target/HGLRCF411ELRS/target.h create mode 100644 src/main/target/HGLRCF411ELRS/target.mk create mode 100644 src/main/target/HGLRCF722AIO/target.c create mode 100644 src/main/target/HGLRCF722AIO/target.h create mode 100644 src/main/target/HGLRCF722AIO/target.mk create mode 100644 src/main/target/HGLRCF722E/target.c create mode 100644 src/main/target/HGLRCF722E/target.h create mode 100644 src/main/target/HGLRCF722E/target.mk create mode 100644 src/main/target/HGLRCF722MINI/target.c create mode 100644 src/main/target/HGLRCF722MINI/target.h create mode 100644 src/main/target/HGLRCF722MINI/target.mk create mode 100644 src/main/target/HGLRCF722MINIV2/target.c create mode 100644 src/main/target/HGLRCF722MINIV2/target.h create mode 100644 src/main/target/HGLRCF722MINIV2/target.mk create mode 100644 src/main/target/IFLIGHT_BLITZ_F722_X1/target.c create mode 100644 src/main/target/IFLIGHT_BLITZ_F722_X1/target.h create mode 100644 src/main/target/IFLIGHT_BLITZ_F722_X1/target.mk create mode 100644 src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c create mode 100644 src/main/target/IFLIGHT_BLITZ_F7_AIO/target.h create mode 100644 src/main/target/IFLIGHT_BLITZ_F7_AIO/target.mk create mode 100644 src/main/target/IFLIGHT_DEFENDER_F411/target.c create mode 100644 src/main/target/IFLIGHT_DEFENDER_F411/target.h create mode 100644 src/main/target/IFLIGHT_DEFENDER_F411/target.mk create mode 100644 src/main/target/JHEF411HD/target.c create mode 100644 src/main/target/JHEF411HD/target.h create mode 100644 src/main/target/JHEF411HD/target.mk create mode 100644 src/main/target/JHEF722HD/target.c create mode 100644 src/main/target/JHEF722HD/target.h create mode 100644 src/main/target/JHEF722HD/target.mk create mode 100644 src/main/target/JMIF722A/target.c create mode 100644 src/main/target/JMIF722A/target.h create mode 100644 src/main/target/JMIF722A/target.mk create mode 100644 src/main/target/KAKUTEF4V2/target.c create mode 100644 src/main/target/KAKUTEF4V2/target.h create mode 100644 src/main/target/KAKUTEF4V2/target.mk create mode 100644 src/main/target/KAKUTEF7MINI/target.c create mode 100644 src/main/target/KAKUTEF7MINI/target.h create mode 100644 src/main/target/KAKUTEF7MINI/target.mk create mode 100644 src/main/target/LUXAIO/target.c create mode 100644 src/main/target/LUXAIO/target.h create mode 100644 src/main/target/LUXAIO/target.mk create mode 100644 src/main/target/LUXF4OSD/target.c create mode 100644 src/main/target/LUXF4OSD/target.h create mode 100644 src/main/target/LUXF4OSD/target.mk create mode 100644 src/main/target/MAMBAF722_2022B/target.c create mode 100644 src/main/target/MAMBAF722_2022B/target.h create mode 100644 src/main/target/MAMBAF722_2022B/target.mk create mode 100644 src/main/target/MAMBAF722_I2C/target.c create mode 100644 src/main/target/MAMBAF722_I2C/target.h create mode 100644 src/main/target/MAMBAF722_I2C/target.mk create mode 100644 src/main/target/MAMBAF722_X8/target.c create mode 100644 src/main/target/MAMBAF722_X8/target.h create mode 100644 src/main/target/MAMBAF722_X8/target.mk create mode 100644 src/main/target/MATEKF405MINI/target.c create mode 100644 src/main/target/MATEKF405MINI/target.h create mode 100644 src/main/target/MATEKF405MINI/target.mk create mode 100644 src/main/target/MATEKF722MINI/target.c create mode 100644 src/main/target/MATEKF722MINI/target.h create mode 100644 src/main/target/MATEKF722MINI/target.mk create mode 100644 src/main/target/MEPSF411/target.c create mode 100644 src/main/target/MEPSF411/target.h create mode 100644 src/main/target/MEPSF411/target.mk create mode 100644 src/main/target/MERAKRCF405/target.c create mode 100644 src/main/target/MERAKRCF405/target.h create mode 100644 src/main/target/MERAKRCF405/target.mk create mode 100644 src/main/target/MERAKRCF722/target.c create mode 100644 src/main/target/MERAKRCF722/target.h create mode 100644 src/main/target/MERAKRCF722/target.mk create mode 100644 src/main/target/NAMIMNOF722/target.c create mode 100644 src/main/target/NAMIMNOF722/target.h create mode 100644 src/main/target/NAMIMNOF722/target.mk create mode 100644 src/main/target/NBD_CRICKETF7/target.c create mode 100644 src/main/target/NBD_CRICKETF7/target.h create mode 100644 src/main/target/NBD_CRICKETF7/target.mk create mode 100644 src/main/target/NBD_CRICKETF7V2/target.c create mode 100644 src/main/target/NBD_CRICKETF7V2/target.h create mode 100644 src/main/target/NBD_CRICKETF7V2/target.mk create mode 100644 src/main/target/NBD_INFINITY200RS/target.c create mode 100644 src/main/target/NBD_INFINITY200RS/target.h create mode 100644 src/main/target/NBD_INFINITY200RS/target.mk create mode 100644 src/main/target/NBD_INFINITYF4/target.c create mode 100644 src/main/target/NBD_INFINITYF4/target.h create mode 100644 src/main/target/NBD_INFINITYF4/target.mk create mode 100644 src/main/target/NEUTRONRCF407/target.c create mode 100644 src/main/target/NEUTRONRCF407/target.h create mode 100644 src/main/target/NEUTRONRCF407/target.mk create mode 100644 src/main/target/NEUTRONRCF411AIO/target.c create mode 100644 src/main/target/NEUTRONRCF411AIO/target.h create mode 100644 src/main/target/NEUTRONRCF411AIO/target.mk create mode 100644 src/main/target/NEUTRONRCF722AIO/target.c create mode 100644 src/main/target/NEUTRONRCF722AIO/target.h create mode 100644 src/main/target/NEUTRONRCF722AIO/target.mk create mode 100644 src/main/target/NEUTRONRCF7AIO/target.c create mode 100644 src/main/target/NEUTRONRCF7AIO/target.h create mode 100644 src/main/target/NEUTRONRCF7AIO/target.mk create mode 100644 src/main/target/NIDICI_F4/target.c create mode 100644 src/main/target/NIDICI_F4/target.h create mode 100644 src/main/target/NIDICI_F4/target.mk create mode 100644 src/main/target/ODDITYRCF7AIO/target.c create mode 100644 src/main/target/ODDITYRCF7AIO/target.h create mode 100644 src/main/target/ODDITYRCF7AIO/target.mk create mode 100644 src/main/target/OMNIBUSF4V6/target.c create mode 100644 src/main/target/OMNIBUSF4V6/target.h create mode 100644 src/main/target/OMNIBUSF4V6/target.mk create mode 100644 src/main/target/OMNINXT4/target.c create mode 100644 src/main/target/OMNINXT4/target.h create mode 100644 src/main/target/OMNINXT4/target.mk create mode 100644 src/main/target/OMNINXT7/target.c create mode 100644 src/main/target/OMNINXT7/target.h create mode 100644 src/main/target/OMNINXT7/target.mk create mode 100644 src/main/target/PLUMF4/target.c create mode 100644 src/main/target/PLUMF4/target.h create mode 100644 src/main/target/PLUMF4/target.mk create mode 100644 src/main/target/PODIUMF4/target.c create mode 100644 src/main/target/PODIUMF4/target.h create mode 100644 src/main/target/PODIUMF4/target.mk create mode 100644 src/main/target/RUSHF7AIO/target.c create mode 100644 src/main/target/RUSHF7AIO/target.h create mode 100644 src/main/target/RUSHF7AIO/target.mk create mode 100644 src/main/target/RUSRACE_F4/target.c create mode 100644 src/main/target/RUSRACE_F4/target.h create mode 100644 src/main/target/RUSRACE_F4/target.mk create mode 100644 src/main/target/RUSRACE_F7/target.c create mode 100644 src/main/target/RUSRACE_F7/target.h create mode 100644 src/main/target/RUSRACE_F7/target.mk create mode 100644 src/main/target/SOLOGOODF405/target.c create mode 100644 src/main/target/SOLOGOODF405/target.h create mode 100644 src/main/target/SOLOGOODF405/target.mk create mode 100644 src/main/target/SOLOGOODF722/target.c create mode 100644 src/main/target/SOLOGOODF722/target.h create mode 100644 src/main/target/SOLOGOODF722/target.mk create mode 100644 src/main/target/SOULF4/target.c create mode 100644 src/main/target/SOULF4/target.h create mode 100644 src/main/target/SOULF4/target.mk create mode 100644 src/main/target/SPCMAKERF411/target.c create mode 100644 src/main/target/SPCMAKERF411/target.h create mode 100644 src/main/target/SPCMAKERF411/target.mk create mode 100644 src/main/target/SPEDIXF405/target.c create mode 100644 src/main/target/SPEDIXF405/target.h create mode 100644 src/main/target/SPEDIXF405/target.mk create mode 100644 src/main/target/SPEDIXF722/target.c create mode 100644 src/main/target/SPEDIXF722/target.h create mode 100644 src/main/target/SPEDIXF722/target.mk create mode 100644 src/main/target/SPEEDYBEEF405MINI/target.c create mode 100644 src/main/target/SPEEDYBEEF405MINI/target.h create mode 100644 src/main/target/SPEEDYBEEF405MINI/target.mk create mode 100644 src/main/target/SPEEDYBEEF7MINIV2/target.c create mode 100644 src/main/target/SPEEDYBEEF7MINIV2/target.h create mode 100644 src/main/target/SPEEDYBEEF7MINIV2/target.mk create mode 100644 src/main/target/STELLARF4/target.c create mode 100644 src/main/target/STELLARF4/target.h create mode 100644 src/main/target/STELLARF4/target.mk create mode 100644 src/main/target/STELLARF7/target.c create mode 100644 src/main/target/STELLARF7/target.h create mode 100644 src/main/target/STELLARF7/target.mk create mode 100644 src/main/target/STELLARF7V2/target.c create mode 100644 src/main/target/STELLARF7V2/target.h create mode 100644 src/main/target/STELLARF7V2/target.mk create mode 100644 src/main/target/SUB250F411/target.c create mode 100644 src/main/target/SUB250F411/target.h create mode 100644 src/main/target/SUB250F411/target.mk create mode 100644 src/main/target/SUB250REDFOXF722AIO/target.c create mode 100644 src/main/target/SUB250REDFOXF722AIO/target.h create mode 100644 src/main/target/SUB250REDFOXF722AIO/target.mk create mode 100644 src/main/target/SYNERGYF4/target.c create mode 100644 src/main/target/SYNERGYF4/target.h create mode 100644 src/main/target/SYNERGYF4/target.mk create mode 100644 src/main/target/TAKERF411/target.c create mode 100644 src/main/target/TAKERF411/target.h create mode 100644 src/main/target/TAKERF411/target.mk create mode 100644 src/main/target/TAKERF722SE/target.c create mode 100644 src/main/target/TAKERF722SE/target.h create mode 100644 src/main/target/TAKERF722SE/target.mk create mode 100644 src/main/target/TCMMF411/target.c create mode 100644 src/main/target/TCMMF411/target.h create mode 100644 src/main/target/TCMMF411/target.mk create mode 100644 src/main/target/TMOTORF7_AIO/target.c create mode 100644 src/main/target/TMOTORF7_AIO/target.h create mode 100644 src/main/target/TMOTORF7_AIO/target.mk create mode 100644 src/main/target/TMOTORVELOXF7V2/target.c create mode 100644 src/main/target/TMOTORVELOXF7V2/target.h create mode 100644 src/main/target/TMOTORVELOXF7V2/target.mk create mode 100644 src/main/target/TMPACERF7MINI/target.c create mode 100644 src/main/target/TMPACERF7MINI/target.h create mode 100644 src/main/target/TMPACERF7MINI/target.mk create mode 100644 src/main/target/TMVELOXF411/target.c create mode 100644 src/main/target/TMVELOXF411/target.h create mode 100644 src/main/target/TMVELOXF411/target.mk create mode 100644 src/main/target/TMVELOXF7/target.c create mode 100644 src/main/target/TMVELOXF7/target.h create mode 100644 src/main/target/TMVELOXF7/target.mk create mode 100644 src/main/target/TRANSTECF411AIO/target.c create mode 100644 src/main/target/TRANSTECF411AIO/target.h create mode 100644 src/main/target/TRANSTECF411AIO/target.mk create mode 100644 src/main/target/TRANSTECF411HD/target.c create mode 100644 src/main/target/TRANSTECF411HD/target.h create mode 100644 src/main/target/TRANSTECF411HD/target.mk create mode 100644 src/main/target/TRANSTECF7HD/target.c create mode 100644 src/main/target/TRANSTECF7HD/target.h create mode 100644 src/main/target/TRANSTECF7HD/target.mk create mode 100644 src/main/target/TUNERCF411/target.c create mode 100644 src/main/target/TUNERCF411/target.h create mode 100644 src/main/target/TUNERCF411/target.mk create mode 100644 src/main/target/VGOODRCF405_DJI/target.c create mode 100644 src/main/target/VGOODRCF405_DJI/target.h create mode 100644 src/main/target/VGOODRCF405_DJI/target.mk create mode 100644 src/main/target/XRACERF4/target.c create mode 100644 src/main/target/XRACERF4/target.h create mode 100644 src/main/target/XRACERF4/target.mk diff --git a/src/main/target/AIRBOTF4/target.c b/src/main/target/AIRBOTF4/target.c new file mode 100644 index 0000000000..663542fc48 --- /dev/null +++ b/src/main/target/AIRBOTF4/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // pwm RX_PWM4_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // pwm RX_PWM5_PIN + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // pwm RX_PWM6_PIN + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AIRBOTF4/target.h b/src/main/target/AIRBOTF4/target.h new file mode 100644 index 0000000000..f6d1912e0b --- /dev/null +++ b/src/main/target/AIRBOTF4/target.h @@ -0,0 +1,133 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AIRBOTF4 +#define MANUFACTURER_ID AIRB +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6000 +#define USE_BARO_SPI_BMP280 +#define USE_MAX7456 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_BARO_BMP280 +#define USE_BARO_BMP085 +#define USE_BARO_MS5611 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW270_DEG +#define GYRO_MPU6500_ALIGN CW270_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 5 + +#define BARO_CS_PIN PC13 +#define BARO_SPI_INSTANCE SPI1 +#define BMP280_CS_PIN PC13 +#define BMP280_SPI_INSTANCE SPI1 +#define USE_I2C +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) + +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 + + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB14 + +#define PINIO1_PIN PC8 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AIRBOTF4/target.mk b/src/main/target/AIRBOTF4/target.mk new file mode 100644 index 0000000000..fdd396c665 --- /dev/null +++ b/src/main/target/AIRBOTF4/target.mk @@ -0,0 +1,20 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp085.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_ms5611.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODAF405/target.c b/src/main/target/AOCODAF405/target.c new file mode 100644 index 0000000000..77e06bbfb4 --- /dev/null +++ b/src/main/target/AOCODAF405/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH3N, PB1, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODAF405/target.h b/src/main/target/AOCODAF405/target.h new file mode 100644 index 0000000000..6df602ccad --- /dev/null +++ b/src/main/target/AOCODAF405/target.h @@ -0,0 +1,137 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODAF405 +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB9 +#define LED_STRIP_PIN PB1 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6500_ALIGN CW0_DEG_FLIP +#define GYRO_MPU6500_ALIGN CW0_DEG_FLIP +#define MPU6500_CS_PIN PB11 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB10 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PD2 + +#define PINIO1_PIN PB0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODAF405/target.mk b/src/main/target/AOCODAF405/target.mk new file mode 100644 index 0000000000..19a3f88fce --- /dev/null +++ b/src/main/target/AOCODAF405/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODAF405V2MPU6000/target.c b/src/main/target/AOCODAF405V2MPU6000/target.c new file mode 100644 index 0000000000..e7253f1968 --- /dev/null +++ b/src/main/target/AOCODAF405V2MPU6000/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 1), // motor 6 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM3, CH4, PB1, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODAF405V2MPU6000/target.h b/src/main/target/AOCODAF405V2MPU6000/target.h new file mode 100644 index 0000000000..75515bd99a --- /dev/null +++ b/src/main/target/AOCODAF405V2MPU6000/target.h @@ -0,0 +1,140 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODAF405V2MPU6000 +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PB1 +#define USE_BEEPER +#define BEEPER_PIN PB8 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA13 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC3_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR false + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PC11 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODAF405V2MPU6000/target.mk b/src/main/target/AOCODAF405V2MPU6000/target.mk new file mode 100644 index 0000000000..6cca99cfb7 --- /dev/null +++ b/src/main/target/AOCODAF405V2MPU6000/target.mk @@ -0,0 +1,15 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODAF405V2MPU6500/target.c b/src/main/target/AOCODAF405V2MPU6500/target.c new file mode 100644 index 0000000000..e7253f1968 --- /dev/null +++ b/src/main/target/AOCODAF405V2MPU6500/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 1), // motor 6 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM3, CH4, PB1, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODAF405V2MPU6500/target.h b/src/main/target/AOCODAF405V2MPU6500/target.h new file mode 100644 index 0000000000..382ae68dbb --- /dev/null +++ b/src/main/target/AOCODAF405V2MPU6500/target.h @@ -0,0 +1,140 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODAF405V2MPU6500 +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PB1 +#define USE_BEEPER +#define BEEPER_PIN PB8 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6500_ALIGN CW0_DEG +#define GYRO_MPU6500_ALIGN CW0_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA13 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC3_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR false + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PC11 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODAF405V2MPU6500/target.mk b/src/main/target/AOCODAF405V2MPU6500/target.mk new file mode 100644 index 0000000000..73221f770c --- /dev/null +++ b/src/main/target/AOCODAF405V2MPU6500/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODAF722BLE/target.c b/src/main/target/AOCODAF722BLE/target.c new file mode 100644 index 0000000000..b56d1dee5a --- /dev/null +++ b/src/main/target/AOCODAF722BLE/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM1, CH3N, PB1, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH2, PB7, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODAF722BLE/target.h b/src/main/target/AOCODAF722BLE/target.h new file mode 100644 index 0000000000..97c4c596a0 --- /dev/null +++ b/src/main/target/AOCODAF722BLE/target.h @@ -0,0 +1,134 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODAF722BLE +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PB7 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB6 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PB12 +#define MPU6000_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 166 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PA15 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODAF722BLE/target.mk b/src/main/target/AOCODAF722BLE/target.mk new file mode 100644 index 0000000000..618d181083 --- /dev/null +++ b/src/main/target/AOCODAF722BLE/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODARCF405V3/target.c b/src/main/target/AOCODARCF405V3/target.c new file mode 100644 index 0000000000..e7253f1968 --- /dev/null +++ b/src/main/target/AOCODARCF405V3/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 1), // motor 6 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM3, CH4, PB1, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF405V3/target.h b/src/main/target/AOCODARCF405V3/target.h new file mode 100644 index 0000000000..6549f3873f --- /dev/null +++ b/src/main/target/AOCODARCF405V3/target.h @@ -0,0 +1,158 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODARCF405V3 +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_BARO_MS5611 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PB1 +#define USE_BEEPER +#define BEEPER_PIN PB8 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define GPS_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA13 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC3_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 206 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR false + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PC11 + +#define PINIO1_PIN PC5 +#define PINIO2_PIN PA14 +#define PINIO3_PIN PC15 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 +#define PINIO3_BOX 42 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF405V3/target.mk b/src/main/target/AOCODARCF405V3/target.mk new file mode 100644 index 0000000000..bad89c0176 --- /dev/null +++ b/src/main/target/AOCODARCF405V3/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_ms5611.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODARCF405_AIO/target.c b/src/main/target/AOCODARCF405_AIO/target.c new file mode 100644 index 0000000000..02f5ed67bb --- /dev/null +++ b/src/main/target/AOCODARCF405_AIO/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM3, CH4, PB1, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF405_AIO/target.h b/src/main/target/AOCODARCF405_AIO/target.h new file mode 100644 index 0000000000..33a14afa4a --- /dev/null +++ b/src/main/target/AOCODARCF405_AIO/target.h @@ -0,0 +1,155 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODARCF405_AIO +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PB1 +#define USE_BEEPER +#define BEEPER_PIN PB8 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA13 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 589 + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PC11 + +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(3) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF405_AIO/target.mk b/src/main/target/AOCODARCF405_AIO/target.mk new file mode 100644 index 0000000000..c4582c01c5 --- /dev/null +++ b/src/main/target/AOCODARCF405_AIO/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODARCF411_AIO/target.c b/src/main/target/AOCODARCF411_AIO/target.c new file mode 100644 index 0000000000..a8376bf3de --- /dev/null +++ b/src/main/target/AOCODARCF411_AIO/target.c @@ -0,0 +1,43 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF411_AIO/target.h b/src/main/target/AOCODARCF411_AIO/target.h new file mode 100644 index 0000000000..621e56834b --- /dev/null +++ b/src/main/target/AOCODARCF411_AIO/target.h @@ -0,0 +1,132 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODARCF411_AIO +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6500_ALIGN CW90_DEG +#define GYRO_MPU6500_ALIGN CW90_DEG +#define MPU6500_CS_PIN PB12 +#define MPU6500_SPI_INSTANCE SPI2 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PB12 +#define BMI270_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIALRX_UART SERIAL_PORT_USART1 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 +#define ADC_INSTANCE ADC1 + + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 8 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF411_AIO/target.mk b/src/main/target/AOCODARCF411_AIO/target.mk new file mode 100644 index 0000000000..0e555dc045 --- /dev/null +++ b/src/main/target/AOCODARCF411_AIO/target.mk @@ -0,0 +1,17 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODARCF722_AIO/target.c b/src/main/target/AOCODARCF722_AIO/target.c new file mode 100644 index 0000000000..083659ba04 --- /dev/null +++ b/src/main/target/AOCODARCF722_AIO/target.c @@ -0,0 +1,49 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN + DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF722_AIO/target.h b/src/main/target/AOCODARCF722_AIO/target.h new file mode 100644 index 0000000000..7fbbb750dc --- /dev/null +++ b/src/main/target/AOCODARCF722_AIO/target.h @@ -0,0 +1,160 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODARCF722_AIO +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PB2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW0_DEG +#define GYRO_MPU6500_ALIGN CW0_DEG +#define MPU6500_CS_PIN PB2 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PB2 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 650 +#define ADC_INSTANCE ADC1 + +#define PINIO1_PIN PC8 +#define PINIO2_PIN PC9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 14 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF722_AIO/target.mk b/src/main/target/AOCODARCF722_AIO/target.mk new file mode 100644 index 0000000000..29d82bf2f1 --- /dev/null +++ b/src/main/target/AOCODARCF722_AIO/target.mk @@ -0,0 +1,20 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AOCODARCF7DUAL/target.c b/src/main/target/AOCODARCF7DUAL/target.c new file mode 100644 index 0000000000..4d86dcd166 --- /dev/null +++ b/src/main/target/AOCODARCF7DUAL/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM2, CH1, PA0, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF7DUAL/target.h b/src/main/target/AOCODARCF7DUAL/target.h new file mode 100644 index 0000000000..902ba3ee0a --- /dev/null +++ b/src/main/target/AOCODARCF7DUAL/target.h @@ -0,0 +1,148 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODARCF7DUAL +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA0 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PB12 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI2 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_2 +#define ACC_2_ALIGN CW180_DEG +#define GYRO_2_ALIGN CW180_DEG +#define GYRO_2_CS_PIN PA13 +#define GYRO_2_EXTI_PIN PA8 +#define GYRO_2_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCF7DUAL/target.mk b/src/main/target/AOCODARCF7DUAL/target.mk new file mode 100644 index 0000000000..2c8d29cf85 --- /dev/null +++ b/src/main/target/AOCODARCF7DUAL/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/ARESF7/target.c b/src/main/target/ARESF7/target.c new file mode 100644 index 0000000000..6e7e47091a --- /dev/null +++ b/src/main/target/ARESF7/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM8, CH2N, PB0, TIM_USE_LED, 0, 1), // led + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ARESF7/target.h b/src/main/target/ARESF7/target.h new file mode 100644 index 0000000000..f2affaa7dd --- /dev/null +++ b/src/main/target/ARESF7/target.h @@ -0,0 +1,135 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME ARESF7 +#define MANUFACTURER_ID RCTI +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC0 +#define LED_STRIP_PIN PB0 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB6 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC14 + +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC4 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 366 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB1 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ARESF7/target.mk b/src/main/target/ARESF7/target.mk new file mode 100644 index 0000000000..f3cd98e6ff --- /dev/null +++ b/src/main/target/ARESF7/target.mk @@ -0,0 +1,15 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/ARGUSF7AIO/target.c b/src/main/target/ARGUSF7AIO/target.c new file mode 100644 index 0000000000..9c40e5578d --- /dev/null +++ b/src/main/target/ARGUSF7AIO/target.c @@ -0,0 +1,40 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ARGUSF7AIO/target.h b/src/main/target/ARGUSF7AIO/target.h new file mode 100644 index 0000000000..9c5930f198 --- /dev/null +++ b/src/main/target/ARGUSF7AIO/target.h @@ -0,0 +1,140 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME ARGUSF7AIO +#define MANUFACTURER_ID AXFL +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_QMP6988 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +//#define CAMERA_CONTROL_PIN PA8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PB2 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 +#define ADC_INSTANCE ADC1 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 5 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ARGUSF7AIO/target.mk b/src/main/target/ARGUSF7AIO/target.mk new file mode 100644 index 0000000000..7b1bf21b1b --- /dev/null +++ b/src/main/target/ARGUSF7AIO/target.mk @@ -0,0 +1,15 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_qmp6988.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/ATOMRCF405/target.c b/src/main/target/ATOMRCF405/target.c new file mode 100644 index 0000000000..3de6fed0ac --- /dev/null +++ b/src/main/target/ATOMRCF405/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ATOMRCF405/target.h b/src/main/target/ATOMRCF405/target.h new file mode 100644 index 0000000000..b95df5b382 --- /dev/null +++ b/src/main/target/ATOMRCF405/target.h @@ -0,0 +1,140 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME ATOMRCF405 +#define MANUFACTURER_ID SKZO +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PB2 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ATOMRCF405/target.mk b/src/main/target/ATOMRCF405/target.mk new file mode 100644 index 0000000000..62b714aa11 --- /dev/null +++ b/src/main/target/ATOMRCF405/target.mk @@ -0,0 +1,14 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/ATOMRCF411/target.c b/src/main/target/ATOMRCF411/target.c new file mode 100644 index 0000000000..db0eb8a276 --- /dev/null +++ b/src/main/target/ATOMRCF411/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ATOMRCF411/target.h b/src/main/target/ATOMRCF411/target.h new file mode 100644 index 0000000000..f9b7a8af75 --- /dev/null +++ b/src/main/target/ATOMRCF411/target.h @@ -0,0 +1,110 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME ATOMRCF411 +#define MANUFACTURER_ID SKZO +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define RSSI_ADC_PIN PA0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA8 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ATOMRCF411/target.mk b/src/main/target/ATOMRCF411/target.mk new file mode 100644 index 0000000000..d20a4d2625 --- /dev/null +++ b/src/main/target/ATOMRCF411/target.mk @@ -0,0 +1,13 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/ATOMRCF722/target.c b/src/main/target/ATOMRCF722/target.c new file mode 100644 index 0000000000..ef9e9b2db9 --- /dev/null +++ b/src/main/target/ATOMRCF722/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 5 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ATOMRCF722/target.h b/src/main/target/ATOMRCF722/target.h new file mode 100644 index 0000000000..bc39d22b84 --- /dev/null +++ b/src/main/target/ATOMRCF722/target.h @@ -0,0 +1,134 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME ATOMRCF722 +#define MANUFACTURER_ID SKZO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PB2 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ATOMRCF722/target.mk b/src/main/target/ATOMRCF722/target.mk new file mode 100644 index 0000000000..cab8fbfdfe --- /dev/null +++ b/src/main/target/ATOMRCF722/target.mk @@ -0,0 +1,13 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/AXISFLYINGF7PRO/target.c b/src/main/target/AXISFLYINGF7PRO/target.c new file mode 100644 index 0000000000..30d3464b31 --- /dev/null +++ b/src/main/target/AXISFLYINGF7PRO/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 1), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM12, CH2, PB15, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AXISFLYINGF7PRO/target.h b/src/main/target/AXISFLYINGF7PRO/target.h new file mode 100644 index 0000000000..6bb36e0985 --- /dev/null +++ b/src/main/target/AXISFLYINGF7PRO/target.h @@ -0,0 +1,153 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME AXISFLYINGF7PRO +#define MANUFACTURER_ID AXFL +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB15 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + +#define PINIO1_PIN PC0 +#define PINIO2_PIN PC14 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(9) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AXISFLYINGF7PRO/target.mk b/src/main/target/AXISFLYINGF7PRO/target.mk new file mode 100644 index 0000000000..686df84a99 --- /dev/null +++ b/src/main/target/AXISFLYINGF7PRO/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/BEASTFPVF722/target.c b/src/main/target/BEASTFPVF722/target.c new file mode 100644 index 0000000000..d2a5002dd1 --- /dev/null +++ b/src/main/target/BEASTFPVF722/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BEASTFPVF722/target.h b/src/main/target/BEASTFPVF722/target.h new file mode 100644 index 0000000000..b4524e1353 --- /dev/null +++ b/src/main/target/BEASTFPVF722/target.h @@ -0,0 +1,149 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME BEASTFPVF722 +#define MANUFACTURER_ID BSTF +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC2 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BEASTFPVF722/target.mk b/src/main/target/BEASTFPVF722/target.mk new file mode 100644 index 0000000000..d5439fb8f7 --- /dev/null +++ b/src/main/target/BEASTFPVF722/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/CADDXF4/target.c b/src/main/target/CADDXF4/target.c new file mode 100644 index 0000000000..c76df802db --- /dev/null +++ b/src/main/target/CADDXF4/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CADDXF4/target.h b/src/main/target/CADDXF4/target.h new file mode 100644 index 0000000000..0894093257 --- /dev/null +++ b/src/main/target/CADDXF4/target.h @@ -0,0 +1,156 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME CADDXF4 +#define MANUFACTURER_ID CADX +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART2 PC0 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 +#define ADC_INSTANCE ADC3 + + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC5 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CADDXF4/target.mk b/src/main/target/CADDXF4/target.mk new file mode 100644 index 0000000000..c4582c01c5 --- /dev/null +++ b/src/main/target/CADDXF4/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/CRAZYBEEF405/target.c b/src/main/target/CRAZYBEEF405/target.c new file mode 100644 index 0000000000..92b6ce608f --- /dev/null +++ b/src/main/target/CRAZYBEEF405/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CRAZYBEEF405/target.h b/src/main/target/CRAZYBEEF405/target.h new file mode 100644 index 0000000000..c5ec5285c1 --- /dev/null +++ b/src/main/target/CRAZYBEEF405/target.h @@ -0,0 +1,139 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME CRAZYBEEF405 +#define MANUFACTURER_ID HAMO +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART2 PC13 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define BARO_I2C_INSTANCE (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB8 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(9) | TIM_N(10) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CRAZYBEEF405/target.mk b/src/main/target/CRAZYBEEF405/target.mk new file mode 100644 index 0000000000..d122ff5474 --- /dev/null +++ b/src/main/target/CRAZYBEEF405/target.mk @@ -0,0 +1,17 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/CYCLONEF405_PRO/target.c b/src/main/target/CYCLONEF405_PRO/target.c new file mode 100644 index 0000000000..9ff1b20d80 --- /dev/null +++ b/src/main/target/CYCLONEF405_PRO/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CYCLONEF405_PRO/target.h b/src/main/target/CYCLONEF405_PRO/target.h new file mode 100644 index 0000000000..7e858a76f1 --- /dev/null +++ b/src/main/target/CYCLONEF405_PRO/target.h @@ -0,0 +1,138 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME CYCLONEF405_PRO +#define MANUFACTURER_ID CYCL +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB0 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CYCLONEF405_PRO/target.mk b/src/main/target/CYCLONEF405_PRO/target.mk new file mode 100644 index 0000000000..d0af023d0a --- /dev/null +++ b/src/main/target/CYCLONEF405_PRO/target.mk @@ -0,0 +1,15 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/CYCLONEF722_PRO/target.c b/src/main/target/CYCLONEF722_PRO/target.c new file mode 100644 index 0000000000..9ff1b20d80 --- /dev/null +++ b/src/main/target/CYCLONEF722_PRO/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CYCLONEF722_PRO/target.h b/src/main/target/CYCLONEF722_PRO/target.h new file mode 100644 index 0000000000..be98a2e4e0 --- /dev/null +++ b/src/main/target/CYCLONEF722_PRO/target.h @@ -0,0 +1,141 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME CYCLONEF722_PRO +#define MANUFACTURER_ID CYCL +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25P16 +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB0 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CYCLONEF722_PRO/target.mk b/src/main/target/CYCLONEF722_PRO/target.mk new file mode 100644 index 0000000000..4a11a7bf55 --- /dev/null +++ b/src/main/target/CYCLONEF722_PRO/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/DAKEFPVF405/target.c b/src/main/target/DAKEFPVF405/target.c new file mode 100644 index 0000000000..0ecb4b7feb --- /dev/null +++ b/src/main/target/DAKEFPVF405/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVF405/target.h b/src/main/target/DAKEFPVF405/target.h new file mode 100644 index 0000000000..4ee9196be1 --- /dev/null +++ b/src/main/target/DAKEFPVF405/target.h @@ -0,0 +1,163 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DAKEFPVF405 +#define MANUFACTURER_ID DAKE +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_BARO +#define USE_FLASH +#define USE_GYRO +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO_SPI_BMP280 +#define USE_BARO_SPI_DPS310 +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC3 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW90_DEG +#define GYRO_MPU6500_ALIGN CW90_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define BARO_CS_PIN PC13 +#define BARO_SPI_INSTANCE SPI2 +#define BMP280_CS_PIN PC13 +#define BMP280_SPI_INSTANCE SPI2 +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC2_DMA_OPT 1 +#define ADC2_DMA_STREAM DMA2_Stream3 //# ADC 2: DMA2 Stream 3 Channel 1 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC2 + +#define PINIO1_PIN PC5 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVF405/target.mk b/src/main/target/DAKEFPVF405/target.mk new file mode 100644 index 0000000000..dd3dbc1a44 --- /dev/null +++ b/src/main/target/DAKEFPVF405/target.mk @@ -0,0 +1,20 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/DAKEFPVF411/target.c b/src/main/target/DAKEFPVF411/target.c new file mode 100644 index 0000000000..9502ef0d79 --- /dev/null +++ b/src/main/target/DAKEFPVF411/target.c @@ -0,0 +1,43 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVF411/target.h b/src/main/target/DAKEFPVF411/target.h new file mode 100644 index 0000000000..525ae8c69a --- /dev/null +++ b/src/main/target/DAKEFPVF411/target.h @@ -0,0 +1,132 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DAKEFPVF411 +#define MANUFACTURER_ID DAKE +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO_SPI_BMP280 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA1 +#define USE_BEEPER +#define BEEPER_PIN PA8 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC14 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PC15 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PC15 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_SOFTSERIAL1 +#define SOFTSERIAL1_TX_PIN PB10 +#define SOFTSERIAL1_RX_PIN PB10 +#define SERIAL_PORT_COUNT 4 + +#define BARO_CS_PIN PA13 +#define BARO_SPI_INSTANCE SPI2 +#define BMP280_CS_PIN PA13 +#define BMP280_SPI_INSTANCE SPI2 +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PA0 +#define CURRENT_METER_ADC_PIN PA4 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PA14 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 8 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVF411/target.mk b/src/main/target/DAKEFPVF411/target.mk new file mode 100644 index 0000000000..cc96076582 --- /dev/null +++ b/src/main/target/DAKEFPVF411/target.mk @@ -0,0 +1,16 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/DAKEFPVF722/target.c b/src/main/target/DAKEFPVF722/target.c new file mode 100644 index 0000000000..5b43140293 --- /dev/null +++ b/src/main/target/DAKEFPVF722/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH2N, PB0, TIM_USE_MOTOR, 0, 1), // motor 5 + DEF_TIM(TIM1, CH3N, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM3, CH1, PB4, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVF722/target.h b/src/main/target/DAKEFPVF722/target.h new file mode 100644 index 0000000000..1ffa9bab98 --- /dev/null +++ b/src/main/target/DAKEFPVF722/target.h @@ -0,0 +1,161 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DAKEFPVF722 +#define MANUFACTURER_ID DAKE +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_SPI_BMP280 +#define USE_BARO_SPI_DPS310 +#define USE_CAMERA_CONTROL +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC3 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB4 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW90_DEG +#define GYRO_MPU6500_ALIGN CW90_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define ESC_SENSOR_UART SERIAL_PORT_USART3 +#define SERIAL_PORT_COUNT 7 + +#define BARO_CS_PIN PA13 +#define BARO_SPI_INSTANCE SPI2 +#define BMP280_CS_PIN PA13 +#define BMP280_SPI_INSTANCE SPI2 +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC2_DMA_OPT 1 +#define ADC2_DMA_STREAM DMA2_Stream3 //# ADC 2: DMA2 Stream 3 Channel 1 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC2 + +#define PINIO1_PIN PA14 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVF722/target.mk b/src/main/target/DAKEFPVF722/target.mk new file mode 100644 index 0000000000..5c17e3f01c --- /dev/null +++ b/src/main/target/DAKEFPVF722/target.mk @@ -0,0 +1,19 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/DFR_F722_DUAL_HD/target.c b/src/main/target/DFR_F722_DUAL_HD/target.c new file mode 100644 index 0000000000..1cd13b9c6f --- /dev/null +++ b/src/main/target/DFR_F722_DUAL_HD/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM2, CH2, PA1, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DFR_F722_DUAL_HD/target.h b/src/main/target/DFR_F722_DUAL_HD/target.h new file mode 100644 index 0000000000..1f90cdd1b2 --- /dev/null +++ b/src/main/target/DFR_F722_DUAL_HD/target.h @@ -0,0 +1,146 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DFR_F722_DUAL_HD +#define MANUFACTURER_ID DFRA +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_BARO +#define USE_FLASH +#define USE_GYRO +#define USE_ACC_SPI_ICM20689 +#define USE_BARO_BMP280 +#define USE_FLASH_W25Q128FV +#define USE_GYRO_SPI_ICM20689 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC4 +#define LED_STRIP_PIN PA1 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA0 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA15 +#define GYRO_1_EXTI_PIN PA8 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW90_DEG +#define GYRO_2_ALIGN CW90_DEG +#define GYRO_2_CS_PIN PC3 +#define GYRO_2_EXTI_PIN PB2 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PC10 +#define UART4_RX_PIN PC11 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PB9 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC0 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC13 +#define PINIO2_PIN PC14 +#define PINIO3_PIN PB8 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DFR_F722_DUAL_HD/target.mk b/src/main/target/DFR_F722_DUAL_HD/target.mk new file mode 100644 index 0000000000..130c8b4d6c --- /dev/null +++ b/src/main/target/DFR_F722_DUAL_HD/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/DREAMFLYF405/target.c b/src/main/target/DREAMFLYF405/target.c new file mode 100644 index 0000000000..f6e3c56b14 --- /dev/null +++ b/src/main/target/DREAMFLYF405/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DREAMFLYF405/target.h b/src/main/target/DREAMFLYF405/target.h new file mode 100644 index 0000000000..c6f3c6a3ff --- /dev/null +++ b/src/main/target/DREAMFLYF405/target.h @@ -0,0 +1,157 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DREAMFLYF405 +#define MANUFACTURER_ID DFRC +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + + +#define PINIO1_PIN PC5 //IO1 is used for camera switching +#define PINIO2_PIN PC0 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DREAMFLYF405/target.mk b/src/main/target/DREAMFLYF405/target.mk new file mode 100644 index 0000000000..c4582c01c5 --- /dev/null +++ b/src/main/target/DREAMFLYF405/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/DREAMFLYF411/target.c b/src/main/target/DREAMFLYF411/target.c new file mode 100644 index 0000000000..ac36e94027 --- /dev/null +++ b/src/main/target/DREAMFLYF411/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DREAMFLYF411/target.h b/src/main/target/DREAMFLYF411/target.h new file mode 100644 index 0000000000..2306a6c0d8 --- /dev/null +++ b/src/main/target/DREAMFLYF411/target.h @@ -0,0 +1,122 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DREAMFLYF411 +#define MANUFACTURER_ID DFRC +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA0 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIALRX_UART SERIAL_PORT_USART1 +#define SERIAL_PORT_COUNT 3 + + +#define FLASH_CS_PIN PA14 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(5) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DREAMFLYF411/target.mk b/src/main/target/DREAMFLYF411/target.mk new file mode 100644 index 0000000000..4f4d87f194 --- /dev/null +++ b/src/main/target/DREAMFLYF411/target.mk @@ -0,0 +1,15 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/DYSF44530D/target.c b/src/main/target/DYSF44530D/target.c new file mode 100644 index 0000000000..3b5c5f4491 --- /dev/null +++ b/src/main/target/DYSF44530D/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN + DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DYSF44530D/target.h b/src/main/target/DYSF44530D/target.h new file mode 100644 index 0000000000..d5d2def3cb --- /dev/null +++ b/src/main/target/DYSF44530D/target.h @@ -0,0 +1,127 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DYSF44530D +#define MANUFACTURER_ID DYST +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB9 +#define LED1_PIN PA14 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC3 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PC2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define MAX7456_SPI_CS_PIN PB10 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC5 +#define CURRENT_METER_ADC_PIN PC4 +#define RSSI_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DYSF44530D/target.mk b/src/main/target/DYSF44530D/target.mk new file mode 100644 index 0000000000..03ae2a2a2a --- /dev/null +++ b/src/main/target/DYSF44530D/target.mk @@ -0,0 +1,13 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/DYSF4PRO/target.c b/src/main/target/DYSF4PRO/target.c new file mode 100644 index 0000000000..ce613eece9 --- /dev/null +++ b/src/main/target/DYSF4PRO/target.c @@ -0,0 +1,49 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // pwm RX_PWM4_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // pwm RX_PWM5_PIN + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // pwm RX_PWM6_PIN + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DYSF4PRO/target.h b/src/main/target/DYSF4PRO/target.h new file mode 100644 index 0000000000..0edb126e34 --- /dev/null +++ b/src/main/target/DYSF4PRO/target.h @@ -0,0 +1,129 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DYSF4PRO +#define MANUFACTURER_ID DYST +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PA1 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) + +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC2_DMA_OPT 1 +#define ADC2_DMA_STREAM DMA2_Stream3 //# ADC 2: DMA2 Stream 3 Channel 1 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC2 + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB14 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 14 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DYSF4PRO/target.mk b/src/main/target/DYSF4PRO/target.mk new file mode 100644 index 0000000000..cde919cc55 --- /dev/null +++ b/src/main/target/DYSF4PRO/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/EACHINEF411_AIO/target.c b/src/main/target/EACHINEF411_AIO/target.c new file mode 100644 index 0000000000..ba25659ec9 --- /dev/null +++ b/src/main/target/EACHINEF411_AIO/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/EACHINEF411_AIO/target.h b/src/main/target/EACHINEF411_AIO/target.h new file mode 100644 index 0000000000..67eea39b88 --- /dev/null +++ b/src/main/target/EACHINEF411_AIO/target.h @@ -0,0 +1,107 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME EACHINEF411_AIO +#define MANUFACTURER_ID EACH +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_SOFTSERIAL1 +#define SOFTSERIAL1_TX_PIN PB3 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/EACHINEF411_AIO/target.mk b/src/main/target/EACHINEF411_AIO/target.mk new file mode 100644 index 0000000000..d20a4d2625 --- /dev/null +++ b/src/main/target/EACHINEF411_AIO/target.mk @@ -0,0 +1,13 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/EACHINEF722_AIO/target.c b/src/main/target/EACHINEF722_AIO/target.c new file mode 100644 index 0000000000..f320bdbd1a --- /dev/null +++ b/src/main/target/EACHINEF722_AIO/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN + DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/EACHINEF722_AIO/target.h b/src/main/target/EACHINEF722_AIO/target.h new file mode 100644 index 0000000000..87ae89c739 --- /dev/null +++ b/src/main/target/EACHINEF722_AIO/target.h @@ -0,0 +1,135 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME EACHINEF722_AIO +#define MANUFACTURER_ID EACH +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_BARO +#define USE_BARO_SPI_BMP280 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PB2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define BARO_CS_PIN PA4 +#define BARO_SPI_INSTANCE SPI1 +#define BMP280_CS_PIN PA4 +#define BMP280_SPI_INSTANCE SPI1 +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC8 +#define PINIO2_PIN PC9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/EACHINEF722_AIO/target.mk b/src/main/target/EACHINEF722_AIO/target.mk new file mode 100644 index 0000000000..4a11a7bf55 --- /dev/null +++ b/src/main/target/EACHINEF722_AIO/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/ELINF405/target.c b/src/main/target/ELINF405/target.c new file mode 100644 index 0000000000..bbc9b7886f --- /dev/null +++ b/src/main/target/ELINF405/target.c @@ -0,0 +1,43 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH4, PC9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH1, PB6, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH2, PB7, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ELINF405/target.h b/src/main/target/ELINF405/target.h new file mode 100644 index 0000000000..d635ae8de7 --- /dev/null +++ b/src/main/target/ELINF405/target.h @@ -0,0 +1,134 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME ELINF405 +#define MANUFACTURER_ID DRCL +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define CAMERA_CONTROL_PIN PB7 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_SOFTSERIAL1 +#define SOFTSERIAL1_TX_PIN PC9 +#define USE_SOFTSERIAL2 +#define SOFTSERIAL2_RX_PIN PA8 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define MAX7456_SPI_CS_PIN PC8 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC13 +#define PINIO2_PIN PC14 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 8 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ELINF405/target.mk b/src/main/target/ELINF405/target.mk new file mode 100644 index 0000000000..9c3d6de154 --- /dev/null +++ b/src/main/target/ELINF405/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/EMAX_BABYHAWK_II_HD/target.c b/src/main/target/EMAX_BABYHAWK_II_HD/target.c new file mode 100644 index 0000000000..284d41116d --- /dev/null +++ b/src/main/target/EMAX_BABYHAWK_II_HD/target.c @@ -0,0 +1,49 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN; dma 0 assumed, please verify + DEF_TIM(TIM3, CH4, PB1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH2, PB7, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/EMAX_BABYHAWK_II_HD/target.h b/src/main/target/EMAX_BABYHAWK_II_HD/target.h new file mode 100644 index 0000000000..a4d26b34c5 --- /dev/null +++ b/src/main/target/EMAX_BABYHAWK_II_HD/target.h @@ -0,0 +1,126 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME EMAX_BABYHAWK_II_HD +#define MANUFACTURER_ID EMAX +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_ICM20689 +#define USE_ACC_SPI_ICM20689 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_FLASH_W25M512 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA15 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB10 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PB3 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1 +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + + +#define FLASH_CS_PIN PB2 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PA0 +#define CURRENT_METER_ADC_PIN PA1 +#define RSSI_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 +#define ADC_INSTANCE ADC1 + + +#define PINIO1_PIN PB5 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 14 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/EMAX_BABYHAWK_II_HD/target.mk b/src/main/target/EMAX_BABYHAWK_II_HD/target.mk new file mode 100644 index 0000000000..e876b82ba8 --- /dev/null +++ b/src/main/target/EMAX_BABYHAWK_II_HD/target.mk @@ -0,0 +1,17 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/EXUAVF4PRO/target.c b/src/main/target/EXUAVF4PRO/target.c new file mode 100644 index 0000000000..3b97e244d6 --- /dev/null +++ b/src/main/target/EXUAVF4PRO/target.c @@ -0,0 +1,50 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM4, CH4, PB9, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // pwm RX_PWM4_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // pwm RX_PWM5_PIN + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // pwm RX_PWM6_PIN + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/EXUAVF4PRO/target.h b/src/main/target/EXUAVF4PRO/target.h new file mode 100644 index 0000000000..a2afa8d467 --- /dev/null +++ b/src/main/target/EXUAVF4PRO/target.h @@ -0,0 +1,123 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME EXUAVF4PRO +#define MANUFACTURER_ID EXUA +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART6 PC8 +#define SERIAL_PORT_COUNT 5 + +#define USE_I2C +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PA0 +#define ADC2_DMA_OPT 1 +#define ADC2_DMA_STREAM DMA2_Stream3 //# ADC 2: DMA2 Stream 3 Channel 1 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC2 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB14 + +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 15 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(10) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/EXUAVF4PRO/target.mk b/src/main/target/EXUAVF4PRO/target.mk new file mode 100644 index 0000000000..d9de579744 --- /dev/null +++ b/src/main/target/EXUAVF4PRO/target.mk @@ -0,0 +1,17 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FENIX_F405/target.c b/src/main/target/FENIX_F405/target.c new file mode 100644 index 0000000000..8a79cf2948 --- /dev/null +++ b/src/main/target/FENIX_F405/target.c @@ -0,0 +1,40 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH3N, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_LED, 0, 1), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FENIX_F405/target.h b/src/main/target/FENIX_F405/target.h new file mode 100644 index 0000000000..bdd6e7b340 --- /dev/null +++ b/src/main/target/FENIX_F405/target.h @@ -0,0 +1,112 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FENIX_F405 +#define MANUFACTURER_ID FOSS +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25M512 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA8 +#define LED_STRIP_PIN PC8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PB6 + +#define ACC_MPU6000_ALIGN CW0_DEG_FLIP +#define GYRO_MPU6000_ALIGN CW0_DEG_FLIP +#define MPU6000_CS_PIN PB3 +#define MPU6000_SPI_INSTANCE SPI3 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 4 + + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC4 +#define CURRENT_METER_ADC_PIN PA1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 270 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 5 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FENIX_F405/target.mk b/src/main/target/FENIX_F405/target.mk new file mode 100644 index 0000000000..03ae2a2a2a --- /dev/null +++ b/src/main/target/FENIX_F405/target.mk @@ -0,0 +1,13 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FF_FORTINIF4_REV03/target.c b/src/main/target/FF_FORTINIF4_REV03/target.c new file mode 100644 index 0000000000..0d0a83b2e0 --- /dev/null +++ b/src/main/target/FF_FORTINIF4_REV03/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH4, PB9, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FF_FORTINIF4_REV03/target.h b/src/main/target/FF_FORTINIF4_REV03/target.h new file mode 100644 index 0000000000..ade860c6f9 --- /dev/null +++ b/src/main/target/FF_FORTINIF4_REV03/target.h @@ -0,0 +1,138 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FF_FORTINIF4_REV03 +#define MANUFACTURER_ID FFPV +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM20689 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_ICM20689 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED1_PIN PB4 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PB3 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA10 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_ICM20689_ALIGN CW180_DEG +#define GYRO_ICM20689_ALIGN CW180_DEG +#define ICM20689_CS_PIN PA4 +#define ICM20689_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART3 PC15 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_3 +#define I2C_DEVICE_3 (I2CDEV_3) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_3) +#define I2C3_SCL PA8 +#define I2C3_SDA PC9 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB0 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FF_FORTINIF4_REV03/target.mk b/src/main/target/FF_FORTINIF4_REV03/target.mk new file mode 100644 index 0000000000..5802c7e513 --- /dev/null +++ b/src/main/target/FF_FORTINIF4_REV03/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FF_PIKOF4OSD/target.c b/src/main/target/FF_PIKOF4OSD/target.c new file mode 100644 index 0000000000..50d058ee4a --- /dev/null +++ b/src/main/target/FF_PIKOF4OSD/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH2N, PB14, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH3N, PB15, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FF_PIKOF4OSD/target.h b/src/main/target/FF_PIKOF4OSD/target.h new file mode 100644 index 0000000000..315367b975 --- /dev/null +++ b/src/main/target/FF_PIKOF4OSD/target.h @@ -0,0 +1,118 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FF_PIKOF4OSD +#define MANUFACTURER_ID FFPV +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED1_PIN PB4 +#define LED_STRIP_PIN PB7 +#define USE_BEEPER +#define BEEPER_PIN PA14 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA15 +#define MPU6000_SPI_INSTANCE SPI3 + +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA15 +#define MPU6500_SPI_INSTANCE SPI3 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART3 PC3 +#define SERIAL_PORT_COUNT 5 + + +#define MAX7456_SPI_CS_PIN PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FF_PIKOF4OSD/target.mk b/src/main/target/FF_PIKOF4OSD/target.mk new file mode 100644 index 0000000000..f76ab4b694 --- /dev/null +++ b/src/main/target/FF_PIKOF4OSD/target.mk @@ -0,0 +1,15 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLASHHOBBYF405/target.c b/src/main/target/FLASHHOBBYF405/target.c new file mode 100644 index 0000000000..120fb4cbab --- /dev/null +++ b/src/main/target/FLASHHOBBYF405/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLASHHOBBYF405/target.h b/src/main/target/FLASHHOBBYF405/target.h new file mode 100644 index 0000000000..9838e138cd --- /dev/null +++ b/src/main/target/FLASHHOBBYF405/target.h @@ -0,0 +1,156 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLASHHOBBYF405 +#define MANUFACTURER_ID FHRC +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PD2 + +#define PINIO1_PIN PC13 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLASHHOBBYF405/target.mk b/src/main/target/FLASHHOBBYF405/target.mk new file mode 100644 index 0000000000..c4582c01c5 --- /dev/null +++ b/src/main/target/FLASHHOBBYF405/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLASHHOBBYF722/target.c b/src/main/target/FLASHHOBBYF722/target.c new file mode 100644 index 0000000000..120fb4cbab --- /dev/null +++ b/src/main/target/FLASHHOBBYF722/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLASHHOBBYF722/target.h b/src/main/target/FLASHHOBBYF722/target.h new file mode 100644 index 0000000000..175a7e3793 --- /dev/null +++ b/src/main/target/FLASHHOBBYF722/target.h @@ -0,0 +1,152 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLASHHOBBYF722 +#define MANUFACTURER_ID FLHB +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + + +#define PINIO1_PIN PC13 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLASHHOBBYF722/target.mk b/src/main/target/FLASHHOBBYF722/target.mk new file mode 100644 index 0000000000..21c02bd2ba --- /dev/null +++ b/src/main/target/FLASHHOBBYF722/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYCOLORF4/target.c b/src/main/target/FLYCOLORF4/target.c new file mode 100644 index 0000000000..3d848ccb3e --- /dev/null +++ b/src/main/target/FLYCOLORF4/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH4, PB9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH2N, PB14, TIM_USE_LED, 0, 1), // led + DEF_TIM(TIM12, CH2, PB15, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF4/target.h b/src/main/target/FLYCOLORF4/target.h new file mode 100644 index 0000000000..82d52be5b2 --- /dev/null +++ b/src/main/target/FLYCOLORF4/target.h @@ -0,0 +1,138 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYCOLORF4 +#define MANUFACTURER_ID FLCO +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_BARO +#define USE_BARO_BMP388 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_SPI_GYRO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PB14 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB15 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PC2 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define BARO_I2C_INSTANCE (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 235 +#define ADC_INSTANCE ADC1 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF4/target.mk b/src/main/target/FLYCOLORF4/target.mk new file mode 100644 index 0000000000..93768865d3 --- /dev/null +++ b/src/main/target/FLYCOLORF4/target.mk @@ -0,0 +1,15 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYCOLORF7MINI/target.c b/src/main/target/FLYCOLORF7MINI/target.c new file mode 100644 index 0000000000..8a8737d2eb --- /dev/null +++ b/src/main/target/FLYCOLORF7MINI/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF7MINI/target.h b/src/main/target/FLYCOLORF7MINI/target.h new file mode 100644 index 0000000000..721070a5fa --- /dev/null +++ b/src/main/target/FLYCOLORF7MINI/target.h @@ -0,0 +1,149 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYCOLORF7MINI +#define MANUFACTURER_ID FLCO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_BARO +#define USE_FLASH +#define USE_GYRO +#define USE_ACC_SPI_MPU6500 +#define USE_BARO_BMP280 +#define USE_FLASH_W25Q128FV +#define USE_GYRO_SPI_MPU6500 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC3 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PB2 +#define GYRO_2_EXTI_PIN PC4 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 220 +#define ADC_INSTANCE ADC3 + + +#define PINIO1_PIN PB0 +#define PINIO2_PIN PB9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF7MINI/target.mk b/src/main/target/FLYCOLORF7MINI/target.mk new file mode 100644 index 0000000000..d5a834043e --- /dev/null +++ b/src/main/target/FLYCOLORF7MINI/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYCOLORF7V2/target.c b/src/main/target/FLYCOLORF7V2/target.c new file mode 100644 index 0000000000..8a1e1db2ad --- /dev/null +++ b/src/main/target/FLYCOLORF7V2/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF7V2/target.h b/src/main/target/FLYCOLORF7V2/target.h new file mode 100644 index 0000000000..3bb36b0090 --- /dev/null +++ b/src/main/target/FLYCOLORF7V2/target.h @@ -0,0 +1,149 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYCOLORF7V2 +#define MANUFACTURER_ID FLCO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC3 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PB2 +#define GYRO_2_EXTI_PIN PC4 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART1 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 1 +#define ADC3_DMA_STREAM DMA2_Stream1 //# ADC 3: DMA2 Stream 1 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 +#define ADC_INSTANCE ADC3 + +#define PINIO1_PIN PB0 +#define PINIO2_PIN PB9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF7V2/target.mk b/src/main/target/FLYCOLORF7V2/target.mk new file mode 100644 index 0000000000..436f82c030 --- /dev/null +++ b/src/main/target/FLYCOLORF7V2/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYCOLORF7_AIO_HD/target.c b/src/main/target/FLYCOLORF7_AIO_HD/target.c new file mode 100644 index 0000000000..17971e789b --- /dev/null +++ b/src/main/target/FLYCOLORF7_AIO_HD/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH2N, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF7_AIO_HD/target.h b/src/main/target/FLYCOLORF7_AIO_HD/target.h new file mode 100644 index 0000000000..2d85fbec2a --- /dev/null +++ b/src/main/target/FLYCOLORF7_AIO_HD/target.h @@ -0,0 +1,137 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYCOLORF7_AIO_HD +#define MANUFACTURER_ID FLCO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_BARO +#define USE_BARO_SPI_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB2 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB9 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6500_ALIGN CW0_DEG +#define GYRO_MPU6500_ALIGN CW0_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIALRX_UART SERIAL_PORT_USART1 +#define SERIAL_PORT_COUNT 6 + +#define BARO_CS_PIN PC15 +#define BARO_SPI_INSTANCE SPI3 +#define BMP280_CS_PIN PC15 +#define BMP280_SPI_INSTANCE SPI3 +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PC8 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PC14 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF7_AIO_HD/target.mk b/src/main/target/FLYCOLORF7_AIO_HD/target.mk new file mode 100644 index 0000000000..d5a834043e --- /dev/null +++ b/src/main/target/FLYCOLORF7_AIO_HD/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYWOOF405NANO/target.c b/src/main/target/FLYWOOF405NANO/target.c new file mode 100644 index 0000000000..f3b4b3ec25 --- /dev/null +++ b/src/main/target/FLYWOOF405NANO/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF405NANO/target.h b/src/main/target/FLYWOOF405NANO/target.h new file mode 100644 index 0000000000..5b76ff5028 --- /dev/null +++ b/src/main/target/FLYWOOF405NANO/target.h @@ -0,0 +1,149 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYWOOF405NANO +#define MANUFACTURER_ID FLWO +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA9 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PB13 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PB12 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PB12 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PB12 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB14 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB8 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF405NANO/target.mk b/src/main/target/FLYWOOF405NANO/target.mk new file mode 100644 index 0000000000..d122ff5474 --- /dev/null +++ b/src/main/target/FLYWOOF405NANO/target.mk @@ -0,0 +1,17 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYWOOF405PRO/target.c b/src/main/target/FLYWOOF405PRO/target.c new file mode 100644 index 0000000000..f3b4b3ec25 --- /dev/null +++ b/src/main/target/FLYWOOF405PRO/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF405PRO/target.h b/src/main/target/FLYWOOF405PRO/target.h new file mode 100644 index 0000000000..de13ef207c --- /dev/null +++ b/src/main/target/FLYWOOF405PRO/target.h @@ -0,0 +1,141 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYWOOF405PRO +#define MANUFACTURER_ID FLWO +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM20689 +#define USE_ACC +#define USE_ACC_SPI_ICM20689 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA9 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PB13 + +#define ACC_ICM20689_ALIGN CW180_DEG_FLIP +#define GYRO_ICM20689_ALIGN CW180_DEG_FLIP +#define ICM20689_CS_PIN PB12 +#define ICM20689_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG_FLIP +#define GYRO_ICM42688P_ALIGN CW180_DEG_FLIP +#define ICM42688P_CS_PIN PB12 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB14 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB8 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF405PRO/target.mk b/src/main/target/FLYWOOF405PRO/target.mk new file mode 100644 index 0000000000..52369242a3 --- /dev/null +++ b/src/main/target/FLYWOOF405PRO/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYWOOF411HEX/target.c b/src/main/target/FLYWOOF411HEX/target.c new file mode 100644 index 0000000000..04faf9fbbe --- /dev/null +++ b/src/main/target/FLYWOOF411HEX/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM3, CH3, PB0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM3, CH1, PB4, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF411HEX/target.h b/src/main/target/FLYWOOF411HEX/target.h new file mode 100644 index 0000000000..6c15f60ae0 --- /dev/null +++ b/src/main/target/FLYWOOF411HEX/target.h @@ -0,0 +1,112 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYWOOF411HEX +#define MANUFACTURER_ID FLWO +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA0 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PB5 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_SOFTSERIAL1 +#define SOFTSERIAL1_TX_PIN PB4 +#define SOFTSERIAL1_RX_PIN PB0 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB1 +#define CURRENT_METER_ADC_PIN PA1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF411HEX/target.mk b/src/main/target/FLYWOOF411HEX/target.mk new file mode 100644 index 0000000000..6d13aff882 --- /dev/null +++ b/src/main/target/FLYWOOF411HEX/target.mk @@ -0,0 +1,14 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYWOOF722PRO/target.c b/src/main/target/FLYWOOF722PRO/target.c new file mode 100644 index 0000000000..c3e9106254 --- /dev/null +++ b/src/main/target/FLYWOOF722PRO/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF722PRO/target.h b/src/main/target/FLYWOOF722PRO/target.h new file mode 100644 index 0000000000..cfabdd6edc --- /dev/null +++ b/src/main/target/FLYWOOF722PRO/target.h @@ -0,0 +1,147 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYWOOF722PRO +#define MANUFACTURER_ID FLWO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_BARO +#define USE_FLASH +#define USE_GYRO +#define USE_ACC_SPI_MPU6000 +#define USE_BARO_DPS310 +#define USE_FLASH_W25Q128FV +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC3 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PB2 +#define GYRO_2_EXTI_PIN PC4 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB0 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF722PRO/target.mk b/src/main/target/FLYWOOF722PRO/target.mk new file mode 100644 index 0000000000..d8724c9d69 --- /dev/null +++ b/src/main/target/FLYWOOF722PRO/target.mk @@ -0,0 +1,13 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYWOOF722PROV2/target.c b/src/main/target/FLYWOOF722PROV2/target.c new file mode 100644 index 0000000000..c3e9106254 --- /dev/null +++ b/src/main/target/FLYWOOF722PROV2/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF722PROV2/target.h b/src/main/target/FLYWOOF722PROV2/target.h new file mode 100644 index 0000000000..d2dd7afde0 --- /dev/null +++ b/src/main/target/FLYWOOF722PROV2/target.h @@ -0,0 +1,145 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYWOOF722PROV2 +#define MANUFACTURER_ID FLWO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_BARO +#define USE_FLASH +#define USE_GYRO +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_DPS310 +#define USE_FLASH_W25Q128FV +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC3 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PB2 +#define GYRO_2_EXTI_PIN PC4 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB0 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF722PROV2/target.mk b/src/main/target/FLYWOOF722PROV2/target.mk new file mode 100644 index 0000000000..2843607a47 --- /dev/null +++ b/src/main/target/FLYWOOF722PROV2/target.mk @@ -0,0 +1,13 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FLYWOOF745AIO/target.c b/src/main/target/FLYWOOF745AIO/target.c new file mode 100644 index 0000000000..e98050dadd --- /dev/null +++ b/src/main/target/FLYWOOF745AIO/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 2), // motor 3 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF745AIO/target.h b/src/main/target/FLYWOOF745AIO/target.h new file mode 100644 index 0000000000..3c6fa8039b --- /dev/null +++ b/src/main/target/FLYWOOF745AIO/target.h @@ -0,0 +1,148 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYWOOF745AIO +#define MANUFACTURER_ID FLWO +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PE4 +#define GYRO_1_EXTI_PIN PE1 +#define GYRO_1_SPI_INSTANCE SPI4 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI4 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_TX_PIN PE8 +#define UART7_RX_PIN PE7 +#define SERIAL_PORT_COUNT 8 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PA4 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 175 + +#define PINIO1_PIN PC0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF745AIO/target.mk b/src/main/target/FLYWOOF745AIO/target.mk new file mode 100644 index 0000000000..272fc1a646 --- /dev/null +++ b/src/main/target/FLYWOOF745AIO/target.mk @@ -0,0 +1,16 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FOXEERF405V2/target.c b/src/main/target/FOXEERF405V2/target.c new file mode 100644 index 0000000000..3fc5423381 --- /dev/null +++ b/src/main/target/FOXEERF405V2/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH3N, PB15, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM3, CH4, PB1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM3, CH3, PB0, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERF405V2/target.h b/src/main/target/FOXEERF405V2/target.h new file mode 100644 index 0000000000..7cd8fd9b89 --- /dev/null +++ b/src/main/target/FOXEERF405V2/target.h @@ -0,0 +1,152 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FOXEERF405V2 +#define MANUFACTURER_ID FOXE +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA13 +#define LED1_PIN PA14 +#define LED_STRIP_PIN PB7 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define CAMERA_CONTROL_PIN PB0 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PC2 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW270_DEG +#define GYRO_MPU6500_ALIGN CW270_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 + +#define MAX7456_SPI_CS_PIN PC14 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 70 + +#define PINIO1_PIN PB14 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERF405V2/target.mk b/src/main/target/FOXEERF405V2/target.mk new file mode 100644 index 0000000000..74a99f245b --- /dev/null +++ b/src/main/target/FOXEERF405V2/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FOXEERF722V2/target.c b/src/main/target/FOXEERF722V2/target.c new file mode 100644 index 0000000000..d77f6f8c43 --- /dev/null +++ b/src/main/target/FOXEERF722V2/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERF722V2/target.h b/src/main/target/FOXEERF722V2/target.h new file mode 100644 index 0000000000..44df7d2e21 --- /dev/null +++ b/src/main/target/FOXEERF722V2/target.h @@ -0,0 +1,132 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FOXEERF722V2 +#define MANUFACTURER_ID FOXE +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA15 +#define USE_BEEPER +#define BEEPER_PIN PA4 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PB2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PC3 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PA0 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERF722V2/target.mk b/src/main/target/FOXEERF722V2/target.mk new file mode 100644 index 0000000000..087c9acf1c --- /dev/null +++ b/src/main/target/FOXEERF722V2/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FOXEERF722V3/target.c b/src/main/target/FOXEERF722V3/target.c new file mode 100644 index 0000000000..b0bb5ff070 --- /dev/null +++ b/src/main/target/FOXEERF722V3/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERF722V3/target.h b/src/main/target/FOXEERF722V3/target.h new file mode 100644 index 0000000000..08ff4225c3 --- /dev/null +++ b/src/main/target/FOXEERF722V3/target.h @@ -0,0 +1,139 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FOXEERF722V3 +#define MANUFACTURER_ID FOXE +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA15 +#define USE_BEEPER +#define BEEPER_PIN PA4 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PB2 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PC3 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PA0 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERF722V3/target.mk b/src/main/target/FOXEERF722V3/target.mk new file mode 100644 index 0000000000..743d8745eb --- /dev/null +++ b/src/main/target/FOXEERF722V3/target.mk @@ -0,0 +1,15 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FOXEERF745V4_AIO/target.c b/src/main/target/FOXEERF745V4_AIO/target.c new file mode 100644 index 0000000000..fdbdc8ff36 --- /dev/null +++ b/src/main/target/FOXEERF745V4_AIO/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERF745V4_AIO/target.h b/src/main/target/FOXEERF745V4_AIO/target.h new file mode 100644 index 0000000000..4a430c2cb0 --- /dev/null +++ b/src/main/target/FOXEERF745V4_AIO/target.h @@ -0,0 +1,140 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FOXEERF745V4_AIO +#define MANUFACTURER_ID FOXE +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PD2 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PD0 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA15 +#define MPU6000_SPI_INSTANCE SPI3 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART7 +#define UART7_TX_PIN PE8 +#define UART7_RX_PIN PE7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PE4 +#define FLASH_SPI_INSTANCE SPI4 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 +#define ADC_INSTANCE ADC1 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERF745V4_AIO/target.mk b/src/main/target/FOXEERF745V4_AIO/target.mk new file mode 100644 index 0000000000..6cae9df69a --- /dev/null +++ b/src/main/target/FOXEERF745V4_AIO/target.mk @@ -0,0 +1,15 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FPVM_BETAFLIGHTF7/target.c b/src/main/target/FPVM_BETAFLIGHTF7/target.c new file mode 100644 index 0000000000..6f4785c2e4 --- /dev/null +++ b/src/main/target/FPVM_BETAFLIGHTF7/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 2), // motor 3 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 1), // cam ctrl + DEF_TIM(TIM1, CH3, PE13, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FPVM_BETAFLIGHTF7/target.h b/src/main/target/FPVM_BETAFLIGHTF7/target.h new file mode 100644 index 0000000000..4d4cd3f784 --- /dev/null +++ b/src/main/target/FPVM_BETAFLIGHTF7/target.h @@ -0,0 +1,130 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FPVM_BETAFLIGHTF7 +#define MANUFACTURER_ID FPVM +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC_SPI_MPU6500 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE0 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PC8 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PD0 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PA15 +#define GYRO_2_EXTI_PIN PE8 +#define GYRO_2_SPI_INSTANCE SPI3 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 5 + +#define USE_I2C +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FPVM_BETAFLIGHTF7/target.mk b/src/main/target/FPVM_BETAFLIGHTF7/target.mk new file mode 100644 index 0000000000..c8f763639b --- /dev/null +++ b/src/main/target/FPVM_BETAFLIGHTF7/target.mk @@ -0,0 +1,16 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/FURYF4OSD/target.c b/src/main/target/FURYF4OSD/target.c new file mode 100644 index 0000000000..5abd05141f --- /dev/null +++ b/src/main/target/FURYF4OSD/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM5, CH1, PA0, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FURYF4OSD/target.h b/src/main/target/FURYF4OSD/target.h new file mode 100644 index 0000000000..04cc9f2316 --- /dev/null +++ b/src/main/target/FURYF4OSD/target.h @@ -0,0 +1,154 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FURYF4OSD +#define MANUFACTURER_ID DIAT +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM20689 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM20689 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED1_PIN PB4 +#define LED_STRIP_PIN PA0 +#define USE_BEEPER +#define BEEPER_PIN PA8 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB9 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_ICM20689_ALIGN CW180_DEG +#define GYRO_ICM20689_ALIGN CW180_DEG +#define ICM20689_CS_PIN PA4 +#define ICM20689_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PC9 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FURYF4OSD/target.mk b/src/main/target/FURYF4OSD/target.mk new file mode 100644 index 0000000000..c0abd747c8 --- /dev/null +++ b/src/main/target/FURYF4OSD/target.mk @@ -0,0 +1,19 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/GEELANGF411/target.c b/src/main/target/GEELANGF411/target.c new file mode 100644 index 0000000000..7302863a23 --- /dev/null +++ b/src/main/target/GEELANGF411/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEELANGF411/target.h b/src/main/target/GEELANGF411/target.h new file mode 100644 index 0000000000..66e695e6b9 --- /dev/null +++ b/src/main/target/GEELANGF411/target.h @@ -0,0 +1,110 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME GEELANGF411 +#define MANUFACTURER_ID GEEL +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEELANGF411/target.mk b/src/main/target/GEELANGF411/target.mk new file mode 100644 index 0000000000..6d13aff882 --- /dev/null +++ b/src/main/target/GEELANGF411/target.mk @@ -0,0 +1,14 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/GEMEF411/target.c b/src/main/target/GEMEF411/target.c new file mode 100644 index 0000000000..6622cfa1fa --- /dev/null +++ b/src/main/target/GEMEF411/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH1, PA0, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEMEF411/target.h b/src/main/target/GEMEF411/target.h new file mode 100644 index 0000000000..c8c2151065 --- /dev/null +++ b/src/main/target/GEMEF411/target.h @@ -0,0 +1,125 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME GEMEF411 +#define MANUFACTURER_ID GFPV +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA0 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC15 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA15 +#define UART1_RX_PIN PB3 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_SOFTSERIAL1 +#define SOFTSERIAL1_TX_PIN PB10 +#define SOFTSERIAL1_RX_PIN PB10 +#define USE_SOFTSERIAL2 +#define SOFTSERIAL2_TX_PIN PB6 +#define SOFTSERIAL2_RX_PIN PB6 +#define SERIAL_PORT_COUNT 5 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB2 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PA1 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 800 + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEMEF411/target.mk b/src/main/target/GEMEF411/target.mk new file mode 100644 index 0000000000..d52e016fc0 --- /dev/null +++ b/src/main/target/GEMEF411/target.mk @@ -0,0 +1,15 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/GEPRCF405_BT_HD/target.c b/src/main/target/GEPRCF405_BT_HD/target.c new file mode 100644 index 0000000000..6aed8de8cc --- /dev/null +++ b/src/main/target/GEPRCF405_BT_HD/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM3, CH4, PB1, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEPRCF405_BT_HD/target.h b/src/main/target/GEPRCF405_BT_HD/target.h new file mode 100644 index 0000000000..ea526c5919 --- /dev/null +++ b/src/main/target/GEPRCF405_BT_HD/target.h @@ -0,0 +1,162 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME GEPRCF405_BT_HD +#define MANUFACTURER_ID GEPR +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PC15 +#define LED_STRIP_PIN PB1 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC3 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA15 +#define MPU6000_SPI_INSTANCE SPI3 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA15 +#define ICM42688P_SPI_INSTANCE SPI3 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA15 +#define BMI270_SPI_INSTANCE SPI3 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_SOFTSERIAL1 +#define SOFTSERIAL1_TX_PIN PB2 +#define SOFTSERIAL1_RX_PIN PC5 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 8 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC1_DMA_OPT 0 +#define ADC3_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + + +#define PINIO1_PIN PA13 +#define PINIO2_PIN PA14 +#define PINIO2_CONFIG 129 +#define PINIO2_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEPRCF405_BT_HD/target.mk b/src/main/target/GEPRCF405_BT_HD/target.mk new file mode 100644 index 0000000000..c4582c01c5 --- /dev/null +++ b/src/main/target/GEPRCF405_BT_HD/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HAKRCF405V2/target.c b/src/main/target/HAKRCF405V2/target.c new file mode 100644 index 0000000000..c76df802db --- /dev/null +++ b/src/main/target/HAKRCF405V2/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCF405V2/target.h b/src/main/target/HAKRCF405V2/target.h new file mode 100644 index 0000000000..c7fe7f8519 --- /dev/null +++ b/src/main/target/HAKRCF405V2/target.h @@ -0,0 +1,156 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HAKRCF405V2 +#define MANUFACTURER_ID HARC +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART2 PC0 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 +#define ADC_INSTANCE ADC3 + + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC5 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCF405V2/target.mk b/src/main/target/HAKRCF405V2/target.mk new file mode 100644 index 0000000000..c4582c01c5 --- /dev/null +++ b/src/main/target/HAKRCF405V2/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HAKRCF411D/target.c b/src/main/target/HAKRCF411D/target.c new file mode 100644 index 0000000000..d9e429bb3c --- /dev/null +++ b/src/main/target/HAKRCF411D/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCF411D/target.h b/src/main/target/HAKRCF411D/target.h new file mode 100644 index 0000000000..f03648a36c --- /dev/null +++ b/src/main/target/HAKRCF411D/target.h @@ -0,0 +1,134 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HAKRCF411D +#define MANUFACTURER_ID HARC +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_SOFTSERIAL1 +#define SOFTSERIAL1_RX_PIN PB3 +#define SOFTSERIAL1_TX_PIN PA15 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA0 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC1 + +#define PINIO1_PIN PB10 +#define PINIO2_PIN PC14 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCF411D/target.mk b/src/main/target/HAKRCF411D/target.mk new file mode 100644 index 0000000000..c724682bc3 --- /dev/null +++ b/src/main/target/HAKRCF411D/target.mk @@ -0,0 +1,17 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HAKRCF722V2/target.c b/src/main/target/HAKRCF722V2/target.c new file mode 100644 index 0000000000..d2a5002dd1 --- /dev/null +++ b/src/main/target/HAKRCF722V2/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCF722V2/target.h b/src/main/target/HAKRCF722V2/target.h new file mode 100644 index 0000000000..bd39eeff81 --- /dev/null +++ b/src/main/target/HAKRCF722V2/target.h @@ -0,0 +1,155 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HAKRCF722V2 +#define MANUFACTURER_ID HARC +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW90_DEG +#define GYRO_2_ALIGN CW90_DEG +#define GYRO_2_CS_PIN PB2 +#define GYRO_2_EXTI_PIN PB10 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC0 +#define PINIO2_PIN PC2 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCF722V2/target.mk b/src/main/target/HAKRCF722V2/target.mk new file mode 100644 index 0000000000..21c02bd2ba --- /dev/null +++ b/src/main/target/HAKRCF722V2/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HAKRCF7230D/target.c b/src/main/target/HAKRCF7230D/target.c new file mode 100644 index 0000000000..083659ba04 --- /dev/null +++ b/src/main/target/HAKRCF7230D/target.c @@ -0,0 +1,49 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN + DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCF7230D/target.h b/src/main/target/HAKRCF7230D/target.h new file mode 100644 index 0000000000..c8c11078ca --- /dev/null +++ b/src/main/target/HAKRCF7230D/target.h @@ -0,0 +1,148 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HAKRCF7230D +#define MANUFACTURER_ID HARC +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_CS_PIN PB2 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW90_DEG +#define GYRO_2_ALIGN CW90_DEG +#define GYRO_2_CS_PIN PC15 +#define GYRO_2_EXTI_PIN PC3 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC1 + +#define PINIO1_PIN PC8 +#define PINIO2_PIN PC9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 14 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCF7230D/target.mk b/src/main/target/HAKRCF7230D/target.mk new file mode 100644 index 0000000000..371e9eeb2f --- /dev/null +++ b/src/main/target/HAKRCF7230D/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HELSEL_STRIKERF7/target.c b/src/main/target/HELSEL_STRIKERF7/target.c new file mode 100644 index 0000000000..dfc93e41ff --- /dev/null +++ b/src/main/target/HELSEL_STRIKERF7/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HELSEL_STRIKERF7/target.h b/src/main/target/HELSEL_STRIKERF7/target.h new file mode 100644 index 0000000000..6e5124771e --- /dev/null +++ b/src/main/target/HELSEL_STRIKERF7/target.h @@ -0,0 +1,116 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HELSEL_STRIKERF7 +#define MANUFACTURER_ID AIRB +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_BARO_BMP280 +#define USE_BARO + +#define USE_VCP + +#define USE_LED +#define LED0_PIN PA3 +#define LED_STRIP_PIN PA15 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PC4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HELSEL_STRIKERF7/target.mk b/src/main/target/HELSEL_STRIKERF7/target.mk new file mode 100644 index 0000000000..9a8d123a0b --- /dev/null +++ b/src/main/target/HELSEL_STRIKERF7/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HGLRCF411ELRS/target.c b/src/main/target/HGLRCF411ELRS/target.c new file mode 100644 index 0000000000..c4d169e5da --- /dev/null +++ b/src/main/target/HGLRCF411ELRS/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH1, PA0, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH2, PA9, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH3, PA10, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF411ELRS/target.h b/src/main/target/HGLRCF411ELRS/target.h new file mode 100644 index 0000000000..43de95579b --- /dev/null +++ b/src/main/target/HGLRCF411ELRS/target.h @@ -0,0 +1,124 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HGLRCF411ELRS +#define MANUFACTURER_ID HGLR +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA0 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PA1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 3 + +#define RX_SPI_CS_PIN PA15 +#define RX_SPI_EXTI_PIN PC14 +#define RX_SPI_BIND_PIN PB2 +#define RX_SPI_LED_PIN PB9 +#define BINDPLUG_PIN PB2 + + +#define FLASH_CS_PIN PA14 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 1175 + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SPI) +#define DEFAULT_RX_FEATURE FEATURE_RX_SPI + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF411ELRS/target.mk b/src/main/target/HGLRCF411ELRS/target.mk new file mode 100644 index 0000000000..70985634b8 --- /dev/null +++ b/src/main/target/HGLRCF411ELRS/target.mk @@ -0,0 +1,14 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HGLRCF722AIO/target.c b/src/main/target/HGLRCF722AIO/target.c new file mode 100644 index 0000000000..51022b4323 --- /dev/null +++ b/src/main/target/HGLRCF722AIO/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722AIO/target.h b/src/main/target/HGLRCF722AIO/target.h new file mode 100644 index 0000000000..f3627c10aa --- /dev/null +++ b/src/main/target/HGLRCF722AIO/target.h @@ -0,0 +1,155 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HGLRCF722AIO +#define MANUFACTURER_ID HGLR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PB2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PB2 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define BARO_CS_PIN PA4 +#define BMP280_CS_PIN PA4 +#define BMP280_SPI_INSTANCE +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC8 +#define PINIO2_PIN PC9 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722AIO/target.mk b/src/main/target/HGLRCF722AIO/target.mk new file mode 100644 index 0000000000..21c02bd2ba --- /dev/null +++ b/src/main/target/HGLRCF722AIO/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HGLRCF722E/target.c b/src/main/target/HGLRCF722E/target.c new file mode 100644 index 0000000000..f320bdbd1a --- /dev/null +++ b/src/main/target/HGLRCF722E/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN + DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722E/target.h b/src/main/target/HGLRCF722E/target.h new file mode 100644 index 0000000000..644f8b38b7 --- /dev/null +++ b/src/main/target/HGLRCF722E/target.h @@ -0,0 +1,140 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HGLRCF722E +#define MANUFACTURER_ID HGLR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO_SPI_BMP280 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG_FLIP +#define GYRO_MPU6000_ALIGN CW180_DEG_FLIP +#define MPU6000_CS_PIN PB2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define BARO_CS_PIN PA4 +#define BARO_SPI_INSTANCE SPI1 +#define BMP280_CS_PIN PA4 +#define BMP280_SPI_INSTANCE SPI1 +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + +#define PINIO1_PIN PC8 +#define PINIO2_PIN PC9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722E/target.mk b/src/main/target/HGLRCF722E/target.mk new file mode 100644 index 0000000000..4a11a7bf55 --- /dev/null +++ b/src/main/target/HGLRCF722E/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HGLRCF722MINI/target.c b/src/main/target/HGLRCF722MINI/target.c new file mode 100644 index 0000000000..d2a5002dd1 --- /dev/null +++ b/src/main/target/HGLRCF722MINI/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722MINI/target.h b/src/main/target/HGLRCF722MINI/target.h new file mode 100644 index 0000000000..e6a8b6f406 --- /dev/null +++ b/src/main/target/HGLRCF722MINI/target.h @@ -0,0 +1,151 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HGLRCF722MINI +#define MANUFACTURER_ID HGLR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB2 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 +#define ADC_INSTANCE ADC3 + +#define PINIO1_PIN PC3 +#define PINIO2_PIN PA15 +#define PINIO1_BOX 40 +#define PINIO2_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722MINI/target.mk b/src/main/target/HGLRCF722MINI/target.mk new file mode 100644 index 0000000000..21c02bd2ba --- /dev/null +++ b/src/main/target/HGLRCF722MINI/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/HGLRCF722MINIV2/target.c b/src/main/target/HGLRCF722MINIV2/target.c new file mode 100644 index 0000000000..51022b4323 --- /dev/null +++ b/src/main/target/HGLRCF722MINIV2/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722MINIV2/target.h b/src/main/target/HGLRCF722MINIV2/target.h new file mode 100644 index 0000000000..9ecff11e6b --- /dev/null +++ b/src/main/target/HGLRCF722MINIV2/target.h @@ -0,0 +1,152 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HGLRCF722MINIV2 +#define MANUFACTURER_ID HGLR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PB2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PB2 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC3_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 +#define ADC_INSTANCE ADC3 + +#define PINIO1_PIN PC8 +#define PINIO2_PIN PC9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722MINIV2/target.mk b/src/main/target/HGLRCF722MINIV2/target.mk new file mode 100644 index 0000000000..21c02bd2ba --- /dev/null +++ b/src/main/target/HGLRCF722MINIV2/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/IFLIGHT_BLITZ_F722_X1/target.c b/src/main/target/IFLIGHT_BLITZ_F722_X1/target.c new file mode 100644 index 0000000000..60fc5b7136 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F722_X1/target.c @@ -0,0 +1,43 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_BLITZ_F722_X1/target.h b/src/main/target/IFLIGHT_BLITZ_F722_X1/target.h new file mode 100644 index 0000000000..5b8419ceb2 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F722_X1/target.h @@ -0,0 +1,148 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME IFLIGHT_BLITZ_F722_X1 +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACCGYRO_BMI270 +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define ACC_ICM42688P_ALIGN CW90_DEG_FLIP +#define GYRO_ICM42688P_ALIGN CW90_DEG_FLIP +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG_FLIP +#define GYRO_BMI270_ALIGN CW90_DEG_FLIP +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + + +#define PINIO1_PIN PC0 +#define PINIO2_PIN PC14 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 8 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_BLITZ_F722_X1/target.mk b/src/main/target/IFLIGHT_BLITZ_F722_X1/target.mk new file mode 100644 index 0000000000..dc490246fd --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F722_X1/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c b/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c new file mode 100644 index 0000000000..3e98ed7743 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 1), // motor 5 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1), // motor 6 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 1), // motor 7 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH2, PB7, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH4, PC9, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.h b/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.h new file mode 100644 index 0000000000..64e37d2e80 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.h @@ -0,0 +1,156 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME IFLIGHT_BLITZ_F7_AIO +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_ACCGYRO_BMI270 +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PD15 +#define LED_STRIP_PIN PC9 +#define USE_BEEPER +#define BEEPER_PIN PD3 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PD6 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PD0 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_TX_PIN PE8 +#define UART7_RX_PIN PE7 +#define USE_UART8 +#define UART8_TX_PIN PE1 +#define UART8_RX_PIN PE0 +#define SERIAL_PORT_COUNT 9 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 +#define USE_I2C_DEVICE_4 +#define I2C_DEVICE_4 (I2CDEV_4) +#define BARO_I2C_INSTANCE (I2CDEV_4) +#define I2C4_SCL PD12 +#define I2C4_SDA PD13 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PE4 +#define MAX7456_SPI_INSTANCE SPI4 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.mk b/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.mk new file mode 100644 index 0000000000..d83680b327 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.mk @@ -0,0 +1,15 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/IFLIGHT_DEFENDER_F411/target.c b/src/main/target/IFLIGHT_DEFENDER_F411/target.c new file mode 100644 index 0000000000..ab09bba501 --- /dev/null +++ b/src/main/target/IFLIGHT_DEFENDER_F411/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM2, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_DEFENDER_F411/target.h b/src/main/target/IFLIGHT_DEFENDER_F411/target.h new file mode 100644 index 0000000000..17a766f92a --- /dev/null +++ b/src/main/target/IFLIGHT_DEFENDER_F411/target.h @@ -0,0 +1,131 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME IFLIGHT_DEFENDER_F411 +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PC15 +#define PINIO2_PIN PC14 +#define PINIO2_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_DEFENDER_F411/target.mk b/src/main/target/IFLIGHT_DEFENDER_F411/target.mk new file mode 100644 index 0000000000..c193207518 --- /dev/null +++ b/src/main/target/IFLIGHT_DEFENDER_F411/target.mk @@ -0,0 +1,15 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/JHEF411HD/target.c b/src/main/target/JHEF411HD/target.c new file mode 100644 index 0000000000..eea0b135f9 --- /dev/null +++ b/src/main/target/JHEF411HD/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEF411HD/target.h b/src/main/target/JHEF411HD/target.h new file mode 100644 index 0000000000..773b270827 --- /dev/null +++ b/src/main/target/JHEF411HD/target.h @@ -0,0 +1,130 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME JHEF411HD +#define MANUFACTURER_ID JHEF +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define UART1_RX_PIN1 PB3 +#define UART1_TX_PIN1 PA15 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA0 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC1 + +#define PINIO1_PIN PB10 +#define PINIO2_PIN PC14 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEF411HD/target.mk b/src/main/target/JHEF411HD/target.mk new file mode 100644 index 0000000000..1369f8a4fd --- /dev/null +++ b/src/main/target/JHEF411HD/target.mk @@ -0,0 +1,16 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/JHEF722HD/target.c b/src/main/target/JHEF722HD/target.c new file mode 100644 index 0000000000..d2a5002dd1 --- /dev/null +++ b/src/main/target/JHEF722HD/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEF722HD/target.h b/src/main/target/JHEF722HD/target.h new file mode 100644 index 0000000000..a0b0792cc9 --- /dev/null +++ b/src/main/target/JHEF722HD/target.h @@ -0,0 +1,150 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME JHEF722HD +#define MANUFACTURER_ID JHEF +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PB2 +#define GYRO_2_EXTI_PIN PB10 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PB11 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC0 +#define PINIO2_PIN PC2 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEF722HD/target.mk b/src/main/target/JHEF722HD/target.mk new file mode 100644 index 0000000000..21c02bd2ba --- /dev/null +++ b/src/main/target/JHEF722HD/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/JMIF722A/target.c b/src/main/target/JMIF722A/target.c new file mode 100644 index 0000000000..9c40e5578d --- /dev/null +++ b/src/main/target/JMIF722A/target.c @@ -0,0 +1,40 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JMIF722A/target.h b/src/main/target/JMIF722A/target.h new file mode 100644 index 0000000000..bc911fcccf --- /dev/null +++ b/src/main/target/JMIF722A/target.h @@ -0,0 +1,140 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME JMIF722A +#define MANUFACTURER_ID JMI +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_QMP6988 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +//#define CAMERA_CONTROL_PIN PA8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PB2 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 +#define ADC_INSTANCE ADC1 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 5 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JMIF722A/target.mk b/src/main/target/JMIF722A/target.mk new file mode 100644 index 0000000000..7b1bf21b1b --- /dev/null +++ b/src/main/target/JMIF722A/target.mk @@ -0,0 +1,15 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_qmp6988.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/KAKUTEF4V2/target.c b/src/main/target/KAKUTEF4V2/target.c new file mode 100644 index 0000000000..adcc11a776 --- /dev/null +++ b/src/main/target/KAKUTEF4V2/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEF4V2/target.h b/src/main/target/KAKUTEF4V2/target.h new file mode 100644 index 0000000000..597c0f5e9a --- /dev/null +++ b/src/main/target/KAKUTEF4V2/target.h @@ -0,0 +1,140 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME KAKUTEF4V2 +#define MANUFACTURER_ID HBRO +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM20689 +#define USE_ACC_SPI_ICM20689 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED1_PIN PB4 +#define LED2_PIN PB6 +#define LED_STRIP_PIN PC8 +#define USE_BEEPER +#define BEEPER_PIN PC9 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PC4 +#define GYRO_1_EXTI_PIN PC5 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART3 PB15 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 + +#define MAX7456_SPI_CS_PIN PB14 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 275 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PC7 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEF4V2/target.mk b/src/main/target/KAKUTEF4V2/target.mk new file mode 100644 index 0000000000..cc383dd10d --- /dev/null +++ b/src/main/target/KAKUTEF4V2/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/KAKUTEF7MINI/target.c b/src/main/target/KAKUTEF7MINI/target.c new file mode 100644 index 0000000000..41faa1c0c8 --- /dev/null +++ b/src/main/target/KAKUTEF7MINI/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 2), // motor 3 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEF7MINI/target.h b/src/main/target/KAKUTEF7MINI/target.h new file mode 100644 index 0000000000..9d0f8fa3bc --- /dev/null +++ b/src/main/target/KAKUTEF7MINI/target.h @@ -0,0 +1,145 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME KAKUTEF7MINI +#define MANUFACTURER_ID HBRO +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM20689 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM20689 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PE4 +#define GYRO_1_EXTI_PIN PE1 +#define GYRO_1_SPI_INSTANCE SPI4 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI4 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_RX_PIN PE7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PA4 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 275 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEF7MINI/target.mk b/src/main/target/KAKUTEF7MINI/target.mk new file mode 100644 index 0000000000..2c85f0f5bc --- /dev/null +++ b/src/main/target/KAKUTEF7MINI/target.mk @@ -0,0 +1,16 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/LUXAIO/target.c b/src/main/target/LUXAIO/target.c new file mode 100644 index 0000000000..34b4b8d6f2 --- /dev/null +++ b/src/main/target/LUXAIO/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/LUXAIO/target.h b/src/main/target/LUXAIO/target.h new file mode 100644 index 0000000000..c39df89346 --- /dev/null +++ b/src/main/target/LUXAIO/target.h @@ -0,0 +1,134 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME LUXAIO +#define MANUFACTURER_ID LMNR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA15 +#define USE_BEEPER +#define BEEPER_PIN PB0 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA4 + +#define ACC_MPU6000_ALIGN CW90_DEG_FLIP +#define GYRO_MPU6000_ALIGN CW90_DEG_FLIP +#define MPU6000_CS_PIN PB12 +#define MPU6000_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA3 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PD2 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 163 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO2_PIN PB11 +#define PINIO2_CONFIG 129 +#define PINIO2_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/LUXAIO/target.mk b/src/main/target/LUXAIO/target.mk new file mode 100644 index 0000000000..618d181083 --- /dev/null +++ b/src/main/target/LUXAIO/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/LUXF4OSD/target.c b/src/main/target/LUXF4OSD/target.c new file mode 100644 index 0000000000..ce613eece9 --- /dev/null +++ b/src/main/target/LUXF4OSD/target.c @@ -0,0 +1,49 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // pwm RX_PWM4_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // pwm RX_PWM5_PIN + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // pwm RX_PWM6_PIN + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/LUXF4OSD/target.h b/src/main/target/LUXF4OSD/target.h new file mode 100644 index 0000000000..1a1530a831 --- /dev/null +++ b/src/main/target/LUXF4OSD/target.h @@ -0,0 +1,131 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME LUXF4OSD +#define MANUFACTURER_ID LMNR +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_MPU6000 +#define USE_MAX7456 +#define USE_FLASH +#define USE_FLASH_W25Q128FV + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PA1 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PA0 +#define ADC2_DMA_OPT 1 +#define ADC2_DMA_STREAM DMA2_Stream3 //# ADC 2: DMA2 Stream 3 Channel 1 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC2 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB14 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 14 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/LUXF4OSD/target.mk b/src/main/target/LUXF4OSD/target.mk new file mode 100644 index 0000000000..cde919cc55 --- /dev/null +++ b/src/main/target/LUXF4OSD/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/MAMBAF722_2022B/target.c b/src/main/target/MAMBAF722_2022B/target.c new file mode 100644 index 0000000000..9ff1b20d80 --- /dev/null +++ b/src/main/target/MAMBAF722_2022B/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAF722_2022B/target.h b/src/main/target/MAMBAF722_2022B/target.h new file mode 100644 index 0000000000..d0214cf2b8 --- /dev/null +++ b/src/main/target/MAMBAF722_2022B/target.h @@ -0,0 +1,152 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME MAMBAF722_2022B +#define MANUFACTURER_ID DIAT +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 115 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC0 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 +#define PINIO1_BOX 0 +#define PINIO2_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAF722_2022B/target.mk b/src/main/target/MAMBAF722_2022B/target.mk new file mode 100644 index 0000000000..d5439fb8f7 --- /dev/null +++ b/src/main/target/MAMBAF722_2022B/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/MAMBAF722_I2C/target.c b/src/main/target/MAMBAF722_I2C/target.c new file mode 100644 index 0000000000..83ba9409c2 --- /dev/null +++ b/src/main/target/MAMBAF722_I2C/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAF722_I2C/target.h b/src/main/target/MAMBAF722_I2C/target.h new file mode 100644 index 0000000000..f294b0ce54 --- /dev/null +++ b/src/main/target/MAMBAF722_I2C/target.h @@ -0,0 +1,149 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME MAMBAF722_I2C +#define MANUFACTURER_ID DIAT +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB0 +#define PINIO1_BOX 0 +#define PINIO1_CONFIG 129 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAF722_I2C/target.mk b/src/main/target/MAMBAF722_I2C/target.mk new file mode 100644 index 0000000000..371e9eeb2f --- /dev/null +++ b/src/main/target/MAMBAF722_I2C/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/MAMBAF722_X8/target.c b/src/main/target/MAMBAF722_X8/target.c new file mode 100644 index 0000000000..9ff1b20d80 --- /dev/null +++ b/src/main/target/MAMBAF722_X8/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAF722_X8/target.h b/src/main/target/MAMBAF722_X8/target.h new file mode 100644 index 0000000000..d1f9a468c8 --- /dev/null +++ b/src/main/target/MAMBAF722_X8/target.h @@ -0,0 +1,139 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME MAMBAF722_X8 +#define MANUFACTURER_ID DIAT +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 115 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAF722_X8/target.mk b/src/main/target/MAMBAF722_X8/target.mk new file mode 100644 index 0000000000..418df31c5d --- /dev/null +++ b/src/main/target/MAMBAF722_X8/target.mk @@ -0,0 +1,15 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/MATEKF405MINI/target.c b/src/main/target/MATEKF405MINI/target.c new file mode 100644 index 0000000000..ebdaa16bb2 --- /dev/null +++ b/src/main/target/MATEKF405MINI/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN + DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MATEKF405MINI/target.h b/src/main/target/MATEKF405MINI/target.h new file mode 100644 index 0000000000..dfef964fd9 --- /dev/null +++ b/src/main/target/MATEKF405MINI/target.h @@ -0,0 +1,135 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME MATEKF405MINI +#define MANUFACTURER_ID MTKS +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM20689 +#define USE_GYRO +#define USE_GYRO_SPI_ICM20689 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB9 +#define LED1_PIN PA14 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC3 + +#define ACC_ICM20689_ALIGN CW180_DEG +#define GYRO_ICM20689_ALIGN CW180_DEG +#define ICM20689_CS_PIN PC2 +#define ICM20689_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB10 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC5 +#define CURRENT_METER_ADC_PIN PC4 +#define RSSI_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MATEKF405MINI/target.mk b/src/main/target/MATEKF405MINI/target.mk new file mode 100644 index 0000000000..34f2aa4549 --- /dev/null +++ b/src/main/target/MATEKF405MINI/target.mk @@ -0,0 +1,14 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm20689.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/MATEKF722MINI/target.c b/src/main/target/MATEKF722MINI/target.c new file mode 100644 index 0000000000..f320bdbd1a --- /dev/null +++ b/src/main/target/MATEKF722MINI/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN + DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MATEKF722MINI/target.h b/src/main/target/MATEKF722MINI/target.h new file mode 100644 index 0000000000..5b50955353 --- /dev/null +++ b/src/main/target/MATEKF722MINI/target.h @@ -0,0 +1,149 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME MATEKF722MINI +#define MANUFACTURER_ID MTKS +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_ICM20689 +#define USE_GYRO_SPI_ICM20689 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_CS_PIN PB2 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW90_DEG +#define GYRO_2_ALIGN CW90_DEG +#define GYRO_2_CS_PIN PC15 +#define GYRO_2_EXTI_PIN PC3 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC8 +#define PINIO2_PIN PC9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MATEKF722MINI/target.mk b/src/main/target/MATEKF722MINI/target.mk new file mode 100644 index 0000000000..a2d5909050 --- /dev/null +++ b/src/main/target/MATEKF722MINI/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm20689.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/MEPSF411/target.c b/src/main/target/MEPSF411/target.c new file mode 100644 index 0000000000..c8425c90a3 --- /dev/null +++ b/src/main/target/MEPSF411/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MEPSF411/target.h b/src/main/target/MEPSF411/target.h new file mode 100644 index 0000000000..b60569145a --- /dev/null +++ b/src/main/target/MEPSF411/target.h @@ -0,0 +1,122 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME MEPSF411 +#define MANUFACTURER_ID MEPS +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC15 + +#define ACC_MPU6500_ALIGN CW180_DEG_FLIP +#define GYRO_MPU6500_ALIGN CW180_DEG_FLIP +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PA1 +#define CURRENT_METER_ADC_PIN PA0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(5) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MEPSF411/target.mk b/src/main/target/MEPSF411/target.mk new file mode 100644 index 0000000000..8ca708766e --- /dev/null +++ b/src/main/target/MEPSF411/target.mk @@ -0,0 +1,15 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/MERAKRCF405/target.c b/src/main/target/MERAKRCF405/target.c new file mode 100644 index 0000000000..d0f5220685 --- /dev/null +++ b/src/main/target/MERAKRCF405/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH3N, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH3, PB8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MERAKRCF405/target.h b/src/main/target/MERAKRCF405/target.h new file mode 100644 index 0000000000..1d1d587789 --- /dev/null +++ b/src/main/target/MERAKRCF405/target.h @@ -0,0 +1,133 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME MERAKRCF405 +#define MANUFACTURER_ID MERA +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PB8 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB9 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PB12 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI2 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PC10 +#define UART4_RX_PIN PC11 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MERAKRCF405/target.mk b/src/main/target/MERAKRCF405/target.mk new file mode 100644 index 0000000000..c38c2ec10a --- /dev/null +++ b/src/main/target/MERAKRCF405/target.mk @@ -0,0 +1,14 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/MERAKRCF722/target.c b/src/main/target/MERAKRCF722/target.c new file mode 100644 index 0000000000..d0f5220685 --- /dev/null +++ b/src/main/target/MERAKRCF722/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH3N, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH3, PB8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MERAKRCF722/target.h b/src/main/target/MERAKRCF722/target.h new file mode 100644 index 0000000000..84c23d9978 --- /dev/null +++ b/src/main/target/MERAKRCF722/target.h @@ -0,0 +1,129 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME MERAKRCF722 +#define MANUFACTURER_ID MERA +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PB8 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB9 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PB12 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI2 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PC10 +#define UART4_RX_PIN PC11 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MERAKRCF722/target.mk b/src/main/target/MERAKRCF722/target.mk new file mode 100644 index 0000000000..087c9acf1c --- /dev/null +++ b/src/main/target/MERAKRCF722/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NAMIMNOF722/target.c b/src/main/target/NAMIMNOF722/target.c new file mode 100644 index 0000000000..d2a5002dd1 --- /dev/null +++ b/src/main/target/NAMIMNOF722/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NAMIMNOF722/target.h b/src/main/target/NAMIMNOF722/target.h new file mode 100644 index 0000000000..a010d1ecc2 --- /dev/null +++ b/src/main/target/NAMIMNOF722/target.h @@ -0,0 +1,152 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NAMIMNOF722 +#define MANUFACTURER_ID NAMO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC0 +#define PINIO2_PIN PC2 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NAMIMNOF722/target.mk b/src/main/target/NAMIMNOF722/target.mk new file mode 100644 index 0000000000..d5439fb8f7 --- /dev/null +++ b/src/main/target/NAMIMNOF722/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NBD_CRICKETF7/target.c b/src/main/target/NBD_CRICKETF7/target.c new file mode 100644 index 0000000000..5e05c98850 --- /dev/null +++ b/src/main/target/NBD_CRICKETF7/target.c @@ -0,0 +1,40 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_CRICKETF7/target.h b/src/main/target/NBD_CRICKETF7/target.h new file mode 100644 index 0000000000..746408b040 --- /dev/null +++ b/src/main/target/NBD_CRICKETF7/target.h @@ -0,0 +1,112 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NBD_CRICKETF7 +#define MANUFACTURER_ID NEBD +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PB12 +#define MPU6000_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA1 +#define UART4_RX_PIN PA0 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + + +#define MAX7456_SPI_CS_PIN PC13 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 5 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_CRICKETF7/target.mk b/src/main/target/NBD_CRICKETF7/target.mk new file mode 100644 index 0000000000..cab8fbfdfe --- /dev/null +++ b/src/main/target/NBD_CRICKETF7/target.mk @@ -0,0 +1,13 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NBD_CRICKETF7V2/target.c b/src/main/target/NBD_CRICKETF7V2/target.c new file mode 100644 index 0000000000..5e05c98850 --- /dev/null +++ b/src/main/target/NBD_CRICKETF7V2/target.c @@ -0,0 +1,40 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_CRICKETF7V2/target.h b/src/main/target/NBD_CRICKETF7V2/target.h new file mode 100644 index 0000000000..891a03cd80 --- /dev/null +++ b/src/main/target/NBD_CRICKETF7V2/target.h @@ -0,0 +1,113 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NBD_CRICKETF7V2 +#define MANUFACTURER_ID NEBD +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACCGYRO_BMI270 + +#define USE_VCP + +#define USE_LED +#define LED0_PIN PA15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PB12 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI2 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_CS_PIN PA4 +#define GYRO_2_EXTI_PIN PC9 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 5 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_CRICKETF7V2/target.mk b/src/main/target/NBD_CRICKETF7V2/target.mk new file mode 100644 index 0000000000..0330b424cf --- /dev/null +++ b/src/main/target/NBD_CRICKETF7V2/target.mk @@ -0,0 +1,13 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NBD_INFINITY200RS/target.c b/src/main/target/NBD_INFINITY200RS/target.c new file mode 100644 index 0000000000..29a6737b32 --- /dev/null +++ b/src/main/target/NBD_INFINITY200RS/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_INFINITY200RS/target.h b/src/main/target/NBD_INFINITY200RS/target.h new file mode 100644 index 0000000000..23a3cf3a11 --- /dev/null +++ b/src/main/target/NBD_INFINITY200RS/target.h @@ -0,0 +1,141 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NBD_INFINITY200RS +#define MANUFACTURER_ID NEBD +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC0 +#define LED_STRIP_PIN PA9 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PD6 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PE11 +#define GYRO_1_EXTI_PIN PB1 +#define GYRO_1_SPI_INSTANCE SPI4 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_CS_PIN PB12 +#define GYRO_2_EXTI_PIN PE9 +#define GYRO_2_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART7 +#define UART7_TX_PIN PE8 +#define UART7_RX_PIN PE7 +#define USE_UART8 +#define UART8_TX_PIN PE1 +#define UART8_RX_PIN PE0 +#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB0 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC2 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 230 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_INFINITY200RS/target.mk b/src/main/target/NBD_INFINITY200RS/target.mk new file mode 100644 index 0000000000..d0d4e6122c --- /dev/null +++ b/src/main/target/NBD_INFINITY200RS/target.mk @@ -0,0 +1,14 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NBD_INFINITYF4/target.c b/src/main/target/NBD_INFINITYF4/target.c new file mode 100644 index 0000000000..1c6c56f4cf --- /dev/null +++ b/src/main/target/NBD_INFINITYF4/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH2N, PB0, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify + DEF_TIM(TIM4, CH3, PB8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_INFINITYF4/target.h b/src/main/target/NBD_INFINITYF4/target.h new file mode 100644 index 0000000000..072693bd5d --- /dev/null +++ b/src/main/target/NBD_INFINITYF4/target.h @@ -0,0 +1,131 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NBD_INFINITYF4 +#define MANUFACTURER_ID NEBD +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC0 +#define LED_STRIP_PIN PB8 +#define USE_BEEPER +#define BEEPER_PIN PB6 +#define CAMERA_CONTROL_PIN PB9 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC13 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PB12 +#define MPU6000_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PA10 +#define SERIAL_PORT_COUNT 7 + + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 + +#define MAX7456_SPI_CS_PIN PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC4 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 245 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PD2 + +#define PINIO1_PIN PC5 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_INFINITYF4/target.mk b/src/main/target/NBD_INFINITYF4/target.mk new file mode 100644 index 0000000000..447de40c64 --- /dev/null +++ b/src/main/target/NBD_INFINITYF4/target.mk @@ -0,0 +1,14 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NEUTRONRCF407/target.c b/src/main/target/NEUTRONRCF407/target.c new file mode 100644 index 0000000000..ce1d42466d --- /dev/null +++ b/src/main/target/NEUTRONRCF407/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM3, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCF407/target.h b/src/main/target/NEUTRONRCF407/target.h new file mode 100644 index 0000000000..5010851a9f --- /dev/null +++ b/src/main/target/NEUTRONRCF407/target.h @@ -0,0 +1,156 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NEUTRONRCF407 +#define MANUFACTURER_ID NERC +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_MAG +#define USE_MAG_QMC5883 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB7 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_CS_PIN PC3 +#define GYRO_2_EXTI_PIN PA8 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART2 PC13 +#define SERIAL_PORT_COUNT 6 + +#define MAG_QMC5883L_ALIGN CW0_DEG +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO2_PIN PB3 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 0 +#define PINIO2_BOX 40 +#define PINIO3_BOX 41 +#define PINIO4_BOX 42 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCF407/target.mk b/src/main/target/NEUTRONRCF407/target.mk new file mode 100644 index 0000000000..fa83c84fcf --- /dev/null +++ b/src/main/target/NEUTRONRCF407/target.mk @@ -0,0 +1,17 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NEUTRONRCF411AIO/target.c b/src/main/target/NEUTRONRCF411AIO/target.c new file mode 100644 index 0000000000..6c61d530f1 --- /dev/null +++ b/src/main/target/NEUTRONRCF411AIO/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCF411AIO/target.h b/src/main/target/NEUTRONRCF411AIO/target.h new file mode 100644 index 0000000000..1f4d82bbd8 --- /dev/null +++ b/src/main/target/NEUTRONRCF411AIO/target.h @@ -0,0 +1,136 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NEUTRONRCF411AIO +#define MANUFACTURER_ID NERC +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_ACC_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO_DPS310 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW90_DEG +#define GYRO_BMI270_ALIGN CW90_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_SOFTSERIAL1 +//#define SOFTSERIAL1_TX_PIN PA0 +//#define SOFTSERIAL1_RX_PIN PB10 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCF411AIO/target.mk b/src/main/target/NEUTRONRCF411AIO/target.mk new file mode 100644 index 0000000000..bf7b161699 --- /dev/null +++ b/src/main/target/NEUTRONRCF411AIO/target.mk @@ -0,0 +1,16 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NEUTRONRCF722AIO/target.c b/src/main/target/NEUTRONRCF722AIO/target.c new file mode 100644 index 0000000000..f8cbef8ffc --- /dev/null +++ b/src/main/target/NEUTRONRCF722AIO/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH2, PB7, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM3, CH4, PB1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM3, CH3, PB0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH2, PA1, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCF722AIO/target.h b/src/main/target/NEUTRONRCF722AIO/target.h new file mode 100644 index 0000000000..b119f3251b --- /dev/null +++ b/src/main/target/NEUTRONRCF722AIO/target.h @@ -0,0 +1,129 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NEUTRONRCF722AIO +#define MANUFACTURER_ID NERC +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO_DPS310 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC4 +#define LED_STRIP_PIN PA1 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PA8 + +#define USE_SPI_GYRO +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA15 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PC10 +#define UART4_RX_PIN PC11 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define BARO_I2C_INSTANCE (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PB9 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 +#define ADC_INSTANCE ADC3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCF722AIO/target.mk b/src/main/target/NEUTRONRCF722AIO/target.mk new file mode 100644 index 0000000000..23e0db6388 --- /dev/null +++ b/src/main/target/NEUTRONRCF722AIO/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NEUTRONRCF7AIO/target.c b/src/main/target/NEUTRONRCF7AIO/target.c new file mode 100644 index 0000000000..976955c0ee --- /dev/null +++ b/src/main/target/NEUTRONRCF7AIO/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCF7AIO/target.h b/src/main/target/NEUTRONRCF7AIO/target.h new file mode 100644 index 0000000000..d91e1a908a --- /dev/null +++ b/src/main/target/NEUTRONRCF7AIO/target.h @@ -0,0 +1,161 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NEUTRONRCF7AIO +#define MANUFACTURER_ID NERC +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM20689 +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM20689 +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PD2 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PD0 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW180_DEG +#define GYRO_2_ALIGN CW180_DEG +#define GYRO_2_CS_PIN PB12 +#define GYRO_2_EXTI_PIN PD8 +#define GYRO_2_SPI_INSTANCE SPI2 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_TX_PIN PE8 +#define UART7_RX_PIN PE7 +#define USE_UART8 +#define UART8_TX_PIN PE1 +#define UART8_RX_PIN PE0 +#define SERIAL_PORT_COUNT 8 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PE4 +#define MAX7456_SPI_INSTANCE SPI4 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCF7AIO/target.mk b/src/main/target/NEUTRONRCF7AIO/target.mk new file mode 100644 index 0000000000..80f2d99401 --- /dev/null +++ b/src/main/target/NEUTRONRCF7AIO/target.mk @@ -0,0 +1,17 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/NIDICI_F4/target.c b/src/main/target/NIDICI_F4/target.c new file mode 100644 index 0000000000..e63d0d27cb --- /dev/null +++ b/src/main/target/NIDICI_F4/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH2, PB7, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NIDICI_F4/target.h b/src/main/target/NIDICI_F4/target.h new file mode 100644 index 0000000000..fcc2284a52 --- /dev/null +++ b/src/main/target/NIDICI_F4/target.h @@ -0,0 +1,135 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME NIDICI_F4 +#define MANUFACTURER_ID HNEC +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_BARO_BMP280 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB7 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG_FLIP +#define GYRO_MPU6000_ALIGN CW180_DEG_FLIP +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART2 PC13 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PC13 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NIDICI_F4/target.mk b/src/main/target/NIDICI_F4/target.mk new file mode 100644 index 0000000000..6cef7f1568 --- /dev/null +++ b/src/main/target/NIDICI_F4/target.mk @@ -0,0 +1,15 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/ODDITYRCF7AIO/target.c b/src/main/target/ODDITYRCF7AIO/target.c new file mode 100644 index 0000000000..9c40e5578d --- /dev/null +++ b/src/main/target/ODDITYRCF7AIO/target.c @@ -0,0 +1,40 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ODDITYRCF7AIO/target.h b/src/main/target/ODDITYRCF7AIO/target.h new file mode 100644 index 0000000000..aa67f6c1a4 --- /dev/null +++ b/src/main/target/ODDITYRCF7AIO/target.h @@ -0,0 +1,134 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME ODDITYRCF7AIO +#define MANUFACTURER_ID ODTY +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_QMP6988 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +//#define CAMERA_CONTROL_PIN PA8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 +#define ADC_INSTANCE ADC1 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 5 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ODDITYRCF7AIO/target.mk b/src/main/target/ODDITYRCF7AIO/target.mk new file mode 100644 index 0000000000..a5c6a498bd --- /dev/null +++ b/src/main/target/ODDITYRCF7AIO/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_qmp6988.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/OMNIBUSF4V6/target.c b/src/main/target/OMNIBUSF4V6/target.c new file mode 100644 index 0000000000..d53ea7c77d --- /dev/null +++ b/src/main/target/OMNIBUSF4V6/target.c @@ -0,0 +1,49 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/OMNIBUSF4V6/target.h b/src/main/target/OMNIBUSF4V6/target.h new file mode 100644 index 0000000000..14114abfbc --- /dev/null +++ b/src/main/target/OMNIBUSF4V6/target.h @@ -0,0 +1,134 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME OMNIBUSF4V6 +#define MANUFACTURER_ID AIRB +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_MPU6000 +#define USE_BARO_SPI_BMP280 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA8 +#define LED_STRIP_PIN PB6 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB7 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_CS_PIN PC14 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define BARO_CS_PIN PB3 +#define BARO_SPI_INSTANCE SPI3 +#define BMP280_CS_PIN PB3 +#define BMP280_SPI_INSTANCE SPI3 +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PA0 +#define ADC2_DMA_OPT 1 +#define ADC2_DMA_STREAM DMA2_Stream3 //# ADC 2: DMA2 Stream 3 Channel 1 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC2 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 14 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) | TIM_N(10) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/OMNIBUSF4V6/target.mk b/src/main/target/OMNIBUSF4V6/target.mk new file mode 100644 index 0000000000..0890807f18 --- /dev/null +++ b/src/main/target/OMNIBUSF4V6/target.mk @@ -0,0 +1,17 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/OMNINXT4/target.c b/src/main/target/OMNINXT4/target.c new file mode 100644 index 0000000000..7ba5f9c345 --- /dev/null +++ b/src/main/target/OMNINXT4/target.c @@ -0,0 +1,56 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM10, CH1, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM12, CH2, PB15, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // baro +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/OMNINXT4/target.h b/src/main/target/OMNINXT4/target.h new file mode 100644 index 0000000000..15d44ce818 --- /dev/null +++ b/src/main/target/OMNINXT4/target.h @@ -0,0 +1,146 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME OMNINXT4 +#define MANUFACTURER_ID AIRB +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_MPU6000 +#define USE_BARO_SPI_LPS +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB2 +#define LED_STRIP_PIN PA9 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB15 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PB12 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PA8 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART2 PC5 +#define SERIAL_PORT_COUNT 7 + +#define BARO_CS_PIN PA10 +#define BARO_SPI_INSTANCE SPI2 +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC14 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC4 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define ENABLE_DSHOT_DMAR true + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB7 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 21 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) | TIM_N(10) | TIM_N(11) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/OMNINXT4/target.mk b/src/main/target/OMNINXT4/target.mk new file mode 100644 index 0000000000..cde919cc55 --- /dev/null +++ b/src/main/target/OMNINXT4/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/OMNINXT7/target.c b/src/main/target/OMNINXT7/target.c new file mode 100644 index 0000000000..7ba5f9c345 --- /dev/null +++ b/src/main/target/OMNINXT7/target.c @@ -0,0 +1,56 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM10, CH1, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM12, CH2, PB15, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify + DEF_TIM(TIM4, CH1, PB6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // baro +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/OMNINXT7/target.h b/src/main/target/OMNINXT7/target.h new file mode 100644 index 0000000000..74c2302dba --- /dev/null +++ b/src/main/target/OMNINXT7/target.h @@ -0,0 +1,141 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME OMNINXT7 +#define MANUFACTURER_ID AIRB +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6500 +#define USE_BARO_SPI_LPS +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB2 +#define LED_STRIP_PIN PA9 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB15 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PB12 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PA8 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define BARO_CS_PIN PA10 +#define BARO_SPI_INSTANCE SPI2 +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC14 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC4 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 21 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) | TIM_N(10) | TIM_N(11) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/OMNINXT7/target.mk b/src/main/target/OMNINXT7/target.mk new file mode 100644 index 0000000000..c43fcc5f72 --- /dev/null +++ b/src/main/target/OMNINXT7/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/PLUMF4/target.c b/src/main/target/PLUMF4/target.c new file mode 100644 index 0000000000..9aa18d2f30 --- /dev/null +++ b/src/main/target/PLUMF4/target.c @@ -0,0 +1,40 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/PLUMF4/target.h b/src/main/target/PLUMF4/target.h new file mode 100644 index 0000000000..78e323d153 --- /dev/null +++ b/src/main/target/PLUMF4/target.h @@ -0,0 +1,111 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME PLUMF4 +#define MANUFACTURER_ID FLLF +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB4 +#define LED_STRIP_PIN PB7 +#define USE_BEEPER +#define BEEPER_PIN PA8 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 4 + + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 444 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 5 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/PLUMF4/target.mk b/src/main/target/PLUMF4/target.mk new file mode 100644 index 0000000000..03ae2a2a2a --- /dev/null +++ b/src/main/target/PLUMF4/target.mk @@ -0,0 +1,13 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/PODIUMF4/target.c b/src/main/target/PODIUMF4/target.c new file mode 100644 index 0000000000..fc48002e9f --- /dev/null +++ b/src/main/target/PODIUMF4/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // pwm RX_PWM4_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // pwm RX_PWM5_PIN + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // pwm RX_PWM6_PIN +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/PODIUMF4/target.h b/src/main/target/PODIUMF4/target.h new file mode 100644 index 0000000000..8d3d70484c --- /dev/null +++ b/src/main/target/PODIUMF4/target.h @@ -0,0 +1,119 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME PODIUMF4 +#define MANUFACTURER_ID LEGA +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED1_PIN PB4 +#define LED2_PIN PB6 +#define LED_STRIP_PIN PA1 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW0_DEG +#define GYRO_MPU6500_ALIGN CW0_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 5 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB14 + +#define PINIO1_PIN PC8 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/PODIUMF4/target.mk b/src/main/target/PODIUMF4/target.mk new file mode 100644 index 0000000000..d9de579744 --- /dev/null +++ b/src/main/target/PODIUMF4/target.mk @@ -0,0 +1,17 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/RUSHF7AIO/target.c b/src/main/target/RUSHF7AIO/target.c new file mode 100644 index 0000000000..1664b354e6 --- /dev/null +++ b/src/main/target/RUSHF7AIO/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/RUSHF7AIO/target.h b/src/main/target/RUSHF7AIO/target.h new file mode 100644 index 0000000000..ed54cd3474 --- /dev/null +++ b/src/main/target/RUSHF7AIO/target.h @@ -0,0 +1,153 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME RUSHF7AIO +#define MANUFACTURER_ID RUSH +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART1 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_STREAM DMA2_Stream1 //# ADC 3: DMA2 Stream 1 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + + +#define PINIO1_PIN PC0 +#define PINIO2_PIN PC2 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/RUSHF7AIO/target.mk b/src/main/target/RUSHF7AIO/target.mk new file mode 100644 index 0000000000..df2d756649 --- /dev/null +++ b/src/main/target/RUSHF7AIO/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/RUSRACE_F4/target.c b/src/main/target/RUSRACE_F4/target.c new file mode 100644 index 0000000000..add63a2d47 --- /dev/null +++ b/src/main/target/RUSRACE_F4/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/RUSRACE_F4/target.h b/src/main/target/RUSRACE_F4/target.h new file mode 100644 index 0000000000..375f933bee --- /dev/null +++ b/src/main/target/RUSRACE_F4/target.h @@ -0,0 +1,129 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME RUSRACE_F4 +#define MANUFACTURER_ID CUST +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB9 +#define LED1_PIN PA14 +#define LED_STRIP_PIN PB6 +#define CAMERA_CONTROL_PIN PA0 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC3 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PC2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB10 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC5 +#define CURRENT_METER_ADC_PIN PC4 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PA3 + +#define PINIO1_PIN PC1 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_BOX 0 +#define PINIO3_BOX 0 +#define PINIO4_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/RUSRACE_F4/target.mk b/src/main/target/RUSRACE_F4/target.mk new file mode 100644 index 0000000000..447de40c64 --- /dev/null +++ b/src/main/target/RUSRACE_F4/target.mk @@ -0,0 +1,14 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/RUSRACE_F7/target.c b/src/main/target/RUSRACE_F7/target.c new file mode 100644 index 0000000000..6142283f20 --- /dev/null +++ b/src/main/target/RUSRACE_F7/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/RUSRACE_F7/target.h b/src/main/target/RUSRACE_F7/target.h new file mode 100644 index 0000000000..eaf8774921 --- /dev/null +++ b/src/main/target/RUSRACE_F7/target.h @@ -0,0 +1,126 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME RUSRACE_F7 +#define MANUFACTURER_ID CUST +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB9 +#define LED1_PIN PA14 +#define LED_STRIP_PIN PB6 +#define CAMERA_CONTROL_PIN PA0 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC3 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PC2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + + +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB11 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PC4 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PC1 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_BOX 0 +#define PINIO3_BOX 0 +#define PINIO4_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/RUSRACE_F7/target.mk b/src/main/target/RUSRACE_F7/target.mk new file mode 100644 index 0000000000..618d181083 --- /dev/null +++ b/src/main/target/RUSRACE_F7/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SOLOGOODF405/target.c b/src/main/target/SOLOGOODF405/target.c new file mode 100644 index 0000000000..d2a5002dd1 --- /dev/null +++ b/src/main/target/SOLOGOODF405/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SOLOGOODF405/target.h b/src/main/target/SOLOGOODF405/target.h new file mode 100644 index 0000000000..551df32bde --- /dev/null +++ b/src/main/target/SOLOGOODF405/target.h @@ -0,0 +1,155 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SOLOGOODF405 +#define MANUFACTURER_ID SLGD +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC2 +#define PINIO1_BOX 40 +#define PINIO1_CONFIG 129 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SOLOGOODF405/target.mk b/src/main/target/SOLOGOODF405/target.mk new file mode 100644 index 0000000000..c4582c01c5 --- /dev/null +++ b/src/main/target/SOLOGOODF405/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SOLOGOODF722/target.c b/src/main/target/SOLOGOODF722/target.c new file mode 100644 index 0000000000..d2a5002dd1 --- /dev/null +++ b/src/main/target/SOLOGOODF722/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SOLOGOODF722/target.h b/src/main/target/SOLOGOODF722/target.h new file mode 100644 index 0000000000..cc42469edb --- /dev/null +++ b/src/main/target/SOLOGOODF722/target.h @@ -0,0 +1,151 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SOLOGOODF722 +#define MANUFACTURER_ID SLGD +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC0 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SOLOGOODF722/target.mk b/src/main/target/SOLOGOODF722/target.mk new file mode 100644 index 0000000000..d5439fb8f7 --- /dev/null +++ b/src/main/target/SOLOGOODF722/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SOULF4/target.c b/src/main/target/SOULF4/target.c new file mode 100644 index 0000000000..fc48002e9f --- /dev/null +++ b/src/main/target/SOULF4/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // pwm RX_PWM4_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // pwm RX_PWM5_PIN + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // pwm RX_PWM6_PIN +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SOULF4/target.h b/src/main/target/SOULF4/target.h new file mode 100644 index 0000000000..37a358a8a4 --- /dev/null +++ b/src/main/target/SOULF4/target.h @@ -0,0 +1,126 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SOULF4 +#define MANUFACTURER_ID DERC +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6000 +#define USE_BARO_BMP280 +#define USE_BARO_BMP085 +#define USE_BARO_MS5611 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PA1 +#define USE_BEEPER +#define BEEPER_PIN PB6 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 5 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB14 + +#define PINIO1_PIN PC8 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SOULF4/target.mk b/src/main/target/SOULF4/target.mk new file mode 100644 index 0000000000..fdd396c665 --- /dev/null +++ b/src/main/target/SOULF4/target.mk @@ -0,0 +1,20 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp085.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_ms5611.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SPCMAKERF411/target.c b/src/main/target/SPCMAKERF411/target.c new file mode 100644 index 0000000000..ab09bba501 --- /dev/null +++ b/src/main/target/SPCMAKERF411/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM2, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPCMAKERF411/target.h b/src/main/target/SPCMAKERF411/target.h new file mode 100644 index 0000000000..461eded225 --- /dev/null +++ b/src/main/target/SPCMAKERF411/target.h @@ -0,0 +1,118 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SPCMAKERF411 +#define MANUFACTURER_ID SPCM +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPCMAKERF411/target.mk b/src/main/target/SPCMAKERF411/target.mk new file mode 100644 index 0000000000..d20a4d2625 --- /dev/null +++ b/src/main/target/SPCMAKERF411/target.mk @@ -0,0 +1,13 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SPEDIXF405/target.c b/src/main/target/SPEDIXF405/target.c new file mode 100644 index 0000000000..120fb4cbab --- /dev/null +++ b/src/main/target/SPEDIXF405/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEDIXF405/target.h b/src/main/target/SPEDIXF405/target.h new file mode 100644 index 0000000000..8f3a6eee58 --- /dev/null +++ b/src/main/target/SPEDIXF405/target.h @@ -0,0 +1,156 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SPEDIXF405 +#define MANUFACTURER_ID SPDX +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PD2 + +#define PINIO1_PIN PC13 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEDIXF405/target.mk b/src/main/target/SPEDIXF405/target.mk new file mode 100644 index 0000000000..c4582c01c5 --- /dev/null +++ b/src/main/target/SPEDIXF405/target.mk @@ -0,0 +1,18 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SPEDIXF722/target.c b/src/main/target/SPEDIXF722/target.c new file mode 100644 index 0000000000..120fb4cbab --- /dev/null +++ b/src/main/target/SPEDIXF722/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEDIXF722/target.h b/src/main/target/SPEDIXF722/target.h new file mode 100644 index 0000000000..4756c11d8e --- /dev/null +++ b/src/main/target/SPEDIXF722/target.h @@ -0,0 +1,153 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SPEDIXF722 +#define MANUFACTURER_ID SPDX +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + + +#define PINIO1_PIN PC13 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEDIXF722/target.mk b/src/main/target/SPEDIXF722/target.mk new file mode 100644 index 0000000000..21c02bd2ba --- /dev/null +++ b/src/main/target/SPEDIXF722/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SPEEDYBEEF405MINI/target.c b/src/main/target/SPEEDYBEEF405MINI/target.c new file mode 100644 index 0000000000..dc3912db37 --- /dev/null +++ b/src/main/target/SPEEDYBEEF405MINI/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEEDYBEEF405MINI/target.h b/src/main/target/SPEEDYBEEF405MINI/target.h new file mode 100644 index 0000000000..e1c2ea4a58 --- /dev/null +++ b/src/main/target/SPEEDYBEEF405MINI/target.h @@ -0,0 +1,141 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SPEEDYBEEF405MINI +#define MANUFACTURER_ID SPBE +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO +#define USE_BARO_DPS310 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB14 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PC2 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC14 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB11 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(9) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEEDYBEEF405MINI/target.mk b/src/main/target/SPEEDYBEEF405MINI/target.mk new file mode 100644 index 0000000000..12e9cdda98 --- /dev/null +++ b/src/main/target/SPEEDYBEEF405MINI/target.mk @@ -0,0 +1,15 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SPEEDYBEEF7MINIV2/target.c b/src/main/target/SPEEDYBEEF7MINIV2/target.c new file mode 100644 index 0000000000..c6694975a1 --- /dev/null +++ b/src/main/target/SPEEDYBEEF7MINIV2/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // pwm RX_PWM1_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEEDYBEEF7MINIV2/target.h b/src/main/target/SPEEDYBEEF7MINIV2/target.h new file mode 100644 index 0000000000..763d3b8451 --- /dev/null +++ b/src/main/target/SPEEDYBEEF7MINIV2/target.h @@ -0,0 +1,132 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SPEEDYBEEF7MINIV2 +#define MANUFACTURER_ID SPBE +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED_STRIP_PIN PC8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA0 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define USE_SPI_GYRO +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PB2 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC9 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEEDYBEEF7MINIV2/target.mk b/src/main/target/SPEEDYBEEF7MINIV2/target.mk new file mode 100644 index 0000000000..a41837dc5d --- /dev/null +++ b/src/main/target/SPEEDYBEEF7MINIV2/target.mk @@ -0,0 +1,15 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/STELLARF4/target.c b/src/main/target/STELLARF4/target.c new file mode 100644 index 0000000000..b9e9224d67 --- /dev/null +++ b/src/main/target/STELLARF4/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH4, PB9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH4, PC9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/STELLARF4/target.h b/src/main/target/STELLARF4/target.h new file mode 100644 index 0000000000..6405517229 --- /dev/null +++ b/src/main/target/STELLARF4/target.h @@ -0,0 +1,135 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME STELLARF4 +#define MANUFACTURER_ID FLMO +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_ACC +#define USE_BARO +#define USE_FLASH +#define USE_GYRO +#define USE_ACCGYRO_BMI270 +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC8 +#define USE_BEEPER +#define BEEPER_PIN PC5 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define USE_SPI_GYRO +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define BARO_I2C_INSTANCE (I2CDEV_2) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC2 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 386 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC3 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/STELLARF4/target.mk b/src/main/target/STELLARF4/target.mk new file mode 100644 index 0000000000..66339d1fdd --- /dev/null +++ b/src/main/target/STELLARF4/target.mk @@ -0,0 +1,14 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/STELLARF7/target.c b/src/main/target/STELLARF7/target.c new file mode 100644 index 0000000000..8e31023c12 --- /dev/null +++ b/src/main/target/STELLARF7/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/STELLARF7/target.h b/src/main/target/STELLARF7/target.h new file mode 100644 index 0000000000..ca25facd3a --- /dev/null +++ b/src/main/target/STELLARF7/target.h @@ -0,0 +1,157 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME STELLARF7 +#define MANUFACTURER_ID FLMO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM20602 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM20602 +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB2 +#define USE_BEEPER +#define BEEPER_PIN PC3 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +// ICM2060x detected by MPU6500 driver +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART3 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 182 +#define ADC_INSTANCE ADC1 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC14 +#define PINIO2_PIN PA15 +#define PINIO3_PIN PC15 +#define PINIO1_CONFIG 1 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 +#define PINIO3_BOX 42 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(2) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/STELLARF7/target.mk b/src/main/target/STELLARF7/target.mk new file mode 100644 index 0000000000..33934ba820 --- /dev/null +++ b/src/main/target/STELLARF7/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/STELLARF7V2/target.c b/src/main/target/STELLARF7V2/target.c new file mode 100644 index 0000000000..c51f18b050 --- /dev/null +++ b/src/main/target/STELLARF7V2/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // motor 2 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/STELLARF7V2/target.h b/src/main/target/STELLARF7V2/target.h new file mode 100644 index 0000000000..a1dfbfaa97 --- /dev/null +++ b/src/main/target/STELLARF7V2/target.h @@ -0,0 +1,157 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME STELLARF7V2 +#define MANUFACTURER_ID FLMO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_BARO +#define USE_FLASH +#define USE_GYRO +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM20602 +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM20602 +#define USE_ACCGYRO_BMI270 +#define USE_BARO_BMP280 +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB2 +#define USE_BEEPER +#define BEEPER_PIN PC3 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +// ICM2060x detected by MPU6500 driver +#define ACC_MPU6500_ALIGN CW180_DEG +#define GYRO_MPU6500_ALIGN CW180_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIALRX_UART SERIAL_PORT_USART1 +#define MSP_UART SERIAL_PORT_USART2 +#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART3 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 182 +#define ADC_INSTANCE ADC1 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC14 +#define PINIO2_PIN PA15 +#define PINIO3_PIN PC15 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 +#define PINIO3_BOX 42 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(2) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/STELLARF7V2/target.mk b/src/main/target/STELLARF7V2/target.mk new file mode 100644 index 0000000000..33934ba820 --- /dev/null +++ b/src/main/target/STELLARF7V2/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SUB250F411/target.c b/src/main/target/SUB250F411/target.c new file mode 100644 index 0000000000..8e6267a15b --- /dev/null +++ b/src/main/target/SUB250F411/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SUB250F411/target.h b/src/main/target/SUB250F411/target.h new file mode 100644 index 0000000000..3d139de85f --- /dev/null +++ b/src/main/target/SUB250F411/target.h @@ -0,0 +1,127 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SUB250F411 +#define MANUFACTURER_ID SU25 +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PA1 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define INVERTER_PIN_UART2 PC15 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA0 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 + + +#define PINIO1_PIN PB10 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SUB250F411/target.mk b/src/main/target/SUB250F411/target.mk new file mode 100644 index 0000000000..cc96076582 --- /dev/null +++ b/src/main/target/SUB250F411/target.mk @@ -0,0 +1,16 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SUB250REDFOXF722AIO/target.c b/src/main/target/SUB250REDFOXF722AIO/target.c new file mode 100644 index 0000000000..d2a5002dd1 --- /dev/null +++ b/src/main/target/SUB250REDFOXF722AIO/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SUB250REDFOXF722AIO/target.h b/src/main/target/SUB250REDFOXF722AIO/target.h new file mode 100644 index 0000000000..6e7de291e8 --- /dev/null +++ b/src/main/target/SUB250REDFOXF722AIO/target.h @@ -0,0 +1,155 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SUB250REDFOXF722AIO +#define MANUFACTURER_ID SU25 +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED1_PIN PC15 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW90_DEG +#define GYRO_2_ALIGN CW90_DEG +#define GYRO_2_CS_PIN PB2 +#define GYRO_2_EXTI_PIN PB10 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC3_DMA_OPT 0 +#define ADC3_DMA_STREAM DMA2_Stream0 //# ADC 3: DMA2 Stream 0 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC0 +#define PINIO2_PIN PC2 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SUB250REDFOXF722AIO/target.mk b/src/main/target/SUB250REDFOXF722AIO/target.mk new file mode 100644 index 0000000000..21c02bd2ba --- /dev/null +++ b/src/main/target/SUB250REDFOXF722AIO/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/SYNERGYF4/target.c b/src/main/target/SYNERGYF4/target.c new file mode 100644 index 0000000000..5235741565 --- /dev/null +++ b/src/main/target/SYNERGYF4/target.c @@ -0,0 +1,49 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // pwm RX_PWM4_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // pwm RX_PWM5_PIN + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // pwm RX_PWM6_PIN + DEF_TIM(TIM5, CH2, PA1, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SYNERGYF4/target.h b/src/main/target/SYNERGYF4/target.h new file mode 100644 index 0000000000..eecf820bea --- /dev/null +++ b/src/main/target/SYNERGYF4/target.h @@ -0,0 +1,129 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME SYNERGYF4 +#define MANUFACTURER_ID KLEE +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PA1 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA8 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW0_DEG_FLIP +#define GYRO_1_ALIGN CW0_DEG_FLIP +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) + +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PA0 +#define ADC2_DMA_OPT 1 +#define ADC2_DMA_STREAM DMA2_Stream3 //# ADC 2: DMA2 Stream 3 Channel 1 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC2 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB14 + +#define PINIO1_PIN PB15 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 14 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SYNERGYF4/target.mk b/src/main/target/SYNERGYF4/target.mk new file mode 100644 index 0000000000..9c3d6de154 --- /dev/null +++ b/src/main/target/SYNERGYF4/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TAKERF411/target.c b/src/main/target/TAKERF411/target.c new file mode 100644 index 0000000000..8e6267a15b --- /dev/null +++ b/src/main/target/TAKERF411/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TAKERF411/target.h b/src/main/target/TAKERF411/target.h new file mode 100644 index 0000000000..7f0dfafa01 --- /dev/null +++ b/src/main/target/TAKERF411/target.h @@ -0,0 +1,127 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TAKERF411 +#define MANUFACTURER_ID GEPR +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PA1 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define INVERTER_PIN_UART2 PC15 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA0 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 + + +#define PINIO1_PIN PB10 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TAKERF411/target.mk b/src/main/target/TAKERF411/target.mk new file mode 100644 index 0000000000..cc96076582 --- /dev/null +++ b/src/main/target/TAKERF411/target.mk @@ -0,0 +1,16 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TAKERF722SE/target.c b/src/main/target/TAKERF722SE/target.c new file mode 100644 index 0000000000..864005dd41 --- /dev/null +++ b/src/main/target/TAKERF722SE/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TAKERF722SE/target.h b/src/main/target/TAKERF722SE/target.h new file mode 100644 index 0000000000..b0ccf7b053 --- /dev/null +++ b/src/main/target/TAKERF722SE/target.h @@ -0,0 +1,157 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TAKERF722SE +#define MANUFACTURER_ID GEPR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42605 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42605 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_FLASH_W25N01G +#define USE_MAX7456 +#define USE_CAMERA_CONTROL + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB2 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIALRX_UART SERIAL_PORT_USART3 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + +#define PINIO1_PIN PC1 +#define PINIO2_PIN PC15 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 0 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TAKERF722SE/target.mk b/src/main/target/TAKERF722SE/target.mk new file mode 100644 index 0000000000..686df84a99 --- /dev/null +++ b/src/main/target/TAKERF722SE/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TCMMF411/target.c b/src/main/target/TCMMF411/target.c new file mode 100644 index 0000000000..3d74144a87 --- /dev/null +++ b/src/main/target/TCMMF411/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM10, CH1, PB8, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TCMMF411/target.h b/src/main/target/TCMMF411/target.h new file mode 100644 index 0000000000..0786c3a5c6 --- /dev/null +++ b/src/main/target/TCMMF411/target.h @@ -0,0 +1,117 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TCMMF411 +#define MANUFACTURER_ID TCMM +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + + +#define FLASH_CS_PIN PA0 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(9) | TIM_N(10) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TCMMF411/target.mk b/src/main/target/TCMMF411/target.mk new file mode 100644 index 0000000000..b03d71fbd5 --- /dev/null +++ b/src/main/target/TCMMF411/target.mk @@ -0,0 +1,14 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TMOTORF7_AIO/target.c b/src/main/target/TMOTORF7_AIO/target.c new file mode 100644 index 0000000000..17971e789b --- /dev/null +++ b/src/main/target/TMOTORF7_AIO/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH2N, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), // cam ctrl; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMOTORF7_AIO/target.h b/src/main/target/TMOTORF7_AIO/target.h new file mode 100644 index 0000000000..7a96a0bef0 --- /dev/null +++ b/src/main/target/TMOTORF7_AIO/target.h @@ -0,0 +1,136 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TMOTORF7_AIO +#define MANUFACTURER_ID TMTR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_BARO +#define USE_BARO_SPI_BMP280 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB2 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB9 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6500_ALIGN CW0_DEG +#define GYRO_MPU6500_ALIGN CW0_DEG +#define MPU6500_CS_PIN PA4 +#define MPU6500_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define BARO_CS_PIN PC15 +#define BARO_SPI_INSTANCE SPI3 +#define BMP280_CS_PIN PC15 +#define BMP280_SPI_INSTANCE SPI3 +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PC8 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PC14 +#define PINIO1_BOX 40 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMOTORF7_AIO/target.mk b/src/main/target/TMOTORF7_AIO/target.mk new file mode 100644 index 0000000000..d5a834043e --- /dev/null +++ b/src/main/target/TMOTORF7_AIO/target.mk @@ -0,0 +1,16 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TMOTORVELOXF7V2/target.c b/src/main/target/TMOTORVELOXF7V2/target.c new file mode 100644 index 0000000000..f666e8ba33 --- /dev/null +++ b/src/main/target/TMOTORVELOXF7V2/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMOTORVELOXF7V2/target.h b/src/main/target/TMOTORVELOXF7V2/target.h new file mode 100644 index 0000000000..4e3f91299a --- /dev/null +++ b/src/main/target/TMOTORVELOXF7V2/target.h @@ -0,0 +1,133 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TMOTORVELOXF7V2 +#define MANUFACTURER_ID TMTR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC4 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 400 + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMOTORVELOXF7V2/target.mk b/src/main/target/TMOTORVELOXF7V2/target.mk new file mode 100644 index 0000000000..5314e2a7f1 --- /dev/null +++ b/src/main/target/TMOTORVELOXF7V2/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TMPACERF7MINI/target.c b/src/main/target/TMPACERF7MINI/target.c new file mode 100644 index 0000000000..8a3605bebc --- /dev/null +++ b/src/main/target/TMPACERF7MINI/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMPACERF7MINI/target.h b/src/main/target/TMPACERF7MINI/target.h new file mode 100644 index 0000000000..3c0486c9ce --- /dev/null +++ b/src/main/target/TMPACERF7MINI/target.h @@ -0,0 +1,128 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TMPACERF7MINI +#define MANUFACTURER_ID TMTR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACCGYRO_BMI270 +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA15 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PA4 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PC4 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PC4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define SERIAL_PORT_COUNT 5 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PC13 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMPACERF7MINI/target.mk b/src/main/target/TMPACERF7MINI/target.mk new file mode 100644 index 0000000000..025c02aa9f --- /dev/null +++ b/src/main/target/TMPACERF7MINI/target.mk @@ -0,0 +1,14 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TMVELOXF411/target.c b/src/main/target/TMVELOXF411/target.c new file mode 100644 index 0000000000..c8425c90a3 --- /dev/null +++ b/src/main/target/TMVELOXF411/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMVELOXF411/target.h b/src/main/target/TMVELOXF411/target.h new file mode 100644 index 0000000000..f4e48d88eb --- /dev/null +++ b/src/main/target/TMVELOXF411/target.h @@ -0,0 +1,116 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TMVELOXF411 +#define MANUFACTURER_ID TMTR +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC15 + +#define USE_SPI_GYRO +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PA1 +#define CURRENT_METER_ADC_PIN PA0 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(5) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMVELOXF411/target.mk b/src/main/target/TMVELOXF411/target.mk new file mode 100644 index 0000000000..2b7759aaaa --- /dev/null +++ b/src/main/target/TMVELOXF411/target.mk @@ -0,0 +1,14 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TMVELOXF7/target.c b/src/main/target/TMVELOXF7/target.c new file mode 100644 index 0000000000..8a1e1db2ad --- /dev/null +++ b/src/main/target/TMVELOXF7/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMVELOXF7/target.h b/src/main/target/TMVELOXF7/target.h new file mode 100644 index 0000000000..8869c00337 --- /dev/null +++ b/src/main/target/TMVELOXF7/target.h @@ -0,0 +1,146 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TMVELOXF7 +#define MANUFACTURER_ID TMTR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_ALIGN CW180_DEG_FLIP +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC3 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PB2 +#define GYRO_2_EXTI_PIN PC4 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB0 +#define PINIO2_PIN PB9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMVELOXF7/target.mk b/src/main/target/TMVELOXF7/target.mk new file mode 100644 index 0000000000..c0ada60ccc --- /dev/null +++ b/src/main/target/TMVELOXF7/target.mk @@ -0,0 +1,15 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TRANSTECF411AIO/target.c b/src/main/target/TRANSTECF411AIO/target.c new file mode 100644 index 0000000000..a3ceffe1ad --- /dev/null +++ b/src/main/target/TRANSTECF411AIO/target.c @@ -0,0 +1,45 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TRANSTECF411AIO/target.h b/src/main/target/TRANSTECF411AIO/target.h new file mode 100644 index 0000000000..91a956938d --- /dev/null +++ b/src/main/target/TRANSTECF411AIO/target.h @@ -0,0 +1,103 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TRANSTECF411AIO +#define MANUFACTURER_ID TTRH +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB2 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define INVERTER_PIN_UART1 PA14 +#define SERIAL_PORT_COUNT 3 + + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 10 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TRANSTECF411AIO/target.mk b/src/main/target/TRANSTECF411AIO/target.mk new file mode 100644 index 0000000000..d20a4d2625 --- /dev/null +++ b/src/main/target/TRANSTECF411AIO/target.mk @@ -0,0 +1,13 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TRANSTECF411HD/target.c b/src/main/target/TRANSTECF411HD/target.c new file mode 100644 index 0000000000..99fa01917d --- /dev/null +++ b/src/main/target/TRANSTECF411HD/target.c @@ -0,0 +1,40 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH4, PB9, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TRANSTECF411HD/target.h b/src/main/target/TRANSTECF411HD/target.h new file mode 100644 index 0000000000..158831b671 --- /dev/null +++ b/src/main/target/TRANSTECF411HD/target.h @@ -0,0 +1,99 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TRANSTECF411HD +#define MANUFACTURER_ID TTRH +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB6 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PA1 + +#define ACC_MPU6000_ALIGN CW90_DEG +#define GYRO_MPU6000_ALIGN CW90_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define INVERTER_PIN_UART1 PC13 +#define SERIAL_PORT_COUNT 3 + + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE NULL + +#define USE_ADC +#define VBAT_ADC_PIN PA0 +#define CURRENT_METER_ADC_PIN PB4 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_NONE + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 5 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TRANSTECF411HD/target.mk b/src/main/target/TRANSTECF411HD/target.mk new file mode 100644 index 0000000000..d20a4d2625 --- /dev/null +++ b/src/main/target/TRANSTECF411HD/target.mk @@ -0,0 +1,13 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TRANSTECF7HD/target.c b/src/main/target/TRANSTECF7HD/target.c new file mode 100644 index 0000000000..fa5540b491 --- /dev/null +++ b/src/main/target/TRANSTECF7HD/target.c @@ -0,0 +1,43 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TRANSTECF7HD/target.h b/src/main/target/TRANSTECF7HD/target.h new file mode 100644 index 0000000000..b5d6d50e9e --- /dev/null +++ b/src/main/target/TRANSTECF7HD/target.h @@ -0,0 +1,118 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TRANSTECF7HD +#define MANUFACTURER_ID TTRH +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI + +#define USE_LED +#define LED0_PIN PA14 +#define LED_STRIP_PIN PA15 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC3 + +#define ACC_MPU6000_ALIGN CW180_DEG_FLIP +#define GYRO_MPU6000_ALIGN CW180_DEG_FLIP +#define MPU6000_CS_PIN PC2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PC10 +#define UART3_RX_PIN PC11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PB5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define ENABLE_DSHOT_DMAR true + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 8 +#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TRANSTECF7HD/target.mk b/src/main/target/TRANSTECF7HD/target.mk new file mode 100644 index 0000000000..cab8fbfdfe --- /dev/null +++ b/src/main/target/TRANSTECF7HD/target.mk @@ -0,0 +1,13 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/TUNERCF411/target.c b/src/main/target/TUNERCF411/target.c new file mode 100644 index 0000000000..cb2b5d5dea --- /dev/null +++ b/src/main/target/TUNERCF411/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TUNERCF411/target.h b/src/main/target/TUNERCF411/target.h new file mode 100644 index 0000000000..3949f5c793 --- /dev/null +++ b/src/main/target/TUNERCF411/target.h @@ -0,0 +1,111 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME TUNERCF411 +#define MANUFACTURER_ID TURC +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACCGYRO_BMI270 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define USE_BEEPER +#define BEEPER_PIN PB2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PA1 + +#define USE_SPI_GYRO +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_SOFTSERIAL1 +#define SOFTSERIAL1_TX_PIN PA8 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB10 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 + + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TUNERCF411/target.mk b/src/main/target/TUNERCF411/target.mk new file mode 100644 index 0000000000..a20122ad55 --- /dev/null +++ b/src/main/target/TUNERCF411/target.mk @@ -0,0 +1,11 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/VGOODRCF405_DJI/target.c b/src/main/target/VGOODRCF405_DJI/target.c new file mode 100644 index 0000000000..63c29db0cc --- /dev/null +++ b/src/main/target/VGOODRCF405_DJI/target.c @@ -0,0 +1,42 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM1, CH2, PA9, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/VGOODRCF405_DJI/target.h b/src/main/target/VGOODRCF405_DJI/target.h new file mode 100644 index 0000000000..5d3b1eae49 --- /dev/null +++ b/src/main/target/VGOODRCF405_DJI/target.h @@ -0,0 +1,133 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME VGOODRCF405_DJI +#define MANUFACTURER_ID VGRC +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED1_PIN PC14 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 7 + + +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 1 +#define ADC3_DMA_STREAM DMA2_Stream1 //# ADC 3: DMA2 Stream 1 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC3 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB9 + +#define PINIO1_PIN PB0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 7 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(8) | TIM_N(11) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/VGOODRCF405_DJI/target.mk b/src/main/target/VGOODRCF405_DJI/target.mk new file mode 100644 index 0000000000..447de40c64 --- /dev/null +++ b/src/main/target/VGOODRCF405_DJI/target.mk @@ -0,0 +1,14 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) diff --git a/src/main/target/XRACERF4/target.c b/src/main/target/XRACERF4/target.c new file mode 100644 index 0000000000..ce613eece9 --- /dev/null +++ b/src/main/target/XRACERF4/target.c @@ -0,0 +1,49 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // motor 3 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // pwm RX_PWM2_PIN; dma 0 assumed, please verify + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // pwm RX_PWM3_PIN + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // pwm RX_PWM4_PIN + DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // pwm RX_PWM5_PIN + DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // pwm RX_PWM6_PIN + DEF_TIM(TIM1, CH2, PA9, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH3, PA10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/XRACERF4/target.h b/src/main/target/XRACERF4/target.h new file mode 100644 index 0000000000..de60d5df61 --- /dev/null +++ b/src/main/target/XRACERF4/target.h @@ -0,0 +1,119 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: d84474d + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME XRACERF4 +#define MANUFACTURER_ID FPVM +#define TARGET_BOARD_IDENTIFIER "S405" // generic ID +#define FC_TARGET_MCU STM32F405 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC +#define USE_ACC_SPI_MPU6500 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB5 +#define LED_STRIP_PIN PA1 +#define USE_BEEPER +#define BEEPER_PIN PB4 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define INVERTER_PIN_UART1 PC0 +#define SERIAL_PORT_COUNT 4 + +#define USE_I2C +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PA0 +#define ADC2_DMA_OPT 1 +#define ADC2_DMA_STREAM DMA2_Stream3 //# ADC 2: DMA2 Stream 3 Channel 1 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define ADC_INSTANCE ADC2 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PB14 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 14 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/XRACERF4/target.mk b/src/main/target/XRACERF4/target.mk new file mode 100644 index 0000000000..cde919cc55 --- /dev/null +++ b/src/main/target/XRACERF4/target.mk @@ -0,0 +1,16 @@ +F405_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: d84474d + 1 file changed, 24 deletions(-) From 571a7cfbddd16e2fe3fd88536000e66c75146e87 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:02:09 -0500 Subject: [PATCH 06/21] MSP 1.54 (#991) * MSP 1.54 * MSP 1.54 - move sampleRate location * MSP 1.54 - cleanup * MSP 1.54 support - add vtx_low_power_disarm --- src/main/drivers/accgyro/gyro_sync.c | 5 ++ src/main/interface/msp.c | 71 ++++++++++++++++++---------- src/main/interface/msp_protocol.h | 2 +- src/main/sensors/gyro.h | 4 ++ 4 files changed, 55 insertions(+), 27 deletions(-) diff --git a/src/main/drivers/accgyro/gyro_sync.c b/src/main/drivers/accgyro/gyro_sync.c index 3653c24d43..91ddc1cec6 100644 --- a/src/main/drivers/accgyro/gyro_sync.c +++ b/src/main/drivers/accgyro/gyro_sync.c @@ -53,21 +53,26 @@ uint32_t gyroSetSampleRate(gyroDev_t *gyro, uint8_t lpf, uint8_t gyroSyncDenomin } gyro->mpuDividerDrops = gyroSyncDenominator - 1; gyro->gyroRateKHz = lpfNoneOr256 ? GYRO_RATE_8_kHz : GYRO_RATE_1_kHz; + gyroConfigMutable()->gyroSampleRateHz = lpfNoneOr256 ? 8000 : 1000; switch (gyro->mpuDetectionResult.sensor) { case ICM_20649_SPI: //20649 is a weird gyro gyro->gyroRateKHz = lpfNoneOr256 ? GYRO_RATE_9_kHz : GYRO_RATE_1100_Hz; + gyroConfigMutable()->gyroSampleRateHz = lpfNoneOr256 ? 9000 : 1100; break; case BMI_160_SPI: //brainFPV is also a weird gyro if (lpfNoneOr256) { gyro->gyroRateKHz = GYRO_RATE_3200_Hz; } + gyroConfigMutable()->gyroSampleRateHz = 3200; break; case BMI_270_SPI: //bmi270 gyro->gyroRateKHz = GYRO_RATE_3200_Hz; + gyroConfigMutable()->gyroSampleRateHz = 3200; break; default: if (gyro_use_32khz) { //use full 32k gyro->gyroRateKHz = GYRO_RATE_32_kHz; + gyroConfigMutable()->gyroSampleRateHz = 32000; } } diff --git a/src/main/interface/msp.c b/src/main/interface/msp.c index bdffb85b36..f81d0c71f4 100644 --- a/src/main/interface/msp.c +++ b/src/main/interface/msp.c @@ -458,6 +458,9 @@ bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProcessFnPtr // Signature sbufWriteData(dst, getSignature(), SIGNATURE_LENGTH); #endif + //MSP 1.54 + sbufWriteU16(dst, gyroConfig()->gyroSampleRateHz); //For Configurator PID/Gyro loop selection. + //End MSP 1.54 #endif // USE_BOARD_INFO break; } @@ -1169,6 +1172,9 @@ bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst) { sbufWriteU16(dst, motorConfig()->dev.motorPwmRate); sbufWriteU16(dst, motorConfig()->digitalIdleOffsetValue); sbufWriteU8(dst, gyroConfig()->gyro_use_32khz); + //MSP 1.54 - insert here to avoid new unnecessary Configurator code + sbufWriteU8(dst, motorConfig()->motorPoleCount); + //End MSP 1.54 sbufWriteU8(dst, motorConfig()->dev.motorPwmInversion); sbufWriteU8(dst, gyroConfig()->gyro_to_use); sbufWriteU8(dst, gyroConfig()->gyro_high_fsr); @@ -1358,6 +1364,9 @@ bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst) { sbufWriteU8(dst, vtxSettingsConfig()->power); sbufWriteU8(dst, pitmode); sbufWriteU16(dst, vtxSettingsConfig()->freq); + //MSP 1.54 + sbufWriteU8(dst, vtxSettingsConfig()->lowPowerDisarm); + //END MSP 1.54 // future extensions here... } else { sbufWriteU8(dst, VTXDEV_UNKNOWN); // no VTX detected @@ -1792,6 +1801,11 @@ mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src) { if (sbufBytesRemaining(src)) { gyroConfigMutable()->gyro_use_32khz = sbufReadU8(src); } + //MSP 1.54 - insert here to avoid new unnecessary Configurator code + if (sbufBytesRemaining(src) >= 1) { + motorConfigMutable()->motorPoleCount = sbufReadU8(src); + } + //End MSP 1.54 if (sbufBytesRemaining(src)) { motorConfigMutable()->dev.motorPwmInversion = sbufReadU8(src); } @@ -2016,32 +2030,37 @@ mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src) { #endif #ifdef USE_VTX_COMMON case MSP_SET_VTX_CONFIG: { - vtxDevice_t *vtxDevice = vtxCommonDevice(); - if (vtxDevice) { - if (vtxCommonGetDeviceType(vtxDevice) != VTXDEV_UNKNOWN) { - uint16_t newFrequency = sbufReadU16(src); - if (newFrequency <= VTXCOMMON_MSP_BANDCHAN_CHKVAL) { //value is band and channel - const uint8_t newBand = (newFrequency / 8) + 1; - const uint8_t newChannel = (newFrequency % 8) + 1; - vtxSettingsConfigMutable()->band = newBand; - vtxSettingsConfigMutable()->channel = newChannel; - vtxSettingsConfigMutable()->freq = vtx58_Bandchan2Freq(newBand, newChannel); - } else { //value is frequency in MHz - vtxSettingsConfigMutable()->band = 0; - vtxSettingsConfigMutable()->freq = newFrequency; - } - if (sbufBytesRemaining(src) > 1) { - vtxSettingsConfigMutable()->power = sbufReadU8(src); - // Delegate pitmode to vtx directly - const uint8_t newPitmode = sbufReadU8(src); - uint8_t currentPitmode = 0; - vtxCommonGetPitMode(vtxDevice, ¤tPitmode); - if (currentPitmode != newPitmode) { - vtxCommonSetPitMode(vtxDevice, newPitmode); - } - } - } - } + vtxDevice_t *vtxDevice = vtxCommonDevice(); + if (vtxDevice) { + if (vtxCommonGetDeviceType(vtxDevice) != VTXDEV_UNKNOWN) { + uint16_t newFrequency = sbufReadU16(src); + if (newFrequency <= VTXCOMMON_MSP_BANDCHAN_CHKVAL) { //value is band and channel + const uint8_t newBand = (newFrequency / 8) + 1; + const uint8_t newChannel = (newFrequency % 8) + 1; + vtxSettingsConfigMutable()->band = newBand; + vtxSettingsConfigMutable()->channel = newChannel; + vtxSettingsConfigMutable()->freq = vtx58_Bandchan2Freq(newBand, newChannel); + } else { //value is frequency in MHz + vtxSettingsConfigMutable()->band = 0; + vtxSettingsConfigMutable()->freq = newFrequency; + } + if (sbufBytesRemaining(src) > 1) { + vtxSettingsConfigMutable()->power = sbufReadU8(src); + // Delegate pitmode to vtx directly + const uint8_t newPitmode = sbufReadU8(src); + uint8_t currentPitmode = 0; + vtxCommonGetPitMode(vtxDevice, ¤tPitmode); + if (currentPitmode != newPitmode) { + vtxCommonSetPitMode(vtxDevice, newPitmode); + } + } + // MSP 1.54 + if (sbufBytesRemaining(src) >= 1) { + vtxSettingsConfigMutable()->lowPowerDisarm = sbufReadU8(src); + } + // END MSP 1.54 + } + } } break; #endif diff --git a/src/main/interface/msp_protocol.h b/src/main/interface/msp_protocol.h index 8716c30f0c..2d37b51717 100644 --- a/src/main/interface/msp_protocol.h +++ b/src/main/interface/msp_protocol.h @@ -64,7 +64,7 @@ // API VERSION #define API_VERSION_MAJOR 1 // increment when major changes are made -#define API_VERSION_MINOR 53 // increment after a release, to set the version for all changes to go into the following release (if no changes to MSP are made between the releases, this can be reverted before the release) +#define API_VERSION_MINOR 54 // increment after a release, to set the version for all changes to go into the following release (if no changes to MSP are made between the releases, this can be reverted before the release) #define API_VERSION_LENGTH 2 diff --git a/src/main/sensors/gyro.h b/src/main/sensors/gyro.h index 671d7b7cbd..e333d77410 100644 --- a/src/main/sensors/gyro.h +++ b/src/main/sensors/gyro.h @@ -175,6 +175,10 @@ typedef struct gyroConfig_s { uint8_t smithPredictorStrength; uint8_t smithPredictorDelay; uint8_t smithPredictorFilterHz; + + //MSP 1.54 + uint16_t gyroSampleRateHz; + //End MSP 1.54 } gyroConfig_t; PG_DECLARE(gyroConfig_t, gyroConfig); From 047242bd8b632b5f82af17d3df4943fd8f747c87 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:01:46 -0500 Subject: [PATCH 07/21] version bump 0.4.3 (#1057) --- src/main/build/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/build/version.h b/src/main/build/version.h index 562af0c0d2..258c68e66e 100644 --- a/src/main/build/version.h +++ b/src/main/build/version.h @@ -25,7 +25,7 @@ #define FC_FIRMWARE_NAME "EmuFlight" #define FC_VERSION_MAJOR 0 // increment when a major release is made (big new feature, etc) #define FC_VERSION_MINOR 4 // increment when a minor release is made (small new feature, change etc) -#define FC_VERSION_PATCH_LEVEL 2 // increment when a bug is fixed +#define FC_VERSION_PATCH_LEVEL 3 // increment when a bug is fixed #define FC_VERSION_STRING STR(FC_VERSION_MAJOR) "." STR(FC_VERSION_MINOR) "." STR(FC_VERSION_PATCH_LEVEL) From 5a78402915418861d788fee95bc11697911f4742 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 3 May 2024 10:28:13 -0500 Subject: [PATCH 08/21] [targets] BEEBRAIN_PRO_DSM_US/INTL add BMI160 (#1058) --- src/main/target/BEEBRAIN_PRO/target.h | 23 ++++++++++++++++++- src/main/target/BEEBRAIN_PRO/target.mk | 31 +++++++++++++------------- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/src/main/target/BEEBRAIN_PRO/target.h b/src/main/target/BEEBRAIN_PRO/target.h index 042f4ba008..6fbbb6c8b1 100644 --- a/src/main/target/BEEBRAIN_PRO/target.h +++ b/src/main/target/BEEBRAIN_PRO/target.h @@ -20,8 +20,20 @@ #pragma once -#define TARGET_BOARD_IDENTIFIER "BBPRO" // BeeBrain Pro +#define MANUFACTURER_ID NEBD #define USBD_PRODUCT_STRING "BeeBrain PRO" +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#if defined(BEEBRAIN_PRO_DSM_US) +#define BOARD_NAME BEEBRAIN_PRO_DSM_US +#elif defined(BEEBRAIN_PRO_DSM_INTL) +#define BOARD_NAME BEEBRAIN_PRO_DSM_INTL +#elif defined(BEEBRAIN_PRO_FRSKY_US) +#define BOARD_NAME BEEBRAIN_PRO_FRSKY_US +#else +#define BOARD_NAME BEEBRAINPRO +#endif #define USE_TARGET_CONFIG #define TARGET_PREINIT @@ -73,6 +85,15 @@ #define GYRO_MPU6000_ALIGN CW90_DEG #define ACC_MPU6000_ALIGN CW90_DEG +#if (defined(BEEBRAIN_PRO_DSM_US) || defined(BEEBRAIN_PRO_DSM_INTL)) +#define USE_ACCGYRO_BMI160 +#define BMI160_SPI_DIVISOR 16 +#define BMI160_INT_EXTI PB0 +#define BMI160_CS_PIN PA4 +#define BMI160_SPI_INSTANCE SPI3 +#define GYRO_BMI160_ALIGN CW0_DEG +#endif + // *************** RX ****************************** #if (defined(BEEBRAIN_PRO_DSM_US) || defined(BEEBRAIN_PRO_DSM_INTL)) #define SERIALRX_PROVIDER SERIALRX_SPEKTRUM2048 diff --git a/src/main/target/BEEBRAIN_PRO/target.mk b/src/main/target/BEEBRAIN_PRO/target.mk index 976d6c30ee..394583f69f 100644 --- a/src/main/target/BEEBRAIN_PRO/target.mk +++ b/src/main/target/BEEBRAIN_PRO/target.mk @@ -2,40 +2,41 @@ F411_TARGETS += $(TARGET) FEATURES = VCP ONBOARDFLASH TARGET_SRC = \ - drivers/accgyro/accgyro_spi_mpu6500.c \ - drivers/accgyro/accgyro_mpu6500.c \ + drivers/accgyro/accgyro_spi_mpu6500.c \ + drivers/accgyro/accgyro_mpu6500.c \ drivers/accgyro/accgyro_spi_mpu6000.c \ + drivers/accgyro/accgyro_spi_bmi160.c \ drivers/barometer/barometer_bmp280.c \ drivers/nbd7456.c \ - drivers/vtx_rtc6705_soft_spi.c \ + drivers/vtx_rtc6705_soft_spi.c \ drivers/flash_m25p16.c ifeq ($(TARGET), BEEBRAIN_PRO_FRSKY_INTL) TARGET_SRC += drivers/rx/rx_cc2500.c \ rx/cc2500_frsky_shared.c \ - rx/cc2500_common.c \ + rx/cc2500_common.c \ rx/cc2500_frsky_d.c \ - rx/cc2500_frsky_x.c \ - rx/cc2500_redpine.c \ - rx/cc2500_sfhss.c + rx/cc2500_frsky_x.c \ + rx/cc2500_redpine.c \ + rx/cc2500_sfhss.c endif ifeq ($(TARGET), BEEBRAIN_PRO_FRSKY_US) TARGET_SRC += drivers/rx/rx_cc2500.c \ rx/cc2500_frsky_shared.c \ - rx/cc2500_common.c \ + rx/cc2500_common.c \ rx/cc2500_frsky_d.c \ - rx/cc2500_frsky_x.c \ - rx/cc2500_redpine.c \ - rx/cc2500_sfhss.c + rx/cc2500_frsky_x.c \ + rx/cc2500_redpine.c \ + rx/cc2500_sfhss.c endif ifeq ($(TARGET), BEEBRAIN_PRO) TARGET_SRC += drivers/rx/rx_cc2500.c \ rx/cc2500_frsky_shared.c \ - rx/cc2500_common.c \ + rx/cc2500_common.c \ rx/cc2500_frsky_d.c \ - rx/cc2500_frsky_x.c \ - rx/cc2500_redpine.c \ - rx/cc2500_sfhss.c + rx/cc2500_frsky_x.c \ + rx/cc2500_redpine.c \ + rx/cc2500_sfhss.c endif From 92c8571e716290b1c41df1881c548b5b4a2df6ee Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 3 May 2024 10:34:15 -0500 Subject: [PATCH 09/21] [target] ZEEZF7 attempt enabling BlackBox Flash (#1059) --- src/main/target/ZEEZF7/target.h | 6 +++++- src/main/target/ZEEZF7/target.mk | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/target/ZEEZF7/target.h b/src/main/target/ZEEZF7/target.h index d9fa7a7743..c6a9ba1343 100644 --- a/src/main/target/ZEEZF7/target.h +++ b/src/main/target/ZEEZF7/target.h @@ -66,9 +66,13 @@ // Blackbox #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT +#define USE_FLASH #define USE_FLASHFS +#define USE_FLASH_W25N01G // official +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI #define USE_FLASH_W25M -#define USE_FLASH_M25P16 +#define USE_FLASH_W25M512 +#define USE_FLASH_W25Q #define FLASH_CS_PIN PA4 #define FLASH_SPI_INSTANCE SPI1 diff --git a/src/main/target/ZEEZF7/target.mk b/src/main/target/ZEEZF7/target.mk index fb36529d7c..ef028ee136 100644 --- a/src/main/target/ZEEZF7/target.mk +++ b/src/main/target/ZEEZF7/target.mk @@ -5,7 +5,7 @@ TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ drivers/compass/compass_hmc5883l.c \ drivers/compass/compass_qmc5883l.c \ - drivers/barometer/barometer_bmp280.c \ - drivers/barometer/barometer_bmp085.c \ - drivers/barometer/barometer_ms5611.c \ + drivers/barometer/barometer_bmp280.c \ + drivers/barometer/barometer_bmp085.c \ + drivers/barometer/barometer_ms5611.c \ drivers/max7456.c From 4f59ddc1cc28cff9739ae089c0664bb1318cbe5f Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 10 May 2024 13:20:09 -0500 Subject: [PATCH 10/21] [target] JHEF722HD fix RX3,4 and add PINIO2 (#1060) --- src/main/target/JHEF722HD/target.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/target/JHEF722HD/target.h b/src/main/target/JHEF722HD/target.h index a0b0792cc9..fc336d2d57 100644 --- a/src/main/target/JHEF722HD/target.h +++ b/src/main/target/JHEF722HD/target.h @@ -92,16 +92,19 @@ #define USE_UART2 #define UART2_TX_PIN PA2 #define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN NONE +#define UART3_RX_PIN PB11 #define USE_UART4 #define UART4_TX_PIN PA0 -#define UART4_RX_PIN PB11 +#define UART4_RX_PIN PA1 #define USE_UART5 #define UART5_TX_PIN PC12 #define UART5_RX_PIN PD2 #define USE_UART6 #define UART6_TX_PIN PC6 #define UART6_RX_PIN PC7 -#define SERIAL_PORT_COUNT 6 +#define SERIAL_PORT_COUNT 7 #define USE_I2C #define USE_I2C_DEVICE_1 @@ -132,8 +135,10 @@ #define PINIO1_PIN PC0 #define PINIO2_PIN PC2 -#define PINIO1_CONFIG 129 -#define PINIO1_BOX 40 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 #define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTB 0xffff From 14a4a112e5d563543ff8264b1c11af34f0f6141d Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 10 May 2024 13:20:20 -0500 Subject: [PATCH 11/21] [target] add BETAFLIGHTF7 (#1061) --- src/main/target/BETAFLIGHTF7/target.c | 48 +++++++++ src/main/target/BETAFLIGHTF7/target.h | 139 +++++++++++++++++++++++++ src/main/target/BETAFLIGHTF7/target.mk | 16 +++ 3 files changed, 203 insertions(+) create mode 100644 src/main/target/BETAFLIGHTF7/target.c create mode 100644 src/main/target/BETAFLIGHTF7/target.h create mode 100644 src/main/target/BETAFLIGHTF7/target.mk diff --git a/src/main/target/BETAFLIGHTF7/target.c b/src/main/target/BETAFLIGHTF7/target.c new file mode 100644 index 0000000000..d619370d0a --- /dev/null +++ b/src/main/target/BETAFLIGHTF7/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 28f5a2a + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 2), // motor 3 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 1), // cam ctrl + DEF_TIM(TIM1, CH3, PE13, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BETAFLIGHTF7/target.h b/src/main/target/BETAFLIGHTF7/target.h new file mode 100644 index 0000000000..ffb5711af7 --- /dev/null +++ b/src/main/target/BETAFLIGHTF7/target.h @@ -0,0 +1,139 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 28f5a2a + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FPVM_BETAFLIGHTF7 +#define MANUFACTURER_ID FPVM +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_ACC_SPI_MPU6500 +#define USE_MAX7456 +#define USE_FLASH +#define USE_FLASH_W25Q128FV + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE0 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PC8 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PD0 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PA15 +#define GYRO_2_EXTI_PIN PE8 +#define GYRO_2_SPI_INSTANCE SPI3 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 5 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define MAG_I2C_INSTANCE (I2CDEV_2) +#define DASHBOARD_I2C_INSTANCE (I2CDEV_2) + +#define FLASH_CS_PIN PE4 +#define FLASH_SPI_INSTANCE SPI4 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BETAFLIGHTF7/target.mk b/src/main/target/BETAFLIGHTF7/target.mk new file mode 100644 index 0000000000..d5742a45c7 --- /dev/null +++ b/src/main/target/BETAFLIGHTF7/target.mk @@ -0,0 +1,16 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_mpu6500.c \ +drivers/accgyro/accgyro_spi_mpu6500.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: 28f5a2a + 1 file changed, 24 deletions(-) From 002d5bf887fca1b14954adfc7c69312f6c807643 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 10 May 2024 13:20:39 -0500 Subject: [PATCH 12/21] [target] add HGLRCF722AIO_X6 (#1062) --- src/main/target/HGLRCF722AIO_X6/target.c | 48 +++++++ src/main/target/HGLRCF722AIO_X6/target.h | 153 ++++++++++++++++++++++ src/main/target/HGLRCF722AIO_X6/target.mk | 18 +++ 3 files changed, 219 insertions(+) create mode 100644 src/main/target/HGLRCF722AIO_X6/target.c create mode 100644 src/main/target/HGLRCF722AIO_X6/target.h create mode 100644 src/main/target/HGLRCF722AIO_X6/target.mk diff --git a/src/main/target/HGLRCF722AIO_X6/target.c b/src/main/target/HGLRCF722AIO_X6/target.c new file mode 100644 index 0000000000..c7ca7291e6 --- /dev/null +++ b/src/main/target/HGLRCF722AIO_X6/target.c @@ -0,0 +1,48 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 28f5a2a + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // led + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722AIO_X6/target.h b/src/main/target/HGLRCF722AIO_X6/target.h new file mode 100644 index 0000000000..fa23ba8653 --- /dev/null +++ b/src/main/target/HGLRCF722AIO_X6/target.h @@ -0,0 +1,153 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 28f5a2a + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME HGLRCF722AIO_X6 +#define MANUFACTURER_ID HGLR +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA14 +#define LED1_PIN PA13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PC4 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PB2 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PB2 +#define ICM42688P_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PB2 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define SERIAL_PORT_COUNT 6 + +#define BARO_CS_PIN PA4 +#define BMP280_CS_PIN PA4 +#define BMP280_SPI_INSTANCE +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PC10 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 179 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC8 +#define PINIO2_PIN PC9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 13 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRCF722AIO_X6/target.mk b/src/main/target/HGLRCF722AIO_X6/target.mk new file mode 100644 index 0000000000..98595f6df1 --- /dev/null +++ b/src/main/target/HGLRCF722AIO_X6/target.mk @@ -0,0 +1,18 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: 28f5a2a + 1 file changed, 24 deletions(-) From 9ecfcbd7e6cd34d6fbaa9ad1d935c7f7cf4c42f4 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 10 May 2024 14:16:14 -0500 Subject: [PATCH 13/21] [target] add DREAMWORKSF722 (#1063) --- src/main/target/DREAMWORKSF722/target.c | 44 +++++++ src/main/target/DREAMWORKSF722/target.h | 154 +++++++++++++++++++++++ src/main/target/DREAMWORKSF722/target.mk | 17 +++ 3 files changed, 215 insertions(+) create mode 100644 src/main/target/DREAMWORKSF722/target.c create mode 100644 src/main/target/DREAMWORKSF722/target.h create mode 100644 src/main/target/DREAMWORKSF722/target.mk diff --git a/src/main/target/DREAMWORKSF722/target.c b/src/main/target/DREAMWORKSF722/target.c new file mode 100644 index 0000000000..4a00e0a4a9 --- /dev/null +++ b/src/main/target/DREAMWORKSF722/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check; dma 0 assumed, please verify + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DREAMWORKSF722/target.h b/src/main/target/DREAMWORKSF722/target.h new file mode 100644 index 0000000000..3c542f3190 --- /dev/null +++ b/src/main/target/DREAMWORKSF722/target.h @@ -0,0 +1,154 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME DREAMWORKSF722 +#define MANUFACTURER_ID DREA +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_ICM20689 +#define USE_GYRO_SPI_ICM20689 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PB2 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_INSTANCE SPI1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PA4 +#define GYRO_2_EXTI_PIN PC3 +#define GYRO_2_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC2 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC0 +#define ADC3_DMA_OPT 1 +#define ADC3_DMA_STREAM DMA2_Stream1 //# ADC 3: DMA2 Stream 1 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 450 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PC14 +#define PINIO2_PIN PB9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DREAMWORKSF722/target.mk b/src/main/target/DREAMWORKSF722/target.mk new file mode 100644 index 0000000000..3e7b0b9c41 --- /dev/null +++ b/src/main/target/DREAMWORKSF722/target.mk @@ -0,0 +1,17 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm20689.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: 3f33ae6 + 1 file changed, 24 deletions(-) From 9ce1d35ed288313c9f1a5d137ff855cec54c918d Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 15 May 2024 09:42:22 -0500 Subject: [PATCH 14/21] [target] update CYCLONEF405_PRO (#1064) --- src/main/target/CYCLONEF405_PRO/target.h | 12 +++++++++++- src/main/target/CYCLONEF405_PRO/target.mk | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/target/CYCLONEF405_PRO/target.h b/src/main/target/CYCLONEF405_PRO/target.h index 7e858a76f1..cb07c79a00 100644 --- a/src/main/target/CYCLONEF405_PRO/target.h +++ b/src/main/target/CYCLONEF405_PRO/target.h @@ -16,7 +16,7 @@ */ // This resource file generated using https://github.com/nerdCopter/target-convert -// Commit: d84474d + 1 file changed, 24 deletions(-) +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) #pragma once @@ -29,6 +29,10 @@ #define USE_ACC_SPI_MPU6000 #define USE_GYRO #define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 #define USE_FLASH #define USE_FLASH_W25Q128FV #define USE_MAX7456 @@ -72,6 +76,11 @@ #define MPU6000_CS_PIN PA4 #define MPU6000_SPI_INSTANCE SPI1 +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_INSTANCE SPI1 + #define USE_UART1 #define UART1_TX_PIN PB6 #define UART1_RX_PIN PB7 @@ -97,6 +106,7 @@ #define USE_I2C_DEVICE_1 #define I2C_DEVICE_1 (I2CDEV_1) #define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) #define I2C1_SCL PB8 #define I2C1_SDA PB9 diff --git a/src/main/target/CYCLONEF405_PRO/target.mk b/src/main/target/CYCLONEF405_PRO/target.mk index d0af023d0a..cbee575c7e 100644 --- a/src/main/target/CYCLONEF405_PRO/target.mk +++ b/src/main/target/CYCLONEF405_PRO/target.mk @@ -3,6 +3,7 @@ FEATURES += VCP ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ $(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ drivers/light_led.h \ drivers/light_ws2811strip.c \ @@ -12,4 +13,4 @@ drivers/max7456.c \ # notice - this file was programmatically generated and may be incomplete. # This resource file generated using https://github.com/nerdCopter/target-convert -# Commit: d84474d + 1 file changed, 24 deletions(-) +# Commit: 3f33ae6 + 1 file changed, 24 deletions(-) From 94e9f5a2a2b92a9c667f876b53230bc85816aae3 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Thu, 16 May 2024 12:36:44 -0500 Subject: [PATCH 15/21] [target] add FLYWOOF745HEX (#1065) --- src/main/target/FLYWOOF745HEX/target.c | 46 ++++++++ src/main/target/FLYWOOF745HEX/target.h | 147 ++++++++++++++++++++++++ src/main/target/FLYWOOF745HEX/target.mk | 16 +++ 3 files changed, 209 insertions(+) create mode 100644 src/main/target/FLYWOOF745HEX/target.c create mode 100644 src/main/target/FLYWOOF745HEX/target.h create mode 100644 src/main/target/FLYWOOF745HEX/target.mk diff --git a/src/main/target/FLYWOOF745HEX/target.c b/src/main/target/FLYWOOF745HEX/target.c new file mode 100644 index 0000000000..a7b230917e --- /dev/null +++ b/src/main/target/FLYWOOF745HEX/target.c @@ -0,0 +1,46 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 2), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 7 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // motor 8 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF745HEX/target.h b/src/main/target/FLYWOOF745HEX/target.h new file mode 100644 index 0000000000..04b3fbb80d --- /dev/null +++ b/src/main/target/FLYWOOF745HEX/target.h @@ -0,0 +1,147 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYWOOF745HEX +#define MANUFACTURER_ID FLWO +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#define BEEPER_INVERTED +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PE4 +#define GYRO_1_EXTI_PIN PE1 +#define GYRO_1_SPI_INSTANCE SPI4 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_SPI_INSTANCE SPI4 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_TX_PIN PE8 +#define UART7_RX_PIN PE7 +#define SERIAL_PORT_COUNT 8 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PA4 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 175 + +#define PINIO1_PIN PC0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 11 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOF745HEX/target.mk b/src/main/target/FLYWOOF745HEX/target.mk new file mode 100644 index 0000000000..927fbb3dba --- /dev/null +++ b/src/main/target/FLYWOOF745HEX/target.mk @@ -0,0 +1,16 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: 3f33ae6 + 1 file changed, 24 deletions(-) From 560cdd714ce1069314dab3c82fefaef364d0054a Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:02:16 -0500 Subject: [PATCH 16/21] [target] FLYCOLORF7 add Baro bmp280 (#1072) --- src/main/target/FLYCOLORF7/target.h | 3 +++ src/main/target/FLYCOLORF7/target.mk | 1 + 2 files changed, 4 insertions(+) diff --git a/src/main/target/FLYCOLORF7/target.h b/src/main/target/FLYCOLORF7/target.h index 7c27d4bf42..38b348b69f 100644 --- a/src/main/target/FLYCOLORF7/target.h +++ b/src/main/target/FLYCOLORF7/target.h @@ -31,6 +31,8 @@ #define USE_GYRO_SPI_MPU6000 #define USE_FLASH #define USE_FLASH_W25Q128FV +#define USE_BARO +#define USE_BARO_BMP280 #define USE_MAX7456 #define USE_VCP @@ -105,6 +107,7 @@ #define USE_I2C_DEVICE_1 #define I2C_DEVICE_1 (I2CDEV_1) #define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) #define I2C1_SCL PB6 #define I2C1_SDA PB7 diff --git a/src/main/target/FLYCOLORF7/target.mk b/src/main/target/FLYCOLORF7/target.mk index de71ac0a2e..b4531fc3fe 100644 --- a/src/main/target/FLYCOLORF7/target.mk +++ b/src/main/target/FLYCOLORF7/target.mk @@ -3,6 +3,7 @@ FEATURES += VCP ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ $(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ drivers/light_led.h \ drivers/light_ws2811strip.c \ From 189d2bd7680f4bb27f1dc55d8209fed96a363f8d Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:24:53 -0500 Subject: [PATCH 17/21] 3D-mode fix (#1069) --- src/main/flight/mixer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index 66d510837a..ad4aa6c9b4 100644 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -865,13 +865,13 @@ void mixThingsUp(const float scaledAxisPidRoll, const float scaledAxisPidPitch, float controllerMixMin = 0, controllerMixMax = 0; for (int i = 0; i < motorCount; i++) { - float yawMixVal = controllerMix3DModeSign * scaledAxisPidYaw * currentMixer[i].yaw; + float yawMixVal = scaledAxisPidYaw * currentMixer[i].yaw; if (yawMixVal > yawMixMax) { yawMixMax = yawMixVal; } else if (yawMixVal < yawMixMin) { yawMixMin = yawMixVal; } - yawMix[i] = yawMixVal; + yawMix[i] = yawMixVal * controllerMix3DModeSign; float rollPitchMixVal = scaledAxisPidRoll * currentMixer[i].roll + scaledAxisPidPitch * currentMixer[i].pitch; if (rollPitchMixVal > rollPitchMixMax) { @@ -879,15 +879,15 @@ void mixThingsUp(const float scaledAxisPidRoll, const float scaledAxisPidPitch, } else if (rollPitchMixVal < rollPitchMixMin) { rollPitchMixMin = rollPitchMixVal; } - rollPitchMix[i] = rollPitchMixVal; + rollPitchMix[i] = rollPitchMixVal * controllerMix3DModeSign; - float controllerMixVal = controllerMix3DModeSign * (rollPitchMixVal + yawMixVal); + float controllerMixVal = (rollPitchMixVal + yawMixVal); if (controllerMixVal > controllerMixMax) { controllerMixMax = controllerMixVal; } else if (controllerMixVal < controllerMixMin) { controllerMixMin = controllerMixVal; } - controllerMix[i] = controllerMixVal; + controllerMix[i] = controllerMixVal * controllerMix3DModeSign; } controllerMixRange = controllerMixMax - controllerMixMin; // measures how much the controller is trying to compensate From f7b769a730fc46d3694bc410cd0c91bff2913f5a Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:25:05 -0500 Subject: [PATCH 18/21] more descriptive USBD_PRODUCT_STRING when not defined in target.h (#1073) --- src/main/vcpf4/usbd_desc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/vcpf4/usbd_desc.c b/src/main/vcpf4/usbd_desc.c index 1cbcae69ff..f0aa418170 100644 --- a/src/main/vcpf4/usbd_desc.c +++ b/src/main/vcpf4/usbd_desc.c @@ -66,6 +66,18 @@ #define USBD_LANGID_STRING 0x409 #define USBD_MANUFACTURER_STRING FC_FIRMWARE_NAME +#ifndef USBD_PRODUCT_STRING +#if defined STM32F1 +#define USBD_PRODUCT_STRING "EmuFlight STM32F1" +#elif defined STM32F3 +#define USBD_PRODUCT_STRING "EmuFlight STM32F3" +#elif defined STM32F4 +#define USBD_PRODUCT_STRING "EmuFlight STM32F4" +#elif defined STM32F7 +#define USBD_PRODUCT_STRING "EmuFlight STM32F7" +#endif +#endif + #ifdef USBD_PRODUCT_STRING #define USBD_PRODUCT_HS_STRING USBD_PRODUCT_STRING #define USBD_PRODUCT_FS_STRING USBD_PRODUCT_STRING From 279031419e2e61b46c7c3bee8d6eea6c7b57448e Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:26:40 -0500 Subject: [PATCH 19/21] "[target] add FLYCOLORF7_AIO" (#1074) * [target] add FLYCOLORF7_AIO; needs GYRO_2 SPI * [target] mod FLYCOLORF7_AIO; remove GYRO2 --- src/main/target/FLYCOLORF7_AIO/target.c | 47 +++++++ src/main/target/FLYCOLORF7_AIO/target.h | 153 +++++++++++++++++++++++ src/main/target/FLYCOLORF7_AIO/target.mk | 15 +++ 3 files changed, 215 insertions(+) create mode 100644 src/main/target/FLYCOLORF7_AIO/target.c create mode 100644 src/main/target/FLYCOLORF7_AIO/target.h create mode 100644 src/main/target/FLYCOLORF7_AIO/target.mk diff --git a/src/main/target/FLYCOLORF7_AIO/target.c b/src/main/target/FLYCOLORF7_AIO/target.c new file mode 100644 index 0000000000..cbe9014909 --- /dev/null +++ b/src/main/target/FLYCOLORF7_AIO/target.c @@ -0,0 +1,47 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM4, CH3, PB8, TIM_USE_ANY, 0, 0), // cam ctrl + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 1), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF7_AIO/target.h b/src/main/target/FLYCOLORF7_AIO/target.h new file mode 100644 index 0000000000..ea51a2bdd3 --- /dev/null +++ b/src/main/target/FLYCOLORF7_AIO/target.h @@ -0,0 +1,153 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME FLYCOLORF7_AIO +#define MANUFACTURER_ID FLCO +#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID +#define FC_TARGET_MCU STM32F7X2 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC15 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC14 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB8 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU_INT_EXTI PC3 +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC3 +#define GYRO_1_SPI_INSTANCE SPI1 + +//seemingly invalid +//#define USE_DUAL_GYRO +// +//#define ACC_2_ALIGN CW0_DEG +//#define GYRO_2_ALIGN CW0_DEG +//#define GYRO_2_CS_PIN PB2 +//#define GYRO_2_EXTI_PIN PC4 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC2 +#define ADC3_DMA_OPT 1 +#define ADC3_DMA_STREAM DMA2_Stream1 //# ADC 3: DMA2 Stream 1 Channel 2 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 450 +#define ADC_INSTANCE ADC3 + +#define ENABLE_DSHOT_DMAR true + +#define PINIO1_PIN PB0 +#define PINIO2_PIN PB9 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 12 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORF7_AIO/target.mk b/src/main/target/FLYCOLORF7_AIO/target.mk new file mode 100644 index 0000000000..ef6d916c8a --- /dev/null +++ b/src/main/target/FLYCOLORF7_AIO/target.mk @@ -0,0 +1,15 @@ +F7X2RE_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: 3f33ae6 + 1 file changed, 24 deletions(-) From bb73806d8f823c500eba1f2862f32efb0ce283f1 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:27:38 -0500 Subject: [PATCH 20/21] [target] add JHEF745 (#1067) removed motor 7 & 8 as no associated timers defined. --- src/main/target/JHEF745/target.c | 44 +++++++++ src/main/target/JHEF745/target.h | 143 ++++++++++++++++++++++++++++++ src/main/target/JHEF745/target.mk | 16 ++++ 3 files changed, 203 insertions(+) create mode 100644 src/main/target/JHEF745/target.c create mode 100644 src/main/target/JHEF745/target.h create mode 100644 src/main/target/JHEF745/target.mk diff --git a/src/main/target/JHEF745/target.c b/src/main/target/JHEF745/target.c new file mode 100644 index 0000000000..5c5f25d485 --- /dev/null +++ b/src/main/target/JHEF745/target.c @@ -0,0 +1,44 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1), // motor 4 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0), // motor 6 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // ppm RX_PPM_PIN + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // led + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEF745/target.h b/src/main/target/JHEF745/target.h new file mode 100644 index 0000000000..84e3bc318c --- /dev/null +++ b/src/main/target/JHEF745/target.h @@ -0,0 +1,143 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME JHEF745 +#define MANUFACTURER_ID JHEF +#define TARGET_BOARD_IDENTIFIER "S745" // generic ID +#define FC_TARGET_MCU STM32F745 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_OSD + +#define USE_LED +#define LED0_PIN PA2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PB3 +#define USE_USB_DETECT + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PE1 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PE4 +#define MPU6000_SPI_INSTANCE SPI4 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PB10 +#define UART3_RX_PIN PB11 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_TX_PIN PE8 +#define UART7_RX_PIN PE7 +#define SERIAL_PORT_COUNT 8 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define MAG_I2C_INSTANCE (I2CDEV_1) +#define BARO_I2C_INSTANCE (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PA4 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 275 + +#define PINIO1_PIN PC0 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 9 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEF745/target.mk b/src/main/target/JHEF745/target.mk new file mode 100644 index 0000000000..927fbb3dba --- /dev/null +++ b/src/main/target/JHEF745/target.mk @@ -0,0 +1,16 @@ +F7X5XG_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/pinio.c \ +drivers/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: 3f33ae6 + 1 file changed, 24 deletions(-) From d13bab41a767dd0b7d93c7e731d07ffe84c001e2 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:30:02 -0500 Subject: [PATCH 21/21] [target] add IFLIGHT_BLITZ_F411RX - CC2500 version (#1068) --- src/main/target/IFLIGHT_BLITZ_F411RX/target.c | 41 ++++++ src/main/target/IFLIGHT_BLITZ_F411RX/target.h | 121 ++++++++++++++++++ .../target/IFLIGHT_BLITZ_F411RX/target.mk | 21 +++ 3 files changed, 183 insertions(+) create mode 100644 src/main/target/IFLIGHT_BLITZ_F411RX/target.c create mode 100644 src/main/target/IFLIGHT_BLITZ_F411RX/target.h create mode 100644 src/main/target/IFLIGHT_BLITZ_F411RX/target.mk diff --git a/src/main/target/IFLIGHT_BLITZ_F411RX/target.c b/src/main/target/IFLIGHT_BLITZ_F411RX/target.c new file mode 100644 index 0000000000..9f2e2fceb2 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F411RX/target.c @@ -0,0 +1,41 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#include +#include "platform.h" +#include "drivers/io.h" +#include "drivers/dma.h" +#include "drivers/timer.h" +#include "drivers/timer_def.h" + +const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { + DEF_TIM(TIM2, CH1, PA0, TIM_USE_MOTOR, 0, 0), // motor 1 + DEF_TIM(TIM2, CH2, PA1, TIM_USE_MOTOR, 0, 0), // motor 2 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // motor 3 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // motor 4 + DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // ppm RX_PPM_PIN; dma 0 assumed, please verify + DEF_TIM(TIM1, CH3, PA10, TIM_USE_LED, 0, 0), // led +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_BLITZ_F411RX/target.h b/src/main/target/IFLIGHT_BLITZ_F411RX/target.h new file mode 100644 index 0000000000..dbb06ee0c3 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F411RX/target.h @@ -0,0 +1,121 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 3f33ae6 + 1 file changed, 24 deletions(-) + +#pragma once + +#define BOARD_NAME IFLIGHT_BLITZ_F411RX +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "S411" // generic ID +#define FC_TARGET_MCU STM32F411 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_MPU6000 +#define USE_ACC_SPI_MPU6000 +#define USE_MAX7456 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC13 +#define LED_STRIP_PIN PA10 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PB10 + +#define ACC_MPU6000_ALIGN CW180_DEG +#define GYRO_MPU6000_ALIGN CW180_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_INSTANCE SPI1 + +#define ACC_BMI270_ALIGN CW180_DEG +#define GYRO_BMI270_ALIGN CW180_DEG +#define BMI270_CS_PIN PA4 +#define BMI270_SPI_INSTANCE SPI1 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define SERIAL_PORT_COUNT 3 + +#define RX_SPI_CS_PIN PA15 +#define RX_SPI_EXTI_PIN PC14 +#define RX_SPI_BIND_PIN PB2 +#define RX_SPI_LED_PIN PC15 +#define RX_CC2500_SPI_TX_EN_PIN PA8 +#define RX_SPI_INSTANCE SPI3 +#define RX_SPI_LED_INVERTED +#define RX_CC2500_SPI_DISABLE_CHIP_DETECTION +#define BINDPLUG_PIN PB2 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PB0 +#define CURRENT_METER_ADC_PIN PB1 +#define ADC1_DMA_OPT 0 +#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 180 + + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +// notice - masks were programmatically generated - please verify last port group for 0xffff or (BIT(2)) + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SPI) +#define DEFAULT_RX_FEATURE FEATURE_RX_SPI + +#define USABLE_TIMER_CHANNEL_COUNT 6 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(9) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_BLITZ_F411RX/target.mk b/src/main/target/IFLIGHT_BLITZ_F411RX/target.mk new file mode 100644 index 0000000000..d411a7c213 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_F411RX/target.mk @@ -0,0 +1,21 @@ +F411_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/light_led.h \ +drivers/light_ws2811strip.c \ +drivers/max7456.c \ +drivers/rx/rx_cc2500.c \ +rx/cc2500_common.c \ +rx/cc2500_frsky_shared.c \ +rx/cc2500_frsky_d.c \ +rx/cc2500_frsky_x.c \ +rx/cc2500_redpine.c \ +rx/cc2500_sfhss.c + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: 3f33ae6 + 1 file changed, 24 deletions(-)