37 lcduint_t rx = w ? (x + w - 1) : (m_base.width() - 1);
38 rx = rx < m_base.width() ? rx: (m_base.width() -1);
46 this->send(rx & 0xFF);
52 this->send((m_base.height() - 1) >> 8);
53 this->send((m_base.height() - 1) & 0xFF);
89 if ( (rotation ^ m_rotation) & 0x01 )
91 m_base.swapDimensions();
93 m_rotation = (rotation & 0x03);
102 ram_mode = m_rotate_output ? 0b11100100: 0b10000100;
105 ram_mode = 0b11100000;
108 ram_mode = 0b01010100;
111 ram_mode = 0b00100000;
114 this->send(ram_mode | m_rgb_bit);
122 m_rotate_output = rotate;
123 this->setRotation( m_rotation );
155 static const PROGMEM uint8_t s_ILI9341_lcd240x320x16_initData[] = {
157 SDL_LCD_ILI9341, 0x00,
165 0xE0, 15, 0x3F, 0x25, 0x1C,
170 0xE1, 15, 0x20, 0x20, 0x20,
177 0xC0, 0x02, 0x0A, 0x02,
179 0xC5, 0x02, 0x50, 0x5B,
181 0x36, 0x01, 0b10001100,
196 _configureSpiDisplay<I>(this->m_intf,
197 s_ILI9341_lcd240x320x16_initData,
198 sizeof(s_ILI9341_lcd240x320x16_initData));
206 static const PROGMEM uint8_t s_ILI9341_lcd128x160x16_initData[] = {
208 SDL_LCD_ST7735, 0x00,
211 0x01, CMD_DELAY, 150,
212 0x11, CMD_DELAY, 255,
213 0xB1, 0x03, 0x01, 0x2C, 0x2D,
214 0xB2, 0x03, 0x01, 0x2C, 0x2D,
219 0xB6, 0x02, 0x15, 0x02,
220 0xC0, 0x03, 0xA2, 0x02, 0x84,
222 0xC2, 0x02, 0x0A, 0x00,
223 0xC3, 0x02, 0x8A, 0x2A,
224 0xC4, 0x02, 0x8A, 0xEE,
228 0x36, 0x01, 0b00000000,
233 0x0F, 0x1A, 0x0F, 0x18,
234 0x2F, 0x28, 0x20, 0x22,
235 0x1F, 0x1B, 0x23, 0x37,
236 0x00, 0x07, 0x02, 0x10,
238 0x0F, 0x1B, 0x0F, 0x17,
239 0x33, 0x2C, 0x29, 0x2E,
240 0x30, 0x30, 0x39, 0x3F,
241 0x00, 0x07, 0x03, 0x10,
245 0x29, CMD_DELAY, 100,
260 _configureSpiDisplay<I>(this->m_intf,
261 s_ILI9341_lcd128x160x16_initData,
262 sizeof(s_ILI9341_lcd128x160x16_initData));
void endController()
Basic ILI9341 deinitialization.
uint8_t lcduint_t
internal int type, used by the library.
void lcd_gpioWrite(int pin, int level)
Writes value to gpio.
void beginController()
Basic ILI9341 128x160x16 initialization.
void rotateOutput(uint8_t rotate)
Sets rotation of all output functions.
SSD1306 HAL IO communication functions.
void ssd1306_resetController2(int8_t rstPin, uint8_t delayMs)
Does hardware reset for oled controller.
void commandStart()
Starts communication with LCD display in command mode.
void beginController()
Basic ILI9341 240x320x16 initialization.
void setDataMode(uint8_t mode)
Enables either data or command mode on SPI bus.
void beginDisplay()
Basic ILI9341 initialization.
void normalMode()
Switches display to normal (non-inverted) mode (sends INVOFF command).
#define LCD_LOW
Constant corresponds to low level of gpio pin.
void endController()
Basic ILI9341 deinitialization.
Basic structures of nano gfx library.
void setRotation(uint8_t rotation)
Sets screen orientation (rotation)
void nextBlock()
Switches to the start of next RAM page for the block, specified by startBlock().
#define LCD_HIGH
Constant corresponds to high level of gpio pin.
void endDisplay()
Basic ILI9341 deinitialization.
void endBlock()
Closes data send operation to lcd display.
void lcd_delay(unsigned long ms)
Forces current thread to sleeps for specified number of milliseconds.
void invertMode()
Switches display to inverted mode (sends INVON command).
void startBlock(lcduint_t x, lcduint_t y, lcduint_t w)
Sets block in RAM of lcd display controller to write data to.