revert 213 commits (to 56092) from the last month. 10 still need work to resolve...
[AROS.git] / rom / hidds / base / bus / bus_class.c
blob9df4f22a6dcfddb4c602a5b298e033006f968797
1 /*
2 Copyright (C) 2018-2019, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
8 #include "bus_intern.h"
10 /*****************************************************************************************
12 NAME
13 aoHidd_Bus_IRQHandler
15 SYNOPSIS
16 [.S.], APTR
18 LOCATION
19 CLID_Hidd_Bus
21 FUNCTION
22 Specifies IRQ handler function to be called when bus interrupt arrives.
23 The function should be called using "C" calling convention and has the
24 following prototype:
26 void bus_HandleIRQ(UBYTE status, APTR userdata);
28 Your driver should pass the following arguments to this function:
29 status - value read from bus status register.
30 userdata - value of aoHidd_Bus_IRQData attribute.
32 NOTES
33 Reading the status register is part of the interrupt acknowledge
34 process, and therefore has to be done by the driver.
36 It is driver's job to check whether the interrupt really belongs to
37 the bus.
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 aoHidd_Bus_IRQData
46 INTERNALS
48 *****************************************************************************************/
49 /*****************************************************************************************
51 NAME
52 aoHidd_Bus_IRQData
54 SYNOPSIS
55 [.S.], APTR
57 LOCATION
58 CLID_Hidd_Bus
60 FUNCTION
61 Caller's private data to be supplied to IRQ handler function.
63 NOTES
65 EXAMPLE
67 BUGS
69 SEE ALSO
70 aoHidd_Bus_IRQData
72 INTERNALS
74 *****************************************************************************************/
75 /*****************************************************************************************
77 NAME
78 aoHidd_Bus_KeepEmpty
80 SYNOPSIS
81 [I..], BOOL
83 LOCATION
84 CLID_Hidd_Bus
86 FUNCTION
87 If this attribute is set to FALSE during object creation, the object
88 will be destroyed if no devices are detected on the bus.
90 NOTES
91 This can be useful for optional buses like legacy ISA controllers,
92 which have no other way to detect their presence.
94 EXAMPLE
96 BUGS
98 SEE ALSO
100 INTERNALS
102 *****************************************************************************************/
104 /*** Bus::New() **************************************************************/
106 OOP_Object *Bus__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_New *msg)
108 D(bug("[Bus] Root__New()\n"));
109 o = (OOP_Object *)OOP_DoSuperMethod(cl, o, (OOP_Msg)msg);
110 if(o)
113 D(bug ("[Bus] Root__New: Instance @ 0x%p\n", o);)
114 return o;
117 /*** Bus::Dispose() **********************************************************/
118 VOID Bus__Root__Dispose(OOP_Class *cl, OOP_Object *o, OOP_Msg msg)
120 D(bug("[Bus] Root__Dispose(0x%p)\n", o));
121 OOP_DoSuperMethod(cl, o, msg);