mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 09:50:52 +00:00
.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
|
@@ -64,7 +64,8 @@ This enables fine-grained speed control, supports differential drive configurati
|
||||
</section>
|
||||
<section id="why-use-attribute-packed">
|
||||
<h2>Why Use __attribute((packed))?<a class="headerlink" href="#why-use-attribute-packed" title="Link to this heading">¶</a></h2>
|
||||
<p>The packed attribute tells the compiler not to add any padding between fields in memory. This makes the struct:</p>
|
||||
<p>ESP-NOW uses fixed-size data packets (up to 250 bytes). The <em>__attribute__((packed))</em> removes compiler-added padding for precise byte alignment.</p>
|
||||
<p>As <em>packed</em> attribute tells the compiler not to add any padding between fields in memory, this makes the struct:</p>
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><p>Compact</p></li>
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 2a5d1949c3721836c34f0b73b9434126
|
||||
config: 73c850fc9da2302c95bfd56436e2cb64
|
||||
tags: 62a1e7829a13fc7881b6498c52484ec0
|
||||
|
@@ -702,7 +702,18 @@ This enables fine-grained speed control, supports differential drive configurati
|
||||
</a>
|
||||
</h3>
|
||||
<p>
|
||||
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
|
||||
<em>
|
||||
__attribute__((packed))
|
||||
</em>
|
||||
removes compiler-added padding for precise byte alignment.
|
||||
</p>
|
||||
<p>
|
||||
As
|
||||
<em>
|
||||
packed
|
||||
</em>
|
||||
attribute tells the compiler not to add any padding between fields in memory, this makes the struct:
|
||||
</p>
|
||||
<blockquote>
|
||||
<div>
|
||||
|
@@ -40,7 +40,7 @@ Why Use __attribute((packed))?
|
||||
|
||||
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:
|
||||
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
|
||||
|
Reference in New Issue
Block a user