Rev 24 | Rev 238 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 24 | Rev 41 | ||
---|---|---|---|
1 | #ifndef _SDC_H |
1 | #ifndef _SDC_H |
2 | #define _SDC_H |
2 | #define _SDC_H |
3 | - | ||
4 | #include "91x_lib.h" |
3 | |
5 | 4 | ||
6 | //________________________________________________________________________________________________________________________________________ |
5 | //________________________________________________________________________________________________________________________________________ |
7 | // |
6 | // |
8 | // Functions needed for accessing the sdcard. |
7 | // Functions needed for accessing the sdcard. |
9 | // |
8 | // |
10 | //________________________________________________________________________________________________________________________________________ |
9 | //________________________________________________________________________________________________________________________________________ |
11 | 10 | ||
12 | typedef enum |
11 | typedef enum |
13 | { |
12 | { |
14 | SD_SUCCESS = 0, |
13 | SD_SUCCESS = 0, |
15 | SD_ERROR_NOCARD, |
14 | SD_ERROR_NOCARD, |
16 | SD_ERROR_RESET, |
15 | SD_ERROR_RESET, |
17 | SD_ERROR_INITIALIZE, |
16 | SD_ERROR_INITIALIZE, |
18 | SD_ERROR_BAD_RESPONSE, |
17 | SD_ERROR_BAD_RESPONSE, |
19 | SD_ERROR_BAD_VOLTAGE_RANGE, |
18 | SD_ERROR_BAD_VOLTAGE_RANGE, |
20 | SD_ERROR_NO_SDCARD, |
19 | SD_ERROR_NO_SDCARD, |
21 | SD_ERROR_TIMEOUT, |
20 | SD_ERROR_TIMEOUT, |
22 | SD_ERROR_CRC_DATA, |
21 | SD_ERROR_CRC_DATA, |
23 | SD_ERROR_WRITE_DATA, |
22 | SD_ERROR_WRITE_DATA, |
24 | SD_ERROR_READ_DATA, |
23 | SD_ERROR_READ_DATA, |
25 | SD_ERROR_SET_BLOCKLEN, |
24 | SD_ERROR_SET_BLOCKLEN, |
26 | SD_ERROR_UNKNOWN |
25 | SD_ERROR_UNKNOWN |
27 | } SD_Result_t; |
26 | } SD_Result_t; |
28 | 27 | ||
29 | extern SD_Result_t SDC_Init(void); |
28 | SD_Result_t SDC_Init(void); |
30 | extern SD_Result_t SDC_GetSector (u32 ,u8 *); |
29 | SD_Result_t SDC_GetSector (u32 ,u8 *); |
31 | extern SD_Result_t SDC_PutSector (u32, const u8 *); |
30 | SD_Result_t SDC_PutSector (u32, const u8 *); |
32 | extern SD_Result_t SDC_Deinit(void); |
31 | SD_Result_t SDC_Deinit(void); |
33 | 32 | ||
34 | #endif // _SDC_H |
33 | #endif // _SDC_H |
35 | 34 | ||
36 | 35 | ||
37 | 36 |