Skip to content

Commit

Permalink
SPRacingF3 - Enable Softserial on CH4/5 and CH7/8 (RX/TX).
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra committed Jun 26, 2015
1 parent 68abdd2 commit 2436ccb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ SPRACINGF3_SRC = \
drivers/compass_hmc5883l.c \
drivers/display_ug2864hsweg01.h \
drivers/flash_m25p16.c \
drivers/serial_softserial.c \
drivers/sonar_hcsr04.c \
io/flashfs.c \
$(HIGHEND_SRC) \
Expand Down
11 changes: 10 additions & 1 deletion src/main/target/SPRACINGF3/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
#define USE_USART1
#define USE_USART2
#define USE_USART3
#define SERIAL_PORT_COUNT 3
#define USE_SOFTSERIAL1
#define USE_SOFTSERIAL2
#define SERIAL_PORT_COUNT 5

#ifndef UART1_GPIO
#define UART1_TX_PIN GPIO_Pin_9 // PA9
Expand All @@ -92,6 +94,13 @@
#define UART3_RX_PINSOURCE GPIO_PinSource11
#endif

#define SOFTSERIAL_1_TIMER TIM3
#define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5
#define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6
#define SOFTSERIAL_2_TIMER TIM3
#define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7
#define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8

#define USE_I2C
#define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA

Expand Down

0 comments on commit 2436ccb

Please sign in to comment.