usb_check.c 868 B

1234567891011121314151617181920212223242526272829303132
  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(SOC_HPM6000) || defined(SOC_HPM6E00) || defined(SOC_HPM6P00) || \
  18. defined(BSP_USING_BL61X) || defined(BSP_USING_BL808)
  19. #ifndef RT_USING_CACHE
  20. #error RT_USING_CACHE must be enabled in this chip
  21. #endif
  22. #endif
  23. #ifdef RT_USING_CACHE
  24. #ifndef CONFIG_USB_DCACHE_ENABLE
  25. #warning CONFIG_USB_DCACHE_ENABLE must be enabled if you do not config nocache ram
  26. #endif
  27. #endif