feat: speed up LCD_Clear
This commit is contained in:
parent
397e4f0894
commit
242edd604a
15
src/tftlcd.c
15
src/tftlcd.c
@ -229,11 +229,12 @@ void LCD_D_Point(uint16_t x, uint16_t y, uint16_t color) {
|
||||
}
|
||||
|
||||
void LCD_Clear(uint16_t color) {
|
||||
// LCD_S_Rec(0, LCD_W - 1, 0, LCD_H - 1);
|
||||
// for (uint32_t i = 0; i < LCD_W * LCD_H; i++) LCD_WR_DATA_16BIT(color);
|
||||
for (uint16_t i = 0; i < LCD_W; i++)
|
||||
for (uint16_t j = 0; j < LCD_H; j++) {
|
||||
LCD_S_XY(i, j);
|
||||
LCD_WR_REG_DATA_16BIT(LCD_RAM_WR, color);
|
||||
}
|
||||
LCD_S_Rec(0, LCD_W - 1, 0, LCD_H - 1);
|
||||
LCD_WR_REG(LCD_RAM_WR);
|
||||
for (uint32_t i = 0; i < LCD_W * LCD_H; i++) LCD_WR_DATA_16BIT(color);
|
||||
// for (uint16_t i = 0; i < LCD_W; i++)
|
||||
// for (uint16_t j = 0; j < LCD_H; j++) {
|
||||
// LCD_S_XY(i, j);
|
||||
// LCD_WR_REG_DATA_16BIT(LCD_RAM_WR, color);
|
||||
// }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user