summaryrefslogtreecommitdiff
path: root/platform/rtthread/rt_usb_check.c
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2026-03-12 22:13:22 +0800
committersakumisu <[email protected]>2026-03-12 22:13:22 +0800
commit42f4e4276258df0d235839ab53a087ec4c1ca396 (patch)
tree429cbd7d6aaecc64c98ab350f54e8a3e9dda4329 /platform/rtthread/rt_usb_check.c
parentb9fbfb299969d8d1491fb0a4f9b951edab156f8a (diff)
refactor(platform/rtthread): add rt prefix for file name
Signed-off-by: sakumisu <[email protected]>
Diffstat (limited to 'platform/rtthread/rt_usb_check.c')
-rw-r--r--platform/rtthread/rt_usb_check.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/platform/rtthread/rt_usb_check.c b/platform/rtthread/rt_usb_check.c
new file mode 100644
index 00000000..154d89f0
--- /dev/null
+++ b/platform/rtthread/rt_usb_check.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2022 ~ 2025, sakumisu
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#include "rtthread.h"
+#include "usb_config.h"
+
+#if defined(PKG_CHERRYUSB_HOST) || defined(RT_CHERRYUSB_HOST)
+
+#ifndef RT_USING_TIMER_SOFT
+#error must enable RT_USING_TIMER_SOFT to support timer callback in thread
+#endif
+
+#if RT_TIMER_THREAD_STACK_SIZE < 1024
+#error "RT_TIMER_THREAD_STACK_SIZE must be >= 1024"
+#endif
+#endif
+
+#if defined(ARCH_ARM_CORTEX_M7) || \
+ defined(ARCH_ARM_CORTEX_A) || \
+ defined(ARCH_RISCV64) || \
+ defined(SOC_HPM6200) || defined(SOC_HPM6300) || defined(SOC_HPM6700) || defined(SOC_HPM6800) || \
+ defined(SOC_HPM6E00) || defined(SOC_HPM6P00) || \
+ defined(BSP_USING_BL61X) || defined(BSP_USING_BL808)
+#ifndef RT_USING_CACHE
+#error RT_USING_CACHE must be enabled in this chip
+#endif
+#endif
+
+#ifdef RT_USING_CACHE
+#ifndef CONFIG_USB_DCACHE_ENABLE
+#error CONFIG_USB_DCACHE_ENABLE must be enabled if you do not config nocache ram
+#endif
+#endif