capi/sd.c File Reference

#include "sd_modules.h"
#include "ssd192X.h"
#include "io.h"
#include "system.h"
#include "trace.h"
Include dependency graph for sd.c:

Defines

#define DELAYFACTOR   1000

Functions

void SD_clear_int_1130 (UINT8 d)
void SD_clear_int_1132 (UINT8 d)
void SD_clear_int ()
void SD_clear_int_ff ()
UINT8 SD_wait_cmd_complete_val (UINT8 val)
UINT8 SD_wait_cmd_complete ()
UINT8 SD_wait_cmd_resp_check ()
UINT32 SD_get_response ()
UINT8 SD_reset_quick (UINT8 reset_type)
UINT8 SD_reset (UINT8 reset_type)
UINT32 get_cardstatus (UINT16 rca)
UINT8 Card_Detect ()
UINT8 Select_card (SDCardData *sdcd)
UINT8 Deselect_card (void)
UINT32 SD_Get_CSD (SDCardData *sdcd)
UINT8 SD_Clck_Ctrl (char value)
void SD_Clck_Off (void)
void SD_Power_On (void)
void SD_Power_Off (void)
void SD_Host_Ctrl (void)
UINT8 SD_Send_CMD (UINT8 cmd, UINT32 cmd_argu, UINT8 cmd_resp_type)
void SD_Send_appCMD (UINT16 rca, UINT8 cmd, UINT32 cmd_argu, UINT8 cmd_resp_type)
UINT8 SD_base_init ()
UINT8 SD_init (SDCardData *sdcd)
UINT8 set_SD_parameters (UINT16 rca)
UINT8 Init_SD (SDCardData *sdcd)
void SD_send_csd (UINT16 rca)

Define Documentation

#define DELAYFACTOR   1000

Function Documentation

UINT8 Card_Detect ( void   ) 

References SD_NOT_PRESENT, SD_NOT_READY, SD_OK, SSD_REGRB, and TRACE.

Referenced by Init_SD().

Here is the caller graph for this function:

UINT8 Deselect_card ( void   ) 

References CMD7, cmd_check, SD_clear_int(), SD_clear_int_ff(), SD_Send_CMD(), and SD_wait_cmd_complete().

Here is the call graph for this function:

UINT32 get_cardstatus ( UINT16  rca  ) 

myprintf("\r\nSD RCA = 0x%x", SD_RCA);

myprintf("\r\nStatus = 0x%x\r\n", status); // shall be 0x900

References CMD13, cmd_check, r1_resp, SD_clear_int_1130(), SD_CMDline, SD_get_response(), SD_NOT_READY, SD_reset_quick(), SD_Send_CMD(), SD_wait_cmd_complete(), SD_wait_cmd_resp_check(), SSD_REGRB, SSD_REGRW, SSD_REGWB, and SSD_REGWW.

Referenced by SD_write().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT8 Init_SD ( SDCardData sdcd  ) 

References Card_Detect(), SDCardData::rca, SD_init(), Select_card(), set_SD_parameters(), and TRACE.

Referenced by disk_initialize(), and Write_JPEG_data_to_SD().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT8 SD_base_init (  ) 

References CMD0, NORM_CMD, SD_All, SD_reset(), SD_Send_CMD(), SD_wait_cmd_complete(), and TRACE.

Referenced by SD_init().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT8 SD_Clck_Ctrl ( char  value  ) 

References SD_CLK_E, SD_OK, SSD_REGRB, and SSD_REGWB.

Referenced by SD_reset().

Here is the caller graph for this function:

void SD_Clck_Off ( void   ) 

References SSD_REGRB, and SSD_REGWB.

void SD_clear_int ( void   ) 

References SD_clear_int_1130(), and SD_clear_int_1132().

Referenced by Deselect_card(), SD_Get_CSD(), SD_reset(), and Select_card().

Here is the call graph for this function:

Here is the caller graph for this function:

void SD_clear_int_1130 ( UINT8  d  ) 

References SSD_REGWB.

Referenced by get_cardstatus(), SD_clear_int(), SD_clear_int_ff(), SD_read(), SD_read_multiple(), SD_Send_CMD(), and SD_write().

Here is the caller graph for this function:

void SD_clear_int_1132 ( UINT8  d  ) 

References SSD_REGWB.

Referenced by SD_clear_int(), SD_clear_int_ff(), and SD_Send_CMD().

Here is the caller graph for this function:

