From 04b552f28b91284dcab81fcf672ff4d96fe838cf Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Thu, 19 Jul 2018 04:51:49 +0900 Subject: [PATCH] add serial_low() at ISR() top --- keyboards/helix/serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/helix/serial.c b/keyboards/helix/serial.c index 588cf583b3..0bda051366 100644 --- a/keyboards/helix/serial.c +++ b/keyboards/helix/serial.c @@ -128,7 +128,7 @@ void serial_slave_init(void) { // Used by the sender to synchronize timing with the reciver. static void sync_recv(void) { - for (int i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { } // This shouldn't hang if the slave disconnects because the // serial line will float to high if the slave does disconnect. @@ -219,6 +219,7 @@ void change_reciver2sender(void) { // interrupt handle to be used by the slave device ISR(SERIAL_PIN_INTERRUPT) { + serial_low(); serial_output(); // slave send phase