digitv.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _DVB_USB_DIGITV_H_
  2. #define _DVB_USB_DIGITV_H_
  3. #define DVB_USB_LOG_PREFIX "digitv"
  4. #include "dvb-usb.h"
  5. struct digitv_state {
  6. int is_nxt6000;
  7. };
  8. /* protocol (from usblogging and the SDK:
  9. *
  10. * Always 7 bytes bulk message(s) for controlling
  11. *
  12. * First byte describes the command. Reads are 2 consecutive transfer (as always).
  13. *
  14. * General structure:
  15. *
  16. * write or first message of a read:
  17. * <cmdbyte> VV <len> B0 B1 B2 B3
  18. *
  19. * second message of a read
  20. * <cmdbyte> VV <len> R0 R1 R2 R3
  21. *
  22. * whereas 0 < len <= 4
  23. *
  24. * I2C address is stored somewhere inside the device.
  25. *
  26. * 0x01 read from EEPROM
  27. * VV = offset; B* = 0; R* = value(s)
  28. *
  29. * 0x02 read register of the COFDM
  30. * VV = register; B* = 0; R* = value(s)
  31. *
  32. * 0x05 write register of the COFDM
  33. * VV = register; B* = value(s);
  34. *
  35. * 0x06 write to the tuner (only for NXT6000)
  36. * VV = 0; B* = PLL data; len = 4;
  37. *
  38. * 0x03 read remote control
  39. * VV = 0; B* = 0; len = 4; R* = key
  40. *
  41. * 0x07 write to the remote (don't know why one should this, resetting ?)
  42. * VV = 0; B* = key; len = 4;
  43. *
  44. * 0x08 write remote type
  45. * VV = 0; B[0] = 0x01, len = 4
  46. *
  47. * 0x09 write device init
  48. * TODO
  49. */
  50. #define USB_READ_EEPROM 1
  51. #define USB_READ_COFDM 2
  52. #define USB_WRITE_COFDM 5
  53. #define USB_WRITE_TUNER 6
  54. #define USB_READ_REMOTE 3
  55. #define USB_WRITE_REMOTE 7
  56. #define USB_WRITE_REMOTE_TYPE 8
  57. #define USB_DEV_INIT 9
  58. #endif