change memory allocation

This commit is contained in:
2025-03-31 20:33:28 +02:00
parent 7e4ce4a1cd
commit 82a37290a3
4 changed files with 75 additions and 75 deletions

View File

@ -59,7 +59,7 @@ PCD_HandleTypeDef hpcd_USB_OTG_HS;
SDRAM_HandleTypeDef hsdram1;
/* USER CODE BEGIN PV */
uint16_t framebuffer[160*120];
uint16_t framebuffer[480*272];
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
@ -130,7 +130,7 @@ int main(void)
uint8_t r = 0xff, g = 0x00, b = 0x00; // Solid red
uint16_t col = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3); // Convert colors to RGB565
// Put colors into the framebuffer
for(int i = 0; i < 160*120; i++)
for(int i = 0; i < 480*272; i++)
{
framebuffer[i] = col;
}