mirror of
https://github.com/fsender/readguy.git
synced 2026-05-10 11:09:34 +08:00
update to 1.2.0 ver
This commit is contained in:
@@ -73,9 +73,11 @@
|
||||
//#define _DEFINA_SD_CS_PIN 0
|
||||
|
||||
// * for NodeMcu ctg stack LCF board
|
||||
#define WHITE_GAP 8
|
||||
|
||||
#ifdef ESP8266
|
||||
#define DISPLAY_TYPE_ST7789_240320 //2.0寸的ST7789 IPS TFT模块
|
||||
#define _DEFINA_IPS_CS_PIN 15
|
||||
#define _DEFINA_IPS_CS_PIN 15 //lcdDebug是不支持自定义引脚的
|
||||
#define _DEFINA_IPS_DC_PIN 5
|
||||
#define _DEFINA_IPS_RST_PIN -1
|
||||
|
||||
|
||||
@@ -54,12 +54,15 @@ void drv::drv_dispWriter(std::function<uint8_t(int)> f){ //单色刷新
|
||||
}
|
||||
for(int j=0;j<drv_height();j++){
|
||||
for(int i=0;i<xbits;i++){
|
||||
if(f(j*xbits+i) == 0xff && i!=xbits-1)
|
||||
uint_fast8_t readf=f(j*xbits+i);
|
||||
if(readf == 0xff && i!=xbits-1)
|
||||
ips.drawFastHLine(WHITE_GAP+i*8,WHITE_GAP+j,8,0xffff);
|
||||
else {
|
||||
int lineOK=0;
|
||||
ips.readRect(WHITE_GAP+i*8,WHITE_GAP+j,8,1,dat); //注意这里 readrect函数已经自动化实现边界处理了
|
||||
if(f(j*xbits+i) == 0x00 && i!=xbits-1){
|
||||
if(partMode)//注意这里 readrect函数已经自动化实现边界处理了
|
||||
ips.readRect(WHITE_GAP+i*8,WHITE_GAP+j,8,1,dat);
|
||||
else memset(dat,0xff,sizeof(dat));
|
||||
if(readf == 0x00 && i!=xbits-1){
|
||||
for(int k=0;k<8;k++)
|
||||
if((dat[k]&0x1f)==0x1f) lineOK++;
|
||||
if(lineOK==8) {
|
||||
@@ -69,7 +72,7 @@ void drv::drv_dispWriter(std::function<uint8_t(int)> f){ //单色刷新
|
||||
}
|
||||
for(int k=0;k<8;k++){
|
||||
if(i==xbits-1 && i*8+k>=drv_width()) break;
|
||||
if((f(j*xbits+i)&(0x80>>k)))
|
||||
if((readf&(0x80>>k)))
|
||||
ips.drawPixel(WHITE_GAP+i*8+k,WHITE_GAP+j,0xffff);
|
||||
else if((dat[k]&0x1f)==0x1f)
|
||||
ips.drawPixel(WHITE_GAP+i*8+k,WHITE_GAP+j,0x1082*(15-depth));
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#ifdef MEPD_DEBUG_DISPLAY
|
||||
#include "ctg_stack_c_defines.h"
|
||||
|
||||
#define WHITE_GAP 4
|
||||
namespace EpdLcdDebug{
|
||||
|
||||
class drv : public readguyEpdBase {
|
||||
|
||||
Reference in New Issue
Block a user