adb_iop.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * ADB through the IOP
  4. * Written by Joshua M. Thompson
  5. */
  6. /* IOP number and channel number for ADB */
  7. #define ADB_IOP IOP_NUM_ISM
  8. #define ADB_CHAN 2
  9. /* From the A/UX headers...maybe important, maybe not */
  10. #define ADB_IOP_LISTEN 0x01
  11. #define ADB_IOP_TALK 0x02
  12. #define ADB_IOP_EXISTS 0x04
  13. #define ADB_IOP_FLUSH 0x08
  14. #define ADB_IOP_RESET 0x10
  15. #define ADB_IOP_INT 0x20
  16. #define ADB_IOP_POLL 0x40
  17. #define ADB_IOP_UNINT 0x80
  18. #define AIF_RESET 0x00
  19. #define AIF_FLUSH 0x01
  20. #define AIF_LISTEN 0x08
  21. #define AIF_TALK 0x0C
  22. /* Flag bits in struct adb_iopmsg */
  23. #define ADB_IOP_EXPLICIT 0x80 /* nonzero if explicit command */
  24. #define ADB_IOP_AUTOPOLL 0x40 /* auto/SRQ polling enabled */
  25. #define ADB_IOP_SET_AUTOPOLL 0x20 /* set autopoll device list */
  26. #define ADB_IOP_SRQ 0x04 /* SRQ detected */
  27. #define ADB_IOP_TIMEOUT 0x02 /* nonzero if timeout */
  28. #ifndef __ASSEMBLY__
  29. struct adb_iopmsg {
  30. __u8 flags; /* ADB flags */
  31. __u8 count; /* no. of data bytes */
  32. __u8 cmd; /* ADB command */
  33. __u8 data[8]; /* ADB data */
  34. __u8 spare[21]; /* spare */
  35. };
  36. #endif /* __ASSEMBLY__ */