Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

St7735 t4 rewrite #4

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a3b2860
Initial update
mjs513 Aug 28, 2019
0401455
Corrected typo in setcliprect function
mjs513 Aug 28, 2019
eec1536
Fixed clipping
mjs513 Aug 29, 2019
f620f9c
Test of readPixel for T3.6
mjs513 Aug 31, 2019
eccf085
ReadPixel works with FrameBuffer only
mjs513 Sep 1, 2019
0df6589
Updated ScrollTest.ino to use framebuffer
mjs513 Sep 1, 2019
d69a906
Restore using with no CS pin
mjs513 Sep 2, 2019
22fed16
update to tft_string_align sketch
mjs513 Sep 17, 2019
6061b5f
Deleted old version of graphics test.
mjs513 Sep 17, 2019
0613dcf
Compiles and links if Adafruit_GFX is included
KurtE Sep 17, 2019
c3bbeca
Compiles and links if Adafruit_GFX is included
mjs513 Sep 18, 2019
08a1b05
Fix Software SPI crash...
KurtE Sep 18, 2019
5f6e93e
Merge branch 'ST7735_T4_rewrite' into T4_rewrite_GFX_Button
mjs513 Sep 18, 2019
1f957cc
Merge pull request #1 from KurtE/T4_rewrite_GFX_Button
mjs513 Sep 18, 2019
6f760c4
T3.x SPI pins MOSI/SCK not DC...
KurtE Sep 18, 2019
7d617a1
Merge pull request #2 from KurtE/T4_rewrite_use_SPI_if_possible_witho…
mjs513 Sep 18, 2019
212ad1b
T3.6 did not work with DMASettings in object
KurtE Sep 19, 2019
af8a211
Merge pull request #3 from KurtE/T3.6_DMA_update
mjs513 Sep 20, 2019
c357d95
Added UncannyEye Examples
mjs513 Sep 27, 2019
c83651f
Merge branch 'ST7735_T4_rewrite' of https://github.com/mjs513/ST7735_…
mjs513 Sep 27, 2019
812e186
WIP - Support adafruit fonts as well
KurtE Sep 27, 2019
bfcb7b3
Adafruit font, getTextBounds, setTextSize(x,y)
KurtE Sep 30, 2019
f8a823e
fixDrawChar if only one size given
KurtE Oct 1, 2019
5cb48e4
Update ST7735_t3.cpp
KurtE Oct 1, 2019
cb60030
Merge pull request #4 from KurtE/T4_Rewrite_Adafruit_fonts
mjs513 Oct 1, 2019
2278326
GFX Fonts support for Opaque output
KurtE Oct 5, 2019
72249cc
Merge pull request #5 from KurtE/T4_rewrite_GFX_opaque
mjs513 Oct 5, 2019
9dbe577
Update for additional colors and fix adafruit button again
mjs513 Oct 5, 2019
f386103
Fix bug of calling setFrameBuffer
KurtE Oct 6, 2019
8a9440a
Merge pull request #6 from KurtE/T4RW_SFB
mjs513 Oct 6, 2019
4d9171a
Deleted some blank lines
mjs513 Nov 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2,620 changes: 2,480 additions & 140 deletions ST7735_t3.cpp

Large diffs are not rendered by default.

440 changes: 425 additions & 15 deletions ST7735_t3.h

Large diffs are not rendered by default.

45 changes: 38 additions & 7 deletions ST7789_t3.cpp
Expand Up @@ -29,21 +29,38 @@
#define ST77XX_MADCTL_ML 0x10
#define ST77XX_MADCTL_RGB 0x00

ST7789_t3::ST7789_t3(uint8_t CS, uint8_t RS, uint8_t SID, uint8_t SCLK, uint8_t RST) :
ST7735_t3(CS, RS, SID, SCLK, RST)
ST7789_t3::ST7789_t3(uint8_t CS, uint8_t RS, uint8_t SID, uint8_t SCLK, uint8_t RST) : ST7735_t3(CS, RS, SID, SCLK, RST)
{
// Assume the majority of ones.
tabcolor = INIT_ST7789_TABCOLOR;
_screenHeight = 240;
_screenWidth = 240;

cursor_y = cursor_x = 0;
textsize_x = 1;
textsize_y = 1;
textcolor = textbgcolor = 0xFFFF;
wrap = true;
font = NULL;
setClipRect();
setOrigin();
}

ST7789_t3::ST7789_t3(uint8_t CS, uint8_t RS, uint8_t RST) :
ST7735_t3(CS, RS, RST)
{
tabcolor = INIT_ST7789_TABCOLOR;
_screenHeight = 240;
_screenWidth = 240;
_screenWidth = 240;

cursor_y = cursor_x = 0;
textsize_x = 1;
textsize_y = 1;
textcolor = textbgcolor = 0xFFFF;
wrap = true;
font = NULL;
setClipRect();
setOrigin();
}


Expand Down Expand Up @@ -89,6 +106,11 @@ void ST7789_t3::setRotation(uint8_t m)
_rot = m;
endSPITransaction();
// Serial.printf("Set rotation %d start(%d %d) row: %d, col: %d\n", m, _xstart, _ystart, _rowstart, _colstart);
setClipRect();
setOrigin();

cursor_x = 0;
cursor_y = 0;
}

#define ST7789_240x240_XSTART 0
Expand Down Expand Up @@ -138,12 +160,21 @@ void ST7789_t3::init(uint16_t width, uint16_t height, uint8_t mode)
_colstart = 0;
_rowstart = 0;
}
_height = height;
_width = width;

_height = height;
_width = width;
_screenHeight = height;
_screenWidth = width;

commandList(cmd_st7789);
setRotation(0);
commandList(cmd_st7789);
setRotation(0);
cursor_y = cursor_x = 0;
textsize_x = textsize_y = 1;
textcolor = textbgcolor = 0xFFFF;
wrap = true;
font = NULL;
setClipRect();
setOrigin();

}

Binary file added cat.bmp
Binary file not shown.