|
@@ -5,8 +5,8 @@
|
|
*
|
|
*
|
|
* Change Logs:
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
* Date Author Notes
|
|
- * 2018-08-14 flybreak the first version
|
|
|
|
- * 2018-09-18 balanceTWK add sleep mode function
|
|
|
|
|
|
+ * 2018-08-14 flybreak the first version
|
|
|
|
+ * 2018-09-18 balanceTWK add sleep mode function
|
|
*/
|
|
*/
|
|
|
|
|
|
#ifndef __DRV_LCD_H__
|
|
#ifndef __DRV_LCD_H__
|
|
@@ -14,14 +14,10 @@
|
|
|
|
|
|
#include <rtthread.h>
|
|
#include <rtthread.h>
|
|
|
|
|
|
-#ifdef PKG_USING_QRCODE
|
|
|
|
-#include <qrcode.h>
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
#define LCD_W 240
|
|
#define LCD_W 240
|
|
#define LCD_H 240
|
|
#define LCD_H 240
|
|
|
|
|
|
-//POINT_COLOR
|
|
|
|
|
|
+#ifndef BSP_USING_LVGL
|
|
#define WHITE 0xFFFF
|
|
#define WHITE 0xFFFF
|
|
#define BLACK 0x0000
|
|
#define BLACK 0x0000
|
|
#define BLUE 0x001F
|
|
#define BLUE 0x001F
|
|
@@ -42,25 +38,25 @@
|
|
#define GRAY240 0XF79E
|
|
#define GRAY240 0XF79E
|
|
|
|
|
|
extern rt_uint16_t BACK_COLOR, FORE_COLOR;
|
|
extern rt_uint16_t BACK_COLOR, FORE_COLOR;
|
|
-
|
|
|
|
void lcd_clear(rt_uint16_t color);
|
|
void lcd_clear(rt_uint16_t color);
|
|
-void lcd_address_set(rt_uint16_t x1, rt_uint16_t y1, rt_uint16_t x2, rt_uint16_t y2);
|
|
|
|
void lcd_set_color(rt_uint16_t back, rt_uint16_t fore);
|
|
void lcd_set_color(rt_uint16_t back, rt_uint16_t fore);
|
|
-
|
|
|
|
void lcd_draw_point(rt_uint16_t x, rt_uint16_t y);
|
|
void lcd_draw_point(rt_uint16_t x, rt_uint16_t y);
|
|
void lcd_draw_point_color(rt_uint16_t x, rt_uint16_t y, rt_uint16_t color);
|
|
void lcd_draw_point_color(rt_uint16_t x, rt_uint16_t y, rt_uint16_t color);
|
|
void lcd_draw_circle(rt_uint16_t x0, rt_uint16_t y0, rt_uint8_t r);
|
|
void lcd_draw_circle(rt_uint16_t x0, rt_uint16_t y0, rt_uint8_t r);
|
|
void lcd_draw_line(rt_uint16_t x1, rt_uint16_t y1, rt_uint16_t x2, rt_uint16_t y2);
|
|
void lcd_draw_line(rt_uint16_t x1, rt_uint16_t y1, rt_uint16_t x2, rt_uint16_t y2);
|
|
void lcd_draw_rectangle(rt_uint16_t x1, rt_uint16_t y1, rt_uint16_t x2, rt_uint16_t y2);
|
|
void lcd_draw_rectangle(rt_uint16_t x1, rt_uint16_t y1, rt_uint16_t x2, rt_uint16_t y2);
|
|
void lcd_fill(rt_uint16_t x_start, rt_uint16_t y_start, rt_uint16_t x_end, rt_uint16_t y_end, rt_uint16_t color);
|
|
void lcd_fill(rt_uint16_t x_start, rt_uint16_t y_start, rt_uint16_t x_end, rt_uint16_t y_end, rt_uint16_t color);
|
|
-void lcd_fill_array(rt_uint16_t x_start, rt_uint16_t y_start, rt_uint16_t x_end, rt_uint16_t y_end, void *pcolor);
|
|
|
|
void lcd_show_num(rt_uint16_t x, rt_uint16_t y, rt_uint32_t num, rt_uint8_t len, rt_uint32_t size);
|
|
void lcd_show_num(rt_uint16_t x, rt_uint16_t y, rt_uint32_t num, rt_uint8_t len, rt_uint32_t size);
|
|
rt_err_t lcd_show_string(rt_uint16_t x, rt_uint16_t y, rt_uint32_t size, const char *fmt, ...);
|
|
rt_err_t lcd_show_string(rt_uint16_t x, rt_uint16_t y, rt_uint32_t size, const char *fmt, ...);
|
|
rt_err_t lcd_show_image(rt_uint16_t x, rt_uint16_t y, rt_uint16_t length, rt_uint16_t wide, const rt_uint8_t *p);
|
|
rt_err_t lcd_show_image(rt_uint16_t x, rt_uint16_t y, rt_uint16_t length, rt_uint16_t wide, const rt_uint8_t *p);
|
|
|
|
+#endif /* BSP_USING_LVGL */
|
|
|
|
|
|
void lcd_enter_sleep(void);
|
|
void lcd_enter_sleep(void);
|
|
void lcd_exit_sleep(void);
|
|
void lcd_exit_sleep(void);
|
|
void lcd_display_on(void);
|
|
void lcd_display_on(void);
|
|
void lcd_display_off(void);
|
|
void lcd_display_off(void);
|
|
|
|
|
|
|
|
+void lcd_address_set(rt_uint16_t x1, rt_uint16_t y1, rt_uint16_t x2, rt_uint16_t y2);
|
|
|
|
+void lcd_fill_array(rt_uint16_t x_start, rt_uint16_t y_start, rt_uint16_t x_end, rt_uint16_t y_end, void *pcolor);
|
|
|
|
+
|
|
#endif
|
|
#endif
|