|
|
|
|
@ -526,7 +526,10 @@ void ili9341_init(void)
|
|
|
|
|
LCD_CS_HIGH;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void ili9341_setWindow(uint8_t cmd, uint16_t x, uint16_t y, uint16_t w, uint16_t h){
|
|
|
|
|
// Every DMA region starts here; keep command setup inlined on the rendering
|
|
|
|
|
// path without enabling strict aliasing for the legacy display code.
|
|
|
|
|
static void __attribute__((optimize("O3,no-strict-aliasing")))
|
|
|
|
|
ili9341_setWindow(uint8_t cmd, uint16_t x, uint16_t y, uint16_t w, uint16_t h){
|
|
|
|
|
// Any LCD exchange start from this
|
|
|
|
|
#ifdef __USE_DISPLAY_DMA__
|
|
|
|
|
dmaChannelWaitCompletionRxTx();
|
|
|
|
|
@ -663,8 +666,11 @@ void ili9341_bulk_finish(void){
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
// Copy part of spi_buffer to region, no wait completion after if buffer count !=1
|
|
|
|
|
#ifndef ili9341_bulk_continue
|
|
|
|
|
void ili9341_bulk_continue(int x, int y, int w, int h)
|
|
|
|
|
#ifndef ili9341_bulk_continue
|
|
|
|
|
// This runs once per dirty plot cell. Keep the DMA handoff inlined so a held
|
|
|
|
|
// self-test screen is not slower than the historical display pipeline.
|
|
|
|
|
void __attribute__((optimize("O3,no-strict-aliasing")))
|
|
|
|
|
ili9341_bulk_continue(int x, int y, int w, int h)
|
|
|
|
|
{
|
|
|
|
|
ili9341_bulk_finish(); // Wait DMA
|
|
|
|
|
ili9341_DMA_bulk(x, y, w, h, ili9341_get_cell_buffer()); // Send new cell data
|
|
|
|
|
@ -783,7 +789,10 @@ void ili9341_set_rotation(uint8_t r)
|
|
|
|
|
send_command(ILI9341_MEMORY_ACCESS_CONTROL, 1, &r);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ili9341_blitBitmap(int x, int y, int width, int height, const uint8_t *b)
|
|
|
|
|
// Text drawing calls this once per glyph. Inline the DMA setup on this hot
|
|
|
|
|
// path while retaining the aliasing rules used by the rest of the release.
|
|
|
|
|
void __attribute__((optimize("O3,no-strict-aliasing")))
|
|
|
|
|
ili9341_blitBitmap(int x, int y, int width, int height, const uint8_t *b)
|
|
|
|
|
{
|
|
|
|
|
pixel_t *buf = spi_buffer;
|
|
|
|
|
uint8_t bits = 0;
|
|
|
|
|
|