sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
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
16#ifndef __USBHDFSD_COMMON_H__
17#define __USBHDFSD_COMMON_H__
18
19#include <tamtypes.h>
20
21typedef struct bd_fragment {
22 u64 sector;
23 u32 count;
24} __attribute__((packed)) bd_fragment_t;
25
26// IOCTL function codes
28#define USBMASS_IOCTL_RENAME 0x0000
30#define USBMASS_IOCTL_GET_CLUSTER 0x0001
32#define USBMASS_IOCTL_GET_LBA 0x0002
34#define USBMASS_IOCTL_GET_DRIVERNAME 0x0003
36#define USBMASS_IOCTL_CHECK_CHAIN 0x0004
38#define USBMASS_IOCTL_GET_FRAGLIST 0x0005
40#define USBMASS_IOCTL_GET_DEVICE_NUMBER 0x0006
41
42// DEVCTL function codes
44#define USBMASS_DEVCTL_STOP_UNIT 0x0000
46#define USBMASS_DEVCTL_STOP_ALL 0x0001
48#define USBMASS_DEVCTL_GET_SECTOR_SIZE 0x0002
50#define USBMASS_DEVCTL_GET_TOTAL_SIZE 0x0003
52#define USBMASS_DEVCTL_GET_FREE_SIZE 0x0004
53
54// Device status bits.
56#define USBMASS_DEV_STAT_CONN 0x01
58#define USBMASS_DEV_STAT_CONF 0x02
60#define USBMASS_DEV_STAT_ERR 0x80
61
62// Device events
63enum USBMASS_DEV_EV {
64 USBMASS_DEV_EV_CONN = 0,
65 USBMASS_DEV_EV_DISCONN
66};
67
68#endif /* __USBHDFSD_COMMON_H__ */
u32 count
start sector of fragmented bd/file