38 lcduint_t rx = w ? (x + w - 1) : (m_base.width() - 1);
39 rx = rx < m_base.width() ? rx: (m_base.width() -1);
47 this->send(rx & 0xFF);
53 this->send((m_base.height() - 1) >> 8);
54 this->send((m_base.height() - 1) & 0xFF);
95 if ((rotation^m_rotation) & 0x01)
97 m_base.swapDimensions();
99 m_rotation = (rotation & 0x03);
108 ram_mode = m_rotate_output ? 0b11100100: 0b10000100;
111 ram_mode = 0b11100000;
114 ram_mode = 0b01010100;
117 ram_mode = 0b00100000;
120 this->send( ram_mode | m_rgb_bit );
129 m_rotate_output = rotate;
130 this->setRotation( m_rotation );
148 static const PROGMEM uint8_t s_ILI9341_lcd240x320x16_initData[] =
151 SDL_LCD_ILI9341, 0x00,
159 0xE0, 15, 0x3F, 0x25, 0x1C,
164 0xE1, 15, 0x20, 0x20, 0x20,
171 0xC0, 0x02, 0x0A, 0x02,
173 0xC5, 0x02, 0x50, 0x5B,
175 0x36, 0x01, 0b10001100,
191 _configureSpiDisplay<I>(this->m_intf,
192 s_ILI9341_lcd240x320x16_initData,
193 sizeof(s_ILI9341_lcd240x320x16_initData));
201 static const PROGMEM uint8_t s_ILI9341_lcd128x160x16_initData[] =
204 SDL_LCD_ST7735, 0x00,
207 0x01, CMD_DELAY, 150,
208 0x11, CMD_DELAY, 255,
209 0xB1, 0x03, 0x01, 0x2C, 0x2D,
210 0xB2, 0x03, 0x01, 0x2C, 0x2D,
215 0xB6, 0x02, 0x15, 0x02,
216 0xC0, 0x03, 0xA2, 0x02, 0x84,
218 0xC2, 0x02, 0x0A, 0x00,
219 0xC3, 0x02, 0x8A, 0x2A,
220 0xC4, 0x02, 0x8A, 0xEE,
224 0x36, 0x01, 0b00000000,
229 0x0F, 0x1A, 0x0F, 0x18,
230 0x2F, 0x28, 0x20, 0x22,
231 0x1F, 0x1B, 0x23, 0x37,
232 0x00, 0x07, 0x02, 0x10,
234 0x0F, 0x1B, 0x0F, 0x17,
235 0x33, 0x2C, 0x29, 0x2E,
236 0x30, 0x30, 0x39, 0x3F,
237 0x00, 0x07, 0x03, 0x10,
241 0x29, CMD_DELAY, 100,
257 _configureSpiDisplay<I>(this->m_intf,
258 s_ILI9341_lcd128x160x16_initData,
259 sizeof(s_ILI9341_lcd128x160x16_initData));
void lcd_gpioWrite(int pin, int level)
void rotateOutput(uint8_t rotate)
Sets rotation of all output functions.
void ssd1306_resetController2(int8_t rstPin, uint8_t delayMs)
Does hardware reset for oled controller.
void setDataMode(uint8_t mode)
void setRotation(uint8_t rotation)
Sets screen orientation (rotation)
void lcd_delay(unsigned long ms)
void startBlock(lcduint_t x, lcduint_t y, lcduint_t w)
Sets block in RAM of lcd display controller to write data to.