|
1 /* Cypress West Bridge API header file (cyanstorage_dep.h) |
|
2 ## =========================== |
|
3 ## |
|
4 ## Copyright Cypress Semiconductor Corporation, 2006-2009, |
|
5 ## All Rights Reserved |
|
6 ## UNPUBLISHED, LICENSED SOFTWARE. |
|
7 ## |
|
8 ## CONFIDENTIAL AND PROPRIETARY INFORMATION |
|
9 ## WHICH IS THE PROPERTY OF CYPRESS. |
|
10 ## |
|
11 ## Use of this file is governed |
|
12 ## by the license agreement included in the file |
|
13 ## |
|
14 ## <install>/license/license.txt |
|
15 ## |
|
16 ## where <install> is the Cypress software |
|
17 ## installation root directory path. |
|
18 ## |
|
19 ## =========================== |
|
20 */ |
|
21 |
|
22 /* This header will contain Antioch specific declaration |
|
23 * of the APIs that are deprecated in Astoria SDK. This is |
|
24 * for maintaining backward compatibility |
|
25 */ |
|
26 #ifndef __INCLUDED_CYANSTORAGE_DEP_H__ |
|
27 #define __INCLUDED_CYANSTORAGE_DEP_H__ |
|
28 |
|
29 #ifndef __doxygen__ |
|
30 |
|
31 typedef void (*CyAsStorageCallback_dep)( |
|
32 CyAsDeviceHandle handle, /* Handle to the device completing the storage operation */ |
|
33 CyAsMediaType type, /* The media type completing the operation */ |
|
34 uint32_t device, /* The device completing the operation */ |
|
35 uint32_t unit, /* The unit completing the operation */ |
|
36 uint32_t block_number, /* The block number of the completed operation */ |
|
37 CyAsOperType op, /* The type of operation */ |
|
38 CyAsReturnStatus_t status /* The error status */ |
|
39 ) ; |
|
40 |
|
41 typedef void (*CyAsStorageEventCallback_dep)( |
|
42 CyAsDeviceHandle handle, /* Handle to the device sending the event notification */ |
|
43 CyAsMediaType type, /* The media type */ |
|
44 CyAsStorageEvent evtype, /* The event type */ |
|
45 void *evdata /* Event related data */ |
|
46 ) ; |
|
47 |
|
48 typedef struct CyAsStorageQueryDeviceData_dep |
|
49 { |
|
50 CyAsMediaType type ; /* The type of media to query */ |
|
51 uint32_t device ; /* The logical device number to query */ |
|
52 CyAsDeviceDesc desc_p ; /* The return value for the device descriptor */ |
|
53 } CyAsStorageQueryDeviceData_dep ; |
|
54 |
|
55 typedef struct CyAsStorageQueryUnitData_dep |
|
56 { |
|
57 CyAsMediaType type ; /* The type of media to query */ |
|
58 uint32_t device ; /* The logical device number to query */ |
|
59 uint32_t unit ; /* The unit to query on the device */ |
|
60 CyAsUnitDesc desc_p ; /* The return value for the unit descriptor */ |
|
61 } CyAsStorageQueryUnitData_dep ; |
|
62 |
|
63 |
|
64 /************ FUNCTIONS *********************/ |
|
65 |
|
66 EXTERN CyAsReturnStatus_t |
|
67 CyAsStorageRegisterCallback_dep( |
|
68 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
69 CyAsStorageEventCallback_dep callback /* The callback function to call for async storage events */ |
|
70 ) ; |
|
71 |
|
72 EXTERN CyAsReturnStatus_t |
|
73 CyAsStorageClaim_dep(CyAsDeviceHandle handle, |
|
74 CyAsMediaType type |
|
75 ); |
|
76 |
|
77 EXTERN CyAsReturnStatus_t |
|
78 CyAsStorageClaim_dep_EX( |
|
79 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
80 CyAsMediaType* type, /* The type of media to claim */ |
|
81 CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */ |
|
82 uint32_t client /* Client data to be passed to the callback */ |
|
83 ) ; |
|
84 |
|
85 EXTERN CyAsReturnStatus_t |
|
86 CyAsStorageRelease_dep(CyAsDeviceHandle handle, |
|
87 CyAsMediaType type |
|
88 ); |
|
89 |
|
90 EXTERN CyAsReturnStatus_t |
|
91 CyAsStorageRelease_dep_EX( |
|
92 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
93 CyAsMediaType* type, /* The type of media to release */ |
|
94 CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */ |
|
95 uint32_t client /* Client data to be passed to the callback */ |
|
96 ) ; |
|
97 |
|
98 EXTERN CyAsReturnStatus_t |
|
99 CyAsStorageQueryDevice_dep( |
|
100 CyAsDeviceHandle handle, |
|
101 CyAsMediaType media, |
|
102 uint32_t device, |
|
103 CyAsDeviceDesc *desc_p |
|
104 ); |
|
105 |
|
106 EXTERN CyAsReturnStatus_t |
|
107 CyAsStorageQueryDevice_dep_EX( |
|
108 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
109 CyAsStorageQueryDeviceData_dep* data, /* Parameters and return value for the query call */ |
|
110 CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */ |
|
111 uint32_t client /* Client data to be passed to the callback */ |
|
112 ) ; |
|
113 |
|
114 EXTERN CyAsReturnStatus_t |
|
115 CyAsStorageQueryUnit_dep( |
|
116 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
117 CyAsMediaType type, /* The type of media to query */ |
|
118 uint32_t device, /* The logical device number to query */ |
|
119 uint32_t unit, /* The unit to query on the device */ |
|
120 CyAsUnitDesc * unit_p /* The return value for the unit descriptor */ |
|
121 ) ; |
|
122 |
|
123 EXTERN CyAsReturnStatus_t |
|
124 CyAsStorageQueryUnit_dep_EX( |
|
125 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
126 CyAsStorageQueryUnitData_dep* data_p, /* Parameters and return value for the query call */ |
|
127 CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */ |
|
128 uint32_t client /* Client data to be passed to the callback */ |
|
129 ) ; |
|
130 |
|
131 EXTERN CyAsReturnStatus_t |
|
132 CyAsStorageDeviceControl_dep( |
|
133 CyAsDeviceHandle handle, /* Handle to the West Bridge device */ |
|
134 CyBool card_detect_en, /* Enable/disable control for card detection */ |
|
135 CyBool write_prot_en, /* Enable/disable control for write protect handling */ |
|
136 CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */ |
|
137 uint32_t client /* Client data to be passed to the callback */ |
|
138 ) ; |
|
139 |
|
140 |
|
141 EXTERN CyAsReturnStatus_t |
|
142 CyAsStorageRead_dep( |
|
143 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
144 CyAsMediaType type, /* The type of media to access */ |
|
145 uint32_t device, /* The device to access */ |
|
146 uint32_t unit, /* The unit to access */ |
|
147 uint32_t block, /* The first block to access */ |
|
148 void * data_p, /* The buffer where data will be placed */ |
|
149 uint16_t num_blocks /* The number of blocks to be read */ |
|
150 ) ; |
|
151 |
|
152 EXTERN CyAsReturnStatus_t |
|
153 CyAsStorageReadAsync_dep( |
|
154 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
155 CyAsMediaType type, /* The type of media to access */ |
|
156 uint32_t device, /* The device to access */ |
|
157 uint32_t unit, /* The unit to access */ |
|
158 uint32_t block, /* The first block to access */ |
|
159 void * data_p, /* The buffer where data will be placed */ |
|
160 uint16_t num_blocks, /* The number of blocks to be read */ |
|
161 CyAsStorageCallback_dep callback/* The function to call when the read is complete |
|
162 or an error occurs */ |
|
163 ) ; |
|
164 EXTERN CyAsReturnStatus_t |
|
165 CyAsStorageWrite_dep( |
|
166 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
167 CyAsMediaType type, /* The type of media to access */ |
|
168 uint32_t device, /* The device to access */ |
|
169 uint32_t unit, /* The unit to access */ |
|
170 uint32_t block, /* The first block to access */ |
|
171 void * data_p, /* The buffer containing the data to be written */ |
|
172 uint16_t num_blocks /* The number of blocks to be written */ |
|
173 ) ; |
|
174 |
|
175 EXTERN CyAsReturnStatus_t |
|
176 CyAsStorageWriteAsync_dep( |
|
177 CyAsDeviceHandle handle, /* Handle to the device of interest */ |
|
178 CyAsMediaType type, /* The type of media to access */ |
|
179 uint32_t device, /* The device to access */ |
|
180 uint32_t unit, /* The unit to access */ |
|
181 uint32_t block, /* The first block to access */ |
|
182 void * data_p, /* The buffer where the data to be written is stored */ |
|
183 uint16_t num_blocks, /* The number of blocks to be written */ |
|
184 CyAsStorageCallback_dep callback /* The function to call when the write is complete |
|
185 or an error occurs */ |
|
186 ) ; |
|
187 |
|
188 EXTERN CyAsReturnStatus_t |
|
189 CyAsStorageSDRegisterRead_dep( |
|
190 CyAsDeviceHandle handle, |
|
191 CyAsMediaType type, |
|
192 uint8_t device, |
|
193 CyAsSDCardRegType regType, |
|
194 uint8_t readLen, |
|
195 uint8_t *data_p |
|
196 ); |
|
197 |
|
198 EXTERN CyAsReturnStatus_t |
|
199 CyAsStorageSDRegisterRead_dep_EX( |
|
200 CyAsDeviceHandle handle, /* Handle to the West Bridge device. */ |
|
201 CyAsMediaType type, /* The type of media to query */ |
|
202 uint8_t device, /* The device to query */ |
|
203 CyAsSDCardRegType regType, /* The type of register to read. */ |
|
204 CyAsStorageSDRegReadData *data_p, /* Output data buffer and length. */ |
|
205 CyAsFunctionCallback cb, /* Callback function to call when done. */ |
|
206 uint32_t client /* Call context to send to the cb function. */ |
|
207 ) ; |
|
208 |
|
209 EXTERN CyAsReturnStatus_t |
|
210 CyAsStorageCreatePPartition_dep( |
|
211 CyAsDeviceHandle handle, |
|
212 CyAsMediaType media, |
|
213 uint32_t device, |
|
214 uint32_t size, |
|
215 CyAsFunctionCallback cb, |
|
216 uint32_t client) ; |
|
217 |
|
218 EXTERN CyAsReturnStatus_t |
|
219 CyAsStorageRemovePPartition_dep( |
|
220 CyAsDeviceHandle handle, |
|
221 CyAsMediaType media, |
|
222 uint32_t device, |
|
223 CyAsFunctionCallback cb, |
|
224 uint32_t client) ; |
|
225 |
|
226 #endif /*__doxygen*/ |
|
227 |
|
228 #endif /*__INCLUDED_CYANSTORAGE_DEP_H__*/ |