Added PCD8544 to readme, addressed PR comments
This commit is contained in:
parent
37a4d3a4e6
commit
f3f6ba6470
|
@ -30,6 +30,7 @@ swap of RGB565 color on the LVGL configuration menuconfig (it's not handled auto
|
||||||
| RA8875 | TFT | SPI | 16: RGB565 | Yes |
|
| RA8875 | TFT | SPI | 16: RGB565 | Yes |
|
||||||
| SH1107 | Monochrome | SPI | 1: 1byte per pixel | No |
|
| SH1107 | Monochrome | SPI | 1: 1byte per pixel | No |
|
||||||
| SSD1306 | Monochrome | I2C | 1: 1byte per pixel | No |
|
| SSD1306 | Monochrome | I2C | 1: 1byte per pixel | No |
|
||||||
|
| PCD8544 | Monochrome | SPI | 1: 1byte per pixel | No |
|
||||||
| IL3820 | e-Paper | SPI | 1: 1byte per pixel | No |
|
| IL3820 | e-Paper | SPI | 1: 1byte per pixel | No |
|
||||||
| UC8151D/ GoodDisplay GDEW0154M10 DES | e-Paper | SPI | 1: 1byte per pixel | No |
|
| UC8151D/ GoodDisplay GDEW0154M10 DES | e-Paper | SPI | 1: 1byte per pixel | No |
|
||||||
| FitiPower JD79653A/ GoodDisplay GDEW0154M09 | e-Paper | SPI | 1: 1byte per pixel | No |
|
| FitiPower JD79653A/ GoodDisplay GDEW0154M09 | e-Paper | SPI | 1: 1byte per pixel | No |
|
||||||
|
|
|
@ -116,9 +116,12 @@ void pcd8544_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t
|
||||||
|
|
||||||
uint8_t * buf = (uint8_t *) color_map;
|
uint8_t * buf = (uint8_t *) color_map;
|
||||||
|
|
||||||
|
// Check if the whole frame buffer can be sent in a single SPI transaction
|
||||||
|
|
||||||
if ((area->x1 == 0) && (area->y1 == 0) && (area->x2 == (disp_drv->hor_res - 1)) && (area->y2 == (disp_drv->ver_res - 1))){
|
if ((area->x1 == 0) && (area->y1 == 0) && (area->x2 == (disp_drv->hor_res - 1)) && (area->y2 == (disp_drv->ver_res - 1))){
|
||||||
|
|
||||||
// optimize flush of complete frame buffer in a single SPI transaction
|
// send complete frame buffer at once.
|
||||||
|
// NOTE: disp_spi_send_colors triggers lv_disp_flush_ready
|
||||||
|
|
||||||
pcd8544_send_cmd(0x40); /* set Y address */
|
pcd8544_send_cmd(0x40); /* set Y address */
|
||||||
pcd8544_send_cmd(0x80); /* set X address */
|
pcd8544_send_cmd(0x80); /* set X address */
|
||||||
|
@ -141,6 +144,5 @@ void pcd8544_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_disp_flush_ready(disp_drv);
|
lv_disp_flush_ready(disp_drv);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -22,7 +22,7 @@ extern "C" {
|
||||||
#include "lvgl/lvgl.h"
|
#include "lvgl/lvgl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
|
||||||
|
@ -30,22 +30,22 @@ extern "C" {
|
||||||
#define PCD8544_RST CONFIG_LV_DISP_PIN_RST
|
#define PCD8544_RST CONFIG_LV_DISP_PIN_RST
|
||||||
#define PCD8544_BCKL CONFIG_LV_DISP_PIN_BCKL
|
#define PCD8544_BCKL CONFIG_LV_DISP_PIN_BCKL
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* TYPEDEFS
|
* TYPEDEFS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL PROTOTYPES
|
* GLOBAL PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
void pcd8544_init(void);
|
void pcd8544_init(void);
|
||||||
void pcd8544_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_map);
|
void pcd8544_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_map);
|
||||||
void pcd8544_rounder(lv_disp_drv_t * disp_drv, lv_area_t *area);
|
void pcd8544_rounder(lv_disp_drv_t * disp_drv, lv_area_t *area);
|
||||||
void pcd8544_set_px_cb(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
void pcd8544_set_px_cb(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||||
lv_color_t color, lv_opa_t opa);
|
lv_color_t color, lv_opa_t opa);
|
||||||
void pcd8544_set_contrast(uint8_t contrast);
|
void pcd8544_set_contrast(uint8_t contrast);
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* MACROS
|
* MACROS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue