Subversion Repositories Projects

Rev

Rev 231 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
231 killagreg 1
#ifndef _SDC_H_
2
#define _SDC_H_
3
 
294 killagreg 4
#include <inttypes.h>
231 killagreg 5
 
294 killagreg 6
typedef enum
7
{
8
  SD_SUCCESS = 0,
9
  SD_ERROR_NOCARD,
10
  SD_ERROR_RESET,
11
  SD_ERROR_INITIALIZE,
12
  SD_ERROR_BAD_RESPONSE,
13
  SD_ERROR_BAD_VOLTAGE_RANGE,
14
  SD_ERROR_NO_SDCARD,
15
  SD_ERROR_TIMEOUT,
16
  SD_ERROR_CRC_DATA,
17
  SD_ERROR_WRITE_DATA,
18
  SD_ERROR_READ_DATA,
19
  SD_ERROR_SET_BLOCKLEN,
20
  SD_ERROR_UNKNOWN
21
} SD_Result_t;
231 killagreg 22
 
294 killagreg 23
extern SD_Result_t SDC_Init(void);
24
extern SD_Result_t SDC_GetSector (uint32_t Addr, uint8_t *pBuffer);
25
extern SD_Result_t SDC_PutSector (uint32_t Addr, const uint8_t *pBuffer);
26
extern SD_Result_t SDC_Deinit(void);
231 killagreg 27
 
28
#endif
29
 
30