Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / hidds / irq / include / irq.h
blobd88b6437d0933994160c4930c1d1de617ac20a8d
1 #ifndef HIDD_IRQ_H
2 #define HIDD_IRQ_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Definitions for the IRQ HIDD system.
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
15 #ifndef EXEC_NODES_H
16 # include <exec/nodes.h>
17 #endif
18 #ifndef HIDD_HIDD_H
19 # include <hidd/hidd.h>
20 #endif
21 #ifndef OOP_OOP_H
22 # include <oop/oop.h>
23 #endif
25 #include <utility/utility.h>
27 #define CLID_Hidd_IRQ "hidd.bus.irq"
28 #define IID_Hidd_IRQ "hidd.bus.irq"
30 /**** irq definitions ****************************************************/
32 enum
34 /* Methods for a serial hidd */
36 moHidd_IRQ_AddHandler = 0,
37 moHidd_IRQ_RemHandler,
38 moHidd_IRQ_CauseIRQ,
39 moHidd_IRQ_NumMethods
42 typedef struct {
43 struct Node h_Node; /* Handler's node */
44 APTR h_Data; /* Handler data */
45 VOID (* h_Code)(); /* Handler code */
46 } HIDDT_IRQ_Handler;
48 typedef struct {
49 struct ExecBase *sysBase;
50 ULONG Error; /* Error code if defined */
51 } HIDDT_IRQ_HwInfo;
53 /* IRQ id's */
54 typedef enum {
56 The ID's defined here are not real IRQ numbers! They are internal codes.
58 vHidd_IRQ_Timer = -14, /* Timer IRQ, also known as VBlank IRQ */
59 vHidd_IRQ_Keyboard, /* Keyboard */
60 vHidd_IRQ_Serial1, /* Serial ports 1 and 3 */
61 vHidd_IRQ_Serial2, /* Serial ports 2 and 4 */
62 vHidd_IRQ_Audio, /* IRQ from audio card */
63 vHidd_IRQ_Floppy, /* Floppy drive */
64 vHidd_IRQ_Parallel1, /* Parallel port 1 */
65 vHidd_IRQ_Parallel2, /* Parallel port 2 */
66 vHidd_IRQ_RTC, /* Real Time Clock, 1024Hz interrupt */
67 vHidd_IRQ_FPU, /* FPU math error */
68 vHidd_IRQ_HDD1, /* IDE port 1 */
69 vHidd_IRQ_HDD2, /* IDE port 2 */
70 vHidd_IRQ_Ether, /* Ethernet card IRQ */
71 vHidd_IRQ_Mouse, /* PS/2 mouse IRQ */
73 // vHidd_IRQ_NumIRQ /* Number of IRQ's defined */
75 } HIDDT_IRQ_Id;
77 /* messages for IRQ hidd */
79 struct pHidd_IRQ_AddHandler
81 OOP_MethodID mID;
82 HIDDT_IRQ_Handler *handlerinfo;
83 HIDDT_IRQ_Id id;
86 struct pHidd_IRQ_RemHandler
88 OOP_MethodID mID;
89 HIDDT_IRQ_Handler *handlerinfo;
92 struct pHidd_IRQ_CauseIRQ
94 OOP_MethodID mID;
95 HIDDT_IRQ_Id id;
96 HIDDT_IRQ_HwInfo *hardwareinfo;
99 /* Predeclarations of stubs in libhiddirqstubs */
101 BOOL HIDD_IRQ_AddHandler (OOP_Object *, HIDDT_IRQ_Handler *, HIDDT_IRQ_Id);
102 VOID HIDD_IRQ_RemHandler (OOP_Object *, HIDDT_IRQ_Handler *);
103 VOID HIDD_IRQ_CauseIRQ (OOP_Object *, HIDDT_IRQ_Id, HIDDT_IRQ_HwInfo *);
105 #endif /* HIDD_IRQ_H */