digitv.h 1.5 KB

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