Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. #ifndef _SD_H
  2. #define _SD_H 1
  3.  
  4. #define SDV1FLAG 0b00000001
  5. #define SDV2FLAG 0b00000010
  6. #define SDHCFLAG 0b00000100
  7. #define MMCFLAG  0b00010000
  8. #define BIT_SDHCFLAG 2
  9. // SDSC=SDV2FLAG
  10. // SDHC=SDV2FLAG|SDHCFLAG
  11.  
  12. #ifndef __ASSEMBLER__
  13.  
  14. #include "_types.h"
  15.  
  16. extern volatile u8 sd_cardtype;
  17. extern const u8 cmd08[] PROGMEM;
  18.  
  19. u8 sd_receive(void);
  20. u8 sd_exchange(u8 data);
  21. void sd_rd_dummy(u8 count);
  22. u8 sd_cmd_without_arg(u8 cmd);
  23. u8 sd_cmd_with_1arg(u8 cmd, u16 h_arg);
  24. u8 sd_cmd_with_arg(u8 cmd, u32 arg);
  25. u8 sd_wait_notff(void);
  26. u8 sd_read_sector(u8 *buff, u32 sectnumb);
  27. u8 sd_init(void);
  28.  
  29. #endif // #ifndef __ASSEMBLER__
  30.  
  31. #endif // #ifndef _SD_H
  32.  
  33.  
  34.