From 41080862e63155c80a3e9312dcec3a8167460bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Wed, 27 Jul 2022 08:59:50 +0100 Subject: [PATCH] finally get split keyboard comms working --- keyboards/rkb1/config.h | 5 +++++ keyboards/rkb1/info.json | 2 +- keyboards/rkb1/rules.mk | 16 +++++++++------- .../drivers/vendor/RP/RP2040/serial_vendor.c | 2 ++ quantum/split_common/transport.c | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/keyboards/rkb1/config.h b/keyboards/rkb1/config.h index 04087bcf77..be03a02f2b 100644 --- a/keyboards/rkb1/config.h +++ b/keyboards/rkb1/config.h @@ -17,6 +17,11 @@ #define ONESHOT_TAP_TOGGLE 2 +#define SERIAL_USART_HALF_DUPLEX +#define SERIAL_USART_TX_PIN GP18 +//#define SERIAL_USART_RX_PIN GP19 +//#define SERIAL_USART_PIN_SWAP + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/rkb1/info.json b/keyboards/rkb1/info.json index a42fec4eff..fabfc0d239 100644 --- a/keyboards/rkb1/info.json +++ b/keyboards/rkb1/info.json @@ -36,7 +36,7 @@ } }, "transport": { - "protocol": "custom" + "protocol": "serial" }, "usb_detect": { "enabled": true diff --git a/keyboards/rkb1/rules.mk b/keyboards/rkb1/rules.mk index 33b6786f83..9fc4eacb98 100644 --- a/keyboards/rkb1/rules.mk +++ b/keyboards/rkb1/rules.mk @@ -1,15 +1,17 @@ UNICODE_ENABLE = yes -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 +#OLED_ENABLE = yes +#OLED_DRIVER = SSD1306 -SRC += i2c_slave.c i2c_master.c -QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c $(QUANTUM_DIR)/split_common/transactions.c -OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS -COMMON_VPATH += $(QUANTUM_PATH)/split_common -EXTRAINCDIRS += $(BOARD_PATH) +#SRC += i2c_slave.c i2c_master.c +#QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c $(QUANTUM_DIR)/split_common/transactions.c +#OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS +#COMMON_VPATH += $(QUANTUM_PATH)/split_common +#EXTRAINCDIRS += $(BOARD_PATH) CFLAGS += -Wl,--defsym=__unhandled_user_irq=_unhandled_exception #SRC += matrix.c #CUSTOM_MATRIX = lite + +SERIAL_DRIVER = vendor diff --git a/platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c b/platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c index 3aa8e1165f..e781ac9aaf 100644 --- a/platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c +++ b/platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c @@ -3,6 +3,8 @@ #include "serial_usart.h" #include "serial_protocol.h" +#undef PARAM_ASSERTIONS_ENABLED +#define PARAM_ASSERTIONS_ENABLED(x) 0 #include "hardware/pio.h" #include "hardware/clocks.h" #include "wait.h" diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index e4f18f5c50..5f1b9ee514 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -22,7 +22,7 @@ #include "transaction_id_define.h" #include "atomic_util.h" -#if 1 +#if USE_I2C # ifndef SLAVE_I2C_TIMEOUT # define SLAVE_I2C_TIMEOUT 100