diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-05-24 13:30:24 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-05-28 10:43:40 -0400 |
commit | 75f870994722cf2340d8bc39c0600ca592dadc7a (patch) | |
tree | 0448247983438b3786f7be1b890f86455ea09fe8 /src/pru | |
parent | 528f9f76042a7d82a2108f4ea582c61481368ecf (diff) | |
download | kutter-75f870994722cf2340d8bc39c0600ca592dadc7a.tar.gz kutter-75f870994722cf2340d8bc39c0600ca592dadc7a.tar.xz kutter-75f870994722cf2340d8bc39c0600ca592dadc7a.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'src/pru')
-rw-r--r-- | src/pru/pru0.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |