<h3>Contribution description</h3>
<p>This code provides a simple auto_init structure for USB peripherals and USBUS provided functions. The auto_init as contributed is designed as a simple solution for the common case. It is intentionally not designed to solve all use cases.</p>
<h3>Testing procedure</h3>
<p>The example should now provide a USB device without any usb specific handling in the <code>main.c</code> code.</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="405462033" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/10916" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/10916/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/10916">#10916</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/11075'>https://github.com/RIOT-OS/RIOT/pull/11075</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>usb: Add defines for USB peripheral devices</li>
  <li>usbopt: Add usb control operation enum</li>
  <li>usbdev: Introduce a common API for USB peripherals</li>
  <li>fixup! usbdev: Introduce a common API for USB peripherals</li>
  <li>fixup! usbopt: Add usb control operation enum</li>
  <li>fixup! usbdev: Introduce a common API for USB peripherals</li>
  <li>usbdev: add configurables for usb device drivers</li>
  <li>fixup! usbopt: Add usb control operation enum</li>
  <li>fixup! fixup! usbdev: Introduce a common API for USB peripherals</li>
  <li>fixup! fixup! fixup! usbdev: Introduce a common API for USB peripherals</li>
  <li>drivers: Add usb device group</li>
  <li>fixup! fixup! fixup! fixup! usbdev: Introduce a common API for USB peripherals</li>
  <li>fixup! fixup! usbopt: Add usb control operation enum</li>
  <li>fixup! usb: Add defines for USB peripheral devices</li>
  <li>fixup! fixup! fixup! usbopt: Add usb control operation enum</li>
  <li>fixup! fixup! fixup! fixup! fixup! usbdev: Introduce a common API for USB peripherals</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! usbdev: Introduce a common API for USB peripherals</li>
  <li>fixup! fixup! usb: Add defines for USB peripheral devices</li>
  <li>fixup! fixup! fixup! fixup! usbopt: Add usb control operation enum</li>
  <li>sam0_common: Add USB peripheral driver</li>
  <li>samr21-xpro: Enable USB driver when required</li>
  <li>fixup! sam0_common: Add USB peripheral driver</li>
  <li>fixup! fixup! sam0_common: Add USB peripheral driver</li>
  <li>fixup! fixup! fixup! sam0_common: Add USB peripheral driver</li>
  <li>fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver</li>
  <li>fixup! fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver</li>
  <li>usb: Add generic USB structs and functions</li>
  <li>usbus: Initial work to a unified USB stack</li>
  <li>USBUS: add minimal working example</li>
  <li>fixup! USBUS: add minimal working example</li>
  <li>fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! usb: Add generic USB structs and functions</li>
  <li>fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! fixup! USBUS: add minimal working example</li>
  <li>fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>fixup! fixup! usb: Add generic USB structs and functions</li>
  <li>fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack</li>
  <li>auto_init_usb: initial implementation</li>
  <li>usbus_minimal: Adapt example to auto_init</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-0">Makefile.dep</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-1">boards/samr21-xpro/Makefile.dep</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-2">cpu/sam0_common/Makefile</a>
    (4)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-3">cpu/sam0_common/include/sam_usb.h</a>
    (71)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-4">cpu/sam0_common/usb/Makefile</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-5">cpu/sam0_common/usb/usb.c</a>
    (695)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-6">drivers/doc.txt</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-7">drivers/include/usb/usbdev.h</a>
    (560)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-8">examples/usbus_minimal/Makefile</a>
    (24)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-9">examples/usbus_minimal/main.c</a>
    (41)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-10">makefiles/pseudomodules.inc.mk</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-11">sys/Makefile</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-12">sys/auto_init/Makefile</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-13">sys/auto_init/auto_init.c</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-14">sys/auto_init/usb/Makefile</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-15">sys/auto_init/usb/auto_init_sam0.c</a>
    (31)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-16">sys/auto_init/usb/auto_init_usb.c</a>
    (55)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-17">sys/include/usb.h</a>
    (134)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-18">sys/include/usb/descriptor.h</a>
    (221)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-19">sys/include/usb/usbopt.h</a>
    (122)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-20">sys/include/usb/usbus.h</a>
    (515)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-21">sys/include/usb/usbus/fmt.h</a>
    (45)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-22">sys/usb/usbus/Makefile</a>
    (4)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-23">sys/usb/usbus/usbus.c</a>
    (318)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-24">sys/usb/usbus/usbus_control.c</a>
    (408)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11075/files#diff-25">sys/usb/usbus/usbus_fmt.c</a>
    (242)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/11075.patch'>https://github.com/RIOT-OS/RIOT/pull/11075.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/11075.diff'>https://github.com/RIOT-OS/RIOT/pull/11075.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/11075">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AEn7YFnGh_kMG8u-peR2h5sUY_vAgoD8ks5vRvg9gaJpZM4bVfZZ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AEn7YJSlf-hXDhvGy9TcDdo86LD1-6Djks5vRvg9gaJpZM4bVfZZ.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/RIOT-OS/RIOT","title":"RIOT-OS/RIOT","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/RIOT-OS/RIOT"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"usbus: Initial simple auto init structure (#11075)"}],"action":{"name":"View Pull Request","url":"https://github.com/RIOT-OS/RIOT/pull/11075"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11075",
"url": "https://github.com/RIOT-OS/RIOT/pull/11075",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>