From 39519e967e2bc4d1794f925618f27d6a0196aba2 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Mon, 1 Jun 2026 15:44:40 -0500 Subject: [PATCH 01/10] feat(targets): import 70 H7 targets; update flash defines to BF 4.5 parity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AI Generated feat H7 targets (70 new boards imported from stm32h7-support branch backup): - Import 70 STM32H743/H750/H7xx board targets not yet in master: includes KAKUTEH7*, MAMBAH743*, MATEKH743, DARWINH7DUAL, FOXEERH743*, GEPRC_TAKER_H743*, IFLIGHT_H743_AIO*, JHEH743*, and 55 others. All have target.c timer pin maps, USED_TIMERS, and flash defines sourced from feat/stm32h7-support branch. - STELLARH7DEV: re-enable USE_FLASH_W25M02G (W25M02G NAND flash); #1209 fixed via async erase path; #1228 NAND driver bugs fixed. - Three H7 targets (IFLIGHT_H7_TWING, NEUTRONRCH743AIO, NEUTRONRCH7BT) have NAND chip defines but missing FLASH_CS_PIN/FLASH_SPI_INSTANCE — marked with TODO comments pending hardware research. Flash define updates (BF 4.5 parity, F4/F7/H7 existing targets): - 53 F4/F7 targets: add USE_FLASH_W25Q128FV alongside existing USE_FLASH_M25P16 (W25Q128FV = chip identifier; M25P16 driver handles SPI; W25Q128FV enables QuadSPI optimised path when USE_QUADSPI is defined). Matches BF 4.5 configs. - ALIENFLIGHTNGF7: replace USE_FLASH_M25P16 with USE_FLASH_W25N01G + update FLASH_CS_PIN from symbolic SPI2_NSS_PIN to explicit PB12 per BF configs. - CLRACINGF7: add USE_FLASH_W25Q128FV + USE_FLASH_W25N01G alongside M25P16. - IFLIGHT_F405_TWING, IFLIGHT_F745_AIO, JHEF405PRO: add USE_FLASH_W25N01G. - IFLIGHT_F722_TWING: add USE_FLASH_W25M512 + USE_FLASH_W25N01G. - NBD_INFINITYAIO255: add USE_FLASH_W25N01G (was missing; BF configs has it). - FPVM_BETAFLIGHTF7: add complete flash config (W25Q128FV, CS=PE4, SPI4); fully missing in EF; sourced from BF configs. - PYRODRONEF4PDB: add complete flash config (W25Q128FV, CS=PC13, SPI2). - SPEEDYBEEF7V3: add USE_FLASH_M25P16 (pins were present, driver define commented out with stale "breaks CLI" note; BF configs confirms flash present). - MATEKF722HD: remove dead USE_FLASH_W25M; replace M25P16 with W25Q128FV per BF. - MATEKF722PX: remove dead USE_FLASH_W25M. Testing cruft removed (dead #defines compiling in unused driver code): - CYCLONEF722_PRO: remove USE_FLASH_W25P16 typo. - MAMBAF405_2022B: remove 4 //testing lines (W25M, W25M512, W25Q, dup M25P16). - NBD_INFINITYAIOV2PRO: remove 4 //testing lines. - ZEEZF7: remove USE_FLASH and explicit USE_FLASHFS (auto-derived); remove dead USE_FLASH_W25M, USE_FLASH_W25M512, USE_FLASH_W25Q; remove extra M25P16 (board is NAND-only per BF configs — W25N01G driver, not M25P16). - ZEEZF7V2: remove dead USE_FLASH_W25M. Co-Authored-By: Claude Sonnet 4.6 --- src/main/target/2RAW_THUNDER_H7/target.c | 48 +++++ src/main/target/2RAW_THUNDER_H7/target.h | 164 +++++++++++++++ src/main/target/2RAW_THUNDER_H7/target.mk | 16 ++ src/main/target/ACROSKYH743/target.c | 47 +++++ src/main/target/ACROSKYH743/target.h | 170 ++++++++++++++++ src/main/target/ACROSKYH743/target.mk | 18 ++ src/main/target/AEDROXH7/target.c | 46 +++++ src/main/target/AEDROXH7/target.h | 145 ++++++++++++++ src/main/target/AEDROXH7/target.mk | 16 ++ src/main/target/AEROH7DIGITAL/target.c | 46 +++++ src/main/target/AEROH7DIGITAL/target.h | 128 ++++++++++++ src/main/target/AEROH7DIGITAL/target.mk | 14 ++ src/main/target/AIRBOTF7/target.h | 1 + src/main/target/AIRBRAINH743/target.c | 45 +++++ src/main/target/AIRBRAINH743/target.h | 142 +++++++++++++ src/main/target/AIRBRAINH743/target.mk | 16 ++ src/main/target/AIRF7/target.h | 1 + src/main/target/ALIENFLIGHTNGF7/target.h | 5 +- src/main/target/AOCODAF722MINI/target.h | 1 + src/main/target/AOCODARCH7DUAL/target.c | 49 +++++ src/main/target/AOCODARCH7DUAL/target.h | 173 ++++++++++++++++ src/main/target/AOCODARCH7DUAL/target.mk | 20 ++ src/main/target/APEXF7/target.h | 1 + src/main/target/AXISFLYINGF7/target.h | 1 + src/main/target/AXISFLYINGH743PRO/target.c | 50 +++++ src/main/target/AXISFLYINGH743PRO/target.h | 162 +++++++++++++++ src/main/target/AXISFLYINGH743PRO/target.mk | 16 ++ src/main/target/BETAFLIGHTF4/target.h | 1 + src/main/target/BETAFPVF405/target.h | 1 + src/main/target/BETAFPVF411RX/target.h | 1 + src/main/target/BETAFPVF722/target.h | 1 + src/main/target/BETAFPVH725/target.c | 41 ++++ src/main/target/BETAFPVH725/target.h | 141 +++++++++++++ src/main/target/BETAFPVH725/target.mk | 16 ++ src/main/target/BETAFPVH743/target.c | 47 +++++ src/main/target/BETAFPVH743/target.h | 162 +++++++++++++++ src/main/target/BETAFPVH743/target.mk | 16 ++ src/main/target/BROTHERHOBBYH743/target.c | 46 +++++ src/main/target/BROTHERHOBBYH743/target.h | 163 +++++++++++++++ src/main/target/BROTHERHOBBYH743/target.mk | 16 ++ src/main/target/CHAMP_H743ICM/target.c | 44 +++++ src/main/target/CHAMP_H743ICM/target.h | 131 ++++++++++++ src/main/target/CHAMP_H743ICM/target.mk | 14 ++ src/main/target/CHAMP_H743MPU/target.c | 43 ++++ src/main/target/CHAMP_H743MPU/target.h | 133 +++++++++++++ src/main/target/CHAMP_H743MPU/target.mk | 14 ++ src/main/target/CLRACINGF7/target.h | 4 +- src/main/target/CYCLONEF722_PRO/target.h | 1 - src/main/target/DAKEFPVH743/target.c | 50 +++++ src/main/target/DAKEFPVH743/target.h | 176 +++++++++++++++++ src/main/target/DAKEFPVH743/target.mk | 18 ++ src/main/target/DAKEFPVH743PRO/target.c | 50 +++++ src/main/target/DAKEFPVH743PRO/target.h | 177 +++++++++++++++++ src/main/target/DAKEFPVH743PRO/target.mk | 18 ++ src/main/target/DAKEFPVH743_SLIM/target.c | 49 +++++ src/main/target/DAKEFPVH743_SLIM/target.h | 187 ++++++++++++++++++ src/main/target/DAKEFPVH743_SLIM/target.mk | 18 ++ src/main/target/DALRCF405/target.h | 1 + src/main/target/DALRCF722DUAL/target.h | 1 + src/main/target/DARWINF722HD/target.h | 1 + src/main/target/DARWINH7DUAL/target.c | 47 +++++ src/main/target/DARWINH7DUAL/target.h | 162 +++++++++++++++ src/main/target/DARWINH7DUAL/target.mk | 16 ++ src/main/target/DREAMWORKSH743/target.c | 46 +++++ src/main/target/DREAMWORKSH743/target.h | 167 ++++++++++++++++ src/main/target/DREAMWORKSH743/target.mk | 16 ++ src/main/target/DRONEERH743DUAL/target.c | 48 +++++ src/main/target/DRONEERH743DUAL/target.h | 173 ++++++++++++++++ src/main/target/DRONEERH743DUAL/target.mk | 16 ++ src/main/target/FF_FORTINIF4/target.h | 1 + src/main/target/FF_PIKOF4/target.h | 1 + src/main/target/FF_RACEPIT_MINI/target.h | 1 + src/main/target/FLYCOLORH743/target.c | 45 +++++ src/main/target/FLYCOLORH743/target.h | 154 +++++++++++++++ src/main/target/FLYCOLORH743/target.mk | 16 ++ src/main/target/FLYWOOF411/target.h | 1 + src/main/target/FLYWOOF411V2/target.h | 1 + src/main/target/FLYWOOF745/target.h | 3 +- src/main/target/FLYWOOF7DUAL/target.h | 1 + src/main/target/FLYWOOH743PRO/target.c | 49 +++++ src/main/target/FLYWOOH743PRO/target.h | 162 +++++++++++++++ src/main/target/FLYWOOH743PRO/target.mk | 17 ++ src/main/target/FOXEERF722DUAL/target.h | 1 + src/main/target/FOXEERF745_AIO/target.h | 3 +- src/main/target/FOXEERH743/target.c | 47 +++++ src/main/target/FOXEERH743/target.h | 159 +++++++++++++++ src/main/target/FOXEERH743/target.mk | 18 ++ src/main/target/FOXEERH743V2/target.c | 47 +++++ src/main/target/FOXEERH743V2/target.h | 160 +++++++++++++++ src/main/target/FOXEERH743V2/target.mk | 18 ++ src/main/target/FPVM_BETAFLIGHTF7/target.h | 6 + src/main/target/GEPRCF411_AIO/target.h | 1 + src/main/target/GEPRCF722BT/target.h | 1 + src/main/target/GEPRC_F722_AIO/target.h | 1 + src/main/target/GEPRC_TAKER_H743/target.c | 44 +++++ src/main/target/GEPRC_TAKER_H743/target.h | 173 ++++++++++++++++ src/main/target/GEPRC_TAKER_H743/target.mk | 19 ++ src/main/target/GEPRC_TAKER_H743MINI/target.c | 45 +++++ src/main/target/GEPRC_TAKER_H743MINI/target.h | 154 +++++++++++++++ .../target/GEPRC_TAKER_H743MINI/target.mk | 18 ++ src/main/target/GEPRC_TAKER_H743V2/target.c | 48 +++++ src/main/target/GEPRC_TAKER_H743V2/target.h | 160 +++++++++++++++ src/main/target/GEPRC_TAKER_H743V2/target.mk | 18 ++ src/main/target/GRAVITYF7/target.h | 1 + src/main/target/HAKRCF405/target.h | 1 + src/main/target/HAKRCF722D/target.h | 1 + src/main/target/HAKRCH743/target.c | 49 +++++ src/main/target/HAKRCH743/target.h | 164 +++++++++++++++ src/main/target/HAKRCH743/target.mk | 17 ++ src/main/target/HDZERO_HALO/target.c | 41 ++++ src/main/target/HDZERO_HALO/target.h | 140 +++++++++++++ src/main/target/HDZERO_HALO/target.mk | 14 ++ src/main/target/HGLRCF405/target.h | 1 + src/main/target/HGLRCF411/target.h | 1 + src/main/target/HGLRCF722/target.h | 1 + src/main/target/HGLRC_H743_LITE/target.c | 42 ++++ src/main/target/HGLRC_H743_LITE/target.h | 148 ++++++++++++++ src/main/target/HGLRC_H743_LITE/target.mk | 16 ++ src/main/target/HIFIONRCF7/target.h | 1 + .../target/HOBBYWING_XROTORF7CONV/target.h | 1 + src/main/target/HWH7/target.c | 49 +++++ src/main/target/HWH7/target.h | 167 ++++++++++++++++ src/main/target/HWH7/target.mk | 17 ++ src/main/target/IFLIGHT_BLITZ_H7_PRO/target.c | 53 +++++ src/main/target/IFLIGHT_BLITZ_H7_PRO/target.h | 154 +++++++++++++++ .../target/IFLIGHT_BLITZ_H7_PRO/target.mk | 16 ++ src/main/target/IFLIGHT_F405_TWING/target.h | 1 + src/main/target/IFLIGHT_F722_TWING/target.h | 2 + src/main/target/IFLIGHT_F745_AIO/target.h | 1 + src/main/target/IFLIGHT_H743_AIO/target.c | 42 ++++ src/main/target/IFLIGHT_H743_AIO/target.h | 146 ++++++++++++++ src/main/target/IFLIGHT_H743_AIO/target.mk | 15 ++ src/main/target/IFLIGHT_H743_AIO_V2/target.c | 45 +++++ src/main/target/IFLIGHT_H743_AIO_V2/target.h | 162 +++++++++++++++ src/main/target/IFLIGHT_H743_AIO_V2/target.mk | 16 ++ src/main/target/IFLIGHT_H7_TWING/target.c | 46 +++++ src/main/target/IFLIGHT_H7_TWING/target.h | 153 ++++++++++++++ src/main/target/IFLIGHT_H7_TWING/target.mk | 15 ++ src/main/target/JHEF405PRO/target.h | 1 + src/main/target/JHEF411/target.h | 1 + src/main/target/JHEH743PRO/target.c | 46 +++++ src/main/target/JHEH743PRO/target.h | 167 ++++++++++++++++ src/main/target/JHEH743PRO/target.mk | 16 ++ src/main/target/JHEH743_AIO/target.c | 51 +++++ src/main/target/JHEH743_AIO/target.h | 157 +++++++++++++++ src/main/target/JHEH743_AIO/target.mk | 15 ++ src/main/target/JHEH743_AIO_HD/target.c | 44 +++++ src/main/target/JHEH743_AIO_HD/target.h | 174 ++++++++++++++++ src/main/target/JHEH743_AIO_HD/target.mk | 18 ++ src/main/target/JHEH743_HD/target.c | 44 +++++ src/main/target/JHEH743_HD/target.h | 174 ++++++++++++++++ src/main/target/JHEH743_HD/target.mk | 18 ++ src/main/target/KAKUTEF4/target.h | 1 + src/main/target/KAKUTEF7MINIV3/target.h | 1 + src/main/target/KAKUTEH7/target.c | 45 +++++ src/main/target/KAKUTEH7/target.h | 163 +++++++++++++++ src/main/target/KAKUTEH7/target.mk | 19 ++ src/main/target/KAKUTEH7MINI/target.c | 45 +++++ src/main/target/KAKUTEH7MINI/target.h | 159 +++++++++++++++ src/main/target/KAKUTEH7MINI/target.mk | 19 ++ src/main/target/KAKUTEH7V2/target.c | 45 +++++ src/main/target/KAKUTEH7V2/target.h | 145 ++++++++++++++ src/main/target/KAKUTEH7V2/target.mk | 17 ++ src/main/target/KONEXH743/target.c | 45 +++++ src/main/target/KONEXH743/target.h | 148 ++++++++++++++ src/main/target/KONEXH743/target.mk | 15 ++ src/main/target/LUXH743NDAA/target.c | 51 +++++ src/main/target/LUXH743NDAA/target.h | 183 +++++++++++++++++ src/main/target/LUXH743NDAA/target.mk | 16 ++ src/main/target/LUXMINIF7/target.h | 1 + src/main/target/MAMBAF405US/target.h | 1 + src/main/target/MAMBAF405_2022B/target.h | 4 - src/main/target/MAMBAF722/target.h | 1 + src/main/target/MAMBAH743/target.c | 46 +++++ src/main/target/MAMBAH743/target.h | 170 ++++++++++++++++ src/main/target/MAMBAH743/target.mk | 18 ++ src/main/target/MAMBAH743_2022B/target.c | 46 +++++ src/main/target/MAMBAH743_2022B/target.h | 171 ++++++++++++++++ src/main/target/MAMBAH743_2022B/target.mk | 17 ++ src/main/target/MATEKF722HD/target.h | 4 +- src/main/target/MATEKF722PX/target.h | 1 - src/main/target/MATEKH743/target.c | 48 +++++ src/main/target/MATEKH743/target.h | 171 ++++++++++++++++ src/main/target/MATEKH743/target.mk | 20 ++ src/main/target/MICOAIR743/target.c | 45 +++++ src/main/target/MICOAIR743/target.h | 147 ++++++++++++++ src/main/target/MICOAIR743/target.mk | 16 ++ src/main/target/MICOAIR743V2/target.c | 45 +++++ src/main/target/MICOAIR743V2/target.h | 156 +++++++++++++++ src/main/target/MICOAIR743V2/target.mk | 16 ++ src/main/target/MINI_H743_HD/target.c | 56 ++++++ src/main/target/MINI_H743_HD/target.h | 162 +++++++++++++++ src/main/target/MINI_H743_HD/target.mk | 16 ++ src/main/target/NBD_GALAXYAIO255/target.c | 41 ++++ src/main/target/NBD_GALAXYAIO255/target.h | 153 ++++++++++++++ src/main/target/NBD_GALAXYAIO255/target.mk | 15 ++ src/main/target/NBD_INFINITYAIO255/target.h | 1 + src/main/target/NBD_INFINITYAIOV2PRO/target.h | 5 - src/main/target/NEUTRONRCH743AIO/target.c | 53 +++++ src/main/target/NEUTRONRCH743AIO/target.h | 162 +++++++++++++++ src/main/target/NEUTRONRCH743AIO/target.mk | 15 ++ src/main/target/NEUTRONRCH7BT/target.c | 44 +++++ src/main/target/NEUTRONRCH7BT/target.h | 173 ++++++++++++++++ src/main/target/NEUTRONRCH7BT/target.mk | 16 ++ src/main/target/OMNIBUSF4FW/target.h | 1 + src/main/target/PRINCIPIOTH7PI/target.c | 45 +++++ src/main/target/PRINCIPIOTH7PI/target.h | 159 +++++++++++++++ src/main/target/PRINCIPIOTH7PI/target.mk | 16 ++ src/main/target/PYRODRONEF4PDB/target.h | 6 + src/main/target/RMNOVAH7/target.c | 45 +++++ src/main/target/RMNOVAH7/target.h | 142 +++++++++++++ src/main/target/RMNOVAH7/target.mk | 16 ++ src/main/target/RUSHCORE7/target.h | 1 + src/main/target/SAKURAH743/target.c | 49 +++++ src/main/target/SAKURAH743/target.h | 167 ++++++++++++++++ src/main/target/SAKURAH743/target.mk | 16 ++ src/main/target/SDMODELH7/target.c | 45 +++++ src/main/target/SDMODELH7/target.h | 157 +++++++++++++++ src/main/target/SDMODELH7/target.mk | 18 ++ src/main/target/SDMODELH7V2/target.c | 45 +++++ src/main/target/SDMODELH7V2/target.h | 160 +++++++++++++++ src/main/target/SDMODELH7V2/target.mk | 17 ++ src/main/target/SEQUREH7/target.c | 47 +++++ src/main/target/SEQUREH7/target.h | 147 ++++++++++++++ src/main/target/SEQUREH7/target.mk | 16 ++ src/main/target/SEQUREH7V2/target.c | 45 +++++ src/main/target/SEQUREH7V2/target.h | 145 ++++++++++++++ src/main/target/SEQUREH7V2/target.mk | 16 ++ src/main/target/SIMPLIFLYH7/target.c | 46 +++++ src/main/target/SIMPLIFLYH7/target.h | 136 +++++++++++++ src/main/target/SIMPLIFLYH7/target.mk | 16 ++ src/main/target/SKYSTARSF7HD/target.h | 1 + src/main/target/SKYSTARSF7HDPRO/target.h | 1 + src/main/target/SKYSTARSH7HD/target.c | 47 +++++ src/main/target/SKYSTARSH7HD/target.h | 168 ++++++++++++++++ src/main/target/SKYSTARSH7HD/target.mk | 18 ++ src/main/target/SPEDIXH743/target.c | 48 +++++ src/main/target/SPEDIXH743/target.h | 173 ++++++++++++++++ src/main/target/SPEDIXH743/target.mk | 17 ++ src/main/target/SPEEDYBEEF4/target.h | 1 + src/main/target/SPEEDYBEEF7/target.h | 1 + src/main/target/SPEEDYBEEF7V2/target.h | 1 + src/main/target/SPEEDYBEEF7V3/target.h | 2 +- src/main/target/STELLARH7DEV/target.h | 13 +- src/main/target/STELLARH7V2/target.c | 46 +++++ src/main/target/STELLARH7V2/target.h | 153 ++++++++++++++ src/main/target/STELLARH7V2/target.mk | 15 ++ src/main/target/TALONF7DJIHD/target.h | 1 + src/main/target/TALONF7FUSION/target.h | 1 + src/main/target/TALONF7V2/target.h | 1 + src/main/target/TBS_LUCID_H7/target.c | 48 +++++ src/main/target/TBS_LUCID_H7/target.h | 173 ++++++++++++++++ src/main/target/TBS_LUCID_H7/target.mk | 17 ++ src/main/target/TJRCH743/target.c | 42 ++++ src/main/target/TJRCH743/target.h | 135 +++++++++++++ src/main/target/TJRCH743/target.mk | 16 ++ src/main/target/TMH7/target.c | 46 +++++ src/main/target/TMH7/target.h | 155 +++++++++++++++ src/main/target/TMH7/target.mk | 15 ++ src/main/target/TMOTORH743/target.c | 44 +++++ src/main/target/TMOTORH743/target.h | 175 ++++++++++++++++ src/main/target/TMOTORH743/target.mk | 17 ++ src/main/target/WDIYH743/target.c | 47 +++++ src/main/target/WDIYH743/target.h | 165 ++++++++++++++++ src/main/target/WDIYH743/target.mk | 15 ++ src/main/target/WPLV2/target.c | 47 +++++ src/main/target/WPLV2/target.h | 136 +++++++++++++ src/main/target/WPLV2/target.mk | 15 ++ src/main/target/XILOF4/target.h | 1 + src/main/target/ZEEZF7/target.h | 8 +- src/main/target/ZEEZF7V2/target.h | 1 - src/main/target/ZEUSF4EVO/target.h | 1 + src/main/target/ZEUSF4FR/target.h | 1 + src/main/target/ZEUSF722_AIO/target.h | 1 + src/main/target/ZEX_ATHENA_MINI/target.c | 42 ++++ src/main/target/ZEX_ATHENA_MINI/target.h | 155 +++++++++++++++ src/main/target/ZEX_ATHENA_MINI/target.mk | 16 ++ src/main/target/ZEX_ATHENA_STD_PRO/target.c | 48 +++++ src/main/target/ZEX_ATHENA_STD_PRO/target.h | 159 +++++++++++++++ src/main/target/ZEX_ATHENA_STD_PRO/target.mk | 16 ++ 280 files changed, 15595 insertions(+), 34 deletions(-) create mode 100644 src/main/target/2RAW_THUNDER_H7/target.c create mode 100644 src/main/target/2RAW_THUNDER_H7/target.h create mode 100644 src/main/target/2RAW_THUNDER_H7/target.mk create mode 100644 src/main/target/ACROSKYH743/target.c create mode 100644 src/main/target/ACROSKYH743/target.h create mode 100644 src/main/target/ACROSKYH743/target.mk create mode 100644 src/main/target/AEDROXH7/target.c create mode 100644 src/main/target/AEDROXH7/target.h create mode 100644 src/main/target/AEDROXH7/target.mk create mode 100644 src/main/target/AEROH7DIGITAL/target.c create mode 100644 src/main/target/AEROH7DIGITAL/target.h create mode 100644 src/main/target/AEROH7DIGITAL/target.mk create mode 100644 src/main/target/AIRBRAINH743/target.c create mode 100644 src/main/target/AIRBRAINH743/target.h create mode 100644 src/main/target/AIRBRAINH743/target.mk create mode 100644 src/main/target/AOCODARCH7DUAL/target.c create mode 100644 src/main/target/AOCODARCH7DUAL/target.h create mode 100644 src/main/target/AOCODARCH7DUAL/target.mk create mode 100644 src/main/target/AXISFLYINGH743PRO/target.c create mode 100644 src/main/target/AXISFLYINGH743PRO/target.h create mode 100644 src/main/target/AXISFLYINGH743PRO/target.mk create mode 100644 src/main/target/BETAFPVH725/target.c create mode 100644 src/main/target/BETAFPVH725/target.h create mode 100644 src/main/target/BETAFPVH725/target.mk create mode 100644 src/main/target/BETAFPVH743/target.c create mode 100644 src/main/target/BETAFPVH743/target.h create mode 100644 src/main/target/BETAFPVH743/target.mk create mode 100644 src/main/target/BROTHERHOBBYH743/target.c create mode 100644 src/main/target/BROTHERHOBBYH743/target.h create mode 100644 src/main/target/BROTHERHOBBYH743/target.mk create mode 100644 src/main/target/CHAMP_H743ICM/target.c create mode 100644 src/main/target/CHAMP_H743ICM/target.h create mode 100644 src/main/target/CHAMP_H743ICM/target.mk create mode 100644 src/main/target/CHAMP_H743MPU/target.c create mode 100644 src/main/target/CHAMP_H743MPU/target.h create mode 100644 src/main/target/CHAMP_H743MPU/target.mk create mode 100644 src/main/target/DAKEFPVH743/target.c create mode 100644 src/main/target/DAKEFPVH743/target.h create mode 100644 src/main/target/DAKEFPVH743/target.mk create mode 100644 src/main/target/DAKEFPVH743PRO/target.c create mode 100644 src/main/target/DAKEFPVH743PRO/target.h create mode 100644 src/main/target/DAKEFPVH743PRO/target.mk create mode 100644 src/main/target/DAKEFPVH743_SLIM/target.c create mode 100644 src/main/target/DAKEFPVH743_SLIM/target.h create mode 100644 src/main/target/DAKEFPVH743_SLIM/target.mk create mode 100644 src/main/target/DARWINH7DUAL/target.c create mode 100644 src/main/target/DARWINH7DUAL/target.h create mode 100644 src/main/target/DARWINH7DUAL/target.mk create mode 100644 src/main/target/DREAMWORKSH743/target.c create mode 100644 src/main/target/DREAMWORKSH743/target.h create mode 100644 src/main/target/DREAMWORKSH743/target.mk create mode 100644 src/main/target/DRONEERH743DUAL/target.c create mode 100644 src/main/target/DRONEERH743DUAL/target.h create mode 100644 src/main/target/DRONEERH743DUAL/target.mk create mode 100644 src/main/target/FLYCOLORH743/target.c create mode 100644 src/main/target/FLYCOLORH743/target.h create mode 100644 src/main/target/FLYCOLORH743/target.mk create mode 100644 src/main/target/FLYWOOH743PRO/target.c create mode 100644 src/main/target/FLYWOOH743PRO/target.h create mode 100644 src/main/target/FLYWOOH743PRO/target.mk create mode 100644 src/main/target/FOXEERH743/target.c create mode 100644 src/main/target/FOXEERH743/target.h create mode 100644 src/main/target/FOXEERH743/target.mk create mode 100644 src/main/target/FOXEERH743V2/target.c create mode 100644 src/main/target/FOXEERH743V2/target.h create mode 100644 src/main/target/FOXEERH743V2/target.mk create mode 100644 src/main/target/GEPRC_TAKER_H743/target.c create mode 100644 src/main/target/GEPRC_TAKER_H743/target.h create mode 100644 src/main/target/GEPRC_TAKER_H743/target.mk create mode 100644 src/main/target/GEPRC_TAKER_H743MINI/target.c create mode 100644 src/main/target/GEPRC_TAKER_H743MINI/target.h create mode 100644 src/main/target/GEPRC_TAKER_H743MINI/target.mk create mode 100644 src/main/target/GEPRC_TAKER_H743V2/target.c create mode 100644 src/main/target/GEPRC_TAKER_H743V2/target.h create mode 100644 src/main/target/GEPRC_TAKER_H743V2/target.mk create mode 100644 src/main/target/HAKRCH743/target.c create mode 100644 src/main/target/HAKRCH743/target.h create mode 100644 src/main/target/HAKRCH743/target.mk create mode 100644 src/main/target/HDZERO_HALO/target.c create mode 100644 src/main/target/HDZERO_HALO/target.h create mode 100644 src/main/target/HDZERO_HALO/target.mk create mode 100644 src/main/target/HGLRC_H743_LITE/target.c create mode 100644 src/main/target/HGLRC_H743_LITE/target.h create mode 100644 src/main/target/HGLRC_H743_LITE/target.mk create mode 100644 src/main/target/HWH7/target.c create mode 100644 src/main/target/HWH7/target.h create mode 100644 src/main/target/HWH7/target.mk create mode 100644 src/main/target/IFLIGHT_BLITZ_H7_PRO/target.c create mode 100644 src/main/target/IFLIGHT_BLITZ_H7_PRO/target.h create mode 100644 src/main/target/IFLIGHT_BLITZ_H7_PRO/target.mk create mode 100644 src/main/target/IFLIGHT_H743_AIO/target.c create mode 100644 src/main/target/IFLIGHT_H743_AIO/target.h create mode 100644 src/main/target/IFLIGHT_H743_AIO/target.mk create mode 100644 src/main/target/IFLIGHT_H743_AIO_V2/target.c create mode 100644 src/main/target/IFLIGHT_H743_AIO_V2/target.h create mode 100644 src/main/target/IFLIGHT_H743_AIO_V2/target.mk create mode 100644 src/main/target/IFLIGHT_H7_TWING/target.c create mode 100644 src/main/target/IFLIGHT_H7_TWING/target.h create mode 100644 src/main/target/IFLIGHT_H7_TWING/target.mk create mode 100644 src/main/target/JHEH743PRO/target.c create mode 100644 src/main/target/JHEH743PRO/target.h create mode 100644 src/main/target/JHEH743PRO/target.mk create mode 100644 src/main/target/JHEH743_AIO/target.c create mode 100644 src/main/target/JHEH743_AIO/target.h create mode 100644 src/main/target/JHEH743_AIO/target.mk create mode 100644 src/main/target/JHEH743_AIO_HD/target.c create mode 100644 src/main/target/JHEH743_AIO_HD/target.h create mode 100644 src/main/target/JHEH743_AIO_HD/target.mk create mode 100644 src/main/target/JHEH743_HD/target.c create mode 100644 src/main/target/JHEH743_HD/target.h create mode 100644 src/main/target/JHEH743_HD/target.mk create mode 100644 src/main/target/KAKUTEH7/target.c create mode 100644 src/main/target/KAKUTEH7/target.h create mode 100644 src/main/target/KAKUTEH7/target.mk create mode 100644 src/main/target/KAKUTEH7MINI/target.c create mode 100644 src/main/target/KAKUTEH7MINI/target.h create mode 100644 src/main/target/KAKUTEH7MINI/target.mk create mode 100644 src/main/target/KAKUTEH7V2/target.c create mode 100644 src/main/target/KAKUTEH7V2/target.h create mode 100644 src/main/target/KAKUTEH7V2/target.mk create mode 100644 src/main/target/KONEXH743/target.c create mode 100644 src/main/target/KONEXH743/target.h create mode 100644 src/main/target/KONEXH743/target.mk create mode 100644 src/main/target/LUXH743NDAA/target.c create mode 100644 src/main/target/LUXH743NDAA/target.h create mode 100644 src/main/target/LUXH743NDAA/target.mk create mode 100644 src/main/target/MAMBAH743/target.c create mode 100644 src/main/target/MAMBAH743/target.h create mode 100644 src/main/target/MAMBAH743/target.mk create mode 100644 src/main/target/MAMBAH743_2022B/target.c create mode 100644 src/main/target/MAMBAH743_2022B/target.h create mode 100644 src/main/target/MAMBAH743_2022B/target.mk create mode 100644 src/main/target/MATEKH743/target.c create mode 100644 src/main/target/MATEKH743/target.h create mode 100644 src/main/target/MATEKH743/target.mk create mode 100644 src/main/target/MICOAIR743/target.c create mode 100644 src/main/target/MICOAIR743/target.h create mode 100644 src/main/target/MICOAIR743/target.mk create mode 100644 src/main/target/MICOAIR743V2/target.c create mode 100644 src/main/target/MICOAIR743V2/target.h create mode 100644 src/main/target/MICOAIR743V2/target.mk create mode 100644 src/main/target/MINI_H743_HD/target.c create mode 100644 src/main/target/MINI_H743_HD/target.h create mode 100644 src/main/target/MINI_H743_HD/target.mk create mode 100644 src/main/target/NBD_GALAXYAIO255/target.c create mode 100644 src/main/target/NBD_GALAXYAIO255/target.h create mode 100644 src/main/target/NBD_GALAXYAIO255/target.mk create mode 100644 src/main/target/NEUTRONRCH743AIO/target.c create mode 100644 src/main/target/NEUTRONRCH743AIO/target.h create mode 100644 src/main/target/NEUTRONRCH743AIO/target.mk create mode 100644 src/main/target/NEUTRONRCH7BT/target.c create mode 100644 src/main/target/NEUTRONRCH7BT/target.h create mode 100644 src/main/target/NEUTRONRCH7BT/target.mk create mode 100644 src/main/target/PRINCIPIOTH7PI/target.c create mode 100644 src/main/target/PRINCIPIOTH7PI/target.h create mode 100644 src/main/target/PRINCIPIOTH7PI/target.mk create mode 100644 src/main/target/RMNOVAH7/target.c create mode 100644 src/main/target/RMNOVAH7/target.h create mode 100644 src/main/target/RMNOVAH7/target.mk create mode 100644 src/main/target/SAKURAH743/target.c create mode 100644 src/main/target/SAKURAH743/target.h create mode 100644 src/main/target/SAKURAH743/target.mk create mode 100644 src/main/target/SDMODELH7/target.c create mode 100644 src/main/target/SDMODELH7/target.h create mode 100644 src/main/target/SDMODELH7/target.mk create mode 100644 src/main/target/SDMODELH7V2/target.c create mode 100644 src/main/target/SDMODELH7V2/target.h create mode 100644 src/main/target/SDMODELH7V2/target.mk create mode 100644 src/main/target/SEQUREH7/target.c create mode 100644 src/main/target/SEQUREH7/target.h create mode 100644 src/main/target/SEQUREH7/target.mk create mode 100644 src/main/target/SEQUREH7V2/target.c create mode 100644 src/main/target/SEQUREH7V2/target.h create mode 100644 src/main/target/SEQUREH7V2/target.mk create mode 100644 src/main/target/SIMPLIFLYH7/target.c create mode 100644 src/main/target/SIMPLIFLYH7/target.h create mode 100644 src/main/target/SIMPLIFLYH7/target.mk create mode 100644 src/main/target/SKYSTARSH7HD/target.c create mode 100644 src/main/target/SKYSTARSH7HD/target.h create mode 100644 src/main/target/SKYSTARSH7HD/target.mk create mode 100644 src/main/target/SPEDIXH743/target.c create mode 100644 src/main/target/SPEDIXH743/target.h create mode 100644 src/main/target/SPEDIXH743/target.mk create mode 100644 src/main/target/STELLARH7V2/target.c create mode 100644 src/main/target/STELLARH7V2/target.h create mode 100644 src/main/target/STELLARH7V2/target.mk create mode 100644 src/main/target/TBS_LUCID_H7/target.c create mode 100644 src/main/target/TBS_LUCID_H7/target.h create mode 100644 src/main/target/TBS_LUCID_H7/target.mk create mode 100644 src/main/target/TJRCH743/target.c create mode 100644 src/main/target/TJRCH743/target.h create mode 100644 src/main/target/TJRCH743/target.mk create mode 100644 src/main/target/TMH7/target.c create mode 100644 src/main/target/TMH7/target.h create mode 100644 src/main/target/TMH7/target.mk create mode 100644 src/main/target/TMOTORH743/target.c create mode 100644 src/main/target/TMOTORH743/target.h create mode 100644 src/main/target/TMOTORH743/target.mk create mode 100644 src/main/target/WDIYH743/target.c create mode 100644 src/main/target/WDIYH743/target.h create mode 100644 src/main/target/WDIYH743/target.mk create mode 100644 src/main/target/WPLV2/target.c create mode 100644 src/main/target/WPLV2/target.h create mode 100644 src/main/target/WPLV2/target.mk create mode 100644 src/main/target/ZEX_ATHENA_MINI/target.c create mode 100644 src/main/target/ZEX_ATHENA_MINI/target.h create mode 100644 src/main/target/ZEX_ATHENA_MINI/target.mk create mode 100644 src/main/target/ZEX_ATHENA_STD_PRO/target.c create mode 100644 src/main/target/ZEX_ATHENA_STD_PRO/target.h create mode 100644 src/main/target/ZEX_ATHENA_STD_PRO/target.mk diff --git a/src/main/target/2RAW_THUNDER_H7/target.c b/src/main/target/2RAW_THUNDER_H7/target.c new file mode 100644 index 0000000000..67c8508b6f --- /dev/null +++ b/src/main/target/2RAW_THUNDER_H7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 0, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 0, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/2RAW_THUNDER_H7/target.h b/src/main/target/2RAW_THUNDER_H7/target.h new file mode 100644 index 0000000000..fd9e3006dc --- /dev/null +++ b/src/main/target/2RAW_THUNDER_H7/target.h @@ -0,0 +1,164 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME 2RAW_THUNDER_H7 +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 +#define USE_SDCARD +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_SDCARD_SPI + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED1_PIN PE3 +#define LED2_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC9 +#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 PD7 +#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 PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#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 PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_CS_PIN PC13 +#define GYRO_2_EXTI_PIN PC14 +#define GYRO_2_SPI_BUS SPIDEV_1 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +#define SDCARD_SPI_CS_PIN PA15 +#define SDCARD_SPI_INSTANCE SPI3 +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 210 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define PINIO1_PIN PD10 +#define PINIO2_PIN PD11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/2RAW_THUNDER_H7/target.mk b/src/main/target/2RAW_THUNDER_H7/target.mk new file mode 100644 index 0000000000..a349965468 --- /dev/null +++ b/src/main/target/2RAW_THUNDER_H7/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/ACROSKYH743/target.c b/src/main/target/ACROSKYH743/target.c new file mode 100644 index 0000000000..8538847455 --- /dev/null +++ b/src/main/target/ACROSKYH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 5 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 6 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 7 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 3 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 4 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ACROSKYH743/target.h b/src/main/target/ACROSKYH743/target.h new file mode 100644 index 0000000000..40cd79294b --- /dev/null +++ b/src/main/target/ACROSKYH743/target.h @@ -0,0 +1,170 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME ACROSKYH743 +#define MANUFACTURER_ID ASKY +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#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 PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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 PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART5 +#define UART5_TX_PIN PB6 +#define UART5_RX_PIN PB5 +#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 I2C1_SCL PB8 +#define I2C1_SDA PB9 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (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 PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 290 + +#define PINIO1_PIN PC5 +#define PINIO2_PIN PC2 +#define PINIO3_PIN PD11 +#define PINIO1_BOX 40 +#define PINIO1_CONFIG 129 +#define PINIO2_BOX 41 +#define PINIO2_CONFIG 129 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ACROSKYH743/target.mk b/src/main/target/ACROSKYH743/target.mk new file mode 100644 index 0000000000..e73b8e28ca --- /dev/null +++ b/src/main/target/ACROSKYH743/target.mk @@ -0,0 +1,18 @@ +H743_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/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/AEDROXH7/target.c b/src/main/target/AEDROXH7/target.c new file mode 100644 index 0000000000..057cba99e8 --- /dev/null +++ b/src/main/target/AEDROXH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, CH2, PC7, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM2, CH1, PA5, TIM_USE_LED, 0, 10, NONE), // led strip + DEF_TIM(TIM4, CH2, PD13, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM3, CH2, PA7, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AEDROXH7/target.h b/src/main/target/AEDROXH7/target.h new file mode 100644 index 0000000000..c743337d89 --- /dev/null +++ b/src/main/target/AEDROXH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME AEDROXH7 +#define MANUFACTURER_ID AEDR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_FLASH_M25P16 +#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_LED +#define LED0_PIN PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA5 +#define USE_BEEPER +#define BEEPER_PIN PA7 +#define BEEPER_INVERTED + +#define USE_SPI +#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 MPU_INT_EXTI PC4 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_BUS SPIDEV_2 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART7 +#define UART7_RX_PIN PE7 +#define USE_UART8 +#define UART8_TX_PIN PE1 +#define UART8_RX_PIN PE0 +#define GPS_UART SERIAL_PORT_USART2 +#define SERIALRX_UART SERIAL_PORT_USART3 +#define ESC_SENSOR_UART SERIAL_PORT_USART7 +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART8 +#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 USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (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 USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define USE_ESCSERIAL + +#define PINIO1_PIN PA2 +#define PINIO2_PIN PA3 +#define PINIO3_PIN PB12 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 +#define PINIO3_BOX 42 +#define PINIO3_CONFIG 129 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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/AEDROXH7/target.mk b/src/main/target/AEDROXH7/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/AEDROXH7/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/AEROH7DIGITAL/target.c b/src/main/target/AEROH7DIGITAL/target.c new file mode 100644 index 0000000000..f7267c5aa5 --- /dev/null +++ b/src/main/target/AEROH7DIGITAL/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH4, PD15, TIM_USE_MOTOR, 0, 0, NONE), // motor 8; dma -1 in config (input only) + DEF_TIM(TIM3, CH1, PC6, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM3, CH2, PC7, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AEROH7DIGITAL/target.h b/src/main/target/AEROH7DIGITAL/target.h new file mode 100644 index 0000000000..567df21735 --- /dev/null +++ b/src/main/target/AEROH7DIGITAL/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME AEROH7DIGITAL +#define MANUFACTURER_ID AERO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_SDCARD + +#define USE_VCP + +#define USE_LED +#define LED0_PIN PD8 // Blue +#define LED1_PIN PB15 // Green +#define LED2_PIN PB14 // Amber + +#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 MPU_INT_EXTI PB1 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PB0 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#define USE_UART2 +#define UART2_TX_PIN PA2 +#define UART2_RX_PIN PA3 +#define USE_UART3 +#define UART3_RX_PIN PD9 // ESC TELEMETRY +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART5 +#define UART5_TX_PIN PB13 +#define UART5_RX_PIN PB12 +#define USE_UART7 +#define UART7_RX_PIN PE7 // SBUS DJI +#define USE_UART8 +#define UART8_TX_PIN PE1 +#define UART8_RX_PIN PE0 +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART2 +#define ESC_SENSOR_UART SERIAL_PORT_USART3 +#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_4 +#define I2C_DEVICE_4 (I2CDEV_4) +#define MAG_I2C_INSTANCE I2CDEV_4 +#define I2C4_SCL PB6 +#define I2C4_SDA PB7 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#define USE_ADC +#define VBAT_ADC_PIN PA0 +#define CURRENT_METER_ADC_PIN PA1 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PE2 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AEROH7DIGITAL/target.mk b/src/main/target/AEROH7DIGITAL/target.mk new file mode 100644 index 0000000000..fc19303ccc --- /dev/null +++ b/src/main/target/AEROH7DIGITAL/target.mk @@ -0,0 +1,14 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/AIRBOTF7/target.h b/src/main/target/AIRBOTF7/target.h index f1ad02cfde..3312bfd1c4 100755 --- a/src/main/target/AIRBOTF7/target.h +++ b/src/main/target/AIRBOTF7/target.h @@ -87,6 +87,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA3 #define FLASH_SPI_INSTANCE SPI1 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/AIRBRAINH743/target.c b/src/main/target/AIRBRAINH743/target.c new file mode 100644 index 0000000000..06a331ccb4 --- /dev/null +++ b/src/main/target/AIRBRAINH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AIRBRAINH743/target.h b/src/main/target/AIRBRAINH743/target.h new file mode 100644 index 0000000000..599809034f --- /dev/null +++ b/src/main/target/AIRBRAINH743/target.h @@ -0,0 +1,142 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME AIRBRAINH743 +#define MANUFACTURER_ID GEUP +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_DPS310 //DPS368 +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_MAG + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI + +#define USE_LED +#define LED0_PIN PB15 // BLUE +#define LED1_PIN PD11 // GREEN +#define LED2_PIN PD15 // RED +#define LED_STRIP_PIN PA2 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 // IMU +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PA7 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PD3 // FLASH +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PE12 // AUX SPI +#define SPI3_MISO_PIN PE5 +#define SPI3_MOSI_PIN PE6 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC6 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PA3 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#define USE_UART5 +#define UART5_TX_PIN PB13 +#define UART5_RX_PIN PB12 +#define USE_UART7 +#define UART7_TX_PIN PE8 //NC +#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 PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PD4 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define USE_ADC +#define VBAT_ADC_PIN PC4 +#define CURRENT_METER_ADC_PIN PC5 +#define ADC1_DMA_OPT 9 +#define ADC2_DMA_OPT 10 +#define ADC3_DMA_OPT 11 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC2_DMA_STREAM DMA2_Stream2 // ADC2 opt10 +#define ADC3_DMA_STREAM DMA2_Stream3 // ADC3 opt11 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 143 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PB3 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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/AIRBRAINH743/target.mk b/src/main/target/AIRBRAINH743/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/AIRBRAINH743/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/AIRF7/target.h b/src/main/target/AIRF7/target.h index 87fc991634..a23e81ff64 100644 --- a/src/main/target/AIRF7/target.h +++ b/src/main/target/AIRF7/target.h @@ -85,6 +85,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/ALIENFLIGHTNGF7/target.h b/src/main/target/ALIENFLIGHTNGF7/target.h index 92d75659a6..120f1bd1d7 100644 --- a/src/main/target/ALIENFLIGHTNGF7/target.h +++ b/src/main/target/ALIENFLIGHTNGF7/target.h @@ -110,11 +110,12 @@ // Performance logging for SD card operations: // #define AFATFS_USE_INTROSPECTIVE_LOGGING -#define FLASH_CS_PIN SPI2_NSS_PIN +#define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 #define USE_FLASHFS -#define USE_FLASH_M25P16 +#define USE_FLASH_W25N01G +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_VCP diff --git a/src/main/target/AOCODAF722MINI/target.h b/src/main/target/AOCODAF722MINI/target.h index eba6f56a49..e211103c23 100644 --- a/src/main/target/AOCODAF722MINI/target.h +++ b/src/main/target/AOCODAF722MINI/target.h @@ -70,6 +70,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_SPI_INSTANCE SPI3 #define FLASH_CS_PIN PD2 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/AOCODARCH7DUAL/target.c b/src/main/target/AOCODARCH7DUAL/target.c new file mode 100644 index 0000000000..93288ed486 --- /dev/null +++ b/src/main/target/AOCODARCH7DUAL/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, CH3, PA10, TIM_USE_PPM, 0, 0, NONE), // ppm + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 8 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 7 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 6 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 5 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_ANY, 0, 12, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH4, PD15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1 + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCH7DUAL/target.h b/src/main/target/AOCODARCH7DUAL/target.h new file mode 100644 index 0000000000..dbe50e943c --- /dev/null +++ b/src/main/target/AOCODARCH7DUAL/target.h @@ -0,0 +1,173 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME AOCODARCH7DUAL +#define MANUFACTURER_ID SJET +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#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_BMP280 +#define USE_BARO_MS5611 +#define USE_BARO_DPS310 +#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 PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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_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 PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW180_DEG +#define GYRO_2_ALIGN CW180_DEG +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PD3 +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 500 + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PC7 + +#define PINIO1_PIN PD10 +#define PINIO2_PIN PD11 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 39 +#define PINIO2_BOX 40 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AOCODARCH7DUAL/target.mk b/src/main/target/AOCODARCH7DUAL/target.mk new file mode 100644 index 0000000000..09866c3948 --- /dev/null +++ b/src/main/target/AOCODARCH7DUAL/target.mk @@ -0,0 +1,20 @@ +H743_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/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/APEXF7/target.h b/src/main/target/APEXF7/target.h index d84781c7ee..96aed7ef9c 100644 --- a/src/main/target/APEXF7/target.h +++ b/src/main/target/APEXF7/target.h @@ -100,6 +100,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA3 #define FLASH_SPI_INSTANCE SPI1 diff --git a/src/main/target/AXISFLYINGF7/target.h b/src/main/target/AXISFLYINGF7/target.h index 53c09617a0..3c1abcc481 100644 --- a/src/main/target/AXISFLYINGF7/target.h +++ b/src/main/target/AXISFLYINGF7/target.h @@ -92,6 +92,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PC4 #define FLASH_SPI_INSTANCE SPI1 diff --git a/src/main/target/AXISFLYINGH743PRO/target.c b/src/main/target/AXISFLYINGH743PRO/target.c new file mode 100644 index 0000000000..c238e725c7 --- /dev/null +++ b/src/main/target/AXISFLYINGH743PRO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, 0, NONE), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM2, CH1, PA0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM2, CH2, PA1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PD13, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM3, CH3, PB0, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM3, CH4, PB1, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AXISFLYINGH743PRO/target.h b/src/main/target/AXISFLYINGH743PRO/target.h new file mode 100644 index 0000000000..8500a831f8 --- /dev/null +++ b/src/main/target/AXISFLYINGH743PRO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME AXISFLYINGH743PRO +#define MANUFACTURER_ID AXFL +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_PY25Q128HA +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_MAX7456 +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PD3 +#define LED_STRIP_PIN PE5 +#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 PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 +#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 ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PC4 +#define GYRO_1_EXTI_PIN PA4 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE15 +#define GYRO_2_EXTI_PIN PE11 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PC10 +#define UART4_RX_PIN PC11 +#define USE_UART5 +#define UART5_RX_PIN PD2 // ESC TELEMETRY +#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 GPS_UART SERIAL_PORT_USART8 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART1 +#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 I2C1_SCL PB8 +#define I2C1_SDA PB9 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PD7 +#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 ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PE2 +#define PINIO2_PIN PA8 +#define PINIO1_BOX 40 +#define PINIO1_CONFIG 129 +#define PINIO2_BOX 41 +#define PINIO2_CONFIG 1 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/AXISFLYINGH743PRO/target.mk b/src/main/target/AXISFLYINGH743PRO/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/AXISFLYINGH743PRO/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/BETAFLIGHTF4/target.h b/src/main/target/BETAFLIGHTF4/target.h index ea314331f0..1284c2540e 100644 --- a/src/main/target/BETAFLIGHTF4/target.h +++ b/src/main/target/BETAFLIGHTF4/target.h @@ -78,6 +78,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define USE_VCP #define USE_USB_DETECT diff --git a/src/main/target/BETAFPVF405/target.h b/src/main/target/BETAFPVF405/target.h index fb4a6999a3..751d99b428 100644 --- a/src/main/target/BETAFPVF405/target.h +++ b/src/main/target/BETAFPVF405/target.h @@ -146,6 +146,7 @@ #define FLASH_SPI_INSTANCE SPI2 #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL diff --git a/src/main/target/BETAFPVF411RX/target.h b/src/main/target/BETAFPVF411RX/target.h index 8dbb14335d..8ef1bc83ec 100644 --- a/src/main/target/BETAFPVF411RX/target.h +++ b/src/main/target/BETAFPVF411RX/target.h @@ -129,6 +129,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA8 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/BETAFPVF722/target.h b/src/main/target/BETAFPVF722/target.h index 82e122cf48..28cb3ddb2c 100644 --- a/src/main/target/BETAFPVF722/target.h +++ b/src/main/target/BETAFPVF722/target.h @@ -78,6 +78,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/BETAFPVH725/target.c b/src/main/target/BETAFPVH725/target.c new file mode 100644 index 0000000000..edcdeb3820 --- /dev/null +++ b/src/main/target/BETAFPVH725/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, 0, 1, NONE), // motor 1 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 2, NONE), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 4, NONE), // motor 4 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BETAFPVH725/target.h b/src/main/target/BETAFPVH725/target.h new file mode 100644 index 0000000000..c805618f6e --- /dev/null +++ b/src/main/target/BETAFPVH725/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME BETAFPVH725 +#define MANUFACTURER_ID BEFH +#define TARGET_BOARD_IDENTIFIER "SH72" // generic ID +#define FC_TARGET_MCU STM32H725 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSK320X // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PC5 +#define LED1_PIN PB2 +#define LED_STRIP_PIN PB10 +#define USE_BEEPER +#define BEEPER_PIN PC9 +#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 PC4 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#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_UART7 +#define UART7_TX_PIN PA15 +#define UART7_RX_PIN PA8 +#define ESC_SENSOR_UART SERIAL_PORT_USART1 +#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 BARO_I2C_INSTANCE I2CDEV_1 +#define MAG_I2C_INSTANCE I2CDEV_1 +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +#define FLASH_CS_PIN PB6 +#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 ADC3_DMA_OPT 10 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 750 +#define ADC_INSTANCE ADC3 + +#define PINIO1_PIN PC15 +#define PINIO1_BOX 40 +#define PINIO1_CONFIG 1 + +#define TARGET_IO_PORTA 0xffff +#define TARGET_IO_PORTB 0xffff +#define TARGET_IO_PORTC 0xffff +#define TARGET_IO_PORTD (BIT(2)) +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(4) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BETAFPVH725/target.mk b/src/main/target/BETAFPVH725/target.mk new file mode 100644 index 0000000000..352261f5f7 --- /dev/null +++ b/src/main/target/BETAFPVH725/target.mk @@ -0,0 +1,16 @@ +H723_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/BETAFPVH743/target.c b/src/main/target/BETAFPVH743/target.c new file mode 100644 index 0000000000..a4bcde853a --- /dev/null +++ b/src/main/target/BETAFPVH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0, NONE), // ppm + DEF_TIM(TIM15, CH1, PE5, TIM_USE_ANY, 0, 8, NONE), // cam ctrl + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 1 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 2, NONE), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 3, NONE), // motor 6 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 4, NONE), // motor 7 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 5, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_ANY, 0, 11, NONE), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BETAFPVH743/target.h b/src/main/target/BETAFPVH743/target.h new file mode 100644 index 0000000000..b883f5b9c2 --- /dev/null +++ b/src/main/target/BETAFPVH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME BETAFPVH743 +#define MANUFACTURER_ID BEFH +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_BARO_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 PE2 +#define LED1_PIN PE3 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB3 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE5 + +#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 PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#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_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW180_DEG +#define GYRO_2_ALIGN CW180_DEG +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 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 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 PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 1 +#define ADC2_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA1_Stream1 // ADC1 opt1 +#define ADC2_DMA_STREAM DMA2_Stream1 // ADC2 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 350 + +#define PINIO1_PIN PD9 +#define PINIO2_PIN PD11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BETAFPVH743/target.mk b/src/main/target/BETAFPVH743/target.mk new file mode 100644 index 0000000000..c0f977c721 --- /dev/null +++ b/src/main/target/BETAFPVH743/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/BROTHERHOBBYH743/target.c b/src/main/target/BROTHERHOBBYH743/target.c new file mode 100644 index 0000000000..19e2c2fe2d --- /dev/null +++ b/src/main/target/BROTHERHOBBYH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BROTHERHOBBYH743/target.h b/src/main/target/BROTHERHOBBYH743/target.h new file mode 100644 index 0000000000..0c29da4299 --- /dev/null +++ b/src/main/target/BROTHERHOBBYH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME BROTHERHOBBYH743 +#define MANUFACTURER_ID BROT +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSK320X // not supported in EmuFlight +#define USE_MAX7456 +#define USE_SDCARD +#define USE_BARO +#define USE_BARO_DPS310 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE9 +#define LED1_PIN PA7 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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 PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 210 + +#define PINIO1_PIN PD10 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_PIN PD11 +#define PINIO2_CONFIG 129 +#define PINIO2_BOX 41 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/BROTHERHOBBYH743/target.mk b/src/main/target/BROTHERHOBBYH743/target.mk new file mode 100644 index 0000000000..a349965468 --- /dev/null +++ b/src/main/target/BROTHERHOBBYH743/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/CHAMP_H743ICM/target.c b/src/main/target/CHAMP_H743ICM/target.c new file mode 100644 index 0000000000..fe0d08be63 --- /dev/null +++ b/src/main/target/CHAMP_H743ICM/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 4, NONE), // led strip + DEF_TIM(TIM15, CH1, PE5, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CHAMP_H743ICM/target.h b/src/main/target/CHAMP_H743ICM/target.h new file mode 100644 index 0000000000..201613060d --- /dev/null +++ b/src/main/target/CHAMP_H743ICM/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME CHAMP_H743ICM +#define MANUFACTURER_ID OXBT +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_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 PE3 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE5 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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 PB2 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PC15 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#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_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 MSP_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART6 +#define SERIAL_PORT_COUNT 6 + + +#define FLASH_CS_PIN PD4 +#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 ADC1_DMA_OPT 5 +#define ADC3_DMA_OPT 6 +#define ADC1_DMA_STREAM DMA1_Stream5 // ADC1 opt5 +#define ADC3_DMA_STREAM DMA1_Stream6 // ADC3 opt6 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_NONE +#define DEFAULT_CURRENT_METER_SCALE 200 +#define ADC_INSTANCE ADC1 + +#define PINIO1_PIN PD13 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CHAMP_H743ICM/target.mk b/src/main/target/CHAMP_H743ICM/target.mk new file mode 100644 index 0000000000..dc3b02a96d --- /dev/null +++ b/src/main/target/CHAMP_H743ICM/target.mk @@ -0,0 +1,14 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/CHAMP_H743MPU/target.c b/src/main/target/CHAMP_H743MPU/target.c new file mode 100644 index 0000000000..9061826c68 --- /dev/null +++ b/src/main/target/CHAMP_H743MPU/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 4, NONE), // led strip + DEF_TIM(TIM15, CH1, PE5, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CHAMP_H743MPU/target.h b/src/main/target/CHAMP_H743MPU/target.h new file mode 100644 index 0000000000..08575233e3 --- /dev/null +++ b/src/main/target/CHAMP_H743MPU/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME CHAMP_H743MPU +#define MANUFACTURER_ID OXBT +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_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 PE3 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE5 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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 PB2 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PC15 +#define MPU6000_SPI_BUS SPIDEV_1 + +#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_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 MSP_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART6 +#define SERIAL_PORT_COUNT 6 + + +#define FLASH_CS_PIN PD4 +#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 ADC1_DMA_OPT 5 +#define ADC3_DMA_OPT 6 +#define ADC1_DMA_STREAM DMA1_Stream5 // ADC1 opt5 +#define ADC3_DMA_STREAM DMA1_Stream6 // ADC3 opt6 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_NONE +#define DEFAULT_CURRENT_METER_SCALE 200 +#define ADC_INSTANCE ADC1 + +#define PINIO1_PIN PD13 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/CHAMP_H743MPU/target.mk b/src/main/target/CHAMP_H743MPU/target.mk new file mode 100644 index 0000000000..2b2c9aafcd --- /dev/null +++ b/src/main/target/CHAMP_H743MPU/target.mk @@ -0,0 +1,14 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/CLRACINGF7/target.h b/src/main/target/CLRACINGF7/target.h index 7c308b56ab..25db9dafc1 100644 --- a/src/main/target/CLRACINGF7/target.h +++ b/src/main/target/CLRACINGF7/target.h @@ -76,7 +76,9 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS -#define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define USE_FLASH_W25N01G #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/CYCLONEF722_PRO/target.h b/src/main/target/CYCLONEF722_PRO/target.h index dc8e019a4d..3456cca2d8 100644 --- a/src/main/target/CYCLONEF722_PRO/target.h +++ b/src/main/target/CYCLONEF722_PRO/target.h @@ -31,7 +31,6 @@ #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 diff --git a/src/main/target/DAKEFPVH743/target.c b/src/main/target/DAKEFPVH743/target.c new file mode 100644 index 0000000000..31a0f59a13 --- /dev/null +++ b/src/main/target/DAKEFPVH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM2, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH4, PD15, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM3, CH3, PC8, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM3, CH4, PC9, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) + DEF_TIM(TIM17, CH1, PB9, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PE9, TIM_USE_LED, 0, 8, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVH743/target.h b/src/main/target/DAKEFPVH743/target.h new file mode 100644 index 0000000000..210fa72e99 --- /dev/null +++ b/src/main/target/DAKEFPVH743/target.h @@ -0,0 +1,176 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME DAKEFPVH743 +#define MANUFACTURER_ID DAKE +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSV16X // not supported in EmuFlight +// #define USE_ACCGYRO_LSM6DSK320X // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PD10 +#define LED1_PIN PD11 +#define LED2_PIN PA8 +#define LED_STRIP_PIN PE9 +#define USE_BEEPER +#define BEEPER_PIN PC2 +#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 PC12 +#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 CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW180_DEG +#define GYRO_2_ALIGN CW180_DEG +#define GYRO_2_CS_PIN PB1 +#define GYRO_2_EXTI_PIN PB2 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART5 +#define UART5_TX_PIN PB6 +#define UART5_RX_PIN PB5 +#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 ESC_SENSOR_UART SERIAL_PORT_USART3 +#define SERIAL_PORT_COUNT 9 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE 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 PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 160 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 120 + +#define PINIO1_PIN PE2 +#define PINIO2_PIN PE3 +#define PINIO3_PIN PE4 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_CONFIG 129 +#define PINIO2_BOX 41 +#define PINIO3_CONFIG 129 +#define PINIO3_BOX 0 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) | TIM_N(16) | TIM_N(17) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVH743/target.mk b/src/main/target/DAKEFPVH743/target.mk new file mode 100644 index 0000000000..e7c8e18970 --- /dev/null +++ b/src/main/target/DAKEFPVH743/target.mk @@ -0,0 +1,18 @@ +H743_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_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/DAKEFPVH743PRO/target.c b/src/main/target/DAKEFPVH743PRO/target.c new file mode 100644 index 0000000000..d9602e56fe --- /dev/null +++ b/src/main/target/DAKEFPVH743PRO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM2, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM3, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM3, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PD13, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM3, CH3, PB0, TIM_USE_LED, 0, 8, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVH743PRO/target.h b/src/main/target/DAKEFPVH743PRO/target.h new file mode 100644 index 0000000000..6f8ad3504c --- /dev/null +++ b/src/main/target/DAKEFPVH743PRO/target.h @@ -0,0 +1,177 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME DAKEFPVH743PRO +#define MANUFACTURER_ID DAKE +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSV16X // not supported in EmuFlight +// #define USE_ACCGYRO_LSM6DSK320X // not supported in EmuFlight +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#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 PD10 +#define LED1_PIN PD11 +#define LED2_PIN PA8 +#define LED_STRIP_PIN PB0 +#define USE_BEEPER +#define BEEPER_PIN PC2 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE5 + +#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 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 CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW180_DEG +#define GYRO_2_ALIGN CW180_DEG +#define GYRO_2_CS_PIN PB1 +#define GYRO_2_EXTI_PIN PB2 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB8 +#define UART4_RX_PIN PB9 +#define USE_UART5 +#define UART5_TX_PIN PB6 +#define UART5_RX_PIN PB5 +#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 ESC_SENSOR_UART SERIAL_PORT_USART3 +#define MSP_UART SERIAL_PORT_USART2 +#define SERIAL_PORT_COUNT 9 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE 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 PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 160 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 120 + +#define PINIO1_PIN PE2 +#define PINIO2_PIN PE3 +#define PINIO3_PIN PE4 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_CONFIG 129 +#define PINIO2_BOX 41 +#define PINIO3_CONFIG 129 +#define PINIO3_BOX 0 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVH743PRO/target.mk b/src/main/target/DAKEFPVH743PRO/target.mk new file mode 100644 index 0000000000..e7c8e18970 --- /dev/null +++ b/src/main/target/DAKEFPVH743PRO/target.mk @@ -0,0 +1,18 @@ +H743_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_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/DAKEFPVH743_SLIM/target.c b/src/main/target/DAKEFPVH743_SLIM/target.c new file mode 100644 index 0000000000..1dae83da85 --- /dev/null +++ b/src/main/target/DAKEFPVH743_SLIM/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM2, CH1, PA0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM2, CH2, PA1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PD13, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) + DEF_TIM(TIM3, CH3, PB0, TIM_USE_LED, 0, 8, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVH743_SLIM/target.h b/src/main/target/DAKEFPVH743_SLIM/target.h new file mode 100644 index 0000000000..966af6a885 --- /dev/null +++ b/src/main/target/DAKEFPVH743_SLIM/target.h @@ -0,0 +1,187 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME DAKEFPVH743_SLIM +#define MANUFACTURER_ID DAKE +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSV16X // not supported in EmuFlight +// #define USE_ACCGYRO_LSM6DSK320X // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_MAX7456 +#define USE_SDCARD +#define USE_SDCARD_SDIO +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PD10 +#define LED1_PIN PD11 +#define LED2_PIN PA8 +#define LED_STRIP_PIN PB0 // TIM3 CH3 +#define USE_BEEPER +#define BEEPER_PIN PE10 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PC8 // TIM8 CH3 + +#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 PC10 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE12 +#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_FLIP +#define GYRO_1_ALIGN CW0_DEG_FLIP +#define GYRO_1_CS_PIN PC9 +#define GYRO_1_EXTI_PIN PD4 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW90_DEG_FLIP +#define GYRO_2_ALIGN CW90_DEG_FLIP +#define GYRO_2_CS_PIN PB1 +#define GYRO_2_EXTI_PIN PB2 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#define USE_UART5 +#define UART5_TX_PIN PB6 +#define UART5_RX_PIN PB5 +#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 ESC_SENSOR_UART SERIAL_PORT_USART3 // ESC +#define MSP_UART SERIAL_PORT_USART2 // BLUETOOTH +#define SERIAL_PORT_COUNT 9 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE 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 + +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PA4 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 160 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PE2 +#define PINIO2_PIN PE3 +#define PINIO3_PIN PE4 +#define PINIO4_PIN PD2 +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_CONFIG 129 +#define PINIO2_BOX 41 +#define PINIO3_CONFIG 129 +#define PINIO3_BOX 42 +#define PINIO4_CONFIG 129 +#define PINIO4_BOX 0 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DAKEFPVH743_SLIM/target.mk b/src/main/target/DAKEFPVH743_SLIM/target.mk new file mode 100644 index 0000000000..edae652933 --- /dev/null +++ b/src/main/target/DAKEFPVH743_SLIM/target.mk @@ -0,0 +1,18 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/DALRCF405/target.h b/src/main/target/DALRCF405/target.h index fcb9be885c..537c463ef2 100644 --- a/src/main/target/DALRCF405/target.h +++ b/src/main/target/DALRCF405/target.h @@ -88,6 +88,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/DALRCF722DUAL/target.h b/src/main/target/DALRCF722DUAL/target.h index 1c2cf5a015..cdd3b4abcf 100644 --- a/src/main/target/DALRCF722DUAL/target.h +++ b/src/main/target/DALRCF722DUAL/target.h @@ -126,6 +126,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB2 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/DARWINF722HD/target.h b/src/main/target/DARWINF722HD/target.h index 4e09ed802e..9fd5e52a2f 100644 --- a/src/main/target/DARWINF722HD/target.h +++ b/src/main/target/DARWINF722HD/target.h @@ -119,6 +119,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_SPI_INSTANCE SPI3 #define FLASH_CS_PIN PD2 diff --git a/src/main/target/DARWINH7DUAL/target.c b/src/main/target/DARWINH7DUAL/target.c new file mode 100644 index 0000000000..4b1c55a660 --- /dev/null +++ b/src/main/target/DARWINH7DUAL/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DARWINH7DUAL/target.h b/src/main/target/DARWINH7DUAL/target.h new file mode 100644 index 0000000000..c8afeae3de --- /dev/null +++ b/src/main/target/DARWINH7DUAL/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME DARWINH7DUAL +#define MANUFACTURER_ID DAFP +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_FLASH +#define USE_FLASH_W25N01G +#define USE_FLASH_W25N02K +#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 PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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_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 CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW180_DEG +#define GYRO_2_ALIGN CW180_DEG +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 PB6 +#define I2C1_SDA PB7 + +#define FLASH_CS_PIN PD3 +#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 ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define USE_ESCSERIAL +#define ESCSERIAL_TIMER_TX_PIN PC7 + +#define PINIO1_PIN PD10 +#define PINIO2_PIN PD11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DARWINH7DUAL/target.mk b/src/main/target/DARWINH7DUAL/target.mk new file mode 100644 index 0000000000..f3b7a7c2e0 --- /dev/null +++ b/src/main/target/DARWINH7DUAL/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +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 \ +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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/DREAMWORKSH743/target.c b/src/main/target/DREAMWORKSH743/target.c new file mode 100644 index 0000000000..e797454064 --- /dev/null +++ b/src/main/target/DREAMWORKSH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM4, CH1, PD12, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PD13, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DREAMWORKSH743/target.h b/src/main/target/DREAMWORKSH743/target.h new file mode 100644 index 0000000000..cf3666a891 --- /dev/null +++ b/src/main/target/DREAMWORKSH743/target.h @@ -0,0 +1,167 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME DREAMWORKSH743 +#define MANUFACTURER_ID DREA +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE6 + +#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_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 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_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 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 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 ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC5 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DREAMWORKSH743/target.mk b/src/main/target/DREAMWORKSH743/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/DREAMWORKSH743/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/DRONEERH743DUAL/target.c b/src/main/target/DRONEERH743DUAL/target.c new file mode 100644 index 0000000000..2aff6bb1f9 --- /dev/null +++ b/src/main/target/DRONEERH743DUAL/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH1, PA6, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM1, CH1N, PA7, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_LED, 0, 11, NONE), // led strip + DEF_TIM(TIM15, CH1N, PA1, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) + DEF_TIM(TIM2, CH1, PA5, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM3, CH3, PB0, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DRONEERH743DUAL/target.h b/src/main/target/DRONEERH743DUAL/target.h new file mode 100644 index 0000000000..d84933699f --- /dev/null +++ b/src/main/target/DRONEERH743DUAL/target.h @@ -0,0 +1,173 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME DRONEERH743DUAL +#define MANUFACTURER_ID DRNR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_SWDIO_PIN PA13 +#define USE_SWCLK_PIN PA14 + +#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 //ADC12_INP4 +#define LED1_PIN PC5 //ADC12_INN4/ADC12_INP8 +#define LED_STRIP_PIN PA0 //TIM2_CH1/TIM5_CH1/UART4_TX/ADC1_INP16 +#define USE_BEEPER +#define BEEPER_PIN PD14 //TIM4_CH3 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA1 //TIM2_CH2/TIM5_CH2/TIM15_CH1N/UART4_RX/ADC12_INP1 +#define USE_USB_DETECT +#define USB_DETECT_PIN PA10 //TIM1_CH3/USART1_RX + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PB3 //TIM2_CH2/SPI1_SCK/SPI3_SCK/SPI6_SCK/UART7_RX +#define SPI1_MISO_PIN PB4 +#define SPI1_MOSI_PIN PB5 +#define USE_SPI_DEVICE_2 +#define SPI2_SCK_PIN PB13 //TIM1_CH1N/SPI2_SCK/USART3_NSS/UART5_TX +#define SPI2_MISO_PIN PB14 +#define SPI2_MOSI_PIN PB15 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PC10 //SPI3_SCK/USART3_TX/UART4_TX/SDMMC1_D2 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PC12 +#define USE_SPI_DEVICE_4 +#define SPI4_SCK_PIN PE2 //SPI4_SCK +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 +#define USE_SPI_DEVICE_6 + +#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 //TIM2_CH1/SPI1_NSS/SPI3_NSS/SPI6_NSS/UART7_TX +#define GYRO_1_EXTI_PIN PD7 //SPI1_MOSI +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_CS_PIN PE3 //SPI4_NSS +#define GYRO_2_EXTI_PIN PE4 //TIM15_CH1N/SPI4_NSS +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART1 +#define UART1_TX_PIN PA9 //TIM1_CH2/I2C3_SDA/SPI2_SCK/USART1_TX +#define UART1_RX_PIN PB7 //TIM17_CH1N/TIM4_CH2/I2C1_SDA/I2C4_SDA/USART1_RX +#define USE_UART2 +#define UART2_TX_PIN PD5 //USART2_TX +#define UART2_RX_PIN PD6 //SPI3_MOSI/USART2_RX +#define USE_UART3 +#define UART3_TX_PIN PD8 //USART3_TX +#define UART3_RX_PIN PD9 //USART3_RX +#define USE_UART4 +#define UART4_TX_PIN PD1 //UART4_TX +#define UART4_RX_PIN PD0 //UART4_RX +#define USE_UART5 +#define UART5_TX_PIN PB6 +#define UART5_RX_PIN PD2 //UART5_RX/SDMMC1_CMD +#define USE_UART6 +#define UART6_TX_PIN PC6 //TIM3_CH1/TIM8_CH1/USART6_TX +#define UART6_RX_PIN PC7 //TIM3_CH2/TIM8_CH2/USART6_RX +#define PINIO1_PIN PA2 //TIM2_CH3/TIM5_CH3/TIM15_CH1/USART2_TX/ADC12_INP14 +#define PINIO2_PIN PA3 //TIM2_CH4/TIM5_CH4/TIM15_CH2/USART2_RX/ADC12_INP15 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define GPS_UART SERIAL_PORT_USART6 +#define SPI3_SDI_PIN PC11 //SPI3_MISO/USART3_RX/UART4_RX/SDMMC1_D3 +#define SPI2_SDI_PIN PB14 //TIM1_CH2N/TIM12_CH1/TIM8_CH2N/USART1_TX/SPI2_MISO +#define SPI2_SDO_PIN PB15 //TIM1_CH3N/TIM12_CH2/TIM8_CH3N/USART1_RX/SPI2_MOSI +#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 USE_I2C_DEVICE_3 +#define I2C_DEVICE_3 (I2CDEV_3) +#define USE_I2C_DEVICE_4 +#define I2C_DEVICE_4 (I2CDEV_4) +#define MAG_I2C_INSTANCE I2CDEV_4 +#define I2C4_SCL PD12 +#define I2C4_SDA PD13 + +#define FLASH_CS_PIN PA8 //TIM1_CH1/I2C3_SCL/UART7_RX +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PB12 //I2C2_SMBA/SPI2_NSS/UART5_RX +#define MAX7456_SPI_INSTANCE SPI2 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_CONFIG 1 +#define PINIO2_BOX 41 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/DRONEERH743DUAL/target.mk b/src/main/target/DRONEERH743DUAL/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/DRONEERH743DUAL/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/FF_FORTINIF4/target.h b/src/main/target/FF_FORTINIF4/target.h index 544bb9d962..984fa342fe 100644 --- a/src/main/target/FF_FORTINIF4/target.h +++ b/src/main/target/FF_FORTINIF4/target.h @@ -105,6 +105,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV /*---------------------------------*/ #endif diff --git a/src/main/target/FF_PIKOF4/target.h b/src/main/target/FF_PIKOF4/target.h index 45a7e35e7d..1541a78039 100644 --- a/src/main/target/FF_PIKOF4/target.h +++ b/src/main/target/FF_PIKOF4/target.h @@ -99,6 +99,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV /*---------------------------------*/ #endif diff --git a/src/main/target/FF_RACEPIT_MINI/target.h b/src/main/target/FF_RACEPIT_MINI/target.h index 82d08ce2db..73bbf1b30d 100644 --- a/src/main/target/FF_RACEPIT_MINI/target.h +++ b/src/main/target/FF_RACEPIT_MINI/target.h @@ -83,6 +83,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV /*---------------------------------*/ /*-----------USB-UARTs-------------*/ diff --git a/src/main/target/FLYCOLORH743/target.c b/src/main/target/FLYCOLORH743/target.c new file mode 100644 index 0000000000..20fc5630fe --- /dev/null +++ b/src/main/target/FLYCOLORH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM17, CH1, PB9, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORH743/target.h b/src/main/target/FLYCOLORH743/target.h new file mode 100644 index 0000000000..f7e492833e --- /dev/null +++ b/src/main/target/FLYCOLORH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME FLYCOLORH743 +#define MANUFACTURER_ID FLCO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP388 +#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 PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE6 + +#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 MPU_INT_EXTI PC8 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#define UART5_RX_PIN PD2 +#define USE_UART6 +#define UART6_RX_PIN PC7 +#define UART6_TX_PIN PC6 +#define USE_UART7 +#define UART7_RX_PIN PE7 +#define UART7_TX_PIN PE8 +#define USE_UART8 +#define UART8_RX_PIN PE0 +#define UART8_TX_PIN PE1 +#define SERIAL_PORT_COUNT 9 + +#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 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 PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC2 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 400 + +#define PINIO1_PIN PD10 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(17) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYCOLORH743/target.mk b/src/main/target/FLYCOLORH743/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/FLYCOLORH743/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/FLYWOOF411/target.h b/src/main/target/FLYWOOF411/target.h index 5976e84eda..38e2594b37 100644 --- a/src/main/target/FLYWOOF411/target.h +++ b/src/main/target/FLYWOOF411/target.h @@ -114,6 +114,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB2 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/FLYWOOF411V2/target.h b/src/main/target/FLYWOOF411V2/target.h index c99f2e4912..ab0adf17b2 100644 --- a/src/main/target/FLYWOOF411V2/target.h +++ b/src/main/target/FLYWOOF411V2/target.h @@ -115,6 +115,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB2 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/FLYWOOF745/target.h b/src/main/target/FLYWOOF745/target.h index be55b090ed..ac42c9d09c 100644 --- a/src/main/target/FLYWOOF745/target.h +++ b/src/main/target/FLYWOOF745/target.h @@ -125,7 +125,8 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS - #define USE_FLASH_M25P16 + #define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI + #define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA4 #define FLASH_SPI_INSTANCE SPI1 diff --git a/src/main/target/FLYWOOF7DUAL/target.h b/src/main/target/FLYWOOF7DUAL/target.h index 34455a63f2..119d697d3d 100755 --- a/src/main/target/FLYWOOF7DUAL/target.h +++ b/src/main/target/FLYWOOF7DUAL/target.h @@ -146,6 +146,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PC13 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/FLYWOOH743PRO/target.c b/src/main/target/FLYWOOH743PRO/target.c new file mode 100644 index 0000000000..c5c1000ca4 --- /dev/null +++ b/src/main/target/FLYWOOH743PRO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 0, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 0, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOH743PRO/target.h b/src/main/target/FLYWOOH743PRO/target.h new file mode 100644 index 0000000000..c72d39dcaf --- /dev/null +++ b/src/main/target/FLYWOOH743PRO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME FLYWOOH743PRO +#define MANUFACTURER_ID FLWO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_MAX7456 +#define USE_SDCARD + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#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 PD7 +#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_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 ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define PINIO1_PIN PD10 +#define PINIO2_PIN PD11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FLYWOOH743PRO/target.mk b/src/main/target/FLYWOOH743PRO/target.mk new file mode 100644 index 0000000000..413d0f931b --- /dev/null +++ b/src/main/target/FLYWOOH743PRO/target.mk @@ -0,0 +1,17 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/FOXEERF722DUAL/target.h b/src/main/target/FOXEERF722DUAL/target.h index 8caadc2395..236fd70efd 100644 --- a/src/main/target/FOXEERF722DUAL/target.h +++ b/src/main/target/FOXEERF722DUAL/target.h @@ -143,6 +143,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/FOXEERF745_AIO/target.h b/src/main/target/FOXEERF745_AIO/target.h index 3e7ffaf11d..baba8388d9 100644 --- a/src/main/target/FOXEERF745_AIO/target.h +++ b/src/main/target/FOXEERF745_AIO/target.h @@ -136,7 +136,8 @@ //#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS - #define USE_FLASH_M25P16 + #define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI + #define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PE4 #define FLASH_SPI_INSTANCE SPI4 diff --git a/src/main/target/FOXEERH743/target.c b/src/main/target/FOXEERH743/target.c new file mode 100644 index 0000000000..9a7bbc2e6c --- /dev/null +++ b/src/main/target/FOXEERH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0, NONE), // cam ctrl + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0, NONE), // motor 4 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0, NONE), // motor 2 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 2, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 3, NONE), // motor 8 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERH743/target.h b/src/main/target/FOXEERH743/target.h new file mode 100644 index 0000000000..6c95ca282e --- /dev/null +++ b/src/main/target/FOXEERH743/target.h @@ -0,0 +1,159 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME FOXEERH743 +#define MANUFACTURER_ID FOXE +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_ICM42688P +#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 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_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PD0 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PB12 +#define MPU6000_SPI_BUS SPIDEV_2 + +#define ACC_MPU6500_ALIGN CW0_DEG +#define GYRO_MPU6500_ALIGN CW0_DEG +#define MPU6500_CS_PIN PB12 +#define MPU6500_SPI_BUS SPIDEV_2 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PB12 +#define ICM42688P_SPI_BUS SPIDEV_2 + +#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 SERIALRX_UART SERIAL_PORT_USART1 +#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 PA15 +#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 PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC2_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC2_DMA_STREAM DMA2_Stream1 // ADC2 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERH743/target.mk b/src/main/target/FOXEERH743/target.mk new file mode 100644 index 0000000000..5fc77ea926 --- /dev/null +++ b/src/main/target/FOXEERH743/target.mk @@ -0,0 +1,18 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD 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_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/FOXEERH743V2/target.c b/src/main/target/FOXEERH743V2/target.c new file mode 100644 index 0000000000..9a7bbc2e6c --- /dev/null +++ b/src/main/target/FOXEERH743V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0, NONE), // cam ctrl + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0, NONE), // motor 4 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0, NONE), // motor 2 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 2, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 3, NONE), // motor 8 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERH743V2/target.h b/src/main/target/FOXEERH743V2/target.h new file mode 100644 index 0000000000..77393c4924 --- /dev/null +++ b/src/main/target/FOXEERH743V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME FOXEERH743V2 +#define MANUFACTURER_ID FOXE +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_CAMERA_CONTROL +#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 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_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PD0 + +#define ACC_MPU6000_ALIGN CW270_DEG +#define GYRO_MPU6000_ALIGN CW270_DEG +#define MPU6000_CS_PIN PB12 +#define MPU6000_SPI_BUS SPIDEV_2 + +#define ACC_MPU6500_ALIGN CW270_DEG +#define GYRO_MPU6500_ALIGN CW270_DEG +#define MPU6500_CS_PIN PB12 +#define MPU6500_SPI_BUS SPIDEV_2 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PB12 +#define ICM42688P_SPI_BUS SPIDEV_2 + +#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 SERIALRX_UART SERIAL_PORT_USART1 +#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 PA15 +#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 PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC2_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC2_DMA_STREAM DMA2_Stream1 // ADC2 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/FOXEERH743V2/target.mk b/src/main/target/FOXEERH743V2/target.mk new file mode 100644 index 0000000000..0f68197c15 --- /dev/null +++ b/src/main/target/FOXEERH743V2/target.mk @@ -0,0 +1,18 @@ +H743_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_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/FPVM_BETAFLIGHTF7/target.h b/src/main/target/FPVM_BETAFLIGHTF7/target.h index 7179569998..7bfaf04b62 100644 --- a/src/main/target/FPVM_BETAFLIGHTF7/target.h +++ b/src/main/target/FPVM_BETAFLIGHTF7/target.h @@ -104,6 +104,12 @@ #define MAX7456_SPI_CS_PIN PB12 #define MAX7456_SPI_INSTANCE SPI2 +#define USE_FLASH_W25Q128FV +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PE4 +#define FLASH_SPI_INSTANCE SPI4 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + #define USE_ADC #define VBAT_ADC_PIN PC3 #define CURRENT_METER_ADC_PIN PC2 diff --git a/src/main/target/GEPRCF411_AIO/target.h b/src/main/target/GEPRCF411_AIO/target.h index c0ee37a7fe..5253d7313d 100644 --- a/src/main/target/GEPRCF411_AIO/target.h +++ b/src/main/target/GEPRCF411_AIO/target.h @@ -131,6 +131,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB3 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/GEPRCF722BT/target.h b/src/main/target/GEPRCF722BT/target.h index fe62a98262..9d8e02f85e 100644 --- a/src/main/target/GEPRCF722BT/target.h +++ b/src/main/target/GEPRCF722BT/target.h @@ -82,6 +82,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_SPI_INSTANCE SPI3 #define FLASH_CS_PIN PA15 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/GEPRC_F722_AIO/target.h b/src/main/target/GEPRC_F722_AIO/target.h index 96a1a4c1ed..e080c98bc6 100644 --- a/src/main/target/GEPRC_F722_AIO/target.h +++ b/src/main/target/GEPRC_F722_AIO/target.h @@ -82,6 +82,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_SPI_INSTANCE SPI3 #define FLASH_CS_PIN PB9 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/GEPRC_TAKER_H743/target.c b/src/main/target/GEPRC_TAKER_H743/target.c new file mode 100644 index 0000000000..ce79005460 --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 1, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 2, NONE), // motor 2 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 4, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 6, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 7, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 8, NONE), // motor 8 +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEPRC_TAKER_H743/target.h b/src/main/target/GEPRC_TAKER_H743/target.h new file mode 100644 index 0000000000..47321b2c57 --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743/target.h @@ -0,0 +1,173 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME GEPRC_TAKER_H743 +#define MANUFACTURER_ID GEPR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSK320X // not supported in EmuFlight +#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_BARO_MS5611 +#define USE_SDCARD +#define USE_MAX7456 +#define USE_SDCARD_SPI + +#define USE_VCP +#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 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 CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PD0 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PD8 +#define GYRO_2_SPI_BUS SPIDEV_2 + +#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 MSP_DISPLAYPORT_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define MSP_UART SERIAL_PORT_USART3 +#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 USE_SDCARD_SDIO +#define SDCARD_SPI_CS_PIN PA15 +#define SDCARD_SPI_INSTANCE SPI3 +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 + +#define PINIO1_PIN PE13 +#define PINIO2_PIN PC14 +#define PINIO1_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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEPRC_TAKER_H743/target.mk b/src/main/target/GEPRC_TAKER_H743/target.mk new file mode 100644 index 0000000000..e4ba2236a6 --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743/target.mk @@ -0,0 +1,19 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/GEPRC_TAKER_H743MINI/target.c b/src/main/target/GEPRC_TAKER_H743MINI/target.c new file mode 100644 index 0000000000..ee63580f5b --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743MINI/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PD12, TIM_USE_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 1, NONE), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 2, NONE), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 4, NONE), // motor 4 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 6, NONE), // motor 6 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 7, NONE), // motor 7 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 8, NONE), // motor 8 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEPRC_TAKER_H743MINI/target.h b/src/main/target/GEPRC_TAKER_H743MINI/target.h new file mode 100644 index 0000000000..9ba92f2da9 --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743MINI/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME GEPRC_TAKER_H743MINI +#define MANUFACTURER_ID GEPR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSK320X // not supported in EmuFlight +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_BARO_MS5611 +#define USE_MAX7456 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PB7 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PD2 +#define BEEPER_INVERTED + +#define USE_SPI +#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 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 MPU_INT_EXTI PB2 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PB12 +#define ICM42688P_SPI_BUS SPIDEV_2 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_RX_PIN PB5 +#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 MSP_DISPLAYPORT_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define MSP_UART SERIAL_PORT_USART8 +#define SERIAL_PORT_COUNT 8 + +#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 PE4 +#define MAX7456_SPI_INSTANCE SPI4 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 + +#define PINIO1_PIN PC5 +#define PINIO2_PIN PD3 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEPRC_TAKER_H743MINI/target.mk b/src/main/target/GEPRC_TAKER_H743MINI/target.mk new file mode 100644 index 0000000000..6faf7d1827 --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743MINI/target.mk @@ -0,0 +1,18 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/GEPRC_TAKER_H743V2/target.c b/src/main/target/GEPRC_TAKER_H743V2/target.c new file mode 100644 index 0000000000..aaf0596dd4 --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, CH2, PB3, TIM_USE_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 1, NONE), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 2, NONE), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 4, NONE), // motor 4 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 6, NONE), // motor 6 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 7, NONE), // motor 7 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 8, NONE), // motor 8 + DEF_TIM(TIM12, CH1, PB14, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PD13, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEPRC_TAKER_H743V2/target.h b/src/main/target/GEPRC_TAKER_H743V2/target.h new file mode 100644 index 0000000000..6901128ee7 --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME GEPRC_TAKER_H743V2 +#define MANUFACTURER_ID GEPR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSK320X // not supported in EmuFlight +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_BARO_MS5611 +#define USE_MAX7456 +#define USE_SDCARD +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB7 +#define LED_STRIP_PIN PB3 +#define USE_BEEPER +#define BEEPER_PIN PA2 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA3 + +#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_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 PB2 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PB12 +#define ICM42688P_SPI_BUS SPIDEV_2 + +#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 PD8 +#define UART3_RX_PIN PD9 +#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 MSP_DISPLAYPORT_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define MSP_UART SERIAL_PORT_USART8 +#define SERIAL_PORT_COUNT 8 + +#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 USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#define MAX7456_SPI_CS_PIN PE4 +#define MAX7456_SPI_INSTANCE SPI4 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 + +#define PINIO1_PIN PC5 +#define PINIO2_PIN PD3 +#define PINIO3_PIN PE3 +#define PINIO1_CONFIG 129 +#define PINIO2_CONFIG 129 +#define PINIO3_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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/GEPRC_TAKER_H743V2/target.mk b/src/main/target/GEPRC_TAKER_H743V2/target.mk new file mode 100644 index 0000000000..51ca4b4155 --- /dev/null +++ b/src/main/target/GEPRC_TAKER_H743V2/target.mk @@ -0,0 +1,18 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/GRAVITYF7/target.h b/src/main/target/GRAVITYF7/target.h index 7ccb4fff89..ab7933d1d8 100644 --- a/src/main/target/GRAVITYF7/target.h +++ b/src/main/target/GRAVITYF7/target.h @@ -138,6 +138,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN SPI3_NSS_PIN #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/HAKRCF405/target.h b/src/main/target/HAKRCF405/target.h index 065558db14..e27c9eea14 100755 --- a/src/main/target/HAKRCF405/target.h +++ b/src/main/target/HAKRCF405/target.h @@ -117,6 +117,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/HAKRCF722D/target.h b/src/main/target/HAKRCF722D/target.h index e40f4808f0..5cb02e44b6 100644 --- a/src/main/target/HAKRCF722D/target.h +++ b/src/main/target/HAKRCF722D/target.h @@ -118,6 +118,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PD2 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/HAKRCH743/target.c b/src/main/target/HAKRCH743/target.c new file mode 100644 index 0000000000..7f62aa82a0 --- /dev/null +++ b/src/main/target/HAKRCH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 1, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 2, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 4, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 6, NONE), // motor 6 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_MOTOR, 0, 7, NONE), // motor 7 + DEF_TIM(TIM4, CH4, PD15, TIM_USE_MOTOR, 0, 8, NONE), // motor 8 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM3, CH3, PB0, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM3, CH4, PB1, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 9, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCH743/target.h b/src/main/target/HAKRCH743/target.h new file mode 100644 index 0000000000..6ce77b096e --- /dev/null +++ b/src/main/target/HAKRCH743/target.h @@ -0,0 +1,164 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME HAKRCH743 +#define MANUFACTURER_ID HARC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 +#define USE_SDCARD +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_SDCARD_SDIO + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE9 +#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 PD7 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PB5 +#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 ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PC13 +#define GYRO_2_EXTI_PIN PC14 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART1 +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#define USE_UART5 +#define UART5_TX_PIN PB13 +#define UART5_RX_PIN PB12 +#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 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 MAG_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#define MAX7456_SPI_CS_PIN PE2 +#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 10 +#define ADC3_DMA_OPT 11 +#define ADC1_DMA_STREAM DMA2_Stream2 // ADC1 opt10 +#define ADC3_DMA_STREAM DMA2_Stream3 // ADC3 opt11 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 250 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 110 + +#define PINIO1_PIN PD10 +#define PINIO2_PIN PD11 +#define PINIO1_BOX 40 +#define PINIO1_CONFIG 129 +#define PINIO2_BOX 41 +#define PINIO2_CONFIG 129 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HAKRCH743/target.mk b/src/main/target/HAKRCH743/target.mk new file mode 100644 index 0000000000..413d0f931b --- /dev/null +++ b/src/main/target/HAKRCH743/target.mk @@ -0,0 +1,17 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/HDZERO_HALO/target.c b/src/main/target/HDZERO_HALO/target.c new file mode 100644 index 0000000000..39b70867bf --- /dev/null +++ b/src/main/target/HDZERO_HALO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM3, CH3, PC8, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PC9, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM1, CH3, PA10, TIM_USE_LED, 0, 4, NONE), // led strip + DEF_TIM(TIM4, CH1, PD12, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HDZERO_HALO/target.h b/src/main/target/HDZERO_HALO/target.h new file mode 100644 index 0000000000..ad13c8b6b4 --- /dev/null +++ b/src/main/target/HDZERO_HALO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME HDZERO_HALO +#define MANUFACTURER_ID HDZO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_FLASH +#define USE_FLASH_W25Q128FV +#define USE_OSD_HD +#define USE_LED_STRIP + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI + +#define USE_LED +#define LED0_PIN PE2 +#define LED_STRIP_PIN PA10 +#define USE_BEEPER +#define BEEPER_PIN PD12 +#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 ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PB4 +#define GYRO_1_EXTI_PIN PC13 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG +#define GYRO_2_ALIGN CW0_DEG +#define GYRO_2_CS_PIN PB3 +#define GYRO_2_EXTI_PIN PA15 +#define GYRO_2_SPI_BUS SPIDEV_1 + +#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_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#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 SERIALRX_UART SERIAL_PORT_USART1 +#define SERIAL_PORT_COUNT 8 + +#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 USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC1 +#define ADC1_DMA_OPT 8 +#define ADC2_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC2_DMA_STREAM DMA2_Stream1 // ADC2 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HDZERO_HALO/target.mk b/src/main/target/HDZERO_HALO/target.mk new file mode 100644 index 0000000000..74c4d70f20 --- /dev/null +++ b/src/main/target/HDZERO_HALO/target.mk @@ -0,0 +1,14 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/HGLRCF405/target.h b/src/main/target/HGLRCF405/target.h index 5a612aa9e1..3ae51fd374 100644 --- a/src/main/target/HGLRCF405/target.h +++ b/src/main/target/HGLRCF405/target.h @@ -76,6 +76,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/HGLRCF411/target.h b/src/main/target/HGLRCF411/target.h index 12a292840e..b4bef786e8 100644 --- a/src/main/target/HGLRCF411/target.h +++ b/src/main/target/HGLRCF411/target.h @@ -107,6 +107,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA15 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/HGLRCF722/target.h b/src/main/target/HGLRCF722/target.h index c15e8c170f..98facbdf51 100644 --- a/src/main/target/HGLRCF722/target.h +++ b/src/main/target/HGLRCF722/target.h @@ -116,6 +116,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PD2 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/HGLRC_H743_LITE/target.c b/src/main/target/HGLRC_H743_LITE/target.c new file mode 100644 index 0000000000..9715df4ecf --- /dev/null +++ b/src/main/target/HGLRC_H743_LITE/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM15, CH1, PE5, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM2, CH1, PA0, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM3, CH1, PC6, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRC_H743_LITE/target.h b/src/main/target/HGLRC_H743_LITE/target.h new file mode 100644 index 0000000000..d948a83d4c --- /dev/null +++ b/src/main/target/HGLRC_H743_LITE/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME HGLRC_H743_LITE +#define MANUFACTURER_ID HGLR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_MAX7456 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PE4 +#define LED1_PIN PE6 +#define LED2_PIN PE3 +#define LED_STRIP_PIN PA0 +#define USE_BEEPER +#define BEEPER_PIN PE5 +#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 PB2 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC5 + +#define ACC_ICM42688P_ALIGN CW180_DEG_FLIP +#define GYRO_ICM42688P_ALIGN CW180_DEG_FLIP +#define ICM42688P_CS_PIN PA4 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PB6 +#define UART5_RX_PIN PB5 +#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 BARO_I2C_INSTANCE I2CDEV_1 +#define I2C1_SCL PB8 +#define I2C1_SDA PB7 +#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 PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 210 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PC13 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HGLRC_H743_LITE/target.mk b/src/main/target/HGLRC_H743_LITE/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/HGLRC_H743_LITE/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/HIFIONRCF7/target.h b/src/main/target/HIFIONRCF7/target.h index a8e86a57a1..826479f4b0 100644 --- a/src/main/target/HIFIONRCF7/target.h +++ b/src/main/target/HIFIONRCF7/target.h @@ -84,6 +84,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PC13 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/HOBBYWING_XROTORF7CONV/target.h b/src/main/target/HOBBYWING_XROTORF7CONV/target.h index dc6281779c..44ac7425ba 100644 --- a/src/main/target/HOBBYWING_XROTORF7CONV/target.h +++ b/src/main/target/HOBBYWING_XROTORF7CONV/target.h @@ -80,6 +80,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PC13 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/HWH7/target.c b/src/main/target/HWH7/target.c new file mode 100644 index 0000000000..2e7c0d600a --- /dev/null +++ b/src/main/target/HWH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, CH4, PE14, TIM_USE_MOTOR, 0, 1, NONE), // motor 1 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 2 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 4, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 6, NONE), // motor 6 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_MOTOR, 0, 7, NONE), // motor 7 + DEF_TIM(TIM4, CH4, PD15, TIM_USE_MOTOR, 0, 0, NONE), // motor 8; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM17, CH1, PB9, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM2, CH1, PA0, TIM_USE_LED, 0, 0, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HWH7/target.h b/src/main/target/HWH7/target.h new file mode 100644 index 0000000000..37e8aa733f --- /dev/null +++ b/src/main/target/HWH7/target.h @@ -0,0 +1,167 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME HWH7 +#define MANUFACTURER_ID HOWI +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +// #define USE_ACCGYRO_LSM6DSV16X // not supported in EmuFlight +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_DPS310 +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_MAX7456 +#define USE_SDCARD +#define USE_SWDIO_PIN PA13 +#define USE_SWCLK_PIN PA14 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PB2 +#define LED_STRIP_PIN PA0 // TIM2_CH1/TIM5_CH1/UART4_TX +#define USE_BEEPER +#define BEEPER_PIN PA1 // TIM2_CH2/TIM5_CH2 +#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 PD3 +#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 PD6 + +#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 PA4 +#define GYRO_1_EXTI_PIN PC14 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PB12 +#define GYRO_2_EXTI_PIN PC15 +#define GYRO_2_SPI_BUS SPIDEV_2 + +#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 PD8 // BLUETOOTH +#define UART3_RX_PIN PD9 // +#define USE_UART4 +#define UART4_TX_PIN PD1 // 仅串口功能 +#define UART4_RX_PIN PD0 // 仅串口功能 +#define USE_UART5 +#define UART5_TX_PIN PB6 // +#define UART5_RX_PIN PB5 // +#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 I2C2_SCL_PIN PB10 // I2C2_SCL/TIM2_CH3/USART3_TX +#define I2C2_SDA_PIN PB11 // I2C2_SDA/TIM2_CH4/USART3_RX +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART2 +#define MSP_UART SERIAL_PORT_USART3 +#define SERIAL_PORT_COUNT 9 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define MAG_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#define MAX7456_SPI_CS_PIN PA15 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 11 +#define ADC3_DMA_OPT 12 +#define ADC1_DMA_STREAM DMA2_Stream3 // ADC1 opt11 +#define ADC3_DMA_STREAM DMA2_Stream4 // ADC3 opt12 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 117 + +#define PINIO1_PIN PE2 +#define PINIO1_BOX 40 +#define PINIO2_PIN PE4 +#define PINIO2_BOX 41 +#define PINIO2_CONFIG 129 +#define PINIO3_PIN PD10 +#define PINIO3_BOX 0 +#define PINIO3_CONFIG 129 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(4) | TIM_N(5) | TIM_N(15) | TIM_N(16) | TIM_N(17) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/HWH7/target.mk b/src/main/target/HWH7/target.mk new file mode 100644 index 0000000000..9a83ec58e8 --- /dev/null +++ b/src/main/target/HWH7/target.mk @@ -0,0 +1,17 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/IFLIGHT_BLITZ_H7_PRO/target.c b/src/main/target/IFLIGHT_BLITZ_H7_PRO/target.c new file mode 100644 index 0000000000..08df1b4911 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_H7_PRO/target.c @@ -0,0 +1,53 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 12, NONE), // servo 1 + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 3 + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM17, CH1, PB9, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_BLITZ_H7_PRO/target.h b/src/main/target/IFLIGHT_BLITZ_H7_PRO/target.h new file mode 100644 index 0000000000..716a37dd83 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_H7_PRO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME IFLIGHT_BLITZ_H7_PRO +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 +#define USE_SDCARD + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED1_PIN PE3 +#define LED2_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#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 PD7 +#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_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 MPU_INT_EXTI PB2 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PC15 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 210 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + +#define PINIO1_PIN PD10 +#define PINIO2_PIN PD11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 18 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(15) | TIM_N(16) | TIM_N(17) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_BLITZ_H7_PRO/target.mk b/src/main/target/IFLIGHT_BLITZ_H7_PRO/target.mk new file mode 100644 index 0000000000..a349965468 --- /dev/null +++ b/src/main/target/IFLIGHT_BLITZ_H7_PRO/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/IFLIGHT_F405_TWING/target.h b/src/main/target/IFLIGHT_F405_TWING/target.h index 560f22dca0..b963dcbaef 100644 --- a/src/main/target/IFLIGHT_F405_TWING/target.h +++ b/src/main/target/IFLIGHT_F405_TWING/target.h @@ -108,6 +108,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25N01G #define FLASH_CS_PIN PA15 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/IFLIGHT_F722_TWING/target.h b/src/main/target/IFLIGHT_F722_TWING/target.h index 8bb49a0142..ef00bd84e9 100644 --- a/src/main/target/IFLIGHT_F722_TWING/target.h +++ b/src/main/target/IFLIGHT_F722_TWING/target.h @@ -141,6 +141,8 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25M512 +#define USE_FLASH_W25N01G #define FLASH_CS_PIN PB9 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/IFLIGHT_F745_AIO/target.h b/src/main/target/IFLIGHT_F745_AIO/target.h index 7996168d7e..2bfa35ef7d 100644 --- a/src/main/target/IFLIGHT_F745_AIO/target.h +++ b/src/main/target/IFLIGHT_F745_AIO/target.h @@ -118,6 +118,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25N01G #define FLASH_CS_PIN PA15 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/IFLIGHT_H743_AIO/target.c b/src/main/target/IFLIGHT_H743_AIO/target.c new file mode 100644 index 0000000000..d018f23133 --- /dev/null +++ b/src/main/target/IFLIGHT_H743_AIO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PD12, TIM_USE_LED, 0, 10, NONE), // led strip + DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0, NONE), // ppm + DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 0, NONE), // cam ctrl + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_H743_AIO/target.h b/src/main/target/IFLIGHT_H743_AIO/target.h new file mode 100644 index 0000000000..34b46c17af --- /dev/null +++ b/src/main/target/IFLIGHT_H743_AIO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME IFLIGHT_H743_AIO +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_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 LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_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_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 CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PA4 +#define MPU6000_SPI_BUS SPIDEV_1 + +#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 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 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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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/IFLIGHT_H743_AIO/target.mk b/src/main/target/IFLIGHT_H743_AIO/target.mk new file mode 100644 index 0000000000..dd3a06717d --- /dev/null +++ b/src/main/target/IFLIGHT_H743_AIO/target.mk @@ -0,0 +1,15 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/IFLIGHT_H743_AIO_V2/target.c b/src/main/target/IFLIGHT_H743_AIO_V2/target.c new file mode 100644 index 0000000000..72ae5903d2 --- /dev/null +++ b/src/main/target/IFLIGHT_H743_AIO_V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0, NONE), // ppm + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 4, NONE), // motor 3 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 5, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 2, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 3, NONE), // motor 8 +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_H743_AIO_V2/target.h b/src/main/target/IFLIGHT_H743_AIO_V2/target.h new file mode 100644 index 0000000000..a8f32d9d64 --- /dev/null +++ b/src/main/target/IFLIGHT_H743_AIO_V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME IFLIGHT_H743_AIO_V2 +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#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 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_BUS SPIDEV_1 + +#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 PB12 +#define GYRO_2_EXTI_PIN PD8 +#define GYRO_2_SPI_BUS SPIDEV_2 + +#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 DASHBOARD_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 1 +#define ADC2_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA1_Stream1 // ADC1 opt1 +#define ADC2_DMA_STREAM DMA2_Stream1 // ADC2 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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/IFLIGHT_H743_AIO_V2/target.mk b/src/main/target/IFLIGHT_H743_AIO_V2/target.mk new file mode 100644 index 0000000000..6de09713be --- /dev/null +++ b/src/main/target/IFLIGHT_H743_AIO_V2/target.mk @@ -0,0 +1,16 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/IFLIGHT_H7_TWING/target.c b/src/main/target/IFLIGHT_H7_TWING/target.c new file mode 100644 index 0000000000..b370ce2813 --- /dev/null +++ b/src/main/target/IFLIGHT_H7_TWING/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 10, NONE), // led strip + DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0, NONE), // ppm + DEF_TIM(TIM15, CH1, PE5, TIM_USE_ANY, 0, 0, NONE), // cam ctrl + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_H7_TWING/target.h b/src/main/target/IFLIGHT_H7_TWING/target.h new file mode 100644 index 0000000000..f02b364e34 --- /dev/null +++ b/src/main/target/IFLIGHT_H7_TWING/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME IFLIGHT_H7_TWING +#define MANUFACTURER_ID IFRC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM20689 +#define USE_ACC +#define USE_ACC_SPI_ICM20689 +#define USE_BARO_BMP280 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_FLASH_W25N01G +#define USE_MAX7456 +#define USE_BARO + +#define USE_VCP +#define USE_FLASHFS +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC2 +#define LED1_PIN PC3 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE5 + +#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 PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#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 PA4 +#define GYRO_1_EXTI_PIN PC5 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PB12 +#define GYRO_2_EXTI_PIN PB11 +#define GYRO_2_SPI_BUS SPIDEV_2 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 PB4 +#define UART7_RX_PIN PB3 +#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 BARO_I2C_INSTANCE I2CDEV_1 +#define DASHBOARD_I2C_INSTANCE I2CDEV_1 +#define I2C1_SCL PB8 +#define I2C1_SDA PB9 + +// TODO: FLASH_CS_PIN and FLASH_SPI_INSTANCE unknown — research iFlight H7 Twing hardware +// #define FLASH_CS_PIN ?? +// #define FLASH_SPI_INSTANCE SPI? +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define MAX7456_SPI_CS_PIN PE11 +#define MAX7456_SPI_INSTANCE SPI4 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC0 +#define RSSI_ADC_PIN PC4 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/IFLIGHT_H7_TWING/target.mk b/src/main/target/IFLIGHT_H7_TWING/target.mk new file mode 100644 index 0000000000..7beb8c33ea --- /dev/null +++ b/src/main/target/IFLIGHT_H7_TWING/target.mk @@ -0,0 +1,15 @@ +H743_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/max7456.c \ + +# notice - this file was programmatically generated and may be incomplete. + +# This resource file generated using https://github.com/nerdCopter/target-convert +# Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/JHEF405PRO/target.h b/src/main/target/JHEF405PRO/target.h index 4a6b163c8e..1ba7fa2a9f 100644 --- a/src/main/target/JHEF405PRO/target.h +++ b/src/main/target/JHEF405PRO/target.h @@ -88,6 +88,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25N01G #define FLASH_SPI_INSTANCE SPI3 #define FLASH_CS_PIN PB3 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/JHEF411/target.h b/src/main/target/JHEF411/target.h index 73cdd8aef5..ba6d2bb965 100644 --- a/src/main/target/JHEF411/target.h +++ b/src/main/target/JHEF411/target.h @@ -125,6 +125,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB2 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/JHEH743PRO/target.c b/src/main/target/JHEH743PRO/target.c new file mode 100644 index 0000000000..e797454064 --- /dev/null +++ b/src/main/target/JHEH743PRO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM4, CH1, PD12, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PD13, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEH743PRO/target.h b/src/main/target/JHEH743PRO/target.h new file mode 100644 index 0000000000..00461fb4ba --- /dev/null +++ b/src/main/target/JHEH743PRO/target.h @@ -0,0 +1,167 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME JHEH743PRO +#define MANUFACTURER_ID JHEF +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE6 + +#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_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 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_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 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 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 PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC5 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEH743PRO/target.mk b/src/main/target/JHEH743PRO/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/JHEH743PRO/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/JHEH743_AIO/target.c b/src/main/target/JHEH743_AIO/target.c new file mode 100644 index 0000000000..092b866d91 --- /dev/null +++ b/src/main/target/JHEH743_AIO/target.c @@ -0,0 +1,51 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 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_ANY, 0, 10, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 2 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 10, NONE), // led strip + DEF_TIM(TIM4, CH2, PD13, TIM_USE_ANY, 0, 5, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 0, NONE), // cam ctrl + DEF_TIM(TIM8, CH4, PC9, TIM_USE_ANY, 0, 7, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0, NONE), // ppm + DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH4, PB11, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 2, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEH743_AIO/target.h b/src/main/target/JHEH743_AIO/target.h new file mode 100644 index 0000000000..1a22222b3d --- /dev/null +++ b/src/main/target/JHEH743_AIO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME JHEH743_AIO +#define MANUFACTURER_ID JHEF +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_MAX7456 +#define USE_FLASH +#define USE_FLASH_M25P16 +#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 PD12 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_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_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_BUS SPIDEV_1 + +#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 PD8 +#define GYRO_2_SPI_BUS SPIDEV_2 + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 120 + + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 16 +#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/JHEH743_AIO/target.mk b/src/main/target/JHEH743_AIO/target.mk new file mode 100644 index 0000000000..dd3a06717d --- /dev/null +++ b/src/main/target/JHEH743_AIO/target.mk @@ -0,0 +1,15 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/JHEH743_AIO_HD/target.c b/src/main/target/JHEH743_AIO_HD/target.c new file mode 100644 index 0000000000..07e7def552 --- /dev/null +++ b/src/main/target/JHEH743_AIO_HD/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEH743_AIO_HD/target.h b/src/main/target/JHEH743_AIO_HD/target.h new file mode 100644 index 0000000000..5f57e96dde --- /dev/null +++ b/src/main/target/JHEH743_AIO_HD/target.h @@ -0,0 +1,174 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME JHEH743_AIO_HD +#define MANUFACTURER_ID JHEF +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO_DPS310 +#define USE_FLASH_W25N01G +#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 PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE6 + +#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_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 CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 ESC_SENSOR_UART SERIAL_PORT_USART7 +#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 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 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 ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC5 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEH743_AIO_HD/target.mk b/src/main/target/JHEH743_AIO_HD/target.mk new file mode 100644 index 0000000000..1df27334fd --- /dev/null +++ b/src/main/target/JHEH743_AIO_HD/target.mk @@ -0,0 +1,18 @@ +H743_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_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/JHEH743_HD/target.c b/src/main/target/JHEH743_HD/target.c new file mode 100644 index 0000000000..07e7def552 --- /dev/null +++ b/src/main/target/JHEH743_HD/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEH743_HD/target.h b/src/main/target/JHEH743_HD/target.h new file mode 100644 index 0000000000..f88ba2c971 --- /dev/null +++ b/src/main/target/JHEH743_HD/target.h @@ -0,0 +1,174 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME JHEH743_HD +#define MANUFACTURER_ID JHEF +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_ICM42688P +#define USE_ACCGYRO_BMI270 +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO_DPS310 +#define USE_FLASH_W25N01G +#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 PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE6 + +#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_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 CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 ESC_SENSOR_UART SERIAL_PORT_USART7 +#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 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 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 ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 170 + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC5 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(5) | TIM_N(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/JHEH743_HD/target.mk b/src/main/target/JHEH743_HD/target.mk new file mode 100644 index 0000000000..1df27334fd --- /dev/null +++ b/src/main/target/JHEH743_HD/target.mk @@ -0,0 +1,18 @@ +H743_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_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/KAKUTEF4/target.h b/src/main/target/KAKUTEF4/target.h index b33aa0255b..e8e6ca31ac 100644 --- a/src/main/target/KAKUTEF4/target.h +++ b/src/main/target/KAKUTEF4/target.h @@ -112,6 +112,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define USE_VCP #define USB_DETECT_PIN PA8 diff --git a/src/main/target/KAKUTEF7MINIV3/target.h b/src/main/target/KAKUTEF7MINIV3/target.h index a34b4b4c17..c0be025c00 100644 --- a/src/main/target/KAKUTEF7MINIV3/target.h +++ b/src/main/target/KAKUTEF7MINIV3/target.h @@ -131,6 +131,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN SPI2_NSS_PIN #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/KAKUTEH7/target.c b/src/main/target/KAKUTEH7/target.c new file mode 100644 index 0000000000..9a7e7b8dc0 --- /dev/null +++ b/src/main/target/KAKUTEH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM1, CH1, PE9, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEH7/target.h b/src/main/target/KAKUTEH7/target.h new file mode 100644 index 0000000000..a81ff3ba59 --- /dev/null +++ b/src/main/target/KAKUTEH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME KAKUTEH7 +#define MANUFACTURER_ID HBRO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_MAX7456 +#define USE_SDCARD +#define USE_SDCARD_SPI + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE9 +#define USE_USB_DETECT +#define USB_DETECT_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_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_BUS SPIDEV_4 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PE4 +#define ICM42688P_SPI_BUS SPIDEV_4 + +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PE4 +#define BMI270_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#define USE_SDCARD_SDIO +#define SDCARD_SPI_CS_PIN PA4 +#define SDCARD_SPI_INSTANCE SPI1 +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 +#define SDCARD_DETECT_INVERTED + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 109 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 168 + +#define PINIO1_PIN PE13 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEH7/target.mk b/src/main/target/KAKUTEH7/target.mk new file mode 100644 index 0000000000..ceff75e8ff --- /dev/null +++ b/src/main/target/KAKUTEH7/target.mk @@ -0,0 +1,19 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +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/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/KAKUTEH7MINI/target.c b/src/main/target/KAKUTEH7MINI/target.c new file mode 100644 index 0000000000..9a7e7b8dc0 --- /dev/null +++ b/src/main/target/KAKUTEH7MINI/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM1, CH1, PE9, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEH7MINI/target.h b/src/main/target/KAKUTEH7MINI/target.h new file mode 100644 index 0000000000..5ca1d6da96 --- /dev/null +++ b/src/main/target/KAKUTEH7MINI/target.h @@ -0,0 +1,159 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME KAKUTEH7MINI +#define MANUFACTURER_ID HBRO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_W25N01G +#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 PC2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE9 +#define USE_USB_DETECT +#define USB_DETECT_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_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_BUS SPIDEV_4 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PE4 +#define ICM42688P_SPI_BUS SPIDEV_4 + +#define ACC_BMI270_ALIGN CW270_DEG +#define GYRO_BMI270_ALIGN CW270_DEG +#define BMI270_CS_PIN PE4 +#define BMI270_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 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 PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 168 + +#define PINIO1_PIN PB11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEH7MINI/target.mk b/src/main/target/KAKUTEH7MINI/target.mk new file mode 100644 index 0000000000..8feb9a7947 --- /dev/null +++ b/src/main/target/KAKUTEH7MINI/target.mk @@ -0,0 +1,19 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD 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/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/KAKUTEH7V2/target.c b/src/main/target/KAKUTEH7V2/target.c new file mode 100644 index 0000000000..9a7e7b8dc0 --- /dev/null +++ b/src/main/target/KAKUTEH7V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM1, CH1, PE9, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEH7V2/target.h b/src/main/target/KAKUTEH7V2/target.h new file mode 100644 index 0000000000..65cba24db9 --- /dev/null +++ b/src/main/target/KAKUTEH7V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME KAKUTEH7V2 +#define MANUFACTURER_ID HBRO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#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 PC2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE9 +#define USE_USB_DETECT +#define USB_DETECT_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_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PE1 + +#define USE_SPI_GYRO +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PE4 +#define BMI270_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 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 PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 109 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 168 + +#define PINIO1_PIN PE13 +#define PINIO2_PIN PB11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KAKUTEH7V2/target.mk b/src/main/target/KAKUTEH7V2/target.mk new file mode 100644 index 0000000000..814d995492 --- /dev/null +++ b/src/main/target/KAKUTEH7V2/target.mk @@ -0,0 +1,17 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/KONEXH743/target.c b/src/main/target/KONEXH743/target.c new file mode 100644 index 0000000000..92cc160745 --- /dev/null +++ b/src/main/target/KONEXH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, 1, NONE), // motor 1 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 2, NONE), // motor 2 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM4, CH4, PB9, TIM_USE_MOTOR, 0, 4, NONE), // motor 4 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 6, NONE), // motor 6 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 7, NONE), // motor 7 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_MOTOR, 0, 11, NONE), // motor 8 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM15, CH2, PA3, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KONEXH743/target.h b/src/main/target/KONEXH743/target.h new file mode 100644 index 0000000000..d0ed6c1405 --- /dev/null +++ b/src/main/target/KONEXH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME KONEXH743 +#define MANUFACTURER_ID KONX +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_ACC +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_BARO +#define USE_BARO_BMP388 + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI + +#define USE_LED +#define LED0_PIN PC13 +#define LED1_PIN PC10 +#define LED_STRIP_PIN PC9 +#define USE_BEEPER +#define BEEPER_PIN PE10 +#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_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 ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PB1 +#define GYRO_1_EXTI_PIN PB0 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PB12 +#define GYRO_2_EXTI_PIN PE13 +#define GYRO_2_SPI_BUS SPIDEV_2 + +#define USE_UART3 +#define UART3_TX_PIN PD8 +#define UART3_RX_PIN PD9 +#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 USE_UART7 +#define UART7_RX_PIN PA8 +#define USE_UART8 +#define UART8_TX_PIN PE1 +#define UART8_RX_PIN PE0 +#define SERIAL_PORT_COUNT 7 + +#define USE_I2C +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 +#define USE_I2C_DEVICE_4 +#define I2C_DEVICE_4 (I2CDEV_4) +#define MAG_I2C_INSTANCE I2CDEV_4 +#define I2C4_SCL PD12 +#define I2C4_SDA PD13 + +#define FLASH_CS_PIN PE4 +#define FLASH_SPI_INSTANCE SPI4 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC2_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC2_DMA_STREAM DMA2_Stream1 // ADC2 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 156 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define VTX_ENABLE_PIN PE3 +#define PINIO1_PIN VTX_ENABLE_PIN +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(8) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/KONEXH743/target.mk b/src/main/target/KONEXH743/target.mk new file mode 100644 index 0000000000..9f63b3506b --- /dev/null +++ b/src/main/target/KONEXH743/target.mk @@ -0,0 +1,15 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/LUXH743NDAA/target.c b/src/main/target/LUXH743NDAA/target.c new file mode 100644 index 0000000000..12189f21ca --- /dev/null +++ b/src/main/target/LUXH743NDAA/target.c @@ -0,0 +1,51 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PD13, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM2, CH3, PA2, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) + DEF_TIM(TIM3, CH3, PB0, TIM_USE_LED, 0, 11, NONE), // led strip + DEF_TIM(TIM12, CH2, PB15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/LUXH743NDAA/target.h b/src/main/target/LUXH743NDAA/target.h new file mode 100644 index 0000000000..25e1193737 --- /dev/null +++ b/src/main/target/LUXH743NDAA/target.h @@ -0,0 +1,183 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME LUXH743NDAA +#define MANUFACTURER_ID LMNR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +// #define USE_ACCGYRO_ICM45686 // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_SDCARD +#define USE_MAX7456 +#define USE_MAG +#define USE_GPS +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 PE3 +#define LED_STRIP_PIN PB0 +#define USE_BEEPER +#define BEEPER_PIN PA8 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA3 +#define USE_USB_DETECT +#define USB_DETECT_PIN PD2 + +#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 PB10 +#define SPI2_MISO_PIN PC2 +#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_DEVICE_4 +#define SPI4_SCK_PIN PE2 +#define SPI4_MISO_PIN PE5 +#define SPI4_MOSI_PIN PE6 +#define USE_SPI_DEVICE_6 +#define SPI6_SCK_PIN PB3 +#define SPI6_MISO_PIN PB4 +#define SPI6_MOSI_PIN PB5 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW270_DEG_FLIP +#define GYRO_1_ALIGN CW270_DEG_FLIP +#define GYRO_1_CS_PIN PD7 // ICM-42688-P SPI6_NSS +#define GYRO_1_EXTI_PIN PC13 // ICM-42688-P INT +#define GYRO_1_SPI_BUS SPI6 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1 +#define ACC_2_ALIGN CW180_DEG_FLIP +#define GYRO_2_ALIGN CW180_DEG_FLIP +#define GYRO_2_CS_PIN PA15 // ICM-45686 SPI3_NSS +#define GYRO_2_EXTI_PIN PD10 // ICM-45686 INT +#define GYRO_2_SPI_BUS SPIDEV_3 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PB13 +#define UART5_RX_PIN PB12 +#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_4 +#define I2C_DEVICE_4 (I2CDEV_4) +#define I2C4_SCL PB6 +#define I2C4_SDA PB7 + +#define FLASH_CS_PIN PA4 // SPI1_NSS +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define USE_SDCARD_SDIO +#define SDCARD_SPI_CS_PIN PB11 // SPI2_NSS +#define SDCARD_SPI_INSTANCE SPI2 +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 +#define SDCARD_DETECT_INVERTED + +#define MAX7456_SPI_CS_PIN PE4 // SPI4_NSS +#define MAX7456_SPI_INSTANCE SPI4 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 85 + +#define PINIO1_PIN PB1 // Camera Switch +#define PINIO2_PIN PB2 // VTX Power Switch +#define PINIO1_CONFIG 1 +#define PINIO1_BOX 40 +#define PINIO2_CONFIG 1 +#define PINIO2_BOX 41 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 16 +#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/LUXH743NDAA/target.mk b/src/main/target/LUXH743NDAA/target.mk new file mode 100644 index 0000000000..7c81887273 --- /dev/null +++ b/src/main/target/LUXH743NDAA/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/LUXMINIF7/target.h b/src/main/target/LUXMINIF7/target.h index f31801d219..3b5efa2575 100644 --- a/src/main/target/LUXMINIF7/target.h +++ b/src/main/target/LUXMINIF7/target.h @@ -135,6 +135,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/MAMBAF405US/target.h b/src/main/target/MAMBAF405US/target.h index 387fb1bb8b..03a6ad32d6 100644 --- a/src/main/target/MAMBAF405US/target.h +++ b/src/main/target/MAMBAF405US/target.h @@ -68,6 +68,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA15 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/MAMBAF405_2022B/target.h b/src/main/target/MAMBAF405_2022B/target.h index 3993c72aa7..df3d226c8d 100644 --- a/src/main/target/MAMBAF405_2022B/target.h +++ b/src/main/target/MAMBAF405_2022B/target.h @@ -42,10 +42,6 @@ #define USE_VCP #define USE_FLASHFS -#define USE_FLASH_M25P16 //testing -#define USE_FLASH_W25M //testing -#define USE_FLASH_W25M512 //testing -#define USE_FLASH_W25Q //testing #define USE_OSD #define USE_LED diff --git a/src/main/target/MAMBAF722/target.h b/src/main/target/MAMBAF722/target.h index b8c715f076..ead6778a96 100644 --- a/src/main/target/MAMBAF722/target.h +++ b/src/main/target/MAMBAF722/target.h @@ -176,6 +176,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN SPI3_NSS_PIN #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/MAMBAH743/target.c b/src/main/target/MAMBAH743/target.c new file mode 100644 index 0000000000..e64eb1c7aa --- /dev/null +++ b/src/main/target/MAMBAH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM17, CH1, PB9, TIM_USE_PPM, 0, 0, NONE), // ppm +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAH743/target.h b/src/main/target/MAMBAH743/target.h new file mode 100644 index 0000000000..4eda4ee5e3 --- /dev/null +++ b/src/main/target/MAMBAH743/target.h @@ -0,0 +1,170 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME MAMBAH743 +#define MANUFACTURER_ID DIAT +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_ICM42605 +#define USE_ACC_SPI_ICM42605 +#define USE_BARO_DPS310 +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_FLASH_W25N01G +#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 PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE6 + +#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_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 CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 BARO_I2C_INSTANCE I2CDEV_1 +#define MAG_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 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 ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 400 + +#define PINIO1_PIN PC5 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(5) | TIM_N(8) | TIM_N(16) | TIM_N(17) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAH743/target.mk b/src/main/target/MAMBAH743/target.mk new file mode 100644 index 0000000000..54cfb93880 --- /dev/null +++ b/src/main/target/MAMBAH743/target.mk @@ -0,0 +1,18 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/MAMBAH743_2022B/target.c b/src/main/target/MAMBAH743_2022B/target.c new file mode 100644 index 0000000000..e64eb1c7aa --- /dev/null +++ b/src/main/target/MAMBAH743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM17, CH1, PB9, TIM_USE_PPM, 0, 0, NONE), // ppm +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAH743_2022B/target.h b/src/main/target/MAMBAH743_2022B/target.h new file mode 100644 index 0000000000..41a808d617 --- /dev/null +++ b/src/main/target/MAMBAH743_2022B/target.h @@ -0,0 +1,171 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME MAMBAH743_2022B +#define MANUFACTURER_ID DIAT +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_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 PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE6 + +#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_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 CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 BARO_I2C_INSTANCE I2CDEV_1 +#define MAG_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 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 ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 80 + +#define PINIO1_PIN PC2 +#define PINIO2_PIN PC5 +#define PINIO1_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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(5) | TIM_N(8) | TIM_N(16) | TIM_N(17) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MAMBAH743_2022B/target.mk b/src/main/target/MAMBAH743_2022B/target.mk new file mode 100644 index 0000000000..81193921b2 --- /dev/null +++ b/src/main/target/MAMBAH743_2022B/target.mk @@ -0,0 +1,17 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/MATEKF722HD/target.h b/src/main/target/MATEKF722HD/target.h index 9b8d24aca8..3fad0ebc5f 100644 --- a/src/main/target/MATEKF722HD/target.h +++ b/src/main/target/MATEKF722HD/target.h @@ -97,8 +97,8 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS -#define USE_FLASH_W25M -#define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/MATEKF722PX/target.h b/src/main/target/MATEKF722PX/target.h index 9ca2925349..ccc18dd0bb 100644 --- a/src/main/target/MATEKF722PX/target.h +++ b/src/main/target/MATEKF722PX/target.h @@ -102,7 +102,6 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 -#define USE_FLASH_W25M #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/MATEKH743/target.c b/src/main/target/MATEKH743/target.c new file mode 100644 index 0000000000..3984c0f44b --- /dev/null +++ b/src/main/target/MATEKH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MATEKH743/target.h b/src/main/target/MATEKH743/target.h new file mode 100644 index 0000000000..fce8d6c305 --- /dev/null +++ b/src/main/target/MATEKH743/target.h @@ -0,0 +1,171 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME MATEKH743 +#define MANUFACTURER_ID MTKS +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_MPU6000 +#define USE_ACC_SPI_MPU6500 +#define USE_ACC_SPI_ICM42605 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_MPU6000 +#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_SPI_ICM42605 +#define USE_GYRO_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_MAX7456 +#define USE_SDCARD + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#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 PD7 +#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_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 ENSURE_MPU_DATA_READY_IS_LOW + +#define ACC_1_ALIGN CW0_DEG_FLIP +#define GYRO_1_ALIGN CW0_DEG_FLIP +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW90_DEG_FLIP +#define GYRO_2_ALIGN CW90_DEG_FLIP +#define GYRO_2_CS_PIN PC13 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 SERIALRX_UART SERIAL_PORT_USART6 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define PINIO1_PIN PD10 +#define PINIO2_PIN PD11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MATEKH743/target.mk b/src/main/target/MATEKH743/target.mk new file mode 100644 index 0000000000..1feba95b59 --- /dev/null +++ b/src/main/target/MATEKH743/target.mk @@ -0,0 +1,20 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +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 \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/MICOAIR743/target.c b/src/main/target/MICOAIR743/target.c new file mode 100644 index 0000000000..042e7936e2 --- /dev/null +++ b/src/main/target/MICOAIR743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, CH4, PE14, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_LED, 0, 12, NONE), // led strip + DEF_TIM(TIM4, CH4, PD15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MICOAIR743/target.h b/src/main/target/MICOAIR743/target.h new file mode 100644 index 0000000000..dc518e961d --- /dev/null +++ b/src/main/target/MICOAIR743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME MICOAIR743 +#define MANUFACTURER_ID MICO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_SDCARD +#define USE_MAX7456 +#define USE_MAG +#define USE_MAG_IST8310 + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE4 +#define LED1_PIN PE6 +#define LED2_PIN PE5 +#define LED_STRIP_PIN PD14 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#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 PD3 +#define SPI2_MISO_PIN PC2 +#define SPI2_MOSI_PIN PC3 + +#define USE_SPI_GYRO +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA15 +#define BMI270_SPI_BUS SPIDEV_2 + +#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 PD8 +#define UART3_RX_PIN PD9 +#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 MSP_UART SERIAL_PORT_USART1 +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART2 +#define GPS_UART SERIAL_PORT_USART3 +#define SERIALRX_UART SERIAL_PORT_USART6 +#define ESC_SENSOR_UART SERIAL_PORT_USART7 +#define SERIAL_PORT_COUNT 8 + +#define USE_I2C +#define USE_I2C_DEVICE_1 +#define I2C_DEVICE_1 (I2CDEV_1) +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define MAG_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 213 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 402 + +#define PINIO1_PIN PD4 +#define PINIO2_PIN PD5 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MICOAIR743/target.mk b/src/main/target/MICOAIR743/target.mk new file mode 100644 index 0000000000..90419b9d44 --- /dev/null +++ b/src/main/target/MICOAIR743/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/MICOAIR743V2/target.c b/src/main/target/MICOAIR743V2/target.c new file mode 100644 index 0000000000..042e7936e2 --- /dev/null +++ b/src/main/target/MICOAIR743V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, CH4, PE14, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_LED, 0, 12, NONE), // led strip + DEF_TIM(TIM4, CH4, PD15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MICOAIR743V2/target.h b/src/main/target/MICOAIR743V2/target.h new file mode 100644 index 0000000000..86e160ae92 --- /dev/null +++ b/src/main/target/MICOAIR743V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME MICOAIR743V2 +#define MANUFACTURER_ID MICO +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_GYRO +#define USE_ACCGYRO_BMI270 +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_SDCARD +#define USE_MAX7456 +#define USE_SPI_GYRO + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE2 +#define LED2_PIN PE4 +#define LED_STRIP_PIN PD14 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#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 PB3 +#define SPI3_MISO_PIN PB4 +#define SPI3_MOSI_PIN PD6 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PB7 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PA15 +#define BMI270_SPI_BUS SPIDEV_3 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PA0 +#define UART4_RX_PIN PA1 +#define USE_UART5 +#define UART5_TX_PIN PB6 +#define UART5_RX_PIN PB5 +#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 MSP_DISPLAYPORT_UART SERIAL_PORT_USART2 +#define GPS_UART SERIAL_PORT_USART3 +#define MSP_UART SERIAL_PORT_USART1 +#define ESC_SENSOR_UART SERIAL_PORT_USART7 +#define SERIALRX_UART SERIAL_PORT_USART6 +#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 I2C1_SCL PB8 +#define I2C1_SDA PB9 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#define MAX7456_SPI_CS_PIN PB12 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 211 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 707 +#define ADC_INSTANCE ADC1 + +#define PINIO1_PIN PE5 +#define PINIO2_PIN PE6 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MICOAIR743V2/target.mk b/src/main/target/MICOAIR743V2/target.mk new file mode 100644 index 0000000000..90419b9d44 --- /dev/null +++ b/src/main/target/MICOAIR743V2/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/MINI_H743_HD/target.c b/src/main/target/MINI_H743_HD/target.c new file mode 100644 index 0000000000..f664ca4189 --- /dev/null +++ b/src/main/target/MINI_H743_HD/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 1 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1, NONE), // ppm + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0, NONE), // motor 5 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 4 + DEF_TIM(TIM1, CH1, PE9, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH2, PE11, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 4, NONE), // motor 7 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 5, NONE), // motor 8 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_ANY, 0, 6, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM1, CH4, PE14, TIM_USE_ANY, 0, 7, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 2, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 4, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 2 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_ANY, 0, 12, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH4, PD15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM15, CH2, PE6, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MINI_H743_HD/target.h b/src/main/target/MINI_H743_HD/target.h new file mode 100644 index 0000000000..54c4d0f421 --- /dev/null +++ b/src/main/target/MINI_H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME MINI_H743_HD +#define MANUFACTURER_ID RAST +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_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 PE2 +#define LED1_PIN PE3 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB3 +#define CAMERA_CONTROL_PIN PD9 + +#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 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 CW180_DEG +#define GYRO_1_ALIGN CW180_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG_FLIP +#define GYRO_2_ALIGN CW0_DEG_FLIP +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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_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 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 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 PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC2_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC2_DMA_STREAM DMA2_Stream1 // ADC2 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define PINIO1_PIN PD9 +#define PINIO2_PIN PD11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/MINI_H743_HD/target.mk b/src/main/target/MINI_H743_HD/target.mk new file mode 100644 index 0000000000..c1dc553d47 --- /dev/null +++ b/src/main/target/MINI_H743_HD/target.mk @@ -0,0 +1,16 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/NBD_GALAXYAIO255/target.c b/src/main/target/NBD_GALAXYAIO255/target.c new file mode 100644 index 0000000000..20897f716a --- /dev/null +++ b/src/main/target/NBD_GALAXYAIO255/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 4, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 5, NONE), // 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_GALAXYAIO255/target.h b/src/main/target/NBD_GALAXYAIO255/target.h new file mode 100644 index 0000000000..9e49ee2dac --- /dev/null +++ b/src/main/target/NBD_GALAXYAIO255/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME NBD_GALAXYAIO255 +#define MANUFACTURER_ID NEBD +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +#define USE_MAX7456 +#define USE_SDCARD +#define USE_BARO_DPS310 +#define USE_BARO +#define USE_SDCARD_SDIO + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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 PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 ADC1_DMA_OPT 8 +#define ADC2_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC2_DMA_STREAM DMA2_Stream1 // ADC2 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(5) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NBD_GALAXYAIO255/target.mk b/src/main/target/NBD_GALAXYAIO255/target.mk new file mode 100644 index 0000000000..61229eff23 --- /dev/null +++ b/src/main/target/NBD_GALAXYAIO255/target.mk @@ -0,0 +1,15 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/NBD_INFINITYAIO255/target.h b/src/main/target/NBD_INFINITYAIO255/target.h index f24f59baf3..f23303dab4 100644 --- a/src/main/target/NBD_INFINITYAIO255/target.h +++ b/src/main/target/NBD_INFINITYAIO255/target.h @@ -31,6 +31,7 @@ #define USE_GYRO_SPI_MPU6000 #define USE_FLASH #define USE_FLASH_W25Q128FV +#define USE_FLASH_W25N01G #define USE_MAX7456 #define USE_VCP diff --git a/src/main/target/NBD_INFINITYAIOV2PRO/target.h b/src/main/target/NBD_INFINITYAIOV2PRO/target.h index 5cb9c35778..c82ab1059f 100644 --- a/src/main/target/NBD_INFINITYAIOV2PRO/target.h +++ b/src/main/target/NBD_INFINITYAIOV2PRO/target.h @@ -123,11 +123,6 @@ #define FLASH_CS_PIN PB0 #define FLASH_SPI_INSTANCE SPI1 -#define USE_FLASH_M25P16 // testing // 16MB Micron M25P16 and others (ref: https://github.com/betaflight/betaflight/blob/master/src/main/drivers/flash_m25p16.c) -#define USE_FLASH_W25M // testing // 1Gb NAND flash support -#define USE_FLASH_W25M512 // testing // 16, 32, 64 or 128MB Winbond stacked die support -#define USE_FLASH_W25Q // testing // 512Kb (256Kb x 2 stacked) NOR flash support - #define USE_I2C #define USE_I2C_DEVICE_1 #define I2C_DEVICE_1 (I2CDEV_1) diff --git a/src/main/target/NEUTRONRCH743AIO/target.c b/src/main/target/NEUTRONRCH743AIO/target.c new file mode 100644 index 0000000000..e25eae9a7a --- /dev/null +++ b/src/main/target/NEUTRONRCH743AIO/target.c @@ -0,0 +1,53 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_ANY, 0, 12, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM4, CH4, PD15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM15, CH2, PE6, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM17, CH1, PB9, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCH743AIO/target.h b/src/main/target/NEUTRONRCH743AIO/target.h new file mode 100644 index 0000000000..31bd075446 --- /dev/null +++ b/src/main/target/NEUTRONRCH743AIO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME NEUTRONRCH743AIO +#define MANUFACTURER_ID NERC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +// TODO: FLASH_CS_PIN and FLASH_SPI_INSTANCE unknown — research Neutron RC H743 AIO hardware +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_MAX7456 +#define USE_BARO_DPS310 +#define USE_SDCARD +#define USE_BARO +#define USE_SDCARD_SDIO + +#define USE_VCP +#define USE_FLASHFS +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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_DEVICE_4 +#define SPI4_SCK_PIN PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + + +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_AIRMODE | FEATURE_RX_SERIAL) +#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL + +#define USABLE_TIMER_CHANNEL_COUNT 18 +#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(15) | TIM_N(16) | TIM_N(17) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCH743AIO/target.mk b/src/main/target/NEUTRONRCH743AIO/target.mk new file mode 100644 index 0000000000..332b56503b --- /dev/null +++ b/src/main/target/NEUTRONRCH743AIO/target.mk @@ -0,0 +1,15 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/NEUTRONRCH7BT/target.c b/src/main/target/NEUTRONRCH7BT/target.c new file mode 100644 index 0000000000..4632318961 --- /dev/null +++ b/src/main/target/NEUTRONRCH7BT/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 14, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCH7BT/target.h b/src/main/target/NEUTRONRCH7BT/target.h new file mode 100644 index 0000000000..b9bb14048d --- /dev/null +++ b/src/main/target/NEUTRONRCH7BT/target.h @@ -0,0 +1,173 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME NEUTRONRCH7BT +#define MANUFACTURER_ID NERC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +// TODO: FLASH_CS_PIN and FLASH_SPI_INSTANCE unknown — research Neutron RC H7BT hardware +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_MAX7456 +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_SDCARD +#define USE_MAG +#define USE_MAG_QMC5883 +#define USE_SDCARD_SDIO + +#define USE_VCP +#define USE_FLASHFS +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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_DEVICE_4 +#define SPI4_SCK_PIN PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + + +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 210 + +#define PINIO1_PIN PC3 +#define PINIO2_PIN PD10 +#define PINIO3_PIN PD11 +#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 +#define TARGET_IO_PORTD 0xffff +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/NEUTRONRCH7BT/target.mk b/src/main/target/NEUTRONRCH7BT/target.mk new file mode 100644 index 0000000000..ca762d2b2a --- /dev/null +++ b/src/main/target/NEUTRONRCH7BT/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_bmi270.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/OMNIBUSF4FW/target.h b/src/main/target/OMNIBUSF4FW/target.h index e6d9b09272..bc563c9429 100644 --- a/src/main/target/OMNIBUSF4FW/target.h +++ b/src/main/target/OMNIBUSF4FW/target.h @@ -113,6 +113,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define FLASH_SPI_INSTANCE SPI2 #define FLASH_CS_PIN PB12 diff --git a/src/main/target/PRINCIPIOTH7PI/target.c b/src/main/target/PRINCIPIOTH7PI/target.c new file mode 100644 index 0000000000..279110f3ff --- /dev/null +++ b/src/main/target/PRINCIPIOTH7PI/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 6 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/PRINCIPIOTH7PI/target.h b/src/main/target/PRINCIPIOTH7PI/target.h new file mode 100644 index 0000000000..89ba603c06 --- /dev/null +++ b/src/main/target/PRINCIPIOTH7PI/target.h @@ -0,0 +1,159 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME PRINCIPIOTH7PI +#define MANUFACTURER_ID PRIN +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_SDCARD +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +// #define USE_ACCGYRO_IIM42653 // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_DPS310 // DPS368, but it's equivalent +#define USE_MAG +#define USE_MAG_LIS2MDL + +#define USE_VCP + +#define USE_LED +#define LED0_PIN PE3 // Blue +#define LED1_PIN PE4 // Green +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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_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 ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_TX_PIN PE8 // Not connected +#define UART7_RX_PIN PE7 +#define USE_UART8 +#define UART8_TX_PIN PE1 +#define UART8_RX_PIN PE0 +#define SERIALRX_UART SERIAL_PORT_USART8 +#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 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 USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 +#define SDCARD_DETECT_INVERTED + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PD10 +#define PINIO1_CONFIG 129 // PINIO_CONFIG_MODE_OUT_PP, 10V enable, active low +#define PINIO1_BOX 40 // USER1 +#define PINIO2_PIN PD11 +#define PINIO2_CONFIG 1 // PINIO_CONFIG_MODE_OUT_PP +#define PINIO2_BOX 41 // USER2 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/PRINCIPIOTH7PI/target.mk b/src/main/target/PRINCIPIOTH7PI/target.mk new file mode 100644 index 0000000000..a349965468 --- /dev/null +++ b/src/main/target/PRINCIPIOTH7PI/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/PYRODRONEF4PDB/target.h b/src/main/target/PYRODRONEF4PDB/target.h index 6e9e8c12e9..adc12e41af 100644 --- a/src/main/target/PYRODRONEF4PDB/target.h +++ b/src/main/target/PYRODRONEF4PDB/target.h @@ -63,6 +63,12 @@ #define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz #define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST) +#define USE_FLASH_W25Q128FV +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + // DEFINE UART AND VCP diff --git a/src/main/target/RMNOVAH7/target.c b/src/main/target/RMNOVAH7/target.c new file mode 100644 index 0000000000..197d9d993c --- /dev/null +++ b/src/main/target/RMNOVAH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH1, PA6, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM3, CH2, PA7, TIM_USE_MOTOR, 0, 6, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 7, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 8, NONE), // motor 8 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_LED, 0, 9, NONE), // led strip + DEF_TIM(TIM2, CH1, PA5, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/RMNOVAH7/target.h b/src/main/target/RMNOVAH7/target.h new file mode 100644 index 0000000000..8193dae021 --- /dev/null +++ b/src/main/target/RMNOVAH7/target.h @@ -0,0 +1,142 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME RMNOVAH7 +#define MANUFACTURER_ID RDMS +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_ACC +#define USE_ACC_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 PC4 +#define LED1_PIN PC5 +#define USE_BEEPER +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PA10 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PB3 +#define SPI1_MISO_PIN PB4 +#define SPI1_MOSI_PIN PB5 +#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 MPU_INT_EXTI PD7 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PA15 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#define USE_UART1 +#define USE_UART2 +#define USE_UART3 +#define USE_UART4 +#define USE_UART5 +#define USE_UART6 +#define USE_UART7 +#define USE_UART8 +#define SERIALRX_UART SERIAL_PORT_USART6 +#define SERIAL_PORT_COUNT 9 + +#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 PA8 +#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 ADC1_DMA_OPT 10 +#define ADC3_DMA_OPT 11 +#define ADC1_DMA_STREAM DMA2_Stream2 // ADC1 opt10 +#define ADC3_DMA_STREAM DMA2_Stream3 // ADC3 opt11 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PA3 +#define PINIO2_PIN PA2 +#define PINIO3_PIN PA1 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 +#define PINIO2_CONFIG 129 +#define PINIO3_BOX 42 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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/RMNOVAH7/target.mk b/src/main/target/RMNOVAH7/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/RMNOVAH7/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/RUSHCORE7/target.h b/src/main/target/RUSHCORE7/target.h index 14e945b9bf..1979aacb64 100644 --- a/src/main/target/RUSHCORE7/target.h +++ b/src/main/target/RUSHCORE7/target.h @@ -122,6 +122,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PC15 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/SAKURAH743/target.c b/src/main/target/SAKURAH743/target.c new file mode 100644 index 0000000000..134c2b8c13 --- /dev/null +++ b/src/main/target/SAKURAH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 2, NONE), // motor 4 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 4, NONE), // motor 6 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 5, NONE), // motor 5 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM15, CH2, PE6, TIM_USE_MOTOR, 0, 0, NONE), // motor 8; dma -1 in config (input only) + DEF_TIM(TIM4, CH1, PD12, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PD13, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM16, CH1, PB8, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 7, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SAKURAH743/target.h b/src/main/target/SAKURAH743/target.h new file mode 100644 index 0000000000..400a5801e4 --- /dev/null +++ b/src/main/target/SAKURAH743/target.h @@ -0,0 +1,167 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME SAKURAH743 +#define MANUFACTURER_ID SSAK +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +// #define USE_ACCGYRO_IIM42652 // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_SPI_DPS310 +#define USE_MAG +#define USE_MAG_IST8310 +#define USE_SDCARD +#define USE_I2C_PULLUP + +#define USE_VCP + +#define USE_LED +#define LED0_PIN PB3 +#define LED1_PIN PB4 +#define LED2_PIN PB5 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PD7 +#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_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 ACC_1_ALIGN CW0_DEG_FLIP +#define GYRO_1_ALIGN CW0_DEG_FLIP +#define GYRO_1_CS_PIN PE11 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_4 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG_FLIP +#define GYRO_2_ALIGN CW0_DEG_FLIP +#define GYRO_2_CS_PIN PA4 +#define GYRO_2_EXTI_PIN PC4 +#define GYRO_2_SPI_BUS SPIDEV_1 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 MSP_UART SERIAL_PORT_USART1 +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART6 +#define GPS_UART SERIAL_PORT_USART3 +#define ESC_SENSOR_UART SERIAL_PORT_USART8 +#define SERIAL_PORT_COUNT 8 + +#define BARO_CS_PIN PC5 +#define BARO_SPI_INSTANCE SPI1 +#define DPS310_CS_PIN PC5 +#define DPS310_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 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 USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define RSSI_ADC_PIN PC1 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 170 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define PINIO1_PIN PE15 +#define PINIO2_PIN PD10 +#define PINIO3_PIN PD11 +#define PINIO1_BOX 40 +#define PINIO2_BOX 41 +#define PINIO3_BOX 43 +#define PINIO1_CONFIG 129 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(15) | TIM_N(16) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SAKURAH743/target.mk b/src/main/target/SAKURAH743/target.mk new file mode 100644 index 0000000000..a349965468 --- /dev/null +++ b/src/main/target/SAKURAH743/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/SDMODELH7/target.c b/src/main/target/SDMODELH7/target.c new file mode 100644 index 0000000000..8670ddac39 --- /dev/null +++ b/src/main/target/SDMODELH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM1, CH1, PE9, TIM_USE_ANY, 0, 12, NONE), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SDMODELH7/target.h b/src/main/target/SDMODELH7/target.h new file mode 100644 index 0000000000..4f434fb8dd --- /dev/null +++ b/src/main/target/SDMODELH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME SDMODELH7 +#define MANUFACTURER_ID SDRC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_BMP280 +#define USE_BARO_MS5611 +#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 PC2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE9 +#define USE_USB_DETECT +#define USB_DETECT_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_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 PE1 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PE4 +#define ICM42688P_SPI_BUS SPIDEV_4 + +#define ACC_BMI270_ALIGN CW0_DEG +#define GYRO_BMI270_ALIGN CW0_DEG +#define BMI270_CS_PIN PE4 +#define BMI270_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_RX_PIN PE7 +#define MSP_UART SERIAL_PORT_USART1 +#define MSP_UART_SERIAL_PORT_USART2 +#define SERIALRX_UART SERIAL_PORT_USART6 +#define ESC_SENSOR_UART SERIAL_PORT_USART7 +#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 PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 109 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 168 + +#define PINIO1_PIN PE13 +#define PINIO2_PIN PB11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SDMODELH7/target.mk b/src/main/target/SDMODELH7/target.mk new file mode 100644 index 0000000000..1bc5428822 --- /dev/null +++ b/src/main/target/SDMODELH7/target.mk @@ -0,0 +1,18 @@ +H743_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/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/SDMODELH7V2/target.c b/src/main/target/SDMODELH7V2/target.c new file mode 100644 index 0000000000..8670ddac39 --- /dev/null +++ b/src/main/target/SDMODELH7V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 14, NONE), // led strip + DEF_TIM(TIM1, CH1, PE9, TIM_USE_ANY, 0, 12, NONE), // cam ctrl +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SDMODELH7V2/target.h b/src/main/target/SDMODELH7V2/target.h new file mode 100644 index 0000000000..91728990af --- /dev/null +++ b/src/main/target/SDMODELH7V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME SDMODELH7V2 +#define MANUFACTURER_ID SDRC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_MS5611 +#define USE_MAG +#define USE_MAG_IST8310 +#define USE_MAX7456 +#define USE_SDCARD +#define USE_SDCARD_SPI + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PC2 +#define LED_STRIP_PIN PD12 +#define USE_BEEPER +#define BEEPER_PIN PC13 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PE9 +#define USE_USB_DETECT +#define USB_DETECT_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_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_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART6 +#define UART6_TX_PIN PC6 +#define UART6_RX_PIN PC7 +#define USE_UART7 +#define UART7_RX_PIN PE7 +#define MSP_UART SERIAL_PORT_USART2 +#define VTX_TRAMP_UART SERIAL_PORT_USART3 +#define SERIALRX_UART SERIAL_PORT_USART6 +#define ESC_SENSOR_UART SERIAL_PORT_USART7 +#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 USE_SDCARD_SDIO +#define SDCARD_SPI_CS_PIN PA4 +#define SDCARD_SPI_INSTANCE SPI1 +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 +#define SDCARD_DETECT_INVERTED + +#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 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 109 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 168 + +#define PINIO1_PIN PE13 +#define PINIO2_PIN PB11 +#define PINIO1_BOX 0 +#define PINIO1_CONFIG 129 +#define PINIO2_BOX 40 +#define PINIO2_CONFIG 129 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(8) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SDMODELH7V2/target.mk b/src/main/target/SDMODELH7V2/target.mk new file mode 100644 index 0000000000..80e6c69b32 --- /dev/null +++ b/src/main/target/SDMODELH7V2/target.mk @@ -0,0 +1,17 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/SEQUREH7/target.c b/src/main/target/SEQUREH7/target.c new file mode 100644 index 0000000000..4cfce39515 --- /dev/null +++ b/src/main/target/SEQUREH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, CH4, PD15, TIM_USE_ANY, 0, 5, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH2N, PB0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH3N, PB1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 4, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0, NONE), // cam ctrl + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0, NONE), // motor 6 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SEQUREH7/target.h b/src/main/target/SEQUREH7/target.h new file mode 100644 index 0000000000..bd5f640621 --- /dev/null +++ b/src/main/target/SEQUREH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME SEQUREH7 +#define MANUFACTURER_ID SQRE +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_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 PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#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_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define USE_MPU_DATA_READY_SIGNAL + +#define MPU_INT_EXTI PD0 + +#define ACC_MPU6000_ALIGN CW0_DEG +#define GYRO_MPU6000_ALIGN CW0_DEG +#define MPU6000_CS_PIN PB12 +#define MPU6000_SPI_BUS SPIDEV_2 + +#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_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_RX_PIN PE0 +#define SERIALRX_UART SERIAL_PORT_USART1 +#define GPS_UART SERIAL_PORT_USART6 +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART7 +#define ESC_SENSOR_UART SERIAL_PORT_USART8 +#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 PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 1052 +#define ADC_INSTANCE ADC1 + +#define ENABLE_DSHOT_DMAR false + + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SEQUREH7/target.mk b/src/main/target/SEQUREH7/target.mk new file mode 100644 index 0000000000..dfd304dc4a --- /dev/null +++ b/src/main/target/SEQUREH7/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/SEQUREH7V2/target.c b/src/main/target/SEQUREH7V2/target.c new file mode 100644 index 0000000000..66bcf8a5ae --- /dev/null +++ b/src/main/target/SEQUREH7V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0, NONE), // motor 2 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0, NONE), // motor 6 + DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0, NONE), // motor 7 + DEF_TIM(TIM2, CH4, PB11, TIM_USE_MOTOR, 0, 0, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SEQUREH7V2/target.h b/src/main/target/SEQUREH7V2/target.h new file mode 100644 index 0000000000..4ba28bddd0 --- /dev/null +++ b/src/main/target/SEQUREH7V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME SEQUREH7V2 +#define MANUFACTURER_ID SQRE +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#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_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 PC13 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PD15 +#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_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PD0 + +#define ACC_ICM42688P_ALIGN CW90_DEG +#define GYRO_ICM42688P_ALIGN CW90_DEG +#define ICM42688P_CS_PIN PB12 +#define ICM42688P_SPI_BUS SPIDEV_2 + +#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_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_RX_PIN PE0 +#define SERIALRX_UART SERIAL_PORT_USART1 +#define GPS_UART SERIAL_PORT_USART6 +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART7 +#define ESC_SENSOR_UART SERIAL_PORT_USART8 +#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 PA4 +#define MAX7456_SPI_INSTANCE SPI1 + +#define USE_ADC +#define VBAT_ADC_PIN PC3 +#define CURRENT_METER_ADC_PIN PC2 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 1052 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SEQUREH7V2/target.mk b/src/main/target/SEQUREH7V2/target.mk new file mode 100644 index 0000000000..d9b74cc813 --- /dev/null +++ b/src/main/target/SEQUREH7V2/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/SIMPLIFLYH7/target.c b/src/main/target/SIMPLIFLYH7/target.c new file mode 100644 index 0000000000..4f5b4aed86 --- /dev/null +++ b/src/main/target/SIMPLIFLYH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, 0, NONE), // motor 1 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PB6, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH2, PB7, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 3; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 4; dma -1 in config (input only) + DEF_TIM(TIM3, CH2, PB5, TIM_USE_LED, 0, 4, NONE), // led strip + DEF_TIM(TIM2, CH2, PB3, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SIMPLIFLYH7/target.h b/src/main/target/SIMPLIFLYH7/target.h new file mode 100644 index 0000000000..2a27ca8f5c --- /dev/null +++ b/src/main/target/SIMPLIFLYH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME SIMPLIFLYH7 +#define MANUFACTURER_ID SFLY +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_ACC +#define USE_GYRO_SPI_ICM42688P +#define USE_ACC_SPI_ICM42688P +#define USE_BARO +#define USE_BARO_BMP280 +#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 PD1 +#define LED_STRIP_PIN PB5 +#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_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PC3 + +#define ACC_ICM42688P_ALIGN CW270_DEG_FLIP +#define GYRO_ICM42688P_ALIGN CW270_DEG_FLIP +#define ICM42688P_CS_PIN PC4 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#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_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 PD0 +#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 8 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PB2 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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/SIMPLIFLYH7/target.mk b/src/main/target/SIMPLIFLYH7/target.mk new file mode 100644 index 0000000000..c0f977c721 --- /dev/null +++ b/src/main/target/SIMPLIFLYH7/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/SKYSTARSF7HD/target.h b/src/main/target/SKYSTARSF7HD/target.h index 6f013d026c..e08e6aac7f 100644 --- a/src/main/target/SKYSTARSF7HD/target.h +++ b/src/main/target/SKYSTARSF7HD/target.h @@ -173,6 +173,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA15 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/SKYSTARSF7HDPRO/target.h b/src/main/target/SKYSTARSF7HDPRO/target.h index 1b0da42940..b13dfe6376 100644 --- a/src/main/target/SKYSTARSF7HDPRO/target.h +++ b/src/main/target/SKYSTARSF7HDPRO/target.h @@ -177,6 +177,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA15 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/SKYSTARSH7HD/target.c b/src/main/target/SKYSTARSH7HD/target.c new file mode 100644 index 0000000000..8538847455 --- /dev/null +++ b/src/main/target/SKYSTARSH7HD/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 5 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 6 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 7 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 8 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 3 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 4 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SKYSTARSH7HD/target.h b/src/main/target/SKYSTARSH7HD/target.h new file mode 100644 index 0000000000..728f3f2f68 --- /dev/null +++ b/src/main/target/SKYSTARSH7HD/target.h @@ -0,0 +1,168 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME SKYSTARSH7HD +#define MANUFACTURER_ID SKST +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_ACC +#define USE_ACCGYRO_BMI270 +#define USE_ACC_SPI_ICM42688P +#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 PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PB3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE2 + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PA5 +#define SPI1_MISO_PIN PA6 +#define SPI1_MOSI_PIN PD7 +#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 PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART5 +#define UART5_TX_PIN PB6 +#define UART5_RX_PIN PB5 +#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 I2C1_SCL PB8 +#define I2C1_SDA PB9 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (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 PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define RSSI_ADC_PIN PC3 +#define ADC1_DMA_OPT 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 290 + +#define PINIO1_PIN PC5 +#define PINIO2_PIN PC2 +#define PINIO3_PIN PD11 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SKYSTARSH7HD/target.mk b/src/main/target/SKYSTARSH7HD/target.mk new file mode 100644 index 0000000000..e73b8e28ca --- /dev/null +++ b/src/main/target/SKYSTARSH7HD/target.mk @@ -0,0 +1,18 @@ +H743_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/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/SPEDIXH743/target.c b/src/main/target/SPEDIXH743/target.c new file mode 100644 index 0000000000..2b5fc9b383 --- /dev/null +++ b/src/main/target/SPEDIXH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM3, CH1, PA6, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM3, CH2, PA7, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM2, CH1, PA5, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM3, CH3, PB0, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM4, CH3, PD14, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM15, CH1N, PA1, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEDIXH743/target.h b/src/main/target/SPEDIXH743/target.h new file mode 100644 index 0000000000..b4a1a8e872 --- /dev/null +++ b/src/main/target/SPEDIXH743/target.h @@ -0,0 +1,173 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME SPEDIXH743 +#define MANUFACTURER_ID SPDX +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_MAX7456 +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#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 LED1_PIN PC5 +#define LED_STRIP_PIN PA0 // TIM5_CH1 +#define USE_BEEPER +#define BEEPER_PIN PD14 // TIM4_CH3 +#define BEEPER_INVERTED +#define CAMERA_CONTROL_PIN PA1 // TIM15_CH1N + +#define USE_SPI +#define USE_SPI_DEVICE_1 +#define SPI1_SCK_PIN PB3 +#define SPI1_MISO_PIN PB4 +#define SPI1_MOSI_PIN PB5 +#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 ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PA15 +#define GYRO_1_EXTI_PIN PD7 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW90_DEG +#define GYRO_2_ALIGN CW90_DEG +#define GYRO_2_CS_PIN PE3 +#define GYRO_2_EXTI_PIN PE4 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#define USE_UART5 +#define UART5_TX_PIN PB6 +#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 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 USE_I2C_DEVICE_4 +#define I2C_DEVICE_4 (I2CDEV_4) +#define I2C4_SCL PD12 +#define I2C4_SDA PD13 + +#define FLASH_CS_PIN PA8 +#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 ADC1_DMA_OPT 9 +#define ADC2_DMA_OPT 10 +#define ADC3_DMA_OPT 11 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC2_DMA_STREAM DMA2_Stream2 // ADC2 opt10 +#define ADC3_DMA_STREAM DMA2_Stream3 // ADC3 opt11 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 350 + +#define PINIO1_PIN PA2 // VTX Switch +#define PINIO2_PIN PA3 // Camera Switch +#define PINIO1_CONFIG 129 +#define PINIO1_BOX 40 +#define PINIO2_CONFIG 1 +#define PINIO2_BOX 41 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/SPEDIXH743/target.mk b/src/main/target/SPEDIXH743/target.mk new file mode 100644 index 0000000000..c9bb4b8e34 --- /dev/null +++ b/src/main/target/SPEDIXH743/target.mk @@ -0,0 +1,17 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/SPEEDYBEEF4/target.h b/src/main/target/SPEEDYBEEF4/target.h index 78d88200df..11e5556c33 100644 --- a/src/main/target/SPEEDYBEEF4/target.h +++ b/src/main/target/SPEEDYBEEF4/target.h @@ -78,6 +78,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PC0 #define FLASH_SPI_INSTANCE SPI3 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/SPEEDYBEEF7/target.h b/src/main/target/SPEEDYBEEF7/target.h index 8284d2be77..7863fd26e4 100644 --- a/src/main/target/SPEEDYBEEF7/target.h +++ b/src/main/target/SPEEDYBEEF7/target.h @@ -86,6 +86,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PC0 #define FLASH_SPI_INSTANCE SPI3 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/SPEEDYBEEF7V2/target.h b/src/main/target/SPEEDYBEEF7V2/target.h index 4a89a544f3..f892784572 100644 --- a/src/main/target/SPEEDYBEEF7V2/target.h +++ b/src/main/target/SPEEDYBEEF7V2/target.h @@ -86,6 +86,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA14 #define FLASH_SPI_INSTANCE SPI3 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/SPEEDYBEEF7V3/target.h b/src/main/target/SPEEDYBEEF7V3/target.h index 5b486a567b..953024b5eb 100644 --- a/src/main/target/SPEEDYBEEF7V3/target.h +++ b/src/main/target/SPEEDYBEEF7V3/target.h @@ -116,7 +116,7 @@ #define I2C1_SCL PB8 #define I2C1_SDA PB9 -//#define USE_FLASH //breaks CLI resources (need support in .mk? or not valid at all?) +#define USE_FLASH_M25P16 #define FLASH_CS_PIN PD2 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/STELLARH7DEV/target.h b/src/main/target/STELLARH7DEV/target.h index 9c5e4da15f..55ca19446f 100644 --- a/src/main/target/STELLARH7DEV/target.h +++ b/src/main/target/STELLARH7DEV/target.h @@ -99,13 +99,12 @@ #define I2C2_SDA PB11 // Flash: Winbond W25M02G (2×W25N01G NAND dies) on SPI4, CS=PC13. -// Disabled pending resolution of #1209 (W25M02G NAND erase disconnects FC; -// flashfsIdentifyStartOfFreeSpace hangs on bad-state chip, preventing boot). -// Uncomment when H7 NAND flash is fixed: -//#define USE_FLASH_W25M02G -//#define FLASH_CS_PIN PC13 -//#define FLASH_SPI_INSTANCE SPI4 -//#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT +// Re-enabled: #1209 fixed via async erase (flashfsEraseAsync wired to taskMain, +// NAND forced to async path in flashfsEraseCompletely). #1228 driver bugs fixed. +#define USE_FLASH_W25M02G +#define FLASH_CS_PIN PC13 +#define FLASH_SPI_INSTANCE SPI4 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define MAX7456_SPI_CS_PIN PB8 #define MAX7456_SPI_INSTANCE SPI2 diff --git a/src/main/target/STELLARH7V2/target.c b/src/main/target/STELLARH7V2/target.c new file mode 100644 index 0000000000..4da750bc99 --- /dev/null +++ b/src/main/target/STELLARH7V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM4, CH4, PD15, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/STELLARH7V2/target.h b/src/main/target/STELLARH7V2/target.h new file mode 100644 index 0000000000..a484115f88 --- /dev/null +++ b/src/main/target/STELLARH7V2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME STELLARH7V2 +#define MANUFACTURER_ID STBE +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42605 +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42605 +#define USE_GYRO_SPI_ICM42688P +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_MAX7456 +#define USE_SDCARD +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_FLASH_W25M02G + +#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 PE3 +#define LED1_PIN PE4 +#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 PD7 +#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 PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 + +#define USE_SPI_GYRO +#define USE_EXTI +#define USE_GYRO_EXTI + +#define MPU_INT_EXTI PE5 + +#define ACC_ICM42688P_ALIGN CW180_DEG +#define GYRO_ICM42688P_ALIGN CW180_DEG +#define ICM42688P_CS_PIN PC15 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define MAG_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PE11 +#define FLASH_SPI_INSTANCE SPI4 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 100 + +#define PINIO1_PIN PD10 +#define PINIO1_BOX 40 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/STELLARH7V2/target.mk b/src/main/target/STELLARH7V2/target.mk new file mode 100644 index 0000000000..c36b76f8af --- /dev/null +++ b/src/main/target/STELLARH7V2/target.mk @@ -0,0 +1,15 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_bmp280.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/TALONF7DJIHD/target.h b/src/main/target/TALONF7DJIHD/target.h index a87be0bb09..79f863684e 100644 --- a/src/main/target/TALONF7DJIHD/target.h +++ b/src/main/target/TALONF7DJIHD/target.h @@ -63,6 +63,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/TALONF7FUSION/target.h b/src/main/target/TALONF7FUSION/target.h index a5b0648f2d..8c4c44fd7c 100644 --- a/src/main/target/TALONF7FUSION/target.h +++ b/src/main/target/TALONF7FUSION/target.h @@ -75,6 +75,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/TALONF7V2/target.h b/src/main/target/TALONF7V2/target.h index d474eca6f3..3fd4047710 100644 --- a/src/main/target/TALONF7V2/target.h +++ b/src/main/target/TALONF7V2/target.h @@ -67,6 +67,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/TBS_LUCID_H7/target.c b/src/main/target/TBS_LUCID_H7/target.c new file mode 100644 index 0000000000..3984c0f44b --- /dev/null +++ b/src/main/target/TBS_LUCID_H7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TBS_LUCID_H7/target.h b/src/main/target/TBS_LUCID_H7/target.h new file mode 100644 index 0000000000..1753fa4f40 --- /dev/null +++ b/src/main/target/TBS_LUCID_H7/target.h @@ -0,0 +1,173 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME TBS_LUCID_H7 +#define MANUFACTURER_ID TEBS +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_ICM42686P // not supported in EmuFlight +#define USE_BARO +#define USE_BARO_DPS310 +#define USE_BARO_BMP388 +#define USE_MAX7456 +#define USE_SDCARD + +#define USE_VCP +#define USE_OSD + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PA15 +#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 PD7 +#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_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 ENSURE_MPU_DATA_READY_IS_LOW + +#define ACC_1_ALIGN CW90_DEG_FLIP +#define GYRO_1_ALIGN CW90_DEG_FLIP +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG_FLIP +#define GYRO_2_ALIGN CW0_DEG_FLIP +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART1 +#define UART1_RX_PIN PA10 +#define UART1_TX_PIN PA9 +#define USE_UART2 +#define UART2_RX_PIN PD6 +#define UART2_TX_PIN PD5 +#define USE_UART3 +#define UART3_RX_PIN PD9 +#define UART3_TX_PIN PD8 +#define USE_UART4 +#define UART4_RX_PIN PB8 +#define UART4_TX_PIN PB9 +#define USE_UART6 +#define UART6_RX_PIN PC7 +#define UART6_TX_PIN PC6 +#define USE_UART7 +#define UART7_RX_PIN PE7 +#define UART7_TX_PIN PE8 +#define USE_UART8 +#define UART8_RX_PIN PE0 +#define UART8_TX_PIN PE1 +#define SERIALRX_UART SERIAL_PORT_USART6 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define USE_SDCARD_SDIO +//notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify +//notice - NEED: #define SDCARD_DMA_CHANNEL_TX DMAx_StreamX // please verify +//notice - other sdcard defines maybe needed (rare?): SDCARD_DMA_STREAM_TX_FULL, SDCARD_DMA_STREAM_TX, SDCARD_DMA_CLK, SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT +#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 //notice - needs validation. these are hardware dependent. known options: 2, 4, 8. +#define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 256 //notice - needs validation. these are hardware dependent. known options: 128, 256 + +#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 9 +#define ADC3_DMA_OPT 10 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 250 + +#define PINIO1_PIN PD10 +#define PINIO2_PIN PD11 +#define PINIO3_PIN PC13 +#define PINIO1_BOX 40 +#define PINIO1_CONFIG 129 +#define PINIO2_BOX 41 +#define PINIO2_CONFIG 129 +#define PINIO3_BOX 42 +#define PINIO3_CONFIG 129 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TBS_LUCID_H7/target.mk b/src/main/target/TBS_LUCID_H7/target.mk new file mode 100644 index 0000000000..10323c4c0a --- /dev/null +++ b/src/main/target/TBS_LUCID_H7/target.mk @@ -0,0 +1,17 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP SDCARD + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_mpu6000.c \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/TJRCH743/target.c b/src/main/target/TJRCH743/target.c new file mode 100644 index 0000000000..4e549e4b05 --- /dev/null +++ b/src/main/target/TJRCH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 4, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM16, CH1, PB8, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TJRCH743/target.h b/src/main/target/TJRCH743/target.h new file mode 100644 index 0000000000..3f6c583e5b --- /dev/null +++ b/src/main/target/TJRCH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME TJRCH743 +#define MANUFACTURER_ID TJRC +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_M25P16 +#define USE_BARO +#define USE_BARO_DPS310 +// #define USE_GYRO_CLKIN // not supported in EmuFlight + +#define USE_VCP +#define USE_FLASHFS +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI + +#define USE_LED +#define LED0_PIN PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 // TIM1_CH1 +#define USE_BEEPER +#define BEEPER_PIN PE9 +#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 PD7 +#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 PB2 + +#define ACC_ICM42688P_ALIGN CW270_DEG +#define GYRO_ICM42688P_ALIGN CW270_DEG +#define ICM42688P_CS_PIN PC15 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#define USE_UART1 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 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 USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PE2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 9 +#define ADC2_DMA_OPT 10 +#define ADC3_DMA_OPT 11 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC2_DMA_STREAM DMA2_Stream2 // ADC2 opt10 +#define ADC3_DMA_STREAM DMA2_Stream3 // ADC3 opt11 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 350 + +#define PINIO1_PIN PD10 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(5) | TIM_N(16) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TJRCH743/target.mk b/src/main/target/TJRCH743/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/TJRCH743/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/TMH7/target.c b/src/main/target/TMH7/target.c new file mode 100644 index 0000000000..7a0a2bf35f --- /dev/null +++ b/src/main/target/TMH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0, NONE), // cam ctrl + DEF_TIM(TIM17, CH1, PB9, TIM_USE_PPM, 0, 0, NONE), // ppm + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0, NONE), // motor 8 +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMH7/target.h b/src/main/target/TMH7/target.h new file mode 100644 index 0000000000..953ea0b1c5 --- /dev/null +++ b/src/main/target/TMH7/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME TMH7 +#define MANUFACTURER_ID TMTR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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 LED1_PIN PE5 +#define LED2_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#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 PB2 +#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 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_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 BARO_I2C_INSTANCE I2CDEV_1 +#define DASHBOARD_I2C_INSTANCE I2CDEV_1 +#define I2C1_SCL PB6 +#define I2C1_SDA PB7 + +#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 ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(5) | TIM_N(8) | TIM_N(16) | TIM_N(17) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMH7/target.mk b/src/main/target/TMH7/target.mk new file mode 100644 index 0000000000..b350bc93ce --- /dev/null +++ b/src/main/target/TMH7/target.mk @@ -0,0 +1,15 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/TMOTORH743/target.c b/src/main/target/TMOTORH743/target.c new file mode 100644 index 0000000000..355e3e70d6 --- /dev/null +++ b/src/main/target/TMOTORH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, NONE), // motor 1 + DEF_TIM(TIM2, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 13, NONE), // led strip +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/TMOTORH743/target.h b/src/main/target/TMOTORH743/target.h new file mode 100644 index 0000000000..e5164f59a9 --- /dev/null +++ b/src/main/target/TMOTORH743/target.h @@ -0,0 +1,175 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME TMOTORH743 +#define MANUFACTURER_ID TMTR +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // 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_M25P16 +#define USE_FLASH_W25N01G +#define USE_BARO +#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 PE5 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE3 +#define BEEPER_INVERTED +#define USE_USB_DETECT +#define USB_DETECT_PIN PE6 + +#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_DEVICE_4 +#define SPI4_SCK_PIN PE12 +#define SPI4_MISO_PIN PE13 +#define SPI4_MOSI_PIN PE14 +#define USE_SPI_DEVICE_6 +#define SPI6_SCK_PIN PB3 +#define SPI6_MISO_PIN PB4 +#define SPI6_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_FLIP +#define GYRO_1_ALIGN CW90_DEG_FLIP +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_SPI_BUS SPIDEV_2 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW0_DEG_FLIP +#define GYRO_2_ALIGN CW0_DEG_FLIP +#define GYRO_2_CS_PIN PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_1 + +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (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 SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC1 +#define CURRENT_METER_ADC_PIN PC3 +#define RSSI_ADC_PIN PC5 +#define ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_VOLTAGE_METER_SCALE 110 +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 200 + +#define PINIO1_PIN PC14 +#define PINIO2_PIN PD11 +#define PINIO3_PIN PE2 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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/TMOTORH743/target.mk b/src/main/target/TMOTORH743/target.mk new file mode 100644 index 0000000000..cd000e76d0 --- /dev/null +++ b/src/main/target/TMOTORH743/target.mk @@ -0,0 +1,17 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/WDIYH743/target.c b/src/main/target/WDIYH743/target.c new file mode 100644 index 0000000000..7b7c7658be --- /dev/null +++ b/src/main/target/WDIYH743/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM4, CH3, PB8, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM12, CH2, PB15, TIM_USE_PPM, 0, 0, NONE), // ppm; dma -1 in config (input only) + DEF_TIM(TIM1, CH2, PE11, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM1, CH4, PE14, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/WDIYH743/target.h b/src/main/target/WDIYH743/target.h new file mode 100644 index 0000000000..acafbe913c --- /dev/null +++ b/src/main/target/WDIYH743/target.h @@ -0,0 +1,165 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME WDIYH743 +#define MANUFACTURER_ID WDIY +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_W25N01G +#define USE_BARO +#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 PE12 +#define LED1_PIN PE13 +#define LED_STRIP_PIN PB8 // TIM4_CH3 +#define USE_BEEPER +#define BEEPER_PIN PA10 +#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 PC2 +#define SPI2_MOSI_PIN PC3 +#define USE_SPI_DEVICE_3 +#define SPI3_SCK_PIN PB3 +#define SPI3_MISO_PIN PC11 +#define SPI3_MOSI_PIN PB2 +#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 ACC_1_ALIGN CW90_DEG +#define GYRO_1_ALIGN CW90_DEG +#define GYRO_1_CS_PIN PA4 +#define GYRO_1_EXTI_PIN PE9 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define ACC_2_ALIGN CW90_DEG +#define GYRO_2_ALIGN CW90_DEG +#define GYRO_2_CS_PIN PE4 +#define GYRO_2_EXTI_PIN PE3 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART1 +#define UART1_TX_PIN PA9 +#define UART1_RX_PIN PB15 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PD1 +#define UART4_RX_PIN PD0 +#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 I2C1_SCL PB6 +#define I2C1_SDA PB7 +#define USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 +#define USE_I2C_DEVICE_3 +#define I2C_DEVICE_3 (I2CDEV_3) +#define I2C3_SCL PA8 +#define I2C3_SDA PC9 +#define USE_I2C_DEVICE_4 +#define I2C_DEVICE_4 (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 PB12 +#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 9 +#define ADC2_DMA_OPT 10 +#define ADC3_DMA_OPT 11 +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC2_DMA_STREAM DMA2_Stream2 // ADC2 opt10 +#define ADC3_DMA_STREAM DMA2_Stream3 // ADC3 opt11 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 350 + + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(3) | TIM_N(4) | TIM_N(5) | TIM_N(12) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/WDIYH743/target.mk b/src/main/target/WDIYH743/target.mk new file mode 100644 index 0000000000..ac2df7c3e9 --- /dev/null +++ b/src/main/target/WDIYH743/target.mk @@ -0,0 +1,15 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/WPLV2/target.c b/src/main/target/WPLV2/target.c new file mode 100644 index 0000000000..dda6a47e7c --- /dev/null +++ b/src/main/target/WPLV2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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, PE9, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM1, CH2, PE11, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM1, CH3, PE13, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM1, CH4, PE14, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 7, NONE), // motor 8 + DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 8, NONE), // led strip + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/WPLV2/target.h b/src/main/target/WPLV2/target.h new file mode 100644 index 0000000000..fe729a5a03 --- /dev/null +++ b/src/main/target/WPLV2/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME WPLV2 +#define MANUFACTURER_ID WRPL +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#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 PE2 +#define LED_STRIP_PIN PA15 +#define USE_BEEPER +#define BEEPER_PIN PD12 +#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 PC13 + +#define ACC_ICM42688P_ALIGN CW0_DEG +#define GYRO_ICM42688P_ALIGN CW0_DEG +#define ICM42688P_CS_PIN PB4 +#define ICM42688P_SPI_BUS SPIDEV_1 + +#define USE_UART1 +#define UART1_TX_PIN PB6 +#define UART1_RX_PIN PB7 +#define USE_UART2 +#define UART2_TX_PIN PD5 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_RX_PIN PD0 +#define USE_UART5 +#define UART5_TX_PIN PC12 +#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 SERIALRX_UART SERIAL_PORT_USART1 +#define MSP_DISPLAYPORT_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 USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC2 +#define ADC1_DMA_OPT 11 +#define ADC2_DMA_OPT 12 +#define ADC3_DMA_OPT 13 +#define ADC1_DMA_STREAM DMA2_Stream3 // ADC1 opt11 +#define ADC2_DMA_STREAM DMA2_Stream4 // ADC2 opt12 +#define ADC3_DMA_STREAM DMA2_Stream5 // ADC3 opt13 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define VTX_ENABLE_PIN PE3 +#define PINIO1_PIN VTX_ENABLE_PIN +#define PINIO1_BOX 40 +#define PINIO1_CONFIG 129 +#define PINIO2_PIN PE4 +#define PINIO2_BOX 41 +#define PINIO2_CONFIG 1 + +#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 - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(5) | TIM_N(8) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/WPLV2/target.mk b/src/main/target/WPLV2/target.mk new file mode 100644 index 0000000000..9f63b3506b --- /dev/null +++ b/src/main/target/WPLV2/target.mk @@ -0,0 +1,15 @@ +H743_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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/XILOF4/target.h b/src/main/target/XILOF4/target.h index 10fb86ac2c..e700211380 100644 --- a/src/main/target/XILOF4/target.h +++ b/src/main/target/XILOF4/target.h @@ -78,6 +78,7 @@ #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PB2 #define FLASH_SPI_INSTANCE SPI2 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT diff --git a/src/main/target/ZEEZF7/target.h b/src/main/target/ZEEZF7/target.h index 75c8b97d90..0c96aff9e3 100644 --- a/src/main/target/ZEEZF7/target.h +++ b/src/main/target/ZEEZF7/target.h @@ -66,13 +66,7 @@ // 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_W25M512 -#define USE_FLASH_W25Q +#define USE_FLASH_W25N01G #define FLASH_CS_PIN PA4 #define FLASH_SPI_INSTANCE SPI1 diff --git a/src/main/target/ZEEZF7V2/target.h b/src/main/target/ZEEZF7V2/target.h index b5983679b9..eb4fe25f0b 100644 --- a/src/main/target/ZEEZF7V2/target.h +++ b/src/main/target/ZEEZF7V2/target.h @@ -60,7 +60,6 @@ // Blackbox #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS -#define USE_FLASH_W25M #define USE_FLASH_M25P16 #define FLASH_CS_PIN PB12 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/ZEUSF4EVO/target.h b/src/main/target/ZEUSF4EVO/target.h index 19fd4f9a4a..75f450e39e 100644 --- a/src/main/target/ZEUSF4EVO/target.h +++ b/src/main/target/ZEUSF4EVO/target.h @@ -131,6 +131,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA15 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/ZEUSF4FR/target.h b/src/main/target/ZEUSF4FR/target.h index 3e61cad8c3..64bdaa10a4 100644 --- a/src/main/target/ZEUSF4FR/target.h +++ b/src/main/target/ZEUSF4FR/target.h @@ -138,6 +138,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PA8 #define FLASH_SPI_INSTANCE SPI2 diff --git a/src/main/target/ZEUSF722_AIO/target.h b/src/main/target/ZEUSF722_AIO/target.h index de510a75b2..05e62d1db2 100644 --- a/src/main/target/ZEUSF722_AIO/target.h +++ b/src/main/target/ZEUSF722_AIO/target.h @@ -117,6 +117,7 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_FLASHFS #define USE_FLASH_M25P16 +#define USE_FLASH_W25Q128FV #define FLASH_CS_PIN PD2 #define FLASH_SPI_INSTANCE SPI3 diff --git a/src/main/target/ZEX_ATHENA_MINI/target.c b/src/main/target/ZEX_ATHENA_MINI/target.c new file mode 100644 index 0000000000..8a7605bc41 --- /dev/null +++ b/src/main/target/ZEX_ATHENA_MINI/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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_LED, 0, 0, NONE), // led strip + DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 1, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 2, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 3, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 4, NONE), // motor 4 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ZEX_ATHENA_MINI/target.h b/src/main/target/ZEX_ATHENA_MINI/target.h new file mode 100644 index 0000000000..1370bdb078 --- /dev/null +++ b/src/main/target/ZEX_ATHENA_MINI/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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME ZEX_ATHENA_MINI +#define MANUFACTURER_ID ZEXM +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_SPI_ICM42688P +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#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 PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE9 +#define BEEPER_INVERTED +#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 PD7 +#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_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 ACC_1_ALIGN CW270_DEG +#define GYRO_1_ALIGN CW270_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#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 PE11 +#define GYRO_2_EXTI_PIN PE15 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART1 +#define UART1_RX_PIN PA10 +#define USE_UART2 +#define UART2_RX_PIN PD6 +#define USE_UART3 +#define UART3_TX_PIN PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 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 USE_I2C_DEVICE_2 +#define I2C_DEVICE_2 (I2CDEV_2) +#define BARO_I2C_INSTANCE I2CDEV_2 +#define I2C2_SCL PB10 +#define I2C2_SDA PB11 + +#define FLASH_CS_PIN PE2 +#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 ADC1_DMA_OPT 8 +#define ADC3_DMA_OPT 9 +#define ADC1_DMA_STREAM DMA2_Stream0 // ADC1 opt8 +#define ADC3_DMA_STREAM DMA2_Stream1 // ADC3 opt9 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 180 + +#define PINIO1_PIN PD10 // BEC12V_EN +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(5) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ZEX_ATHENA_MINI/target.mk b/src/main/target/ZEX_ATHENA_MINI/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/ZEX_ATHENA_MINI/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/main/target/ZEX_ATHENA_STD_PRO/target.c b/src/main/target/ZEX_ATHENA_STD_PRO/target.c new file mode 100644 index 0000000000..462a77911b --- /dev/null +++ b/src/main/target/ZEX_ATHENA_STD_PRO/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: 215ae87 + 1 file changed, 31 insertions(+), 8 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(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0, NONE), // motor 1 + DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 1, NONE), // motor 2 + DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 2, NONE), // motor 3 + DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 3, NONE), // motor 4 + DEF_TIM(TIM4, CH1, PD12, TIM_USE_MOTOR, 0, 4, NONE), // motor 5 + DEF_TIM(TIM4, CH2, PD13, TIM_USE_MOTOR, 0, 5, NONE), // motor 6 + DEF_TIM(TIM4, CH3, PD14, TIM_USE_MOTOR, 0, 6, NONE), // motor 7 + DEF_TIM(TIM4, CH4, PD15, TIM_USE_MOTOR, 0, 0, NONE), // motor 8; dma -1 in config (input only) + DEF_TIM(TIM15, CH1, PE5, TIM_USE_SERVO, 0, 0, NONE), // servo 1; dma -1 in config (input only) + DEF_TIM(TIM15, CH2, PE6, TIM_USE_SERVO, 0, 0, NONE), // servo 2; dma -1 in config (input only) + DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 7, NONE), // led strip + DEF_TIM(TIM2, CH1, PA15, TIM_USE_ANY, 0, 0, NONE), // could not determine TIM_USE_xxxxx - please check; dma -1 in config (input only) + DEF_TIM(TIM1, CH2N, PB0, TIM_USE_ANY, 0, 0, NONE), // cam ctrl; dma -1 in config (input only) +}; + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ZEX_ATHENA_STD_PRO/target.h b/src/main/target/ZEX_ATHENA_STD_PRO/target.h new file mode 100644 index 0000000000..ebd5dad47d --- /dev/null +++ b/src/main/target/ZEX_ATHENA_STD_PRO/target.h @@ -0,0 +1,159 @@ +/* + * This file is part of EmuFlight. It is derived from Betaflight. + * + * This is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this software. + * If not, see . + */ + +// This resource file generated using https://github.com/nerdCopter/target-convert +// Commit: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) + +#pragma once + +#define BOARD_NAME ZEX_ATHENA_STD_PRO +#define MANUFACTURER_ID ZEXM +#define TARGET_BOARD_IDENTIFIER "SH74" // generic ID +#define FC_TARGET_MCU STM32H743 // not used in EmuF + +#define USE_ACC +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO +// #define USE_GYRO_CLKIN // not supported in EmuFlight +#define USE_GYRO_SPI_ICM42688P +#define USE_MAX7456 +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#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 PE3 +#define LED1_PIN PE4 +#define LED_STRIP_PIN PA8 +#define USE_BEEPER +#define BEEPER_PIN PE9 +#define BEEPER_INVERTED +#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 PD7 +#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_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 ACC_1_ALIGN CW0_DEG +#define GYRO_1_ALIGN CW0_DEG +#define GYRO_1_CS_PIN PC15 +#define GYRO_1_EXTI_PIN PB2 +#define GYRO_1_SPI_BUS SPIDEV_1 + +#define USE_DUAL_GYRO + +#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH +#define ACC_2_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW270_DEG +#define GYRO_2_CS_PIN PC13 +#define GYRO_2_EXTI_PIN PC14 +#define GYRO_2_SPI_BUS SPIDEV_4 + +#define USE_UART1 +#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 PD8 +#define UART3_RX_PIN PD9 +#define USE_UART4 +#define UART4_TX_PIN PB9 +#define UART4_RX_PIN PB8 +#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 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 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 MAG_I2C_INSTANCE 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 PE2 +#define MAX7456_SPI_INSTANCE SPI3 + +#define USE_ADC +#define VBAT_ADC_PIN PC0 +#define CURRENT_METER_ADC_PIN PC1 +#define ADC1_DMA_OPT 9 /*# ADC 1: DMA2 Stream 0 Request 9*/ +#define ADC3_DMA_OPT 10 /*# ADC 3: DMA2 Stream 1 Request 115*/ +#define ADC1_DMA_STREAM DMA2_Stream1 // ADC1 opt9 +#define ADC3_DMA_STREAM DMA2_Stream2 // ADC3 opt10 +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC + +#define PINIO1_PIN PD10 +#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 +#define TARGET_IO_PORTE 0xffff +// notice - port masks derived from config.h; single-pin ports use exact mask, multi-pin ports use 0xffff + +#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(4) | TIM_N(5) | TIM_N(15) ) + +// notice - this file was programmatically generated and may be incomplete. diff --git a/src/main/target/ZEX_ATHENA_STD_PRO/target.mk b/src/main/target/ZEX_ATHENA_STD_PRO/target.mk new file mode 100644 index 0000000000..0ea709af43 --- /dev/null +++ b/src/main/target/ZEX_ATHENA_STD_PRO/target.mk @@ -0,0 +1,16 @@ +H743_TARGETS += $(TARGET) +FEATURES += VCP ONBOARDFLASH + +TARGET_SRC = \ +drivers/accgyro/accgyro_spi_icm426xx.c \ +drivers/barometer/barometer_dps310.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: 215ae87 + 1 file changed, 31 insertions(+), 8 deletions(-) From e2ca6c23e0a4f0925c917d1496b614fb2c8bd150 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:08:15 -0500 Subject: [PATCH 02/10] fix(targets): fix ONBOARDFLASH/chip-define mismatches in 4 targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AI Generated fix source.mk gates ALL flash driver sources behind the ONBOARDFLASH feature flag — flash.c, flash_m25p16.c, flash_w25m.c, flash_w25n.c, flash_w25q128fv.c, and flashfs.c are only compiled when FEATURES includes ONBOARDFLASH. Having chip-specific defines in target.h without ONBOARDFLASH in target.mk means the defines resolve at the preprocessor but no flash driver code is linked — flash silently never initialises. Three targets had flash chip defines in target.h but were missing ONBOARDFLASH in their target.mk FEATURES line: - SPEEDYBEEF7V3 (F7X2RE): had USE_FLASH_M25P16 + FLASH_CS/SPI_INSTANCE but only FEATURES += VCP SDCARD; flash sources were never compiled. Fixed: add ONBOARDFLASH alongside SDCARD (board has both SD card and SPI flash). - PYRODRONEF4PDB (F405): had full flash config (USE_FLASH_W25Q128FV + USE_FLASH_M25P16 + FLASH_CS_PIN + FLASH_SPI_INSTANCE) added in the previous commit but FEATURES was left as `VCP` only. Fixed: add ONBOARDFLASH. - VRRACE (F405): had USE_FLASH_M25P16 + FLASH_CS/SPI_INSTANCE but FEATURES += VCP only. Fixed: add ONBOARDFLASH. One target had the opposite problem — ONBOARDFLASH in target.mk but no chip define or pin assignments in target.h: - OMNIBUSF4V6 (F405): FEATURES already had ONBOARDFLASH so flash sources compiled, but common_fc_post.h had nothing to work with — USE_FLASH, USE_FLASH_M25P16, FLASH_CS_PIN, and FLASH_SPI_INSTANCE were all absent, so flashInit() was never triggered. BF unified-target configs confirm M25P16 at CS=PB12/SPI2 with DEFAULT_BLACKBOX_DEVICE_FLASH. Fixed: add USE_FLASH_M25P16 + FLASH_CS_PIN PB12 + FLASH_SPI_INSTANCE SPI2 + ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT. Co-Authored-By: Claude Sonnet 4.6 --- src/main/target/OMNIBUSF4V6/target.h | 4 ++++ src/main/target/PYRODRONEF4PDB/target.mk | 2 +- src/main/target/SPEEDYBEEF7V3/target.mk | 2 +- src/main/target/VRRACE/target.mk | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/target/OMNIBUSF4V6/target.h b/src/main/target/OMNIBUSF4V6/target.h index f3b7b6f1df..c3566ffefe 100644 --- a/src/main/target/OMNIBUSF4V6/target.h +++ b/src/main/target/OMNIBUSF4V6/target.h @@ -36,6 +36,10 @@ #define USE_BARO #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/PYRODRONEF4PDB/target.mk b/src/main/target/PYRODRONEF4PDB/target.mk index 2d4be17e54..81d87b0492 100644 --- a/src/main/target/PYRODRONEF4PDB/target.mk +++ b/src/main/target/PYRODRONEF4PDB/target.mk @@ -1,5 +1,5 @@ F405_TARGETS += $(TARGET) -FEATURES += VCP +FEATURES += VCP ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ drivers/accgyro/accgyro_spi_mpu6500.c \ diff --git a/src/main/target/SPEEDYBEEF7V3/target.mk b/src/main/target/SPEEDYBEEF7V3/target.mk index e3a0847b3e..73063dd6a2 100644 --- a/src/main/target/SPEEDYBEEF7V3/target.mk +++ b/src/main/target/SPEEDYBEEF7V3/target.mk @@ -1,5 +1,5 @@ F7X2RE_TARGETS += $(TARGET) -FEATURES += VCP SDCARD +FEATURES += VCP SDCARD ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_mpu.c \ diff --git a/src/main/target/VRRACE/target.mk b/src/main/target/VRRACE/target.mk index 94927d4d4c..09af5baac7 100644 --- a/src/main/target/VRRACE/target.mk +++ b/src/main/target/VRRACE/target.mk @@ -1,5 +1,5 @@ F405_TARGETS += $(TARGET) -FEATURES += VCP +FEATURES += VCP ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ From 8748f33b0c10203ee77e5b7b4d40bc69608261cb Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:33:30 -0500 Subject: [PATCH 03/10] =?UTF-8?q?fix(targets):=20update=20H7=20NAND=20flas?= =?UTF-8?q?h=20comments=20=E2=80=94=20BF=20configs=20is=20source=20of=20tr?= =?UTF-8?q?uth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AI Generated fix Three H7 targets with NAND flash chip defines but missing FLASH_CS_PIN and FLASH_SPI_INSTANCE were marked with TODO comments asking for "hardware research". Verified against BF 4.5 unified-target configs (~/SYNC/nerdCopter-GIT/config/configs/) — all three targets also lack FLASH_CS_PIN/FLASH_SPI_INSTANCE in BF's own config.h files: - IFLIGHT_H7_TWING: BF config has USE_FLASH + USE_FLASH_M25P16 + USE_FLASH_W25N01G + DEFAULT_BLACKBOX_DEVICE_FLASH, no CS/SPI pins. - NEUTRONRCH743AIO: BF config has USE_FLASH + USE_FLASH_W25N01G only. - NEUTRONRCH7BT: BF config has USE_FLASH + USE_FLASH_W25N01G only. The chip defines in the EF target files already match BF configs exactly. Replace the TODO blocks (which implied EF-specific ignorance and suggested external hardware research) with a single-line note pointing to BF configs as the upstream authoritative source. No functional change — chip defines, pins, and ONBOARDFLASH feature flag are all unchanged. Co-Authored-By: Claude Sonnet 4.6 --- src/main/target/IFLIGHT_H7_TWING/target.h | 4 +--- src/main/target/NEUTRONRCH743AIO/target.h | 2 +- src/main/target/NEUTRONRCH7BT/target.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/target/IFLIGHT_H7_TWING/target.h b/src/main/target/IFLIGHT_H7_TWING/target.h index f02b364e34..c532f3933d 100644 --- a/src/main/target/IFLIGHT_H7_TWING/target.h +++ b/src/main/target/IFLIGHT_H7_TWING/target.h @@ -117,9 +117,7 @@ #define I2C1_SCL PB8 #define I2C1_SDA PB9 -// TODO: FLASH_CS_PIN and FLASH_SPI_INSTANCE unknown — research iFlight H7 Twing hardware -// #define FLASH_CS_PIN ?? -// #define FLASH_SPI_INSTANCE SPI? +// Note: FLASH_CS_PIN/FLASH_SPI_INSTANCE absent in BF configs (config/configs/IFLIGHT_H7_TWING) #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define MAX7456_SPI_CS_PIN PE11 diff --git a/src/main/target/NEUTRONRCH743AIO/target.h b/src/main/target/NEUTRONRCH743AIO/target.h index 31bd075446..ef6e0ace24 100644 --- a/src/main/target/NEUTRONRCH743AIO/target.h +++ b/src/main/target/NEUTRONRCH743AIO/target.h @@ -28,7 +28,7 @@ #define USE_GYRO #define USE_ACC #define USE_ACCGYRO_BMI270 -// TODO: FLASH_CS_PIN and FLASH_SPI_INSTANCE unknown — research Neutron RC H743 AIO hardware +// Note: FLASH_CS_PIN/FLASH_SPI_INSTANCE absent in BF configs (config/configs/NEUTRONRCH743AIO) #define USE_FLASH #define USE_FLASH_W25N01G #define USE_MAX7456 diff --git a/src/main/target/NEUTRONRCH7BT/target.h b/src/main/target/NEUTRONRCH7BT/target.h index b9bb14048d..59cda82528 100644 --- a/src/main/target/NEUTRONRCH7BT/target.h +++ b/src/main/target/NEUTRONRCH7BT/target.h @@ -28,7 +28,7 @@ #define USE_GYRO #define USE_ACC #define USE_ACCGYRO_BMI270 -// TODO: FLASH_CS_PIN and FLASH_SPI_INSTANCE unknown — research Neutron RC H7BT hardware +// Note: FLASH_CS_PIN/FLASH_SPI_INSTANCE absent in BF configs (config/configs/NEUTRONRCH7BT) #define USE_FLASH #define USE_FLASH_W25N01G #define USE_MAX7456 From e08718cf843aa548a9842a0250632baa8f7b9277 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:40:02 -0500 Subject: [PATCH 04/10] fix(targets): add missing flash defines; drop phantom ONBOARDFLASH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AI Generated fix Two categories of pre-existing flash misconfiguration corrected using BF 4.5 unified-target configs (config/configs/) as authoritative source. --- Group A: 15 targets — add chip define + pins (real flash, config missing) These targets had ONBOARDFLASH in target.mk so flash sources compiled, but target.h had no chip define, no FLASH_CS_PIN, and no FLASH_SPI_INSTANCE. flashInit() was called but the device could never be identified or driven. BF configs confirms flash hardware on all 15. Added USE_FLASH_M25P16 + FLASH_CS_PIN + FLASH_SPI_INSTANCE (from BF configs) to each target.h. Also added ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT where BF configs has DEFAULT_BLACKBOX_DEVICE_FLASH. EXUAVF4PRO CS=PB3 SPI3 bblog=yes XRACERF4 CS=PB3 SPI3 bblog=yes EACHINEF722_AIO CS=PD2 SPI3 bblog=yes NBD_CRICKETF7 CS=PA4 SPI1 bblog=no MERAKRCF405 CS=PA4 SPI1 bblog=yes GEELANGF411 CS=PB3 SPI2 bblog=yes PODIUMF4 CS=PB3 SPI3 bblog=no SOULF4 CS=PB3 SPI3 bblog=no ELINF405 CS=PB3 SPI3 bblog=no DYSF44530D CS=PC0 SPI3 bblog=yes EACHINEF411_AIO CS=PA15 SPI2 bblog=yes PYRODRONEF7 CS=PB12 SPI2 bblog=yes FLYWOOF411HEX CS=PB2 SPI2 bblog=yes PLUMF4 CS=PA15 SPI3 bblog=no MERAKRCF722 CS=PA4 SPI1 bblog=yes --- Group B: 15 targets — remove ONBOARDFLASH (no flash hardware) These targets had FEATURES += ... ONBOARDFLASH despite having no flash hardware in BF configs (no FLASH_CS_PIN, no chip define, no USE_FLASH). The ONBOARDFLASH was added by the convert.sh default: any target without SDCARD previously got ONBOARDFLASH regardless of whether it had flash. This compiled ~20–30 KB of flash driver and MSC source code that served no function. HELSEL_STRIKERF7, ATOMRCF411, TRANSTECF411AIO, TRANSTECF411, TRANSTECF7, STM32F411DISCOVERY, FF_PIKOF4OSD, REVONANO, NBDBBBLV3, NBDBBBLV2, IFLIGHT_BLITZ_F411RX, NBD_CRICKETF7V2, TRANSTECF411HD, FF_FORTINIF4_REV03, HAKRCF411 Co-Authored-By: Claude Sonnet 4.6 --- src/main/target/ATOMRCF411/target.mk | 2 +- src/main/target/DYSF44530D/target.h | 4 ++++ src/main/target/EACHINEF411_AIO/target.h | 4 ++++ src/main/target/EACHINEF722_AIO/target.h | 4 ++++ src/main/target/ELINF405/target.h | 3 +++ src/main/target/EXUAVF4PRO/target.h | 4 ++++ src/main/target/FF_FORTINIF4_REV03/target.mk | 2 +- src/main/target/FF_PIKOF4OSD/target.mk | 2 +- src/main/target/FLYWOOF411HEX/target.h | 4 ++++ src/main/target/GEELANGF411/target.h | 4 ++++ src/main/target/HAKRCF411/target.mk | 2 +- src/main/target/HELSEL_STRIKERF7/target.mk | 2 +- src/main/target/IFLIGHT_BLITZ_F411RX/target.mk | 2 +- src/main/target/MERAKRCF405/target.h | 4 ++++ src/main/target/MERAKRCF722/target.h | 4 ++++ src/main/target/NBDBBBLV2/target.mk | 2 +- src/main/target/NBDBBBLV3/target.mk | 2 +- src/main/target/NBD_CRICKETF7/target.h | 3 +++ src/main/target/NBD_CRICKETF7V2/target.mk | 2 +- src/main/target/PLUMF4/target.h | 3 +++ src/main/target/PODIUMF4/target.h | 3 +++ src/main/target/PYRODRONEF7/target.h | 4 ++++ src/main/target/REVONANO/target.mk | 2 +- src/main/target/SOULF4/target.h | 3 +++ src/main/target/STM32F411DISCOVERY/target.mk | 2 +- src/main/target/TRANSTECF411/target.mk | 2 +- src/main/target/TRANSTECF411AIO/target.mk | 2 +- src/main/target/TRANSTECF411HD/target.mk | 2 +- src/main/target/TRANSTECF7/target.mk | 2 +- src/main/target/XRACERF4/target.h | 4 ++++ 30 files changed, 70 insertions(+), 15 deletions(-) diff --git a/src/main/target/ATOMRCF411/target.mk b/src/main/target/ATOMRCF411/target.mk index d20a4d2625..524dee8841 100644 --- a/src/main/target/ATOMRCF411/target.mk +++ b/src/main/target/ATOMRCF411/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/DYSF44530D/target.h b/src/main/target/DYSF44530D/target.h index bd1436eae4..c29f0a83d3 100644 --- a/src/main/target/DYSF44530D/target.h +++ b/src/main/target/DYSF44530D/target.h @@ -32,6 +32,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PC0 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/EACHINEF411_AIO/target.h b/src/main/target/EACHINEF411_AIO/target.h index e63ee12d53..5c73aae3d8 100644 --- a/src/main/target/EACHINEF411_AIO/target.h +++ b/src/main/target/EACHINEF411_AIO/target.h @@ -32,6 +32,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/EACHINEF722_AIO/target.h b/src/main/target/EACHINEF722_AIO/target.h index 8fa91ea20e..05fd5dc2bd 100644 --- a/src/main/target/EACHINEF722_AIO/target.h +++ b/src/main/target/EACHINEF722_AIO/target.h @@ -34,6 +34,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PD2 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/ELINF405/target.h b/src/main/target/ELINF405/target.h index 52b9b26da7..ebe756944e 100644 --- a/src/main/target/ELINF405/target.h +++ b/src/main/target/ELINF405/target.h @@ -34,6 +34,9 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 #define USE_OSD #define USE_LED diff --git a/src/main/target/EXUAVF4PRO/target.h b/src/main/target/EXUAVF4PRO/target.h index 0673db332d..811e4685f2 100644 --- a/src/main/target/EXUAVF4PRO/target.h +++ b/src/main/target/EXUAVF4PRO/target.h @@ -34,6 +34,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/FF_FORTINIF4_REV03/target.mk b/src/main/target/FF_FORTINIF4_REV03/target.mk index 5802c7e513..ccc81457b5 100644 --- a/src/main/target/FF_FORTINIF4_REV03/target.mk +++ b/src/main/target/FF_FORTINIF4_REV03/target.mk @@ -1,5 +1,5 @@ F405_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/FF_PIKOF4OSD/target.mk b/src/main/target/FF_PIKOF4OSD/target.mk index f76ab4b694..1c1b59bea2 100644 --- a/src/main/target/FF_PIKOF4OSD/target.mk +++ b/src/main/target/FF_PIKOF4OSD/target.mk @@ -1,5 +1,5 @@ F405_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/FLYWOOF411HEX/target.h b/src/main/target/FLYWOOF411HEX/target.h index 3843492135..297da4cf55 100644 --- a/src/main/target/FLYWOOF411HEX/target.h +++ b/src/main/target/FLYWOOF411HEX/target.h @@ -32,6 +32,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB2 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/GEELANGF411/target.h b/src/main/target/GEELANGF411/target.h index 0884f818aa..7f0e8cc132 100644 --- a/src/main/target/GEELANGF411/target.h +++ b/src/main/target/GEELANGF411/target.h @@ -32,6 +32,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/HAKRCF411/target.mk b/src/main/target/HAKRCF411/target.mk index 3d123c4a6a..18c89d394b 100755 --- a/src/main/target/HAKRCF411/target.mk +++ b/src/main/target/HAKRCF411/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_icm20689.c \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/HELSEL_STRIKERF7/target.mk b/src/main/target/HELSEL_STRIKERF7/target.mk index 9a8d123a0b..7b44483ee0 100644 --- a/src/main/target/HELSEL_STRIKERF7/target.mk +++ b/src/main/target/HELSEL_STRIKERF7/target.mk @@ -1,5 +1,5 @@ F7X2RE_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/IFLIGHT_BLITZ_F411RX/target.mk b/src/main/target/IFLIGHT_BLITZ_F411RX/target.mk index d411a7c213..d96684bfdf 100644 --- a/src/main/target/IFLIGHT_BLITZ_F411RX/target.mk +++ b/src/main/target/IFLIGHT_BLITZ_F411RX/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/MERAKRCF405/target.h b/src/main/target/MERAKRCF405/target.h index 8c16485a17..0dd066d0da 100644 --- a/src/main/target/MERAKRCF405/target.h +++ b/src/main/target/MERAKRCF405/target.h @@ -32,6 +32,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PA4 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/MERAKRCF722/target.h b/src/main/target/MERAKRCF722/target.h index ba0dcf93c6..f7ea72b501 100644 --- a/src/main/target/MERAKRCF722/target.h +++ b/src/main/target/MERAKRCF722/target.h @@ -32,6 +32,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PA4 +#define FLASH_SPI_INSTANCE SPI1 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED diff --git a/src/main/target/NBDBBBLV2/target.mk b/src/main/target/NBDBBBLV2/target.mk index a0129346e6..ab806ed443 100644 --- a/src/main/target/NBDBBBLV2/target.mk +++ b/src/main/target/NBDBBBLV2/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES = VCP ONBOARDFLASH +FEATURES = VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_bmi160.c \ diff --git a/src/main/target/NBDBBBLV3/target.mk b/src/main/target/NBDBBBLV3/target.mk index 2d255c237a..2be7f12097 100644 --- a/src/main/target/NBDBBBLV3/target.mk +++ b/src/main/target/NBDBBBLV3/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES = VCP ONBOARDFLASH +FEATURES = VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/NBD_CRICKETF7/target.h b/src/main/target/NBD_CRICKETF7/target.h index 94eb71edb9..7c818393f9 100644 --- a/src/main/target/NBD_CRICKETF7/target.h +++ b/src/main/target/NBD_CRICKETF7/target.h @@ -32,6 +32,9 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PA4 +#define FLASH_SPI_INSTANCE SPI1 #define USE_OSD #define USE_LED diff --git a/src/main/target/NBD_CRICKETF7V2/target.mk b/src/main/target/NBD_CRICKETF7V2/target.mk index 0330b424cf..664d35b456 100644 --- a/src/main/target/NBD_CRICKETF7V2/target.mk +++ b/src/main/target/NBD_CRICKETF7V2/target.mk @@ -1,5 +1,5 @@ F7X2RE_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_bmi270.c \ diff --git a/src/main/target/PLUMF4/target.h b/src/main/target/PLUMF4/target.h index c60ed5d68b..47d73ff289 100644 --- a/src/main/target/PLUMF4/target.h +++ b/src/main/target/PLUMF4/target.h @@ -32,6 +32,9 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PA15 +#define FLASH_SPI_INSTANCE SPI3 #define USE_OSD #define USE_LED diff --git a/src/main/target/PODIUMF4/target.h b/src/main/target/PODIUMF4/target.h index 9b6f67c348..239247b44f 100644 --- a/src/main/target/PODIUMF4/target.h +++ b/src/main/target/PODIUMF4/target.h @@ -34,6 +34,9 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 #define USE_OSD #define USE_LED diff --git a/src/main/target/PYRODRONEF7/target.h b/src/main/target/PYRODRONEF7/target.h index e3087c556e..043e6421f1 100644 --- a/src/main/target/PYRODRONEF7/target.h +++ b/src/main/target/PYRODRONEF7/target.h @@ -60,6 +60,10 @@ #define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST) #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB12 +#define FLASH_SPI_INSTANCE SPI2 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_UART1 #define UART1_RX_PIN PA10 diff --git a/src/main/target/REVONANO/target.mk b/src/main/target/REVONANO/target.mk index ce4d9fd8c3..26dc921c21 100644 --- a/src/main/target/REVONANO/target.mk +++ b/src/main/target/REVONANO/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_mpu6500.c \ diff --git a/src/main/target/SOULF4/target.h b/src/main/target/SOULF4/target.h index 0a219e9750..3668dec389 100644 --- a/src/main/target/SOULF4/target.h +++ b/src/main/target/SOULF4/target.h @@ -38,6 +38,9 @@ #define USE_BARO #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 #define USE_OSD #define USE_LED diff --git a/src/main/target/STM32F411DISCOVERY/target.mk b/src/main/target/STM32F411DISCOVERY/target.mk index 7fc2c3c93b..042663ba5f 100644 --- a/src/main/target/STM32F411DISCOVERY/target.mk +++ b/src/main/target/STM32F411DISCOVERY/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES += VCP SDCARD_SPI ONBOARDFLASH +FEATURES += VCP SDCARD_SPI TARGET_SRC = \ drivers/accgyro_legacy/accgyro_l3gd20.c \ diff --git a/src/main/target/TRANSTECF411/target.mk b/src/main/target/TRANSTECF411/target.mk index f3d6ea2f9e..642d32e3e4 100644 --- a/src/main/target/TRANSTECF411/target.mk +++ b/src/main/target/TRANSTECF411/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_mpu.c \ diff --git a/src/main/target/TRANSTECF411AIO/target.mk b/src/main/target/TRANSTECF411AIO/target.mk index d20a4d2625..524dee8841 100644 --- a/src/main/target/TRANSTECF411AIO/target.mk +++ b/src/main/target/TRANSTECF411AIO/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/TRANSTECF411HD/target.mk b/src/main/target/TRANSTECF411HD/target.mk index d20a4d2625..524dee8841 100644 --- a/src/main/target/TRANSTECF411HD/target.mk +++ b/src/main/target/TRANSTECF411HD/target.mk @@ -1,5 +1,5 @@ F411_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/TRANSTECF7/target.mk b/src/main/target/TRANSTECF7/target.mk index ba5bd238dc..c194b5a020 100644 --- a/src/main/target/TRANSTECF7/target.mk +++ b/src/main/target/TRANSTECF7/target.mk @@ -1,5 +1,5 @@ F7X2RE_TARGETS += $(TARGET) -FEATURES += VCP ONBOARDFLASH +FEATURES += VCP TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/XRACERF4/target.h b/src/main/target/XRACERF4/target.h index 23e1c88c3a..47131c7011 100644 --- a/src/main/target/XRACERF4/target.h +++ b/src/main/target/XRACERF4/target.h @@ -34,6 +34,10 @@ #define USE_MAX7456 #define USE_VCP +#define USE_FLASH_M25P16 // 16MB Micron M25P16 driver; drives all unless QSPI +#define FLASH_CS_PIN PB3 +#define FLASH_SPI_INSTANCE SPI3 +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define USE_OSD #define USE_LED From 3dade976d455d2205d4ff3ad2720651e40a0b31d Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:30:22 -0500 Subject: [PATCH 05/10] fix(targets): PYRODRONEF4PDB allow PC13 in TARGET_IO_PORTC AI Generated fix FLASH_CS_PIN is PC13 on PYRODRONEF4PDB per BF unified-target configs. The pre-existing TARGET_IO_PORTC mask excluded PC13 (BIT(13)), causing a compile-time defio validation failure: pg/bus_spi.c:131: error: 'defio_error_PC13_is_not_supported_on_TARGET' Remove BIT(13) from the PORTC exclusion so PC13 is available to the defio/SPI subsystem as the flash chip-select GPIO. BIT(15) and BIT(14) remain excluded (RTC oscillator pins). Build verified clean. Co-Authored-By: Claude Sonnet 4.6 --- src/main/target/PYRODRONEF4PDB/target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/target/PYRODRONEF4PDB/target.h b/src/main/target/PYRODRONEF4PDB/target.h index adc12e41af..a9422a6394 100644 --- a/src/main/target/PYRODRONEF4PDB/target.h +++ b/src/main/target/PYRODRONEF4PDB/target.h @@ -122,7 +122,7 @@ #define TARGET_IO_PORTA (0xffff & ~(BIT(13))) #define TARGET_IO_PORTB (0xffff & ~(BIT(2))) -#define TARGET_IO_PORTC (0xffff & ~(BIT(15)|BIT(14)|BIT(13))) +#define TARGET_IO_PORTC (0xffff & ~(BIT(15)|BIT(14))) #define TARGET_IO_PORTD BIT(2) // DEFINE TIMERS From 4521dbc72386348dc78f6aceaeb9bf3788fc4791 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:33:23 -0500 Subject: [PATCH 06/10] fix(targets): LUXH743NDAA GYRO_1_SPI_BUS use SPIDevice enum not peripheral instance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SPI6 is SPI_TypeDef* — passing it through SPI_DEV_TO_CFG() performs pointer arithmetic and emits -Wint-conversion when spiSetBusInstance() expects uint32_t. Use SPIDEV_6 (the SPIDevice enum) consistent with all other SPI_BUS defines. --- src/main/target/LUXH743NDAA/target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/target/LUXH743NDAA/target.h b/src/main/target/LUXH743NDAA/target.h index 25e1193737..659bd5ff5f 100644 --- a/src/main/target/LUXH743NDAA/target.h +++ b/src/main/target/LUXH743NDAA/target.h @@ -85,7 +85,7 @@ #define GYRO_1_ALIGN CW270_DEG_FLIP #define GYRO_1_CS_PIN PD7 // ICM-42688-P SPI6_NSS #define GYRO_1_EXTI_PIN PC13 // ICM-42688-P INT -#define GYRO_1_SPI_BUS SPI6 +#define GYRO_1_SPI_BUS SPIDEV_6 #define USE_DUAL_GYRO From 40c6a9c7ea6a93a51297c8278981e255568df924 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:35:49 -0500 Subject: [PATCH 07/10] revert(targets): LUXH743NDAA restore SPI6 pending SPIDEV_6 enum addition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SPIDEV_6 does not exist in EF's SPIDevice enum — using it causes a compile error. Restore SPI6 (warning only) until the enum and H7 SPI driver are extended. Tracked in issue #NNNN. --- src/main/target/LUXH743NDAA/target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/target/LUXH743NDAA/target.h b/src/main/target/LUXH743NDAA/target.h index 659bd5ff5f..25e1193737 100644 --- a/src/main/target/LUXH743NDAA/target.h +++ b/src/main/target/LUXH743NDAA/target.h @@ -85,7 +85,7 @@ #define GYRO_1_ALIGN CW270_DEG_FLIP #define GYRO_1_CS_PIN PD7 // ICM-42688-P SPI6_NSS #define GYRO_1_EXTI_PIN PC13 // ICM-42688-P INT -#define GYRO_1_SPI_BUS SPIDEV_6 +#define GYRO_1_SPI_BUS SPI6 #define USE_DUAL_GYRO From 0e56e059e6baacf783f1810f90b24ca06ec58c81 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:41:39 -0500 Subject: [PATCH 08/10] fix(target): LUXH743NDAA use SPIDEV_6 enum value for gyro SPI bus Raw SPI6 peripheral pointer caused -Wint-conversion; correct define is SPIDEV_6 now that the enum and driver support exist (fix/spidev6-h7). Co-Authored-By: Claude Sonnet 4.6 --- src/main/target/LUXH743NDAA/target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/target/LUXH743NDAA/target.h b/src/main/target/LUXH743NDAA/target.h index 25e1193737..659bd5ff5f 100644 --- a/src/main/target/LUXH743NDAA/target.h +++ b/src/main/target/LUXH743NDAA/target.h @@ -85,7 +85,7 @@ #define GYRO_1_ALIGN CW270_DEG_FLIP #define GYRO_1_CS_PIN PD7 // ICM-42688-P SPI6_NSS #define GYRO_1_EXTI_PIN PC13 // ICM-42688-P INT -#define GYRO_1_SPI_BUS SPI6 +#define GYRO_1_SPI_BUS SPIDEV_6 #define USE_DUAL_GYRO From c3890c49a270889a903ccad6e02b5e992b87f16f Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:48:10 -0500 Subject: [PATCH 09/10] fix(targets): correct SDCARD defines in 3 H7 targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FOXEERH743: remove spurious SDCARD from FEATURES — BF config has no SDCARD hardware (//TODO #define SDCARD_MODE OFF); generator artifact. KAKUTEH7, GEPRC_TAKER_H743: remove USE_SDCARD_SDIO — BF configs specify USE_SDCARD_SPI only; SDIO define conflicts with the SPI CS/instance pins already present in both files. Found by CodeRabbit review of PR #1233. --- src/main/target/FOXEERH743/target.mk | 2 +- src/main/target/GEPRC_TAKER_H743/target.h | 1 - src/main/target/KAKUTEH7/target.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/target/FOXEERH743/target.mk b/src/main/target/FOXEERH743/target.mk index 5fc77ea926..0f68197c15 100644 --- a/src/main/target/FOXEERH743/target.mk +++ b/src/main/target/FOXEERH743/target.mk @@ -1,5 +1,5 @@ H743_TARGETS += $(TARGET) -FEATURES += VCP SDCARD ONBOARDFLASH +FEATURES += VCP ONBOARDFLASH TARGET_SRC = \ drivers/accgyro/accgyro_spi_mpu6000.c \ diff --git a/src/main/target/GEPRC_TAKER_H743/target.h b/src/main/target/GEPRC_TAKER_H743/target.h index 47321b2c57..ad7004e710 100644 --- a/src/main/target/GEPRC_TAKER_H743/target.h +++ b/src/main/target/GEPRC_TAKER_H743/target.h @@ -126,7 +126,6 @@ #define I2C2_SCL PB10 #define I2C2_SDA PB11 -#define USE_SDCARD_SDIO #define SDCARD_SPI_CS_PIN PA15 #define SDCARD_SPI_INSTANCE SPI3 //notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify diff --git a/src/main/target/KAKUTEH7/target.h b/src/main/target/KAKUTEH7/target.h index a81ff3ba59..814ce6058d 100644 --- a/src/main/target/KAKUTEH7/target.h +++ b/src/main/target/KAKUTEH7/target.h @@ -116,7 +116,6 @@ #define I2C1_SCL PB6 #define I2C1_SDA PB7 -#define USE_SDCARD_SDIO #define SDCARD_SPI_CS_PIN PA4 #define SDCARD_SPI_INSTANCE SPI1 //notice - NEED: #define SDCARD_DMA_CHANNEL X // please verify From 9dd58aaaf8a77bec3c4136d275778c61c641ded0 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:52:29 -0500 Subject: [PATCH 10/10] style(targets): remove duplicate USE_FLASH_M25P16 in MAMBAH743 Two identical defines existed: bare at line 37 and commented at line 44. Removed the bare one; retained the annotated form with the driver comment '// 16MB Micron M25P16 driver; drives all unless QSPI' for clarity. --- src/main/target/MAMBAH743/target.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/target/MAMBAH743/target.h b/src/main/target/MAMBAH743/target.h index 4eda4ee5e3..a7e02c9e91 100644 --- a/src/main/target/MAMBAH743/target.h +++ b/src/main/target/MAMBAH743/target.h @@ -34,7 +34,6 @@ #define USE_ACC_SPI_ICM42605 #define USE_BARO_DPS310 #define USE_FLASH -#define USE_FLASH_M25P16 #define USE_FLASH_W25N01G #define USE_MAX7456 #define USE_BARO