Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 231 → Rev 294

/FollowMe/sdc.h
1,33 → 1,30
#ifndef _SDC_H_
#define _SDC_H_
 
extern u8 SDC_Init(void);
#include <inttypes.h>
 
//________________________________________________________________________________________________________________________________________
//
// Functions needed for access to the sdcard.
//
//________________________________________________________________________________________________________________________________________
typedef enum
{
SD_SUCCESS = 0,
SD_ERROR_NOCARD,
SD_ERROR_RESET,
SD_ERROR_INITIALIZE,
SD_ERROR_BAD_RESPONSE,
SD_ERROR_BAD_VOLTAGE_RANGE,
SD_ERROR_NO_SDCARD,
SD_ERROR_TIMEOUT,
SD_ERROR_CRC_DATA,
SD_ERROR_WRITE_DATA,
SD_ERROR_READ_DATA,
SD_ERROR_SET_BLOCKLEN,
SD_ERROR_UNKNOWN
} SD_Result_t;
 
extern u8 SSC_GetChar(void);
extern void SSC_PutChar(u8);
extern void MMC_Read_Block(u8 *,u8 *,u16);
extern SD_Result_t SDC_Init(void);
extern SD_Result_t SDC_GetSector (uint32_t Addr, uint8_t *pBuffer);
extern SD_Result_t SDC_PutSector (uint32_t Addr, const uint8_t *pBuffer);
extern SD_Result_t SDC_Deinit(void);
 
 
//________________________________________________________________________________________________________________________________________
//
// Functions needed internaly for the fat16 implementation
//
//________________________________________________________________________________________________________________________________________
 
extern u8 SDC_GetSector (u32,u8 *);
extern u8 SDC_PutSector (u32,u8 *);
extern u8 SDC_PutCommand (u8 *);
extern void SDC_GetBlock(u8 *CMD,u8 *Buffer,u16 Bytes);
 
 
#define nop() __asm__ __volatile__ ("nop" ::)
 
#endif