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/generic/serial_irq.c | |
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/generic/serial_irq.c')
-rw-r--r-- | src/generic/serial_irq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/generic/serial_irq.c b/src/generic/serial_irq.c index 6b682a0f..a035364b 100644 --- a/src/generic/serial_irq.c +++ b/src/generic/serial_irq.c @@ -75,8 +75,11 @@ console_task(void) int_fast8_t ret = command_find_block(receive_buf, rpos, &pop_count); if (ret > 0) command_dispatch(receive_buf, pop_count); - if (ret) + if (ret) { console_pop_input(pop_count); + if (ret > 0) + command_send_ack(); + } } DECL_TASK(console_task); |