Skip to content

Commit

Permalink
Merge pull request #10310 from sensei-hacker/GEPRC_F722_AIO_uart3_target
Browse files Browse the repository at this point in the history
GEPRC_F722_AIO add target with UART3 instead of i2c
  • Loading branch information
mmosca authored Aug 21, 2024
2 parents 6a20ed4 + 8e32c18 commit d68a833
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/target/GEPRC_F722_AIO/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target_stm32f722xe(GEPRC_F722_AIO)
target_stm32f722xe(GEPRC_F722_AIO_UART3)
12 changes: 12 additions & 0 deletions src/main/target/GEPRC_F722_AIO/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

#pragma once

#ifdef GEPRC_F722_AIO_UART3
#define TARGET_BOARD_IDENTIFIER "GEP3"
#else
#define TARGET_BOARD_IDENTIFIER "GEPR"
#endif

#define USBD_PRODUCT_STRING "GEPRC_F722_AIO"

Expand Down Expand Up @@ -52,6 +56,7 @@
#define ICM42605_SPI_BUS BUS_SPI1

// *************** I2C/Baro/Mag *********************
#ifndef GEPRC_F722_AIO_UART3
#define USE_I2C
#define USE_I2C_DEVICE_2
#define I2C2_SCL PB10
Expand All @@ -74,6 +79,7 @@
#define USE_RANGEFINDER
#define RANGEFINDER_I2C_BUS BUS_I2C2
#define BNO055_I2C_BUS BUS_I2C2
#endif

// *************** FLASH **************************
#define M25P16_CS_PIN PB9
Expand Down Expand Up @@ -108,9 +114,11 @@
#define UART2_RX_PIN PA3
#define UART2_TX_PIN PA2

#ifdef GEPRC_F722_AIO_UART3
#define USE_UART3
#define UART3_RX_PIN PB11
#define UART3_TX_PIN PB10
#endif

#define USE_UART4
#define UART4_RX_PIN PC11
Expand All @@ -120,7 +128,11 @@
#define UART5_RX_PIN PD2
#define UART5_TX_PIN PC12

#ifdef GEPRC_F722_AIO_UART3
#define SERIAL_PORT_COUNT 6
#else
#define SERIAL_PORT_COUNT 5
#endif

#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS
Expand Down

0 comments on commit d68a833

Please sign in to comment.