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>
20 #include <oop/static_mid.h>
22 #include <hidd/hidd.h>
25 #include <proto/oop.h>
28 #define OOPBase (OOP_OOPBASE(obj))
30 /***************************************************************************/
32 BOOL
HIDD_I2C_ProbeAddress(OOP_Object
*obj
, UWORD address
)
35 struct pHidd_I2C_ProbeAddress p
, *msg
=&p
;
37 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2C
, moHidd_I2C_ProbeAddress
);
42 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
45 BOOL
HIDD_I2CDevice_ReadStatus(OOP_Object
*obj
, UBYTE
*status
)
48 struct pHidd_I2CDevice_ReadStatus p
, *msg
=&p
;
50 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_ReadStatus
);
55 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
58 BOOL
HIDD_I2CDevice_Read(OOP_Object
*obj
, APTR buffer
, ULONG length
)
61 struct pHidd_I2CDevice_Read p
, *msg
=&p
;
63 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_Read
);
66 p
.readBuffer
= buffer
;
67 p
.readLength
= length
;
69 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
72 BOOL
HIDD_I2CDevice_ReadByte(OOP_Object
*obj
, UBYTE subaddr
, UBYTE
*data
)
75 struct pHidd_I2CDevice_ReadByte p
, *msg
=&p
;
77 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_ReadByte
);
83 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
86 BOOL
HIDD_I2CDevice_ReadBytes(OOP_Object
*obj
, UBYTE subaddr
, UBYTE
*data
, ULONG length
)
89 struct pHidd_I2CDevice_ReadBytes p
, *msg
=&p
;
91 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_ReadBytes
);
98 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
101 BOOL
HIDD_I2CDevice_ReadWord(OOP_Object
*obj
, UBYTE subaddr
, UWORD
*data
)
104 struct pHidd_I2CDevice_ReadWord p
, *msg
=&p
;
106 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_ReadWord
);
112 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
115 BOOL
HIDD_I2CDevice_Write(OOP_Object
*obj
, APTR buffer
, ULONG length
)
118 struct pHidd_I2CDevice_Write p
, *msg
=&p
;
120 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_Write
);
123 p
.writeBuffer
= buffer
;
124 p
.writeLength
= length
;
126 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
129 BOOL
HIDD_I2CDevice_WriteByte(OOP_Object
*obj
, UBYTE subaddr
, UBYTE data
)
132 struct pHidd_I2CDevice_WriteByte p
, *msg
=&p
;
134 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_WriteByte
);
140 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
143 BOOL
HIDD_I2CDevice_WriteBytes(OOP_Object
*obj
, UBYTE subaddr
, UBYTE
*data
, ULONG length
)
146 struct pHidd_I2CDevice_WriteBytes p
, *msg
=&p
;
148 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_WriteBytes
);
155 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
158 BOOL
HIDD_I2CDevice_WriteWord(OOP_Object
*obj
, UBYTE subaddr
, UWORD data
)
161 struct pHidd_I2CDevice_WriteWord p
, *msg
=&p
;
163 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_WriteWord
);
169 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);
172 BOOL
HIDD_I2CDevice_WriteVec(OOP_Object
*obj
, UBYTE
*data
, ULONG length
)
175 struct pHidd_I2CDevice_WriteVec p
, *msg
=&p
;
177 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_I2CDevice
, moHidd_I2CDevice_WriteVec
);
183 return OOP_DoMethod(obj
, (OOP_Msg
) msg
);