PS2SDK
PS2 Homebrew Libraries
usbhdfsd-common.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Licenced under Academic Free License version 2.0
7 # Review ps2sdk README & LICENSE files for further details.
8 */
9 
15 #ifndef __USBHDFSD_COMMON_H__
16 #define __USBHDFSD_COMMON_H__
17 
18 #include <tamtypes.h>
19 
20 typedef struct bd_fragment {
21  u64 sector;
22  u32 count;
23 } __attribute__((packed)) bd_fragment_t;
24 
25 // IOCTL function codes
27 #define USBMASS_IOCTL_RENAME 0x0000
28 
29 #define USBMASS_IOCTL_GET_CLUSTER 0x0001
30 
31 #define USBMASS_IOCTL_GET_LBA 0x0002
32 
33 #define USBMASS_IOCTL_GET_DRIVERNAME 0x0003
34 
35 #define USBMASS_IOCTL_CHECK_CHAIN 0x0004
36 
37 #define USBMASS_IOCTL_GET_FRAGLIST 0x0005
38 
39 #define USBMASS_IOCTL_GET_DEVICE_NUMBER 0x0006
40 
41 // DEVCTL function codes
43 #define USBMASS_DEVCTL_STOP_UNIT 0x0000
44 
45 #define USBMASS_DEVCTL_STOP_ALL 0x0001
46 
47 // Device status bits.
49 #define USBMASS_DEV_STAT_CONN 0x01
50 
51 #define USBMASS_DEV_STAT_CONF 0x02
52 
53 #define USBMASS_DEV_STAT_ERR 0x80
54 
55 // Device events
56 enum USBMASS_DEV_EV {
57  USBMASS_DEV_EV_CONN = 0,
58  USBMASS_DEV_EV_DISCONN
59 };
60 
61 #endif /* __USBHDFSD_COMMON_H__ */
bd_fragment
Definition: usbhdfsd-common.h:20
tamtypes.h
__attribute__
Definition: gif_registers.h:38
bd_fragment::count
u32 count
start sector of fragmented bd/file
Definition: usbhdfsd-common.h:22