sdcard.h 707 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __SDIOLIB_H
  2. #define __SDIOLIB_H
  3. #include "stdint.h"
  4. #include <stdio.h>
  5. #include "usart.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. /*
  10. PC8 - SDIO_D0
  11. PC9 - SDIO_D1
  12. PC10 - SDIO_D2
  13. PC11 - SDIO_D3
  14. PC12 - SDIO_CK
  15. PD2 - SDIO_CMD
  16. */
  17. void SD_LowLevel_Init(void);
  18. void SD_Init(void);
  19. void SD_WriteSingleBlock(uint8_t *buf, uint32_t blk);
  20. void SD_ReadSingleBlock(uint8_t *buf, uint32_t blk);
  21. //void SD_WaitReadWriteEnd(void);
  22. void SD_WaitTransmissionEnd(void);
  23. void SD_StartMultipleBlockWrite(uint32_t blk);
  24. void SD_WriteData(uint8_t *buf, uint32_t cnt);
  25. void SD_StopMultipleBlockWrite(void);
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif //__SDIOLIB_H