2 Copyright � 2004-2019, The AROS Development Team. All rights reserved.
5 Desc: Stub functions for PCI subsystem
14 #include <exec/libraries.h>
15 #include <exec/interrupts.h>
17 #include <utility/tagitem.h>
18 #include <utility/hooks.h>
21 #include <oop/static_mid.h>
23 #include <hidd/hidd.h>
25 #include <usb/mstorage.h>
27 #include <proto/oop.h>
30 #define OOPBase (OOP_OOPBASE(o))
32 BOOL
HIDD_USBStorage_Reset(OOP_Object
*o
)
35 struct pHidd_USBStorage_Reset p
;
37 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_Reset
);
41 return OOP_DoMethod(o
, &p
.mID
);
44 uint8_t HIDD_USBStorage_GetMaxLUN(OOP_Object
*o
)
47 struct pHidd_USBStorage_GetMaxLUN p
;
49 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_GetMaxLUN
);
53 return OOP_DoMethod(o
, &p
.mID
);
56 BOOL
HIDD_USBStorage_TestUnitReady(OOP_Object
*o
, uint8_t lun
)
59 struct pHidd_USBStorage_TestUnitReady p
;
61 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_TestUnitReady
);
66 return OOP_DoMethod(o
, &p
.mID
);
69 uint32_t HIDD_USBStorage_DirectSCSI(OOP_Object
*o
, uint8_t lun
, uint8_t *cmd
, uint8_t cmdLen
, void *data
, uint32_t dataLen
, uint8_t read
)
72 struct pHidd_USBStorage_DirectSCSI p
;
74 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_DirectSCSI
);
84 return OOP_DoMethod(o
, &p
.mID
);
87 BOOL
HIDD_USBStorage_ReadCapacity(OOP_Object
*o
, uint8_t lun
, uint32_t *blockTotal
, uint32_t *blockSize
)
90 struct pHidd_USBStorage_ReadCapacity p
;
92 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_ReadCapacity
);
96 p
.blockTotal
= blockTotal
;
97 p
.blockSize
= blockSize
;
99 return OOP_DoMethod(o
, &p
.mID
);
102 BOOL
HIDD_USBStorage_RequestSense(OOP_Object
*o
, uint8_t lun
, void *buffer
, uint32_t bufferLength
)
105 struct pHidd_USBStorage_RequestSense p
;
107 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_RequestSense
);
112 p
.bufferLength
= bufferLength
;
114 return OOP_DoMethod(o
, &p
.mID
);
117 BOOL
HIDD_USBStorage_Inquiry(OOP_Object
*o
, uint8_t lun
, void *buffer
, uint32_t bufferLength
)
120 struct pHidd_USBStorage_Inquiry p
;
122 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_Inquiry
);
127 p
.bufferLength
= bufferLength
;
129 return OOP_DoMethod(o
, &p
.mID
);
132 BOOL
HIDD_USBStorage_Read(OOP_Object
*o
, uint8_t lun
, void *buffer
, uint32_t lba
, uint16_t count
)
135 struct pHidd_USBStorage_Read p
;
137 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_Read
);
145 return OOP_DoMethod(o
, &p
.mID
);
148 BOOL
HIDD_USBStorage_Write(OOP_Object
*o
, uint8_t lun
, void *buffer
, uint32_t lba
, uint16_t count
)
151 struct pHidd_USBStorage_Write p
;
153 if (!static_mid
) static_mid
= OOP_GetMethodID((STRPTR
)IID_Hidd_USBStorage
, moHidd_USBStorage_Write
);
161 return OOP_DoMethod(o
, &p
.mID
);