3 #ifndef _SDIO_MASTER_PAL_H_
\r
4 #define _SDIO_MASTER_PAL_H_
\r
6 /*****************************************************************************/
\r
7 // Description: Get Card operation handle,after we get the handle ,we can get next operation way of card
\r
10 // slotNo: slot number
\r
12 // Not zero: success
\r
15 /*****************************************************************************/
\r
16 CARD_SDIO_HANDLE SPRD_SDSlave_Open(int slotNo);
\r
18 /*****************************************************************************/
\r
19 // Description: close operation handle of card. afer we free it ,other
\r
20 // application can operate on this card
\r
23 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
27 /*****************************************************************************/
\r
28 void SPRD_SDSlave_Close(CARD_SDIO_HANDLE cardHandle);
\r
29 /*****************************************************************************/
\r
30 // Description: close operation handle of card. afer we free it ,other
\r
31 // application can operate on this card
\r
34 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
38 /*****************************************************************************/
\r
39 void SPRD_SDSlave_PwrCtl(CARD_SDIO_HANDLE cardHandle,int switchCtl);
\r
40 /*****************************************************************************/
\r
41 // Description: close operation handle of card. afer we free it ,other
\r
42 // application can operate on this card
\r
45 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
49 /*****************************************************************************/
\r
50 void CARD_SDIO_SlotSelect(int slotNo);
\r
52 int SDIO_SetBusClock(CARD_SDIO_HANDLE cardHandle,int clock);
\r
53 //-----------------------------------------------------------------------------------
\r
54 // Set data bus width of card
\r
55 //-----------------------------------------------------------------------------------
\r
56 int SDIO_SetBusWidth(CARD_SDIO_HANDLE cardHandle,SDIO_CARD_PAL_BUFWIDTH_E width);
\r
58 /*****************************************************************************/
\r
59 // Description: close operation handle of card. afer we free it ,other
\r
60 // application can operate on this card
\r
63 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
67 /*****************************************************************************/
\r
68 int SDIO_SetBlockLength(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int length);
\r
70 /*****************************************************************************/
\r
71 // Description: close operation handle of card. afer we free it ,other
\r
72 // application can operate on this card
\r
75 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
79 /*****************************************************************************/
\r
80 int SPRD_SDSlave_InitCard(CARD_SDIO_HANDLE cardHandle);
\r
81 /*****************************************************************************/
\r
82 // Description: close operation handle of card. afer we free it ,other
\r
83 // application can operate on this card
\r
86 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
90 /*****************************************************************************/
\r
91 int SDIO_ReadBytes(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned int inc_flag,unsigned int num,unsigned char* buf);
\r
92 /*****************************************************************************/
\r
93 // Description: close operation handle of card. afer we free it ,other
\r
94 // application can operate on this card
\r
97 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
101 /*****************************************************************************/
\r
102 int SDIO_ReadBlocks(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned int inc_flag,unsigned int num,unsigned char* buf);
\r
103 /*****************************************************************************/
\r
104 // Description: close operation handle of card. afer we free it ,other
\r
105 // application can operate on this card
\r
106 // Author: Jason.wu
\r
108 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
112 /*****************************************************************************/int SDIO_WriteBytes(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned int inc_flag,unsigned int num,unsigned char* buf);
\r
113 /*****************************************************************************/
\r
114 // Description: close operation handle of card. afer we free it ,other
\r
115 // application can operate on this card
\r
116 // Author: Jason.wu
\r
118 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
122 /*****************************************************************************/int SDIO_WriteBlocks(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned int inc_flag,unsigned int num,unsigned char* buf);
\r
123 /*****************************************************************************/
\r
124 // Description: close operation handle of card. afer we free it ,other
\r
125 // application can operate on this card
\r
126 // Author: Jason.wu
\r
128 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
132 /*****************************************************************************/
\r
133 int SDIO_ReadByte(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned char* buf);
\r
134 /*****************************************************************************/
\r
135 // Description: close operation handle of card. afer we free it ,other
\r
136 // application can operate on this card
\r
137 // Author: Jason.wu
\r
139 // cardHandle: the handle returned by SPRD_SDSlave_Open
\r
143 /*****************************************************************************/
\r
144 int SDIO_WriteByte(CARD_SDIO_HANDLE cardHandle,unsigned int func,unsigned int RegAddr,unsigned char* wbuf,unsigned char* rbuf);
\r
145 #endif//__SDIO_MASTER_H__
\r