This is a port of Henning Kralsen's UTFT library for Arduino/chipKIT to mbed, refactored to make full use of C inheritance and access control, in order to reduce work when implementing new drivers and at the same time make the code more readable and easier to maintain. As of now supported are SSD1289 (16-bit interface), HX8340-B (serial interface) and ST7735 (serial interface). Drivers for other controllers will be added as time and resources to acquire the displays to test the code permit.
Fork of TFTLCD by
Diff: st7735.cpp
- Revision:
- 28:89a1399409ff
- Parent:
- 22:4c169297f374
diff -r 26491d710e72 -r 89a1399409ff st7735.cpp --- a/st7735.cpp Mon Jul 22 01:48:06 2013 +0000 +++ b/st7735.cpp Tue Feb 16 19:09:15 2016 +0000 @@ -22,8 +22,8 @@ #include "st7735.h" #include "helpers.h" -ST7735_LCD::ST7735_LCD( PinName CS, PinName RESET, PinName RS, PinName SCL, PinName SDA, PinName BL, backlight_t blType, float defaultBackLightLevel ) - : LCD( 128, 160, CS, RS, RESET, BL, blType, defaultBackLightLevel ), _lcd_pin_scl( SCL ), _lcd_pin_sda( SDA ) +ST7735_LCD::ST7735_LCD( PinName CS, PinName RESET, PinName RS, PinName SCL, PinName SDA, PinName BL, backlight_t blType, float defaultBackLightLevel, int width, int height) + : LCD( width, height, CS, RS, RESET, BL, blType, defaultBackLightLevel ), _lcd_pin_scl( SCL ), _lcd_pin_sda( SDA ) { }