usb_check.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2022 ~ 2025, sakumisu
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include "rtthread.h"
  7. #include "usb_config.h"
  8. #if defined(PKG_CHERRYUSB_HOST) || defined(RT_CHERRYUSB_HOST)
  9. #ifndef RT_USING_TIMER_SOFT
  10. #error must enable RT_USING_TIMER_SOFT to support timer callback in thread
  11. #endif
  12. #if RT_TIMER_THREAD_STACK_SIZE < 1024
  13. #error "RT_TIMER_THREAD_STACK_SIZE must be >= 1024"
  14. #endif
  15. #endif
  16. #if defined(ARCH_ARM_CORTEX_M7) || \
  17. defined(ARCH_ARM_CORTEX_A) || \
  18. defined(ARCH_RISCV64) || \
  19. defined(SOC_HPM6200) || defined(SOC_HPM6300) || defined(SOC_HPM6700) || defined(SOC_HPM6800) || \
  20. defined(SOC_HPM6E00) || defined(SOC_HPM6P00) || \
  21. defined(BSP_USING_BL61X) || defined(BSP_USING_BL808)
  22. #ifndef RT_USING_CACHE
  23. #error RT_USING_CACHE must be enabled in this chip
  24. #endif
  25. #endif
  26. #ifdef RT_USING_CACHE
  27. #ifndef CONFIG_USB_DCACHE_ENABLE
  28. #error CONFIG_USB_DCACHE_ENABLE must be enabled if you do not config nocache ram
  29. #endif
  30. #endif