| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #ifndef __LCD_Hx__
- #define __LCD_Hx__
- #include "font.h"
- #define LCD_COLOR COLOR_WB
- #define LCD_WIDTH 128
- #define LCD_HEIGHT 64
- /* 颜色 */
- #if (LCD_COLOR==COLOR_WB)
- #define COLOR_WHITE 1
- #define COLOR_BLACK 0
- #elif (LCD_COLOR==COLOR_RGB565)
- #define COLOR_WHITE 0xFFFF
- #define COLOR_BLACK 0x0000
- #define COLOR_BLUE 0x001F
- #define COLOR_BRED 0XF81F
- #define COLOR_GRED 0XFFE0
- #define COLOR_GBLUE 0X07FF
- #define COLOR_RED 0xF800
- #define COLOR_MAGENTA 0xF81F
- #define COLOR_GREEN 0x07E0
- #define COLOR_CYAN 0x7FFF
- #define COLOR_YELLOW 0xFFE0
- #define COLOR_BROWN 0XBC40
- #define COLOR_BRRED 0XFC07
- #define COLOR_GRAY 0X8430
- #elif (LCD_COLOR==COLOR_RGB666)
-
- #elif (LCD_COLOR==COLOR_RGB888)
- #else
- #endif
- enum {
- HORIZONTAL_LEFT=0,
- HORIZONTAL_CENTER,
- HORIZONTAL_RIGHT,
- };
- enum {
- VERTICAL_TOP=0,
- VERTICAL_CENTER,
- VERTICAL_BOTTOM,
- };
- enum {
- COLOR_WB=0,
- COLOR_RGB8,
- COLOR_RGB565,
- COLOR_RGB666,
- COLOR_RGB888,
- COLOR_RGBA,
- };
- void lcd_init(int width, int height, int color);
- void lcd_deinit(void);
- void lcd_rotate(int angle);
- int lcd_get_rotate(void);
- void lcd_set_backlight(int on);
- void lcd_fill(int color);
- void lcd_draw_line(int x1, int y1, int x2, int y2, int color);
- void lcd_draw_rect(int x1, int y1, int w, int h, int color);
- void lcd_fill_rect(int x1, int y1, int w, int h, int color);
- void lcd_draw_string(int x, int y, int width, int height, char *str, int font, int color, int bgcolor, int hori, int vert);
- void lcd_refresh(void);
- #endif
|