dev_sd.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 2006-2024, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2011-07-25 weety first version
  9. * 2024-05-26 HPMicro Add UHS-I support
  10. */
  11. #ifndef __DEV_SD_H__
  12. #define __DEV_SD_H__
  13. #include <rtthread.h>
  14. #include <drivers/mmcsd_host.h>
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /*
  19. * SWITCH_FUNC timing
  20. */
  21. #define SD_SWITCH_FUNC_TIMING_DEFAULT 0
  22. #define SD_SWITCH_FUNC_TIMING_HS 1
  23. #define SD_SWITCH_FUNC_TIMING_SDR50 2
  24. #define SD_SWITCH_FUNC_TIMING_SDR104 3
  25. #define SD_SWITCH_FUNC_TIMING_DDR50 4
  26. rt_err_t mmcsd_send_if_cond(struct rt_mmcsd_host *host, rt_uint32_t ocr);
  27. rt_err_t mmcsd_send_app_op_cond(struct rt_mmcsd_host *host, rt_uint32_t ocr, rt_uint32_t *rocr);
  28. rt_err_t mmcsd_get_card_addr(struct rt_mmcsd_host *host, rt_uint32_t *rca);
  29. rt_int32_t mmcsd_get_scr(struct rt_mmcsd_card *card, rt_uint32_t *scr);
  30. rt_int32_t init_sd(struct rt_mmcsd_host *host, rt_uint32_t ocr);
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif