WIP
This commit is contained in:
4
Core/Src/graphics/display.c
Normal file
4
Core/Src/graphics/display.c
Normal file
@@ -0,0 +1,4 @@
|
||||
#include "display.h"
|
||||
|
||||
__attribute__((section(".sdram")))
|
||||
volatile pixel_t framebuffer[DISPLAY_HEIGHT * DISPLAY_WIDTH];
|
||||
@@ -17,6 +17,7 @@ static uint16_t find_glyph_id_in_cmap(const lv_font_fmt_txt_cmap_t * cmap, uint3
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_fmt_txt_glyph_dsc_t * dsc_out, uint32_t character)
|
||||
{
|
||||
lv_font_fmt_txt_dsc_t *font_dsc = (lv_font_fmt_txt_dsc_t *) font->dsc;
|
||||
@@ -32,9 +33,10 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_fmt_txt_glyph
|
||||
return false;
|
||||
}
|
||||
|
||||
// Left as a dummy definition for LVGL font compatibility.
|
||||
// We're not processing the bitmaps with draw buffers like LVGL does.
|
||||
const void * lv_font_get_bitmap_fmt_txt(lv_font_fmt_txt_glyph_dsc_t * g_dsc, lv_draw_buf_t * draw_buf)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
7
Core/Src/graphics/fonts/roboto_bold_font.c
Normal file
7
Core/Src/graphics/fonts/roboto_bold_font.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "fonts/roboto_bold_font.h"
|
||||
|
||||
// This file exists solely to include the font header in its own translation unit
|
||||
// so that the static font_dsc variable doesn't conflict with other fonts.
|
||||
// The font pointer (roboto_bold_font) is defined in the header and exported
|
||||
// for use in other translation units.
|
||||
|
||||
7
Core/Src/graphics/fonts/roboto_bold_large_font.c
Normal file
7
Core/Src/graphics/fonts/roboto_bold_large_font.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "fonts/roboto_bold_large_font.h"
|
||||
|
||||
// This file exists solely to include the font header in its own translation unit
|
||||
// so that the static font_dsc variable doesn't conflict with other fonts.
|
||||
// The font pointer (roboto_bold_large_font) is defined in the header and exported
|
||||
// for use in other translation units.
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
#include "display.h"
|
||||
#include "stm32f4xx_hal_ltdc.h"
|
||||
#include "graphics.h"
|
||||
|
||||
__attribute__((section(".sdram")))
|
||||
volatile rgb565_pixel_t framebuffer[DISPLAY_HEIGHT * DISPLAY_WIDTH];
|
||||
|
||||
__attribute__((section(".sdram")))
|
||||
volatile uint32_t times_changed;
|
||||
|
||||
void DisplayTest(uint16_t color)
|
||||
void DisplayTest(pixel_t color)
|
||||
{
|
||||
times_changed++;
|
||||
for (uint16_t h = 0; h < DISPLAY_HEIGHT; h++)
|
||||
{
|
||||
for (uint16_t w = 0; w < DISPLAY_WIDTH; w++)
|
||||
@@ -18,4 +10,18 @@ void DisplayTest(uint16_t color)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DrawBox(uint32_t topleft_x_loc, uint32_t topleft_y_loc, uint32_t height, uint32_t width, pixel_t color)
|
||||
{
|
||||
for (uint32_t y = topleft_y_loc; y < (topleft_y_loc + height); y++)
|
||||
{
|
||||
for (uint32_t x = topleft_x_loc; x < (topleft_x_loc + width); x++)
|
||||
{
|
||||
if (x < DISPLAY_WIDTH && y < DISPLAY_HEIGHT)
|
||||
{
|
||||
framebuffer[(y * DISPLAY_WIDTH) + x] = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
6
Core/Src/graphics/menu.c
Normal file
6
Core/Src/graphics/menu.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include "menu.h"
|
||||
|
||||
void draw_menu(graphical_menu_t *menu)
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user