37 lcduint_t rx = w ? (x + w - 1) : (m_base.width() - 1);
39 this->send((m_rotation & 0x01) ? 0x75 : 0x15);
41 this->send(x + m_offset_x);
42 this->send( (rx < m_base.width() ? rx : (m_base.width() - 1)) + m_offset_x);
44 this->send((m_rotation & 0x01) ? 0x15 : 0x75);
46 this->send( y + m_offset_y );
47 this->send( m_base.height() - 1 + m_offset_y);
92 if ( (rotation ^ m_rotation) & 0x01 )
94 m_base.swapDimensions();
96 m_offset_x = m_offset_y;
99 m_rotation = (rotation & 0x03);
103 switch ( m_rotation )
107 ram_mode = 0b00110000;
110 ram_mode = 0b00110011;
113 ram_mode = 0B00100010;
117 ram_mode = 0b00100001;
121 this->send( ram_mode | m_rgbMode );
128 if (m_rotation & 0x01)
142 this->m_rgbMode = mode ? 0x04: 0x00;
143 this->setRotation( m_rotation );
159 static const PROGMEM uint8_t s_SSD1351_lcd128x128x16_initData[] = {
161 SDL_LCD_SSD1351, 0x00,
169 0xA0, 0x01, 0B00110100,
178 0xC1, 0x03, 0xC8, 0x80, 0xC8,
180 0xB4, 0x03, 0xA0, 0xB5, 0x55,
197 _configureSpiDisplay<I>(this->m_intf,
198 s_SSD1351_lcd128x128x16_initData,
199 sizeof(s_SSD1351_lcd128x128x16_initData));
207 static const PROGMEM uint8_t s_SSD1351_lcd96x96x16_initData[] = {
209 SDL_LCD_SSD1351, 0x00,
217 0xA0, 0x01, 0B00110100,
226 0xC1, 0x03, 0x42, 0x3C, 0x6B,
228 0xB4, 0x03, 0xA0, 0xB5, 0x55,
245 _configureSpiDisplay<I>(this->m_intf,
246 s_SSD1351_lcd96x96x16_initData,
247 sizeof(s_SSD1351_lcd96x96x16_initData));
void setRotation(uint8_t rotation)
Sets screen orientation (rotation)
void setRgbMode(uint8_t mode)
Sets RGB mode used by dispay controller.
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_gpioWrite(int pin, int level)
void ssd1306_resetController2(int8_t rstPin, uint8_t delayMs)
Does hardware reset for oled controller.
void setDataMode(uint8_t mode)
void setOffset(lcdint_t ox, lcdint_t oy)
Sets display offset in GDRAM memory.
void lcd_delay(unsigned long ms)