Skip to content

Commit

Permalink
fixup! pkg/tinyusb: common descriptors implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Nov 8, 2022
1 parent c7ef310 commit 95fb69d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/tinyusb/contrib/tinyusb_descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ uint8_t const *tud_descriptor_device_cb(void)

#if CONFIG_TUSBD_HID_NUMOF > 0
__attribute__((weak))
uint8_t const desc_hid_0_report[] =
uint8_t const tusb_desc_hid_0_report[] =
{
TUD_HID_REPORT_DESC_GENERIC_INOUT(CONFIG_TUSBD_HID_NUMOF_EP_BUFSIZE),
};
#endif

#if CONFIG_TUSBD_HID_NUMOF > 1
__attribute__((weak))
uint8_t const desc_hid_1_report[] =
uint8_t const tusb_desc_hid_1_report[] =
{
TUD_HID_REPORT_DESC_GENERIC_INOUT(CONFIG_TUSBD_HID_NUMOF_TUSBD_EP_BUFSIZE),
};
Expand All @@ -126,13 +126,13 @@ uint8_t const *tud_hid_descriptor_report_cb(uint8_t itf)
#if CONFIG_TUSBD_HID_NUMOF > 0
if (itf == 0)
{
return desc_hid_0_report;
return tusb_desc_hid_0_report;
}
#endif
#if CONFIG_TUSBD_HID_NUMOF > 1
else if (itf == 1)
{
return desc_hid_1_report;
return tusb_desc_hid_1_report;
}
#endif
return NULL;
Expand Down Expand Up @@ -242,7 +242,7 @@ uint8_t const tusb_desc_fs_config[] = {
* EP Out & EP In address, EP size, polling interval */
TUD_HID_INOUT_DESCRIPTOR(TUSBD_ITF_HID_0, TUSBD_STR_IDX_HID_0,
HID_TUSBD_ITF_PROTOCOL_NONE,
sizeof(desc_hid_0_report),
sizeof(tusb_desc_hid_0_report),
TUSBD_EP_HID_0_OUT, TUSBD_EP_HID_0_IN,
CONFIG_TUSBD_HID_EP_SIZE,
CONFIG_TUSBD_HID_0_POLL_INTERVALL),
Expand All @@ -252,7 +252,7 @@ uint8_t const tusb_desc_fs_config[] = {
* EP Out & EP In address, EP size, polling interval */
TUD_HID_INOUT_DESCRIPTOR(TUSBD_ITF_HID_1, TUSBD_STR_IDX_HID_1,
HID_TUSBD_ITF_PROTOCOL_NONE,
sizeof(desc_hid_1_report),
sizeof(tusb_desc_hid_1_report),
TUSBD_EP_HID_1_OUT, TUSBD_EP_HID_1_IN,
CONFIG_TUSBD_HID_EP_SIZE,
CONFIG_TUSBD_HID_1_POLL_INTERVALL),
Expand Down Expand Up @@ -303,7 +303,7 @@ uint8_t const tusb_desc_hs_config[] = {
* EP Out & EP In address, EP size, polling interval */
TUD_HID_INOUT_DESCRIPTOR(TUSBD_ITF_HID_0, TUSBD_STR_IDX_HID_0,
HID_TUSBD_ITF_PROTOCOL_NONE,
sizeof(desc_hid_0_report),
sizeof(tusb_desc_hid_0_report),
TUSBD_EP_HID_0_OUT, TUSBD_EP_HID_0_IN,
CONFIG_TUSBD_HID_EP_SIZE,
CONFIG_TUSBD_HID_0_POLL_INTERVALL),
Expand All @@ -313,7 +313,7 @@ uint8_t const tusb_desc_hs_config[] = {
* EP Out & EP In address, EP size, polling interval */
TUD_HID_INOUT_DESCRIPTOR(TUSBD_ITF_HID_1, TUSBD_STR_IDX_HID_1,
HID_TUSBD_ITF_PROTOCOL_NONE,
sizeof(desc_hid_1_report),
sizeof(tusb_desc_hid_1_report),
TUSBD_EP_HID_1_OUT, TUSBD_EP_HID_1_IN,
CONFIG_TUSBD_HID_EP_SIZE,
CONFIG_TUSBD_HID_1_POLL_INTERVALL),
Expand Down

0 comments on commit 95fb69d

Please sign in to comment.