From c30a6f2e6b9fd44e14345d0a44fe8ea9bd65d653 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 1 Apr 2019 21:32:33 -0400 Subject: docs: Update Protocol documentation with enumerations Signed-off-by: Kevin O'Connor --- docs/MCU_Commands.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'docs/MCU_Commands.md') 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 -- cgit v1.2.3-70-g09d2