37 uint8_t rx = w ? (x + w - 1) : (m_base.width() - 1);
40 this->send((m_rotation & 1) ? 0x75: 0x15);
42 this->send(rx < m_base.width() ? rx : (m_base.width() - 1));
43 this->send((m_rotation & 1) ? 0x15: 0x75);
45 this->send(m_base.height() - 1);
79 if ( (rotation ^ m_rotation) & 0x01 )
81 m_base.swapDimensions();
83 m_rotation = rotation & 0x03;
91 ram_mode = 0b00110010;
94 ram_mode = 0b00110001;
97 ram_mode = 0b00100000;
101 ram_mode = 0b00100011;
104 this->send( ram_mode | (m_bits == 16 ? 0x40: 0x00) );
117 this->send( (color & 0xF800) >> 10 );
118 this->send( (color & 0x07E0) >> 5 );
119 this->send( (color & 0x001F) << 1 );
141 this->send(contrast);
143 this->send(contrast);
145 this->send(contrast);
162 static const PROGMEM uint8_t s_SSD1331_lcd96x64x8_initData[] = {
164 SDL_LCD_SSD1331_X8, 0x00,
168 0xA0, 0x01, 0x20 | 0x10 | 0x02,
199 _configureSpiDisplayCmdModeOnly<I>(this->m_intf,
200 s_SSD1331_lcd96x64x8_initData,
201 sizeof(s_SSD1331_lcd96x64x8_initData));
220 static const PROGMEM uint8_t s_SSD1331_lcd96x64x16_initData[] = {
222 SDL_LCD_SSD1331_X16, 0x00,
226 0xA0, 0x01, 0x40 | 0x20 | 0x10 | 0x02,
257 _configureSpiDisplayCmdModeOnly<I>(this->m_intf,
258 s_SSD1331_lcd96x64x16_initData,
259 sizeof(s_SSD1331_lcd96x64x16_initData));
void beginDisplay()
Basic SSD1331 initialization.
uint8_t lcduint_t
internal int type, used by the library.
void lcd_gpioWrite(int pin, int level)
Writes value to gpio.
void endDisplay()
Basic SSD1331 deinitialization.
void endDisplay()
Basic SSD1331 deinitialization.
void setContrast(uint8_t contrast)
Set display contrast for all RGB channels uniformly.
void copyBlock(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t newLeft, uint8_t newTop)
Copies block in GDRAM to new position using hardware accelerator features.
void endController()
Basic SSD1331 deinitialization.
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 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 beginController()
Basic SSD1331 96x64x16 initialization.
void drawLine(lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2, uint16_t color)
Draws line using hardware accelerator capabilities.
#define LCD_LOW
Constant corresponds to low level of gpio pin.
Basic structures of nano gfx library.
void commandStart()
Starts communication with LCD display in command mode.
void beginDisplay()
Basic SSD1331 initialization.
void endController()
Basic SSD1331 deinitialization.
void beginController()
Basic SSD1331 96x64x8 initialization.
void setDataMode(uint8_t mode)
Enables either data or command mode on SPI bus.
void nextBlock()
Switches to the start of next RAM page for the block, specified by startBlock().
void endBlock()
Closes data send operation to lcd display.
#define LCD_HIGH
Constant corresponds to high level of gpio pin.
void lcd_delay(unsigned long ms)
Forces current thread to sleeps for specified number of milliseconds.