[riot-notifications] [RIOT-OS/RIOT] usbus/hid_io: add missing header file, add RX callback function (#16689)
notifications at github.com
Wed Aug 4 13:39:00 CEST 2021
@leandrolanzieri commented on this pull request.
void usb_hid_io_init(usbus_t *usbus, uint8_t *report_desc,
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)
> I want the callback functionality to be an additional, not necessarily required, functionality
> Possibly the naming of the struct `usb_hid_io_t` is bad as it suggests that this struct is supposed to be used in a more genral context than just for the callback functionality.
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 `usb_hid_..` instance in the future).
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications