omap3530/beagle_drivers/wb/api/include/cyasmisc.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 (cyasmisc.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_CYASMISC_H_
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    23
#define _INCLUDED_CYASMISC_H_
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    24
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    25
#include "cyashal.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    26
#include "cyastypes.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    27
#include "cyasmedia.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
#include "cyas_cplus_start.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    30
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    31
#define CY_AS_LEAVE_STANDBY_DELAY_CLOCK		(1)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    32
#define CY_AS_RESET_DELAY_CLOCK			(1)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    33
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    34
#define CY_AS_LEAVE_STANDBY_DELAY_CRYSTAL	(5)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    35
#define CY_AS_RESET_DELAY_CRYSTAL		(5)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    36
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    37
/* The maximum number of buses supported */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    38
#define	CY_AS_MAX_BUSES				        (2)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    39
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    40
/* The maximum number of storage devices supported per bus */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    41
#define	CY_AS_MAX_STORAGE_DEVICES			(1)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    42
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    43
#define CY_AS_FUNCTCBTYPE_DATA_MASK (0x60000000U)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    44
#define CY_AS_FUNCTCBTYPE_TYPE_MASK (0x1FFFFFFFU)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    45
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    46
#define CyAsFunctCBTypeGetType(t) ((CyAsFunctCBType)((t) & CY_AS_FUNCTCBTYPE_TYPE_MASK))
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    47
#define CyAsFunctCBTypeContainsData(t) (((CyAsFunctCBType)((t) & CY_AS_FUNCTCBTYPE_DATA_MASK)) == CY_FUNCT_CB_DATA)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    48
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    49
/*****************************************************************************
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    50
 * West Bridge Types
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    51
 ****************************************************************************/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    52
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    53
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    54
   Specifies a handle to an West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    55
   
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    56
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    57
   This type represents an opaque handle to an West Bridge device.  This handle is
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    58
   created via the CyAsMiscCreateDevice() function and is used in all subsequent
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    59
   calls that communicate to the West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    60
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    61
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    62
   * CyAsMiscCreateDevice
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    63
   * CyAsMiscDestroyDevice
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    64
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    65
typedef void * CyAsDeviceHandle ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    68
   This data type gives the mode for the DACK# signal
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    69
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    70
typedef enum CyAsDeviceDackMode
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    71
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    72
    CyAsDeviceDackAck,		    /* Operate in the ACK mode */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    73
    CyAsDeviceDackEob		    /* Operate in the EOB mode */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    74
} CyAsDeviceDackMode ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    75
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    76
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    77
   This data structure gives the options for all hardware features.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    80
   This structure contains the information required to initialize the West Bridge hardware.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    81
   Any features of the device that can be configured by the caller are specified here.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    82
   
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    83
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    84
   * CyAsMiscConfigure
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    85
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    86
typedef struct CyAsDeviceConfig
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    87
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    88
    CyBool                              srammode ;      /* If TRUE, the P port is running in SRAM mode. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    89
    CyBool				sync ;		/* If TRUE, the P port is synchronous, otherwise async */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    90
    CyBool				dmaintr ;	/* If TRUE, DMA req will be delivered via the interrupt signal */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    91
    CyAsDeviceDackMode			dackmode ;	/* Mode for the DACK# signal */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    92
    CyBool				drqpol ;	/* If TRUE, the DRQ line is active high, otherwise active low */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    93
    CyBool				dackpol ;	/* If TRUE, the DACK line is active high, otherwise active low */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    94
    CyBool				crystal ;	/* If TRUE, the clock is connected to a crystal, otherwise it is
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    95
							   connected to a clock */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    96
} CyAsDeviceConfig ;
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    99
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   100
   Specifies a resource that can be owned by either the West Bridge device or by the processor.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   101
 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   102
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   103
   This enumerated type identifies a resource that can be owned either by
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   104
   the West Bridge device, or by the processor attached to the P port of the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   105
   West Bridge device.
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   108
   * CyAsMiscAcquireResource
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   109
   * CyAsMiscReleaseResource
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   110
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   111
typedef enum CyAsResourceType
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
    CyAsBusUSB = 0, /* The USB D+ and D- pins */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   114
    CyAsBus_1  = 1, /* The SDIO bus */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   115
    CyAsBus_0  = 2	/* The NAND bus (not implemented) */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   116
} CyAsResourceType;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   117
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   118
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   119
   Specifies the reset type for a software reset operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   120
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   121
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   122
   When the West Bridge device is reset, there are two types of reset that are
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   123
   possible.  This type indicates the type of reset requested.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   124
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   125
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   126
   Both of these reset types are software based resets; and are distinct from
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   127
   a chip level HARD reset that is applied through the reset pin on the West Bridge.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   128
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   129
   The CyAsResetSoft type resets only the on-chip micro-controller in the West Bridge.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   130
   In this case, the previously loaded firmware will continue running. However,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   131
   the Storage and USB stack operations will need to be restarted, as any state
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   132
   relating to these would have been lost.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   133
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   134
   The CyAsResetHard type resets the entire West Bridge chip, and will need a fresh
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   135
   configuration and firmware download.  
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   136
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   137
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   138
   * <LINK CyAsMiscReset>
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   139
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   140
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   141
typedef enum CyAsResetType
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   142
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   143
    CyAsResetSoft,					/* Just resets the West Bridge micro-controller */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   144
    CyAsResetHard					/* Resets entire device, firmware must be reloaded and
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   145
							   the West Bridge device must be re-initialized */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   146
} CyAsResetType;
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   149
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   150
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   151
   This type specifies the polarity of the SD power pin.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   152
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   153
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   154
   Sets the SD power pin ( port C, bit 6) to active low or active high.
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
*/
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
typedef enum CyAsMiscSignalPolarity
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   159
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   160
    CyAsMiscActiveHigh,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   161
    CyAsMiscActiveLow
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   162
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   163
} CyAsMiscSignalPolarity ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   164
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   165
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   166
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   167
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   168
   This type specifies the type of the data returned by a Function Callback.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   169
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   170
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   171
   CY_FUNCT_CB_NODATA - This callback does not return any additional information in the data field.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   172
   CY_FUNCT_CB_DATA   - The data field is used, and the CyAsFunctCBType will also contain the type of this data.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   173
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   174
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   175
   CyAsFunctionCallback
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   176
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   177
typedef enum CyAsFunctCBType
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   178
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   179
    CY_FUNCT_CB_INVALID = 0x0U, 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   180
    CY_FUNCT_CB_MISC_GETFIRMWAREVERSION,        /* Data from a CyAsMiscGetFirmwareVersion call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   181
    CY_FUNCT_CB_MISC_HEARTBEATCONTROL,          /* Data from a CyAsMiscHeartBeatControl call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   182
    CY_FUNCT_CB_MISC_ACQUIRERESOURCE,           /* Data from a CyAsMiscAcquireResource call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   183
    CY_FUNCT_CB_MISC_READMCUREGISTER,           /* Data from a CyAsMiscReadMCURegister call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   184
    CY_FUNCT_CB_MISC_WRITEMCUREGISTER,          /* Data from a CyAsMiscWriteMCURegister call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   185
    CY_FUNCT_CB_MISC_SETTRACELEVEL,             /* Data from a CyAsMiscSetTraceLevel call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   186
    CY_FUNCT_CB_MISC_STORAGECHANGED,            /* Data from a CyAsMiscStorageChanged call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   187
    CY_FUNCT_CB_MISC_GETGPIOVALUE,              /* Data from a CyAsMiscGetGpioValue call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   188
    CY_FUNCT_CB_MISC_SETGPIOVALUE,              /* Data from a CyAsMiscSetGpioValue call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   189
    CY_FUNCT_CB_MISC_DOWNLOADFIRMWARE,          /* Data from a CyAsMiscDownloadFirmware call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   190
    CY_FUNCT_CB_MISC_ENTERSTANDBY,		/* Data from a CyAsMiscEnterStandby call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   191
    CY_FUNCT_CB_MISC_ENTERSUSPEND,              /* Data from a CyAsMiscEnterSuspend call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   192
    CY_FUNCT_CB_MISC_LEAVESUSPEND,              /* Data from a CyAsMiscLeaveSuspend call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   193
    CY_FUNCT_CB_MISC_RESET,                     /* Data from a CyAsMiscReset call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   194
    CY_FUNCT_CB_MISC_SETSDFREQ,                 /* Data from a CyAsMiscSetLowSpeedSDFreq or CyAsMiscSetHighSpeedSDFreq call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   195
    CY_FUNCT_CB_MISC_RESERVELNABOOTAREA,        /* Data from a CyAsMiscSwitchPnandMode call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   196
    CY_FUNCT_CB_MISC_SETSDPOLARITY,             /* Data from a CyAsMiscSetSDPowerPolarity call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   197
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   198
    CY_FUNCT_CB_STOR_START,                     /* Data from a CyAsStorageStart call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   199
    CY_FUNCT_CB_STOR_STOP,                      /* Data from a CyAsStorageStop call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   200
    CY_FUNCT_CB_STOR_CLAIM,                     /* Data from a CyAsStorageClaim call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   201
    CY_FUNCT_CB_STOR_RELEASE,                   /* Data from a CyAsStorageRelease call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   202
    CY_FUNCT_CB_STOR_QUERYMEDIA,                /* Data from a CyAsStorageQueryMedia call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   203
    CY_FUNCT_CB_STOR_QUERYBUS,                  /* Data from a CyAsStorageQueryBus call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   204
    CY_FUNCT_CB_STOR_QUERYDEVICE,               /* Data from a CyAsStorageQueryDevice call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   205
    CY_FUNCT_CB_STOR_QUERYUNIT,                 /* Data from a CyAsStorageQueryUnit call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   206
    CY_FUNCT_CB_STOR_DEVICECONTROL,             /* Data from a CyAsStorageDeviceControl call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   207
    CY_FUNCT_CB_STOR_SDREGISTERREAD,            /* Data from a CyAsStorageSDRegisterRead call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   208
    CY_FUNCT_CB_STOR_PARTITION,                 /* Data from a CyAsStorageCreatePartition call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   209
    CY_FUNCT_CB_STOR_GETTRANSFERAMOUNT,		/* Data from a CyAsStorageGetTransferAmount call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   210
    CY_FUNCT_CB_STOR_ERASE,			/* Data from a CyAsStorageErase call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   211
    CY_FUNCT_CB_ABORT_P2S_XFER,                 /* Data from a CyAsStorageCancelAsync call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   212
    CY_FUNCT_CB_USB_START,                      /* Data from a CyAsUsbStart call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   213
    CY_FUNCT_CB_USB_STOP,                       /* Data from a CyAsUsbStop call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   214
    CY_FUNCT_CB_USB_CONNECT,                    /* Data from a CyAsUsbConnect call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   215
    CY_FUNCT_CB_USB_DISCONNECT,                 /* Data from a CyAsUsbDisconnect call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   216
    CY_FUNCT_CB_USB_SETENUMCONFIG,              /* Data from a CyAsUsbSetEnumConfig call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   217
    CY_FUNCT_CB_USB_GETENUMCONFIG,              /* Data from a CyAsUsbGetEnumConfig call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   218
    CY_FUNCT_CB_USB_SETDESCRIPTOR,              /* Data from a CyAsUsbSetDescriptor call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   219
    CY_FUNCT_CB_USB_GETDESCRIPTOR,              /* Data from a CyAsUsbGetDescriptor call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   220
    CY_FUNCT_CB_USB_COMMITCONFIG,               /* Data from a CyAsUsbCommitConfig call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   221
    CY_FUNCT_CB_USB_GETNAK,			/* Data from a CyAsUsbGetNak call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   222
    CY_FUNCT_CB_USB_GETSTALL,			/* Data from a CyAsUsbGetStall call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   223
    CY_FUNCT_CB_USB_SIGNALREMOTEWAKEUP,         /* Data from a CyAsUsbSignalRemoteWakeup call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   224
    CY_FUNCT_CB_USB_CLEARDESCRIPTORS,           /* Data from a CyAnUsbClearDescriptors call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   225
    CY_FUNCT_CB_USB_SET_MSREPORT_THRESHOLD,     /* Data from a CyAnUsbSetMSReportThreshold call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   226
    CY_FUNCT_CB_MTP_START,			/* Data from a CyAsMTPStart call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   227
    CY_FUNCT_CB_MTP_STOP,			/* Data from a CyAsMTPStop call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   228
    CY_FUNCT_CB_MTP_INIT_SEND_OBJECT,		/* Data from a CyAsMTPInitSendObject call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   229
    CY_FUNCT_CB_MTP_CANCEL_SEND_OBJECT,		/* Data from a CyAsMTPCancelSendObject call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   230
    CY_FUNCT_CB_MTP_INIT_GET_OBJECT,		/* Data from a CyAsMTPInitGetObject call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   231
    CY_FUNCT_CB_MTP_CANCEL_GET_OBJECT,		/* Data from a CyAsMTPCancelGetObject call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   232
    CY_FUNCT_CB_MTP_SEND_BLOCK_TABLE,		/* Data from a CyAsMTPSendBlockTable call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   233
    CY_FUNCT_CB_MTP_STOP_STORAGE_ONLY,		/* Data from a CyAsMTPStopStorageOnly call. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   234
    CY_FUNCT_CB_NODATA = 0x40000000U,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   235
    CY_FUNCT_CB_DATA =   0x20000000U
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   236
} CyAsFunctCBType ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   237
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   238
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   239
   This type specifies the general West Bridge function callback.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   240
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   241
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   242
   This callback is supplied as an argument to all asynchronous functions in the API. It is
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   243
   called after the asynchronous function has completed. 
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
   CyAsFunctCBType
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   247
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   248
typedef void (*CyAsFunctionCallback)(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   249
    CyAsDeviceHandle	handle,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   250
    CyAsReturnStatus_t	status,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   251
    uint32_t		client,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   252
    CyAsFunctCBType	type,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   253
    void*		data) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   254
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   255
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   256
   This type specifies the general West Bridge event that has occurred.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   259
   This type is used in the West Bridge misc callback function to indicate the type
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   260
   of callback.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   261
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   262
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   263
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   264
typedef enum CyAsMiscEventType
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   265
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   266
    CyAsEventMiscInitialized = 0,		/* This event is sent when West Bridge has finished
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   267
						   initialization and is ready to respond to 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   268
						   API calls. */
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
    CyAsEventMiscAwake,				/* This event is sent when West Bridge has left the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   271
						   standby state and is ready to respond to commands
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   272
						   again. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   273
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   274
    CyAsEventMiscHeartBeat,                     /* This event is sent periodically from the firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   275
                                                   to the processor. */
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
    CyAsEventMiscWakeup,                        /* This event is sent when the West Bridge has left the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   278
                                                   suspend mode and is ready to respond to commands
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   279
                                                   again. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   280
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   281
    CyAsEventMiscDeviceMismatch                 /* This event is sent when the firmware image downloaded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   282
                                                   cannot run on the active West Bridge device. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   283
} CyAsMiscEventType ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   284
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   285
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   286
   This type is the type of a callback function that is called when a West Bridge misc event occurs.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   287
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   288
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   289
   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
   290
   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
   291
   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
   292
   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
   293
   that must be provided as a callback function for West Bridge misc events.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   294
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   295
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   296
   * CyAsMiscEventType
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   297
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   298
typedef void (*CyAsMiscEventCallback)(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   299
    CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   300
    CyAsMiscEventType		ev,		/* The event type being reported */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   301
    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
   302
) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   303
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   304
#ifndef __doxygen__
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   305
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   306
   This enum provides info of various firmware trace levels.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   307
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   308
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   309
   
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   310
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   311
   * CyAsMiscSetTraceLevel
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
enum {
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   314
    CYAS_FW_TRACE_LOG_NONE = 0,         /* Log nothing. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   315
    CYAS_FW_TRACE_LOG_STATE,            /* Log state information. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   316
    CYAS_FW_TRACE_LOG_CALLS,            /* Log function calls. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   317
    CYAS_FW_TRACE_LOG_STACK_TRACE,      /* Log function calls with args. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   318
    CYAS_FW_TRACE_MAX_LEVEL             /* Max trace level sentinel. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   319
};
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   320
#endif
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   321
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   322
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   323
   This enum lists the controllable GPIOs of the West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   324
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   325
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   326
   The West Bridge device has GPIOs that can be used for user defined functions.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   327
   This enumeration lists the GPIOs that are available on the device.
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
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   330
   All of the GPIOs except UVALID can only be accessed when using West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   331
   firmware images that support only SD/MMC/MMC+ storage devices. This
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   332
   functionality is not supported in firmware images that support NAND
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   333
   storage.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   334
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   335
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   336
   * CyAsMiscGetGpioValue
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   337
   * CyAsMiscSetGpioValue
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   338
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   339
typedef enum {
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   340
    CyAsMiscGpio_0 = 0,                 /* GPIO[0] pin */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   341
    CyAsMiscGpio_1,                     /* GPIO[1] pin */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   342
    CyAsMiscGpio_Nand_CE,               /* NAND_CE pin, output only */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   343
    CyAsMiscGpio_Nand_CE2,              /* NAND_CE2 pin, output only */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   344
    CyAsMiscGpio_Nand_WP,               /* NAND_WP pin, output only */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   345
    CyAsMiscGpio_Nand_CLE,              /* NAND_CLE pin, output only */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   346
    CyAsMiscGpio_Nand_ALE,              /* NAND_ALE pin, output only */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   347
    CyAsMiscGpio_SD_POW,                /* SD_POW pin, output only, do not drive low while storage is active */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   348
    CyAsMiscGpio_UValid                 /* UVALID pin */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   349
} CyAsMiscGpio;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   350
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   351
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   352
   This enum lists the set of clock frequencies that are supported for working
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   353
   with low speed SD media.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   354
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   355
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   356
   West Bridge firmware uses a clock frequency less than the maximum possible rate
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   357
   for low speed SD media.  This can be changed to a setting equal to the maximum
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   358
   frequency as desired by the user.  This enumeration lists the different
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   359
   frequency settings that are supported.
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
   * CyAsMiscSetLowSpeedSDFreq
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   363
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   364
typedef enum CyAsLowSpeedSDFreq
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
    CY_AS_SD_DEFAULT_FREQ = 0,          /* Approx. 21.82 MHz, default value */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   367
    CY_AS_SD_RATED_FREQ                 /* 24 MHz */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   368
} CyAsLowSpeedSDFreq ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   369
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   370
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   371
   This enum lists the set of clock frequencies that are supported for working
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   372
   with high speed SD media.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   373
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   374
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   375
   West Bridge firmware uses a 48 MHz clock by default to interface with high speed
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   376
   SD/MMC media.  This can be changed to 24 MHz if so desired by the user.  This enum
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   377
   lists the different frequencies that are supported.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   378
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   379
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   380
   * CyAsMiscSetHighSpeedSDFreq
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   381
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   382
typedef enum CyAsHighSpeedSDFreq
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
    CY_AS_HS_SD_FREQ_48,                /* 48 MHz, default value */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   385
    CY_AS_HS_SD_FREQ_24                 /* 24 MHz */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   386
} CyAsHighSpeedSDFreq ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   387
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   388
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   389
   Struct encapsulating all information returned by the CyAsMiscGetFirmwareVersion call.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   390
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   391
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   392
   This struct encapsulates all return values from the asynchronous
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   393
   CyAsMiscGetFirmwareVersion call, so that a single data argument can be
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   394
   passed to the user provided callback function.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   395
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   396
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   397
   * CyAsMiscGetFirmwareVersion
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   398
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   399
typedef struct CyAsGetFirmwareVersionData
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   400
{
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   401
    uint16_t 	major;		/* Return value for major version number for the firmware */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   402
    uint16_t 	minor;		/* Return value for minor version number for the firmware */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   403
    uint16_t 	build;		/* Return value for build version number for the firmware */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   404
    uint8_t     mediaType;      /* Return value for media types supported in the current firmware */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   405
    CyBool	isDebugMode;    /* Return value to indicate the release or debug mode of firmware */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   406
} CyAsGetFirmwareVersionData ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   407
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   408
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   409
/*****************************************************************************
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   410
 * West Bridge Functions
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   411
 ****************************************************************************/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   412
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   413
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   414
   This function creates a new West Bridge device and returns a handle to the device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   415
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   416
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   417
   This function initializes the API object that represents the West Bridge device and
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   418
   returns a handle to this device.  This handle is required for all West Bridge related
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   419
   functions to identify the specific West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   420
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   421
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   422
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   423
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   424
   * CY_AS_ERROR_SUCCESS
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   425
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   426
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   427
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   428
CyAsMiscCreateDevice(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   429
        CyAsDeviceHandle *		handle_p,	/* Return value for handle to created device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   430
        CyAsHalDeviceTag		tag		/* The HAL specific tag for this device */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   433
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   434
   This functions destroys a previously created West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   435
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   436
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   437
   When an West Bridge device is created, an opaque handle is returned that represents
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   438
   the device.  This function destroys that handle and frees all resources associated
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   439
   with the handle.
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
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   442
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   443
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   444
   * CY_AS_ERROR_SUCCESS
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   445
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   446
   * CY_AS_ERROR_STILL_RUNNING - The USB or STORAGE stacks are still running, they must be stopped before the device can be destroyed
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   447
   * CY_AS_ERROR_DESTROY_SLEEP_CHANNEL_FAILED - the HAL layer failed to destroy a sleep channel
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
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   450
CyAsMiscDestroyDevice(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   451
        CyAsDeviceHandle		handle		/* Handle to the device to destroy */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   452
        ) ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   455
   This function initializes the hardware for basic communication with West Bridge.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   456
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   457
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   458
   This function intializes the hardware to establish basic communication with
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   459
   the West Bridge device.  This is always the first function called to initialize
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   460
   communication with the West Bridge device.
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
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   463
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   464
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   465
   * CY_AS_ERROR_SUCCESS - the basic initialization was completed
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   466
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   467
   * CY_AS_ERROR_IN_STANDBY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   468
   * CY_AS_ERROR_ALREADY_RUNNING
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   469
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   470
   * CY_AS_ERROR_NO_ANTIOCH - cannot find the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   471
   * CY_AS_ERROR_CREATE_SLEEP_CHANNEL_FAILED - the HAL layer falied to create a sleep channel
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   472
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   473
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   474
   * CyAsDeviceConfig
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
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   477
CyAsMiscConfigureDevice(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   478
        CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   479
        CyAsDeviceConfig		*config_p	/* Configuration information */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   480
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   481
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   482
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   483
   This function returns non-zero if West Bridge is in standby and zero otherwise.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   484
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   485
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   486
   West Bridge supports a standby mode.  This function is used to query West Bridge to determine
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   487
   if West Bridge is in a standby mode.
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   490
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   491
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   492
   * CY_AS_ERROR_SUCCESS
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   493
   * CY_AS_ERROR_INVALID_HANDLE
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
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   496
CyAsMiscInStandby(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   497
        CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   498
        CyBool			        *standby	/* Return value for standby state */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   499
        ) ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   502
   This function downloads the firmware to West Bridge device.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   505
   This function downloads firmware from a given location and with a given size
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   506
   to the West Bridge device.  After the firmware is downloaded the West Bridge device is
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   507
   moved out of configuration mode causing the firmware to be executed.  It is an
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   508
   error to call this function when the device is not in configuration mode.  The
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   509
   device is in configuration mode on power up and may be placed in configuration
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   510
   mode after power up with a hard reset.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   511
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   512
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   513
   The firmware must be on a word align boundary.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   514
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   515
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   516
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   517
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   518
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   519
   * CY_AS_ERROR_SUCCESS - the firmware was sucessfully downloaded
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   520
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   521
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device was not configured
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   522
   * CY_AS_ERROR_NOT_IN_CONFIG_MODE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   523
   * CY_AS_ERROR_INVALID_SIZE - the size of the firmware exceeded 32768 bytes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   524
   * CY_AS_ERROR_ALIGNMENT_ERROR
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   525
   * CY_AS_ERROR_IN_STANDBY - trying to download while in standby mode
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   526
   * CY_AS_ERROR_TIMEOUT
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   529
   * CyAsMiscReset
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   530
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   531
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   532
CyAsMiscDownloadFirmware(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   533
        CyAsDeviceHandle	  handle,	/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   534
        const void 			  *fw_p,	/* Pointer to the firmware to be downloaded */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   535
        uint16_t			  size,		/* The size of the firmware in bytes */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   536
        CyAsFunctionCallback  cb,       /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   537
        uint32_t			  client    /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   538
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   539
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   540
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   541
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   542
   This function returns the version number of the firmware running in the West Bridge device.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   545
   This function queries the West Bridge device and retreives the firmware version number.  If
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   546
   the firmware is not loaded an error is returned indicated no firmware has been loaded.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   547
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   548
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   549
   * Nestable: YES
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
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   552
   * CY_AS_ERROR_SUCCESS - the firmware version number was retreived
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   553
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   554
   * CY_AS_ERROR_NOT_CONFIGURED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   555
   * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been downloaded to the device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   556
   * CY_AS_ERROR_IN_STANDBY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   557
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   558
   * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
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
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   561
CyAsMiscGetFirmwareVersion(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   562
        CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   563
        CyAsGetFirmwareVersionData*	data,           /* Return values indicating the firmware version. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   564
        CyAsFunctionCallback	        cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   565
        uint32_t			client          /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   566
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   567
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   568
#if !defined(__doxygen__)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   569
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   570
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   571
   This function reads and returns the contents of an MCU accessible register on the West Bridge.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   572
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   573
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   574
   This function requests the firmware to read and return the contents of an MCU accessible
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   575
   register through the mailboxes.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   576
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   577
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   578
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   579
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   580
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   581
   * CY_AS_ERROR_SUCCESS - the register content was retrieved.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   582
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   583
   * CY_AS_ERROR_NOT_CONFIGURED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   584
   * CY_AS_ERROR_NO_FIRMWARE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   585
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   586
   * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   587
   * CY_AS_ERROR_INVALID_RESPONSE - the firmware build does not support this command.
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
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   590
CyAsMiscReadMCURegister(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   591
	CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   592
	uint16_t			address,	/* Address of the register to read */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   593
	uint8_t				*value,		/* Return value for the MCU register content */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   594
	CyAsFunctionCallback		cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   595
	uint32_t			client          /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   596
	) ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   599
   This function writes to an MCU accessible register on the West Bridge.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   602
   This function requests the firmware to write a specified value to an MCU accessible
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   603
   register through the mailboxes.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   604
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   605
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   606
   * Nestable: YES
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
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   609
   This function is only for internal use by the West Bridge API layer.  Calling
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   610
   this function directly can cause device malfunction.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   611
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   612
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   613
   * CY_AS_ERROR_SUCCESS - the register content was updated.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   614
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   615
   * CY_AS_ERROR_NOT_CONFIGURED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   616
   * CY_AS_ERROR_NO_FIRMWARE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   617
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   618
   * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   619
   * CY_AS_ERROR_INVALID_RESPONSE - the firmware build does not support this command.
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
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   622
CyAsMiscWriteMCURegister(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   623
        CyAsDeviceHandle        handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   624
        uint16_t                address,        /* Address of the register to write */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   625
        uint8_t			mask,           /* Mask to be applied on the register contents. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   626
        uint8_t                 value,          /* Data to be ORed with the register contents. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   627
        CyAsFunctionCallback	cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   628
        uint32_t		client          /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   629
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   630
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   631
#endif
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   632
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   633
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   634
   This function will reset the West Bridge device and software API.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   635
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   636
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   637
   This function will reset the West Bridge device and software API.  The reset operation can be
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   638
   a hard reset or a soft reset.  A hard reset will reset all aspects of the West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   639
   The device will enter the configuration state and the firmware will have to be reloaded.  The
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   640
   device will also have to be re-initialized.  A soft reset just resets the West Bridge micro-
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   641
   controller.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   642
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   643
   * Valid In Asynchronous Callback: NO
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
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   646
   When a hard reset is issued, the firmware that may have been previously loaded will be lost
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   647
   and any configuration information set via CyAsMiscConfigureDevice() will be lost.  This will be
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   648
   reflected in the API maintained state of the device.  In order to re-establish communications 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   649
   with the West Bridge device, CyAsMiscConfigureDevice() and CyAsMiscDownloadFirmware() must be 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   650
   called again.
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
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   654
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   655
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   656
   * CY_AS_ERROR_SUCCESS - the device has been reset
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   657
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   658
   * CY_AS_ERROR_NOT_CONFIGURED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   659
   * CY_AS_ERROR_NO_FIRMWARE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   660
   * CY_AS_ERROR_NOT_YET_SUPPORTED - current soft reset is not supported
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   661
   * CY_AS_ERROR_ASYNC_PENDING - Reset is unable to flush pending async reads/writes in polling mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   662
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   663
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   664
      See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   665
   * CyAsMiscReset
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   666
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   667
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   668
CyAsMiscReset(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   669
	CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   670
	CyAsResetType			type,		/* The type of reset to perform */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   671
	CyBool				flush,		/* If true, flush all pending writes to mass storage
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   672
							   before performing the reset. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   673
	CyAsFunctionCallback		cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   674
	uint32_t			client          /* Client data to be passed to the callback. */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   677
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   678
   This function acquires a given resource.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   679
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   680
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   681
   There are resources in the system that are shared between the West Bridge device and the processor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   682
   attached to the P port of the West Bridge device.  This API provides a mechanism for the P port
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   683
   processor to acquire ownership of a resource.
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
   The ownership of the resources controlled by CyAsMiscAcquireResource() and CyAsMiscReleaseResource()
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   687
   defaults to a known state at hardware reset.  After the firmware is loaded and begins execution the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   688
   state of these resources may change.  At any point if the P Port processor needs to acquire a resource
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   689
   it should do so explicitly to be sure of ownership.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   690
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   691
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   692
   * CY_AS_ERROR_SUCCESS - the p port sucessfully acquired the resource of interest
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   693
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   694
   * CY_AS_ERROR_NOT_CONFIGURED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   695
   * CY_AS_ERROR_NO_FIRMWARE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   696
   * CY_AS_ERROR_INVALID_RESOURCE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   697
   * CY_AS_ERROR_RESOURCE_ALREADY_OWNED - the p port already owns this resource
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   698
   * CY_AS_ERROR_NOT_ACQUIRED - the resource cannot be acquired
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   699
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   700
   * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   701
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   702
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   703
   * CyAsResourceType
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   704
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   705
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   706
CyAsMiscAcquireResource(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   707
	CyAsDeviceHandle	handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   708
	CyAsResourceType	*resource,	/* The resource to acquire */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   709
	CyBool				force,		/* If true, force West Bridge to release the resource */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   710
	CyAsFunctionCallback cb,        /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   711
	uint32_t			client      /* Client data to be passed to the callback. */
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 releases a given resource.
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
   There are resources in the system that are shared between the West Bridge device and the processor
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   719
   attached to the P port of the West Bridge device.  This API provides a mechanism for the P port
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   720
   processor to release a resource that has previously been acquired via the CyAsMiscAcquireResource()
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   721
   call.
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: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   724
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   725
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   726
   * CY_AS_ERROR_SUCCESS - the p port sucessfully released the resource of interest
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   727
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   728
   * CY_AS_ERROR_NOT_CONFIGURED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   729
   * CY_AS_ERROR_NO_FIRMWARE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   730
   * CY_AS_ERROR_INVALID_RESOURCE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   731
   * CY_AS_ERROR_RESOURCE_NOT_OWNED - the p port does not own the resource of interest
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   732
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   733
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   734
   * CyAsResourceType
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   735
   * CyAsMiscAcquireResource
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   736
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   737
EXTERN CyAsReturnStatus_t 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   738
CyAsMiscReleaseResource(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   739
	CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   740
	CyAsResourceType		resource	/* The resource to release */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   741
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   742
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   743
#ifndef __doxygen__
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 function sets the trace level for the West Bridge firmware.
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
   The West Bridge firmware has the ability to store information about the state and execution path
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   749
   of the firmware on a mass storage device attached to the West Bridge device.  This function 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   750
   configures the specific mass storage device to be used and the type of information to be
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   751
   stored.  This state information is used for debugging purposes and must be interpreted by a
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   752
   Cypress provided tool.
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
   *Trace Level*
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   755
   The trace level indicates the amount of information to output.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   756
   * 0 = no trace information is output
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   757
   * 1 = state information is output
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   758
   * 2 = function call information is output
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   759
   * 3 = function call, arguments, and return value information is output
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
   * Valid In Asynchronous Callback: NO
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
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   764
   The media device and unit specified in this call will be overwritten and any data currently stored
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   765
   on this device and unit will be lost.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   766
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   767
   * NOT IMPLEMENTED YET
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   768
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   769
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   770
   * CY_AS_ERROR_SUCCESS - the trace configuration has been sucessfully changed
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   771
   * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   772
   * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   773
   * CY_AS_ERROR_NO_SUCH_UNIT - the unit specified does not exist
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   774
   * CY_AS_ERROR_INVALID_TRACE_LEVEL - the trace level requested does not exist
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   775
   * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   776
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   777
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   778
CyAsMiscSetTraceLevel(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   779
	CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   780
	uint8_t				level,		/* The trace level */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   781
	CyAsBusNumber_t			bus,		/* The bus for the output */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   782
	uint32_t 			device,		/* The device for the output */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   783
	uint32_t			unit,		/* The unit for the output */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   784
	CyAsFunctionCallback		cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   785
	uint32_t			client          /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   786
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   787
#endif
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   790
   This function places West Bridge into the low power standby mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   791
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   792
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   793
   This function places West Bridge into a low power (sleep) mode, and cannot be called while the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   794
   USB stack is active.  This function first instructs the West Bridge firmware that the device is
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   795
   about to be placed into sleep mode.  This allows West Bridge to complete any pending storage
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   796
   operations.  After the West Bridge device has responded that pending operations are complete,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   797
   the device is placed in standby mode.
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
   There are two methods of placing the device in standby mode.  If the WAKEUP pin of the West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   800
   is connected to a GPIO on the processor, the pin is de-asserted (via the HAL layer) and West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   801
   enters into a sleep mode.  If the WAKEUP pin is not accessible, the processor can write into
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   802
   the power management control/status register on the West Bridge to put the device into sleep mode.
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
   * Valid In Asynchronous Callback: YES (if cb supplied)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   805
   * Nestable: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   806
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   807
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   808
   * CY_AS_ERROR_SUCCESS - the function completed and West Bridge is in sleep mode
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   809
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   810
   * CY_AS_ERROR_ALREADY_STANDBY - the West Bridge device is already in sleep mode
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   811
   * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   812
   * CY_AS_ERROR_NOT_SUPPORTED - the HAL layer does not support changing the WAKEUP pin
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   813
   * CY_AS_ERROR_USB_RUNNING - The USB stack is still running when the EnterStandby call is made
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   814
   * CY_AS_ERROR_ASYNC_PENDING
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   815
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   816
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   817
   * CY_AS_ERROR_SETTING_WAKEUP_PIN
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   818
   * CY_AS_ERROR_ASYNC_PENDING - In polling mode EnterStandby can not be called until all pending
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   819
				 storage read/write requests have finished.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   820
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   821
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   822
   * CyAsMiscLeaveStandby
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   823
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   824
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   825
CyAsMiscEnterStandbyEXU(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   826
	CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   827
	CyBool				pin,		/* If true, use the wakeup pin, otherwise use the register */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   828
	CyBool				uvalid_special,	/* Set true to enable specific usages of the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   829
							   UVALID signal, please refer to AN xx or ERRATA xx */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   830
	CyAsFunctionCallback		cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   831
	uint32_t			client          /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   832
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   833
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   834
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   835
   This function is provided for backwards compatibility.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   836
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   837
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   838
   Calling this function is the same as calling CyAsMiscEnterStandbyEx with True for the lowpower parameter.
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   841
   * CyAsMiscEnterStandbyEx
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   842
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   843
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   844
CyAsMiscEnterStandby(CyAsDeviceHandle handle, 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   845
			CyBool pin,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   846
			CyAsFunctionCallback cb,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   847
			uint32_t client
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   850
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   851
   This function brings West Bridge out of sleep mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   852
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   853
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   854
   This function asserts the WAKEUP pin (via the HAL layer).  This brings the West Bridge out of the sleep
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   855
   state and allows the West Bridge firmware to process the event causing the wakeup.  When all processing
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   856
   associated with the wakeup is complete, a callback function is called to tell the P port software that
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   857
   the firmware processing associated with wakeup is complete.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   858
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   859
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   860
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   861
   Returns:
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   862
   * CY_AS_ERROR_SUCCESS - the function completed and West Bridge is in sleep mode
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   863
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   864
   * CY_AS_ERROR_SETTING_WAKEUP_PIN
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   865
   * CY_AS_ERROR_NOT_IN_STANDBY - the West Bridge device is not in the sleep state
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   866
   * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   867
   * CY_AS_ERROR_NOT_SUPPORTED - the HAL layer does not support changing the WAKEUP pin
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   868
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   869
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   870
   * CyAsMiscEnterStandby
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   871
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   872
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   873
CyAsMiscLeaveStandby(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   874
	CyAsDeviceHandle		handle,		/* Handle to the device to configure */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   875
	CyAsResourceType		resource	/* The resource causing the wakeup */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   876
	) ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   879
   This function registers a callback function to be called when an asynchronous West Bridge MISC event occurs.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   880
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   881
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   882
   When asynchronous misc 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
   883
   functions allows the calling program to register a callback.
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
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   886
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   887
   Returns:
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   888
   * CY_AS_ERROR_SUCCESS
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   889
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   890
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   891
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   892
CyAsMiscRegisterCallback(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   893
	CyAsDeviceHandle		handle,		/* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   894
	CyAsMiscEventCallback		callback	/* The function to call */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   895
	) ;
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
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   898
   This function sets the logging level for log messages.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   899
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   900
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   901
   The API can print messages via the CyAsHalPrintMessage capability.  This function sets the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   902
   level of detail seen when printing messages from the API.
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
   * Valid In Asynchronous Callback:NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   905
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   906
EXTERN void
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   907
CyAsMiscSetLogLevel(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   908
	uint8_t				level		/* Level to set, 0 is fewer messages, 255 is all */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   909
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   910
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   911
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   912
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   913
   This function tells West Bridge that SD or MMC media has been inserted or removed.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   914
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   915
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   916
   In some hardware configurations, SD or MMC media detection is handled outside of the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   917
   West Bridge device.  This function is called when a change is detected to inform the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   918
   West Bridge firmware to check for storage media changes.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   919
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   920
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   921
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   922
   Returns:
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   923
   * CY_AS_ERROR_SUCCESS
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   924
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   925
   * CY_AS_ERROR_NOT_CONFIGURED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   926
   * CY_AS_ERROR_NO_FIRMWARE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   927
   * CY_AS_ERROR_IN_STANDBY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   928
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   929
   * CY_AS_ERROR_INVALID_RESPONSE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   930
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   931
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   932
   * CyAsMiscStorageChanged
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   933
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   934
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   935
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   936
CyAsMiscStorageChanged(	
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   937
	CyAsDeviceHandle		handle,	        /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   938
	CyAsFunctionCallback		cb,		/* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   939
	uint32_t			client		/* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   940
	) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   941
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   942
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   943
   This function instructs the West Bridge firmware to start/stop sending periodic
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   944
   heartbeat messages to the processor.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   947
   The West Bridge firmware can send heartbeat messages through the mailbox register
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   948
   once every 500 ms. This message can be an overhead as it causes regular Mailbox
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   949
   interrupts to happen, and is turned off by default. The message can be used to
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   950
   test and verify that the West Bridge firmware is alive. This API can be used to
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   951
   enable or disable the heartbeat message.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   952
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   953
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   954
 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   955
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   956
   * CY_AS_ERROR_SUCCESS - the function completed successfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   957
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   958
   * CY_AS_ERROR_NOT_CONFIGURED
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   959
   * CY_AS_ERROR_NO_FIRMWARE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   960
   * CY_AS_ERROR_OUT_OF_MEMORY
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   961
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured yet
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   962
   * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   963
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   964
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   965
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   966
CyAsMiscHeartBeatControl(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   967
        CyAsDeviceHandle                handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   968
        CyBool                          enable,         /* Message enable/disable selection */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   969
	CyAsFunctionCallback		cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   970
	uint32_t			client          /* Client data to be passed to the callback. */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   973
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   974
   This function gets the current state of a GPIO pin on the West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   975
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   976
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   977
   The West Bridge device has GPIO pins that can be used for user defined functions.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   978
   This function gets the current state of the specified GPIO pin. Calling this
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   979
   function will configure the corresponding pin as an input.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   980
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   981
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   982
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   983
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   984
   Only GPIO[0], GPIO[1] and UVALID pins can be used as GP inputs. Of these pins,
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   985
   only the UVALID pin is supported by firmware images that include NAND storage
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   986
   support.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   987
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   988
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   989
   * CY_AS_ERROR_SUCCESS - the function completed successfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   990
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   991
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured yet
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   992
   * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   993
   * CY_AS_ERROR_BAD_INDEX - an invalid GPIO was specified
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   994
   * CY_AS_ERROR_NOT_SUPPORTED - this feature is not supported by the firmware
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   995
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   996
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   997
   * CyAsMiscGpio
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
   998
   * CyAsMiscSetGpioValue
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
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1001
CyAsMiscGetGpioValue(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1002
        CyAsDeviceHandle                handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1003
        CyAsMiscGpio                    pin,            /* Id of the GPIO pin to query */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1004
        uint8_t                        *value,          /* Current value of the GPIO pin */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1005
        CyAsFunctionCallback            cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1006
        uint32_t                        client          /* Client data to be passed to the callback. */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1009
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1010
   This function updates the state of a GPIO pin on the West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1011
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1012
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1013
   The West Bridge device has GPIO pins that can be used for user defined functions.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1014
   This function updates the output value driven on a specified GPIO pin. Calling this
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1015
   function will configure the corresponding pin as an output.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1016
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1017
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1018
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1019
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1020
   All of the pins listed under CyAsMiscGpio can be used as GP outputs. This feature
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1021
   is note supported by firmware images that include NAND storage device support.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1022
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1023
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1024
   * CY_AS_ERROR_SUCCESS - the function completed successfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1025
   * CY_AS_ERROR_INVALID_HANDLE
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1026
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured yet
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1027
   * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the West Bridge device
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1028
   * CY_AS_ERROR_BAD_INDEX - an invalid GPIO was specified
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1029
   * CY_AS_ERROR_NOT_SUPPORTED - this feature is not supported by firmware.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1030
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1031
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1032
   * CyAsMiscGpio
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1033
   * CyAsMiscGetGpioValue
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1034
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1035
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1036
CyAsMiscSetGpioValue(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1037
        CyAsDeviceHandle                handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1038
        CyAsMiscGpio                    pin,            /* Id of the GPIO pin to set */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1039
        uint8_t                         value,          /* Value to be set on the GPIO pin */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1040
        CyAsFunctionCallback            cb,             /* Callback to call when the operation is complete. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1041
        uint32_t                        client          /* Client data to be passed to the callback. */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1044
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1045
   Set the West Bridge device in the low power suspend mode.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1048
   The West Bridge device has a low power suspend mode where the USB core and the internal
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1049
   microcontroller are powered down.  This function sets the West Bridge device into this
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1050
   low power mode.  This mode can only be entered when there is no active USB connection;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1051
   i.e., when USB has not been connected or is suspended; and there are no pending USB
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1052
   or storage asynchronous calls.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1053
   The device will exit the suspend mode and resume handling USB and processor requests
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1054
   when any activity is detected on the CE#, D+/D- or GPIO[0] lines.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1055
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1056
   * Valid In Asynchronous Callback: NO
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
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1059
   The GPIO[0] pin needs to be configured as an input for the gpio wakeup to work.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1060
   This flag should not be enabled if the pin is being used as a GP output.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1061
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1062
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1063
   * CY_AS_ERROR_SUCCESS - the device was placed in suspend mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1064
   * CY_AS_ERROR_INVALID_HANDLE - the West Bridge handle passed in is invalid.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1065
   * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not yet been configured.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1066
   * CY_AS_ERROR_NO_FIRMWARE - no firmware has been downloaded to the device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1067
   * CY_AS_ERROR_IN_STANDBY - the device is already in sleep mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1068
   * CY_AS_ERROR_USB_CONNECTED - the USB connection is active.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1069
   * CY_AS_ERROR_ASYNC_PENDING - asynchronous storage/USB calls are pending.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1070
   * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1071
   * CY_AS_ERROR_INVALID_RESPONSE - command not recognised by firmware.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1072
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1073
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1074
   * CyAsMiscLeaveSuspend
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1075
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1076
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1077
CyAsMiscEnterSuspend(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1078
        CyAsDeviceHandle                handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1079
        CyBool                          usb_wakeup_en,  /* Control the USB wakeup source */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1080
        CyBool                          gpio_wakeup_en, /* Control the GPIO[0] wakeup source */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1081
        CyAsFunctionCallback            cb,             /* Callback to call when suspend mode entry is complete */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1082
        uint32_t                        client          /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1083
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1084
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1085
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1086
   Wake up the West Bridge device from suspend mode.
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
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1089
   This call wakes up the West Bridge device from suspend mode, and makes it ready
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1090
   for accepting other commands from the API.  A CyAsEventMiscWakeup event will
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1091
   be delivered to the callback registered with CyAsMiscRegisterCallback to
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1092
   indicate that the wake up is complete.
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
   The CyAsEventMiscWakeup event will also be delivered if the wakeup happens
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1095
   due to USB or GPIO activity.
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
   * Valid In Asynchronous Callback: NO
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1098
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1099
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1100
   * CY_AS_ERROR_SUCCESS - the device was woken up from suspend mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1101
   * CY_AS_ERROR_INVALID_HANDLE - invalid device handle passed in.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1102
   * 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
  1103
   * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1104
   * CY_AS_ERROR_NOT_IN_SUSPEND - the device is not in suspend mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1105
   * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1106
   * CY_AS_ERROR_TIMEOUT - failed to wake up the device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1107
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1108
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1109
   * CyAsMiscEnterSuspend
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1110
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1111
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1112
CyAsMiscLeaveSuspend(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1113
        CyAsDeviceHandle                handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1114
        CyAsFunctionCallback            cb,             /* Callback to call when device has resumed operation. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1115
        uint32_t                        client          /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1116
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1117
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1118
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1119
   Reserve first numzones zones of nand device for storing processor boot image. LNA firmware works 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1120
   on the first numzones zones of nand to enable the processor to boot.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1121
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1122
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1123
   This function reserves first numzones zones of nand device for storing processor boot image. 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1124
   This fonction MUST be completed before starting the storage stack for the setting to be taken 
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1125
   into account.
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
   * Valid In Asynchronous Callback: YES
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1128
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1129
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1130
   * CY_AS_ERROR_SUCCESS                   - zones are reserved.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1131
   
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1132
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1133
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1134
CyAsMiscReserveLNABootArea(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1135
        CyAsDeviceHandle     handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1136
        uint8_t numzones,                    /* number of nand zones to reserve */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1137
        CyAsFunctionCallback cb,             /* Callback to call when device has resumed operation. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1138
        uint32_t client                      /* Client data to be passed to the callback. */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1141
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1142
   Select the clock frequency to be used when talking to low speed (non-high speed)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1143
   SD media.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1144
   
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1145
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1146
   West Bridge firmware uses a clock frequency less than the maximum possible rate
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1147
   for low speed SD media.  This function selects the frequency setting from between
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1148
   the default speed and the maximum speed. This fonction MUST be completed before
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1149
   starting the storage stack for the setting to be taken into account.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1150
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1151
   * Valid in Asynchronous Callback: Yes (if cb is non-zero)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1152
   * Nestable: Yes
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
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1155
   * CY_AS_ERROR_SUCCESS - the operation completed successfully.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1156
   * CY_AS_ERROR_INVALID_HANDLE - invalid device handle passed in.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1157
   * 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
  1158
   * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1159
   * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1160
   * CY_AS_ERROR_IN_SUSPEND - West Bridge is in low power suspend mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1161
   * CY_AS_ERROR_INVALID_PARAMETER - invalid frequency setting desired.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1162
   * CY_AS_ERROR_TIMEOUT - West Bridge device did not respond to the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1163
   * CY_AS_ERROR_INVALID_RESPONSE - active firmware does not support the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1164
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1165
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1166
   * CyAsLowSpeedSDFreq
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1167
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1168
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1169
CyAsMiscSetLowSpeedSDFreq(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1170
        CyAsDeviceHandle                handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1171
        CyAsLowSpeedSDFreq              setting,        /* Frequency setting desired for low speed SD cards */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1172
        CyAsFunctionCallback            cb,             /* Callback to call on completion */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1173
        uint32_t                        client          /* Client data to be passed to the callback */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1174
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1175
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1176
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1177
   Select the clock frequency to be used when talking to high speed SD/MMC media.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1178
   
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1179
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1180
   West Bridge firmware uses a 48 MHz clock to interface with high speed SD/MMC
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1181
   media.  This clock rate can be restricted to 24 MHz if desired.  This function
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1182
   selects the frequency setting to be used. This fonction MUST be completed before
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1183
   starting the storage stack for the setting to be taken into account.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1184
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1185
   * Valid in Asynchronous Callback: Yes (if cb is non-zero)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1186
   * Nestable: Yes
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
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1189
   * CY_AS_ERROR_SUCCESS - the operation completed successfully.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1190
   * CY_AS_ERROR_INVALID_HANDLE - invalid device handle passed in.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1191
   * 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
  1192
   * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1193
   * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1194
   * CY_AS_ERROR_IN_SUSPEND - West Bridge is in low power suspend mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1195
   * CY_AS_ERROR_INVALID_PARAMETER - invalid frequency setting desired.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1196
   * CY_AS_ERROR_TIMEOUT - West Bridge device did not respond to the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1197
   * CY_AS_ERROR_INVALID_RESPONSE - active firmware does not support the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1198
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1199
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1200
   * CyAsLowSpeedSDFreq
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1201
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1202
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1203
CyAsMiscSetHighSpeedSDFreq(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1204
        CyAsDeviceHandle                handle,         /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1205
        CyAsHighSpeedSDFreq             setting,        /* Frequency setting desired for high speed SD cards */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1206
        CyAsFunctionCallback            cb,             /* Callback to call on completion */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1207
        uint32_t                        client          /* Client data to be passed to the callback */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1208
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1209
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1210
   Select the polarity of the SD_POW output driven by West Bridge.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1211
   
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1212
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1213
   The SD_POW signal driven by West Bridge can be used to control the supply
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1214
   of Vcc to the SD/MMC media connected to the device.  This signal is driven
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1215
   as an active high signal by default.  This function can be used to change the
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1216
   polarity of this signal if required. This fonction MUST be completed before
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1217
   starting the storage stack for the setting to be taken into account.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1218
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1219
   * Valid in Asynchronous Callback: Yes (if cb is non-zero)
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1220
   * Nestable: Yes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1221
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1222
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1223
   * CY_AS_ERROR_SUCCESS - the operation completed successfully.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1224
   * CY_AS_ERROR_INVALID_HANDLE - invalid device handle passed in.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1225
   * 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
  1226
   * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1227
   * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1228
   * CY_AS_ERROR_IN_SUSPEND - West Bridge is in low power suspend mode.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1229
   * CY_AS_ERROR_INVALID_PARAMETER - invalid frequency setting desired.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1230
   * CY_AS_ERROR_TIMEOUT - West Bridge device did not respond to the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1231
   * CY_AS_ERROR_INVALID_RESPONSE - active firmware does not support the operation.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1232
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1233
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1234
   * CyAsMiscSignalPolarity
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1235
 */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1236
EXTERN CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1237
CyAsMiscSetSDPowerPolarity(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1238
    CyAsDeviceHandle handle,                            /* Handle to the West Bridge device */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1239
    CyAsMiscSignalPolarity polarity,                    /* Desired polarity setting to the SD_POW signal. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1240
    CyAsFunctionCallback cb,                            /* Callback to call on completion. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1241
    uint32_t client                                     /* Client data to be passed to the callback. */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1242
    ) ;
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
/* For supporting deprecated functions */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1245
#include "cyasmisc_dep.h"    
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1246
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1247
#include "cyas_cplus_end.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1248
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1249
#endif				/* _INCLUDED_CYASMISC_H_ */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
  1250