2 Copyright © 2004, The AROS Development Team. All rights reserved.
5 Desc: Stub functions for PCI subsystem
13 #include <exec/types.h>
14 #include <exec/libraries.h>
16 #include <utility/tagitem.h>
17 #include <utility/hooks.h>
21 #include <hidd/hidd.h>
24 #include <proto/oop.h>
27 #define OOPBase (OOP_OOPBASE(obj))
29 #ifdef AROS_CREATE_ROM
30 #error Do not use stubs in ROM code!!!
32 #define STATIC_MID static OOP_MethodID mid
35 /***************************************************************************/
37 BOOL
HIDD_I2C_ProbeAddress(OOP_Object
*obj
, UWORD address
)
40 struct pHidd_I2C_ProbeAddress p
, *msg
=&p
;
42 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2C
, moHidd_I2C_ProbeAddress
);
47 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
50 BOOL
HIDD_I2CDevice_ReadStatus(OOP_Object
*obj
, UBYTE
*status
)
53 struct pHidd_I2CDevice_ReadStatus p
, *msg
=&p
;
55 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_ReadStatus
);
60 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
63 BOOL
HIDD_I2CDevice_Read(OOP_Object
*obj
, APTR buffer
, ULONG length
)
66 struct pHidd_I2CDevice_Read p
, *msg
=&p
;
68 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_Read
);
71 p
.readBuffer
= buffer
;
72 p
.readLength
= length
;
74 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
77 BOOL
HIDD_I2CDevice_ReadByte(OOP_Object
*obj
, UBYTE subaddr
, UBYTE
*data
)
80 struct pHidd_I2CDevice_ReadByte p
, *msg
=&p
;
82 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_ReadByte
);
88 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
91 BOOL
HIDD_I2CDevice_ReadBytes(OOP_Object
*obj
, UBYTE subaddr
, UBYTE
*data
, ULONG length
)
94 struct pHidd_I2CDevice_ReadBytes p
, *msg
=&p
;
96 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_ReadBytes
);
103 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
106 BOOL
HIDD_I2CDevice_ReadWord(OOP_Object
*obj
, UBYTE subaddr
, UWORD
*data
)
109 struct pHidd_I2CDevice_ReadWord p
, *msg
=&p
;
111 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_ReadWord
);
117 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
120 BOOL
HIDD_I2CDevice_Write(OOP_Object
*obj
, APTR buffer
, ULONG length
)
123 struct pHidd_I2CDevice_Write p
, *msg
=&p
;
125 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_Write
);
128 p
.writeBuffer
= buffer
;
129 p
.writeLength
= length
;
131 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
134 BOOL
HIDD_I2CDevice_WriteByte(OOP_Object
*obj
, UBYTE subaddr
, UBYTE data
)
137 struct pHidd_I2CDevice_WriteByte p
, *msg
=&p
;
139 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_WriteByte
);
145 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
148 BOOL
HIDD_I2CDevice_WriteBytes(OOP_Object
*obj
, UBYTE subaddr
, UBYTE
*data
, ULONG length
)
151 struct pHidd_I2CDevice_WriteBytes p
, *msg
=&p
;
153 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_WriteBytes
);
160 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
163 BOOL
HIDD_I2CDevice_WriteWord(OOP_Object
*obj
, UBYTE subaddr
, UWORD data
)
166 struct pHidd_I2CDevice_WriteWord p
, *msg
=&p
;
168 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_WriteWord
);
174 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
177 BOOL
HIDD_I2CDevice_WriteVec(OOP_Object
*obj
, UBYTE
*data
, ULONG length
)
180 struct pHidd_I2CDevice_WriteVec p
, *msg
=&p
;
182 if (!mid
) mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_WriteVec
);
188 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);