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>
Prefer using 'uint8_t' buffers as it is too easy to run into C sign
extension problems with 'char' buffers. Prefer using 'uint_fast8_t'
for buffer lengths as gcc does a better job compiling them on 32bit
mcus.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If pru0 waits in sleep mode then a full beaglebone reboot is needed to
reprogram the pru0 firmware. For now, avoid using the "slp"
instruction as a workaround.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allow pru0 to gather multiple outgoing message blocks into a single
rpmsg. This can reduce communication overhead.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It's possible for multiple blocks to be pending on the incoming
"rpmsg" stream. Don't sleep unless the input is confirmed to be
empty.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Change the command dispatch and response generation so that most of
the work is done on pru0 instead of pru1. This allows more code to
fit into the limited space on pru1.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>