revert between 56095 -> 55830 in arch
[AROS.git] / workbench / devs / USB / classes / MassStorage / include / mstorage.h
blob0cd75cc922d3baf523d11ce0ee5ac4580cdde6ce
1 #ifndef USB_STORAGE_H
2 #define USB_STORAGE_H
4 /*
5 Copyright (C) 2006 by Michal Schulz
6 $Id$
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU Library General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU Library General Public
19 License along with this program; if not, write to the
20 Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #include <stdint.h>
25 #include <oop/oop.h>
26 #include <usb/usb.h>
28 #define CLID_Hidd_USBStorage "Bus::USB::MassStorage"
29 #define IID_Hidd_USBStorage "IBus::USB::MassStorage"
31 #define HiddUSBStorageAttrBase __IHidd_USBStorage
33 enum {
34 moHidd_USBStorage_GetMaxLUN,
35 moHidd_USBStorage_Reset,
36 moHidd_USBStorage_DirectSCSI,
38 moHidd_USBStorage_TestUnitReady,
39 moHidd_USBStorage_RequestSense,
40 moHidd_USBStorage_Read,
41 moHidd_USBStorage_Write,
42 moHidd_USBStorage_ReadCapacity,
43 moHidd_USBStorage_Inquiry,
45 NUM_HIDD_USBStorage_METHODS
48 struct pHidd_USBStorage_GetMaxLUN {
49 OOP_MethodID mID;
52 struct pHidd_USBStorage_Reset {
53 OOP_MethodID mID;
56 struct pHidd_USBStorage_DirectSCSI {
57 OOP_MethodID mID;
58 uint8_t lun;
59 uint8_t *cmd;
60 uint8_t cmdLen;
61 void *data;
62 uint32_t dataLen;
63 uint8_t read;
66 struct pHidd_USBStorage_TestUnitReady {
67 OOP_MethodID mID;
68 uint8_t lun;
71 struct pHidd_USBStorage_RequestSense {
72 OOP_MethodID mID;
73 uint8_t lun;
74 void *buffer;
75 uint32_t bufferLength;
78 struct pHidd_USBStorage_Read {
79 OOP_MethodID mID;
80 uint8_t lun;
81 void *buffer;
82 uint32_t block;
83 uint16_t count;
86 struct pHidd_USBStorage_Write {
87 OOP_MethodID mID;
88 uint8_t lun;
89 void *buffer;
90 uint32_t block;
91 uint16_t count;
94 struct pHidd_USBStorage_ReadCapacity {
95 OOP_MethodID mID;
96 uint8_t lun;
97 uint32_t *blockTotal;
98 uint32_t *blockSize;
101 struct pHidd_USBStorage_Inquiry {
102 OOP_MethodID mID;
103 uint8_t lun;
104 void *buffer;
105 uint32_t bufferLength;
108 BOOL HIDD_USBStorage_Reset(OOP_Object *o);
109 uint8_t HIDD_USBStorage_GetMaxLUN(OOP_Object *o);
110 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);
111 BOOL HIDD_USBStorage_TestUnitReady(OOP_Object *o, uint8_t lun);
112 BOOL HIDD_USBStorage_RequestSense(OOP_Object *o, uint8_t lun, void *buffer, uint32_t bufferLength);
113 BOOL HIDD_USBStorage_Read(OOP_Object *o, uint8_t lun, void *buffer, uint32_t lba, uint16_t count);
114 BOOL HIDD_USBStorage_Write(OOP_Object *o, uint8_t lun, void *buffer, uint32_t lba, uint16_t count);
115 BOOL HIDD_USBStorage_ReadCapacity(OOP_Object *o, uint8_t lun, uint32_t *blockTotal, uint32_t *blockSize);
116 BOOL HIDD_USBStorage_Inquiry(OOP_Object *o, uint8_t lun, void *buffer, uint32_t bufferLength);
118 #endif /* USB_STORAGE_H */