Gitakichi Tokyo / Mbed 2 deprecated ATM0177B3A

Dependencies:   mbed

Revision:
2:4d5b94a92f19
Parent:
0:c0be4e018a09
Child:
3:9caa79f40909
diff -r cd2949e87b17 -r 4d5b94a92f19 ili9163lcd.h
--- a/ili9163lcd.h	Fri Jan 01 11:08:23 2021 +0000
+++ b/ili9163lcd.h	Fri Jan 01 13:57:57 2021 +0000
@@ -1,6 +1,6 @@
 /**
  * @file ili9163lcd.h
- * @brief ILI9163 128x128 LCD Driver (Header file)
+ * @brief ILI9163 128x160 LCD Driver (Header file)
  *
  * This code has been ported from the ili9163lcd library for mbed
  * made by Jun Morita.
@@ -22,6 +22,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
+ * @author Gitakichi
  * @author Jun Morita (iccraft)
  * @author Simon Inns <simon.inns@gmail.com>
  * @author Christopher Vagnetoft (NoccyLabs)
@@ -32,7 +33,6 @@
 #ifndef ILI9163LCD_H_
 #define ILI9163LCD_H_
 
-// Definitions for control lines (port C)
 #define LCD_WR      (1 << 2)
 #define LCD_RS      (1 << 4)
 #define LCD_RD      (1 << 5)
@@ -44,10 +44,10 @@
 // 1 = Ribbon at left
 // 2 = Ribbon at right
 // 3 = Ribbon at bottom
-#define LCD_ORIENTATION0    0
-#define LCD_ORIENTATION1    96
-#define LCD_ORIENTATION2    160
-#define LCD_ORIENTATION3    192
+#define ROT_TOP     0b00000000‬
+#define ROT_LEFT    0b01100000
+#define ROT_RIGHT   0b10100000
+#define ROT_BOTTOM  0b11000000
 
 // ILI9163 LCD Controller Commands
 #define NOP                     0x00
@@ -111,6 +111,9 @@
 #define POSITIVE_GAMMA_CORRECT  0xE0
 #define NEGATIVE_GAMMA_CORRECT  0xE1
 #define GAM_R_SEL               0xF2
+//128x160
+#define COL_MAX                 0x7f
+#define PAGE_MAX                0x9f
 
 // Macros and in-lines: