revert between 56095 -> 55830 in arch
[AROS.git] / workbench / devs / USB / classes / HID / hid_stubs.c
bloba5c712fe562dbf03226c02f6c9551ac5cbc60371
1 /*
2 Copyright © 2004, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Stub functions for PCI subsystem
6 Lang: English
7 */
9 #ifndef AROS_USE_OOP
10 # define AROS_USE_OOP
11 #endif
13 #include <stdint.h>
14 #include <exec/libraries.h>
15 #include <exec/interrupts.h>
17 #include <utility/tagitem.h>
18 #include <utility/hooks.h>
20 #include <oop/oop.h>
21 #include <oop/static_mid.h>
23 #include <hidd/hidd.h>
24 #include <usb/usb.h>
25 #include <usb/hid.h>
27 #include <proto/oop.h>
29 #undef OOPBase
30 #define OOPBase (OOP_OOPBASE(obj))
32 BOOL HIDD_USBHID_GetReportDescriptor(OOP_Object *obj, uint16_t length, void *buffer)
34 STATIC_MID;
35 struct pHidd_USBHID_GetReportDescriptor p;
37 if (!static_mid) static_mid = OOP_GetMethodID((STRPTR)IID_Hidd_USBHID, moHidd_USBHID_GetReportDescriptor);
39 p.mID = static_mid;
40 p.length = length;
41 p.buffer = buffer;
43 return OOP_DoMethod(obj, &p.mID);
46 usb_hid_descriptor_t *HIDD_USBHID_GetHidDescriptor(OOP_Object *obj)
48 STATIC_MID;
49 struct pHidd_USBHID_GetHidDescriptor p;
51 if (!static_mid) static_mid = OOP_GetMethodID((STRPTR)IID_Hidd_USBHID, moHidd_USBHID_GetHidDescriptor);
53 p.mID = static_mid;
55 return (usb_hid_descriptor_t *)OOP_DoMethod(obj, &p.mID);
58 BOOL HIDD_USBHID_SetIdle(OOP_Object *obj, uint8_t duration, uint8_t id)
60 STATIC_MID;
62 struct pHidd_USBHID_SetIdle p;
64 if (!static_mid) static_mid = OOP_GetMethodID((STRPTR)IID_Hidd_USBHID, moHidd_USBHID_SetIdle);
66 p.mID = static_mid;
67 p.duration = duration;
68 p.id = id;
70 return OOP_DoMethod(obj, &p.mID);
73 BOOL HIDD_USBHID_SetProtocol(OOP_Object *obj, uint8_t protocol)
75 STATIC_MID;
77 struct pHidd_USBHID_SetProtocol p;
79 if (!static_mid) static_mid = OOP_GetMethodID((STRPTR)IID_Hidd_USBHID, moHidd_USBHID_SetProtocol);
81 p.mID = static_mid;
82 p.protocol = protocol;
84 return OOP_DoMethod(obj, &p.mID);
87 BOOL HIDD_USBHID_SetReport(OOP_Object *obj, uint8_t type, uint8_t id, void *report, uint16_t length)
89 STATIC_MID;
91 struct pHidd_USBHID_SetReport p;
93 if (!static_mid) static_mid = OOP_GetMethodID((STRPTR)IID_Hidd_USBHID, moHidd_USBHID_SetReport);
95 p.mID = static_mid;
96 p.type = type;
97 p.id = id;
98 p.report = report;
99 p.length = length;
101 return OOP_DoMethod(obj, &p.mID);
104 void HIDD_USBHID_ParseReport(OOP_Object *obj, uint8_t id, void *report, uint32_t report_length)
106 STATIC_MID;
107 struct pHidd_USBHID_ParseReport p;
109 if (!static_mid) static_mid = OOP_GetMethodID((STRPTR)IID_Hidd_USBHID, moHidd_USBHID_ParseReport);
111 p.mID = static_mid;
112 p.id = id;
113 p.report = report;
114 p.report_length = report_length;
116 OOP_DoMethod(obj, &p.mID);