static uint8_t PROGMEM cmd_240x240[] = { // Initialization commands for 7789 screens 10, // 9 commands in list: ST7789_SWRESET, ST_CMD_DELAY, // 1: Software reset, no args, w/delay 150, // 150 ms delay ST7789_SLPOUT , ST_CMD_DELAY, // 2: Out of sleep mode, no args, w/delay 255, // 255 = 500 ms delay ST7789_COLMOD , 1+ST_CMD_DELAY, // 3: Set color mode, 1 arg + delay: 0x55, // 16-bit color 10, // 10 ms delay ST7789_MADCTL , 1, // 4: Memory access ctrl (directions), 1 arg: 0x00, // Row addr/col addr, bottom to top refresh ST7789_CASET , 4, // 5: Column addr set, 4 args, no delay: 0x00, ST7789_240x240_XSTART, // XSTART = 0 (240+ST7789_240x240_XSTART) >> 8, (240+ST7789_240x240_XSTART) & 0xFF, // XEND = 240 ST7789_RASET , 4, // 6: Row addr set, 4 args, no delay: 0x00, ST7789_240x240_YSTART, // YSTART = 0 (240+ST7789_240x240_YSTART) >> 8, (240+ST7789_240x240_YSTART) & 0xFF, // YEND = 240 ST7789_INVON , ST_CMD_DELAY, // 7: Inversion ON 10, ST7789_NORON , ST_CMD_DELAY, // 8: Normal display on, no args, w/delay 10, // 10 ms delay ST7789_DISPON , ST_CMD_DELAY, // 9: Main screen turn on, no args, w/delay 255 }; // 255 = 500 ms delay commandList( cmd_240x240 );