lv_drv_conf.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /**
  2. * @file lv_drv_conf.h
  3. *
  4. */
  5. #ifndef LV_DRV_CONF_H
  6. #define LV_DRV_CONF_H
  7. #include "lv_conf.h"
  8. #include "config.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. #if OB_PC_SIMULATOR /*Set in `config.h`*/
  67. #define USE_MONITOR 1
  68. #if USE_MONITOR
  69. #define MONITOR_HOR_RES LV_HOR_RES
  70. #define MONITOR_VER_RES LV_VER_RES
  71. #endif
  72. #endif
  73. /*----------------
  74. * SSD1963
  75. *--------------*/
  76. #define USE_SSD1963 0
  77. #if USE_SSD1963
  78. #define SSD1963_HOR_RES LV_HOR_RES
  79. #define SSD1963_VER_RES LV_VER_RES
  80. #define SSD1963_HDP 479
  81. #define SSD1963_HT 531
  82. #define SSD1963_HPS 43
  83. #define SSD1963_LPS 8
  84. #define SSD1963_HPW 10
  85. #define SSD1963_VDP 271
  86. #define SSD1963_VT 288
  87. #define SSD1963_VPS 12
  88. #define SSD1963_FPS 4
  89. #define SSD1963_VPW 10
  90. #define SSD1963_HS_NEG 0 /*Negative hsync*/
  91. #define SSD1963_VS_NEG 0 /*Negative vsync*/
  92. #define SSD1963_ORI 0 /*0, 90, 180, 270*/
  93. #define SSD1963_COLOR_DEPTH 16
  94. #endif
  95. /*----------------
  96. * R61581
  97. *--------------*/
  98. #define USE_R61581 0
  99. #if USE_R61581 != 0
  100. #define R61581_HOR_RES LV_HOR_RES
  101. #define R61581_VER_RES LV_VER_RES
  102. #define R61581_HDP 479
  103. #define R61581_HT 531
  104. #define R61581_HPS 43
  105. #define R61581_LPS 8
  106. #define R61581_HPW 10
  107. #define R61581_VDP 271
  108. #define R61581_VT 319
  109. #define R61581_VPS 12
  110. #define R61581_FPS 4
  111. #define R61581_VPW 10
  112. #define R61581_HS_NEG 0 /*Negative hsync*/
  113. #define R61581_VS_NEG 0 /*Negative vsync*/
  114. #define R61581_ORI 180 /*0, 90, 180, 270*/
  115. #define R61581_LV_COLOR_DEPTH 16
  116. #endif
  117. /*------------------------------
  118. * ST7565 (Monochrome, low res.)
  119. *-----------------------------*/
  120. #define USE_ST7565 0
  121. #if USE_ST7565 != 0
  122. /*No settings*/
  123. #endif /*USE_ST7565*/
  124. /*-----------------------------------------
  125. * Linux frame buffer device (/dev/fbx)
  126. *-----------------------------------------*/
  127. #if OB_PC_SIMULATOR == 0 /*Set in `config.h`*/
  128. #define USE_FBDEV 1
  129. #if USE_FBDEV != 0
  130. #define FBDEV_PATH "/dev/fb0"
  131. #endif
  132. #endif
  133. /*====================
  134. * Input devices
  135. *===================*/
  136. /*--------------
  137. * XPT2046
  138. *--------------*/
  139. #define USE_XPT2046 0
  140. #if USE_XPT2046 != 0
  141. #define XPT2046_HOR_RES 480
  142. #define XPT2046_VER_RES 320
  143. #define XPT2046_X_MIN 200
  144. #define XPT2046_Y_MIN 200
  145. #define XPT2046_X_MAX 3800
  146. #define XPT2046_Y_MAX 3800
  147. #define XPT2046_AVG 4
  148. #define XPT2046_INV 0
  149. #endif
  150. /*-----------------
  151. * FT5406EE8
  152. *-----------------*/
  153. #define USE_FT5406EE8 0
  154. #if USE_FT5406EE8
  155. #define FT5406EE8_I2C_ADR 0x38 /*7 bit address*/
  156. #endif
  157. /*-------------------------------
  158. * Mouse or touchpad on PC
  159. *------------------------------*/
  160. #define USE_MOUSE 0
  161. #if USE_MOUSE
  162. /*No settings*/
  163. #endif
  164. /*-------------------------------
  165. * Keyboard of a PC
  166. *------------------------------*/
  167. #define USE_KEYBOARD 0
  168. #if USE_KEYBOARD
  169. /*No settings*/
  170. #endif
  171. #endif /*LV_DRV_CONF_H*/