/*==============================================================================
Generated on: 2025-06-11 20:35:53.832368
Generated by: betaflight_target_converter.py
Source: https://github.com/betaflight/unified-targets
Board name: BETAFPVG473
Manufacturer ID: BEFH

//copy this line to madflight.ino to use this flight controller
#define MF_BOARD "brd/betaflight/BEFH-BETAFPVG473.h"

Note: madflight will pick the last sensor defined here, this might not be the sensor that is actually on the board. Comment the offending sensors out, or use madflight_config to override.
==============================================================================*/

#define MF_BOARD_NAME "BETAFLIGHT-BEFH-BETAFPVG473"
#define MF_MCU_NAME "STM32G47X"

const char madflight_board[] = R""(
imu_bus_type SPI
imu_gizmo ICM42688P // #define USE_GYRO_SPI_ICM42688P
bar_gizmo BMP280 // #define USE_BARO_BMP280
bar_gizmo DPS310 // #define USE_BARO_DPS310
// resource BEEPER 1 A08
pin_out0 PB0 // resource MOTOR 1 B00
pin_out1 PB1 // resource MOTOR 2 B01
pin_out2 PB6 // resource MOTOR 3 B06
pin_out3 PC13 // resource MOTOR 4 C13
// resource LED_STRIP 1 B02
pin_ser0_tx PA9 // resource SERIAL_TX 1 A09
pin_ser1_tx PA2 // resource SERIAL_TX 2 A02
pin_ser2_tx PB10 // resource SERIAL_TX 3 B10
pin_ser3_tx PC10 // resource SERIAL_TX 4 C10
pin_ser0_rx PA10 // resource SERIAL_RX 1 A10
pin_ser1_rx PA3 // resource SERIAL_RX 2 A03
pin_ser2_rx PB11 // resource SERIAL_RX 3 B11
pin_ser3_rx PC11 // resource SERIAL_RX 4 C11
pin_i2c0_scl PA15 // resource I2C_SCL 1 A15
pin_i2c0_sda PB7 // resource I2C_SDA 1 B07
pin_led PC15 // resource LED 1 C15
// resource LED 2 C14
pin_spi0_sclk PA5 // resource SPI_SCK 1 A05
pin_spi1_sclk PB13 // resource SPI_SCK 2 B13
pin_spi2_sclk PB3 // resource SPI_SCK 3 B03
pin_spi0_miso PA6 // resource SPI_MISO 1 A06
pin_spi1_miso PB14 // resource SPI_MISO 2 B14
pin_spi2_miso PB4 // resource SPI_MISO 3 B04
pin_spi0_mosi PA7 // resource SPI_MOSI 1 A07
pin_spi1_mosi PB15 // resource SPI_MOSI 2 B15
pin_spi2_mosi PB5 // resource SPI_MOSI 3 B05
pin_bat_v PA0 // resource ADC_BATT 1 A00
bat_gizmo ADC
pin_bat_i PA1 // resource ADC_CURR 1 A01
bat_gizmo ADC
// resource FLASH_CS 1 B09
// resource OSD_CS 1 B12
pin_imu_int PC4 // resource GYRO_EXTI 1 C04
pin_imu_cs PA4 // resource GYRO_CS 1 A04
// set baro_bustype = I2C
bar_i2c_bus 0 // set baro_i2c_device = 1
// set serialrx_provider = CRSF
// set blackbox_device = SPIFLASH
// set ibata_scale = 750
// set dshot_idle_value = 450
// set dshot_burst = OFF
// set dshot_bitbang = AUTO
// set current_meter = ADC
// set battery_meter = ADC
// set beeper_inversion = ON
// set beeper_od = OFF
// set max7456_spi_bus = 2
// set flash_spi_bus = 3
// set gyro_1_bustype = SPI
imu_spi_bus 0 // set gyro_1_spibus = 1
imu_align CW180 // set gyro_1_sensor_align = CW180
// set gyro_1_align_yaw = 1800
)""; //end of madflight_board


