summaryrefslogtreecommitdiff
path: root/shared/protocol.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-25 11:29:50 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-25 11:29:50 +0200
commit4f0718caefa7f7a1baf02997fec0b448d0d6615a (patch)
treea827337cc8c843851b00e511c54f775fe3e38e92 /shared/protocol.h
parentb0a905b14ff90f2240e5aa2928d5329d8494cb46 (diff)
move more shared code
Diffstat (limited to 'shared/protocol.h')
-rw-r--r--shared/protocol.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/shared/protocol.h b/shared/protocol.h
new file mode 100644
index 0000000..b400252
--- /dev/null
+++ b/shared/protocol.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#define W2_CMDDIR_RX (0)
+#define W2_CMDDIR_TX (1)
+
+enum w2_e_serial_commands {
+ /** ping command */
+ W2_CMD_PING = 0x00,
+ /** exception command */
+ W2_CMD_EXPT = 0x02,
+ /** mode command */
+ W2_CMD_MODE = 0x04,
+ /** speed command */
+ W2_CMD_SPED = 0x06,
+ /** direct control command */
+ W2_CMD_DIRC = 0x08,
+ /** coordinate command */
+ W2_CMD_CORD = 0x0a,
+ /** backorder modify command */
+ W2_CMD_BOMD = 0x0c,
+ /** soft reset command */
+ W2_CMD_SRES = 0x0e,
+ /** map config command */
+ W2_CMD_MCFG = 0x10,
+ /** sensor data command */
+ W2_CMD_SENS = 0x12,
+ /** info command */
+ W2_CMD_INFO = 0x14,
+ /** display control command */
+ W2_CMD_DISP = 0x16,
+ /** play midi command */
+ W2_CMD_PLAY = 0x18,
+ /** control leds command */
+ W2_CMD_CLED = 0x1a,
+};