Rev 1 | Rev 41 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1 | Rev 24 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _SDC_H_ |
1 | #ifndef _SDC_H |
2 | #define _SDC_H_ |
2 | #define _SDC_H |
Line 3... | Line 3... | ||
3 | 3 | ||
Line 4... | Line 4... | ||
4 | extern unsigned char SDC_Init(void); |
4 | #include "91x_lib.h" |
5 | 5 | ||
6 | //________________________________________________________________________________________________________________________________________ |
6 | //________________________________________________________________________________________________________________________________________ |
7 | // |
7 | // |
8 | // Functions needed for access to the sdcard. |
8 | // Functions needed for accessing the sdcard. |
Line -... | Line 9... | ||
- | 9 | // |
|
- | 10 | //________________________________________________________________________________________________________________________________________ |
|
- | 11 | ||
- | 12 | typedef enum |
|
- | 13 | { |
|
- | 14 | SD_SUCCESS = 0, |
|
- | 15 | SD_ERROR_NOCARD, |
|
- | 16 | SD_ERROR_RESET, |
|
- | 17 | SD_ERROR_INITIALIZE, |
|
- | 18 | SD_ERROR_BAD_RESPONSE, |
|
- | 19 | SD_ERROR_BAD_VOLTAGE_RANGE, |
|
- | 20 | SD_ERROR_NO_SDCARD, |
|
- | 21 | SD_ERROR_TIMEOUT, |
|
- | 22 | SD_ERROR_CRC_DATA, |
|
- | 23 | SD_ERROR_WRITE_DATA, |
|
- | 24 | SD_ERROR_READ_DATA, |
|
- | 25 | SD_ERROR_SET_BLOCKLEN, |
|
9 | // |
26 | SD_ERROR_UNKNOWN |
10 | //________________________________________________________________________________________________________________________________________ |
27 | } SD_Result_t; |
11 | 28 | ||
- | 29 | extern SD_Result_t SDC_Init(void); |
|
Line 12... | Line -... | ||
12 | extern unsigned char SSC_GetChar(void); |
- | |
13 | extern void SSC_PutChar(u8); |
- | |
14 | extern void MMC_Read_Block(u8 *,u8 *,u16); |
- | |
15 | - | ||
16 | - | ||
17 | //________________________________________________________________________________________________________________________________________ |
- | |
18 | // |
- | |
19 | // Functions needed internaly for the fat16 implementation |
- | |
20 | // |
- | |
21 | //________________________________________________________________________________________________________________________________________ |
- | |
22 | - | ||
23 | extern unsigned char SDC_GetSector (u32,u8 *); |
- | |
24 | extern unsigned char SDC_PutSector (u32,u8 *); |
- | |
25 | extern unsigned char SDC_PutCommand (u8 *); |
- | |
26 | extern void SDC_GetBlock(u8 *CMD,u8 *Buffer,u16 Bytes); |
- | |
27 | 30 | extern SD_Result_t SDC_GetSector (u32 ,u8 *); |