mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'fix/spi_lcd_example_fix_border_pixel_display_v5.0' into 'release/v5.0'
fix(spi_master): fixed lcd example block border pixel issue (v5.0) See merge request espressif/esp-idf!27921
This commit is contained in:
commit
e73aec3cbc
@ -348,20 +348,20 @@ static void send_lines(spi_device_handle_t spi, int ypos, uint16_t *linedata)
|
||||
}
|
||||
trans[x].flags=SPI_TRANS_USE_TXDATA;
|
||||
}
|
||||
trans[0].tx_data[0]=0x2A; //Column Address Set
|
||||
trans[1].tx_data[0]=0; //Start Col High
|
||||
trans[1].tx_data[1]=0; //Start Col Low
|
||||
trans[1].tx_data[2]=(320)>>8; //End Col High
|
||||
trans[1].tx_data[3]=(320)&0xff; //End Col Low
|
||||
trans[2].tx_data[0]=0x2B; //Page address set
|
||||
trans[3].tx_data[0]=ypos>>8; //Start page high
|
||||
trans[3].tx_data[1]=ypos&0xff; //start page low
|
||||
trans[3].tx_data[2]=(ypos+PARALLEL_LINES)>>8; //end page high
|
||||
trans[3].tx_data[3]=(ypos+PARALLEL_LINES)&0xff; //end page low
|
||||
trans[4].tx_data[0]=0x2C; //memory write
|
||||
trans[5].tx_buffer=linedata; //finally send the line data
|
||||
trans[5].length=320*2*8*PARALLEL_LINES; //Data length, in bits
|
||||
trans[5].flags=0; //undo SPI_TRANS_USE_TXDATA flag
|
||||
trans[0].tx_data[0] = 0x2A; //Column Address Set
|
||||
trans[1].tx_data[0] = 0; //Start Col High
|
||||
trans[1].tx_data[1] = 0; //Start Col Low
|
||||
trans[1].tx_data[2] = (320 - 1) >> 8; //End Col High
|
||||
trans[1].tx_data[3] = (320 - 1) & 0xff; //End Col Low
|
||||
trans[2].tx_data[0] = 0x2B; //Page address set
|
||||
trans[3].tx_data[0] = ypos >> 8; //Start page high
|
||||
trans[3].tx_data[1] = ypos & 0xff; //start page low
|
||||
trans[3].tx_data[2] = (ypos + PARALLEL_LINES - 1) >> 8; //end page high
|
||||
trans[3].tx_data[3] = (ypos + PARALLEL_LINES - 1) & 0xff; //end page low
|
||||
trans[4].tx_data[0] = 0x2C; //memory write
|
||||
trans[5].tx_buffer = linedata; //finally send the line data
|
||||
trans[5].length = 320 * 2 * 8 * PARALLEL_LINES; //Data length, in bits
|
||||
trans[5].flags = 0; //undo SPI_TRANS_USE_TXDATA flag
|
||||
|
||||
//Queue all transactions.
|
||||
for (x=0; x<6; x++) {
|
||||
|
Loading…
Reference in New Issue
Block a user