Commit Graph

85 Commits

Author SHA1 Message Date
Bodmer beda811a3a Add R61581 driver as detailed in #238
Not tested by Bodmer, tested by s60sc as in #238
2018-11-25 19:41:29 +00:00
Bodmer 5e62875ff5 Fix issue #256
Parallel compatibility lost during recent updates.
Now working again.
2018-11-25 03:15:16 +00:00
Bodmer d13f84e4a6 Re-work the support for bi-directional SDA line
Tested on ESP32 and ST7789V display only. It may not work with other
displays!

Use:
#define TFT_SDA_READ

in setup file to use bi-directional SDA pin support.
2018-11-24 01:30:41 +00:00
Bodmer 1cf2305e4d Add capability to read TFT SDA bi-directional pin
Tested on an ESP32 with ST7789V display
SDA read is very slow on an ESP8266 (to be investigated)
Added new setup #define TFT_SDA_READ
Add new ESP32 and ESP8266 compatible in example/Generic folder to test
capture of TFT screen
2018-11-23 03:09:07 +00:00
Bodmer ac7a229301 Remove setAddressWindow change for ESP32
Corner case caused missed graphics.
2018-11-16 00:54:51 +00:00
Bodmer 7a3d6bcab9 Minor performance improvements for ESP32
Remove legacy changes for double buffered SPI
Eliminate unecessary ESP32 SPI read/modify write
Eliminate two stage control bit changes (may impact some diplays with
setup/hold  timing and show ESP32 hardware register bug?)
Add single register write for CS and DC command
Make setAddrWindow smarter (as used in previous AVR library)
Improve compatibility with GFX sketches
Re-arrange comments slightly to improve positioning
2018-11-14 01:05:16 +00:00
Bodmer 3d5ff73690 Fix issue #224 2018-10-24 10:00:33 +01:00
Bodmer d18a5a0c8f Revert "Fix issue #225"
This reverts commit 1e1525010e.
2018-10-24 09:59:26 +01:00
Bodmer 1e1525010e Fix issue #225 2018-10-24 09:58:28 +01:00
Bodmer 1a0b37097a Add new anti-aliased (smooth) font examples + bug fixes
Four new examples have been added to show different methods of rendering
the anta-aliased fonts.  A few minor bugs have been corrected associated
with the font rendering. drawNumber and drawFloat handle fixed width
mono fonts with no digit movement.
2018-10-21 17:53:27 +01:00
Bodmer 1fd8d4cd6d Fix issue #216 2018-10-11 23:46:19 +01:00
Bodmer 73c1831e7b Add option for a different TFT read SPI frequency
#define SPI_READ_FREQUENCY  20000000 // Optional reduced SPI frequency
for reading TFT

Also weeded out some compiler warnings
2018-07-29 15:00:09 +01:00
Bodmer 40e2c8dc74 Update so read TFT works for ILI9488 SPI display
Small performance improvement for ILI9488
2018-07-11 20:30:39 +01:00
Bodmer 5b0d96d64d Completed support for SPI ILI9488
Setup20 added for ESP8266 and Setup21 addwd for ESP32
2018-07-07 22:41:53 +01:00
Bodmer 51ed23af0f Support ST7789 rotation offset and boards with no chip select
Other minor changes to tidy code up
Put back in ability to call init() multiple times in sketch
2018-07-06 18:48:24 +01:00
Bodmer 53119823f9 Add support for ST7789 display (240 x 240) 2018-06-01 18:26:09 +01:00
Bodmer f2686a9024
Try alternative drawLine for HX8357D display as noted in issue #149 2018-05-29 22:06:14 +01:00
Bodmer 4a52f5e685 Add ability to set ST7735 tab color from sketch
Use line is form:
tft.init(1);
or:
tft.init(INITR_REDTAB);
// Enumerated the configurations in library are:
#define INITR_GREENTAB
0x0
#define INITR_REDTAB    0x1
#define INITR_BLACKTAB  0x2
#define
INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of
green tab display
#define INITR_GREENTAB3 0x4 // Use if you get random
pixels on edge(s) of 128x128 screen
#define INITR_GREENTAB128 0x5 // Use
if you only get part of 128x128 screen in rotation 0 & 1
#define INITB
0xB
2018-05-25 22:48:22 +01:00
Bodmer 54b3f0f63d Add drawXBitmap() function and example
Example is in Generic folder, draw the Espressif logo on the screen.
2018-04-23 17:16:18 +01:00
Bodmer 4d181d7a19 Fix bug #122 by different approach 2018-04-21 09:50:41 +01:00
Bodmer f56184e9cd Add diagnostic sketches
Do not load button class is touch screen chip select not defined
2018-04-11 01:03:26 +01:00
Bodmer ada678d76e Added Waveshare ePaper support
Also added ability to push 1bpp bitmaps to a Sprite to support rendering
images on an EPaper screen.

