lcd.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * ark_lcd.h
  3. *
  4. */
  5. #ifndef _LCD_H
  6. #define _LCD_H
  7. typedef enum {
  8. LCD_OSD0 = 0,
  9. LCD_OSD1,
  10. LCD_OSD_NUMS,
  11. }LCD_OSD_LAYER;
  12. typedef enum {
  13. LCD_OSD_FORAMT_YUV420 = 0,
  14. LCD_OSD_FORAMT_ARGB888,
  15. LCD_OSD_FORAMT_RGB565,
  16. LCD_OSD_FORAMT_RGB454,
  17. LCD_OSD_FORAMT_NUMS,
  18. }LCD_OSD_FORMAT;
  19. typedef enum {
  20. LCD_OSD_Y_U_V420 = 0,
  21. LCD_OSD_Y_UV420,
  22. }LCD_OSD_YUV420_MODE;
  23. #define LCD_UI_LAYER LCD_OSD1
  24. /* osd layer set func */
  25. /************************************************************/
  26. int ark_lcd_set_osd_size(LCD_OSD_LAYER osd, uint32_t width, uint32_t height);
  27. int ark_lcd_set_osd_format(LCD_OSD_LAYER osd, LCD_OSD_FORMAT format);
  28. int ark_lcd_set_osd_yaddr(LCD_OSD_LAYER osd, uint32_t yaddr);
  29. int ark_lcd_set_osd_uaddr(LCD_OSD_LAYER osd, uint32_t yaddr);
  30. int ark_lcd_set_osd_vaddr(LCD_OSD_LAYER osd, uint32_t yaddr);
  31. int ark_lcd_osd_enable(LCD_OSD_LAYER osd, uint8_t enable);
  32. /* Interface with default argument value, may be you need them. If you not sure, ingore them */
  33. int ark_lcd_set_osd_possition(LCD_OSD_LAYER osd, uint32_t h, uint32_t v);
  34. int ark_lcd_set_osd_h_offset(LCD_OSD_LAYER osd, uint32_t offset);
  35. int ark_lcd_osd_coeff_enable(LCD_OSD_LAYER osd, uint8_t enable);
  36. int ark_lcd_osd_set_coeff(LCD_OSD_LAYER osd, uint32_t value);
  37. int ark_lcd_set_osd_mult_coef(LCD_OSD_LAYER osd, uint32_t value);
  38. int ark_lcd_set_osd_yuv420_mode(LCD_OSD_LAYER osd, LCD_OSD_YUV420_MODE mode);
  39. /* after calling the osd layer set func, you should call */
  40. /* this function to flush the parameters for atom option */
  41. int ark_lcd_set_osd_sync(LCD_OSD_LAYER osd);
  42. /************************************************************/
  43. int ark_lcd_get_osd_size(LCD_OSD_LAYER osd, uint32_t *width, uint32_t *height);
  44. int ark_lcd_get_osd_format(LCD_OSD_LAYER osd, LCD_OSD_FORMAT *format);
  45. int ark_lcd_get_osd_yaddr(LCD_OSD_LAYER osd, uint32_t *yaddr);
  46. uint32_t ark_lcd_get_virt_addr(void);
  47. int ark_lcd_enable(uint8_t enable);
  48. int ark_lcd_wait_for_vsync(void);
  49. int lcd_init(void);
  50. void lcd_uninit(void);
  51. #endif