37 lcduint_t rx = w ? (x + w - 1) : (m_base.width() - 1);
44 this->send(x + (m_rotation == 3 ? 32 : 0));
46 this->send((rx < m_base.width() ? rx : (m_base.width() - 1)) + (m_rotation == 3 ? 32 : 0));
52 this->send(y + (m_rotation == 2 ? 32 : 0));
54 this->send(m_base.height() - 1 + (m_rotation == 2 ? 32 : 0));
90 if ( (rotation ^ m_rotation) & 0x01 )
92 m_base.swapDimensions();
94 m_rotation = (rotation & 0x03);
100 switch ( m_rotation )
103 ram_mode = 0b00000000;
106 ram_mode = 0b01100000;
109 ram_mode = 0b11000000;
112 ram_mode = 0b10100000;
115 this->send(ram_mode | m_rgb_bit);
150 static const PROGMEM uint8_t s_IL9163_lcd128x128x16_initData[] = {
152 SDL_LCD_IL9163, 0x00,
172 0xC0, 0x02, 0x0A, 0x02,
174 0xC5, 0x02, 0x50, 0x5B,
178 0x36, 0x01, 0b00000000,
193 _configureSpiDisplay<I>(this->m_intf,
194 s_IL9163_lcd128x128x16_initData,
195 sizeof(s_IL9163_lcd128x128x16_initData));
203 static const PROGMEM uint8_t s_IL9163_lcd128x160x16_initData[] = {
205 SDL_LCD_IL9163, 0x00,
212 0xC0, 0x02, 0x0A, 0x02,
214 0xC5, 0x02, 0x50, 0x5B,
216 0x36, 0x01, 0b00000000,
231 _configureSpiDisplay<I>(this->m_intf,
232 s_IL9163_lcd128x160x16_initData,
233 sizeof(s_IL9163_lcd128x160x16_initData));
void beginController()
Basic IL9163 128x160x16 initialization.
uint8_t lcduint_t
internal int type, used by the library.
void invertMode()
Switches display to inverted mode (sends INVON command).
void lcd_gpioWrite(int pin, int level)
Writes value to gpio.
void endController()
Basic IL9163 deinitialization.
void setDataMode(uint8_t mode)
Enables either data or command mode on SPI bus.
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 commandStart()
Starts communication with LCD display in command mode.
void endBlock()
Closes data send operation to lcd display.
void beginDisplay()
Basic IL9163 initialization.
#define LCD_LOW
Constant corresponds to low level of gpio pin.
Basic structures of nano gfx 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 endDisplay()
Basic IL9163 deinitialization.
void beginController()
Basic IL9163 128x128x16 initialization.
void nextBlock()
Switches to the start of next RAM page for the block, specified by startBlock().
void endController()
Basic IL9163 deinitialization.
#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.
void normalMode()
Switches display to normal (non-inverted) mode (sends INVOFF command).