1
0

add serial_low() at ISR() top

This commit is contained in:
mtei
2018-07-19 04:51:49 +09:00
parent 54e0f08353
commit 04b552f28b

View File

@@ -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