Prusa MINI Firmware overview
gui.c File Reference
#include "gui.h"
#include <stdlib.h>
#include "stm32f4xx_hal.h"

Macros

#define GUI_FLG_INVALID   0x0001
 
#define GUI_DELAY_MIN   1
 
#define GUI_DELAY_MAX   10
 
#define GUI_DELAY_LOOP   100
 

Functions

voidgui_malloc (unsigned int size)
 
void gui_free (void *ptrx)
 
void gui_init (void)
 
void gui_redraw (void)
 
void gui_invalidate (void)
 

Variables

uint16_t gui_flags = 0
 
gui_defaults_t gui_defaults
 
gui_loop_cb_tgui_loop_cb = 0
 
uint32_t gui_loop_tick = 0
 
window_twindow_0
 
window_twindow_1
 

Macro Definition Documentation

◆ GUI_FLG_INVALID

#define GUI_FLG_INVALID   0x0001

◆ GUI_DELAY_MIN

#define GUI_DELAY_MIN   1

◆ GUI_DELAY_MAX

#define GUI_DELAY_MAX   10

◆ GUI_DELAY_LOOP

#define GUI_DELAY_LOOP   100

Function Documentation

◆ gui_malloc()

void* gui_malloc ( unsigned int  size)
35  {
36  return malloc(size);
37 }
Here is the caller graph for this function:

◆ gui_free()

void gui_free ( void ptrx)
39  {
40  free(ptrx);
41 }
Here is the caller graph for this function:

◆ gui_init()

void gui_init ( void  )
43  {
44  display->init();
45 #ifdef GUI_JOGWHEEL_SUPPORT
46  jogwheel_init();
47  gui_reset_jogwheel();
48 #endif //GUI_JOGWHEEL_SUPPORT
49  gui_task_handle = osThreadGetId();
50 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gui_redraw()

void gui_redraw ( void  )
55  {
56  if (gui_flags & GUI_FLG_INVALID) {
57  if (window_0)
59  if (window_1)
61  //window_draw(0);
63  }
64 }

◆ gui_invalidate()

void gui_invalidate ( void  )
66  {
68 #ifdef GUI_USE_RTOS
69  osSignalSet(gui_task_handle, GUI_SIG_REDRAW);
70 #endif //GUI_USE_RTOS
71 }
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ gui_flags

uint16_t gui_flags = 0

◆ gui_defaults

gui_defaults_t gui_defaults
Initial value:
= {
0,
0,
{ 2, 2, 2, 2 },
{ 0, 32, 240, 320 - 96 },
6,
}

◆ gui_loop_cb

gui_loop_cb_t* gui_loop_cb = 0

◆ gui_loop_tick

uint32_t gui_loop_tick = 0

◆ window_0

window_t* window_0

◆ window_1

window_t* window_1
COLOR_WHITE
#define COLOR_WHITE
Definition: guitypes.h:41
jogwheel_init
void jogwheel_init(void)
Definition: jogwheel.c:16
_window_class_t::draw
window_draw_t * draw
Definition: window.h:72
gui_flags
uint16_t gui_flags
Definition: gui.c:9
osSignalSet
int32_t osSignalSet(osThreadId thread_id, int32_t signal)
Set the specified Signal Flags of an active thread.
Definition: cmsis_os.c:545
osThreadGetId
osThreadId osThreadGetId(void)
Return the thread ID of the current running thread.
Definition: cmsis_os.c:283
GUI_FLG_INVALID
#define GUI_FLG_INVALID
Definition: gui.c:7
window_0
window_t * window_0
Definition: window.c:12
ALIGN_LEFT_TOP
#define ALIGN_LEFT_TOP
Definition: guitypes.h:20
_display_t::init
display_init_t * init
Definition: display.h:27
display
display_t * display
Definition: display.c:6
COLOR_BLACK
#define COLOR_BLACK
Definition: guitypes.h:40
window_1
window_t * window_1
Definition: window.c:14
COLOR_SILVER
#define COLOR_SILVER
Definition: guitypes.h:49
_window_t::cls
window_class_t * cls
Definition: window.h:77
GUI_SIG_REDRAW
#define GUI_SIG_REDRAW
Definition: guiconfig.h:15
size
static png_bytep size_t size
Definition: pngwrite.c:2170