summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-05-09 18:21:47 +0800
committersakumisu <[email protected]>2025-05-09 18:21:47 +0800
commit19f7548b607c00439a0dba8c7a24f49ad90ebf5c (patch)
treeba17d95246ef344246ae998974b4c817326571e1
parentba2f91f24c08aec793658cc2eae0b72bd4093ebb (diff)
update(cherryusb_config_template): update macro
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--cherryusb_config_template.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/cherryusb_config_template.h b/cherryusb_config_template.h
index 9b7334b3..0e6334a2 100644
--- a/cherryusb_config_template.h
+++ b/cherryusb_config_template.h
@@ -8,7 +8,13 @@
/* ================ USB common Configuration ================ */
+#ifdef __RTTHREAD__
+#include <rtthread.h>
+
+#define CONFIG_USB_PRINTF(...) rt_kprintf(__VA_ARGS__)
+#else
#define CONFIG_USB_PRINTF(...) printf(__VA_ARGS__)
+#endif
#ifndef CONFIG_USB_DBG_LEVEL
#define CONFIG_USB_DBG_LEVEL USB_DBG_INFO
@@ -22,11 +28,16 @@
#define CONFIG_USB_ALIGN_SIZE 4
#endif
-//#define CONFIG_USB_DCACHE_ENABLE
+// #define CONFIG_USB_DCACHE_ENABLE
/* attribute data into no cache ram */
#define USB_NOCACHE_RAM_SECTION __attribute__((section(".noncacheable")))
+/* use usb_memcpy default for high performance but cost more flash memory.
+ * And, arm libc has a bug that memcpy() may cause data misalignment when the size is not a multiple of 4.
+*/
+// #define CONFIG_USB_MEMCPY_DISABLE
+
/* ================= USB Device Stack Configuration ================ */
/* Ep0 in and out transfer buffer */
@@ -114,6 +125,7 @@
#endif
#define CONFIG_USBDEV_RNDIS_USING_LWIP
+#define CONFIG_USBDEV_CDC_ECM_USING_LWIP
/* ================ USB HOST Stack Configuration ================== */