ltpc.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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;