Sony PlayStation2 Study
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.5 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. /**
  10. * @file
  11. * Common USBHDFSD definitions.
  12. */
  13. #ifndef __USBHDFSD_COMMON_H__
  14. #define __USBHDFSD_COMMON_H__
  15. //IOCTL function codes
  16. /** Rename opened file. Data input to ioctl() -> new, full filename of file. */
  17. #define USBMASS_IOCTL_RENAME 0x0000
  18. /** Returns first cluster number of opened file, within the filesystem. */
  19. #define USBMASS_IOCTL_GET_CLUSTER 0x0001
  20. /** Returns the absolute LBA of the opened file. */
  21. #define USBMASS_IOCTL_GET_LBA 0x0002
  22. /** Returns the block device driver name */
  23. #define USBMASS_IOCTL_GET_DRIVERNAME 0x0003
  24. /** Check if fragments exist */
  25. #define USBMASS_IOCTL_CHECK_CHAIN 0x0004
  26. //DEVCTL function codes
  27. /** Issues the SCSI STOP UNIT command to the specified device. Use this to shut down devices properly. */
  28. #define USBMASS_DEVCTL_STOP_UNIT 0x0000
  29. /** Issues the SCSI STOP UNIT command too all devices. Use this to shut down devices properly. */
  30. #define USBMASS_DEVCTL_STOP_ALL 0x0001
  31. //Device status bits.
  32. /** CONNected */
  33. #define USBMASS_DEV_STAT_CONN 0x01
  34. /** CONFigured */
  35. #define USBMASS_DEV_STAT_CONF 0x02
  36. /** ERRor */
  37. #define USBMASS_DEV_STAT_ERR 0x80
  38. //Device events
  39. enum USBMASS_DEV_EV{
  40. USBMASS_DEV_EV_CONN = 0,
  41. USBMASS_DEV_EV_DISCONN
  42. };
  43. #endif /* __USBHDFSD_COMMON_H__ */