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

//copy this line to madflight.ino to use this flight controller
#define MF_BOARD "brd/betaflight/AIRB-AIRBOTG4AIO.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-AIRB-AIRBOTG4AIO"
#define MF_MCU_NAME "STM32G47X"

const char madflight_board[] = R""(
imu_bus_type SPI
bar_gizmo DPS310 // #define USE_BARO_DPS310
imu_gizmo ICM42688P // #define USE_GYRO_SPI_ICM42688P
// resource BEEPER 1 B07
pin_out0 PA0 // resource MOTOR 1 A00
pin_out1 PA1 // resource MOTOR 2 A01
pin_out2 PA2 // resource MOTOR 3 A02
pin_out3 PA3 // resource MOTOR 4 A03
// resource LED_STRIP 1 B06
pin_ser0_tx PA9 // resource SERIAL_TX 1 A09
pin_ser1_tx PB3 // resource SERIAL_TX 2 B03
pin_ser3_tx PC10 // resource SERIAL_TX 4 C10
pin_ser10_tx PB11 // resource SERIAL_TX 11 B11
pin_ser0_rx PA10 // resource SERIAL_RX 1 A10
pin_ser1_rx PB4 // resource SERIAL_RX 2 B04
pin_ser2_rx PB9 // resource SERIAL_RX 3 B09
pin_ser3_rx PC11 // resource SERIAL_RX 4 C11
pin_ser10_rx PB10 // resource SERIAL_RX 11 B10
pin_i2c0_scl PA13 // resource I2C_SCL 1 A13
pin_i2c0_sda PA14 // resource I2C_SDA 1 A14
pin_led PB5 // resource LED 1 B05
// resource LED 2 C15
pin_spi0_sclk PA5 // resource SPI_SCK 1 A05
pin_spi1_sclk PB13 // resource SPI_SCK 2 B13
// resource SPI_SDI 1 A06
// resource SPI_SDI 2 B14
// resource SPI_SDO 1 A07
// resource SPI_SDO 2 B15
// resource CAMERA_CONTROL 1 A15
pin_bat_v PB2 // resource ADC_BATT 1 B02
bat_gizmo ADC
pin_bat_i PB1 // resource ADC_CURR 1 B01
bat_gizmo ADC
// resource FLASH_CS 1 C06
// resource OSD_CS 1 A08
pin_imu_int PC4 // resource GYRO_EXTI 1 C04
pin_imu_cs PB0 // resource GYRO_CS 1 B00
// set baro_bustype = I2C
bar_i2c_bus 0 // set baro_i2c_device = 1
// set blackbox_device = SPIFLASH
// set dshot_burst = ON
// set current_meter = ADC
// set battery_meter = ADC
// set beeper_inversion = ON
// set beeper_od = OFF
// set pid_process_denom = 2
// set max7456_spi_bus = 2
// set flash_spi_bus = 2
imu_spi_bus 0 // set gyro_1_spibus = 1
imu_align CW0FLIP // set gyro_1_sensor_align = CW0FLIP
// set gyro_1_align_pitch = 1800
)""; //end of madflight_board


/*
#==============================================================================
# BetaFlight Source file
#==============================================================================
# Betaflight / STM32G47X (SG47) 4.5.0 Jun  4 2023 / 14:46:36 (5e4d8efc5) MSP API: 1.46

#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_ACCGYRO_LSM6DVS16X
#define USE_FLASH
#define USE_FLASH_W25Q128FV
#define USE_MAX7456

# config: YES

board_name AIRBOTG4AIO
manufacturer_id AIRB

#resource
resource BEEPER 1 B07
resource MOTOR 1 A00
resource MOTOR 2 A01
resource MOTOR 3 A02
resource MOTOR 4 A03
resource LED_STRIP 1 B06
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 B03
resource SERIAL_TX 4 C10
resource SERIAL_TX 11 B11
resource SERIAL_RX 1 A10
resource SERIAL_RX 2 B04
resource SERIAL_RX 3 B09
resource SERIAL_RX 4 C11
resource SERIAL_RX 11 B10
resource I2C_SCL 1 A13
resource I2C_SDA 1 A14
resource LED 1 B05
resource LED 2 C15
resource SPI_SCK 1 A05
resource SPI_SCK 2 B13
resource SPI_SDI 1 A06
resource SPI_SDI 2 B14
resource SPI_SDO 1 A07
resource SPI_SDO 2 B15
resource CAMERA_CONTROL 1 A15
resource ADC_BATT 1 B02
resource ADC_CURR 1 B01
resource FLASH_CS 1 C06
resource OSD_CS 1 A08
resource GYRO_EXTI 1 C04
resource GYRO_CS 1 B00

# timer
timer B06 AF5
# pin B06: TIM8 CH1 (AF5)
timer A00 AF1
# pin A00: TIM2 CH1 (AF1)
timer A01 AF1
# pin A01: TIM2 CH2 (AF1)
timer A02 AF2
# pin A02: TIM5 CH3 (AF2)
timer A03 AF2
# pin A03: TIM5 CH4 (AF2)

# dma
dma SPI_SDO 1 7
# SPI_SDO 1: DMA1 Channel 8 Request 11
dma SPI_SDO 2 9
# SPI_SDO 2: DMA2 Channel 2 Request 13
dma SPI_SDI 1 6
# SPI_SDI 1: DMA1 Channel 7 Request 10
dma SPI_SDI 2 8
# SPI_SDI 2: DMA2 Channel 1 Request 12
dma SPI_TX 1 7
# SPI_TX 1: DMA1 Channel 8 Request 11
dma SPI_TX 2 9
# SPI_TX 2: DMA2 Channel 2 Request 13
dma SPI_RX 1 6
# SPI_RX 1: DMA1 Channel 7 Request 10
dma SPI_RX 2 8
# SPI_RX 2: DMA2 Channel 1 Request 12
dma ADC 1 10
# ADC 1: DMA2 Channel 3 Request 5
dma ADC 2 11
# ADC 2: DMA2 Channel 4 Request 36
dma pin B06 12
# pin B06: DMA2 Channel 5 Request 49
dma pin A00 1
# pin A00: DMA1 Channel 2 Request 56
dma pin A01 2
# pin A01: DMA1 Channel 3 Request 57
dma pin A02 3
# pin A02: DMA1 Channel 4 Request 74
dma pin A03 4
# pin A03: DMA1 Channel 5 Request 75

# feature
feature OSD
feature ESC_SENSOR

# serial
serial 2 1024 115200 57600 0 115200

# master
set baro_bustype = I2C
set baro_i2c_device = 1
set blackbox_device = SPIFLASH
set dshot_burst = ON
set current_meter = ADC
set battery_meter = ADC
set beeper_inversion = ON
set beeper_od = OFF
set pid_process_denom = 2
set max7456_spi_bus = 2
set flash_spi_bus = 2
set gyro_1_spibus = 1
set gyro_1_sensor_align = CW0FLIP
set gyro_1_align_pitch = 1800

*/
