Debian Codegraph @

xpp/oct612x/include/oct6100api/oct6100_interrupts_inst.h

raw
1 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
2
3 File: oct6100_interrupts_inst.h
4
5 Copyright (c) 2001-2007 Octasic Inc.
6
7 Description:
8
9 File containing all defines, macros, and structures pertaining to the file
10 oct6100_interrupts.c. All elements defined in this file are for public
11 usage of the API. All private elements are defined in the
12 oct6100_interrupts_priv.h file.
13
14 This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
15 free software; you can redistribute it and/or modify it under the terms of
16 the GNU General Public License as published by the Free Software Foundation;
17 either version 2 of the License, or (at your option) any later version.
18
19 The OCT6100 GPL API is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with the OCT6100 GPL API; if not, write to the Free Software
26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
27
28 $Octasic_Release: OCT612xAPI-01.00-PR49 $
29
30 $Octasic_Revision: 16 $
31
32 \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
33
34 #ifndef __OCT6100_INTERRUPTS_INST_H__
35 #define __OCT6100_INTERRUPTS_INST_H__
36
37 /***************************** INCLUDE FILES *******************************/
38
39
40 /***************************** DEFINES *************************************/
41
42
43 /***************************** TYPES ***************************************/
44
45 typedef struct _OCT6100_API_INTRPT_CONFIG_
46 {
47 /* The configuration of each group of interrupts. Each can have one of the
48 following values:
49 cOCT6100_INTRPT_DISABLE,
50 cOCT6100_INTRPT_NO_TIMEOUT,
51 cOCT6100_INTRPT_TIMEOUT. */
52 UINT8 byFatalGeneralConfig;
53 UINT8 byFatalMemoryConfig;
54 UINT8 byErrorMemoryConfig;
55 UINT8 byErrorOverflowToneEventsConfig;
56 UINT8 byErrorH100Config;
57
58 /* The timeout value for each interrupt group, if the corresponding
59 configuration variable is set to cOCT6100_INTRPT_TIMEOUT. This
60 value is kept in mclk cycles. */
61 UINT32 ulFatalMemoryTimeoutMclk;
62 UINT32 ulErrorMemoryTimeoutMclk;
63 UINT32 ulErrorOverflowToneEventsTimeoutMclk;
64 UINT32 ulErrorH100TimeoutMclk;
65
66 } tOCT6100_API_INTRPT_CONFIG, *tPOCT6100_API_INTRPT_CONFIG;
67
68 typedef struct _OCT6100_API_INTRPT_MANAGE_
69 {
70 /* Number of mclk cycles in 1ms. */
71 UINT32 ulNumMclkCyclesIn1Ms;
72
73 /* Whether the mclk interrupt is active. */
74 UINT8 fMclkIntrptActive;
75 UINT32 ulNextMclkIntrptTimeHigh;
76 UINT32 ulNextMclkIntrptTimeLow;
77
78 /* Mclk time read from registers. */
79 UINT32 ulRegMclkTimeHigh;
80 UINT32 ulRegMclkTimeLow;
81
82 /* Used by the interrupt service routine. */
83 UINT16 usRegister102h;
84 UINT16 usRegister202h;
85 UINT16 usRegister302h;
86 UINT16 usRegister502h;
87 UINT16 usRegister702h;
88
89 /* The state of each interrupt group. Can be one of the following:
90 cOCT6100_INTRPT_ACTIVE,
91 cOCT6100_INTRPT_WILL_TIMEOUT,
92 cOCT6100_INTRPT_IN_TIMEOUT,
93 cOCT6100_INTRPT_WILL_DISABLED. */
94 UINT16 byFatalGeneralState;
95 UINT16 byFatalMemoryState;
96 UINT16 byErrorMemoryState;
97 UINT16 byErrorOverflowToneEventsState;
98 UINT16 byErrorH100State;
99
100 /* The time at which each disabled interrupt was disabled, in mclk cycles. */
101 UINT32 ulFatalMemoryDisableMclkHigh;
102 UINT32 ulFatalMemoryDisableMclkLow;
103 UINT32 ulErrorMemoryDisableMclkHigh;
104 UINT32 ulErrorMemoryDisableMclkLow;
105 UINT32 ulErrorOverflowToneEventsDisableMclkHigh;
106 UINT32 ulErrorOverflowToneEventsDisableMclkLow;
107 UINT32 ulErrorH100DisableMclkHigh;
108 UINT32 ulErrorH100DisableMclkLow;
109
110 /* The time at which each disabled interrupt group is to be reenabled,
111 in number of mclk cycles. */
112 UINT32 ulFatalGeneralEnableMclkHigh;
113 UINT32 ulFatalGeneralEnableMclkLow;
114 UINT32 ulFatalMemoryEnableMclkHigh;
115 UINT32 ulFatalMemoryEnableMclkLow;
116 UINT32 ulErrorMemoryEnableMclkHigh;
117 UINT32 ulErrorMemoryEnableMclkLow;
118 UINT32 ulErrorOverflowToneEventsEnableMclkHigh;
119 UINT32 ulErrorOverflowToneEventsEnableMclkLow;
120 UINT32 ulErrorH100EnableMclkHigh;
121 UINT32 ulErrorH100EnableMclkLow;
122
123 /* If this is set, buffer playout events are pending. */
124 UINT8 fBufferPlayoutEventsPending;
125 /* If this is set, tone events are pending. */
126 UINT8 fToneEventsPending;
127
128
129
130 UINT8 fIsrCalled;
131
132 } tOCT6100_API_INTRPT_MANAGE, *tPOCT6100_API_INTRPT_MANAGE;
133
134 #endif /* __OCT6100_INTERRUPTS_INST_H__ */