Improve screen palette
Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
This commit is contained in:
+6
-8
@@ -182,18 +182,17 @@ void core1_irq_dma_lcd_end_transfer(void)
|
|||||||
{
|
{
|
||||||
mk_ili9225_write_pixels_end();
|
mk_ili9225_write_pixels_end();
|
||||||
__atomic_store_n(&lcd_line_busy, 0, __ATOMIC_SEQ_CST);
|
__atomic_store_n(&lcd_line_busy, 0, __ATOMIC_SEQ_CST);
|
||||||
//irq_clear(DMA_IRQ_0);
|
|
||||||
dma_channel_acknowledge_irq0(dma_lcd);
|
dma_channel_acknowledge_irq0(dma_lcd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void core1_lcd_draw_line(const uint_fast8_t line)
|
void core1_lcd_draw_line(const uint_fast8_t line)
|
||||||
{
|
{
|
||||||
const uint16_t palette[3][4] = {
|
const uint16_t palette[3][4] = {
|
||||||
{ 0xFFFF, 0xA528, 0x5294, 0x0000 },
|
{ 0xFFFF, 0x651F, 0x001F, 0x0000 },
|
||||||
{ 0xFFFF, 0xA528, 0x5294, 0x0000 },
|
{ 0xFFFF, 0xFC10, 0x89C7, 0x0000 },
|
||||||
{ 0xFFFF, 0xA528, 0x5294, 0x0000 }
|
{ 0xFFFF, 0x651F, 0x001F, 0x0000 }
|
||||||
};
|
};
|
||||||
static uint16_t fb[LCD_WIDTH] = { 0 };
|
static uint16_t fb[LCD_WIDTH];
|
||||||
|
|
||||||
//dma_channel_wait_for_finish_blocking(dma_lcd);
|
//dma_channel_wait_for_finish_blocking(dma_lcd);
|
||||||
for(unsigned int x = 0; x < LCD_WIDTH; x++)
|
for(unsigned int x = 0; x < LCD_WIDTH; x++)
|
||||||
@@ -222,8 +221,7 @@ _Noreturn
|
|||||||
void main_core1(void)
|
void main_core1(void)
|
||||||
{
|
{
|
||||||
static dma_channel_config c2;
|
static dma_channel_config c2;
|
||||||
static const uint16_t clear = 0xF800;
|
static const uint16_t red = 0xF800;
|
||||||
static const uint16_t green = 0x07D0;
|
|
||||||
union core_cmd cmd;
|
union core_cmd cmd;
|
||||||
|
|
||||||
/* Initialise and control LCD on core 1. */
|
/* Initialise and control LCD on core 1. */
|
||||||
@@ -245,7 +243,7 @@ void main_core1(void)
|
|||||||
|
|
||||||
/* Clear LCD screen. */
|
/* Clear LCD screen. */
|
||||||
mk_ili9225_write_pixels_start();
|
mk_ili9225_write_pixels_start();
|
||||||
dma_channel_configure(dma_lcd, &c2, &spi_get_hw(spi0)->dr, &clear,
|
dma_channel_configure(dma_lcd, &c2, &spi_get_hw(spi0)->dr, &red,
|
||||||
SCREEN_SIZE_X*SCREEN_SIZE_Y+16, true);
|
SCREEN_SIZE_X*SCREEN_SIZE_Y+16, true);
|
||||||
do {
|
do {
|
||||||
__wfi();
|
__wfi();
|
||||||
|
|||||||
Reference in New Issue
Block a user