summaryrefslogtreecommitdiff
path: root/class
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-02-14 14:57:20 +0800
committersakumisu <[email protected]>2022-02-14 14:57:20 +0800
commit739d83a8a93642e4fe96cc30b69367242be2e5ae (patch)
treeb2fcc7834c80ead8d975ab50c3e753560bd48756 /class
parent2f086a4ec3394c4ffb745368cdca901454d694ae (diff)
fix struct name due to copy error
Diffstat (limited to 'class')
-rw-r--r--class/cdc/usbh_cdc_acm.c2
-rw-r--r--class/hid/usbh_hid.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/class/cdc/usbh_cdc_acm.c b/class/cdc/usbh_cdc_acm.c
index f751ca9b..32ac41d9 100644
--- a/class/cdc/usbh_cdc_acm.c
+++ b/class/cdc/usbh_cdc_acm.c
@@ -172,7 +172,7 @@ USB_NOCACHE_RAM_SECTION uint8_t cdc_buffer[4096];
void usbh_cdc_acm_callback(void *arg, int nbytes)
{
- struct usbh_hub *cdc_acm_class = (struct usbh_hub *)arg;
+ struct usbh_cdc_acm *cdc_acm_class = (struct usbh_cdc_acm *)arg;
if (nbytes > 0) {
for (size_t i = 0; i < nbytes; i++) {
diff --git a/class/hid/usbh_hid.c b/class/hid/usbh_hid.c
index f047267a..7fee5a9b 100644
--- a/class/hid/usbh_hid.c
+++ b/class/hid/usbh_hid.c
@@ -159,15 +159,15 @@ int usbh_hid_get_idle(struct usbh_hubport *hport, uint8_t intf, uint8_t *buffer)
return 0;
}
-USB_NOCACHE_RAM_SECTION uint8_t report_buffer[128];
+USB_NOCACHE_RAM_SECTION uint8_t hid_buffer[128];
void usbh_hid_callback(void *arg, int nbytes)
{
- struct usbh_hub *hid_class = (struct usbh_hub *)arg;
+ struct usbh_hid *hid_class = (struct usbh_hid *)arg;
if (nbytes > 0) {
for (size_t i = 0; i < nbytes; i++) {
- printf("0x%02x ", report_buffer[i]);
+ printf("0x%02x ", hid_buffer[i]);
}
}
@@ -205,7 +205,7 @@ int usbh_hid_connect(struct usbh_hubport *hport, uint8_t intf)
return ret;
}
- ret = usbh_hid_get_report_descriptor(hport, intf, report_buffer);
+ ret = usbh_hid_get_report_descriptor(hport, intf, hid_buffer);
if (ret < 0) {
return ret;
}
@@ -227,12 +227,12 @@ int usbh_hid_connect(struct usbh_hubport *hport, uint8_t intf)
USB_LOG_INFO("Register HID Class:%s\r\n", devname);
#if 1
- ret = usbh_ep_intr_async_transfer(hid_class->intin, report_buffer, 128, usbh_hid_callback, hid_class);
+ ret = usbh_ep_intr_async_transfer(hid_class->intin, hid_buffer, 128, usbh_hid_callback, hid_class);
if (ret < 0) {
return ret;
}
#else
- ret = usbh_ep_intr_transfer(hid_class->intin, report_buffer, 128);
+ ret = usbh_ep_intr_transfer(hid_class->intin, hid_buffer, 128);
if (ret < 0) {
return ret;
}