Any RX event should end read operation.

pull/9368/head
Leszek Rusinowicz 2019-01-21 13:05:54 +01:00
parent 75131069d0
commit f09805c5a2
1 changed files with 4 additions and 1 deletions

View File

@ -788,11 +788,14 @@ int serial_irq_handler_asynch(serial_t *obj_in)
}
}
if (obj_in->rx_buff.pos == obj_in->rx_buff.length) {
serial_finish_rx_asynch(obj);
cur_events |= SERIAL_EVENT_RX_COMPLETE & obj->rx_events;
}
}
// Any event should end operation.
if (cur_events & SERIAL_EVENT_RX_ALL) {
serial_finish_rx_asynch(obj);
}
Cy_SCB_ClearRxInterrupt(obj->base, rx_status);