vfd.h
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:5k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef __VFD_H
  2. #define __VFD_H
  3. #include "user_init.h"
  4. #ifdef PMP_MCU810
  5. #define CMD_PMP_IS_BUSY     0x83
  6. #define CMD_PMP_IS_UNBUSY 0x82
  7. #define CMD_PMP_POWER_OFF 0xe0
  8. #define CMD_WRITE_IR_HEAD_H 0xa0
  9. #define CMD_WRITE_IR_HEAD_L 0xa1
  10. #define CMD_WRITE_POWER_KEY 0xa2
  11. #define PMP_IS_BUSY         1
  12. #define PMP_IS_UNBUSY     2
  13. #define PMP_POWER_OFF     3
  14. #define WRITE_IR_HEAD_H     4
  15. #define WRITE_IR_HEAD_L     5
  16. #define WRITE_POWER_KEY     6
  17. #define Bat_var  21
  18. void write_pmp_mcu810(BYTE bCmd, BYTE bData);
  19. #endif
  20. #ifdef TP6317_PANNEL   //yaowh add 04-10-25
  21.   #define IR_USER_CODE_LOW8 0xff //user code 
  22.   #define IR_USER_CODE_HIGHT8 0xff
  23.   #define TP6317_IR_CODE1 0xFF //key code
  24.   #define TP6317_IR_CODE2 0xFF
  25.   #define TP6317_IR_CODE3 0xff //0xff==>unuse
  26.   #define TP6317_IR_CODE4 0xff
  27.   #define TP6317_IR_CODE5 0xff
  28.   #define TP6317_IR_CODE6 0xff
  29.   #define TP6317_IR_CODE7 0xff
  30.   #define TP6317_IR_CODE8 0xff
  31.   #define TP6317_VFD_KEY_CODE1 0xff   //Key7~Key0  all keys could weak up
  32.   #define TP6317_VFD_KEY_CODE2 0xff   //Key15~Key8
  33.   #define TP6317_VFD_KEY_CODE3 0xff   //Key23~Key16
  34.   BYTE Read_SW(void);
  35.   void define_standbykey(void);
  36.   void Power_off_define_TP6317_standbykey(void) ;
  37.   void TP6317_int(void);
  38. #endif
  39. #define  MONE_VFDR    //must open if use panel  11/22
  40. ///*  VFD Driver definition  
  41. //**  NEC series VFD controller receive command with LSB first 
  42. //*/  MN12510 command format is MSB first 
  43. #define VFDC_SET_DISP_13D15S    0x0c           /* add by chichang 2001 6/6 */ 
  44. #define VFDC_SET_DISP_12D16S    0x0b    // add by shawn 910131
  45. #define VFDC_SET_DISP_10D18S    0x09    // add by shawn 910131
  46. #define VFDC_SET_DISP_11D18S 0x0a
  47. #if (VFD_DRIVER == NEC16312)
  48. #define VFDC_SET_DISP (0<<6)
  49. #define VFDC_SET_DATA (1<<6)
  50. #define VFDC_SET_ADDR (3<<6)
  51. #define VFDC_DISP_CTRL (2<<6)
  52. #define VFDC_SET_DISP_4D16S (0<<0)
  53. #define VFDC_SET_DISP_5D16S (1<<0)
  54. #define VFDC_SET_DISP_6D16S (2<<0)
  55. #define VFDC_SET_DISP_7D15S (3<<0)
  56. #define VFDC_SET_DISP_8D14S (4<<0)
  57. #define VFDC_SET_DISP_9D13S (5<<0)
  58. #define VFDC_SET_DISP_10D12S (6<<0)
  59. #define VFDC_SET_DISP_11D11S (7<<0)
  60. #define VFDC_SET_DATA_DISP (0<<0)
  61. #define VFDC_SET_DATA_LED (1<<0)
  62. #define VFDC_SET_DATA_READKEY (2<<0)
  63. #define VFDC_SET_DATA_READSW (3<<0)
  64. #define VFDC_SET_DATA_AUTOINC (0<<2)
  65. #define VFDC_SET_DATA_FIXED (1<<2)
  66. #define VFDC_SET_DATA_TEST (1<<3)
  67. #define VFDC_SET_DATA_NORMAL (0<<3)
  68. #define VFDC_DISP_CTRL_ON (1<<3)
  69. #define VFDC_DISP_CTRL_OFF (0<<3)
  70. #define VFDC_DISP_CTRL_1_16 (0<<0)
  71. #define VFDC_DISP_CTRL_2_16 (1<<0)
  72. #define VFDC_DISP_CTRL_4_16 (2<<0)
  73. #define VFDC_DISP_CTRL_10_16 (3<<0)
  74. #define VFDC_DISP_CTRL_11_16 (4<<0)
  75. #define VFDC_DISP_CTRL_12_16 (5<<0)
  76. #define VFDC_DISP_CTRL_13_16 (6<<0)
  77. #define VFDC_DISP_CTRL_14_16 (7<<0)
  78. #elif (VFD_DRIVER==AD7312)
  79. #define VFDC_SET_DISP (0<<6)
  80. #define VFDC_SET_DATA (1<<6)
  81. #define VFDC_SET_ADDR (3<<6)
  82. #define VFDC_DISP_CTRL (2<<6)
  83. #define VFDC_SET_DISP_4D16S (0<<0)
  84. #define VFDC_SET_DISP_5D16S (1<<0)
  85. #define VFDC_SET_DISP_6D16S (2<<0)
  86. #define VFDC_SET_DISP_7D15S (3<<0)
  87. #define VFDC_SET_DISP_8D14S (4<<0)
  88. #define VFDC_SET_DISP_9D13S (5<<0)
  89. #define VFDC_SET_DISP_10D12S (6<<0)
  90. #define VFDC_SET_DISP_11D11S (7<<0)
  91. #define VFDC_SET_DATA_DISP (0<<0)
  92. #define VFDC_SET_DATA_LED (1<<0)
  93. #define VFDC_SET_DATA_READKEY (2<<0)
  94. #define VFDC_SET_DATA_READSW (3<<0)
  95. #define VFDC_SET_DATA_AUTOINC (0<<2)
  96. #define VFDC_SET_DATA_FIXED (1<<2)
  97. #define VFDC_SET_DATA_TEST (1<<3)
  98. #define VFDC_SET_DATA_NORMAL (0<<3)
  99. #define VFDC_DISP_CTRL_ON (1<<3)
  100. #define VFDC_DISP_CTRL_OFF (0<<3)
  101. #define VFDC_DISP_CTRL_1_16 (0<<0)
  102. #define VFDC_DISP_CTRL_2_16 (1<<0)
  103. #define VFDC_DISP_CTRL_4_16 (2<<0)
  104. #define VFDC_DISP_CTRL_10_16 (3<<0)
  105. #define VFDC_DISP_CTRL_11_16 (4<<0)
  106. #define VFDC_DISP_CTRL_12_16 (5<<0)
  107. #define VFDC_DISP_CTRL_13_16 (6<<0)
  108. #define VFDC_DISP_CTRL_14_16 (7<<0)
  109. #elif (VFD_DRIVER==HT1621)
  110. #define VFD_CMD_WR          0xa0
  111. #define SYS_EN             0x0802
  112. #define TIMER_DIS           0x0808
  113. #define WDT_DIS             0x080A
  114. #define BIAS_1_3            0x0852
  115. #define LCD_ON              0x0806
  116. #define LCD_OFF             0x0810
  117. #else        //FOR SPL10
  118. #define SPL10_DUTY_BIAS     0x83
  119. #ifdef  SPL10_KEY_5x4
  120. #define SPL10_KEY_MODE      0x90
  121. #elif   defined(SPL10_KEY_4x4)
  122. #define SPL10_KEY_MODE      0x91
  123. #elif   defined(SPL10_KEY_3x4F_B)
  124. #define SPL10_KEY_MODE      0x93
  125. #else 
  126. #define SPL10_KEY_MODE      0x90
  127. #endif
  128. #endif 
  129. #endif/*__VFD_H*/