void SD_clear_int_ff ( void   ) 

References SD_clear_int_1130(), and SD_clear_int_1132().

Referenced by Deselect_card(), and Select_card().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT32 SD_Get_CSD ( SDCardData sdcd  ) 
UINT32 SD_get_response (  ) 

References SSD_REGRL.

Referenced by get_cardstatus(), and SD_init().

Here is the caller graph for this function:

void SD_Host_Ctrl ( void   ) 

References SSD_REGRB, and SSD_REGWB.

UINT8 SD_init ( SDCardData sdcd  ) 
void SD_Power_Off ( void   ) 

References delay_ns(), DELAYFACTOR, and SSD_REGWB.

Referenced by SD_reset().

Here is the call graph for this function:

Here is the caller graph for this function:

void SD_Power_On ( void   ) 

References SSD_REGRB, and SSD_REGWB.

Referenced by SD_reset().

Here is the caller graph for this function:

UINT8 SD_reset ( UINT8  reset_type  ) 

References SD_Clck_Ctrl(), SD_clear_int(), SD_NOT_READY, SD_OK, SD_Power_Off(), SD_Power_On(), SD_reset_quick(), SD_UNKNOWN_E, SSD_REGRB, and SSD_REGWB.

Referenced by SD_base_init().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT8 SD_reset_quick ( UINT8  reset_type  ) 

References SD_NOT_READY, SD_OK, SSD_REGRB, SSD_REGWB, and TRACE1.

Referenced by get_cardstatus(), SD_reset(), and SD_reset_inhibit_DAT().

Here is the caller graph for this function:

void SD_Send_appCMD ( UINT16  rca,
UINT8  cmd,
UINT32  cmd_argu,
UINT8  cmd_resp_type 
)

References CMD55, delay_ns(), DELAYFACTOR, SD_Send_CMD(), SD_wait_cmd_resp_check(), TRACE, TRACE3, and wResp_CMD.

Referenced by SD_init(), and set_SD_parameters().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT8 SD_Send_CMD ( UINT8  cmd,
UINT32  cmd_argu,
UINT8  cmd_resp_type 
)

References SD_clear_int_1130(), SD_clear_int_1132(), SSD_REGRB, SSD_REGWB, TRACE, and TRACE3.

Referenced by Deselect_card(), get_cardstatus(), SD_base_init(), SD_Get_CSD(), SD_init(), SD_read(), SD_read_multiple(), SD_Send_appCMD(), SD_send_csd(), SD_write(), Select_card(), and set_SD_parameters().

Here is the call graph for this function:

Here is the caller graph for this function:

void SD_send_csd ( UINT16  rca  ) 

References CMD55, R2_Resp_CMD, and SD_Send_CMD().

Here is the call graph for this function:

UINT8 SD_wait_cmd_complete ( void   ) 

References SD_wait_cmd_complete_val().

Referenced by Deselect_card(), get_cardstatus(), SD_base_init(), SD_Get_CSD(), SD_init(), SD_read(), SD_read_multiple(), SD_write(), Select_card(), and set_SD_parameters().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT8 SD_wait_cmd_complete_val ( UINT8  val  ) 

References SD_NOT_READY, SD_OK, SSD_REGRB, and TRACE.

Referenced by SD_read(), SD_wait_cmd_complete(), and SD_write().

Here is the caller graph for this function:

UINT8 SD_wait_cmd_resp_check ( void   ) 

References SD_NOT_READY, SD_OK, SSD_REGRB, and TRACE.

Referenced by get_cardstatus(), SD_Get_CSD(), SD_init(), SD_read(), SD_Send_appCMD(), and Select_card().

Here is the caller graph for this function:

UINT8 Select_card ( SDCardData sdcd  ) 

References CMD7, cmd_check, r1b_resp, SDCardData::rca, SD_clear_int(), SD_clear_int_ff(), SD_Send_CMD(), SD_wait_cmd_complete(), and SD_wait_cmd_resp_check().

Referenced by Init_SD().

Here is the call graph for this function:

Here is the caller graph for this function:

UINT8 set_SD_parameters ( UINT16  rca  ) 

References ACMD6, CMD16, cmd_check, r1_resp, SD_Send_appCMD(), SD_Send_CMD(), SD_wait_cmd_complete(), and SSD_REGWB.

Referenced by Init_SD().

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Wed Mar 23 11:08:32 2011 for Omnima LCD by  doxygen 1.6.3