aboutsummaryrefslogtreecommitdiffstats
path: root/docs/MCU_Commands.md
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-04-01 21:32:33 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-04-01 21:41:33 -0400
commitc30a6f2e6b9fd44e14345d0a44fe8ea9bd65d653 (patch)
tree8a43ef0837ef58ad0a2a34458ff5bf769cb633e7 /docs/MCU_Commands.md
parent2c851e1621ab6f49f8501ef7805adeb4fc202e98 (diff)
downloadkutter-c30a6f2e6b9fd44e14345d0a44fe8ea9bd65d653.tar.gz
kutter-c30a6f2e6b9fd44e14345d0a44fe8ea9bd65d653.tar.xz
kutter-c30a6f2e6b9fd44e14345d0a44fe8ea9bd65d653.zip
docs: Update Protocol documentation with enumerations
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/MCU_Commands.md')
-rw-r--r--docs/MCU_Commands.md14
1 files changed, 5 insertions, 9 deletions
diff --git a/docs/MCU_Commands.md b/docs/MCU_Commands.md
index f5019814..c576ad88 100644
--- a/docs/MCU_Commands.md
+++ b/docs/MCU_Commands.md
@@ -12,7 +12,11 @@ format of commands and their transmission. The commands here are
described using their "printf" style syntax - for those unfamiliar
with that format, just note that where a '%...' sequence is seen it
should be replaced with an actual integer. For example, a description
-with "count=%c" could be replaced with the text "count=10".
+with "count=%c" could be replaced with the text "count=10". Note that
+parameters that are considered "enumerations" (see the above protocol
+document) actually take a string value which is automatically
+converted to an integer value for the micro-controller. This is common
+with parameters named "pin" (or that have a suffix of "_pin").
Startup Commands
================
@@ -23,14 +27,6 @@ commands available for that purpose. Unlike most micro-controller
commands, these commands run as soon as they are received and they do
not require any particular setup.
-Several of these commands will take a "pin=%u" parameter. The
-low-level micro-controller software uses integer encodings of the
-hardware pin numbers, but to make things more readable the host will
-translate human readable pin names (eg, "PA3") to their equivalent
-integer encodings. By convention, any parameter named "pin" or that
-has a "_pin" suffix will use pin name translation by the
-host.
-
Common startup commands:
* `set_digital_out pin=%u value=%c` : This command immediately