2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
7 #include <aros/symbolsets.h>
9 #include <hidd/keyboard.h>
10 #include <hidd/mouse.h>
11 #include <proto/oop.h>
18 #define HiddAttrBase (LIBBASE->ksd.hiddAttrBase)
19 #define HWBase (LIBBASE->ksd.hwMethodBase)
20 #define OOPBase (LIBBASE->ksd.cs_OOPBase)
22 static int init_kbd(struct kbdbase
*LIBBASE
)
24 OOP_Object
*kbd
= OOP_NewObject(NULL
, CLID_HW_Kbd
, NULL
);
25 OOP_Object
*ms
= OOP_NewObject(NULL
, CLID_HW_Mouse
, NULL
);
29 /* This can be triggered by old base kickstart */
30 D(bug("[i8042] Subsystem classes not found\n"));
34 if (!HW_AddDriver(kbd
, LIBBASE
->ksd
.kbdclass
, NULL
))
36 D(bug("[i8042] No controller detected\n"));
39 LIBBASE
->library
.lib_OpenCnt
= 1;
41 /* Mouse can be missing, it's not a failure */
42 if (HW_AddDriver(ms
, LIBBASE
->ksd
.mouseclass
, NULL
))
44 D(bug("[i8042] Mouse driver installed\n"));
45 LIBBASE
->library
.lib_OpenCnt
++;
51 ADD2INITLIB(init_kbd
, 10);