omap3530/beagle_drivers/wb/api/include/cyasusb.h
author arunabha
Wed, 03 Mar 2010 13:10:32 +0000
changeset 27 117faf51deac
permissions -rw-r--r--
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver this storage driver is for the West Bridge Astoria chipset. This device has a USB, SD and processor port for communication with a baseband processor. In our port, we connected this device DVK to the Beagleboard through the SPI interface of the OMAP3. After driver installation, the Symbian OS can see an external device or D: drive represented by the SD card. In this driver, the USB interface is not used directly, though this may be the subject of future contributions. The appropriate way to test the driver is to access the external volume and do file read and write to it, pretty much the same way you would test a thumb drive on your PC
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
     1
/* Cypress West Bridge API header file (cyasusb.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_CYASUSB_H_
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    23
#define _INCLUDED_CYASUSB_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 "cyasmisc.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    26
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    27
#include "cyas_cplus_start.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    28
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    29
/*@@Enumeration Model
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    30
  Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    31
  The USB enumeration process is the process of communicating to the USB host information
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    32
  about the capabilities of the connected device.  This process is completed by servicing       
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    33
  requests for various types of descriptors.  In the software APIs described below, this        
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    34
  process is controlled in one of two ways.
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
  Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    37
  There are advantages to either type of enumeration and this is why both models are supported.  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    38
  P Port processor based enumeraton gives the P port processor maximum control and flexibility 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    39
  for providing USB configuration information.  However, this does require (near) real time data 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    40
  responses from the P port processor during the enumeration process.  West Bridge based enumeration  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    41
  requires no real time information from the P port processor, ensuring the fastest possible 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    42
  enumeration times.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    43
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    44
  * P Port Based Enumeration *
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    45
  The first method for handling USB enumeration is for the processor client to handle all 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    46
  endpoint zero requests for descriptors.  This mode is configured by indicating to the API 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    47
  that the processor wants to handle all endpoint zero requests.  This is done by setting 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    48
  bit 0 in the end_point_mask to a 1.  The processor uses CyAsUsbReadDataAsync() to read 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    49
  the request and CyAsUsbWriteDataAsync() to write the response.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    50
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    51
  * West Bridge Based Enumeration *
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    52
  The second method for handling USB enumeration is the configuration information method.  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    53
  Before enabling a connection from the West Bridge device to the USB connector, the P Port 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    54
  processor sends information about the USB configuration to West Bridge through the configuration 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    55
  APIs.  This information is stored within the West Bridge device.  When a USB cable is attached, 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    56
  the West Bridge device then handles all descriptor requests based on the stored information.  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    57
  Note that this method of enumeration only supports a single USB configuration.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    58
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    59
  In either model of enumeration, the processor client is responsible for ensuring that
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    60
  the system meets USB Chapter 9 compliance requirements. This can be done by providing spec
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    61
  compliant descriptors, and handling any setup packets that are sent to the client
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    62
  appropriately.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    63
  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    64
  Mass storage class compliance will be ensured by the West Bridge firmware when the mass
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    65
  storage functionality is enabled.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    66
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    67
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    68
/*@@Endpoint Configuration
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    69
  Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    70
  The West Bridge device has one 64-byte control endpoint, one 64-byte low bandwidth endpoint, four bulk
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    71
  endpoints dedicated for mass storage usage, and up to ten bulk/interrupt/isochronous
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    72
  endpoints that can be used for USB-to-Processor communication.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    73
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    74
  Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    75
  The four storage endpoints (Endpoints 2, 4, 6 and 8) are reserved for accessing storage
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    76
  devices attached to West Bridge and are not available for use by the processor.  These are
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    77
  used implicitly when using the storage API to read/write to the storage media.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    78
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    79
  Endpoint 0 is the standard USB control pipe used for all enumeration activity.  Though
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    80
  the endpoint buffer is not directly accessible from the processor, read/write activity
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    81
  can be performed on this endpoint through the API layers.  This endpoint is always
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    82
  configured as a bi-directional control endpoint.
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
  Endpoint 1 is a 64-byte endpoint that can be used for low bandwidth bulk/interrupt
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    85
  activity.  The physical buffer is not accessible from the processor, but can be read/written
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    86
  through the API.  As the data coming to this endpoint is being handled through the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    87
  software layers, there can be loss of data if a read call is not waiting when an OUT
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    88
  packet arrives.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    89
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    90
  Endpoints 3, 5, 7, 9, 10, 11, 12, 13, 14 and 15 are ten configurable endpoints
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    91
  mapped to parts of a total 4 KB FIFO buffer space on the West Bridge device.  This 4 KB
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    92
  physical buffer space is divided into up to four endpoints called PEP1, PEP2, PEP3 and PEP4
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    93
  in this software document.  There are multiple configurations in which this buffer space
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    94
  can be used, and the size and number of buffers available to each physical endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    95
  vary between these configurations.  See the West Bridge PDD for details on the buffer
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    96
  orientation corresponding to each configuration.
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
  * Note *
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    99
  PEPs 1, 2, 3 and 4 are called Physical EP 3, 5, 7 and 9 in the West Bridge PDD.  The
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   100
  sequential number scheme is used in the software to disambiguate these from the logical
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   101
  endpoint numbers, and also for convenience of array indexing.
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   104
#if !defined(__doxygen__)
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   107
#endif
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   110
   This constants defines the maximum size of a USB descriptor when referenced via the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   111
   CyAsUsbSetDescriptor or CyAsUsbGetDescriptor functions.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   112
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   113
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   114
   * CyAsUsbSetDescriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   115
   * CyAsUsbGetDescriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   116
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   117
#define CY_AS_MAX_USB_DESCRIPTOR_SIZE				(128)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   118
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   119
/*****************************************************************************
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   120
 * West Bridge Types
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   123
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   124
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   125
   This data structure is the data passed via the evdata paramater on a usb event
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   126
   callback for the inquiry request.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   127
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   128
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   129
   When a SCSI inquiry request arrives via the USB connection and the P Port has asked
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   130
   to receive inquiry requests, this request is forwarded to the client via the USB
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   131
   callback.  This callback is called twice, once before the inquiry data is forwarded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   132
   to the host (CyAsEventUsbInquiryBefore) and once after the inquiry has been sent to the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   133
   USB host (CyAsEventUsbInquiryAfter).  The evdata parameter is a pointer to this data 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   134
   structure.  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   135
   
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   136
   *CyAsEventUsbInquiryBefore*
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   137
   If the client just wishes to see the inquiry request and associated data, then a simple 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   138
   return from the callback will forward the inquiry response to the USB host.  If the 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   139
   client wishes to change the data returned to the USB host, the updated parameter must 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   140
   be set to CyTrue and the memory area address by the data parameter should be updated.  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   141
   The data pointer can be changed to point to a new memory area and the length field 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   142
   changed to change the amount of data returned from the inquiry request.  Note that the 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   143
   data area pointed to by the data parameter must remain valid and the contents must
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   144
   remain consistent until after the CyAsEventUsbInquiryAfter event has occurred.  THE LENGTH
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   145
   MUST BE LESS THAN 192 BYTES OR THE CUSTOM INQUIRY RESPONSE WILL NOT BE RETURNED.  If the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   146
   length is too long, the default inquiry response will be returned.
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
   *CyAsEventUsbInquiryAfter*
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   149
   If the client needs to free any data, this event signals that the data associated with
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   150
   the inquiry is no longer needed.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   151
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   152
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   153
   * CyAsUsbEventCallback
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   154
   * CyAsUsbRegisterCallback
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   155
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   156
typedef struct CyAsUsbInquiryData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   157
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   158
    CyAsBusNumber_t bus ;	/* The bus for the event */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   159
    uint32_t device ;		/* The device the event */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   160
    uint8_t evpd ;		/* The EVPD bit from the SCSI INQUIRY request */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   161
    uint8_t codepage ;		/* The codepage in the inquiry request */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   162
    CyBool updated ;		/* This bool must be set to CyTrue indicate that the inquiry
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   163
				   data was changed */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   164
    uint16_t length ;		/* The length of the data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   165
    void *data ;		/* The inquiry data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   166
} CyAsUsbInquiryData ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   167
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   170
   This data structure is the data passed via the evdata parameter on a usb event
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   171
   callback for the unknown mass storage request.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   174
   When a SCSI request is made that the mass storage firmware in West Bridge does not 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   175
   know how to process, this request is passed to the processor for handling via 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   176
   the usb callback.  This data structure is used to pass the request and the 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   177
   associated response.  The user may set the status to indicate the status of the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   178
   request.  The status value is the bCSWStatus value from the USB mass storage
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   179
   Command Status Wrapper (0 = command passed, 1 = command failed).  If the status
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   180
   is set to command failed (1), the sense information should be set as well.  For
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   181
   more information about sense information, see the USB mass storage specification
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   182
   as well as the SCSI specifications for block devices.  By default the status is
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   183
   initialized to 1 (failure) with a sense information of 05h/20h/00h which
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   184
   indicates INVALID COMMAND.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   185
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   186
typedef struct CyAsUsbUnknownCommandData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   187
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   188
    CyAsBusNumber_t bus ;	/* The bus for the event */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   189
    uint32_t device ;		/* The device for the event */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   190
    uint16_t reqlen ;		/* The length of the requst (should be 16 bytes) */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   191
    void *request ;		/* The request */
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
    uint8_t status ;		/* The returned status value for the command */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   194
    uint8_t key ;		/* If status is failed, the sense key */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   195
    uint8_t asc ;		/* If status is failed, the additional sense code */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   196
    uint8_t ascq ;		/* If status if failed, the additional sense code qualifier */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   197
} CyAsUsbUnknownCommandData ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   198
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   199
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   200
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   201
   This data structure is the data passed via the evdata paramater on a usb event
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   202
   callback for the start/stop request.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   203
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   204
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   205
   When a SCSI start stop request arrives via the USB connection and the P Port has asked
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   206
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   207
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   208
   * CyAsUsbEventCallback
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   209
   * CyAsUsbRegisterCallback
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   210
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   211
typedef struct CyAsUsbStartStopData
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
    CyAsBusNumber_t bus ;	/* The bus for the event */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   214
    uint32_t device ;		/* The device for the event */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   215
    CyBool start ;		/* CyTrue means start request, CyFalse means stop request */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   216
    CyBool loej ;		/* CyTrue means LoEj bit set, otherwise false */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   217
} CyAsUsbStartStopData ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   218
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   219
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   220
   This data type is used to indicate which mass storage devices are enumerated.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   221
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   222
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   223
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   224
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   225
   * CyAsUsbEnumControl
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   226
   * CyAsUsbSetEnumConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   227
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   228
typedef enum CyAsUsbMassStorageEnum
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
    CyAsUsbNandEnum = 0x01,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   231
    CyAsUsbSDEnum = 0x02,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   232
    CyAsUsbMMCEnum = 0x04,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   233
    CyAsUsbCEATAEnum = 0x08
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   234
} CyAsUsbMassStorageEnum ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   235
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   236
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   237
   This data type specifies the type of descriptor to transfer to the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   238
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   239
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   240
   During enumeration, if West Bridge is handling enumeration, the West Bridge device needs to USB descriptors
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   241
   to complete the enumeration.  The function CyAsUsbSetDescriptor() is used to transfer the descriptors
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   242
   to the West Bridge device.  This type is an argument to that function and specifies which descriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   243
   is being transferred.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   244
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   245
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   246
   * CyAsUsbSetDescriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   247
   * CyAsUsbGetDescriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   248
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   249
typedef enum CyAsUsbDescType
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
    CyAsUsbDescDevice = 1,				/* A device descriptor - See USB 2.0 specification Chapter 9 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   252
    CyAsUsbDescDeviceQual = 2,				/* A device descriptor qualifier - See USB 2.0 specification Chapter 9 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   253
    CyAsUsbDescFSConfiguration = 3,			/* A configuration descriptor for FS operation - See USB 2.0 specification Chapter 9 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   254
    CyAsUsbDescHSConfiguration = 4,			/* A configuration descriptor for HS operation - See USB 2.0 specification Chapter 9 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   255
    CyAsUsbDescString = 5
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   256
} CyAsUsbDescType ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   257
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   258
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   259
   This type specifies the direction of an endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   260
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   261
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   262
   This type is used when configuring the endpoint hardware to specify the direction
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   263
   of the endpoint.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   264
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   265
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   266
   * CyAsUsbEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   267
   * CyAsUsbSetEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   268
   * CyAsUsbGetEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   269
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   270
typedef enum CyAsUsbEndPointDir
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   271
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   272
	CyAsUsbIn = 0,						/* The endpoint direction is IN (West Bridge -> USB Host) */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   273
	CyAsUsbOut = 1,						/* The endpoint direction is OUT (USB Host -> West Bridge) */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   274
	CyAsUsbInOut = 2					/* The endpoint direction is IN/OUT (valid only for EP 0 & 1) */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   275
} CyAsUsbEndPointDir ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   276
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   277
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   278
   This type specifies the type of an endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   279
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   280
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   281
   This type is used when configuring the endpoint hardware to specify the type of
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   282
   endpoint.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   283
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   284
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   285
   * CyAsUsbEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   286
   * CyAsUsbSetEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   287
   * CyAsUsbGetEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   288
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   289
typedef enum CyAsUsbEndPointType
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   290
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   291
    CyAsUsbControl,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   292
    CyAsUsbIso,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   293
    CyAsUsbBulk,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   294
    CyAsUsbInt
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   295
} CyAsUsbEndPointType ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   296
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   297
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   298
   This type is a structure used to indicate the top level configuration of the USB stack
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   299
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   300
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   301
   In order to configure the USB stack, the CyAsUsbSetEnumConfig() function is called to indicate
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   302
   how mass storage is to be handled, the specific number of interfaces to be supported if
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   303
   West Bridge is handling enumeration, and the end points of specifi interest.  This structure
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   304
   contains this information.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   305
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   306
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   307
   * CyAsUsbSetConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   308
   * CyAsUsbGetConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   309
   * <LINK Enumeration Model>
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   310
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   311
typedef struct CyAsUsbEnumControl
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   312
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   313
    CyBool devices_to_enumerate[CY_AS_MAX_BUSES][CY_AS_MAX_STORAGE_DEVICES];
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   314
                                                        /* Designate which devices on which buses to enumerate */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   315
    CyBool antioch_enumeration ;			/* If true, West Bridge will control enumeration.  If this is false the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   316
							   P port controls enumeration.  If the P Port is controlling 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   317
							   enumeration, traffic will be received via endpoint zero. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   318
    uint8_t mass_storage_interface ;			/* This is the interface # to use for the mass storage interface, 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   319
							   if mass storage is enumerated.  If mass storage is not enumerated 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   320
							   this value should be zero. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   321
    uint8_t mtp_interface ;			        /* This is the interface # to use for the MTP interface, 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   322
							   if MTP is enumerated.  If MTP is not enumerated 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   323
							   this value should be zero. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   324
    CyBool mass_storage_callbacks ;			/* If true, Inquiry, START/STOP, and unknown mass storage
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   325
							   requests cause a callback to occur for handling by the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   326
							   baseband processor. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   327
} CyAsUsbEnumControl ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   328
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   329
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   330
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   331
   This structure is used to configure a single endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   332
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   333
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   334
   This data structure contains all of the information required to configure the West Bridge hardware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   335
   associated with a given endpoint.
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   338
   * CyAsUsbSetEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   339
   * CyAsUsbGetEndPointConfig
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
typedef struct CyAsUsbEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   342
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   343
    CyBool enabled ;					/* If true, this endpoint is enabled */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   344
    CyAsUsbEndPointDir dir ;				/* The direction of this endpoint */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   345
    CyAsUsbEndPointType type ;				/* The type of endpoint */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   346
    CyAsEndPointNumber_t physical ;			/* The physical endpoint #, 1, 2, 3, 4 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   347
    uint16_t size ;					/* The size of the endpoint in bytes */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   348
} CyAsUsbEndPointConfig ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   349
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   350
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   351
   List of partition enumeration combinations that can be selected on a partitioned
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   352
   storage device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   353
 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   354
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   355
   West Bridge firmware supports creating upto two partitions on mass storage
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   356
   devices connected to West Bridge.  When there are two partitions on a device,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   357
   the user can choose which of these partitions should be made visible to a USB
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   358
   host through the mass storage interface.  This enumeration lists the various
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   359
   enumeration selections that can be made.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   360
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   361
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   362
   * CyAsStorageCreatePPartition
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   363
   * CyAsStorageRemovePPartition
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   364
   * CyAsUsbSelectMSPartitions
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   365
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   366
typedef enum CyAsUsbMSType_t {
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   367
    CyAsUsbMSUnit0 = 0,                 /* Enumerate only partition 0 as CD (autorun) device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   368
    CyAsUsbMSUnit1,                     /* Enumerate only partition 1 as MS device (default setting) */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   369
    CyAsUsbMSBoth                       /* Enumerate both units */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   370
} CyAsUsbMSType_t ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   373
   This type specifies the type of USB event that has occurred
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   374
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   375
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   376
   This type is used in the USB event callback function to indicate the type of USB event
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   377
   that has occurred.  The callback function includes both this reasons for the callback
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   378
   and a data parameter associated with the reason.  The data parameter is used in a reason
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   379
   specific way and is documented below with each reason.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   380
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   381
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   382
   * CyAsUsbIoCallback
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   383
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   384
typedef enum CyAsUsbEvent
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   385
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   386
    CyAsEventUsbSuspend,				/* This event is sent when West Bridge is put into the suspend
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   387
							   state by the USB host.  The data parameter is not used and
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   388
							   will be zero. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   389
    CyAsEventUsbResume,					/* This event is sent when West Bridge is taken out of the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   390
							   suspend state by the USB host.  The data parameter is not
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   391
							   used and will be zero. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   392
    CyAsEventUsbReset,					/* This event is sent when a USB reset request is received
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   393
							   by the West Bridge device.  The data parameter is not used and
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   394
							   will be zero. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   395
    CyAsEventUsbSetConfig,				/* This event is sent when a USB set configuration request is made.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   396
							   The data parameter is a pointer to a uint16_t that contains the 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   397
							   configuration number.  The configuration number may be zero to 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   398
							   indicate an unconfigure operation. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   399
    CyAsEventUsbSpeedChange,				/* This event is sent when the USB connection changes speed.  This is
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   400
							   generally a transition from full speed to high speed.  The parameter
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   401
							   to this event is a pointer to uint16_t that gives the speed of the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   402
							   USB connection.  Zero indicates full speed, one indicates high speed */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   403
    CyAsEventUsbSetupPacket,				/* This event is sent when a setup packet is received.  The data parameter
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   404
							   is a pointer to the eight bytes of setup data. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   405
    CyAsEventUsbStatusPacket,				/* This event is sent when a status packet is received.  The data
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   406
							   parameter is not used. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   407
    CyAsEventUsbInquiryBefore,				/* This event is sent when mass storage receives an inquiry
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   408
							   request and we have asked to see these requests. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   409
    CyAsEventUsbInquiryAfter,				/* This event is sent when mass storage has finished processing an
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   410
							   inquiry request and any data associated with the request is no longer
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   411
							   required. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   412
    CyAsEventUsbStartStop,				    /* This event is sent when mass storage receives a start/stop request and
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   413
							   we have asked to see these requests */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   414
    CyAsEventUsbClearFeature,               /* This event is sent when a Clear Feature request is received.  The data
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   415
							   parameter is the endpoint number. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   416
    CyAsEventUsbUnknownStorage,			    /* This event is sent when mass storage receives a request that is not known
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   417
							   and we have asked to see these requests */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   418
    CyAsEventUsbMSCProgress                 /* This event is sent when the read/write activity on the USB mass
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   419
                                                           storage has crossed a pre-set level */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   420
} CyAsUsbEvent;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   423
   This type is the type of a callback function that is called when a USB event occurs
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   424
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   425
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   426
   At times West Bridge needs to inform the P port processor of events that have
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   427
   occurred.  These events are asynchronous to the thread of control on the P
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   428
   port processor and as such are generally delivered via a callback function that
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   429
   is called as part of an interrupt handler.  This type defines the type of function
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   430
   that must be provided as a callback function for USB events.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   431
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   432
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   433
   * CyAsUsbEvent
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   434
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   435
typedef void (*CyAsUsbEventCallback)(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   436
    CyAsDeviceHandle			handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   437
    CyAsUsbEvent			ev,		/* The event type being reported */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   438
    void *				evdata		/* The data assocaited with the event being reported */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   441
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   442
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   443
   This type is the callback function called after an asynchronous USB read/write operation
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   444
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   445
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   446
   This function type defines a callback function that is called at the completion of any
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   447
   asynchronous read or write operation.
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   450
   * CyAsUsbReadDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   451
   * CyAsUsbWriteDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   452
   * CY_AS_ERROR_CANCELED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   453
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   454
typedef void (*CyAsUsbIoCallback)(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   455
    CyAsDeviceHandle			handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   456
    CyAsEndPointNumber_t		ep,		/* The endpoint that has completed an operation */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   457
    uint32_t				count,		/* THe amount of data transferred to/from USB */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   458
    void *				buffer,		/* The data buffer for the operation */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   459
    CyAsReturnStatus_t			status		/* The error status of the operation */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   460
) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   461
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   462
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   463
   This type is the callback function called after asynchronous API functions have completed.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   464
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   465
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   466
   When calling API functions from callback routines (interrupt handlers usually) the async version of
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   467
   these functions must be used.  This callback is called when an asynchronous API function has completed.
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
typedef void (*CyAsUsbFunctionCallback)(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   470
    CyAsDeviceHandle			handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   471
    CyAsReturnStatus_t			status,		/* The error status of the operation */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   472
    uint32_t				client		/* A client supplied 32 bit tag */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   473
) ;
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   476
/*****************************************************************************
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   477
 * West Bridge Functions
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   478
 ****************************************************************************/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   479
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   480
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   481
   This function starts the USB stack
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   482
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   483
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   484
   This function initializes the West Bridge USB software stack if it has not yet been stared.  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   485
   This initializes any required data structures and powers up any USB specific portions of 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   486
   the West Bridge hardware.  If the stack had already been started, the USB stack reference count 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   487
   is incremented.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   488
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   489
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   490
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   491
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   492
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   493
   This function cannot be called from any type of West Bridge callback.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   494
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   495
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   496
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   497
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   498
   * CY_AS_ERROR_SUCCESS - the stack initialized and is ready for use
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   499
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   500
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   501
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   502
   * CyAsUsbStop
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   503
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   504
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   505
CyAsUsbStart(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   506
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   507
	CyAsFunctionCallback		cb,             /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   508
	uint32_t			client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   509
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   510
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   511
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   512
   This function stops the USB stack
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   513
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   514
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   515
   This function decrements the reference count for the USB stack and if this count
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   516
   is zero, the USB stack is shut down.  The shutdown frees all resources associated
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   517
   with the USB stack.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   518
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   519
   * Valid In Asynchronous Callback: NO
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
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   522
   While all resources associated with the USB stack will be freed is a shutdown occurs,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   523
   resources associated with underlying layers of the software will not be freed if they
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   524
   are shared by the storage stack and the storage stack is active.  Specifically the DMA manager,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   525
   the interrupt manager, and the West Bridge communications module are all shared by both the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   526
   USB stack and the storage stack.
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
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   529
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   530
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   531
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   532
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   533
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   534
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   535
   * CyAsUsbStart
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   536
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   537
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   538
CyAsUsbStop(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   539
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   540
	CyAsFunctionCallback		cb,     /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   541
	uint32_t			client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   542
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   543
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   544
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   545
   This function registers a callback function to be called when an asynchronous USB event occurs
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   546
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   547
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   548
   When asynchronous USB events occur, a callback function can be called to alert the calling program.  This
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   549
   functions allows the calling program to register a callback.
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
   * Valid In Asynchronous Callback: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   552
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   553
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   554
CyAsUsbRegisterCallback(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   555
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   556
	CyAsUsbEventCallback	callback	/* The function to call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   557
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   558
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   559
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   560
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   561
   This function connects the West Bridge device D+ and D- signals physically to the USB host.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   562
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   563
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   564
   The West Bridge device has the ability to programmatically disconnect the USB pins on the device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   565
   from the USB host.  This feature allows for re-enumeration of the West Bridge device as a different
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   566
   device when necessary.  This function connects the D+ and D- signal physically to the USB host
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   567
   if they have been previously disconnnected.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   568
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   569
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   570
   * Nestable: YES
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
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   573
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   574
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   575
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   576
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   577
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   578
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   579
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   580
   * CyAsUsbDisconnect
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   581
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   582
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   583
CyAsUsbConnect(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   584
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   585
	CyAsFunctionCallback	cb,         /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   586
	uint32_t			    client      /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   587
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   588
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   589
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   590
   This function disconnects the West Bridge device D+ and D- signals physically from the USB host.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   591
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   592
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   593
   The West Bridge device has the ability to programmatically disconnect the USB pins on the device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   594
   from the USB host.  This feature allows for re-enumeration of the West Bridge device as a different
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   595
   device when necessary.  This function disconnects the D+ and D- signal physically from the USB host
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   596
   if they have been previously connected.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   597
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   598
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   599
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   600
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   601
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   602
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   603
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   604
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   605
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   606
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   609
   * CyAsUsbConnect
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   610
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   611
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   612
CyAsUsbDisconnect(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   613
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   614
	CyAsFunctionCallback	cb,         /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   615
	uint32_t			    client      /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   616
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   617
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   618
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   619
   This function configures the USB stack
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   620
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   621
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   622
   This function is used to configure the USB stack.  It is used to indicate which endpoints are going to
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   623
   be used, and how to deal with the mass storage USB device within West Bridge.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   624
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   625
   * Valid In Asynchronous Callback: Yes (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   626
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   627
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   628
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   629
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   630
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   631
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   632
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   633
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   634
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   635
   * CyAsUsbGetEnumConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   636
   * CyAsUsbEnumControl
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   637
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   638
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   639
CyAsUsbSetEnumConfig(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   640
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   641
	CyAsUsbEnumControl *	config_p,	/* The USB configuration information */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   642
	CyAsFunctionCallback	cb,         /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   643
	uint32_t			    client      /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   644
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   645
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   646
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   647
   This function retreives the current configuration of the USB stack
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   648
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   649
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   650
   This function sends a request to West Bridge to retreive the current configuration
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
   * Valid In Asynchronous Callback: Yes (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   653
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   654
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   655
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   656
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   657
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   658
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   659
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   660
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   661
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   662
   * CyAsUsbSetConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   663
   * CyAsUsbConfig
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
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   666
CyAsUsbGetEnumConfig(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   667
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   668
	CyAsUsbEnumControl*		config_p,	/* The return value for USB congifuration information */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   669
	CyAsFunctionCallback		cb,     /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   670
	uint32_t			client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   671
	) ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   674
   This function sets the USB descriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   675
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   676
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   677
   This function is used to set the various descriptors assocaited with the USB enumeration
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   678
   process.  This function should only be called when the West Bridge enumeration model is selected.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   679
   Descriptors set using this function can be cleared by stopping the USB stack, or by calling
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   680
   the CyAsUsbClearDescriptors function.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   681
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   682
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   683
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   684
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   685
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   686
   These descriptors are described in the USB 2.0 specification, Chapter 9.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   687
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   688
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   689
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   690
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   691
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   692
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   693
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   694
   * CY_AS_ERROR_INVALID_DESCRIPTOR - the descriptor passed is not valid
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   695
   * CY_AS_ERROR_BAD_INDEX - a bad index was given for the type of descriptor given
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   696
   * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor doing enumeration
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   699
   * CyAsUsbGetDescriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   700
   * CyAsUsbClearDescriptors
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   701
   * <LINK Enumeration Model>
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   702
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   703
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   704
CyAsUsbSetDescriptor(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   705
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   706
	CyAsUsbDescType			type,		/* The type of descriptor */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   707
	uint8_t				index,		/* Only valid for string descriptors */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   708
	void *				desc_p,		/* The descriptor to be transferred */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   709
	uint16_t			length,		/* The length of the descriptor in bytes */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   710
	CyAsFunctionCallback		cb,             /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   711
	uint32_t			client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   712
	) ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   715
   This function clears all user descriptors stored on the West Bridge.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   716
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   717
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   718
   This function is used to clear all descriptors that were previously
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   719
   stored on the West Bridge through CyAsUsbSetDescriptor calls, and go back
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   720
   to the default descriptor setup in the firmware.  This function should
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   721
   only be called when the Antioch enumeration model is selected.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   722
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   723
   * Valid In Asynchronous Callback: Yes (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   724
   * Nestable: Yes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   725
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   726
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   727
   * CY_AS_ERROR_SUCCESS - all descriptors cleared successfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   728
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   729
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   730
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   731
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   732
   * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor is doing enumeration
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   735
   * CyAsUsbSetDescriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   736
   * <LINK Enumeration Model>
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   737
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   738
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   739
CyAsUsbClearDescriptors(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   740
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   741
        CyAsFunctionCallback            cb,             /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   742
        uint32_t                        client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   743
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   744
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   745
   This structure contains the descriptor buffer to be filled by CyAsUsbGetDescriptor API.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   746
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   747
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   748
   This data structure the buffer to hold the descriptor data, and an in/out parameter ti indicate the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   749
   lenght of the buffer and descriptor data in bytes.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   750
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   751
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   752
   * CyAsUsbGetDescriptor
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
typedef struct CyAsGetDescriptorData
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
    void *	desc_p;		/* The buffer to hold the returned descriptor */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   757
    uint32_t 	length;	/* This is an input and output parameter.  Before the code this pointer
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   758
				           points to a uint32_t that contains the length of the buffer.  After
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   759
				           the call, this value contains the amount of data actually returned. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   760
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   761
} CyAsGetDescriptorData ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   762
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   763
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   764
   This function retreives a given descriptor from the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   765
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   766
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   767
   This function retreives a USB descriptor from the West Bridge device.  This function should only be called when the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   768
   West Bridge enumeration model is selected.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   769
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   770
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   771
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   772
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   773
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   774
   These descriptors are described in the USB 2.0 specification, Chapter 9.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   775
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   776
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   777
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   778
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   779
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   780
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   781
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   782
   * CY_AS_ERROR_BAD_INDEX - a bad index was given for the type of descriptor given
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   783
   * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor doing enumeration
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   784
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   785
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   786
   * CyAsUsbSetDescriptor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   787
   * <LINK Enumeration Model>
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   788
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   789
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   790
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   791
CyAsUsbGetDescriptor(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   792
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   793
	CyAsUsbDescType			type,		/* The type of descriptor */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   794
	uint8_t				index,		/* Index for string descriptor */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   795
	CyAsGetDescriptorData *		data,           /* Parameters and return value for the get descriptor call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   796
	CyAsFunctionCallback		cb,             /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   797
	uint32_t			client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   798
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   799
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   800
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   801
   This function sets the configuration of the physical endpoints into one of the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   802
   twelve supported configuration
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   803
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   804
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   805
   USB endpoints are mapped onto one of four physical endpoints in the device.  Therefore
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   806
   USB endpoints are known as logical endpoints and these logical endpoints are mapped to
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   807
   one of four physical endpoints.  In support of these four physical endpoints there is
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   808
   four kilo-bytes of buffer spaces that can be used as buffers for these physical endpoints.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   809
   This 4K of buffer space can be configured in one of twelve ways.  This function sets the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   810
   buffer configuration for the physical endpoints.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   811
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   812
   * Config  1: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (2 * 512), PEP4 (2 * 512)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   813
   * Config  2: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (4 * 512), PEP4 (N/A)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   814
   * Config  3: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (2 * 1024), PEP4(N/A)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   815
   * Config  4: PEP1 (4 * 512), PEP2 (N/A), PEP3 (2 * 512), PEP4 (2 * 512)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   816
   * Config  5: PEP1 (4 * 512), PEP2 (N/A), PEP3 (4 * 512), PEP4 (N/A)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   817
   * Config  6: PEP1 (4 * 512), PEP2 (N/A), PEP3 (2 * 1024), PEP4 (N/A)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   818
   * Config  7: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (2 * 512), PEP4 (2 * 512)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   819
   * Config  8: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (4 * 512), PEP4 (N/A)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   820
   * Config  9: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (2 * 1024), PEP4 (N/A)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   821
   * Config 10: PEP1 (3 * 512), PEP2 (N/A), PEP3 (3 * 512), PEP4 (2 * 512)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   822
   * Config 11: PEP1 (3 * 1024), PEP2 (N/A), PEP3 (N/A), PEP4 (2 * 512)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   823
   * Config 12: PEP1 (4 * 1024), PEP2 (N/A), PEP3 (N/A), PEP4 (N/A)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   824
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   825
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   826
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   827
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   828
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   829
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   830
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   831
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   832
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   833
   * CY_AS_ERROR_INVALID_CONFIGURATION - the configuration given is not between 1 and 12
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   834
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   835
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   836
CyAsUsbSetPhysicalConfiguration(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   837
    CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   838
    uint8_t			config		/* The physical endpoint configuration number */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   839
    ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   840
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   841
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   842
   This function sets the hardware configuration for a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   843
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   844
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   845
   This function sets the hardware configuration for a given endpoint.  This is the method to set the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   846
   direction of the endpoint, the type of endpoint, the size of the endpoint buffer, and the buffering
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   847
   style for the endpoint.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   848
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   849
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   850
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   851
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   852
   Add documentation about endpoint configuration limitations
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   853
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   854
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   855
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   856
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   857
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   858
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   859
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   860
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   861
   * CY_AS_ERROR_INVALID_CONFIGURATION - the endpoint configuration given is not valid
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   862
   * CY_AS_ERROR_ENDPOINT_CONFIG_NOT_SET - the physical endpoint configuration is not set
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   863
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   864
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   865
   * CyAsUsbGetEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   866
   * CyAsUsbEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   867
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   868
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   869
CyAsUsbSetEndPointConfig(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   870
    CyAsDeviceHandle			handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   871
    CyAsEndPointNumber_t		ep,		/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   872
    CyAsUsbEndPointConfig *		config_p	/* The configuration information for the endpoint */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   873
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   874
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   875
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   876
   This function retreives the hardware configuration for a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   877
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   878
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   879
   This function gets the hardware configuration for the given endpoint.  This include information about
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   880
   the direction of the endpoint, the type of endpoint, the size of the endpoint buffer, and the buffering
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   881
   style for the endpoint.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   882
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   883
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   884
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   885
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   886
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   887
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   888
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   889
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   890
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   891
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   892
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   893
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   894
   * CyAsUsbSetEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   895
   * CyAsUsbEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   896
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   897
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   898
CyAsUsbGetEndPointConfig(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   899
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   900
	CyAsEndPointNumber_t		ep,			/* The endpoint of interest*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   901
	CyAsUsbEndPointConfig *		config_p	/* The return value containing the endpoint config information */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   902
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   903
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   904
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   905
   This function commits the configuration information that has previously been set.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   906
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   907
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   908
   The initialization process involves calling CyAsUsbSetEnumConfig() and CyAsUsbSetEndPointConfig(). These
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   909
   functions do not actually send the configuration information to the West Bridge device.  Instead, these
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   910
   functions store away the configuration information and this CyAsUsbCommitConfig() actually finds the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   911
   best hardware configuration based on the requested endpoint configuration and sends thsi optimal
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   912
   confiuration down to the West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   913
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   914
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   915
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   916
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   917
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   918
   * CY_AS_ERROR_SUCCESS - a configuration was found and sent to West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   919
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   920
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   921
   * CY_AS_ERROR_INVALID_CONFIGURATION - the configuration requested is not possible
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   922
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   923
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   924
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   925
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   926
   * CyAsUsbSetEndPointConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   927
   * CyAsUsbSetEnumConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   928
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   929
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   930
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   931
CyAsUsbCommitConfig(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   932
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   933
	CyAsFunctionCallback		cb,             /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   934
	uint32_t			client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   935
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   936
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   937
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   938
   This function reads data from a USB endpoint.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   939
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   940
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   941
   This function reads data from an OUT.  This function blocks until the read is complete.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   942
   If this is a packet read, a single received USB packet will complete the read.  If this 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   943
   is not a packet read, this function will block until all of the data requested has been
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   944
   recevied.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   945
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   946
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   947
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   948
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   949
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   950
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   951
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   952
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   953
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   954
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   955
   * CyAsUsbReadDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   956
   * CyAsUsbWriteData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   957
   * CyAsUsbWriteDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   958
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   959
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   960
CyAsUsbReadData(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   961
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   962
	CyAsEndPointNumber_t		ep,		/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   963
	CyBool				pktread,	/* If CyTrue, this is a packet read */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   964
	uint32_t			dsize,		/* The amount of data to read */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   965
	uint32_t *			dataread,	/* The amount of data read */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   966
	void *				data		/* The buffer to hold the data read */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   967
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   968
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   969
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   970
   This function reads data from a USB endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   971
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   972
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   973
   This function reads data from an OUT endpoint.  This function will return immediately and
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   974
   the callback provided will be called when the read is complete.  If this is a packet read,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   975
   then the callback will be called on the next received packet.  If this is not a packet read,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   976
   the callback will be called when the requested data is received.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   977
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   978
   * Valid In Asynchronous Callback: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   979
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   980
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   981
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   982
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   983
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   984
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   985
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   986
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   987
   * CyAsUsbReadData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   988
   * CyAsUsbWriteData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   989
   * CyAsUsbWriteDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   990
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   991
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   992
CyAsUsbReadDataAsync(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   993
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   994
	CyAsEndPointNumber_t		ep,		/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   995
	CyBool				pktread,	/* If CyTrue, this is a packet read */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   996
	uint32_t			dsize,		/* The amount of data to read */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   997
	void *				data,		/* The buffer for storing the data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   998
	CyAsUsbIoCallback		callback	/* The callback function to call when the data is read */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   999
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1000
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1001
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1002
   This function writes data to a USB endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1003
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1004
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1005
   This function writes data to an IN endpoint data buffer.  Multiple USB packets may be sent 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1006
   until all data requested has been sent.  This function blocks until all of the data has been sent.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1007
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1008
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1009
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1010
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1011
   Calling this function with a dsize of zero will result in a zero length packet transmitted to the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1012
   USB host.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1013
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1014
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1015
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1016
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1017
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1018
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1019
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1020
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1021
   * CyAsUsbReadData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1022
   * CyAsUsbReadDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1023
   * CyAsUsbWriteDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1024
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1025
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1026
CyAsUsbWriteData(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1027
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1028
	CyAsEndPointNumber_t		ep,		/* The endpoint to write data to */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1029
	uint32_t			dsize,		/* The size of the data to write */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1030
	void *				data		/* The data buffer */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1031
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1032
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1033
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1034
   This function writes data to a USB endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1035
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1036
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1037
   This function writes data to an IN endpoint data buffer.  This function returns immediately 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1038
   and when the write completes, or if an error occurs, the callback function is called to indicate 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1039
   completion of the write operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1040
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1041
   * Valid In Asynchronous Callback: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1042
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1043
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1044
   Calling this function with a dsize of zero will result in a zero length packet transmitted to the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1045
   USB host.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1046
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1047
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1048
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1049
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1050
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1051
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1052
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1053
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1054
   * CyAsUsbReadData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1055
   * CyAsUsbReadDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1056
   * CyAsUsbWriteData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1057
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1058
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1059
CyAsUsbWriteDataAsync(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1060
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1061
	CyAsEndPointNumber_t		ep,		/* The endpoint to write data to */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1062
	uint32_t			dsize,		/* The size of the data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1063
	void *				data,		/* The buffer containing the data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1064
	CyBool				spacket,	/* If true, send a short packet to terminate data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1065
	CyAsUsbIoCallback		callback	/* The callback to call when the data is written */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1066
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1067
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1068
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1069
   This function aborts an outstanding asynchronous operation on a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1070
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1071
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1072
   This function aborts any outstanding operation that is pending on the given
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1073
   endpoint.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1074
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1075
   * Valid In Asynchronous Callback: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1076
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1077
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1078
   * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1079
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1080
   * CY_AS_ERROR_ASYNC_NOT_PENDING - no asynchronous USB operation was pending
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1081
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1082
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1083
   * CyAsUsbReadData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1084
   * CyAsUsbReadDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1085
   * CyAsUsbWriteData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1086
   * CyAsUsbWriteDataAsync
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1087
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1088
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1089
CyAsUsbCancelAsync(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1090
	CyAsDeviceHandle		handle,			/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1091
	CyAsEndPointNumber_t		ep			/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1092
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1093
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1094
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1095
   This function sets a stall condition on a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1096
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1097
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1098
   This function sets a stall condition on the given endpoint.  If the callback function
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1099
   is not zero, the function is executed asynchronously and the callback is called when
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1100
   the function is completed.  If the callback function is zero, this function executes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1101
   synchronously and will not return until the function has completed.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1102
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1103
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1104
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1105
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1106
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1107
   * CY_AS_ERROR_SUCCESS - the function succeeded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1108
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1109
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1110
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1111
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1112
   * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1113
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1114
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1115
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1116
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1117
   * CyAsUsbGetStall
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1118
   * CyAsUsbClearStall
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1119
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1120
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1121
CyAsUsbSetStall(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1122
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1123
	CyAsEndPointNumber_t		ep,		/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1124
	CyAsFunctionCallback		cb,		/* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1125
	uint32_t			client		/* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1126
) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1127
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1128
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1129
   This function clears a stall condition on a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1130
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1131
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1132
   This function clears a stall condition on the given endpoint. If the callback function
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1133
   is not zero, the function is executed asynchronously and the callback is called when
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1134
   the function is completed.  If the callback function is zero, this function executes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1135
   synchronously and will not return until the function has completed.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1136
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1137
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1138
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1139
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1140
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1141
   * CY_AS_ERROR_SUCCESS - the function succeeded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1142
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1143
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1144
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1145
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1146
   * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1147
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1148
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1149
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1150
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1151
   * CyAsUsbGetStall
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1152
   * CyAsUsbSetStall
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1153
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1154
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1155
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1156
CyAsUsbClearStall(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1157
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1158
	CyAsEndPointNumber_t		ep,		/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1159
	CyAsFunctionCallback		cb,		/* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1160
	uint32_t			    client		/* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1161
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1162
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1163
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1164
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1165
   This function returns the stall status for a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1166
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1167
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1168
   This function returns the stall status for a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1169
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1170
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1171
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1172
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1173
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1174
   * CY_AS_ERROR_SUCCESS - the function succeeded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1175
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1176
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1177
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1178
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1179
   * CY_AS_ERROR_INVALID_IN_CALLBACK
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1180
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1181
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1182
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1183
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1184
   * CyAsUsbGetStall
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1185
   * CyAsUsbSetStall
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1186
   * CyAsUsbClearStall
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1187
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1188
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1189
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1190
CyAsUsbGetStall(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1191
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1192
	CyAsEndPointNumber_t		ep,		/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1193
	CyBool *			    stall_p,	/* The return value for the stall state */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1194
	CyAsFunctionCallback		cb,     /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1195
	uint32_t			    client      /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1196
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1197
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1198
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1199
   This function sets a NAK condition on a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1200
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1201
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1202
   This function sets a NAK condition on the given endpoint.  If the callback function
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1203
   is not zero, the function is executed asynchronously and the callback is called when
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1204
   the function is completed.  If the callback function is zero, this function executes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1205
   synchronously and will not return until the function has completed.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1206
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1207
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1208
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1209
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1210
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1211
   * CY_AS_ERROR_SUCCESS - the function succeeded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1212
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1213
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1214
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1215
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1216
   * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1217
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1218
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1219
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1220
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1221
   * CyAsUsbGetNak
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1222
   * CyAsUsbClearNak
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1223
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1224
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1225
CyAsUsbSetNak(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1226
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1227
	CyAsEndPointNumber_t		ep,		/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1228
	CyAsFunctionCallback		cb,		/* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1229
	uint32_t			client		/* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1230
) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1231
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1232
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1233
   This function clears a NAK condition on a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1234
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1235
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1236
   This function clears a NAK condition on the given endpoint. If the callback function
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1237
   is not zero, the function is executed asynchronously and the callback is called when
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1238
   the function is completed.  If the callback function is zero, this function executes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1239
   synchronously and will not return until the function has completed.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1240
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1241
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1242
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1243
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1244
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1245
   * CY_AS_ERROR_SUCCESS - the function succeeded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1246
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1247
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1248
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1249
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1250
   * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1251
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1252
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1253
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1254
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1255
   * CyAsUsbGetNak
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1256
   * CyAsUsbSetNak
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1257
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1258
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1259
CyAsUsbClearNak(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1260
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1261
	CyAsEndPointNumber_t		ep,		/* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1262
	CyAsFunctionCallback		cb,		/* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1263
	uint32_t			client		/* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1264
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1265
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1266
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1267
   This function returns the NAK status for a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1268
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1269
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1270
   This function returns the NAK status for a given endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1271
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1272
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1273
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1274
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1275
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1276
   * CY_AS_ERROR_SUCCESS - the function succeeded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1277
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1278
   * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1279
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1280
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1281
   * CY_AS_ERROR_INVALID_IN_CALLBACK
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1282
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1283
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1284
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1285
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1286
   * CyAsUsbSetNak
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1287
   * CyAsUsbClearNak
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1288
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1289
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1290
CyAsUsbGetNak(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1291
    CyAsDeviceHandle		    handle,	    /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1292
    CyAsEndPointNumber_t	    ep,		    /* The endpoint of interest */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1293
    CyBool *			        nak_p,	    /* The return value for the stall state */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1294
    CyAsFunctionCallback	    cb,         /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1295
    uint32_t			        client      /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1296
) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1297
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1298
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1299
   This function triggers a USB remote wakeup from the Processor API
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1300
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1301
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1302
   When there is a Suspend condition on the USB bus, this function programmatically takes the USB bus out of thi suspend state.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1303
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1304
  * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1305
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1306
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1307
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1308
   * CY_AS_ERROR_SUCCESS - the function succeeded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1309
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1310
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1311
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1312
   * CY_AS_ERROR_INVALID_IN_CALLBACK
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1313
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1314
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1315
   * CY_AS_ERROR_NOT_IN_SUSPEND
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1316
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1317
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1318
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1319
CyAsUsbSignalRemoteWakeup(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1320
        CyAsDeviceHandle            handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1321
        CyAsFunctionCallback        cb,             /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1322
        uint32_t                    client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1323
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1324
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1325
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1326
   This function sets the threshold levels for mass storage progress reports from the West Bridge.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1327
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1328
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1329
   The West Bridge firmware can be configured to track the amount of read/write activity on
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1330
   the mass storage device, and send progress reports when the activity level has crossed a
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1331
   threshold level.  This function sets the threshold levels for the progress reports.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1332
   Set wr_sectors and rd_sectors to 0, if the progress reports are to be turned off.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1333
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1334
   * Valid In Asynchronous Callback: Yes (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1335
   * Nestable: Yes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1336
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1337
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1338
   * CY_AS_ERROR_SUCCESS - the function succeeded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1339
   * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1340
   * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1341
   * CY_AS_ERROR_INVALID_HANDLE - Bad handle
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1342
   * CY_AS_ERROR_INVALID_IN_CALLBACK - Synchronous call made while in callback
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1343
   * CY_AS_ERROR_OUT_OF_MEMORY - Failed allocating memory for request processing
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1344
   * CY_AS_ERROR_NOT_SUPPORTED - Firmware version does not support mass storage progress tracking
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1345
   * CY_AS_ERROR_INVALID_RESPONSE - Unexpected response from Firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1346
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1347
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1348
   * CyAsUsbMSCProgressData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1349
   * CyAsEventUsbMSCProgress
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1350
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1351
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1352
CyAsUsbSetMSReportThreshold(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1353
        CyAsDeviceHandle            handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1354
        uint32_t                    wr_sectors,     /* Number of sectors written before report is sent */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1355
        uint32_t                    rd_sectors,     /* Number of sectors read before report is sent */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1356
        CyAsFunctionCallback        cb,             /* The callback if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1357
        uint32_t                    client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1358
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1359
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1360
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1361
   Specify which of the partitions on a partitioned mass storage device should be made visible to
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1362
   USB.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1363
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1364
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1365
   West Bridge firmware supports the creation of upto two partitions on mass storage devices
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1366
   connected to the West Bridge device.  When there are two partitions on a device, the user
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1367
   can choose which of these partitions should be made visible to the USB host through the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1368
   USB mass storage interface.  This function allows the user to configure the partitions that
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1369
   should be enumerated.  At least one partition should be selected through this API.  If neither
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1370
   partition needs to be enumerated, use CyAsUsbSetEnumConfig to control this.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1371
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1372
   * Valid in Asynchronous callback: Yes (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1373
   * Nestable: Yes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1374
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1375
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1376
   * CY_AS_ERROR_SUCCESS - operation completed successfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1377
   * CY_AS_ERROR_INVALID_HANDLE - invalid handle to the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1378
   * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1379
   * CY_AS_ERROR_NO_FIRMWARE - no firmware running on West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1380
   * CY_AS_ERROR_NOT_RUNNING - USB stack has not been started
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1381
   * CY_AS_ERROR_IN_SUSPEND - West Bridge device is in suspend mode
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1382
   * CY_AS_ERROR_INVALID_CALL_SEQUENCE - this API has to be called before CyAsUsbSetEnumConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1383
   * CY_AS_ERROR_OUT_OF_MEMORY - failed to get memory to process the request
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1384
   * CY_AS_ERROR_NO_SUCH_UNIT - Storage device addressed has not been partitioned
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1385
   * CY_AS_ERROR_NOT_SUPPORTED - operation is not supported by active device/firmware.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1386
 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1387
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1388
   * CyAsStorageCreatePPartition
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1389
   * CyAsStorageRemovePPartition
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1390
   * CyAsUsbMsType_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1391
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1392
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1393
CyAsUsbSelectMSPartitions (
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1394
        CyAsDeviceHandle            handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1395
        CyAsBusNumber_t             bus,            /* Bus index of the device being addressed */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1396
        uint32_t                    device,         /* Device id of the device being addressed */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1397
        CyAsUsbMSType_t             type,           /* Selection of partitions to be enumerated */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1398
        CyAsFunctionCallback        cb,             /* The callback, if async call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1399
        uint32_t                    client          /* Client supplied data */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1400
        );
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1401
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1402
/* For supporting deprecated functions */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1403
#include "cyasusb_dep.h"    
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1404
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1405
#include "cyas_cplus_end.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1406
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1407
#endif				/* _INCLUDED_CYASUSB_H_ */