summaryrefslogtreecommitdiff
path: root/protocol.md
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-17 21:21:00 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-17 21:21:00 +0200
commit365dcc18fbd98645585cdbe009f537ecdaa90c1a (patch)
tree078c14da20867e177d658ae4cc517b81ab9ad1aa /protocol.md
parentf00fca5f6f9751b16d868f52bda908c7b4704457 (diff)
WIP sercomm implementation
- moved some module-specific constants to their respective header files - changed .clang-tidy to ignore global private global constants (starting with `_`) - suppressed some GCC warnings in bin.c and all pololu library warnings - added function signatures for sercomm protocol data generators - added endianness check in setup.c
Diffstat (limited to 'protocol.md')
-rw-r--r--protocol.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/protocol.md b/protocol.md
index f5bb0cc..d41b00f 100644
--- a/protocol.md
+++ b/protocol.md
@@ -25,8 +25,8 @@ is converted to a single `0xff` on the receiving end, so these duplicated bytes
and the starting byte don't count towards message length.
opcodes are picked sequentially, but the direction bit (LSB) is reserved to
-indicate a transfer from robot to client. this means that the opcode for a
-sensor data request would be `0x12`, but the response opcode would be `0x13`.
+indicate a transfer from robot to client (`tx`). this means that the opcode for
+a sensor data request would be `0x12`, but the response opcode would be `0x13`.
these opcodes are stored as enum constants inside consts.h for code
readability.
@@ -54,6 +54,9 @@ a double stroke arrow means that the command can be initiated from either the
robot or the client, while a single arrow indicates a request-response
structure.
+in *both* the robot and client code `r <-- c` is referred to as `rx` and `r
+--> c` as `tx` (from the *robots* view).
+
### PING
#### ping (`r <=> c`) (2 bytes)