summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-06-23 21:24:20 +0800
committersakumisu <[email protected]>2022-06-23 21:26:35 +0800
commit8753efb9358da6cdf1103d1a4342210af0ee75a3 (patch)
treebf48c89098624840d0bb6fe3f554038588d46ae8
parentedee76c3e599991b4f81526ffd8d81cb0b42c39a (diff)
add USB_MEM_ALIGN32 for buffers in host demo
-rw-r--r--demo/usb_host.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/demo/usb_host.c b/demo/usb_host.c
index ae073127..fabaa500 100644
--- a/demo/usb_host.c
+++ b/demo/usb_host.c
@@ -3,7 +3,7 @@
#include "usbh_hid.h"
#include "usbh_msc.h"
-uint8_t cdc_buffer[512];
+USB_MEM_ALIGN32 uint8_t cdc_buffer[512];
void usbh_cdc_acm_callback(void *arg, int nbytes)
{
@@ -73,7 +73,7 @@ int cdc_acm_test(void)
#include "ff.h"
#endif
-uint8_t partition_table[512];
+USB_MEM_ALIGN32 uint8_t partition_table[512];
int msc_test(void)
{
@@ -143,7 +143,7 @@ int msc_test(void)
return ret;
}
-uint8_t hid_buffer[128];
+USB_MEM_ALIGN32 uint8_t hid_buffer[128];
void usbh_hid_callback(void *arg, int nbytes)
{
@@ -174,6 +174,7 @@ int hid_test(void)
#else
ret = usbh_ep_intr_transfer(hid_class->intin, hid_buffer, 128, 1000);
if (ret < 0) {
+ USB_LOG_RAW("intr in error,ret:%d\r\n", ret);
return ret;
}
USB_LOG_RAW("recv len:%d\r\n", ret);