<p></p>
<p><b>@leandrolanzieri</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/16689#discussion_r682535187">sys/usb/usbus/hid/hid_io.c</a>:</p>
<pre style='color:#555'>>  }
 
 void usb_hid_io_init(usbus_t *usbus, uint8_t *report_desc,
                      size_t report_desc_size)
 {
     usbus_hid_init(usbus, &hid, _hid_rx_pipe,  report_desc, report_desc_size);
 }
+
+void usb_hid_io_set_rx_cb(usb_hid_io_t *usb_hid_io)
</pre>
<blockquote>
<p>I want the callback functionality to be an additional, not necessarily required, functionality</p>
</blockquote>
<p>Agreed.</p>
<blockquote>
<p>Possibly the naming of the struct <code>usb_hid_io_t</code> is bad as it suggests that this struct is supposed to be used in a more genral context than just for the callback functionality.</p>
</blockquote>
<p>Also agreed. But if this module will be a singleton and not allow multiple instantiations, the pattern used by xtimer is not necessary. I don't see the need to force the user to allocate such a structure, when it could be instantiated statically by the module (or some other <code>usb_hid_..</code> instance in the future).</p>

<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/16689#discussion_r682535187">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBU7NJ6B6HZ73LQFELT3ERFJANCNFSM5BFBSL4Q">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email">Android</a>.<img src="https://github.com/notifications/beacon/ABE7WYFNQQYAVBCMBAM24G3T3ERFJA5CNFSM5BFBSL42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFMFYWAQ.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/16689#discussion_r682535187",
"url": "https://github.com/RIOT-OS/RIOT/pull/16689#discussion_r682535187",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>