Subversion Repositories NaviCtrl

Rev

Rev 1 | Rev 41 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 24
1
#ifndef _SDC_H_
1
#ifndef _SDC_H
2
#define _SDC_H_
2
#define _SDC_H
3
 
3
 
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.
9
//                              
9
//                              
10
//________________________________________________________________________________________________________________________________________
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,
-
 
26
  SD_ERROR_UNKNOWN
-
 
27
} SD_Result_t;
11
 
28
 
12
extern unsigned char    SSC_GetChar(void);
29
extern SD_Result_t      SDC_Init(void);
13
extern void                     SSC_PutChar(u8);
30
extern SD_Result_t      SDC_GetSector (u32 ,u8 *);
-
 
31
extern SD_Result_t      SDC_PutSector (u32, const 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
 
-
 
28
 
-
 
29
#define nop()  __asm__ __volatile__ ("nop" ::)
32
extern SD_Result_t      SDC_Deinit(void);
30
 
33
 
31
#endif
34
#endif // _SDC_H
32
 
35
 
33
 
36
 
34
 
37