usb_check.c 939 B

123456789101112131415161718192021222324252627282930313233343536
  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 < 2048
  13. #error "RT_TIMER_THREAD_STACK_SIZE must be >= 2048"
  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. #error CONFIG_USB_DCACHE_ENABLE must be enabled
  26. #endif
  27. #if RT_ALIGN_SIZE != 32 && RT_ALIGN_SIZE != 64
  28. #error RT_ALIGN_SIZE must be cacheline to 32 or 64
  29. #endif
  30. #endif