for TFT2P0327 aitendo.com 128*160 TFT LCD. LCD driver is S6D0151 Sumsung.
Dependents: FRDM_tocos_x2_FIXED
Diff: S6D0151_TFT.cpp
- Revision:
- 2:1e3ac0621559
- Parent:
- 1:a3651128e297
- Child:
- 3:f6feda54df80
diff -r a3651128e297 -r 1e3ac0621559 S6D0151_TFT.cpp --- a/S6D0151_TFT.cpp Wed Aug 26 14:58:55 2015 +0000 +++ b/S6D0151_TFT.cpp Sun Aug 30 07:21:48 2015 +0000 @@ -68,9 +68,20 @@ regwr( 0x0021 , addr ); } +void S6D0151_TFT::reverse(int rev){ + if(rev == TFT_REVERSE_ON){ + regwr(0x0007,0x0033); //DISPLAY CONTROL (R07h) + } else { + regwr(0x0007,0x0037); //DISPLAY CONTROL (R07h) + } + // X X X PT1 PT0 X X SPT X X GON DTE CL REV D1 D0 + //GON=1,DTE=1 VGH/VGL Normal operation + //Rev bit mean Color reverse. + //REV=1 Displays all character and graphics display sections with Reverse + //D[1:0]=11 Display is RAM data +} /** -* */ void S6D0151_TFT::regwr(unsigned short reg,unsigned short dat){ int data;