add serial_low() at ISR() top

pull/3608/head
mtei 7 years ago
parent 54e0f08353
commit 04b552f28b

@ -128,7 +128,7 @@ void serial_slave_init(void) {
// Used by the sender to synchronize timing with the reciver. // Used by the sender to synchronize timing with the reciver.
static static
void sync_recv(void) { 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 // This shouldn't hang if the slave disconnects because the
// serial line will float to high if the slave does disconnect. // 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 // interrupt handle to be used by the slave device
ISR(SERIAL_PIN_INTERRUPT) { ISR(SERIAL_PIN_INTERRUPT) {
serial_low();
serial_output(); serial_output();
// slave send phase // slave send phase

Loading…
Cancel
Save