Skip to content

Commit f09805c

Browse files
committed
Any RX event should end read operation.
1 parent 7513106 commit f09805c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/serial_api.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,11 +788,14 @@ int serial_irq_handler_asynch(serial_t *obj_in)
788788
}
789789
}
790790
if (obj_in->rx_buff.pos == obj_in->rx_buff.length) {
791-
serial_finish_rx_asynch(obj);
792791
cur_events |= SERIAL_EVENT_RX_COMPLETE & obj->rx_events;
793792
}
794793
}
795794

795+
// Any event should end operation.
796+
if (cur_events & SERIAL_EVENT_RX_ALL) {
797+
serial_finish_rx_asynch(obj);
798+
}
796799

797800
Cy_SCB_ClearRxInterrupt(obj->base, rx_status);
798801

0 commit comments

Comments
 (0)