ltpc.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*** ltpc.h
  3. *
  4. *
  5. ***/
  6. #define LT_GETRESULT 0x00
  7. #define LT_WRITEMEM 0x01
  8. #define LT_READMEM 0x02
  9. #define LT_GETFLAGS 0x04
  10. #define LT_SETFLAGS 0x05
  11. #define LT_INIT 0x10
  12. #define LT_SENDLAP 0x13
  13. #define LT_RCVLAP 0x14
  14. /* the flag that we care about */
  15. #define LT_FLAG_ALLLAP 0x04
  16. struct lt_getresult {
  17. unsigned char command;
  18. unsigned char mailbox;
  19. };
  20. struct lt_mem {
  21. unsigned char command;
  22. unsigned char mailbox;
  23. unsigned short addr; /* host order */
  24. unsigned short length; /* host order */
  25. };
  26. struct lt_setflags {
  27. unsigned char command;
  28. unsigned char mailbox;
  29. unsigned char flags;
  30. };
  31. struct lt_getflags {
  32. unsigned char command;
  33. unsigned char mailbox;
  34. };
  35. struct lt_init {
  36. unsigned char command;
  37. unsigned char mailbox;
  38. unsigned char hint;
  39. };
  40. struct lt_sendlap {
  41. unsigned char command;
  42. unsigned char mailbox;
  43. unsigned char dnode;
  44. unsigned char laptype;
  45. unsigned short length; /* host order */
  46. };
  47. struct lt_rcvlap {
  48. unsigned char command;
  49. unsigned char dnode;
  50. unsigned char snode;
  51. unsigned char laptype;
  52. unsigned short length; /* host order */
  53. };
  54. union lt_command {
  55. struct lt_getresult getresult;
  56. struct lt_mem mem;
  57. struct lt_setflags setflags;
  58. struct lt_getflags getflags;
  59. struct lt_init init;
  60. struct lt_sendlap sendlap;
  61. struct lt_rcvlap rcvlap;
  62. };
  63. typedef union lt_command lt_command;