Added Start of Uart Protokoll Definition
This commit is contained in:
parent
b4ce1a5055
commit
51f67458bb
31
readme.md
31
readme.md
@ -1,3 +1,34 @@
|
||||
# UART Protokoll
|
||||
|
||||
## Struktur einer Nachricht
|
||||
|
||||
0xAA = Startbyte
|
||||
checksum = XOR über alle Bytes (ohne Startbyte und Checksum-Byte)
|
||||
|
||||
## Nachrichtenaufbau (Message Frame)
|
||||
|
||||
┌──────────┬────────┬──────────────┬────────────┬───────────┐
|
||||
│ Startbyte│ Length │ CommandPage │ Payload │ Checksum │
|
||||
├──────────┼────────┼──────────────┼────────────┼───────────┤
|
||||
│ 0xAA │ 1 B │ 1 B │ variable │ 1 B │
|
||||
└──────────┴────────┴──────────────┴────────────┴───────────┘
|
||||
|
||||
### Felder im Detail:
|
||||
|
||||
- **Length** (`uint8_t`):
|
||||
Gibt die Gesamtlänge der Nachricht **ab `CommandPage` bis einschließlich `Payload`** an.
|
||||
|
||||
- **CommandPage** (`uint8_t`):
|
||||
Gibt an, welcher Nachrichtentyp oder Befehl gesendet wird.
|
||||
|
||||
- **Payload** (`variabel`):
|
||||
Datenfeld mit variabler Länge, abhängig vom `CommandPage`.
|
||||
|
||||
- **Checksum** (`uint8_t`):
|
||||
XOR über alle Bytes ab `Length` bis einschließlich `Payload`.
|
||||
|
||||
---
|
||||
|
||||
# Roadmap
|
||||
- [ ] SEND STATUS OF DEVICE OVER UART
|
||||
- [ ] CONFIGURE PEERS OVER MASTER
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user