author | arunabha |
Thu, 16 Sep 2010 14:35:26 +0100 | |
changeset 70 | ed23a53a5ee2 |
parent 23 | 117faf51deac |
permissions | -rw-r--r-- |
23
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
1 |
/* Cypress West Bridge API header file (cyasdevice.h) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
2 |
## =========================== |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
3 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
4 |
## Copyright Cypress Semiconductor Corporation, 2006-2009, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
5 |
## All Rights Reserved |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
6 |
## UNPUBLISHED, LICENSED SOFTWARE. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
7 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
8 |
## CONFIDENTIAL AND PROPRIETARY INFORMATION |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
9 |
## WHICH IS THE PROPERTY OF CYPRESS. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
10 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
11 |
## Use of this file is governed |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
12 |
## by the license agreement included in the file |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
13 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
14 |
## <install>/license/license.txt |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
15 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
16 |
## where <install> is the Cypress software |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
17 |
## installation root directory path. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
18 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
19 |
## =========================== |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
20 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
21 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
22 |
#ifndef __INCLUDED_CYASDEVICE_H__ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
23 |
#define __INCLUDED_CYASDEVICE_H__ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
24 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
25 |
#include "cyashal.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
26 |
#include "cyasprotocol.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
27 |
#include "cyasusb.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
28 |
#include "cyasstorage.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
29 |
#include "cyasmtp.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
30 |
#include "cyas_cplus_start.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
31 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
32 |
/***************************************************************************** |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
33 |
* West Bridge Constants |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
34 |
****************************************************************************/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
35 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
36 |
/* The endpoints used by West Bridge for the P port to S port path */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
37 |
#define CY_AS_P2S_WRITE_ENDPOINT (0x04) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
38 |
#define CY_AS_P2S_READ_ENDPOINT (0x08) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
39 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
40 |
/* The endpoint to use for firmware download */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
41 |
#define CY_AS_FIRMWARE_ENDPOINT (0x02) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
42 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
43 |
/* The maximum size of the firmware image West Bridge can accept */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
44 |
#define CY_AS_MAXIMUM_FIRMWARE_SIZE (24 * 1024) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
45 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
46 |
/* The maximum size of a write for EP0 and EP1 */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
47 |
#define CY_AS_EP0_MAX_WRITE_SIZE (128) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
48 |
#define CY_AS_EP1_MAX_WRITE_SIZE (64) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
49 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
50 |
/* The bitfields for the device state value */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
51 |
#define CY_AS_DEVICE_STATE_PIN_STANDBY (0x00000001) /* The device is in StandBy mode */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
52 |
#define CY_AS_DEVICE_STATE_CONFIGURED (0x00000002) /* The device has been configured */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
53 |
#define CY_AS_DEVICE_STATE_FIRMWARE_LOADED (0x00000004) /* The firmware has been loaded into the device */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
54 |
#define CY_AS_DEVICE_STATE_LOWLEVEL_MODULE (0x00000008) /* The interrupt module has been initialized */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
55 |
#define CY_AS_DEVICE_STATE_DMA_MODULE (0x00000010) /* The DMA module has been initialized */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
56 |
#define CY_AS_DEVICE_STATE_INTR_MODULE (0x00000020) /* The interrupt module has been initialized */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
57 |
#define CY_AS_DEVICE_STATE_STORAGE_MODULE (0x00000040) /* The storage module has been initialized */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
58 |
#define CY_AS_DEVICE_STATE_USB_MODULE (0x00000080) /* The USB module has been initialized */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
59 |
#define CY_AS_DEVICE_STATE_STORAGE_SCSIMSG (0x00000100) /* If set, the API wants SCSI messages */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
60 |
#define CY_AS_DEVICE_STATE_STORAGE_ASYNC_PENDING (0x00000200) /* If set, an ASYNC storage operation is pending */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
61 |
#define CY_AS_DEVICE_STATE_USB_CONNECTED (0x00000400) /* If set, the USB port is connected */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
62 |
#define CY_AS_DEVICE_STATE_USB_HIGHSPEED (0x00000800) /* If set and USB is connected, it is high speed */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
63 |
#define CY_AS_DEVICE_STATE_IN_CALLBACK (0x00001000) /* If set, we are in a callback */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
64 |
#define CY_AS_DEVICE_STATE_IN_SETUP_PACKET (0x00004000) /* If set, we are processing a setup packet */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
65 |
#define CY_AS_DEVICE_STATE_REGISTER_STANDBY (0x00008000) /* The device was placed in standby via register */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
66 |
#define CY_AS_DEVICE_STATE_CRYSTAL (0x00010000) /* If set, the device is using a crystal */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
67 |
#define CY_AS_DEVICE_STATE_WAKING (0x00020000) /* If set, wakeup has been called */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
68 |
#define CY_AS_DEVICE_STATE_EP0_STALLED (0x00040000) /* If set, EP0 has been stalled. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
69 |
#define CY_AS_DEVICE_STATE_SUSPEND (0x00080000) /* If set, device is in suspend mode. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
70 |
#define CY_AS_DEVICE_STATE_RESETP (0x00100000) /* If set, device is a reset is pending. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
71 |
#define CY_AS_DEVICE_STATE_STANDP (0x00200000) /* If set, device is a standby is pending. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
72 |
#define CY_AS_DEVICE_STATE_SSSP (0x00400000) /* If set, device has a storage start or stop pending. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
73 |
#define CY_AS_DEVICE_STATE_USSP (0x00800000) /* If set, device has a usb start or stop pending. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
74 |
#define CY_AS_DEVICE_STATE_MSSP (0x01000000) /* If set, device has a mtp start or stop pending. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
75 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
76 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
77 |
/* The bitfields for the endpoint state value */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
78 |
#define CY_AS_DMA_ENDPOINT_STATE_ENABLED (0x0001) /* DMA requests are accepted into the queue */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
79 |
#define CY_AS_DMA_ENDPOINT_STATE_SLEEPING (0x0002) /* The endpoint has a sleeping client, waiting on a queue drain */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
80 |
#define CY_AS_DMA_ENDPOINT_STATE_DMA_RUNNING (0x0004) /* The DMA backend to hardware is running */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
81 |
#define CY_AS_DMA_ENDPOINT_STATE_IN_TRANSIT (0x0008) /* There is an outstanding DMA entry deployed to the HAL */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
82 |
#define CY_AS_DMA_ENDPOINT_STATE_DIRECTION (0x0010) /* 0 = OUT (West Bridge -> P Port), 1 = IN (P Port -> West Bridge) */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
83 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
84 |
/* The state values for the request list */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
85 |
#define CY_AS_REQUEST_LIST_STATE_MASK (0x0f) /* Mask for getting the state information */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
86 |
#define CY_AS_REQUEST_LIST_STATE_QUEUED (0x00) /* The request is queued, nothing further */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
87 |
#define CY_AS_REQUEST_LIST_STATE_WAITING (0x01) /* The request is sent, waiting for response */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
88 |
#define CY_AS_REQUEST_LIST_STATE_RECEIVED (0x02) /* The response has been received, processing reponse */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
89 |
#define CY_AS_REQUEST_LIST_STATE_CANCELING (0x03) /* The request/response is being canceled */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
90 |
#define CY_AS_REQUEST_LIST_STATE_SYNC (0x80) /* The request is synchronous */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
91 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
92 |
/* The flag values for a LL RequestResponse */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
93 |
#define CY_AS_REQUEST_RESPONSE_DELAY_ACK (0x01) /* This request requires an ACK to be sent after it is completed */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
94 |
#define CY_AS_REQUEST_RESPONSE_EX (0x02) /* This request originated from a version V1.1 function call */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
95 |
#define CY_AS_REQUEST_RESPONSE_MS (0x04) /* This request originated from a version V1.2 function call */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
96 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
97 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
98 |
#define CY_AS_DEVICE_HANDLE_SIGNATURE (0x01211219) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
99 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
100 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
101 |
* This macro returns the endpoint pointer given the device pointer and an endpoint number |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
102 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
103 |
#define CY_AS_NUM_EP(dev_p, num) ((dev_p)->endp[(num)]) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
104 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
105 |
/***************************************************************************** |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
106 |
* West Bridge Data Structures |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
107 |
****************************************************************************/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
108 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
109 |
typedef struct CyAsDevice CyAsDevice ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
110 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
111 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
112 |
This type defines a callback function that will be called on completion of a DMA operation. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
113 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
114 |
Description |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
115 |
This function definition is for a function that is called when the DMA operation is complete. This |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
116 |
function is called with the endpoint number, operation type, buffer pointer and size. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
117 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
118 |
See Also |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
119 |
* CyAsDmaOper |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
120 |
* CyAsDmaQueueWrite |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
121 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
122 |
typedef void (*CyAsDmaCallback)( |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
123 |
CyAsDevice * dev_p, /* The device that completed DMA */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
124 |
CyAsEndPointNumber_t ep, /* The endpoint that completed DMA */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
125 |
void * mem_p, /* The pointer to the buffer that completed DMA */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
126 |
uint32_t size, /* The amount of data transferred */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
127 |
CyAsReturnStatus_t error /* The error code for this DMA xfer */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
128 |
) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
129 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
130 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
131 |
This structure defines a DMA request that is queued |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
132 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
133 |
Description |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
134 |
This structure contains the information about a DMA request that is queued and is to |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
135 |
be sent when possible. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
136 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
137 |
typedef struct CyAsDmaQueueEntry |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
138 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
139 |
void * buf_p ; /* Pointer to memory buffer for this request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
140 |
uint32_t size ; /* Size of the memory buffer for DMA operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
141 |
uint32_t offset ; /* Offset into memory buffer for next DMA operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
142 |
CyBool packet ; /* If TRUE and IN request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
143 |
CyBool readreq ; /* If TRUE, this is a read request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
144 |
CyAsDmaCallback cb ; /* Callback function for when DMA is complete */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
145 |
struct CyAsDmaQueueEntry * next_p ; /* Pointer to next entry in queue */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
146 |
} CyAsDmaQueueEntry ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
147 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
148 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
149 |
This structure defines the endpoint data for a given |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
150 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
151 |
Description |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
152 |
This structure defines all of the information required to manage DMA for a given |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
153 |
endpoint. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
154 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
155 |
typedef struct CyAsDmaEndPoint |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
156 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
157 |
CyAsEndPointNumber_t ep ; /* The endpoint number */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
158 |
uint8_t state ; /* The state of this endpoint */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
159 |
uint16_t maxhwdata ; /* The maximum amount of data accepted in a packet by the hw */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
160 |
uint32_t maxhaldata ; /* The maximum amount of data accepted by the HAL layer */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
161 |
CyAsDmaQueueEntry * queue_p ; /* The queue for DMA operations */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
162 |
CyAsDmaQueueEntry * last_p ; /* The last entry in the DMA queue */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
163 |
CyAsHalSleepChannel channel ; /* This sleep channel is used to wait while the DMA queue drains for a given endpoint */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
164 |
} CyAsDmaEndPoint ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
165 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
166 |
#define CyAsEndPointNumberIsUsb(n) ((n) != 2 && (n) != 4 && (n) != 6 && (n) != 8) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
167 |
#define CyAsEndPointNumberIsStorage(n) ((n) == 2 || (n) == 4 || (n) == 6 || (n) == 8) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
168 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
169 |
#define CyAsDmaEndPointIsEnabled(ep) ((ep)->state & CY_AS_DMA_ENDPOINT_STATE_ENABLED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
170 |
#define CyAsDmaEndPointEnable(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_ENABLED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
171 |
#define CyAsDmaEndPointDisable(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_ENABLED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
172 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
173 |
#define CyAsDmaEndPointIsSleeping(ep) ((ep)->state & CY_AS_DMA_ENDPOINT_STATE_SLEEPING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
174 |
#define CyAsDmaEndPointSetSleepState(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_SLEEPING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
175 |
#define CyAsDmaEndPointSetWakeState(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_SLEEPING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
176 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
177 |
#define CyAsDmaEndPointIsRunning(ep) ((ep)->state & CY_AS_DMA_ENDPOINT_STATE_DMA_RUNNING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
178 |
#define CyAsDmaEndPointSetRunning(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_DMA_RUNNING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
179 |
#define CyAsDmaEndPointSetStopped(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_DMA_RUNNING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
180 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
181 |
#define CyAsDmaEndPointInTransit(ep) ((ep)->state & CY_AS_DMA_ENDPOINT_STATE_IN_TRANSIT) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
182 |
#define CyAsDmaEndPointSetInTransit(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_IN_TRANSIT) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
183 |
#define CyAsDmaEndPointClearInTransit(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_IN_TRANSIT) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
184 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
185 |
#define CyAsDmaEndPointIsDirectionIn(ep) (((ep)->state & CY_AS_DMA_ENDPOINT_STATE_DIRECTION) == CY_AS_DMA_ENDPOINT_STATE_DIRECTION) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
186 |
#define CyAsDmaEndPointIsDirectionOut(ep) (((ep)->state & CY_AS_DMA_ENDPOINT_STATE_DIRECTION) == 0) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
187 |
#define CyAsDmaEndPointSetDirectionIn(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_DIRECTION) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
188 |
#define CyAsDmaEndPointSetDirectionOut(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_DIRECTION) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
189 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
190 |
#define CyAsDmaEndPointIsUsb(p) CyAsEndPointNumberIsUsb((p)->ep) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
191 |
#define CyAsDmaEndPointIsStorage(p) CyAsEndPointNumberIsStorage((p)->ep) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
192 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
193 |
typedef struct CyAsLLRequestResponse |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
194 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
195 |
uint16_t box0 ; /* The mbox[0] contents - see low level comm section of API doc */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
196 |
uint16_t stored ; /* The amount of data stored in this request/response in bytes */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
197 |
uint16_t length ; /* Length of this request in words */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
198 |
uint16_t flags ; /* Additional status information about the request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
199 |
uint16_t data[1] ; /* Note: This is over indexed and contains the request/response data */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
200 |
} CyAsLLRequestResponse ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
201 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
202 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
203 |
* The callback function for responses |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
204 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
205 |
typedef void (*CyAsResponseCallback)( |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
206 |
CyAsDevice * dev_p, /* The device that had the response */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
207 |
uint8_t context, /* The context receiving a response */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
208 |
CyAsLLRequestResponse * rqt, /* The request data */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
209 |
CyAsLLRequestResponse * resp, /* The response data */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
210 |
CyAsReturnStatus_t status /* The status of the request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
211 |
) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
212 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
213 |
typedef struct CyAsLLRequestListNode |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
214 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
215 |
CyAsLLRequestResponse * rqt ; /* The request to send */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
216 |
CyAsLLRequestResponse * resp ; /* The associated response for the request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
217 |
uint16_t length ; /* Length of the response */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
218 |
CyAsResponseCallback callback ; /* The callback to call when done */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
219 |
uint8_t state ; /* The state of the request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
220 |
struct CyAsLLRequestListNode * next ; /* The next request in the list */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
221 |
} CyAsLLRequestListNode ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
222 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
223 |
#define CyAsRequestGetNodeState(node_p) ((node_p)->state & CY_AS_REQUEST_LIST_STATE_MASK) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
224 |
#define CyAsRequestSetNodeState(node_p, st) ((node_p)->state = ((node_p)->state & ~CY_AS_REQUEST_LIST_STATE_MASK) | (st)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
225 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
226 |
#define CyAsRequestNodeIsSync(node_p) ((node_p)->state & CY_AS_REQUEST_LIST_STATE_SYNC) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
227 |
#define CyAsRequestNodeSetSync(node_p) ((node_p)->state |= CY_AS_REQUEST_LIST_STATE_SYNC) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
228 |
#define CyAsRequestNodeClearSync(node_p) ((node_p)->state &= ~CY_AS_REQUEST_LIST_STATE_SYNC) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
229 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
230 |
#ifndef __doxygen__ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
231 |
typedef enum CyAsCBNodeType |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
232 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
233 |
CYAS_INVALID, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
234 |
CYAS_USB_FUNC_CB, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
235 |
CYAS_USB_IO_CB, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
236 |
CYAS_STORAGE_IO_CB, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
237 |
CYAS_FUNC_CB |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
238 |
} CyAsCBNodeType ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
239 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
240 |
typedef struct CyAsFuncCBNode |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
241 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
242 |
CyAsCBNodeType nodeType ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
243 |
CyAsFunctionCallback cb_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
244 |
uint32_t client_data ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
245 |
/*CyAsFunctCBType dataType ; nxz */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
246 |
uint32_t dataType ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
247 |
void* data ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
248 |
struct CyAsFuncCBNode * next_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
249 |
} CyAsFuncCBNode; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
250 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
251 |
extern CyAsFuncCBNode* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
252 |
CyAsCreateFuncCBNodeData(CyAsFunctionCallback cb, uint32_t client, CyAsFunctCBType type, void* data) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
253 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
254 |
extern CyAsFuncCBNode* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
255 |
CyAsCreateFuncCBNode(CyAsFunctionCallback cb, uint32_t client) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
256 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
257 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
258 |
CyAsDestroyFuncCBNode(CyAsFuncCBNode* node) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
259 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
260 |
typedef struct CyAsMTPFuncCBNode |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
261 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
262 |
CyAsCBNodeType type ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
263 |
CyAsMTPFunctionCallback cb_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
264 |
uint32_t client_data; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
265 |
struct CyAsMTPFuncCBNode * next_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
266 |
} CyAsMTPFuncCBNode; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
267 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
268 |
extern CyAsMTPFuncCBNode* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
269 |
CyAsCreateMTPFuncCBNode(CyAsMTPFunctionCallback cb, uint32_t client) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
270 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
271 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
272 |
CyAsDestroyMTPFuncCBNode(CyAsMTPFuncCBNode* node) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
273 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
274 |
typedef struct CyAsUsbFuncCBNode |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
275 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
276 |
CyAsCBNodeType type ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
277 |
CyAsUsbFunctionCallback cb_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
278 |
uint32_t client_data; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
279 |
struct CyAsUsbFuncCBNode * next_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
280 |
} CyAsUsbFuncCBNode; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
281 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
282 |
extern CyAsUsbFuncCBNode* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
283 |
CyAsCreateUsbFuncCBNode(CyAsUsbFunctionCallback cb, uint32_t client) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
284 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
285 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
286 |
CyAsDestroyUsbFuncCBNode(CyAsUsbFuncCBNode* node) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
287 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
288 |
typedef struct CyAsUsbIoCBNode |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
289 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
290 |
CyAsCBNodeType type ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
291 |
CyAsUsbIoCallback cb_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
292 |
struct CyAsUsbIoCBNode * next_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
293 |
} CyAsUsbIoCBNode; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
294 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
295 |
extern CyAsUsbIoCBNode* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
296 |
CyAsCreateUsbIoCBNode(CyAsUsbIoCallback cb) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
297 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
298 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
299 |
CyAsDestroyUsbIoCBNode(CyAsUsbIoCBNode* node) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
300 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
301 |
typedef struct CyAsStorageIoCBNode |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
302 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
303 |
CyAsCBNodeType type ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
304 |
CyAsStorageCallback cb_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
305 |
CyAsMediaType media ; /* The media for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
306 |
uint32_t device_index ; /* The device index for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
307 |
uint32_t unit ; /* The unit index for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
308 |
uint32_t block_addr ; /* The block address for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
309 |
CyAsOperType oper ; /* The operation for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
310 |
CyAsLLRequestResponse* req_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
311 |
CyAsLLRequestResponse* reply_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
312 |
struct CyAsStorageIoCBNode* next_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
313 |
} CyAsStorageIoCBNode; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
314 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
315 |
extern CyAsStorageIoCBNode* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
316 |
CyAsCreateStorageIoCBNode(CyAsStorageCallback cb, CyAsMediaType media, uint32_t device_index, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
317 |
uint32_t unit, uint32_t block_addr, CyAsOperType oper, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
318 |
CyAsLLRequestResponse* req_p, CyAsLLRequestResponse* reply_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
319 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
320 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
321 |
CyAsDestroyStorageIoCBNode(CyAsStorageIoCBNode* node) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
322 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
323 |
typedef struct CyAsCBQueue |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
324 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
325 |
void * head_p; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
326 |
void * tail_p; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
327 |
uint32_t count ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
328 |
CyAsCBNodeType type ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
329 |
} CyAsCBQueue ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
330 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
331 |
extern CyAsCBQueue * |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
332 |
CyAsCreateCBQueue(CyAsCBNodeType type) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
333 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
334 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
335 |
CyAsDestroyCBQueue(CyAsCBQueue* queue) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
336 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
337 |
/* Allocates a new CyAsCBNode */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
338 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
339 |
CyAsInsertCBNode(CyAsCBQueue * queue_p, void* cbnode) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
340 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
341 |
/* Removes the first CyAsCBNode from the queue and frees it */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
342 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
343 |
CyAsRemoveCBNode(CyAsCBQueue * queue_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
344 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
345 |
/* Remove the last CyAsCBNode from the queue and frees it */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
346 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
347 |
CyAsRemoveCBTailNode(CyAsCBQueue *queue_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
348 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
349 |
/* Removes and frees all pending callbacks */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
350 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
351 |
CyAsClearCBQueue(CyAsCBQueue * queue_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
352 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
353 |
extern CyAsReturnStatus_t |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
354 |
CyAsMiscSendRequest(CyAsDevice* dev_p, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
355 |
CyAsFunctionCallback cb, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
356 |
uint32_t client, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
357 |
CyAsFunctCBType type, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
358 |
void* data, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
359 |
CyAsCBQueue* queue, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
360 |
uint16_t req_type, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
361 |
CyAsLLRequestResponse *req_p, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
362 |
CyAsLLRequestResponse *reply_p, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
363 |
CyAsResponseCallback rcb) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
364 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
365 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
366 |
CyAsMiscCancelExRequests(CyAsDevice* dev_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
367 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
368 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
369 |
Free all memory allocated by and zero all structures initialized |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
370 |
by CyAsUsbStart. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
371 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
372 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
373 |
CyAsUsbCleanup ( |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
374 |
CyAsDevice *dev_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
375 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
376 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
377 |
Free all memory allocated and zero all structures initialized |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
378 |
by CyAsStorageStart. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
379 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
380 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
381 |
CyAsStorageCleanup ( |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
382 |
CyAsDevice *dev_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
383 |
#endif |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
384 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
385 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
386 |
This structure defines the data structure to support a given command context |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
387 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
388 |
Description |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
389 |
All commands send to the West Bridge device via the mailbox registers are sent via a context. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
390 |
Each context is independent and there can be a parallel stream of requests and responses on |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
391 |
each context. This structure is used to manage a single context. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
392 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
393 |
typedef struct CyAsContext |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
394 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
395 |
uint8_t number ; /* The context number for this context */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
396 |
CyAsHalSleepChannel channel ; /* This sleep channel is used to sleep while waiting on a response from the |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
397 |
West Bridge device for a request. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
398 |
CyAsLLRequestResponse * req_p ; /* The buffer for received requests */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
399 |
uint16_t request_length ; /* The length of the request being received */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
400 |
CyAsResponseCallback request_callback ; /* The callback for the next request received */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
401 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
402 |
CyAsLLRequestListNode * request_queue_p ; /* A list of low level requests to go to the firmware */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
403 |
CyAsLLRequestListNode * last_node_p ; /* The list node in the request queue */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
404 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
405 |
uint16_t queue_index ; /* Index upto which data is stored. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
406 |
uint16_t rqt_index ; /* Index to the next request in the queue. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
407 |
uint16_t data_queue[128] ; /* Queue of data stored */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
408 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
409 |
} CyAsContext ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
410 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
411 |
#define CyAsContextIsWaiting(ctxt) ((ctxt)->state & CY_AS_CTXT_STATE_WAITING_RESPONSE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
412 |
#define CyAsContextSetWaiting(ctxt) ((ctxt)->state |= CY_AS_CTXT_STATE_WAITING_RESPONSE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
413 |
#define CyAsContextClearWaiting(ctxt) ((ctxt)->state &= ~CY_AS_CTXT_STATE_WAITING_RESPONSE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
414 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
415 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
416 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
417 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
418 |
This data structure stores SDIO function parameters for a SDIO card |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
419 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
420 |
Description |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
421 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
422 |
typedef struct CyAsSDIODevice |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
423 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
424 |
uint8_t function_init_map; /* Keeps track of IO functions initialized*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
425 |
uint8_t function_suspended_map; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
426 |
CyAsSDIOCard card; /* Function 0 (Card Common) properties*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
427 |
CyAsSDIOFunc function[7]; /* Function 1-7 (Mapped to array element 0-6) properties.*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
428 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
429 |
}CyAsSDIODevice; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
430 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
431 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
432 |
Macros to access the SDIO card properties |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
433 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
434 |
//GetFunction Code |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
435 |
#define CyAsSdioGetFunctionCode(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].function_code |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
436 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
437 |
//Get Function Extended Code |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
438 |
#define CyAsSdioGetFunctionExtCode(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].extended_func_code |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
439 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
440 |
//Get Function Product Serial number |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
441 |
#define CyAsSdioGetFunctionPSN(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].card_psn |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
442 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
443 |
//Get Function Block Size |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
444 |
#define CyAsSdioGetFunctionBlocksize(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].blocksize |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
445 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
446 |
//Get Function Max Block Size |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
447 |
#define CyAsSdioGetFunctionMaxBlocksize(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].maxblocksize |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
448 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
449 |
//Get Function CSA support |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
450 |
#define CyAsSdioGetFunctionCsaSupport(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].csa_bits |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
451 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
452 |
//Get Function Wakeup Support |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
453 |
#define CyAsSdioGetFunctionWakeupSupport(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1]. wakeup_support |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
454 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
455 |
#define CyAsSdioSetFunctionBlockSize(handle,bus,i,blocksize) (((CyAsDevice *)handle)->sdiocard[bus].function[i-1].blocksize = blocksize) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
456 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
457 |
//Get Number of funtions on card |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
458 |
#define CyAsSdioGetCardNumFunctions(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.num_functions |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
459 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
460 |
//Check if memory is present on the card |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
461 |
#define CyAsSdioGetCardMemPresent(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.memory_present |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
462 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
463 |
//Get Card manufaturer ID |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
464 |
#define CyAsSdioGetCardManfId(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.manufacturer_Id |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
465 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
466 |
//Get Card manufacturer Information |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
467 |
#define CyAsSdioGetCardManfInfo(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.manufacturer_info |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
468 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
469 |
//Get Card Block Size |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
470 |
#define CyAsSdioGetCardBlocksize(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.blocksize |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
471 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
472 |
//Get Card max Block Size |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
473 |
#define CyAsSdioGetCardMaxBlocksize(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.maxblocksize |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
474 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
475 |
//Get SDIO version supported by card |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
476 |
#define CyAsSdioGetCardSDIOVersion(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.sdio_version |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
477 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
478 |
//Get Card capabillity register |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
479 |
#define CyAsSdioGetCardCapability(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.card_capability |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
480 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
481 |
//Get function initialization map |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
482 |
#define CyAsSdioGetFunctionInitMap(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].function_init_map |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
483 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
484 |
//Check if function i has been initialized |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
485 |
#define CyAsSdioCheckFunctionInitialized(handle,bus,i) (((CyAsSdioGetFunctionInitMap(handle,bus))& (0x01<<i))?1:0) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
486 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
487 |
//Set the Card functio 0 block size |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
488 |
#define CyAsSdioSetCardBlockSize(handle,bus,blocksize) (((CyAsDevice *)handle)->sdiocard[bus].card.blocksize = blocksize) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
489 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
490 |
//Check if the Card supports Bus suspend. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
491 |
#define CyAsSdioCheckSupportBusSuspend(handle,bus) ((CyAsSdioGetCardCapability(handle,bus) & CY_SDIO_SBS)?1:0) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
492 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
493 |
//Check if a fuction is in suspended state |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
494 |
#define CyAsSdioCheckFunctionSuspended(handle,bus,i) ((((CyAsDevice *)handle)->sdiocard[bus].function_suspended_map & (0x01<<i))?1:0) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
495 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
496 |
//Set a function state to suspended |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
497 |
#define CyAsSdioSetFunctionSuspended(handle,bus,i) ((((CyAsDevice *)handle)->sdiocard[bus].function_suspended_map) |= (0x01<<i)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
498 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
499 |
//Clear a function suspended state |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
500 |
#define CyAsSdioClearFunctionSuspended(handle,bus,i) ((((CyAsDevice *)handle)->sdiocard[bus].function_suspended_map) &= (~(0x01<<i))) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
501 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
502 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
503 |
This data structure represents a single device. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
504 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
505 |
Description |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
506 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
507 |
struct CyAsDevice |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
508 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
509 |
/* General stuff */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
510 |
uint32_t sig ; /* A signature to insure we have a valid handle */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
511 |
uint16_t silicon_id ; /* The ID of the silicon */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
512 |
struct CyAsDevice * next_p ; /* Pointer to the next device */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
513 |
CyAsHalDeviceTag tag ; /* This is the client specific tag for this device */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
514 |
uint32_t state ; /* This contains various state information about the device */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
515 |
CyBool use_int_drq ; /* Flag indicating whether INT# pin is used for DRQ */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
516 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
517 |
/* DMA related */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
518 |
CyAsDmaEndPoint * endp[16] ; /* The endpoint pointers associated with this device */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
519 |
CyAsDmaQueueEntry * dma_freelist_p ; /* List of queue entries that can be used for xfers */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
520 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
521 |
/* Low level comm related */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
522 |
CyAsContext * context[CY_RQT_CONTEXT_COUNT] ; /* The contexts available in this device */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
523 |
CyAsReturnStatus_t ll_error ; /* The low level error returned from sending an async request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
524 |
CyBool ll_sending_rqt ; /* A request is currently being sent to West Bridge. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
525 |
CyBool ll_abort_curr_rqt ; /* The current mailbox request should be aborted. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
526 |
CyBool ll_queued_data ; /* Indicates that the LL layer has queued mailbox data. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
527 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
528 |
/* MISC API related */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
529 |
CyAsMiscEventCallback misc_event_cb ; /* Misc callback */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
530 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
531 |
/* Storage Related */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
532 |
uint32_t storage_count ; /* The reference count for the Storage API */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
533 |
CyAsStorageEventCallback_dep storage_event_cb ; /* Callback for storage events */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
534 |
CyAsStorageEventCallback storage_event_cb_ms ; /* V1.2+ callback for storage events */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
535 |
CyAsReturnStatus_t storage_error ; /* The error for a sleeping storage operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
536 |
CyBool storage_wait ; /* Flag indicating that the storage stack is waiting for an operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
537 |
CyAsLLRequestResponse * storage_rw_req_p ; /* Request used for storage read/writes. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
538 |
CyAsLLRequestResponse * storage_rw_resp_p ; /* Response used for storage read/writes. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
539 |
CyAsStorageCallback_dep storage_cb ; /* The storage callback */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
540 |
CyAsStorageCallback storage_cb_ms ; /* The V1.2+ storage callback */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
541 |
CyAsBusNumber_t storage_bus_index ; /* The bus index for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
542 |
uint32_t storage_device_index ; /* The device index for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
543 |
uint32_t storage_unit ; /* The unit index for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
544 |
uint32_t storage_block_addr ; /* The block address for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
545 |
CyAsOperType storage_oper ; /* The operation for the currently outstanding async storage request */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
546 |
CyAsEndPointNumber_t storage_read_endpoint ; /* The endpoint used to read Storage data */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
547 |
CyAsEndPointNumber_t storage_write_endpoint ; /* The endpoint used to write endpoint data */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
548 |
CyAsDeviceDesc storage_device_info[CY_AS_MAX_BUSES][CY_AS_MAX_STORAGE_DEVICES] ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
549 |
/* The information on each device on each bus */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
550 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
551 |
/* USB Related */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
552 |
uint16_t epasync ; /* This conatins the endpoint async state */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
553 |
uint32_t usb_count ; /* The reference count for the USB API */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
554 |
uint8_t usb_phy_config ; /* The physical endpoint configuration */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
555 |
CyAsCBQueue * usb_func_cbs ; /* The callbacks for async func calls */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
556 |
CyAsUsbEndPointConfig usb_config[16] ; /* Endpoint configuration information */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
557 |
CyAsUsbEventCallback_dep usb_event_cb ; /* The USB callback */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
558 |
CyAsUsbEventCallback usb_event_cb_ms ; /* The V1.2+ USB callback */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
559 |
CyAsReturnStatus_t usb_error ; /* The error for a sleeping usb operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
560 |
CyAsUsbIoCallback usb_cb[16] ; /* The USB callback for a pending storage operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
561 |
void * usb_pending_buffer ; /* The buffer pending from a USB operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
562 |
uint32_t usb_pending_size ; /* The size of the buffer pending from a USB operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
563 |
CyBool usb_spacket[16] ; /* If true, send a short packet */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
564 |
uint32_t usb_actual_cnt ; /* The amount of data actually xferred */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
565 |
uint8_t usb_ep1cfg[2] ; /* EP1OUT and EP1IN config register contents */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
566 |
uint16_t usb_lepcfg[10] ; /* LEP config register contents */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
567 |
uint16_t usb_pepcfg[4] ; /* PEP config register contents */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
568 |
uint8_t * usb_ep_data ; /* Buffer for EP0 and EP1 data sent via mailboxes */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
569 |
uint32_t usb_delay_ack_count ; /* Used to track how many ack requests are pending */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
570 |
uint32_t usb_max_tx_size ; /* Maximum transfer size for USB endpoints. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
571 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
572 |
CyAsLLRequestResponse * usb_ep0_dma_req ; /* Request for sending EP0 data to West Bridge */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
573 |
CyAsLLRequestResponse * usb_ep0_dma_resp ; /* Response for EP0 data sent to West Bridge */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
574 |
CyAsLLRequestResponse * usb_ep1_dma_req ; /* Request for sending EP1 data to West Bridge */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
575 |
CyAsLLRequestResponse * usb_ep1_dma_resp ; /* Response for EP1 data sent to West Bridge */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
576 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
577 |
CyAsLLRequestResponse * usb_ep0_dma_req_save ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
578 |
CyAsLLRequestResponse * usb_ep0_dma_resp_save ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
579 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
580 |
/* MTP Related */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
581 |
uint32_t mtp_count ; /* The reference count for the MTP API */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
582 |
CyAsMTPEventCallback mtp_event_cb ; /* The MTP event callback supplied by the client */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
583 |
CyAsMTPBlockTable* mtp_blk_tbl ; /* The current block table to be transfered */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
584 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
585 |
CyAsCBQueue * func_cbs_mtp ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
586 |
CyAsCBQueue * func_cbs_usb ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
587 |
CyAsCBQueue * func_cbs_stor ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
588 |
CyAsCBQueue * func_cbs_misc ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
589 |
CyAsCBQueue * func_cbs_res ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
590 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
591 |
CyAsUsbEvent usb_last_event ; /* The last USB event that was received */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
592 |
uint8_t media_supported[CY_AS_MAX_BUSES] ; /* Types of storage media supported by the firmware */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
593 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
594 |
CyAsSDIODevice sdiocard[CY_AS_MAX_BUSES]; /* SDIO card parameters*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
595 |
CyBool is_mtp_firmware ; /* if true, MTP enabled Firmware. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
596 |
CyBool is_mtp_data_pending ; /* if true, mailbox message has come already */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
597 |
CyBool mtp_turbo_active ; /* True between the time an Init was called and the complete event is generated */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
598 |
uint16_t mtp_data_len ; /* mbox reported EP 2 data len */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
599 |
CyAsReturnStatus_t mtp_error ; /* The error for mtp EP4 write operation */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
600 |
CyAsFunctionCallback mtp_cb ; /* mtp send/get operation callback */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
601 |
uint32_t mtp_client ; /* mtp send/get operation client id */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
602 |
CyAsFunctCBType mtp_op ; /* mtp operation type. To be used in callback */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
603 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
604 |
CyBool is_storage_only_mode ; /* Firmware is running in P2S only mode. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
605 |
uint32_t stby_int_mask ; /* Interrupt mask value during device standby. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
606 |
} ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
607 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
608 |
#define CyAsDeviceIsConfigured(dp) ((dp)->state & CY_AS_DEVICE_STATE_CONFIGURED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
609 |
#define CyAsDeviceSetConfigured(dp) ((dp)->state |= CY_AS_DEVICE_STATE_CONFIGURED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
610 |
#define CyAsDeviceSetUnconfigured(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_CONFIGURED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
611 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
612 |
#define CyAsDeviceIsDmaRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_DMA_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
613 |
#define CyAsDeviceSetDmaRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_DMA_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
614 |
#define CyAsDeviceSetDmaStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_DMA_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
615 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
616 |
#define CyAsDeviceIsLowLevelRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_LOWLEVEL_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
617 |
#define CyAsDeviceSetLowLevelRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_LOWLEVEL_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
618 |
#define CyAsDeviceSetLowLevelStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_LOWLEVEL_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
619 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
620 |
#define CyAsDeviceIsIntrRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_INTR_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
621 |
#define CyAsDeviceSetIntrRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_INTR_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
622 |
#define CyAsDeviceSetIntrStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_INTR_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
623 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
624 |
#define CyAsDeviceIsFirmwareLoaded(dp) ((dp)->state & CY_AS_DEVICE_STATE_FIRMWARE_LOADED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
625 |
#define CyAsDeviceSetFirmwareLoaded(dp) ((dp)->state |= CY_AS_DEVICE_STATE_FIRMWARE_LOADED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
626 |
#define CyAsDeviceSetFirmwareNotLoaded(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_FIRMWARE_LOADED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
627 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
628 |
#define CyAsDeviceIsStorageRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_STORAGE_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
629 |
#define CyAsDeviceSetStorageRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_STORAGE_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
630 |
#define CyAsDeviceSetStorageStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_STORAGE_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
631 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
632 |
#define CyAsDeviceIsUsbRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_USB_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
633 |
#define CyAsDeviceSetUsbRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_USB_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
634 |
#define CyAsDeviceSetUsbStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_USB_MODULE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
635 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
636 |
#define CyAsDeviceWantsScsiMessages(dp) (((dp)->state & CY_AS_DEVICE_STATE_STORAGE_SCSIMSG) ? CyTrue : CyFalse) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
637 |
#define CyAsDeviceSetScsiMessages(dp) ((dp)->state |= CY_AS_DEVICE_STATE_STORAGE_SCSIMSG) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
638 |
#define CyAsDeviceClearScsiMessages(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_STORAGE_SCSIMSG) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
639 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
640 |
#define CyAsDeviceIsStorageAsyncPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_STORAGE_ASYNC_PENDING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
641 |
#define CyAsDeviceSetStorageAsyncPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_STORAGE_ASYNC_PENDING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
642 |
#define CyAsDeviceClearStorageAsyncPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_STORAGE_ASYNC_PENDING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
643 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
644 |
#define CyAsDeviceIsUsbConnected(dp) ((dp)->state & CY_AS_DEVICE_STATE_USB_CONNECTED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
645 |
#define CyAsDeviceSetUsbConnected(dp) ((dp)->state |= CY_AS_DEVICE_STATE_USB_CONNECTED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
646 |
#define CyAsDeviceClearUsbConnected(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_USB_CONNECTED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
647 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
648 |
#define CyAsDeviceIsUsbHighSpeed(dp) ((dp)->state & CY_AS_DEVICE_STATE_USB_HIGHSPEED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
649 |
#define CyAsDeviceSetUsbHighSpeed(dp) ((dp)->state |= CY_AS_DEVICE_STATE_USB_HIGHSPEED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
650 |
#define CyAsDeviceClearUsbHighSpeed(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_USB_HIGHSPEED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
651 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
652 |
#define CyAsDeviceIsInCallback(dp) ((dp)->state & CY_AS_DEVICE_STATE_IN_CALLBACK) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
653 |
#define CyAsDeviceSetInCallback(dp) ((dp)->state |= CY_AS_DEVICE_STATE_IN_CALLBACK) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
654 |
#define CyAsDeviceClearInCallback(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_IN_CALLBACK) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
655 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
656 |
#define CyAsDeviceIsSetupIOPerformed(dp) ((dp)->state & CY_AS_DEVICE_STATE_SETUP_IO_PERFORMED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
657 |
#define CyAsDeviceSetSetupIOPerformed(dp) ((dp)->state |= CY_AS_DEVICE_STATE_SETUP_IO_PERFORMED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
658 |
#define CyAsDeviceClearSetupIOPerformed(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_SETUP_IO_PERFORMED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
659 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
660 |
#define CyAsDeviceIsAckDelayed(dp) ((dp)->usb_delay_ack_count > 0) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
661 |
#define CyAsDeviceSetAckDelayed(dp) ((dp)->usb_delay_ack_count++) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
662 |
#define CyAsDeviceRemAckDelayed(dp) ((dp)->usb_delay_ack_count--) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
663 |
#define CyAsDeviceClearAckDelayed(dp) ((dp)->usb_delay_ack_count = 0) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
664 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
665 |
#define CyAsDeviceIsSetupPacket(dp) ((dp)->state & CY_AS_DEVICE_STATE_IN_SETUP_PACKET) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
666 |
#define CyAsDeviceSetSetupPacket(dp) ((dp)->state |= CY_AS_DEVICE_STATE_IN_SETUP_PACKET) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
667 |
#define CyAsDeviceClearSetupPacket(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_IN_SETUP_PACKET) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
668 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
669 |
#define CyAsDeviceIsEp0Stalled(dp) ((dp)->state & CY_AS_DEVICE_STATE_EP0_STALLED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
670 |
#define CyAsDeviceSetEp0Stalled(dp) ((dp)->state |= CY_AS_DEVICE_STATE_EP0_STALLED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
671 |
#define CyAsDeviceClearEp0Stalled(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_EP0_STALLED) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
672 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
673 |
#define CyAsDeviceIsRegisterStandby(dp) ((dp)->state & CY_AS_DEVICE_STATE_REGISTER_STANDBY) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
674 |
#define CyAsDeviceSetRegisterStandby(dp) ((dp)->state |= CY_AS_DEVICE_STATE_REGISTER_STANDBY) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
675 |
#define CyAsDeviceClearRegisterStandby(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_REGISTER_STANDBY) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
676 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
677 |
#define CyAsDeviceIsPinStandby(dp) ((dp)->state & CY_AS_DEVICE_STATE_PIN_STANDBY) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
678 |
#define CyAsDeviceSetPinStandby(dp) ((dp)->state |= CY_AS_DEVICE_STATE_PIN_STANDBY) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
679 |
#define CyAsDeviceClearPinStandby(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_PIN_STANDBY) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
680 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
681 |
#define CyAsDeviceIsCrystal(dp) ((dp)->state & CY_AS_DEVICE_STATE_CRYSTAL) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
682 |
#define CyAsDeviceIsExternalClock(dp) (!((dp)->state & CY_AS_DEVICE_STATE_CRYSTAL)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
683 |
#define CyAsDeviceSetCrystal(dp) ((dp)->state |= CY_AS_DEVICE_STATE_CRYSTAL) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
684 |
#define CyAsDeviceSetExternalClock(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_CRYSTAL) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
685 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
686 |
#define CyAsDeviceIsWaking(dp) ((dp)->state & CY_AS_DEVICE_STATE_WAKING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
687 |
#define CyAsDeviceSetWaking(dp) ((dp)->state |= CY_AS_DEVICE_STATE_WAKING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
688 |
#define CyAsDeviceClearWaking(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_WAKING) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
689 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
690 |
#define CyAsDeviceIsInSuspendMode(dp) ((dp)->state & CY_AS_DEVICE_STATE_SUSPEND) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
691 |
#define CyAsDeviceSetSuspendMode(dp) ((dp)->state |= CY_AS_DEVICE_STATE_SUSPEND) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
692 |
#define CyAsDeviceClearSuspendMode(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_SUSPEND) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
693 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
694 |
#define CyAsDeviceIsResetPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_RESETP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
695 |
#define CyAsDeviceSetResetPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_RESETP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
696 |
#define CyAsDeviceClearResetPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_RESETP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
697 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
698 |
#define CyAsDeviceIsStandbyPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_STANDP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
699 |
#define CyAsDeviceSetStandbyPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_STANDP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
700 |
#define CyAsDeviceClearStandbyPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_STANDP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
701 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
702 |
#define CyAsDeviceIsSSSPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_SSSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
703 |
#define CyAsDeviceSetSSSPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_SSSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
704 |
#define CyAsDeviceClearSSSPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_SSSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
705 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
706 |
#define CyAsDeviceIsUSSPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_USSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
707 |
#define CyAsDeviceSetUSSPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_USSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
708 |
#define CyAsDeviceClearUSSPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_USSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
709 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
710 |
#define CyAsDeviceIsMSSPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_MSSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
711 |
#define CyAsDeviceSetMSSPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_MSSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
712 |
#define CyAsDeviceClearMSSPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_MSSP) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
713 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
714 |
#define CyAsDeviceIsUsbAsyncPending(dp, ep) ((dp)->epasync & (1 << ep)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
715 |
#define CyAsDeviceSetUsbAsyncPending(dp, ep) ((dp)->epasync |= (1 << ep)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
716 |
#define CyAsDeviceClearUsbAsyncPending(dp, ep) ((dp)->epasync &= ~(1 << ep)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
717 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
718 |
#define CyAsDeviceIsNandStorageSupported(dp) ((dp)->media_supported[0] & 1) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
719 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
720 |
/* Macros to check the type of West Bridge device. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
721 |
#define CyAsDeviceIsAstoriaDev(dp) (((dp)->silicon_id == CY_AS_MEM_CM_WB_CFG_ID_HDID_ASTORIA_VALUE) || \ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
722 |
((dp)->silicon_id == CY_AS_MEM_CM_WB_CFG_ID_HDID_ASTORIA_FPGA_VALUE)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
723 |
#define CyAsDeviceIsAntiochDev(dp) ((dp)->silicon_id == CY_AS_MEM_CM_WB_CFG_ID_HDID_ANTIOCH_VALUE) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
724 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
725 |
#ifdef CY_AS_LOG_SUPPORT |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
726 |
extern void CyAsLogDebugMessage(int value, const char *msg) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
727 |
#else |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
728 |
#define CyAsLogDebugMessage(value, msg) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
729 |
#endif |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
730 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
731 |
/* Summary |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
732 |
This function finds the device object given the HAL tag |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
733 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
734 |
Description |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
735 |
The user associats a device TAG with each West Bridge device created. This tag is passed from the |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
736 |
API functions to and HAL functions that need to ID a specific West Bridge device. This tag is also |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
737 |
passed in from the user back into the API via interrupt functions. This function allows the API |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
738 |
to find the device structure associated with a given tag. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
739 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
740 |
Notes |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
741 |
This function does a simple linear search for the device based on the TAG. This function is |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
742 |
called each time an West Bridge interrupt handler is called. Therefore this works fine for a small |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
743 |
number of West Bridge devices (e.g. less than five). Anything more than this and this methodology |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
744 |
will need to be updated. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
745 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
746 |
Returns |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
747 |
Pointer to a CyAsDevice associated with the tag |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
748 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
749 |
extern CyAsDevice * |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
750 |
CyAsDeviceFindFromTag( |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
751 |
CyAsHalDeviceTag tag |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
752 |
) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
753 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
754 |
#include "cyas_cplus_end.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
755 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
756 |
#endif /* __INCLUDED_CYASDEVICE_H__ */ |