This commit is contained in:
2025-07-05 17:24:00 -04:00
parent 22c3a57351
commit 871097fb21
8 changed files with 20 additions and 6 deletions

View File

@@ -38,7 +38,9 @@ This enables fine-grained speed control, supports differential drive configurati
Why Use __attribute((packed))?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The packed attribute tells the compiler not to add any padding between fields in memory. This makes the struct:
ESP-NOW uses fixed-size data packets (up to 250 bytes). The *__attribute__((packed))* removes compiler-added padding for precise byte alignment.
As *packed* attribute tells the compiler not to add any padding between fields in memory, this makes the struct:
- Compact
- Predictable for serialization over protocols like UART or ESP-NOW