Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SeeedStudioTFTv2 by
Diff: SeeedStudioTFTv2.cpp
- Revision:
- 5:366bdc7a8315
- Parent:
- 4:4542d1ff81e4
- Child:
- 6:2612205220c5
--- a/SeeedStudioTFTv2.cpp Sat Oct 19 20:51:48 2013 +0000
+++ b/SeeedStudioTFTv2.cpp Sat Oct 19 21:07:54 2013 +0000
@@ -20,10 +20,11 @@
PinName mosi, PinName miso, PinName sclk,
PinName csTft, PinName rstTft, PinName dcTft, PinName blTft,
PinName csSd):
- SPI_TFT_ILI9341(mosi,miso,sclk,csTft,rstTft,dcTft, "tft")
+ SPI_TFT_ILI9341(mosi,miso,sclk,csTft,rstTft,dcTft, "tft"),
#ifdef USE_SDCARD
- ,SDFileSystem(mosi,miso,sclk,csSd, "sdc")
+ SDFileSystem(mosi,miso,sclk,csSd, "sdc"),
#endif
+ bl(blTft)
{
#ifndef USE_SDCARD
// sd card
@@ -31,7 +32,6 @@
cs = 1;
#endif
// backlight
- DigitalOut bl(blTft);
bl = 1;
// touch screen pins
_xp = xp;
@@ -46,6 +46,11 @@
pp_ty = 356; // 261 -355 -239 356
}
+void SeeedStudioTFTv2::setBacklight(bool enabled)
+{
+ bl = enabled;
+}
+
int SeeedStudioTFTv2::readTouch(PinName p, PinName m, PinName a, PinName i)
{
DigitalOut _p(p);
