usbus428ctldefs.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. *
  3. * Copyright (c) 2003 by Karsten Wiese <annabellesgarden@yahoo.de>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. */
  19. enum E_In84{
  20. eFader0 = 0,
  21. eFader1,
  22. eFader2,
  23. eFader3,
  24. eFader4,
  25. eFader5,
  26. eFader6,
  27. eFader7,
  28. eFaderM,
  29. eTransport,
  30. eModifier = 10,
  31. eFilterSelect,
  32. eSelect,
  33. eMute,
  34. eSwitch = 15,
  35. eWheelGain,
  36. eWheelFreq,
  37. eWheelQ,
  38. eWheelPan,
  39. eWheel = 20
  40. };
  41. #define T_RECORD 1
  42. #define T_PLAY 2
  43. #define T_STOP 4
  44. #define T_F_FWD 8
  45. #define T_REW 0x10
  46. #define T_SOLO 0x20
  47. #define T_REC 0x40
  48. #define T_NULL 0x80
  49. struct us428_ctls{
  50. unsigned char Fader[9];
  51. unsigned char Transport;
  52. unsigned char Modifier;
  53. unsigned char FilterSelect;
  54. unsigned char Select;
  55. unsigned char Mute;
  56. unsigned char UNKNOWN;
  57. unsigned char Switch;
  58. unsigned char Wheel[5];
  59. };
  60. typedef struct us428_ctls us428_ctls_t;
  61. typedef struct us428_setByte{
  62. unsigned char Offset,
  63. Value;
  64. }us428_setByte_t;
  65. enum {
  66. eLT_Volume = 0,
  67. eLT_Light
  68. };
  69. typedef struct usX2Y_volume {
  70. unsigned char Channel,
  71. LH,
  72. LL,
  73. RH,
  74. RL;
  75. } usX2Y_volume_t;
  76. struct us428_lights{
  77. us428_setByte_t Light[7];
  78. };
  79. typedef struct us428_lights us428_lights_t;
  80. typedef struct {
  81. char type;
  82. union {
  83. usX2Y_volume_t vol;
  84. us428_lights_t lights;
  85. } val;
  86. } us428_p4out_t;
  87. #define N_us428_ctl_BUFS 16
  88. #define N_us428_p4out_BUFS 16
  89. struct us428ctls_sharedmem{
  90. us428_ctls_t CtlSnapShot[N_us428_ctl_BUFS];
  91. int CtlSnapShotDiffersAt[N_us428_ctl_BUFS];
  92. int CtlSnapShotLast, CtlSnapShotRed;
  93. us428_p4out_t p4out[N_us428_p4out_BUFS];
  94. int p4outLast, p4outSent;
  95. };
  96. typedef struct us428ctls_sharedmem us428ctls_sharedmem_t;