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 );
150 this->send(contrast);
151 this->send(contrast);
152 this->send(contrast);
169 static const PROGMEM uint8_t s_SSD1351_lcd128x128x16_initData[] = {
171 SDL_LCD_SSD1351, 0x00,
179 0xA0, 0x01, 0B00110100,
188 0xC1, 0x03, 0xC8, 0x80, 0xC8,
190 0xB4, 0x03, 0xA0, 0xB5, 0x55,
207 _configureSpiDisplay<I>(this->m_intf,
208 s_SSD1351_lcd128x128x16_initData,
209 sizeof(s_SSD1351_lcd128x128x16_initData));
217 static const PROGMEM uint8_t s_SSD1351_lcd96x96x16_initData[] = {
219 SDL_LCD_SSD1351, 0x00,
227 0xA0, 0x01, 0B00110100,
236 0xC1, 0x03, 0x42, 0x3C, 0x6B,
238 0xB4, 0x03, 0xA0, 0xB5, 0x55,
255 _configureSpiDisplay<I>(this->m_intf,
256 s_SSD1351_lcd96x96x16_initData,
257 sizeof(s_SSD1351_lcd96x96x16_initData));
void setRotation(uint8_t rotation)
Sets screen orientation (rotation)
void setRgbMode(uint8_t mode)
Sets RGB mode used by display controller.
void endBlock()
Closes data send operation to lcd display.
uint8_t lcduint_t
internal int type, used by the library.
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)
Writes value to gpio.
void commandStart()
Starts communication with LCD display in command mode.
void beginController()
Basic SSD1351 128x128x16 initialization.
int8_t lcdint_t
internal int type, used by the library.
SSD1306 HAL IO communication functions.
void ssd1306_resetController2(int8_t rstPin, uint8_t delayMs)
Does hardware reset for oled controller.
void beginDisplay()
Basic SSD1351 initialization.
void endController()
Basic SSD1351 deinitialization.
void nextBlock()
Switches to the start of next RAM page for the block, specified by startBlock().
#define LCD_LOW
Constant corresponds to low level of gpio pin.
Basic structures of nano gfx library.
void endDisplay()
Basic SSD1351 deinitialization.
void setDataMode(uint8_t mode)
Enables either data or command mode on SPI bus.
void setContrast(uint8_t contrast)
Set display contrast for all RGB channels uniformly.
void setOffset(lcdint_t ox, lcdint_t oy)
Sets display offset in GDRAM memory.
void endController()
Basic SSD1351 deinitialization.
#define LCD_HIGH
Constant corresponds to high level of gpio pin.
void beginController()
Basic SSD1351 96x96x16 initialization.
void lcd_delay(unsigned long ms)
Forces current thread to sleeps for specified number of milliseconds.