/*==============================================================================
Generated on: 2025-03-24 13:58:26.942049
Generated by: betaflight_target_converter.py
Source: https://github.com/betaflight/unified-targets
Board name: REVONANO
Manufacturer ID: OPEN

//copy this line to madflight.ino to use this flight controller
#include <madflight_zzz_OPEN-REVONANO.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.
==============================================================================*/

#define HAL_BOARD_NAME "BETAFLIGHT-OPEN-REVONANO"
#define HAL_MCU "STM32F411"

#define MADFLIGHT_BOARD R""(
imu_gizmo MPU9250 // #define USE_GYRO_SPI_MPU9250
// resource BEEPER 1 C13
pin_out0 PA10 // resource MOTOR 1 A10
pin_out1 PB3 // resource MOTOR 2 B03
pin_out2 PB8 // resource MOTOR 3 B08
pin_out3 PB9 // resource MOTOR 4 B09
pin_out4 PA0 // resource MOTOR 5 A00
pin_out5 PA1 // resource MOTOR 6 A01
pin_rcl_ppm PB10 // resource PPM 1 B10
// resource PWM 1 B10
// resource PWM 2 B01
// resource PWM 3 B00
// resource PWM 4 A07
// resource PWM 5 A06
// resource PWM 6 A05
pin_ser0_tx PB6 // resource SERIAL_TX 1 B06
pin_ser1_tx PA2 // resource SERIAL_TX 2 A02
pin_ser0_rx PB7 // resource SERIAL_RX 1 B07
pin_ser1_rx PA3 // resource SERIAL_RX 2 A03
pin_ser1_inv PC15 // resource INVERTER 2 C15
pin_i2c2_scl PA8 // resource I2C_SCL 3 A08
pin_i2c2_sda PB4 // resource I2C_SDA 3 B04
pin_led PC14 // resource LED 1 C14
// resource LED 2 C13
pin_spi1_sclk PB13 // resource SPI_SCK 2 B13
pin_spi1_miso PB14 // resource SPI_MISO 2 B14
pin_spi1_mosi PB15 // resource SPI_MOSI 2 B15
// resource ESCSERIAL 1 B10
pin_bat_v PA6 // resource ADC_BATT 1 A06
bat_gizmo ADC
// resource ADC_RSSI 1 A05
pin_bat_i PA7 // resource ADC_CURR 1 A07
bat_gizmo ADC
// resource PINIO 1 B10
pin_imu_int PA15 // resource GYRO_EXTI 1 A15
pin_imu_cs PB12 // resource GYRO_CS 1 B12
// set baro_bustype = I2C
bar_i2c_bus 2 // set baro_i2c_device = 3
// set system_hse_mhz = 8
// set gyro_1_bustype = SPI
imu_spi_bus 1 // set gyro_1_spibus = 2
imu_align CW270 // set gyro_1_sensor_align = CW270
// set gyro_1_align_yaw = 2700
)"" //end of MADFLIGHT_BOARD


/*
#==============================================================================
# BetaFlight Source file
#==============================================================================
# Betaflight / STM32F411 (S411) 4.2.0 Apr 18 2020 / 18:30:25 (fde6c680b3) MSP API: 1.43

#define USE_GYRO
#define USE_GYRO_SPI_MPU9250
#define USE_ACC
#define USE_ACC_SPI_MPU9250

board_name REVONANO
manufacturer_id OPEN

# resources
resource BEEPER 1 C13
resource MOTOR 1 A10
resource MOTOR 2 B03
resource MOTOR 3 B08
resource MOTOR 4 B09
resource MOTOR 5 A00
resource MOTOR 6 A01
resource PPM 1 B10
resource PWM 1 B10
resource PWM 2 B01
resource PWM 3 B00
resource PWM 4 A07
resource PWM 5 A06
resource PWM 6 A05
resource SERIAL_TX 1 B06
resource SERIAL_TX 2 A02
resource SERIAL_RX 1 B07
resource SERIAL_RX 2 A03
resource INVERTER 2 C15
resource I2C_SCL 3 A08
resource I2C_SDA 3 B04
resource LED 1 C14
resource LED 2 C13
resource SPI_SCK 2 B13
resource SPI_MISO 2 B14
resource SPI_MOSI 2 B15
resource ESCSERIAL 1 B10
resource ADC_BATT 1 A06
resource ADC_RSSI 1 A05
resource ADC_CURR 1 A07
resource PINIO 1 B10
resource GYRO_EXTI 1 A15
resource GYRO_CS 1 B12

# timer
timer B10 AF1
# pin B10: TIM2 CH3 (AF1)
timer B01 AF2
# pin B01: TIM3 CH4 (AF2)
timer B00 AF2
# pin B00: TIM3 CH3 (AF2)
timer A07 AF2
# pin A07: TIM3 CH2 (AF2)
timer A06 AF2
# pin A06: TIM3 CH1 (AF2)
timer A05 AF1
# pin A05: TIM2 CH1 (AF1)
timer A10 AF1
# pin A10: TIM1 CH3 (AF1)
timer B03 AF1
# pin B03: TIM2 CH2 (AF1)
timer B08 AF2
# pin B08: TIM4 CH3 (AF2)
timer B09 AF2
# pin B09: TIM4 CH4 (AF2)
timer A00 AF2
# pin A00: TIM5 CH1 (AF2)
timer A01 AF2
# pin A01: TIM5 CH2 (AF2)

# dma
dma ADC 1 1
# ADC 1: DMA2 Stream 4 Channel 0
dma pin B10 0
# pin B10: DMA1 Stream 1 Channel 3
dma pin B01 0
# pin B01: DMA1 Stream 2 Channel 5
dma pin B00 0
# pin B00: DMA1 Stream 7 Channel 5
dma pin A07 0
# pin A07: DMA1 Stream 5 Channel 5
dma pin A06 0
# pin A06: DMA1 Stream 4 Channel 5
dma pin A05 0
# pin A05: DMA1 Stream 5 Channel 3
dma pin A10 0
# pin A10: DMA2 Stream 6 Channel 0
dma pin B03 0
# pin B03: DMA1 Stream 6 Channel 3
dma pin B08 0
# pin B08: DMA1 Stream 7 Channel 2
dma pin A00 0
# pin A00: DMA1 Stream 2 Channel 6
dma pin A01 0
# pin A01: DMA1 Stream 4 Channel 6

# master
set baro_bustype = I2C
set baro_i2c_device = 3
set system_hse_mhz = 8
set gyro_1_bustype = SPI
set gyro_1_spibus = 2
set gyro_1_sensor_align = CW270
set gyro_1_align_yaw = 2700

*/
