Xuyi Wang / SSD1963
Committer:
sPymbed
Date:
Sun Oct 04 13:19:05 2020 +0000
Revision:
1:74bac5f988d8
Parent:
0:94df05e3330d
Child:
2:d8a9ebd28f0a
working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sPymbed 0:94df05e3330d 1 /*****************************************************************************
sPymbed 0:94df05e3330d 2 * Project : 7" TFT LCD 800x480 [AT070TN92]
sPymbed 0:94df05e3330d 3 * Compiler : mbed Online
sPymbed 0:94df05e3330d 4 * Type : Libraries
sPymbed 0:94df05e3330d 5 * Comment : Support mbed ST Nucleo Board.
sPymbed 0:94df05e3330d 6 * : Support Chip = SSD1963
sPymbed 0:94df05e3330d 7 * File : SSD1963.h
sPymbed 0:94df05e3330d 8 *
sPymbed 0:94df05e3330d 9 * Author : Mr.Thongchai Artsamart [Bird Techstep]
sPymbed 0:94df05e3330d 10 * E-Mail : t.artsamart@gmail.com
sPymbed 0:94df05e3330d 11 * : tbird_th@hotmail.com
sPymbed 0:94df05e3330d 12 * Start Date : 20/03/2014 [dd/mm/yyyy]
sPymbed 0:94df05e3330d 13 * Version Date : 20/03/2014 [dd/mm/yyyy]
sPymbed 0:94df05e3330d 14 * Licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
sPymbed 0:94df05e3330d 15 *****************************************************************************
sPymbed 0:94df05e3330d 16 * Remark : Thank you -. no1wudi [CooCox]
sPymbed 0:94df05e3330d 17 * -.
sPymbed 0:94df05e3330d 18 *****************************************************************************/
sPymbed 0:94df05e3330d 19 #ifndef __SSD1963_H_
sPymbed 0:94df05e3330d 20 #define __SSD1963_H_
sPymbed 0:94df05e3330d 21 //#include "mbed.h"
sPymbed 0:94df05e3330d 22
sPymbed 0:94df05e3330d 23 /*********************************************************************
sPymbed 0:94df05e3330d 24 * Overview: Image orientation (can be 0, 90, 180, 270 degrees).
sPymbed 0:94df05e3330d 25 *********************************************************************/
sPymbed 0:94df05e3330d 26 #define DISP_ORIENTATION 0
sPymbed 0:94df05e3330d 27 /*********************************************************************
sPymbed 0:94df05e3330d 28 * Overview: Panel Data Width (R,G,B) in (6,6,6)
sPymbed 0:94df05e3330d 29 *********************************************************************/
sPymbed 0:94df05e3330d 30 #define DISP_DATA_WIDTH 18
sPymbed 0:94df05e3330d 31 /*********************************************************************
sPymbed 0:94df05e3330d 32 * Overview: Horizontal and vertical display resolution
sPymbed 0:94df05e3330d 33 * (from the glass datasheet).
sPymbed 0:94df05e3330d 34 *********************************************************************/
sPymbed 0:94df05e3330d 35 #define DISP_HOR_RESOLUTION 800
sPymbed 0:94df05e3330d 36 #define DISP_VER_RESOLUTION 480
sPymbed 0:94df05e3330d 37 /*********************************************************************
sPymbed 0:94df05e3330d 38 * Overview: Horizontal synchronization timing in pixels
sPymbed 0:94df05e3330d 39 * (from the glass datasheet).
sPymbed 0:94df05e3330d 40 *********************************************************************/
sPymbed 0:94df05e3330d 41 #define DISP_HOR_PULSE_WIDTH 1
sPymbed 0:94df05e3330d 42 #define DISP_HOR_BACK_PORCH 210
sPymbed 0:94df05e3330d 43 #define DISP_HOR_FRONT_PORCH 45
sPymbed 0:94df05e3330d 44 /*********************************************************************
sPymbed 0:94df05e3330d 45 * Overview: Vertical synchronization timing in lines
sPymbed 0:94df05e3330d 46 * (from the glass datasheet).
sPymbed 0:94df05e3330d 47 *********************************************************************/
sPymbed 0:94df05e3330d 48 #define DISP_VER_PULSE_WIDTH 1
sPymbed 0:94df05e3330d 49 #define DISP_VER_BACK_PORCH 34
sPymbed 0:94df05e3330d 50 #define DISP_VER_FRONT_PORCH 10
sPymbed 0:94df05e3330d 51
sPymbed 0:94df05e3330d 52 /*********************************************************************
sPymbed 0:94df05e3330d 53 * Overview: Some basic colors definitions.
sPymbed 0:94df05e3330d 54 *********************************************************************/
sPymbed 0:94df05e3330d 55 #define BLACK RGB565CONVERT(0, 0, 0)
sPymbed 0:94df05e3330d 56 #define BRIGHTBLUE RGB565CONVERT(0, 0, 255)
sPymbed 0:94df05e3330d 57 #define BRIGHTGREEN RGB565CONVERT(0, 255, 0)
sPymbed 0:94df05e3330d 58 #define BRIGHTCYAN RGB565CONVERT(0, 255, 255)
sPymbed 0:94df05e3330d 59 #define BRIGHTRED RGB565CONVERT(255, 0, 0)
sPymbed 0:94df05e3330d 60 #define BRIGHTMAGENTA RGB565CONVERT(255, 0, 255)
sPymbed 0:94df05e3330d 61 #define BRIGHTYELLOW RGB565CONVERT(255, 255, 0)
sPymbed 0:94df05e3330d 62 #define BLUE RGB565CONVERT(0, 0, 128)
sPymbed 0:94df05e3330d 63 #define GREEN RGB565CONVERT(0, 128, 0)
sPymbed 0:94df05e3330d 64 #define CYAN RGB565CONVERT(0, 128, 128)
sPymbed 0:94df05e3330d 65 #define RED RGB565CONVERT(128, 0, 0)
sPymbed 0:94df05e3330d 66 #define MAGENTA RGB565CONVERT(128, 0, 128)
sPymbed 0:94df05e3330d 67 #define BROWN RGB565CONVERT(255, 128, 0)
sPymbed 0:94df05e3330d 68 #define LIGHTGRAY RGB565CONVERT(128, 128, 128)
sPymbed 0:94df05e3330d 69 #define DARKGRAY RGB565CONVERT(64, 64, 64)
sPymbed 0:94df05e3330d 70 #define LIGHTBLUE RGB565CONVERT(128, 128, 255)
sPymbed 0:94df05e3330d 71 #define LIGHTGREEN RGB565CONVERT(128, 255, 128)
sPymbed 0:94df05e3330d 72 #define LIGHTCYAN RGB565CONVERT(128, 255, 255)
sPymbed 0:94df05e3330d 73 #define LIGHTRED RGB565CONVERT(255, 128, 128)
sPymbed 0:94df05e3330d 74 #define LIGHTMAGENTA RGB565CONVERT(255, 128, 255)
sPymbed 0:94df05e3330d 75 #define YELLOW RGB565CONVERT(255, 255, 128)
sPymbed 0:94df05e3330d 76 #define WHITE RGB565CONVERT(255, 255, 255)
sPymbed 0:94df05e3330d 77
sPymbed 0:94df05e3330d 78 #define GRAY0 RGB565CONVERT(224, 224, 224)
sPymbed 0:94df05e3330d 79 #define GRAY1 RGB565CONVERT(192, 192, 192)
sPymbed 0:94df05e3330d 80 #define GRAY2 RGB565CONVERT(160, 160, 160)
sPymbed 0:94df05e3330d 81 #define GRAY3 RGB565CONVERT(128, 128, 128)
sPymbed 0:94df05e3330d 82 #define GRAY4 RGB565CONVERT(96, 96, 96)
sPymbed 0:94df05e3330d 83 #define GRAY5 RGB565CONVERT(64, 64, 64)
sPymbed 0:94df05e3330d 84 #define GRAY6 RGB565CONVERT(32, 32, 32)
sPymbed 0:94df05e3330d 85
sPymbed 0:94df05e3330d 86 /*
sPymbed 0:94df05e3330d 87 // Section : SSD1963 Command --------------------------------------------------
sPymbed 0:94df05e3330d 88 // - HX83XX Register Names ----------------------------------------------------
sPymbed 0:94df05e3330d 89 #define COL_ADD_START_HI 0x02 // W/R - SC[15:8] (8'b0000_0000)
sPymbed 0:94df05e3330d 90 #define COL_ADD_START_LO 0x03 // W/R - SC[7:0] (8'b0000_0000)
sPymbed 0:94df05e3330d 91
sPymbed 0:94df05e3330d 92 #define COL_ADD_END_HI 0x04 // W/R - EC[15:8] (8'b0000_0000)
sPymbed 0:94df05e3330d 93 #define COL_ADD_END_LO 0x05 // W/R - EC[7:0] (8'b1110_1111)
sPymbed 0:94df05e3330d 94
sPymbed 0:94df05e3330d 95 #define ROW_ADD_START_HI 0x06 // W/R - SP[15:8] (8'b0000_0000)
sPymbed 0:94df05e3330d 96 #define ROW_ADD_START_LO 0x07 // W/R - SP[7:0] (8'b0000_00000)
sPymbed 0:94df05e3330d 97
sPymbed 0:94df05e3330d 98 #define ROW_ADD_END_HI 0x08 // W/R - EP[15:8] (8'b0000_0001)
sPymbed 0:94df05e3330d 99 #define ROW_ADD_END_LO 0x09 // W/R - EP[7:0] (8'b0011_1111)
sPymbed 0:94df05e3330d 100
sPymbed 0:94df05e3330d 101 //#define MEM_ACCESS 0x16 // W/R - MY(0) MX(0) MV(0) ML(0) BGR(0) - - -
sPymbed 0:94df05e3330d 102 #define MEM_ACCESS 0x36
sPymbed 0:94df05e3330d 103 //#define SRAM_WRITE 0x22 // W/R SRAM Write
sPymbed 0:94df05e3330d 104 #define SRAM_WRITE 0x2C
sPymbed 0:94df05e3330d 105 */
sPymbed 0:94df05e3330d 106 /*
sPymbed 0:94df05e3330d 107 #define Com_NOP 0x00 // brief No opeation
sPymbed 0:94df05e3330d 108 #define Com_Reset 0x01 // brief Software reset
sPymbed 0:94df05e3330d 109 #define Com_GetPowerMode 0x0A // brief Get power mode
sPymbed 0:94df05e3330d 110 #define Com_GetAddressMode 0x0B // brief Get the frame memory t the display panel read order
sPymbed 0:94df05e3330d 111 #define Com_GetPixelFormat 0x0C // brief Get the current pixel format
sPymbed 0:94df05e3330d 112 #define Com_GetDisplayModule 0x0D // brief Get the current display format
sPymbed 0:94df05e3330d 113 #define Com_GetSignalMode 0x0E // brief Get the display mode from peripharel
sPymbed 0:94df05e3330d 114 #define Com_EnterSleepMode 0x10 // brief Enter the sleep mode
sPymbed 0:94df05e3330d 115 #define Com_ExitSleepMode 0x11 // brief Turn on the panel
sPymbed 0:94df05e3330d 116 #define Com_EnterPartialMode 0x12 // brief Enter partial mode
sPymbed 0:94df05e3330d 117 #define Com_EnterNormalMode 0x13 // brief Enter normal mode
sPymbed 0:94df05e3330d 118 #define Com_ExitInvertMode 0x20 // brief Exit the invert mode
sPymbed 0:94df05e3330d 119 #define Com_EnterInvertMode 0x21
sPymbed 0:94df05e3330d 120
sPymbed 0:94df05e3330d 121 #define Com_SetGammaCurve 0x26
sPymbed 0:94df05e3330d 122
sPymbed 0:94df05e3330d 123 #define Com_SetDisplayOff 0x28
sPymbed 0:94df05e3330d 124 #define Com_SetDisplayOn 0x29
sPymbed 0:94df05e3330d 125
sPymbed 0:94df05e3330d 126 #define Com_SetColumnAddress 0x2A
sPymbed 0:94df05e3330d 127
sPymbed 0:94df05e3330d 128 #define Com_SetPageAddress 0x2B
sPymbed 0:94df05e3330d 129
sPymbed 0:94df05e3330d 130 #define Com_WriteMemory 0x2C
sPymbed 0:94df05e3330d 131
sPymbed 0:94df05e3330d 132 #define Com_ReadMomery 0x2E
sPymbed 0:94df05e3330d 133
sPymbed 0:94df05e3330d 134 #define Com_SetPartialArea 0x30
sPymbed 0:94df05e3330d 135
sPymbed 0:94df05e3330d 136 #define Com_SetScrollArea 0x33
sPymbed 0:94df05e3330d 137
sPymbed 0:94df05e3330d 138 #define Com_SetTearOff 0x34
sPymbed 0:94df05e3330d 139 #define Com_SetTearOn 0x35
sPymbed 0:94df05e3330d 140
sPymbed 0:94df05e3330d 141 #define Com_SetAddressMode 0x36
sPymbed 0:94df05e3330d 142
sPymbed 0:94df05e3330d 143 #define Com_SetScrollStart 0x37
sPymbed 0:94df05e3330d 144
sPymbed 0:94df05e3330d 145 #define Com_ExtiIdleMode 0x38
sPymbed 0:94df05e3330d 146 #define Com_EnterIdleMode 0x39
sPymbed 0:94df05e3330d 147
sPymbed 0:94df05e3330d 148 #define Com_SetPixelFormat 0x3A
sPymbed 0:94df05e3330d 149
sPymbed 0:94df05e3330d 150 #define Com_WriteMemoryContinue 0x3C
sPymbed 0:94df05e3330d 151
sPymbed 0:94df05e3330d 152 #define Com_ReadMemoryContinue 0x3E
sPymbed 0:94df05e3330d 153
sPymbed 0:94df05e3330d 154 #define Com_SetTearScanLine 0x44
sPymbed 0:94df05e3330d 155 #define Com_GetTearScanLine 0x45
sPymbed 0:94df05e3330d 156
sPymbed 0:94df05e3330d 157 #define Com_GetDDB 0xA1
sPymbed 0:94df05e3330d 158
sPymbed 0:94df05e3330d 159 #define Com_SetLCDMode 0xB0
sPymbed 0:94df05e3330d 160 #define Com_GetLCDMode 0xB1
sPymbed 0:94df05e3330d 161
sPymbed 0:94df05e3330d 162 #define Com_SetHoriPeriod 0xB4
sPymbed 0:94df05e3330d 163 #define Com_GetHoriPeriod 0xB5
sPymbed 0:94df05e3330d 164
sPymbed 0:94df05e3330d 165 #define Com_SetVertPeriod 0xB6
sPymbed 0:94df05e3330d 166 #define Com_GetVertPeriod 0xB7
sPymbed 0:94df05e3330d 167
sPymbed 0:94df05e3330d 168 #define Com_SetGPIOConf 0xB8
sPymbed 0:94df05e3330d 169 #define Com_GetGPIOConf 0xB9
sPymbed 0:94df05e3330d 170
sPymbed 0:94df05e3330d 171 #define Com_SetGPIOValue 0xBA
sPymbed 0:94df05e3330d 172
sPymbed 0:94df05e3330d 173 #define Com_GetGPIOStatus 0xBB
sPymbed 0:94df05e3330d 174
sPymbed 0:94df05e3330d 175 #define Com_SetPostProcessor 0xBC
sPymbed 0:94df05e3330d 176 #define Com_GetPostProcessor 0xBD
sPymbed 0:94df05e3330d 177
sPymbed 0:94df05e3330d 178 #define Com_SetPWMConf 0xBE
sPymbed 0:94df05e3330d 179 #define Com_GetPWMConf 0xBF
sPymbed 0:94df05e3330d 180
sPymbed 0:94df05e3330d 181 #define Com_SetLCDGenerator0 0xC0
sPymbed 0:94df05e3330d 182 #define Com_GetLCDGenerator0 0xC1
sPymbed 0:94df05e3330d 183
sPymbed 0:94df05e3330d 184 #define Com_SetLCDGenerator1 0xC2
sPymbed 0:94df05e3330d 185 #define Com_GetLCDGenerator1 0xC3
sPymbed 0:94df05e3330d 186
sPymbed 0:94df05e3330d 187 #define Com_SetLCDGenerator2 0xC4
sPymbed 0:94df05e3330d 188 #define Com_GetLCDGenerator2 0xC5
sPymbed 0:94df05e3330d 189
sPymbed 0:94df05e3330d 190 #define Com_SetLCDGenerator3 0xC6
sPymbed 0:94df05e3330d 191 #define Com_GetLCDGenerator3 0xC7
sPymbed 0:94df05e3330d 192
sPymbed 0:94df05e3330d 193 #define Com_SetDynamicBackLightConf 0xD0
sPymbed 0:94df05e3330d 194 #define Com_GetDynamicBackLightConf 0xD1
sPymbed 0:94df05e3330d 195
sPymbed 0:94df05e3330d 196 #define Com_SetDynamicBackLightThreshold 0xD4
sPymbed 0:94df05e3330d 197 #define Com_GetDynamicBackLightThreshold 0xD5
sPymbed 0:94df05e3330d 198
sPymbed 0:94df05e3330d 199 #define Com_SetPLLStart 0xE0
sPymbed 0:94df05e3330d 200
sPymbed 0:94df05e3330d 201 #define Com_SetPLLConfig 0xE2
sPymbed 0:94df05e3330d 202 #define Com_GetPLLConfig 0xE3
sPymbed 0:94df05e3330d 203
sPymbed 0:94df05e3330d 204 #define Com_GetPLLStatus 0xE4
sPymbed 0:94df05e3330d 205
sPymbed 0:94df05e3330d 206 #define Com_SetDeepSleepMode 0xE5
sPymbed 0:94df05e3330d 207
sPymbed 0:94df05e3330d 208 #define Com_GetPixelClock 0xE7
sPymbed 0:94df05e3330d 209 #define Com_SetPixelClock 0xE6
sPymbed 0:94df05e3330d 210
sPymbed 0:94df05e3330d 211 #define Com_SetPixelInterface 0xF0
sPymbed 0:94df05e3330d 212 #define Com_GetPixelInterface 0xF1
sPymbed 0:94df05e3330d 213 */
sPymbed 0:94df05e3330d 214 // End : SSD1963 Command ------------------------------------------------------
sPymbed 0:94df05e3330d 215
sPymbed 0:94df05e3330d 216 #define swap(a, b) { int16_t t = a; a = b; b = t; }
sPymbed 1:74bac5f988d8 217 #define LOW 0
sPymbed 1:74bac5f988d8 218 #define HIGH 1
sPymbed 0:94df05e3330d 219
sPymbed 0:94df05e3330d 220 class SSD1963 {
sPymbed 0:94df05e3330d 221 public:
sPymbed 1:74bac5f988d8 222 SSD1963(PinName CS, PinName RESET, PinName RS, PinName WR, BusInOut* DATA_PORT, PinName RD);
sPymbed 0:94df05e3330d 223 void begin(void);
sPymbed 0:94df05e3330d 224 void reset(void);
sPymbed 0:94df05e3330d 225
sPymbed 0:94df05e3330d 226 //void drawPixel(uint16_t x, uint16_t y, uint16_t color);
sPymbed 0:94df05e3330d 227 void fillScreen(uint16_t color);
sPymbed 0:94df05e3330d 228 //void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
sPymbed 0:94df05e3330d 229 //void drawVerticalLine(uint16_t x, uint16_t y, uint16_t length, uint16_t color);
sPymbed 0:94df05e3330d 230 //void drawHorizontalLine(uint16_t x, uint16_t y, uint16_t length, uint16_t color);
sPymbed 0:94df05e3330d 231 //void drawTriangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color);
sPymbed 0:94df05e3330d 232 //void fillTriangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color);
sPymbed 0:94df05e3330d 233 //void drawRect(uint16_t x0, uint16_t y0, uint16_t w, uint16_t h, uint16_t color);
sPymbed 0:94df05e3330d 234 //void fillRect(uint16_t x0, uint16_t y0, uint16_t w, uint16_t h, uint16_t color);
sPymbed 0:94df05e3330d 235 //void drawRoundRect(uint16_t x0, uint16_t y0, uint16_t w, uint16_t h, uint16_t radius, uint16_t color);
sPymbed 0:94df05e3330d 236 //void fillRoundRect(uint16_t x0, uint16_t y0, uint16_t w, uint16_t h, uint16_t radius, uint16_t color);
sPymbed 0:94df05e3330d 237 //void drawCircle(uint16_t x0, uint16_t y0, uint16_t r, uint16_t color);
sPymbed 0:94df05e3330d 238 //void fillCircle(uint16_t x0, uint16_t y0, uint16_t r, uint16_t color);
sPymbed 0:94df05e3330d 239
sPymbed 0:94df05e3330d 240 //void setCursor(uint16_t x, uint16_t y);
sPymbed 0:94df05e3330d 241 //void setTextColor(uint16_t c);
sPymbed 0:94df05e3330d 242 //void setTextColor(uint16_t c, uint16_t bg);
sPymbed 0:94df05e3330d 243 //void setTextSize(uint8_t s);
sPymbed 0:94df05e3330d 244 //void setTextWrap(bool w);
sPymbed 0:94df05e3330d 245 //void drawChar(uint16_t x, uint16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size);
sPymbed 0:94df05e3330d 246 //void drawBitmap(uint16_t x, uint16_t y, const uint8_t *bitmap, uint16_t w, uint16_t h, uint16_t color);
sPymbed 0:94df05e3330d 247
sPymbed 0:94df05e3330d 248 //virtual size_t write(uint8_t);
sPymbed 0:94df05e3330d 249
sPymbed 0:94df05e3330d 250 uint16_t Color565(uint8_t r, uint8_t g, uint8_t b);
sPymbed 1:74bac5f988d8 251 uint8_t readID(void);
sPymbed 0:94df05e3330d 252
sPymbed 0:94df05e3330d 253 //void setRotation(uint8_t x);
sPymbed 0:94df05e3330d 254 //uint8_t getRotation();
sPymbed 0:94df05e3330d 255 // These methods are public in order for BMP examples to work:
sPymbed 0:94df05e3330d 256 //void setAddrWindow(int x1, int y1, int x2, int y2);
sPymbed 0:94df05e3330d 257 //void pushColors(uint16_t *data, uint8_t len, bool first);
sPymbed 0:94df05e3330d 258
sPymbed 0:94df05e3330d 259 // - Low Level ------------------------------------------------------------
sPymbed 0:94df05e3330d 260 void writeData(uint16_t data);
sPymbed 0:94df05e3330d 261 void writeCommand(uint16_t cmd);
sPymbed 0:94df05e3330d 262 uint16_t readData(void);
sPymbed 0:94df05e3330d 263 void writeRegister(uint16_t addr, uint16_t data);
sPymbed 0:94df05e3330d 264
sPymbed 0:94df05e3330d 265 //void writeData8(uint8_t d);
sPymbed 0:94df05e3330d 266 //void writeData16(uint16_t d);
sPymbed 0:94df05e3330d 267 //void writeCommand(uint8_t c);
sPymbed 0:94df05e3330d 268 //uint8_t readData8(void);
sPymbed 0:94df05e3330d 269 //uint16_t readData16(void);
sPymbed 0:94df05e3330d 270 //void writeRegister(uint8_t addr, uint8_t data);
sPymbed 0:94df05e3330d 271 //void writeRegisterPair(uint8_t aH, uint8_t aL, uint16_t d);
sPymbed 0:94df05e3330d 272
sPymbed 0:94df05e3330d 273 //uint16_t width();
sPymbed 0:94df05e3330d 274 //uint16_t height();
sPymbed 0:94df05e3330d 275
sPymbed 0:94df05e3330d 276 static const uint16_t TFTWIDTH = 800;
sPymbed 0:94df05e3330d 277 static const uint16_t TFTHEIGHT = 480;
sPymbed 0:94df05e3330d 278
sPymbed 0:94df05e3330d 279 //void writeData_unsafe(uint16_t d);
sPymbed 0:94df05e3330d 280 //void setWriteDir(void);
sPymbed 0:94df05e3330d 281 //void setReadDir(void);
sPymbed 0:94df05e3330d 282
sPymbed 0:94df05e3330d 283 //void write8(uint8_t d);
sPymbed 0:94df05e3330d 284
sPymbed 0:94df05e3330d 285 private:
sPymbed 1:74bac5f988d8 286 DigitalOut _lcd_pin_cs, _lcd_pin_rs, _lcd_pin_reset;
sPymbed 1:74bac5f988d8 287 DigitalOut _lcd_pin_wr;
sPymbed 1:74bac5f988d8 288 BusInOut* _lcd_port;
sPymbed 1:74bac5f988d8 289 DigitalOut _lcd_pin_rd;
sPymbed 0:94df05e3330d 290 //void init(void);
sPymbed 0:94df05e3330d 291 //void flood(uint16_t color, uint32_t len);
sPymbed 0:94df05e3330d 292
sPymbed 0:94df05e3330d 293 //void drawCircleHelper(uint16_t x0, uint16_t y0, uint16_t r, uint8_t corner, uint16_t color);
sPymbed 0:94df05e3330d 294 //void fillCircleHelper(uint16_t x0, uint16_t y0, uint16_t r, uint8_t corner, uint16_t delta, uint16_t color);
sPymbed 0:94df05e3330d 295
sPymbed 0:94df05e3330d 296 //uint8_t read8(void);
sPymbed 0:94df05e3330d 297
sPymbed 0:94df05e3330d 298 protected:
sPymbed 1:74bac5f988d8 299 /** Activates the display for command/data transfer.
sPymbed 1:74bac5f988d8 300 *
sPymbed 1:74bac5f988d8 301 * Usually achieved by pulling the CS pin of the display low.
sPymbed 1:74bac5f988d8 302 */
sPymbed 1:74bac5f988d8 303 void Activate( void );
sPymbed 1:74bac5f988d8 304
sPymbed 1:74bac5f988d8 305 /** Deactivates the display after data has been transmitted.
sPymbed 1:74bac5f988d8 306 *
sPymbed 1:74bac5f988d8 307 * Usually achieved by pulling the CS pin of the display high.
sPymbed 1:74bac5f988d8 308 */
sPymbed 1:74bac5f988d8 309 void Deactivate( void );
sPymbed 0:94df05e3330d 310 //uint16_t _width, _height;
sPymbed 0:94df05e3330d 311 //uint8_t textsize;
sPymbed 0:94df05e3330d 312 //uint16_t cursor_x, cursor_y;
sPymbed 0:94df05e3330d 313 //uint16_t textcolor;
sPymbed 0:94df05e3330d 314 //uint16_t textbgcolor;
sPymbed 0:94df05e3330d 315 //uint8_t rotation;
sPymbed 0:94df05e3330d 316 //uint8_t driver;
sPymbed 0:94df05e3330d 317 //bool wrap;
sPymbed 0:94df05e3330d 318 };
sPymbed 0:94df05e3330d 319
sPymbed 0:94df05e3330d 320 #endif