summaryrefslogtreecommitdiff
path: root/libraries/MultiLCD/ILI9341.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/MultiLCD/ILI9341.cpp')
-rw-r--r--libraries/MultiLCD/ILI9341.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/libraries/MultiLCD/ILI9341.cpp b/libraries/MultiLCD/ILI9341.cpp
index 32b2356..9cb5c27 100644
--- a/libraries/MultiLCD/ILI9341.cpp
+++ b/libraries/MultiLCD/ILI9341.cpp
@@ -1,3 +1,10 @@
+/*************************************************************************
+* Arduino Text & Bitmap Display Library for color LCDs
+* Distributed under GPL v2.0
+* Developed by Stanley Huang <stanleyhuangyc@gmail.com>
+* For more information, please visit http://arduinodev.com
+*************************************************************************/
+
#include <Arduino.h>
#include <SPI.h>
#include "MultiLCD.h"
@@ -240,7 +247,7 @@ void LCD_ILI9341::begin (void)
sendCMD(0x2c);
clear();
- backlight(true);
+ setBackLight(255);
setColor(0xffff);
setBackColor(0);
}
@@ -342,9 +349,9 @@ void LCD_ILI9341::setPixel(uint16_t poX, uint16_t poY,uint16_t color)
sendData(color);
}
-void LCD_ILI9341::backlight(bool on)
+void LCD_ILI9341::setBackLight(byte brightness)
{
- digitalWrite(PIN_LED, on);
+ digitalWrite(PIN_LED, brightness ? HIGH : LOW);
}
void LCD_ILI9341::clearPixels(uint16_t pixels)