From 2a9aba702668b790ce8cc23ddaeb919f92bd4058 Mon Sep 17 00:00:00 2001 From: sblakemore Date: Sun, 13 Sep 2015 22:30:08 +1000 Subject: [PATCH] Add 1wire support to MOTOLAB target on UART1 --- src/main/io/serial_1wire.c | 9 +++++++++ src/main/target/MOTOLAB/target.h | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/src/main/io/serial_1wire.c b/src/main/io/serial_1wire.c index fb75b4b52..892240b9b 100644 --- a/src/main/io/serial_1wire.c +++ b/src/main/io/serial_1wire.c @@ -62,6 +62,15 @@ const escHardware_t escHardware[ESC_COUNT] = { { GPIOB, 9 }, { GPIOA, 2 }, { GPIOA, 3 } +#elif MOTOLAB + { GPIOA, 4 }, + { GPIOA, 6 }, + { GPIOB, 0 }, + { GPIOB, 1 }, + { GPIOA, 1 }, + { GPIOA, 2 }, + { GPIOA, 3 }, + { GPIOA, 8 } #endif }; diff --git a/src/main/target/MOTOLAB/target.h b/src/main/target/MOTOLAB/target.h index e453d0e0d..ccf4969a4 100644 --- a/src/main/target/MOTOLAB/target.h +++ b/src/main/target/MOTOLAB/target.h @@ -176,3 +176,10 @@ #define BIND_PORT GPIOB #define BIND_PIN Pin_4 +#define USE_SERIAL_1WIRE +#define ESC_COUNT 8 +#define S1W_TX_GPIO GPIOB +#define S1W_TX_PIN GPIO_Pin_6 +#define S1W_RX_GPIO GPIOB +#define S1W_RX_PIN GPIO_Pin_7 +