summaryrefslogtreecommitdiff
path: root/pcr-controller/cmd_queue.h
diff options
context:
space:
mode:
authorBernhard Tittelbach <xro@realraum.at>2013-10-15 00:53:11 +0000
committerBernhard Tittelbach <xro@realraum.at>2013-10-15 00:53:11 +0000
commit5eb5a1d895695f7821868b34732d0d6eca2fdb23 (patch)
tree8ffdbf16bbd76b5f91d846669ec72cd3d0c510d1 /pcr-controller/cmd_queue.h
parentjson output experiment, etc (diff)
various bugfixes and improvements + documentation
git-svn-id: https://svn.spreadspace.org/avr/trunk@245 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'pcr-controller/cmd_queue.h')
-rw-r--r--pcr-controller/cmd_queue.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/pcr-controller/cmd_queue.h b/pcr-controller/cmd_queue.h
index 84b8a01..d632f43 100644
--- a/pcr-controller/cmd_queue.h
+++ b/pcr-controller/cmd_queue.h
@@ -23,6 +23,13 @@
#include <avr/io.h>
+/* The only actual reason for this queue is to enable non-blocking reads.
+* I.e. we want to avoid blocking the main loop while waiting on a user-input terminating '\n', '\r' or ',' .
+* As we could (and DO if the queue is full) execute a command right away once all arguments have been read,
+* the queue really does not need to be 4 long and the whole handling could me much much simpler.
+* I.e. only ever remember ONE command and execute it as soon as all args are present!
+*/
+
uint8_t cmdq_addCharToArgumentBuffer(uint8_t c);
void cmdq_queueCmdWithNumArgs(void* fptr, uint8_t num_args);
void cmdq_doWork(void);