mirror of https://github.com/arendst/Tasmota.git
commit
6de807e094
|
@ -31,6 +31,10 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef ESP32
|
||||
#define USE_UFILESYS
|
||||
#endif
|
||||
|
||||
#include "Adafruit_GFX.h"
|
||||
#include "glcdfont.c"
|
||||
#ifdef __AVR__
|
||||
|
|
|
@ -104,7 +104,7 @@ uint8_t *Renderer::allocate_framebuffer(uint32_t size) {
|
|||
|
||||
void Renderer::setTextSize(uint8_t sf) {
|
||||
if (sf < 1) sf = 1;
|
||||
if (sf > 4) sf = 4;
|
||||
if (sf > 16) sf = 16;
|
||||
tsize = sf;
|
||||
Adafruit_GFX::setTextSize(sf);
|
||||
}
|
||||
|
|
|
@ -483,6 +483,11 @@ Renderer *uDisplay::Init(void) {
|
|||
}
|
||||
#endif // ESP32
|
||||
|
||||
|
||||
spiSettings = SPISettings((uint32_t)spi_speed*1000000, MSBFIRST, SPI_MODE3);
|
||||
SPI_BEGIN_TRANSACTION
|
||||
|
||||
|
||||
if (reset >= 0) {
|
||||
pinMode(reset, OUTPUT);
|
||||
digitalWrite(reset, HIGH);
|
||||
|
@ -493,11 +498,7 @@ Renderer *uDisplay::Init(void) {
|
|||
delay(200);
|
||||
}
|
||||
|
||||
spiSettings = SPISettings((uint32_t)spi_speed*1000000, MSBFIRST, SPI_MODE3);
|
||||
|
||||
uint16_t index = 0;
|
||||
|
||||
SPI_BEGIN_TRANSACTION
|
||||
while (1) {
|
||||
uint8_t iob;
|
||||
SPI_CS_LOW
|
||||
|
@ -1213,7 +1214,8 @@ void uDisplay::pushColors(uint16_t *data, uint16_t len, boolean not_swapped) {
|
|||
// special version 8 bit spi I or II
|
||||
#ifdef ESP8266
|
||||
while (len--) {
|
||||
uspi->write(*data++);
|
||||
//uspi->write(*data++);
|
||||
WriteColor(*data++);
|
||||
}
|
||||
#else
|
||||
uspi->writePixels(data, len * 2);
|
||||
|
|
Loading…
Reference in New Issue