/*
#==============================================================================
# BetaFlight Source file
#==============================================================================
# Betaflight / STM32G47X (SG47) 4.3.0 Jun 14 2022 / 00:51:21 (229ac66) MSP API: 1.44

board_name BETAFPVG473
manufacturer_id BEFH

#define USE_GYRO
#define USE_ACC
#define USE_GYRO_SPI_ICM42688P
#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_M25P16
#define USE_MAX7456

# resource
resource BEEPER 1 A08
resource MOTOR 1 B00
resource MOTOR 2 B01
resource MOTOR 3 B06
resource MOTOR 4 C13
resource LED_STRIP 1 B02
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 A02
resource SERIAL_TX 3 B10
resource SERIAL_TX 4 C10
resource SERIAL_RX 1 A10
resource SERIAL_RX 2 A03
resource SERIAL_RX 3 B11
resource SERIAL_RX 4 C11
resource I2C_SCL 1 A15
resource I2C_SDA 1 B07
resource LED 1 C15
resource LED 2 C14
resource SPI_SCK 1 A05
resource SPI_SCK 2 B13
resource SPI_SCK 3 B03
resource SPI_MISO 1 A06
resource SPI_MISO 2 B14
resource SPI_MISO 3 B04
resource SPI_MOSI 1 A07
resource SPI_MOSI 2 B15
resource SPI_MOSI 3 B05
resource ADC_BATT 1 A00
resource ADC_CURR 1 A01
resource FLASH_CS 1 B09
resource OSD_CS 1 B12
resource GYRO_EXTI 1 C04
resource GYRO_CS 1 A04

# timer
timer B02 AF2
# pin B02: TIM5 CH1 (AF2)
timer B00 AF2
# pin B00: TIM3 CH3 (AF2)
timer B01 AF2
# pin B01: TIM3 CH4 (AF2)
timer B06 AF5
# pin B06: TIM8 CH1 (AF5)
timer C13 AF6
# pin C13: TIM8 CH4N (AF6)

# dma
dma SPI_MOSI 1 14
# SPI_MOSI 1: DMA2 Channel 7 Request 11
dma SPI_MOSI 2 10
# SPI_MOSI 2: DMA2 Channel 3 Request 13
dma SPI_MOSI 3 9
# SPI_MOSI 3: DMA2 Channel 2 Request 15
dma SPI_MISO 1 13
# SPI_MISO 1: DMA2 Channel 6 Request 10
dma SPI_MISO 2 11
# SPI_MISO 2: DMA2 Channel 4 Request 12
dma SPI_MISO 3 8
# SPI_MISO 3: DMA2 Channel 1 Request 14
dma SPI_TX 1 14
# SPI_TX 1: DMA2 Channel 7 Request 11
dma SPI_TX 2 10
# SPI_TX 2: DMA2 Channel 3 Request 13
dma SPI_TX 3 9
# SPI_TX 3: DMA2 Channel 2 Request 15
dma SPI_RX 1 13
# SPI_RX 1: DMA2 Channel 6 Request 10
dma SPI_RX 2 11
# SPI_RX 2: DMA2 Channel 4 Request 12
dma SPI_RX 3 8
# SPI_RX 3: DMA2 Channel 1 Request 14
dma ADC 1 6
# ADC 1: DMA1 Channel 7 Request 5
dma pin B02 1
# pin B02: DMA1 Channel 2 Request 72
dma pin B00 2
# pin B00: DMA1 Channel 3 Request 63
dma pin B01 3
# pin B01: DMA1 Channel 4 Request 64
dma pin B06 4
# pin B06: DMA1 Channel 5 Request 49
dma pin C13 5
# pin C13: DMA1 Channel 6 Request 52

# feature
feature RX_SERIAL
feature TELEMETRY
feature OSD
feature AIRMODE

# serial
serial 1 2048 115200 57600 0 115200
serial 2 64 115200 57600 0 115200

# master
set baro_bustype = I2C
set baro_i2c_device = 1
set serialrx_provider = CRSF
set blackbox_device = SPIFLASH
set ibata_scale = 750
set dshot_idle_value = 450
set dshot_burst = OFF
set dshot_bitbang = AUTO
set current_meter = ADC
set battery_meter = ADC
set beeper_inversion = ON
set beeper_od = OFF
set max7456_spi_bus = 2
set flash_spi_bus = 3
set gyro_1_bustype = SPI
set gyro_1_spibus = 1
set gyro_1_sensor_align = CW180
set gyro_1_align_yaw = 1800

*/
