summaryrefslogtreecommitdiff
path: root/software/include/oct6100api/oct6100_interrupts_inst.h
blob: cb1682ae40aeeadad05e604b322695b29ce6f835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\

File:  oct6100_interrupts_inst.h

    Copyright (c) 2001-2011 Octasic Inc.
    
Description: 

	File containing all defines, macros, and structures pertaining to the file
	oct6100_interrupts.c.  All elements defined in this file are for public
	usage of the API.  All private elements are defined in the
	oct6100_interrupts_priv.h file.

This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API  is 
free software; you can redistribute it and/or modify it under the terms of 
the GNU General Public License as published by the Free Software Foundation; 
either version 2 of the License, or (at your option) any later version.

The OCT6100 GPL API is distributed in the hope that it will be useful, but 
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
for more details. 

You should have received a copy of the GNU General Public License 
along with the OCT6100 GPL API; if not, write to the Free Software 
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

$Octasic_Release: OCT612xAPI-01.04.05 $

$Octasic_Revision: 23 $

\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

#ifndef __OCT6100_INTERRUPTS_INST_H__
#define __OCT6100_INTERRUPTS_INST_H__

/*****************************  INCLUDE FILES  *******************************/


/*****************************  DEFINES  *************************************/


/*****************************  TYPES  ***************************************/

typedef struct _OCT6100_API_INTRPT_CONFIG_
{
	/* The configuration of each group of interrupts.  Each can have one of the
		following values:
			cOCT6100_INTRPT_DISABLE,
			cOCT6100_INTRPT_NO_TIMEOUT,
			cOCT6100_INTRPT_TIMEOUT. */
	UINT8	byFatalGeneralConfig;
	UINT8	byFatalMemoryConfig;
	UINT8	byErrorMemoryConfig;


	UINT8	byErrorOverflowToneEventsConfig;
	UINT8	byErrorH100Config;

	/* The timeout value for each interrupt group, if the corresponding
		configuration variable is set to cOCT6100_INTRPT_TIMEOUT.  This
		value is kept in mclk cycles. */
	UINT32	ulFatalMemoryTimeoutMclk;
	UINT32	ulErrorMemoryTimeoutMclk;
	UINT32	ulErrorOverflowToneEventsTimeoutMclk;
	UINT32	ulErrorH100TimeoutMclk;

} tOCT6100_API_INTRPT_CONFIG, *tPOCT6100_API_INTRPT_CONFIG;

typedef struct _OCT6100_API_INTRPT_MANAGE_
{
	/* Number of mclk cycles in 1ms. */
	UINT32	ulNumMclkCyclesIn1Ms;

	/* Whether the mclk interrupt is active. */
	UINT8	fMclkIntrptActive;
	UINT32	ulNextMclkIntrptTimeHigh;
	UINT32	ulNextMclkIntrptTimeLow;

	/* Mclk time read from registers. */
	UINT32	ulRegMclkTimeHigh;
	UINT32	ulRegMclkTimeLow;

	/* Used by the interrupt service routine. */
	UINT16	usRegister102h;
	UINT16	usRegister202h;
	UINT16	usRegister302h;
	UINT16	usRegister502h;
	UINT16	usRegister702h;

	/* The state of each interrupt group.  Can be one of the following:
		cOCT6100_INTRPT_ACTIVE,
		cOCT6100_INTRPT_WILL_TIMEOUT,
		cOCT6100_INTRPT_IN_TIMEOUT,
		cOCT6100_INTRPT_WILL_DISABLED. */
	UINT16	byFatalGeneralState;
	UINT16	byFatalMemoryState;
	UINT16	byErrorMemoryState;
	UINT16	byErrorOverflowToneEventsState;
	UINT16	byErrorH100State;

	/* The time at which each disabled interrupt was disabled, in mclk cycles. */
	UINT32	ulFatalMemoryDisableMclkHigh;
	UINT32	ulFatalMemoryDisableMclkLow;
	UINT32	ulErrorMemoryDisableMclkHigh;
	UINT32	ulErrorMemoryDisableMclkLow;
	UINT32	ulErrorOverflowToneEventsDisableMclkHigh;
	UINT32	ulErrorOverflowToneEventsDisableMclkLow;
	UINT32	ulErrorH100DisableMclkHigh;
	UINT32	ulErrorH100DisableMclkLow;

	/* The time at which each disabled interrupt group is to be reenabled,
		in number of mclk cycles. */
	UINT32	ulFatalGeneralEnableMclkHigh;
	UINT32	ulFatalGeneralEnableMclkLow;
	UINT32	ulFatalMemoryEnableMclkHigh;
	UINT32	ulFatalMemoryEnableMclkLow;
	UINT32	ulErrorMemoryEnableMclkHigh;
	UINT32	ulErrorMemoryEnableMclkLow;
	UINT32	ulErrorOverflowToneEventsEnableMclkHigh;
	UINT32	ulErrorOverflowToneEventsEnableMclkLow;
	UINT32	ulErrorH100EnableMclkHigh;
	UINT32	ulErrorH100EnableMclkLow;
	
	/* If this is set, buffer playout events are pending. */
	UINT8	fBufferPlayoutEventsPending;
	/* If this is set, tone events are pending. */
	UINT8	fToneEventsPending;
	


	UINT8	fAfBistFailedOnBoot;




	UINT8	fIsrCalled;

} tOCT6100_API_INTRPT_MANAGE, *tPOCT6100_API_INTRPT_MANAGE;

#endif /* __OCT6100_INTERRUPTS_INST_H__ */