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 );
158 static const PROGMEM uint8_t s_ST7735_lcd128x128x16_initData[] =
161 SDL_LCD_ST7735, 0x00,
164 0x01, CMD_DELAY, 150,
165 0x11, CMD_DELAY, 255,
166 0xB1, 0x03, 0x01, 0x2C, 0x2D,
167 0xB2, 0x03, 0x01, 0x2C, 0x2D,
172 0xB6, 0x02, 0x15, 0x02,
173 0xC0, 0x03, 0xA2, 0x02, 0x84,
175 0xC2, 0x02, 0x0A, 0x00,
176 0xC3, 0x02, 0x8A, 0x2A,
177 0xC4, 0x02, 0x8A, 0xEE,
181 0x36, 0x01, 0b00000000,
186 0x0F, 0x1A, 0x0F, 0x18,
187 0x2F, 0x28, 0x20, 0x22,
188 0x1F, 0x1B, 0x23, 0x37,
189 0x00, 0x07, 0x02, 0x10,
191 0x0F, 0x1B, 0x0F, 0x17,
192 0x33, 0x2C, 0x29, 0x2E,
193 0x30, 0x30, 0x39, 0x3F,
194 0x00, 0x07, 0x03, 0x10,
198 0x29, CMD_DELAY, 100,
214 _configureSpiDisplay<I>(this->m_intf,
215 s_ST7735_lcd128x128x16_initData,
216 sizeof(s_ST7735_lcd128x128x16_initData));
224 static const PROGMEM uint8_t s_ST7735_lcd128x160x16_initData[] =
227 SDL_LCD_ST7735, 0x00,
230 0x01, CMD_DELAY, 150,
231 0x11, CMD_DELAY, 255,
232 0xB1, 0x03, 0x01, 0x2C, 0x2D,
233 0xB2, 0x03, 0x01, 0x2C, 0x2D,
238 0xB6, 0x02, 0x15, 0x02,
239 0xC0, 0x03, 0xA2, 0x02, 0x84,
241 0xC2, 0x02, 0x0A, 0x00,
242 0xC3, 0x02, 0x8A, 0x2A,
243 0xC4, 0x02, 0x8A, 0xEE,
247 0x36, 0x01, 0b00000000,
252 0x0F, 0x1A, 0x0F, 0x18,
253 0x2F, 0x28, 0x20, 0x22,
254 0x1F, 0x1B, 0x23, 0x37,
255 0x00, 0x07, 0x02, 0x10,
257 0x0F, 0x1B, 0x0F, 0x17,
258 0x33, 0x2C, 0x29, 0x2E,
259 0x30, 0x30, 0x39, 0x3F,
260 0x00, 0x07, 0x03, 0x10,
264 0x29, CMD_DELAY, 100,
280 _configureSpiDisplay<I>(this->m_intf,
281 s_ST7735_lcd128x160x16_initData,
282 sizeof(s_ST7735_lcd128x160x16_initData));
void lcd_gpioWrite(int pin, int level)
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 spiDataMode(uint8_t mode)
void lcd_delay(unsigned long ms)