lv_drv_conf_templ.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /**
  2. * @file lv_drv_conf.h
  3. *
  4. */
  5. #if 0 /*Remove this to enable the content*/
  6. #ifndef LV_DRV_CONF_H
  7. #define LV_DRV_CONF_H
  8. #include "lv_conf.h"
  9. /*********************
  10. * DELAY INTERFACE
  11. *********************/
  12. #define LV_DRV_DELAY_INCLUDE <stdint.h> /*Dummy include by default*/
  13. #define LV_DRV_DELAY_US(us) /*delay_us(us)*/ /*Delay the given number of microseconds*/
  14. #define LV_DRV_DELAY_MS(ms) /*delay_ms(ms)*/ /*Delay the given number of milliseconds*/
  15. /*********************
  16. * DISPLAY INTERFACE
  17. *********************/
  18. /*------------
  19. * Common
  20. *------------*/
  21. #define LV_DRV_DISP_INCLUDE <stdint.h> /*Dummy include by default*/
  22. #define LV_DRV_DISP_CMD_DATA(val) /*pin_x_set(val)*/ /*Set the command/data pin to 'val'*/
  23. #define LV_DRV_DISP_RST(val) /*pin_x_set(val)*/ /*Set the reset pin to 'val'*/
  24. /*---------
  25. * SPI
  26. *---------*/
  27. #define LV_DRV_DISP_SPI_CS(val) /*spi_cs_set(val)*/ /*Set the SPI's Chip select to 'val'*/
  28. #define LV_DRV_DISP_SPI_WR_BYTE(data) /*spi_wr(data)*/ /*Write a byte the SPI bus*/
  29. #define LV_DRV_DISP_SPI_WR_ARRAY(adr, n) /*spi_wr_mem(adr, n)*/ /*Write 'n' bytes to SPI bus from 'adr'*/
  30. /*------------------
  31. * Parallel port
  32. *-----------------*/
  33. #define LV_DRV_DISP_PAR_CS(val) /*par_cs_set(val)*/ /*Set the Parallel port's Chip select to 'val'*/
  34. #define LV_DRV_DISP_PAR_SLOW /*par_slow()*/ /*Set low speed on the parallel port*/
  35. #define LV_DRV_DISP_PAR_FAST /*par_fast()*/ /*Set high speed on the parallel port*/
  36. #define LV_DRV_DISP_PAR_WR_WORD(data) /*par_wr(data)*/ /*Write a word to the parallel port*/
  37. #define LV_DRV_DISP_PAR_WR_ARRAY(adr, n) /*par_wr_mem(adr,n)*/ /*Write 'n' bytes to Parallel ports from 'adr'*/
  38. /***************************
  39. * INPUT DEVICE INTERFACE
  40. ***************************/
  41. /*----------
  42. * Common
  43. *----------*/
  44. #define LV_DRV_INDEV_INCLUDE <stdint.h> /*Dummy include by default*/
  45. #define LV_DRV_INDEV_RST(val) /*pin_x_set(val)*/ /*Set the reset pin to 'val'*/
  46. #define LV_DRV_INDEV_IRQ_READ 0 /*pn_x_read()*/ /*Read the IRQ pin*/
  47. /*---------
  48. * SPI
  49. *---------*/
  50. #define LV_DRV_INDEV_SPI_CS(val) /*spi_cs_set(val)*/ /*Set the SPI's Chip select to 'val'*/
  51. #define LV_DRV_INDEV_SPI_XCHG_BYTE(data) 0 /*spi_xchg(val)*/ /*Write 'val' to SPI and give the read value*/
  52. /*---------
  53. * I2C
  54. *---------*/
  55. #define LV_DRV_INDEV_I2C_START /*i2c_start()*/ /*Make an I2C start*/
  56. #define LV_DRV_INDEV_I2C_STOP /*i2c_stop()*/ /*Make an I2C stop*/
  57. #define LV_DRV_INDEV_I2C_RESTART /*i2c_restart()*/ /*Make an I2C restart*/
  58. #define LV_DRV_INDEV_I2C_WR(data) /*i2c_wr(data)*/ /*Write a byte to the I1C bus*/
  59. #define LV_DRV_INDEV_I2C_READ(last_read) 0 /*i2c_rd()*/ /*Read a byte from the I2C bud*/
  60. /*********************
  61. * DISPLAY DRIVERS
  62. *********************/
  63. /*-------------------
  64. * Monitor of PC
  65. *-------------------*/
  66. #define USE_MONITOR 0
  67. #if USE_MONITOR
  68. #define MONITOR_HOR_RES LV_HOR_RES
  69. #define MONITOR_VER_RES LV_HOR_VER
  70. #endif
  71. /*----------------
  72. * SSD1963
  73. *--------------*/
  74. #define USE_SSD1963 0
  75. #if USE_SSD1963
  76. #define SSD1963_HOR_RES LV_HOR_RES
  77. #define SSD1963_VER_RES LV_VER_RES
  78. #define SSD1963_HDP 479
  79. #define SSD1963_HT 531
  80. #define SSD1963_HPS 43
  81. #define SSD1963_LPS 8
  82. #define SSD1963_HPW 10
  83. #define SSD1963_VDP 271
  84. #define SSD1963_VT 288
  85. #define SSD1963_VPS 12
  86. #define SSD1963_FPS 4
  87. #define SSD1963_VPW 10
  88. #define SSD1963_HS_NEG 0 /*Negative hsync*/
  89. #define SSD1963_VS_NEG 0 /*Negative vsync*/
  90. #define SSD1963_ORI 0 /*0, 90, 180, 270*/
  91. #define SSD1963_COLOR_DEPTH 16
  92. #endif
  93. /*----------------
  94. * R61581
  95. *--------------*/
  96. #define USE_R61581 1
  97. #if USE_R61581 != 0
  98. #define R61581_HOR_RES LV_HOR_RES
  99. #define R61581_VER_RES LV_VER_RES
  100. #define R61581_HSPL 0 /*HSYNC signal polarity*/
  101. #define R61581_HSL 10 /*HSYNC length (Not Implemented)*/
  102. #define R61581_HFP 10 /*Horitontal Front poarch (Not Implemented)*/
  103. #define R61581_HBP 10 /*Horitontal Back poarch (Not Implemented */
  104. #define R61581_VSPL 0 /*VSYNC signal polarity*/
  105. #define R61581_VSL 10 /*VSYNC length (Not Implemented)*/
  106. #define R61581_VFP 8 /*Vertical Front poarch*/
  107. #define R61581_VBP 8 /*Vertical Back poarch */
  108. #define R61581_DPL 0 /*DCLK signal polarity*/
  109. #define R61581_EPL 1 /*ENABLE signal polarity*/
  110. #define R61581_ORI 0 /*0, 180*/
  111. #define R61581_LV_COLOR_DEPTH 16 /*Fix 16 bit*/
  112. #endif
  113. /*------------------------------
  114. * ST7565 (Monochrome, low res.)
  115. *-----------------------------*/
  116. #define USE_ST7565 0
  117. #if USE_ST7565 != 0
  118. /*No settings*/
  119. #endif /*USE_ST7565*/
  120. /*-----------------------------------------
  121. * Linux frame buffer device (/dev/fbx)
  122. *-----------------------------------------*/
  123. #define USE_FBDEV 0
  124. #if USE_FBDEV != 0
  125. #define FBDEV_PATH "/dev/fb0"
  126. #endif
  127. /*====================
  128. * Input devices
  129. *===================*/
  130. /*--------------
  131. * XPT2046
  132. *--------------*/
  133. #define USE_XPT2046 0
  134. #if USE_XPT2046 != 0
  135. #define XPT2046_HOR_RES 480
  136. #define XPT2046_VER_RES 320
  137. #define XPT2046_X_MIN 200
  138. #define XPT2046_Y_MIN 200
  139. #define XPT2046_X_MAX 3800
  140. #define XPT2046_Y_MAX 3800
  141. #define XPT2046_AVG 4
  142. #define XPT2046_INV 0
  143. #endif
  144. /*-----------------
  145. * FT5406EE8
  146. *-----------------*/
  147. #define USE_FT5406EE8 0
  148. #if USE_FT5406EE8
  149. #define FT5406EE8_I2C_ADR 0x38 /*7 bit address*/
  150. #endif
  151. /*-------------------------------
  152. * Mouse or touchpad on PC
  153. *------------------------------*/
  154. #define USE_MOUSE 0
  155. #if USE_MOUSE
  156. /*No settings*/
  157. #endif
  158. /*-------------------------------
  159. * Keyboard of a PC
  160. *------------------------------*/
  161. #define USE_KEYBOARD 0
  162. #if USE_KEYBOARD
  163. /*No settings*/
  164. #endif
  165. #endif /*LV_DRV_CONF_H*/
  166. #endif /*Remove this to enable the content*/