This commit is contained in:
Dylan Smith
2026-01-07 14:41:00 -05:00
parent 78e64b09bb
commit 5e118e7639
2 changed files with 5 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
#include "graphics.h"
#include "stm32f4xx_hal_ltdc.h"
__attribute__((section(".sdram")))
volatile Pixel_t framebuffer[DISPLAY_HEIGHT * DISPLAY_WIDTH];
@@ -16,4 +17,5 @@ void DisplayTest(uint16_t color)
framebuffer[(h * DISPLAY_WIDTH) + w] = color;
}
}
}

View File

@@ -19,6 +19,7 @@
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
#include "stm32f4xx_hal_ltdc.h"
#include "stm32f4xx_hal_sdram.h"
#include "stm32f4xx_ll_fmc.h"
#include "usb_host.h"
@@ -700,8 +701,10 @@ void StartDefaultTask(void const * argument)
for(;;)
{
DisplayTest(0xffff);
HAL_LTDC_Reload(&hltdc, LTDC_RELOAD_IMMEDIATE);
osDelay(500);
DisplayTest(0x0000);
HAL_LTDC_Reload(&hltdc, LTDC_RELOAD_IMMEDIATE);
osDelay(500);
}
/* USER CODE END 5 */