Subversion Repositories Projects

Rev

Rev 231 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 231 Rev 294
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
extern u8 SDC_Init(void);
-
 
5
 
-
 
6
//________________________________________________________________________________________________________________________________________
4
#include <inttypes.h>
7
//
-
 
8
// Functions needed for access to the sdcard.
-
 
9
//
5
 
10
//________________________________________________________________________________________________________________________________________
6
typedef enum
-
 
7
{
-
 
8
  SD_SUCCESS = 0,
11
 
9
  SD_ERROR_NOCARD,
-
 
10
  SD_ERROR_RESET,
12
extern u8               SSC_GetChar(void);
11
  SD_ERROR_INITIALIZE,
13
extern void             SSC_PutChar(u8);
-
 
14
extern void             MMC_Read_Block(u8 *,u8 *,u16);
-
 
15
 
-
 
-
 
12
  SD_ERROR_BAD_RESPONSE,
16
 
13
  SD_ERROR_BAD_VOLTAGE_RANGE,
-
 
14
  SD_ERROR_NO_SDCARD,
-
 
15
  SD_ERROR_TIMEOUT,
-
 
16
  SD_ERROR_CRC_DATA,
17
//________________________________________________________________________________________________________________________________________
17
  SD_ERROR_WRITE_DATA,
-
 
18
  SD_ERROR_READ_DATA,
18
//
19
  SD_ERROR_SET_BLOCKLEN,
19
// Functions needed internaly for the fat16 implementation
-
 
20
//
20
  SD_ERROR_UNKNOWN
21
//________________________________________________________________________________________________________________________________________
21
} SD_Result_t;
22
 
22
 
23
extern u8 SDC_GetSector (u32,u8 *);
-
 
24
extern u8 SDC_PutSector (u32,u8 *);
23
extern SD_Result_t SDC_Init(void);
25
extern u8 SDC_PutCommand (u8 *);
-
 
26
extern void     SDC_GetBlock(u8 *CMD,u8 *Buffer,u16 Bytes);
-
 
27
 
24
extern SD_Result_t SDC_GetSector (uint32_t Addr, uint8_t *pBuffer);
Line 28... Line 25...
28
 
25
extern SD_Result_t SDC_PutSector (uint32_t Addr, const uint8_t *pBuffer);