38 lcduint_t rx = w ? (x + w - 1) : (m_base.width() - 1);
43 this->send(x + m_offset_x);
45 this->send( (rx < m_base.width() ? rx : (m_base.width() - 1)) + m_offset_x);
50 this->send( y + m_offset_y );
52 this->send( m_base.height() - 1 + m_offset_y);
102 if ((rotation^m_rotation) & 0x01)
104 m_base.swapDimensions();
106 m_offset_x = m_offset_y;
109 m_rotation = (rotation & 0x03);
118 ram_mode = 0b00000000;
121 ram_mode = 0b01100000;
124 ram_mode = 0b11000000;
127 ram_mode = 0b10100000;
130 this->send( ram_mode | m_rgb_bit );
139 if (m_rotation & 0x01)
166 static const PROGMEM uint8_t s_ST7735_lcd128x128x16_initData[] =
169 SDL_LCD_ST7735, 0x00,
172 0x01, CMD_DELAY, 150,
173 0x11, CMD_DELAY, 255,
174 0xB1, 0x03, 0x01, 0x2C, 0x2D,
175 0xB2, 0x03, 0x01, 0x2C, 0x2D,
180 0xB6, 0x02, 0x15, 0x02,
181 0xC0, 0x03, 0xA2, 0x02, 0x84,
183 0xC2, 0x02, 0x0A, 0x00,
184 0xC3, 0x02, 0x8A, 0x2A,
185 0xC4, 0x02, 0x8A, 0xEE,
189 0x36, 0x01, 0b00000000,
194 0x0F, 0x1A, 0x0F, 0x18,
195 0x2F, 0x28, 0x20, 0x22,
196 0x1F, 0x1B, 0x23, 0x37,
197 0x00, 0x07, 0x02, 0x10,
199 0x0F, 0x1B, 0x0F, 0x17,
200 0x33, 0x2C, 0x29, 0x2E,
201 0x30, 0x30, 0x39, 0x3F,
202 0x00, 0x07, 0x03, 0x10,
206 0x29, CMD_DELAY, 100,
222 _configureSpiDisplay<I>(this->m_intf,
223 s_ST7735_lcd128x128x16_initData,
224 sizeof(s_ST7735_lcd128x128x16_initData));
232 static const PROGMEM uint8_t s_ST7735_lcd128x160x16_initData[] =
235 SDL_LCD_ST7735, 0x00,
238 0x01, CMD_DELAY, 150,
239 0x11, CMD_DELAY, 255,
240 0xB1, 0x03, 0x01, 0x2C, 0x2D,
241 0xB2, 0x03, 0x01, 0x2C, 0x2D,
246 0xB6, 0x02, 0x15, 0x02,
247 0xC0, 0x03, 0xA2, 0x02, 0x84,
249 0xC2, 0x02, 0x0A, 0x00,
250 0xC3, 0x02, 0x8A, 0x2A,
251 0xC4, 0x02, 0x8A, 0xEE,
255 0x36, 0x01, 0b00000000,
260 0x0F, 0x1A, 0x0F, 0x18,
261 0x2F, 0x28, 0x20, 0x22,
262 0x1F, 0x1B, 0x23, 0x37,
263 0x00, 0x07, 0x02, 0x10,
265 0x0F, 0x1B, 0x0F, 0x17,
266 0x33, 0x2C, 0x29, 0x2E,
267 0x30, 0x30, 0x39, 0x3F,
268 0x00, 0x07, 0x03, 0x10,
272 0x29, CMD_DELAY, 100,
288 _configureSpiDisplay<I>(this->m_intf,
289 s_ST7735_lcd128x160x16_initData,
290 sizeof(s_ST7735_lcd128x160x16_initData));
void lcd_gpioWrite(int pin, int level)
void setDataMode(uint8_t mode)
void ssd1306_resetController2(int8_t rstPin, uint8_t delayMs)
Does hardware reset for oled controller.
void setOffset(lcdint_t ox, lcdint_t oy)
Sets display offset in GDRAM memory.
void setRotation(uint8_t rotation)
Sets screen orientation (rotation)
void startBlock(lcduint_t x, lcduint_t y, lcduint_t w)
Sets block in RAM of lcd display controller to write data to.
void lcd_delay(unsigned long ms)