lcd_port.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-01-08 zylx first version
  9. */
  10. #ifndef __LCD_PORT_H__
  11. #define __LCD_PORT_H__
  12. /* atk 4.3 inch screen, 800 * 480 */
  13. struct drv_lcd_device
  14. {
  15. struct rt_device parent;
  16. struct rt_device_graphic_info lcd_info;
  17. struct rt_semaphore lcd_lock;
  18. /* 0:front_buf is being used 1: back_buf is being used*/
  19. rt_uint8_t cur_buf;
  20. rt_uint8_t *front_buf;
  21. rt_uint8_t *back_buf;
  22. };
  23. #define LCD_WIDTH 800
  24. #define LCD_HEIGHT 480
  25. #define LCD_BITS_PER_PIXEL 24
  26. #define LCD_BUF_SIZE (LCD_WIDTH * LCD_HEIGHT * LCD_BITS_PER_PIXEL / 8)
  27. #define LCD_PIXEL_FORMAT RTGRAPHIC_PIXEL_FORMAT_RGB888
  28. #define LCD_HSYNC_WIDTH 1
  29. #define LCD_VSYNC_HEIGHT 1
  30. #define LCD_HBP 88
  31. #define LCD_VBP 32
  32. #define LCD_HFP 40
  33. #define LCD_VFP 13
  34. #define LCD_BACKLIGHT_USING_GPIO
  35. #define LCD_BL_GPIO_NUM GET_PIN(D, 4)
  36. #define LCD_DISP_GPIO_NUM GET_PIN(B, 5)
  37. /* atk 4.3 inch screen, 800 * 480 */
  38. #endif /* __LCD_PORT_H__ */