1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
3
File: oct6100_interrupts_inst.h
5
Copyright (c) 2001-2006 Octasic Inc.
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.
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.
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
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.
28
$Octasic_Release: OCT612xAPI-01.00-PR43 $
30
$Octasic_Revision: 16 $
32
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
34
#ifndef __OCT6100_INTERRUPTS_INST_H__
35
#define __OCT6100_INTERRUPTS_INST_H__
37
/***************************** INCLUDE FILES *******************************/
40
/***************************** DEFINES *************************************/
43
/***************************** TYPES ***************************************/
45
typedef struct _OCT6100_API_INTRPT_CONFIG_
47
/* The configuration of each group of interrupts. Each can have one of the
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;
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;
66
} tOCT6100_API_INTRPT_CONFIG, *tPOCT6100_API_INTRPT_CONFIG;
68
typedef struct _OCT6100_API_INTRPT_MANAGE_
70
/* Number of mclk cycles in 1ms. */
71
UINT32 ulNumMclkCyclesIn1Ms;
73
/* Whether the mclk interrupt is active. */
74
UINT8 fMclkIntrptActive;
75
UINT32 ulNextMclkIntrptTimeHigh;
76
UINT32 ulNextMclkIntrptTimeLow;
78
/* Mclk time read from registers. */
79
UINT32 ulRegMclkTimeHigh;
80
UINT32 ulRegMclkTimeLow;
82
/* Used by the interrupt service routine. */
83
UINT16 usRegister102h;
84
UINT16 usRegister202h;
85
UINT16 usRegister302h;
86
UINT16 usRegister502h;
87
UINT16 usRegister702h;
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;
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;
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;
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;
132
} tOCT6100_API_INTRPT_MANAGE, *tPOCT6100_API_INTRPT_MANAGE;
134
#endif /* __OCT6100_INTERRUPTS_INST_H__ */