|
1 /* Cypress West Bridge API header file (cyasintr.h) |
|
2 ## =========================== |
|
3 ## |
|
4 ## Copyright Cypress Semiconductor Corporation, 2006-2009, |
|
5 ## All Rights Reserved |
|
6 ## UNPUBLISHED, LICENSED SOFTWARE. |
|
7 ## |
|
8 ## CONFIDENTIAL AND PROPRIETARY INFORMATION |
|
9 ## WHICH IS THE PROPERTY OF CYPRESS. |
|
10 ## |
|
11 ## Use of this file is governed |
|
12 ## by the license agreement included in the file |
|
13 ## |
|
14 ## <install>/license/license.txt |
|
15 ## |
|
16 ## where <install> is the Cypress software |
|
17 ## installation root directory path. |
|
18 ## |
|
19 ## =========================== |
|
20 */ |
|
21 |
|
22 #ifndef _INCLUDED_CYASINTR_H_ |
|
23 #define _INCLUDED_CYASINTR_H_ |
|
24 |
|
25 #include "cyasdevice.h" |
|
26 |
|
27 #include "cyas_cplus_start.h" |
|
28 |
|
29 /* Summary |
|
30 Initialize the interrupt manager module |
|
31 |
|
32 Description |
|
33 This function is called to initialize the interrupt module. This module enables interrupts |
|
34 as well as servies West Bridge related interrupts by determining the source of the interrupt and |
|
35 calling the appropriate handler function. |
|
36 |
|
37 Notes |
|
38 If the dmaintr parameter is TRUE, the initialization code initializes the interrupt mask to |
|
39 have the DMA related interrupt enabled via the general purpose interrupt. However, the interrupt |
|
40 service function assumes that the DMA interrupt is handled by the HAL layer before the interrupt |
|
41 module handler function is called. |
|
42 |
|
43 Returns |
|
44 * CY_AS_ERROR_SUCCESS - the interrupt module was initialized correctly |
|
45 * CY_AS_ERROR_ALREADY_RUNNING - the interrupt module was already started |
|
46 |
|
47 See Also |
|
48 * CyAsIntrStop |
|
49 * CyAsServiceInterrupt |
|
50 */ |
|
51 extern CyAsReturnStatus_t |
|
52 CyAsIntrStart( |
|
53 CyAsDevice * dev_p, /* Device being initialized */ |
|
54 CyBool dmaintr /* If true, enable the DMA interrupt through the INT signal */ |
|
55 ) ; |
|
56 |
|
57 /* Summary |
|
58 Stop the interrupt manager module |
|
59 |
|
60 Description |
|
61 This function stops the interrupt module and masks all interrupts from the West Bridge device. |
|
62 |
|
63 Returns |
|
64 * CY_AS_ERROR_SUCCESS - the interrupt module was stopped sucessfully |
|
65 * CY_AS_ERROR_NOT_RUNNING - the interrupt module was not running |
|
66 |
|
67 See Also |
|
68 * CyAsIntrStart |
|
69 * CyAsServiceInterrupt |
|
70 */ |
|
71 extern CyAsReturnStatus_t |
|
72 CyAsIntrStop( |
|
73 CyAsDevice * dev_p /* Device bein stopped */ |
|
74 ) ; |
|
75 |
|
76 |
|
77 /* Summary |
|
78 The interrupt service routine for West Bridge |
|
79 |
|
80 Description |
|
81 When an interrupt is detected, this function is called to service the West Bridge interrupt. It is safe |
|
82 and efficient for this function to be called when no West Bridge interrupt has occurred. This function |
|
83 will determine it is not an West Bridge interrupt quickly and return. |
|
84 */ |
|
85 extern void CyAsIntrServiceInterrupt( |
|
86 CyAsHalDeviceTag tag /* The USER supplied tag for this device */ |
|
87 ) ; |
|
88 |
|
89 #include "cyas_cplus_end.h" |
|
90 |
|
91 #endif /* _INCLUDED_CYASINTR_H_ */ |
|
92 |