<h3>Contribution description</h3>
<p>Now aUnitBackoffPeriod is calculated at runtime from the current symbol duration and the value of the <em>aTurnaroundTime</em> and <em>aCcaTime</em> constants. This allows to add other PHYs that don't have fixed values for this constant and depend on the PHY configuration (symbol duration mostly).</p>
<p>Transceivers using the submac should work as usual since nrf52 and cc2538 use the same back-off period (320 us) and the added functions yield the same results. For other transceivers such as AT86RF212B (when ported to the HAL) may get a back-off period of either 320 us or 800 us depending on the band used.</p>
<h3>Testing procedure</h3>
<ul>
<li><code>make -C tests/ieee802154_submac BOARD=<board> term</code></li>
</ul>
<p>And send the <code>constants</code> command.</p>
<h3>Issues/PRs references</h3>
<p>N/A</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/16475'>https://github.com/RIOT-OS/RIOT/pull/16475</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>net/ieee802154: include timex.h</li>
  <li>net/ieee802154/submac: calculate aUnitbackoffPeriod</li>
  <li>tests/ieee802154_submac: add constants shell cmd</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16475/files#diff-94d26e63cedcf52e03cced4a7b7adec3674b18d549b68318052a164e7c95c12d">sys/include/net/ieee802154.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16475/files#diff-dc9bf753d1cfca39b8af2ae5c55191781bcbc19cfe2a87ef5d0e6622ebcf32ce">sys/include/net/ieee802154/submac.h</a>
    (59)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16475/files#diff-57071dfbe10ebb068f8742904b659a15c0edf3117d9baaea91985a55d0d9dea2">sys/net/link_layer/ieee802154/submac.c</a>
    (33)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16475/files#diff-8293a7f345d3797c9b838d1a66276017eb0033f07fe780ec2dcde95757731627">tests/ieee802154_submac/main.c</a>
    (20)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16475.patch'>https://github.com/RIOT-OS/RIOT/pull/16475.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16475.diff'>https://github.com/RIOT-OS/RIOT/pull/16475.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16475">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHZB75XW7AGHCG4IGLTNZAXXANCNFSM445XLINQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYCKM4KJHCYY5PDTVATTNZAXXA5CNFSM445XLIN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4NJRAG5A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16475",
"url": "https://github.com/RIOT-OS/RIOT/pull/16475",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>