Skip to content

Commit

Permalink
Merge pull request #9223 from gemu2015/touch-update
Browse files Browse the repository at this point in the history
Touch update
  • Loading branch information
arendst authored Sep 3, 2020
2 parents 0cc8b72 + b67c0d1 commit 1ae9620
Show file tree
Hide file tree
Showing 13 changed files with 420 additions and 657 deletions.
5 changes: 3 additions & 2 deletions lib/Arduino_ST7789-gemu-1.0/Arduino_ST7789.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ void Arduino_ST7789::DisplayOnff(int8_t on) {
writecommand(ST7789_DISPON); //Display on
if (_bp>=0) {
#ifdef ST7789_DIMMER
ledcWrite(ESP32_PWM_CHANNEL,255);
ledcWrite(ESP32_PWM_CHANNEL,dimmer);
#else
digitalWrite(_bp,HIGH);
#endif
Expand All @@ -564,7 +564,8 @@ void Arduino_ST7789::DisplayOnff(int8_t on) {
}

// dimmer 0-100
void Arduino_ST7789::dim(uint8_t dimmer) {
void Arduino_ST7789::dim(uint8_t dim) {
dimmer = dim;
if (dimmer>15) dimmer=15;
dimmer=((float)dimmer/15.0)*255.0;
#ifdef ESP32
Expand Down
2 changes: 1 addition & 1 deletion lib/Arduino_ST7789-gemu-1.0/Arduino_ST7789.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class Arduino_ST7789 : public Renderer {
boolean _hwSPI;
boolean _SPI9bit;
boolean _DCbit;

uint8_t dimmer;
int8_t _cs, _dc, _rst, _sid, _sclk, _bp;

#if defined(USE_FAST_IO)
Expand Down
2 changes: 1 addition & 1 deletion lib/FT5206_Library/src/FT5206.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int FT5206_Class::begin(TwoWire &port, uint8_t addr)
}
_readByte(FT5206_CHIPID_REG, 1, &val);
//Serial.printf("chip id %d\n",val );
if ((val != FT6206_CHIPID) && (val != FT6236_CHIPID) && (val != FT6236U_CHIPID) && (val != FT5206U_CHIPID)) {
if ((val != FT6206_CHIPID) && (val != FT6236_CHIPID) && (val != FT6236U_CHIPID) && (val != FT5206U_CHIPID) && (val != FT5316_CHIPID) ) {
return false;
}
_init = true;
Expand Down
2 changes: 2 additions & 0 deletions lib/FT5206_Library/src/FT5206.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ github:https://github.com/lewisxhe/FT5206_Library
#define FT6236U_CHIPID 0x64
#define FT5206U_CHIPID 0x64

#define FT5316_CHIPID 0x0a

#define DEVIDE_MODE 0x00
#define TD_STATUS 0x02
#define TOUCH1_XH 0x03
Expand Down
159 changes: 0 additions & 159 deletions lib/FT6236-gemu-1.0/FT6236.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions lib/FT6236-gemu-1.0/FT6236.h

This file was deleted.

1 change: 1 addition & 0 deletions lib/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,4 +519,5 @@ void VButton::xdrawButton(bool inverted) {
wr_redir=0;
}


/* END OF FILE */
16 changes: 15 additions & 1 deletion lib/esp-epaper-29-ws-20171230-gemu-1.1/src/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,23 @@ class Renderer : public Adafruit_GFX {
uint8_t font;
};

typedef union {
uint8_t data;
struct {
uint8_t spare0 : 1;
uint8_t spare1 : 1;
uint8_t spare2 : 1;
uint8_t spare3 : 1;
uint8_t disable : 1;
uint8_t on_off : 1;
uint8_t is_pushbutton : 1;
uint8_t is_virtual : 1;
};
} TButton_State;

class VButton : public Adafruit_GFX_Button {
public:
uint8_t vpower;
TButton_State vpower;
void xdrawButton(bool inverted);
};

Expand Down
Loading

0 comments on commit 1ae9620

Please sign in to comment.