Floyd-Steinberg dithering and basic graphics example added as first
ePaper demo.
2018-04-02 02:53:42 +01:00
Bodmer 9276b0162d Add support for 1 bit per pixel in Sprite class
This is stage one of support for ePaper displays from Waveshare.
Examples for 1 bit per pixel Sprites and 2 or 3 colour ePaper displays
to follow soon.
2018-03-26 01:02:23 +01:00
Bodmer 972d852346 Correct issue #104 and update setup files
Macro name (transfer16) conflict with SPI library fixed
Smooth font option added to User Setup files
Narrow font 8 option added to User Setup files
2018-03-12 22:49:18 +00:00
Bodmer a00011c2df Add 8 bit parallel TFT support for ESP32
Add interface driver macro
Add 8 bit parallel support
Add 8 bit parallel read support
Add ILI9481, ILI9488 and HX8357D drivers
Update version and ReadMe
Update Create_Font processing sketch
Add slightly narrower alternative font 8
2018-03-10 23:08:57 +00:00
Bodmer 8752236ac2 Add smooth (antialiased) fonts 2018-02-24 19:02:20 +00:00
Bodmer 02a902f617
Potential fix for issue #96 2018-02-24 18:35:03 +00:00
Bodmer 8df115ab4d Raise version 2018-02-22 22:33:49 +00:00
Bodmer f3190fde71 Allow init() to be called in sketch to reset and re-initialise TFT
Solution to Issue #85
2018-01-27 19:22:42 +00:00
Bodmer 139fe8dc4c Stop y wrapping
I need this in my project but will add a switch.
2018-01-27 14:20:22 +00:00
Bodmer 1f84ab0885 Reinstate 8bit pushColors()
Permits backwards compatibility
2018-01-27 13:46:59 +00:00
Bodmer b2e4e69f7a Fix Issue #81 2018-01-27 02:35:25 +00:00
Bodmer 6c993f8fd2 Add getCursorX() and getCursorY() functions
As requested in Issue #79

Function names are compatible with Adafruit_GFX

Also trimmed out duplicate keywords
2018-01-26 15:19:40 +00:00
Bodmer aa2c79a25f Performance enhancements, new functions, bug fixes
1. Ability to swap bytes in pushColors() and pushImage()
2. pushImage() will handle FLASH stroed images
3. pushImage() will accept a transparent color
4. pushRect() deprecated but still works
5. setSwapBytes() to set swapping bytes in color for pushImage() and
pushColors() true or false
6. getSwapBytes() returns swap bytes parameter
7. fillCircle() and fillCircleHelper() changed to use horizontal lines
to speed up plotting in a sprite
8. fillTriangle bug fix by moving spi_begin()
9  Small performance improvement to setAddrWindow()
10. pushColor() bug fix for swapped bytes
11. pushColors() performance improvement for ESP8266 and add optional
byte swap parameter, accepts higher pixel count
12. move spi_begin() later in drawLine() incase fn returns early
13. add spi_end() in drawLine incdae return occurs early
14. Add color332() fn to convert 16 bit to 8 bit colour
15. Sprite: createSprite() checks if sprite already created and returns
pointer if it does
16. Sprite: one extra "off-screen pixel added to a sprite to point
out-of-bounds setWindow coords to
this avoids extra bounds checks in push/write color
17. Sprite: setColorDepth allows changing of depthe for existing sprtie
and returns a new pointer to the new sprite
18. Sprite: pushImage() accepts a swapped byte parameter
19. Sprite: setSwapBytes() to set swapping bytes in color for
pushImage() and pushColors() true or false
20. Sprite: getSwapBytes() returns swap bytes parameter
21. Sprite: setWindow deals with duff out of sprite coords.
22. Sprite: bug in draw char corrected which could draw too many
over-writing pixels
2018-01-08 23:19:42 +00:00
Bodmer 5e98ce5294 Avoid divide by zero crash if touch screen not fitted or not wired up 2017-12-27 14:57:01 +00:00
Bodmer b536af5062 Fix bug
If touch not used dummy getTouch missing the new threshold parameter.
2017-12-22 00:50:24 +00:00
Bodmer 2e84218ecb Add touch pressure hysterisis and user defined sensitivity
getTouch accepts a third optional pressure threshold, default is 600,
increasing means harder presses are needed.
getTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600);
2017-12-21 23:16:11 +00:00
Bodmer 93ba6e3716 Add scrolling inside a sprite
Added example "Sprite_scroll"
Tidy up virtual function list
Add PROGMEM bitmap image functions
2017-12-10 23:04:31 +00:00
Bodmer 7f909a1527 Fix bug in 16 bit transparent Sprite 2017-12-03 02:55:43 +00:00
Bodmer d2104f6d85 Add ability to plot Sprites with a "transparent" colour
Can now specify a colour that will not be plotted so some part of the
Sprite are "transparent" and the TFT backforund shows through. New
example added for demonstration.
2017-12-03 02:29:39 +00:00
Bodmer 9d2c7f21fc
Correct Sprite odd pixel count width crash
The 32 bit alignment offset must be checked for every line to prevent crash with odd pixel count lines.
2017-12-01 15:37:08 +00:00
Bodmer 8b24e61b99
Fix issue #60
Do not adjust x datum for characters that have a positive offset.
2017-11-30 22:41:23 +00:00
Bodmer 706af163c0 Add some crash prevention
Prevent memory access to non-existant Sprite memory areas which would
cause a processor reset.
2017-11-30 00:27:56 +00:00
Bodmer 6fc63061d7 Filter bad character codes
Do not substitute bad characters for first valid one.
2017-11-29 02:00:47 +00:00
Bodmer e18383a29c Bounds check character codes (issue #58)
Correct isuue #58
2017-11-29 00:38:05 +00:00
turiphro b97324875d Fix width/height override issue when using setRotation
This commit fixes an issue when setting screen width
and height from the constructor (e.g., user sketch),
followed by setRotation(i). Previously, setRotation
used TFT_WIDTH and TFT_HEIGHT, ignoring user overrides.
2017-11-26 18:06:11 -08:00
Bodmer 58fa8326a2
Correct uninitialised warning on ESP32
int16_t  xo16 = 0, yo16 = 0;
2017-11-26 12:38:20 +00:00
Bodmer 218dd1b06e Bug fix
Should have tested that last minute edit!
2017-11-24 15:03:24 +00:00
Bodmer 312b7c1128 Tidy up 8 bit sprite code and fix gugs
Minor tweaks and speed improvements
2017-11-24 14:12:29 +00:00
Bodmer 3b5e673603 Version update, minor tweaks and typos 2017-11-22 00:53:09 +00:00