omap3530/beagle_drivers/wb/api/src/cyasintr.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 (cyasintr.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_CYASINTR_H_
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    23
#define _INCLUDED_CYASINTR_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 "cyasdevice.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    26
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    27
#include "cyas_cplus_start.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    28
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    29
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    30
   Initialize the interrupt manager module
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    31
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    32
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    33
   This function is called to initialize the interrupt module.  This module enables interrupts
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    34
   as well as servies West Bridge related interrupts by determining the source of the interrupt and
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    35
   calling the appropriate handler function.
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
   Notes
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    38
   If the dmaintr parameter is TRUE, the initialization code initializes the interrupt mask to
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    39
   have the DMA related interrupt enabled via the general purpose interrupt.  However, the interrupt
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    40
   service function assumes that the DMA interrupt is handled by the HAL layer before the interrupt
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    41
   module handler function is called.
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
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    44
   * CY_AS_ERROR_SUCCESS - the interrupt module was initialized correctly
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    45
   * CY_AS_ERROR_ALREADY_RUNNING - the interrupt module was already started
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    46
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    47
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    48
   * CyAsIntrStop
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    49
   * CyAsServiceInterrupt
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    50
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    51
extern CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    52
CyAsIntrStart(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    53
        CyAsDevice *                    dev_p,          /* Device being initialized */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    54
        CyBool                                  dmaintr         /* If true, enable the DMA interrupt through the INT signal */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    57
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    58
   Stop the interrupt manager module
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    59
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    60
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    61
   This function stops the interrupt module and masks all interrupts from the West Bridge device.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    62
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    63
   Returns
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    64
   * CY_AS_ERROR_SUCCESS - the interrupt module was stopped sucessfully
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    65
   * CY_AS_ERROR_NOT_RUNNING - the interrupt module was not running
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
   See Also
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    68
   * CyAsIntrStart
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    69
   * CyAsServiceInterrupt
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    70
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    71
extern CyAsReturnStatus_t
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    72
CyAsIntrStop(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    73
        CyAsDevice *                    dev_p           /* Device bein stopped */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    74
        ) ;
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    75
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    76
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    77
/* Summary
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    78
   The interrupt service routine for West Bridge
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    79
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    80
   Description
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    81
   When an interrupt is detected, this function is called to service the West Bridge interrupt.  It is safe
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    82
   and efficient for this function to be called when no West Bridge interrupt has occurred.  This function
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    83
   will determine it is not an West Bridge interrupt quickly and return.
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    84
*/
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    85
extern void CyAsIntrServiceInterrupt(
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    86
        CyAsHalDeviceTag                tag                     /* The USER supplied tag for this device */
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
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    89
#include "cyas_cplus_end.h"
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    90
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    91
#endif                  /* _INCLUDED_CYASINTR_H_ */
117faf51deac Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff changeset
    92