Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
426 | killagreg | 1 | #ifndef _SDC_H_ |
2 | #define _SDC_H_ |
||
3 | |||
4 | #include <inttypes.h> |
||
5 | |||
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; |
||
22 | |||
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); |
||
27 | |||
28 | #endif |
||
29 | |||
30 |