Skip to content

Commit

Permalink
GEPRC_F722_AIO add target with UART3 instead of i2c
Browse files Browse the repository at this point in the history
  • Loading branch information
sensei-hacker committed Aug 19, 2024
1 parent 1c31bae commit 42a1259
Show file tree
Hide file tree
Showing 2 changed files with 14 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)
13 changes: 13 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 @@ -53,6 +57,8 @@

// *************** I2C/Baro/Mag *********************
#define USE_I2C

#ifndef GEPRC_F722_AIO_UART3
#define USE_I2C_DEVICE_2
#define I2C2_SCL PB10
#define I2C2_SDA PB11
Expand All @@ -74,6 +80,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 +115,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 +129,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 42a1259

Please sign in to comment.