diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-08-14 19:51:54 -0230 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-08-14 19:51:54 -0230 |
| commit | 31f8d3b1edbe9dd965dba663e40c62c336fe7ca9 (patch) | |
| tree | c5f743a965cf054fff024ce89dee2fbca294b51f /doc | |
| parent | a60c8d72c48c9693f1f17bc7609bfdf99797fbde (diff) | |
| download | can-gauge-interface-31f8d3b1edbe9dd965dba663e40c62c336fe7ca9.zip | |
usb protocol
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/protocol | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/protocol b/doc/protocol new file mode 100644 index 0000000..ea9ecae --- /dev/null +++ b/doc/protocol @@ -0,0 +1,20 @@ +<command> ::= <opcode> " " <args> "\n" +<response> ::= <retval> "\n" + +Write EEPROM: +<opcode> ::= "w" +<args> ::= <addr> <bytes>{:pagesize} +<retval> ::= "" + +Read EEPROM: +<opcode> ::= "r" +<args> ::= <addr> <size> +<retval> ::= <bytes>{size} + +<addr> ::= "0"--"2047" +<bytes> ::= <byte> <bytetail> | "" +<bytetail> ::= " " <byte> <bytetail> | "" +<byte> ::= "0"--"FF" +<size> ::= "0"--"2048" + +pagesize := 16 |