home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / include / linux / cpad.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-08-11  |  2.1 KB  |  85 lines

  1. #ifndef _LINUX_CPAD_H
  2. #define _LINUX_CPAD_H
  3.  
  4. #include <linux/input.h>
  5.  
  6.  
  7. /* supported ioctls for /dev/usb/cpad*
  8.  * because the backlight has a finite lifespan (ca. 1000 - 3000 hours), the
  9.  * CPAD_FLASH ioctl should be used instead of CPAD_WLIGHT.
  10.  * to get the result of CPAD_RLIGHT and CPAD_RLCD, read some bytes from
  11.  * the character device. the third byte is the result.
  12.  */
  13. #define CPAD_IOCTL_BASE        0x71
  14.  
  15. /* get driver version */
  16. #define CPAD_VERSION        _IOR('U', CPAD_IOCTL_BASE, int)
  17.  
  18. /* get device ID */
  19. #define CPAD_CGID        _IOR('U', CPAD_IOCTL_BASE+1, struct input_id)
  20.  
  21. /* reset usb device */
  22. #define CPAD_RESET        _IO('U', CPAD_IOCTL_BASE+2)
  23.  
  24. /* set backlight state */
  25. #define CPAD_WLIGHT        _IOW('U', CPAD_IOCTL_BASE+3, unsigned char)
  26.  
  27. /* set LCD state */
  28. #define CPAD_WLCD        _IOW('U', CPAD_IOCTL_BASE+5, unsigned char)
  29.  
  30. /* read backlight state */                        
  31. #define CPAD_RLIGHT        _IO('U', CPAD_IOCTL_BASE+6)
  32.  
  33. /* read LCD state */
  34. #define CPAD_RLCD        _IO('U', CPAD_IOCTL_BASE+7)
  35.  
  36. /* flash backlight */
  37. #define CPAD_FLASH        _IOW('U', CPAD_IOCTL_BASE+8, int)
  38.  
  39. /* read eeprom */
  40. #define CPAD_REEPROM        _IO('U', CPAD_IOCTL_BASE+4)
  41.  
  42.  
  43. /*
  44.  * writing to /dev/usb/cpad*
  45.  *    the cPad display is controlled by a Seiko/Epson 1335 LCD Controller IC
  46.  *    a write to the device consists of a command followed by data:
  47.  *        <1335 command> [<data> ...]
  48.  *    for MRWITE_1335 command, data may be up to 274*30 bytes long
  49.  *    possible commands as reported in the sed1335 data sheet are:
  50.  */
  51. /* System control */
  52. #define SYSSET_1335        0x40
  53. #define SLEEP_1335        0x53
  54.  
  55. /* Display control */
  56. #define DISPOFF_1335        0x58
  57. #define DISP_1335        0x59
  58. #define SCROLL_1335        0x44
  59. #define CSRF_1335        0x5d
  60. #define CGRAMADR_1335        0x5c
  61. #define CSRDIR_RIGHT_1335    0x4c
  62. #define CSRDIR_LEFT_1335    0x4d
  63. #define CSRDIR_UP_1335        0x4e
  64. #define CSRDIR_DOWN_1335    0x4f
  65. #define HDOTSCR_1335        0x5a
  66. #define OVLAY_1335        0x5b
  67.  
  68. /* Drawing control */
  69. #define CSRW_1335        0x46
  70. #define CSRR_1335        0x47
  71.  
  72. /* Memory control */
  73. #define MWRITE_1335        0x42
  74. #define MREAD_1335        0x43
  75.  
  76.  
  77. /*
  78.  * reading /dev/usb/cpad*
  79.  *    reads answer of the sed1335 to a command, can be 2-32 bytes long.
  80.  *    the information is only accessible until the next write access.
  81.  */
  82.  
  83.  
  84. #endif /* _LINUX_CPAD_H */
  85.