|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /*
26: File: Interrupts.h
27:
28: Contains: Interface to the Interrupt Manager.
29:
30: Version: Technology: PowerSurge 1.0.2.
31: Package: Universal Interfaces 2.1.2 on ETO #20
32:
33: Copyright: � 1984-1995 by Apple Computer, Inc.
34: All rights reserved.
35:
36: Bugs?: If you find a problem with this file, use the Apple Bug Reporter
37: stack. Include the file and version information (from above)
38: in the problem description and send to:
39: Internet: [email protected]
40: AppleLink: APPLE.BUGS
41:
42: */
43:
44: #ifndef __INTERRUPTS__
45: #define __INTERRUPTS__
46:
47:
48: #ifndef __TYPES__
49: //naga#include "types.h"
50: #endif
51: /* #include <ConditionalMacros.h> */
52:
53: #ifdef __cplusplus
54: extern "C" {
55: #endif
56:
57: #if PRAGMA_ALIGN_SUPPORTED
58: #pragma options align=mac68k
59: #endif
60:
61: #if PRAGMA_IMPORT_SUPPORTED
62: #pragma import on
63: #endif
64:
65: //naga typedef KernelID InterruptSetID;
66: typedef int InterruptSetID;
67:
68: typedef long InterruptMemberNumber;
69:
70: struct InterruptSetMember {
71: InterruptSetID setID;
72: InterruptMemberNumber member;
73: };
74: typedef struct InterruptSetMember InterruptSetMember;
75:
76:
77: enum {
78: kISTChipInterruptSource = 0,
79: kISTOutputDMAInterruptSource = 1,
80: kISTInputDMAInterruptSource = 2,
81: kISTPropertyMemberCount = 3
82: };
83:
84: typedef InterruptSetMember ISTProperty[kISTPropertyMemberCount];
85:
86: #define kISTPropertyName "driver-ist"
87:
88: typedef long InterruptReturnValue;
89:
90:
91: enum {
92: kFirstMemberNumber = 1,
93: kIsrIsComplete = 0,
94: kIsrIsNotComplete = -1,
95: kMemberNumberParent = -2
96: };
97:
98: typedef Boolean InterruptSourceState;
99:
100:
101: enum {
102: kSourceWasEnabled = true,
103: kSourceWasDisabled = false
104: };
105:
106: typedef InterruptMemberNumber (*InterruptHandler)(InterruptSetMember ISTmember, void *refCon, UInt32 theIntCount);
107: typedef void (*InterruptEnabler)(InterruptSetMember ISTmember, void *refCon);
108: typedef InterruptSourceState (*InterruptDisabler)(InterruptSetMember ISTmember, void *refCon);
109:
110: enum {
111: kReturnToParentWhenComplete = 0x00000001,
112: kReturnToParentWhenNotComplete = 0x00000002
113: };
114:
115: typedef OptionBits InterruptSetOptions;
116:
117: /* Interrupt Services */
118: extern OSStatus CreateInterruptSet(InterruptSetID parentSet, InterruptMemberNumber parentMember, InterruptMemberNumber setSize, InterruptSetID *setID, InterruptSetOptions options);
119: extern OSStatus InstallInterruptFunctions(InterruptSetID setID, InterruptMemberNumber member, void *refCon, InterruptHandler handlerFunction, InterruptEnabler enableFunction, InterruptDisabler disableFunction);
120: extern OSStatus GetInterruptFunctions(InterruptSetID setID, InterruptMemberNumber member, void **refCon, InterruptHandler *handlerFunction, InterruptEnabler *enableFunction, InterruptDisabler *disableFunction);
121: extern OSStatus ChangeInterruptSetOptions(InterruptSetID setID, InterruptSetOptions options);
122: extern OSStatus GetInterruptSetOptions(InterruptSetID setID, InterruptSetOptions *options);
123:
124: #if PRAGMA_IMPORT_SUPPORTED
125: #pragma import off
126: #endif
127:
128: #if PRAGMA_ALIGN_SUPPORTED
129: #pragma options align=reset
130: #endif
131:
132: #ifdef __cplusplus
133: }
134: #endif
135:
136: #endif /* __INTERRUPTS__ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.