mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
add new target CrazyBee F3 FS (#5495)
* add new target CrazyBee F3 FS add new target CrazyBee F3 FS * merge crazybeef3fs to crazybeef3fr
This commit is contained in:
parent
98a77dcd96
commit
cd72348dd3
6 changed files with 116 additions and 12 deletions
0
src/main/target/CRAZYBEEF3FR/CRAZYBEEF3FS.mk
Normal file
0
src/main/target/CRAZYBEEF3FR/CRAZYBEEF3FS.mk
Normal file
|
@ -17,8 +17,14 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define TARGET_BOARD_IDENTIFIER "CBFR" //
|
||||
#if defined(CRAZYBEEF3FS)
|
||||
#define TARGET_BOARD_IDENTIFIER "CBFS"
|
||||
#define USBD_PRODUCT_STRING "CrazyBee F3 FS"
|
||||
#else //CRAZYBEEF3FS
|
||||
#define TARGET_BOARD_IDENTIFIER "CBFR"
|
||||
#define USBD_PRODUCT_STRING "CrazyBee F3 FR"
|
||||
#endif
|
||||
|
||||
#define LED0_PIN PB3
|
||||
#define USE_BEEPER
|
||||
#define BEEPER_PIN PC15
|
||||
|
@ -55,6 +61,18 @@
|
|||
#define SPI2_MISO_PIN PB14
|
||||
#define SPI2_MOSI_PIN PB15
|
||||
|
||||
#if defined(CRAZYBEEF3FS)
|
||||
#define USE_RX_SPI
|
||||
#define USE_RX_FLYSKY
|
||||
#define RX_SPI_DEFAULT_PROTOCOL RX_SPI_A7105_FLYSKY_2A
|
||||
#define FLYSKY_2A_CHANNEL_COUNT 14
|
||||
#define RX_SPI_INSTANCE SPI2
|
||||
#define RX_NSS_PIN SPI2_NSS_PIN
|
||||
#define RX_IRQ_PIN PA8
|
||||
#define BINDPLUG_PIN PA9
|
||||
#define USE_RX_FLYSKY_SPI_LED
|
||||
#define RX_FLYSKY_SPI_LED_PIN PA10
|
||||
#else
|
||||
#define USE_RX_SPI
|
||||
#define USE_RX_FRSKY_SPI_D
|
||||
#define USE_RX_FRSKY_SPI_X
|
||||
|
@ -69,6 +87,7 @@
|
|||
#define RX_FRSKY_SPI_GDO_0_PIN PA8
|
||||
#define RX_FRSKY_SPI_LED_PIN PA10
|
||||
#define BINDPLUG_PIN PA9
|
||||
#endif
|
||||
|
||||
#define USE_OSD
|
||||
#define USE_MAX7456
|
||||
|
@ -80,15 +99,16 @@
|
|||
#define USE_ADC
|
||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
|
||||
#define VBAT_ADC_PIN PA0
|
||||
#define CURRENT_METER_ADC_PIN PA1
|
||||
#define ADC_INSTANCE ADC1
|
||||
#define VBAT_ADC_PIN PA0
|
||||
#define CURRENT_METER_ADC_PIN PA1
|
||||
#define ADC_INSTANCE ADC1
|
||||
#define CURRENT_METER_SCALE_DEFAULT 2350
|
||||
|
||||
#define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD)
|
||||
#define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_RX_SPI | FEATURE_MOTOR_STOP)
|
||||
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
#define TARGET_IO_PORTA 0xffff
|
||||
#define TARGET_IO_PORTB 0xffff
|
||||
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
|
||||
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
|
||||
#define TARGET_IO_PORTA 0xffff
|
||||
#define TARGET_IO_PORTB 0xffff
|
||||
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
|
||||
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
|
||||
#define USABLE_TIMER_CHANNEL_COUNT 4
|
||||
#define USED_TIMERS (TIM_N(2) | TIM_N(8) | TIM_N(15))
|
||||
#define USED_TIMERS (TIM_N(2) | TIM_N(8) | TIM_N(15))
|
||||
|
|
|
@ -5,8 +5,18 @@ FEATURES = VCP
|
|||
TARGET_SRC = \
|
||||
drivers/accgyro/accgyro_mpu.c \
|
||||
drivers/accgyro/accgyro_spi_mpu6000.c \
|
||||
drivers/max7456.c
|
||||
|
||||
ifeq ($(TARGET), CRAZYBEEF3FS)
|
||||
TARGET_SRC += \
|
||||
drivers/rx/rx_a7105.c \
|
||||
rx/flysky.c
|
||||
else
|
||||
ifeq ($(TARGET), CRAZYBEEF3FR)
|
||||
TARGET_SRC += \
|
||||
drivers/rx/rx_cc2500.c \
|
||||
rx/cc2500_frsky_shared.c \
|
||||
rx/cc2500_frsky_d.c \
|
||||
rx/cc2500_frsky_x.c \
|
||||
drivers/max7456.c
|
||||
rx/cc2500_frsky_x.c
|
||||
endif
|
||||
endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue