source: svn/trunk/newcon3bcm2_21bu/magnum/portinginterface/xpt/7552/bxpt_interrupt.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 10.1 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2010, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bxpt_interrupt.h $
11 * $brcm_Revision: Hydra_Software_Devel/1 $
12 * $brcm_Date: 10/25/10 2:09p $
13 *
14 * Porting interface code for the data transport interrupt handlers.
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/portinginterface/xpt/base2/bxpt_interrupt.h $
19 *
20 * Hydra_Software_Devel/1   10/25/10 2:09p gmullen
21 * SW7425-15: Moved srcs to base2 folder
22 *
23 * Hydra_Software_Devel/1   10/8/10 2:57p gmullen
24 * SW7425-15: Added header files
25 *
26 * Hydra_Software_Devel/1   5/13/05 1:27p gmullen
27 * PR15309: First draft of XPT PI.
28 *
29 *
30 ***************************************************************************/
31
32/*= Module Overview *********************************************************
33The interrupt module provides an API to install and remove transport
34interrupt handlers. Functions are available for use by porting interface
35clients, to enable and disable interrupts. Enabling the interrupt also
36installs a pointer to high-level interrupt handler.
37
38Why is a separate API for transport interrupts needed? The Interrupt Interface
39used by other modules can only support so-called L2 interrupts. Unfortunately,
40the transport hardware does not support the L2 mechanism; all transport
41interrupts are L1.
42
43Transport interrupts fall in to 3 classes:
44        Message Ready - A complete message has been transfered into the DRAM
45        message buffers.
46
47        Message Overflow - A given buffer was not serviced quickly enough and
48        has overflowed.
49
50        CPU Status - A catch-all for all the other interrupts the transport can
51        generate, such as continuity-counter error, playback channel finished,
52        or PCR arrival.
53
54An Enable and Disable call is provided for Message Ready and Message Overflow
55classes of interrupts. The CPU Status interrupts are now supported by the
56Interrupt Interface.
57
58Three function calls are provided for use by the low-level interrupt service
59routines. These three calls map the 'status' interrupt, the message ready
60interrupt, and the message overflow interrupt to the high-level handler
61which was installed when the interrupt was enabled.
62***************************************************************************/
63
64#ifndef BXPT_INTERRUPT_H__
65#define BXPT_INTERRUPT_H__
66
67#include "bxpt.h"
68#include "bint.h"
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73
74/***************************************************************************
75Summary:
76Enable a given CPU Message interrupt.
77
78Description:
79Enable the given message buffer interrupt. The specified callback will be
80called when the a complete message has been transfered into the message
81buffer. That message could be an entire transport packet, a complete PSI
82message, or complete PES packet, etc.
83
84This function CANNOT be called from within a Magnum interrupt context.
85
86The Parm1 and Parm2 arguments passed in will be used as the
87arguments for the Callback function when the interrupt fires.
88
89Returns:
90    BERR_SUCCESS                - Interrupt enabled.
91    BERR_INVALID_PARAMETER      - Bad input parameter
92 
93See Also:
94BXPT_Interrupt_DisableMessageInt, BXPT_Interrupt_EnableMessageInt_isr,
95BXPT_Interrupt_DisableMessageInt_isr
96****************************************************************************/
97BERR_Code BXPT_Interrupt_EnableMessageInt( 
98        BXPT_Handle hXpt,                               /* [in] Handle for this transport */
99        int MessageBufferNum,                   /* [in] Which message buffer to watch. */
100        BINT_CallbackFunc Callback,             /* [in] Handler for this interrupt. */
101        void *Parm1,                                    /* [in] First arg to be passed to callback */
102        int Parm2                                               /* [in] Second arg to be passed to callback */
103        );
104
105/***************************************************************************
106Summary:
107Disable a given CPU Message interrupt.
108
109Description:
110Disable the given message buffer interrupt. The transport core will no longer
111forward interrupts for this particular message buffer to the CPU for
112processing. The event could still occur, but no interrupt will be generated.
113
114This function CANNOT be called from within a Magnum interrupt context.
115
116Returns:
117    BERR_SUCCESS                - Interrupt disabled.
118    BERR_INVALID_PARAMETER      - Bad input parameter
119 
120See Also:
121BXPT_Interrupt_EnableMessageInt, BXPT_Interrupt_EnableMessageInt_isr,
122BXPT_Interrupt_DisableMessageInt_isr
123****************************************************************************/
124BERR_Code BXPT_Interrupt_DisableMessageInt( 
125        BXPT_Handle hXpt,                               /* [in] Handle for this transport */
126        int MessageBufferNum            /* [in] Message interrupt to disable. */
127        );
128
129/***************************************************************************
130Summary:
131Enable a given CPU Message interrupt, interrupt context version.
132
133Description:
134A version of BXPT_Interrupt_EnableMessageInt(), callable from within an
135interrupt context.
136
137Returns:
138    BERR_SUCCESS                - Interrupt enabled.
139    BERR_INVALID_PARAMETER      - Bad input parameter
140 
141See Also:
142BXPT_Interrupt_DisableMessageInt_isr
143****************************************************************************/
144BERR_Code BXPT_Interrupt_EnableMessageInt_isr( 
145        BXPT_Handle hXpt,                               /* [in] Handle for this transport */
146        int MessageBufferNum,           /* [in] Which message buffer to watch. */
147        BINT_CallbackFunc Callback,             /* [in] Handler for this interrupt. */
148        void *Parm1,                                    /* [in] First arg to be passed to callback */
149        int Parm2                                               /* [in] Second arg to be passed to callback */
150        );
151
152/***************************************************************************
153Summary:
154Disable a given CPU Message interrupt, interrupt context version.
155
156Description:
157A version of BXPT_Interrupt_DisableMessageInt(), callable from within an
158interrupt context.
159
160Returns:
161    BERR_SUCCESS                - Interrupt enabled.
162    BERR_INVALID_PARAMETER      - Bad input parameter
163 
164See Also:
165BXPT_Interrupt_EnableMessageInt_isr
166****************************************************************************/
167BERR_Code BXPT_Interrupt_DisableMessageInt_isr( 
168        BXPT_Handle hXpt,                               /* [in] Handle for this transport */
169        int MessageBufferNum            /* [in] Message interrupt to disable. */
170        );
171
172/***************************************************************************
173Summary:
174Enable a given CPU Message Overflow interrupt.
175
176Description:
177Enable the given message buffer overflow interrupt. The specified callback
178will be called when the an overflow condition has occurred.
179
180The Parm1 and Parm2 arguments passed in will be used as the
181arguments for the Callback function when the interrupt fires.
182
183This function CANNOT be called from within a Magnum interrupt context.
184
185Returns:
186    BERR_SUCCESS                - Interrupt enabled.
187    BERR_INVALID_PARAMETER      - Bad input parameter
188 
189See Also:
190BXPT_Interrupt_DisableMessageOverflowInt,
191BXPT_Interrupt_EnableMessageOverflowInt_isr
192****************************************************************************/
193BERR_Code BXPT_Interrupt_EnableMessageOverflowInt( 
194        BXPT_Handle hXpt,                               /* [in] Handle for this transport */
195        int MessageBufferNum,                   /* [in] Which message buffer to watch. */
196        BINT_CallbackFunc Callback,             /* [in] Handler for this interrupt. */
197        void *Parm1,                                    /* [in] First arg to be passed to callback */
198        int Parm2                                               /* [in] Second arg to be passed to callback */
199        );
200
201/***************************************************************************
202Summary:
203Disable a given CPU Message Overflow interrupt.
204
205Description:
206Disable the given message buffer overflow interrupt. The transport core will
207no longer forward overflow interrupts for this particular message buffer to
208the CPU. The event could still occur, but no interrupt will be generated.
209
210This function CANNOT be called from within a Magnum interrupt context.
211
212Returns:
213    BERR_SUCCESS                - Interrupt disabled.
214    BERR_INVALID_PARAMETER      - Bad input parameter
215 
216See Also:
217BXPT_Interrupt_EnableMessageOverflowInt,
218BXPT_Interrupt_DisableMessageOverflowInt_isr
219****************************************************************************/
220BERR_Code BXPT_Interrupt_DisableMessageOverflowInt( 
221        BXPT_Handle hXpt,                               /* [in] Handle for this transport */
222        int MessageBufferNum            /* [in] Message interrupt to disable. */
223        );
224
225/***************************************************************************
226Summary:
227Enable a given CPU Message Overflow interrupt, interrupt context version.
228
229Description:
230A version of BXPT_Interrupt_EnableMessageOverflowInt(), callable from within
231an interrupt context.
232
233Returns:
234    BERR_SUCCESS                - Interrupt enabled.
235    BERR_INVALID_PARAMETER      - Bad input parameter
236 
237See Also:
238BXPT_Interrupt_DisableMessageOverflowInt
239****************************************************************************/
240BERR_Code BXPT_Interrupt_EnableMessageOverflowInt_isr( 
241        BXPT_Handle hXpt,                               /* [in] Handle for this transport */
242        int MessageBufferNum,                   /* [in] Which message buffer to watch. */
243        BINT_CallbackFunc Callback,             /* [in] Handler for this interrupt. */
244        void *Parm1,                                    /* [in] First arg to be passed to callback */
245        int Parm2                                               /* [in] Second arg to be passed to callback */
246        );
247
248/***************************************************************************
249Summary:
250Disable a given CPU Message Overflow interrupt, interrupt context version.
251
252Description:
253A version of BXPT_Interrupt_DisableMessageOverflowInt(), callable from within
254an interrupt context.
255
256Returns:
257    BERR_SUCCESS                - Interrupt disabled.
258    BERR_INVALID_PARAMETER      - Bad input parameter
259 
260See Also:
261BXPT_Interrupt_EnableMessageOverflowInt
262****************************************************************************/
263BERR_Code BXPT_Interrupt_DisableMessageOverflowInt_isr( 
264        BXPT_Handle hXpt,                               /* [in] Handle for this transport */
265        int MessageBufferNum            /* [in] Message interrupt to disable. */
266        );
267
268
269#ifdef __cplusplus
270}
271#endif
272
273#endif /* #ifndef BXPT_INTERRUPT_H__ */
274
275/* end of file */
276
Note: See TracBrowser for help on using the repository browser.