This should match the fifo size of 8, not 16

This commit is contained in:
Kwabena W. Agyeman 2021-03-02 22:22:34 -08:00
parent d8c2777e6d
commit 646b16350d

View File

@ -273,8 +273,8 @@ static void spi_lcd_callback(SPI_HandleTypeDef *hspi)
}
case SPI_TX_CB_MEMORY_WRITE: {
uint16_t *addr = spi_tx_cb_state_memory_write_addr;
size_t count = IM_MIN(spi_tx_cb_state_memory_write_count, (65536-16));
spi_tx_cb_state = (spi_tx_cb_state_memory_write_count > (65536-16)) ? SPI_TX_CB_MEMORY_WRITE : SPI_TX_CB_DISPLAY_ON;
size_t count = IM_MIN(spi_tx_cb_state_memory_write_count, (65536-8));
spi_tx_cb_state = (spi_tx_cb_state_memory_write_count > (65536-8)) ? SPI_TX_CB_MEMORY_WRITE : SPI_TX_CB_DISPLAY_ON;
spi_tx_cb_state_memory_write_addr += count;
spi_tx_cb_state_memory_write_count -= count;
if (spi_tx_cb_state_memory_write_first) {