From 75f870994722cf2340d8bc39c0600ca592dadc7a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 24 May 2018 13:30:24 -0400 Subject: command: Wait to send ack until after processing commands Send the ack after processing commands - this gives the host code more information on serial buffer utilization. Signed-off-by: Kevin O'Connor --- src/pru/pru0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pru') diff --git a/src/pru/pru0.c b/src/pru/pru0.c index 2a136e9e..4b60af27 100644 --- a/src/pru/pru0.c +++ b/src/pru/pru0.c @@ -148,8 +148,10 @@ check_can_read(void) int_fast8_t ret = command_find_block(p, msglen, &pop_count); if (!ret) break; - if (ret > 0) + if (ret > 0) { do_dispatch(p, pop_count); + command_send_ack(); + } p += pop_count; len -= pop_count; } -- cgit v1.2.3-70-g09d2