<h3>Contribution description</h3>
<p>This PR adds integration for UART peripherals for the USBUS CDC ACM (serial over usb) functionality. It allows for transfering data over serial, configuring baud rate and parity bits of the UART peripheral from the host computer.</p>
<h3>Testing procedure</h3>
<p>Run <code>examples/usbus_uart_adapter</code>. When attached to a host computer, it should provide multiple (depending on the board) ttyACM devices of which the first one is connected to the RIOT shell and the others are proxied to the UART peripherals on the board.</p>
<p>On a samr21-xpro, using <code>make list-ttys</code> this shows up as:</p>
<pre><code>/sys/bus/usb/devices/3-9.2.3: RIOT-os.org USB device serial: '', tty(s): ttyACM3, ttyACM2, ttyACM4
</code></pre>
<p>In this case, <code>ttyACM3</code> is the <em>first</em> serial function and is connected to the RIOT shell.</p>
<h3>Issues/PRs references</h3>
<p>Depends on <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="415817391" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/11085" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/11085/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/11085">#11085</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/12268'>https://github.com/RIOT-OS/RIOT/pull/12268</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>usbus: Rework handling of set control requests</li>
  <li>tests/usbus: Add automated test for usbus init</li>
  <li>usb cdc acm: add common defines for cdc acm</li>
  <li>usbus: Add cdc acm function</li>
  <li>USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>fixup! usbus: Add cdc acm function</li>
  <li>fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>test/usbus_cdc_acm_stdio: USB CDC ACM STDIO test</li>
  <li>fixup! test/usbus_cdc_acm_stdio: USB CDC ACM STDIO test</li>
  <li>fixup! usb_cdc: Add common defines and message structs</li>
  <li>fixup! fixup! usbus: Add cdc acm function</li>
  <li>fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>fixup! fixup! usb_cdc: Add common defines and message structs</li>
  <li>fixup! fixup! fixup! usbus: Add cdc acm function</li>
  <li>fixup! fixup! fixup! usbus: Add cdc acm function</li>
  <li>fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>fixup! fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>fixup! test/usbus_cdc_acm_stdio: USB CDC ACM STDIO test</li>
  <li>fixup! fixup! fixup! fixup! usbus: Add cdc acm function</li>
  <li>fixup! fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>fixup! fixup! fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM</li>
  <li>fixup! fixup! fixup! fixup! fixup! usbus: Add cdc acm function</li>
  <li>cdc/acm: Add uart peripheral integration</li>
  <li>examples/usbus: Add USB to UART multiplexer example</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-0">Makefile.dep</a>
    (17)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-1">examples/usbus_uart_adapter/Makefile</a>
    (44)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-2">examples/usbus_uart_adapter/README.md</a>
    (23)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-3">examples/usbus_uart_adapter/main.c</a>
    (84)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-4">makefiles/pseudomodules.inc.mk</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-5">sys/auto_init/usb/auto_init_usb.c</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-6">sys/include/usb/cdc.h</a>
    (61)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-7">sys/include/usb/usbus/cdc/acm.h</a>
    (147)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-8">sys/include/usb/usbus/cdc/acm_uart.h</a>
    (81)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-9">sys/include/usb/usbus/control.h</a>
    (17)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-10">sys/usb/usbus/Makefile</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-11">sys/usb/usbus/cdc/acm/Makefile</a>
    (10)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-12">sys/usb/usbus/cdc/acm/cdc_acm.c</a>
    (320)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-13">sys/usb/usbus/cdc/acm/cdc_acm_stdio.c</a>
    (124)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-14">sys/usb/usbus/cdc/acm/cdc_acm_uart.c</a>
    (166)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-15">sys/usb/usbus/usbus_control.c</a>
    (70)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-16">tests/usbus/Makefile</a>
    (22)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-17">tests/usbus/main.c</a>
    (349)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-18">tests/usbus/usbdev_mock.c</a>
    (225)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-19">tests/usbus/usbdev_mock.h</a>
    (108)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-20">tests/usbus_cdc_acm_stdio/Makefile</a>
    (22)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12268/files#diff-21">tests/usbus_cdc_acm_stdio/main.c</a>
    (33)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12268.patch'>https://github.com/RIOT-OS/RIOT/pull/12268.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12268.diff'>https://github.com/RIOT-OS/RIOT/pull/12268.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/12268?email_source=notifications&email_token=ABE7WYEJCUTSIER33W6LID3QKFBIPA5CNFSM4IXVDPP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HL63HKQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYCA62YIUSOBYS2LY7TQKFBIPANCNFSM4IXVDPPQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYFWY3TYRVEWS5LTOS3QKFBIPA5CNFSM4IXVDPP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HL63HKQ.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/12268?email_source=notifications\u0026email_token=ABE7WYEJCUTSIER33W6LID3QKFBIPA5CNFSM4IXVDPP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HL63HKQ",
"url": "https://github.com/RIOT-OS/RIOT/pull/12268?email_source=notifications\u0026email_token=ABE7WYEJCUTSIER33W6LID3QKFBIPA5CNFSM4IXVDPP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HL63HKQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>