sdio_config.h 979 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-12-13 BalanceTWK first version
  9. */
  10. #ifndef __SDIO_CONFIG_H__
  11. #define __SDIO_CONFIG_H__
  12. #include <rtthread.h>
  13. #include "stm32l1xx_hal.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifdef BSP_USING_SDIO
  18. #define SDIO_BUS_CONFIG \
  19. { \
  20. .Instance = SDIO, \
  21. .dma_rx.dma_rcc = RCC_AHBENR_DMA2EN, \
  22. .dma_tx.dma_rcc = RCC_AHBENR_DMA2EN, \
  23. .dma_rx.Instance = DMA2_Channel4, \
  24. .dma_rx.dma_irq = DMA2_Channel4_IRQn, \
  25. .dma_tx.Instance = DMA2_Channel4, \
  26. .dma_tx.dma_irq = DMA2_Channel4_IRQn, \
  27. }
  28. #endif
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif /*__SDIO_CONFIG_H__ */