From 943c2781d8c4c77a0d3017570881ca291d02d8f7 Mon Sep 17 00:00:00 2001 From: "K.J" <95895613+Greypang@users.noreply.github.com> Date: Tue, 21 Oct 2025 17:58:07 +0800 Subject: [PATCH 1/8] Create config.h --- configs/GEPRC_TAKER_G473AIO/config.h | 115 +++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 configs/GEPRC_TAKER_G473AIO/config.h diff --git a/configs/GEPRC_TAKER_G473AIO/config.h b/configs/GEPRC_TAKER_G473AIO/config.h new file mode 100644 index 000000000..084bc45d7 --- /dev/null +++ b/configs/GEPRC_TAKER_G473AIO/config.h @@ -0,0 +1,115 @@ +/* + * This file is part of Betaflight. + * + * Betaflight is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * Betaflight is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +#pragma once + +#define FC_TARGET_MCU STM32G47X + +#define BOARD_NAME GEPRC_TAKER_G473AIO +#define MANUFACTURER_ID GEPR + +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_LED_STRIP +#define USE_GYRO_CLKIN +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_BARO_MS5611 + +#define BEEPER_PIN PA15 +#define MOTOR1_PIN PA0 +#define MOTOR2_PIN PA1 +#define MOTOR3_PIN PA2 +#define MOTOR4_PIN PA3 + +#define LED_STRIP_PIN PB2 + +#define UART1_TX_PIN PB6 +#define UART2_TX_PIN PB3 +#define UART3_TX_PIN PB10 + +#define UART1_RX_PIN PB7 +#define UART2_RX_PIN PB4 +#define UART3_RX_PIN PB11 + +#define I2C2_SCL_PIN PA9 +#define I2C2_SDA_PIN PA8 + + +#define LED0_PIN PA10 +#define LED1_PIN PB9 + +#define SPI1_SCK_PIN PA5 +#define SPI1_SDI_PIN PA6 +#define SPI1_SDO_PIN PA7 + +#define SPI2_SCK_PIN PB13 +#define SPI2_SDI_PIN PB14 +#define SPI2_SDO_PIN PB15 + +#define SPI3_SCK_PIN PC10 +#define SPI3_SDI_PIN PC11 +#define SPI3_SDO_PIN PB5 + +#define FLASH_CS_PIN PC6 + + +#define ADC_VBAT_PIN PB1 +#define ADC_CURR_PIN PB0 + + +#define MAX7456_SPI_CS_PIN PB12 + +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_CS_PIN PC13 +#define GYRO_1_CLKIN_PIN PA4 + +#define TIMER_PIN_MAPPING \ + TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, 1 ) \ + TIMER_PIN_MAP( 1, MOTOR1_PIN , 1, 2) \ + TIMER_PIN_MAP( 2, MOTOR2_PIN , 1, 3) \ + TIMER_PIN_MAP( 3, MOTOR3_PIN , 1, 4) \ + TIMER_PIN_MAP( 4, MOTOR4_PIN , 1, 5) \ + TIMER_PIN_MAP( 5, GYRO_1_CLKIN_PIN, 1, -1 ) + +#define ADC1_DMA_OPT 6 +#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define BARO_I2C_INSTANCE I2CDEV_2 +#define MAG_I2C_INSTANCE I2CDEV_2 +#define SERIALRX_PROVIDER SERIALRX_CRSF +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH +#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF +#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_ON +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 750 +#define BEEPER_INVERTED +#define MAX7456_SPI_INSTANCE SPI2 +#define FLASH_SPI_INSTANCE SPI3 +#define GYRO_1_SPI_INSTANCE SPI1 +#define GYRO_1_ALIGN CW270_DEG From bcd8b608c803f75a37274f6f4873e0662c9fc0ea Mon Sep 17 00:00:00 2001 From: "K.J" <95895613+Greypang@users.noreply.github.com> Date: Tue, 21 Oct 2025 18:04:47 +0800 Subject: [PATCH 2/8] Create config.h --- SUB250_Redfox_G473AIO/config.h | 115 +++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 SUB250_Redfox_G473AIO/config.h diff --git a/SUB250_Redfox_G473AIO/config.h b/SUB250_Redfox_G473AIO/config.h new file mode 100644 index 000000000..1b20c24ec --- /dev/null +++ b/SUB250_Redfox_G473AIO/config.h @@ -0,0 +1,115 @@ +/* + * This file is part of Betaflight. + * + * Betaflight is free software. You can redistribute this software + * and/or modify this software under the terms of the GNU General + * Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later + * version. + * + * Betaflight is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software. + * + * If not, see . + */ + +#pragma once + +#define FC_TARGET_MCU STM32G47X + +#define BOARD_NAME SUB250_Redfox_G473AIO +#define MANUFACTURER_ID SUB250 + +#define USE_ACC +#define USE_GYRO +#define USE_ACC_SPI_ICM42688P +#define USE_GYRO_SPI_ICM42688P +#define USE_FLASH +#define USE_FLASH_W25Q128FV +#define USE_MAX7456 +#define USE_LED_STRIP +#define USE_GYRO_CLKIN +#define USE_BARO +#define USE_BARO_BMP280 +#define USE_BARO_DPS310 +#define USE_BARO_MS5611 + +#define BEEPER_PIN PA15 +#define MOTOR1_PIN PA0 +#define MOTOR2_PIN PA1 +#define MOTOR3_PIN PA2 +#define MOTOR4_PIN PA3 + +#define LED_STRIP_PIN PB2 + +#define UART1_TX_PIN PB6 +#define UART2_TX_PIN PB3 +#define UART3_TX_PIN PB10 + +#define UART1_RX_PIN PB7 +#define UART2_RX_PIN PB4 +#define UART3_RX_PIN PB11 + +#define I2C2_SCL_PIN PA9 +#define I2C2_SDA_PIN PA8 + + +#define LED0_PIN PA10 +#define LED1_PIN PB9 + +#define SPI1_SCK_PIN PA5 +#define SPI1_SDI_PIN PA6 +#define SPI1_SDO_PIN PA7 + +#define SPI2_SCK_PIN PB13 +#define SPI2_SDI_PIN PB14 +#define SPI2_SDO_PIN PB15 + +#define SPI3_SCK_PIN PC10 +#define SPI3_SDI_PIN PC11 +#define SPI3_SDO_PIN PB5 + +#define FLASH_CS_PIN PC6 + + +#define ADC_VBAT_PIN PB1 +#define ADC_CURR_PIN PB0 + + +#define MAX7456_SPI_CS_PIN PB12 + +#define GYRO_1_EXTI_PIN PC4 +#define GYRO_1_CS_PIN PC13 +#define GYRO_1_CLKIN_PIN PA4 + +#define TIMER_PIN_MAPPING \ + TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, 1 ) \ + TIMER_PIN_MAP( 1, MOTOR1_PIN , 1, 2) \ + TIMER_PIN_MAP( 2, MOTOR2_PIN , 1, 3) \ + TIMER_PIN_MAP( 3, MOTOR3_PIN , 1, 4) \ + TIMER_PIN_MAP( 4, MOTOR4_PIN , 1, 5) \ + TIMER_PIN_MAP( 5, GYRO_1_CLKIN_PIN, 1, -1 ) + +#define ADC1_DMA_OPT 6 +#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define BARO_I2C_INSTANCE I2CDEV_2 +#define MAG_I2C_INSTANCE I2CDEV_2 +#define SERIALRX_PROVIDER SERIALRX_CRSF +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH +#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF +#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_ON +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SCALE 750 +#define BEEPER_INVERTED +#define MAX7456_SPI_INSTANCE SPI2 +#define FLASH_SPI_INSTANCE SPI3 +#define GYRO_1_SPI_INSTANCE SPI1 +#define GYRO_1_ALIGN CW270_DEG From 8d529bbf831ffbd53a63ed882e216747bf80a63c Mon Sep 17 00:00:00 2001 From: "K.J" <95895613+Greypang@users.noreply.github.com> Date: Wed, 22 Oct 2025 15:06:47 +0800 Subject: [PATCH 3/8] Rename SUB250_Redfox_G473AIO/config.h to configs/SUB250_Redfox_G473AIO/config.h --- {SUB250_Redfox_G473AIO => configs/SUB250_Redfox_G473AIO}/config.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {SUB250_Redfox_G473AIO => configs/SUB250_Redfox_G473AIO}/config.h (100%) diff --git a/SUB250_Redfox_G473AIO/config.h b/configs/SUB250_Redfox_G473AIO/config.h similarity index 100% rename from SUB250_Redfox_G473AIO/config.h rename to configs/SUB250_Redfox_G473AIO/config.h From 7921d0a7c5632bbd35565f531ac82d17f6d97f21 Mon Sep 17 00:00:00 2001 From: "K.J" <95895613+Greypang@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:08:53 +0800 Subject: [PATCH 4/8] Update and rename config.h to config.h --- .../{SUB250_Redfox_G473AIO => SUB250_REDFOX_G473AIO}/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename configs/{SUB250_Redfox_G473AIO => SUB250_REDFOX_G473AIO}/config.h (98%) diff --git a/configs/SUB250_Redfox_G473AIO/config.h b/configs/SUB250_REDFOX_G473AIO/config.h similarity index 98% rename from configs/SUB250_Redfox_G473AIO/config.h rename to configs/SUB250_REDFOX_G473AIO/config.h index 1b20c24ec..6ffe1dee3 100644 --- a/configs/SUB250_Redfox_G473AIO/config.h +++ b/configs/SUB250_REDFOX_G473AIO/config.h @@ -23,7 +23,7 @@ #define FC_TARGET_MCU STM32G47X -#define BOARD_NAME SUB250_Redfox_G473AIO +#define BOARD_NAME SUB250_REDFOX_G473AIO #define MANUFACTURER_ID SUB250 #define USE_ACC From 83a9a476cb59f4b0149d142d1c83e46b92d8a9e7 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 31 Oct 2025 02:21:20 +0100 Subject: [PATCH 5/8] Apply suggestion from @osirisinferi Co-authored-by: Osiris Inferi --- configs/SUB250_REDFOX_G473AIO/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/SUB250_REDFOX_G473AIO/config.h b/configs/SUB250_REDFOX_G473AIO/config.h index 6ffe1dee3..23a547b71 100644 --- a/configs/SUB250_REDFOX_G473AIO/config.h +++ b/configs/SUB250_REDFOX_G473AIO/config.h @@ -24,7 +24,7 @@ #define FC_TARGET_MCU STM32G47X #define BOARD_NAME SUB250_REDFOX_G473AIO -#define MANUFACTURER_ID SUB250 +#define MANUFACTURER_ID SU25 #define USE_ACC #define USE_GYRO From ffec8e4edd918a6ab1c49f965dd0cc5ef812fe82 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 31 Oct 2025 02:31:50 +0100 Subject: [PATCH 6/8] Refactor config.h for improved readability and updates --- configs/GEPRC_TAKER_G473AIO/config.h | 48 +++++++++++++--------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/configs/GEPRC_TAKER_G473AIO/config.h b/configs/GEPRC_TAKER_G473AIO/config.h index 084bc45d7..3e670a463 100644 --- a/configs/GEPRC_TAKER_G473AIO/config.h +++ b/configs/GEPRC_TAKER_G473AIO/config.h @@ -23,18 +23,17 @@ #define FC_TARGET_MCU STM32G47X -#define BOARD_NAME GEPRC_TAKER_G473AIO +#define BOARD_NAME GEPRC_TAKER_G473AIO #define MANUFACTURER_ID GEPR #define USE_ACC -#define USE_GYRO #define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_CLKIN #define USE_GYRO_SPI_ICM42688P #define USE_FLASH #define USE_FLASH_W25Q128FV #define USE_MAX7456 -#define USE_LED_STRIP -#define USE_GYRO_CLKIN #define USE_BARO #define USE_BARO_BMP280 #define USE_BARO_DPS310 @@ -59,7 +58,6 @@ #define I2C2_SCL_PIN PA9 #define I2C2_SDA_PIN PA8 - #define LED0_PIN PA10 #define LED1_PIN PB9 @@ -77,11 +75,9 @@ #define FLASH_CS_PIN PC6 - #define ADC_VBAT_PIN PB1 #define ADC_CURR_PIN PB0 - #define MAX7456_SPI_CS_PIN PB12 #define GYRO_1_EXTI_PIN PC4 @@ -89,27 +85,27 @@ #define GYRO_1_CLKIN_PIN PA4 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, 1 ) \ - TIMER_PIN_MAP( 1, MOTOR1_PIN , 1, 2) \ - TIMER_PIN_MAP( 2, MOTOR2_PIN , 1, 3) \ - TIMER_PIN_MAP( 3, MOTOR3_PIN , 1, 4) \ - TIMER_PIN_MAP( 4, MOTOR4_PIN , 1, 5) \ + TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, 0 ) \ + TIMER_PIN_MAP( 1, MOTOR1_PIN , 1, 1) \ + TIMER_PIN_MAP( 2, MOTOR2_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR3_PIN , 1, 3) \ + TIMER_PIN_MAP( 4, MOTOR4_PIN , 1, 4) \ TIMER_PIN_MAP( 5, GYRO_1_CLKIN_PIN, 1, -1 ) -#define ADC1_DMA_OPT 6 -#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART1 -#define SERIALRX_UART SERIAL_PORT_USART2 -#define BARO_I2C_INSTANCE I2CDEV_2 -#define MAG_I2C_INSTANCE I2CDEV_2 -#define SERIALRX_PROVIDER SERIALRX_CRSF -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH -#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF -#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_ON +#define ADC1_DMA_OPT 8 +#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define BARO_I2C_INSTANCE I2CDEV_2 +#define MAG_I2C_INSTANCE I2CDEV_2 +#define SERIALRX_PROVIDER SERIALRX_CRSF +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH +#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF +#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_ON #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC -#define DEFAULT_CURRENT_METER_SCALE 750 +#define DEFAULT_CURRENT_METER_SCALE 750 #define BEEPER_INVERTED -#define MAX7456_SPI_INSTANCE SPI2 -#define FLASH_SPI_INSTANCE SPI3 -#define GYRO_1_SPI_INSTANCE SPI1 -#define GYRO_1_ALIGN CW270_DEG +#define MAX7456_SPI_INSTANCE SPI2 +#define FLASH_SPI_INSTANCE SPI3 +#define GYRO_1_SPI_INSTANCE SPI1 +#define GYRO_1_ALIGN CW270_DEG From 13b5bf1c23188754694ec2f186c69f40bccce824 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 31 Oct 2025 02:36:40 +0100 Subject: [PATCH 7/8] Sanatize and removed tabs (as in previous commit) --- configs/SUB250_REDFOX_G473AIO/config.h | 47 ++++++++++++-------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/configs/SUB250_REDFOX_G473AIO/config.h b/configs/SUB250_REDFOX_G473AIO/config.h index 23a547b71..772cf4c07 100644 --- a/configs/SUB250_REDFOX_G473AIO/config.h +++ b/configs/SUB250_REDFOX_G473AIO/config.h @@ -23,18 +23,17 @@ #define FC_TARGET_MCU STM32G47X -#define BOARD_NAME SUB250_REDFOX_G473AIO +#define BOARD_NAME SUB250_REDFOX_G473AIO #define MANUFACTURER_ID SU25 #define USE_ACC -#define USE_GYRO #define USE_ACC_SPI_ICM42688P +#define USE_GYRO +#define USE_GYRO_CLKIN #define USE_GYRO_SPI_ICM42688P #define USE_FLASH #define USE_FLASH_W25Q128FV #define USE_MAX7456 -#define USE_LED_STRIP -#define USE_GYRO_CLKIN #define USE_BARO #define USE_BARO_BMP280 #define USE_BARO_DPS310 @@ -77,11 +76,9 @@ #define FLASH_CS_PIN PC6 - #define ADC_VBAT_PIN PB1 #define ADC_CURR_PIN PB0 - #define MAX7456_SPI_CS_PIN PB12 #define GYRO_1_EXTI_PIN PC4 @@ -89,27 +86,27 @@ #define GYRO_1_CLKIN_PIN PA4 #define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, 1 ) \ - TIMER_PIN_MAP( 1, MOTOR1_PIN , 1, 2) \ - TIMER_PIN_MAP( 2, MOTOR2_PIN , 1, 3) \ - TIMER_PIN_MAP( 3, MOTOR3_PIN , 1, 4) \ - TIMER_PIN_MAP( 4, MOTOR4_PIN , 1, 5) \ + TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, 0 ) \ + TIMER_PIN_MAP( 1, MOTOR1_PIN , 1, 1) \ + TIMER_PIN_MAP( 2, MOTOR2_PIN , 1, 2) \ + TIMER_PIN_MAP( 3, MOTOR3_PIN , 1, 3) \ + TIMER_PIN_MAP( 4, MOTOR4_PIN , 1, 4) \ TIMER_PIN_MAP( 5, GYRO_1_CLKIN_PIN, 1, -1 ) -#define ADC1_DMA_OPT 6 -#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART1 -#define SERIALRX_UART SERIAL_PORT_USART2 -#define BARO_I2C_INSTANCE I2CDEV_2 -#define MAG_I2C_INSTANCE I2CDEV_2 -#define SERIALRX_PROVIDER SERIALRX_CRSF -#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH -#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF -#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_ON +#define ADC1_DMA_OPT 8 +#define VTX_SMARTAUDIO_UART SERIAL_PORT_USART1 +#define SERIALRX_UART SERIAL_PORT_USART2 +#define BARO_I2C_INSTANCE I2CDEV_2 +#define MAG_I2C_INSTANCE I2CDEV_2 +#define SERIALRX_PROVIDER SERIALRX_CRSF +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH +#define DEFAULT_DSHOT_BURST DSHOT_DMAR_OFF +#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_ON #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC -#define DEFAULT_CURRENT_METER_SCALE 750 +#define DEFAULT_CURRENT_METER_SCALE 750 #define BEEPER_INVERTED -#define MAX7456_SPI_INSTANCE SPI2 -#define FLASH_SPI_INSTANCE SPI3 -#define GYRO_1_SPI_INSTANCE SPI1 -#define GYRO_1_ALIGN CW270_DEG +#define MAX7456_SPI_INSTANCE SPI2 +#define FLASH_SPI_INSTANCE SPI3 +#define GYRO_1_SPI_INSTANCE SPI1 +#define GYRO_1_ALIGN CW270_DEG From 8edb1ef61966f04b59dc011367566de9a9c9b4cd Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 31 Oct 2025 02:51:22 +0100 Subject: [PATCH 8/8] Clean up spacing in config.h Removed an empty line between I2C and LED pin definitions. --- configs/SUB250_REDFOX_G473AIO/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/SUB250_REDFOX_G473AIO/config.h b/configs/SUB250_REDFOX_G473AIO/config.h index 772cf4c07..f94da1041 100644 --- a/configs/SUB250_REDFOX_G473AIO/config.h +++ b/configs/SUB250_REDFOX_G473AIO/config.h @@ -58,7 +58,6 @@ #define I2C2_SCL_PIN PA9 #define I2C2_SDA_PIN PA8 - #define LED0_PIN PA10 #define LED1_PIN PB9