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 );
139 static const PROGMEM uint8_t s_ILI9341_lcd240x320x16_initData[] = {
141 SDL_LCD_ILI9341, 0x00,
149 0xE0, 15, 0x3F, 0x25, 0x1C,
154 0xE1, 15, 0x20, 0x20, 0x20,
161 0xC0, 0x02, 0x0A, 0x02,
163 0xC5, 0x02, 0x50, 0x5B,
165 0x36, 0x01, 0b10001100,
180 _configureSpiDisplay<I>(this->m_intf,
181 s_ILI9341_lcd240x320x16_initData,
182 sizeof(s_ILI9341_lcd240x320x16_initData));
190 static const PROGMEM uint8_t s_ILI9341_lcd128x160x16_initData[] = {
192 SDL_LCD_ST7735, 0x00,
195 0x01, CMD_DELAY, 150,
196 0x11, CMD_DELAY, 255,
197 0xB1, 0x03, 0x01, 0x2C, 0x2D,
198 0xB2, 0x03, 0x01, 0x2C, 0x2D,
203 0xB6, 0x02, 0x15, 0x02,
204 0xC0, 0x03, 0xA2, 0x02, 0x84,
206 0xC2, 0x02, 0x0A, 0x00,
207 0xC3, 0x02, 0x8A, 0x2A,
208 0xC4, 0x02, 0x8A, 0xEE,
212 0x36, 0x01, 0b00000000,
217 0x0F, 0x1A, 0x0F, 0x18,
218 0x2F, 0x28, 0x20, 0x22,
219 0x1F, 0x1B, 0x23, 0x37,
220 0x00, 0x07, 0x02, 0x10,
222 0x0F, 0x1B, 0x0F, 0x17,
223 0x33, 0x2C, 0x29, 0x2E,
224 0x30, 0x30, 0x39, 0x3F,
225 0x00, 0x07, 0x03, 0x10,
229 0x29, CMD_DELAY, 100,
244 _configureSpiDisplay<I>(this->m_intf,
245 s_ILI9341_lcd128x160x16_initData,
246 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.