Prusa MINI Firmware overview
guimain.c File Reference
#include <stdio.h>
#include "stm32f4xx_hal.h"
#include "gui.h"
#include "config.h"
#include "gpio.h"
#include "st7789v.h"
#include "jogwheel.h"
#include "hwio_a3ides.h"
#include "diag.h"
#include "sys.h"

Functions

void gui_run (void)
 

Variables

SPI_HandleTypeDef hspi2
 
const st7789v_config_t st7789v_cfg
 
const jogwheel_config_t jogwheel_cfg
 

Function Documentation

◆ gui_run()

void gui_run ( void  )
34  {
37  gui_init();
41 
42  display->fill_rect(rect_ui16(0, 0, 240, 320), COLOR_BLACK);
44  display->draw_text(rect_ui16(10, 115, 240, 60), "Hi, this is your\nOriginal Prusa MINI.", font, COLOR_BLACK, COLOR_WHITE);
45  display->draw_text(rect_ui16(10, 160, 240, 80), "Please insert the USB\ndrive that came with\nyour MINI and reset\nthe printer to flash\nthe firmware", font, COLOR_BLACK, COLOR_WHITE);
46  render_text_align(rect_ui16(5, 250, 230, 40), "RESET PRINTER", font1, COLOR_ORANGE, COLOR_WHITE, padding_ui8(2, 6, 2, 2), ALIGN_CENTER);
47  while (1) {
48  if (!gpio_get(PE12)) {
49  sys_reset();
50  }
51  }
52 }
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ hspi2

◆ st7789v_cfg

◆ jogwheel_cfg

RENDER_FLG
#define RENDER_FLG(a, r)
Definition: display_helper.h:10
jogwheel_config
jogwheel_config_t jogwheel_config
Definition: jogwheel.c:95
_font_t
Definition: guitypes.h:76
COLOR_WHITE
#define COLOR_WHITE
Definition: guitypes.h:41
sys_reset
void sys_reset(void)
Definition: sys.cpp:20
PE12
#define PE12
Definition: variant.h:112
gui_init
void gui_init(void)
Definition: gui.c:43
ALIGN_CENTER
#define ALIGN_CENTER
Definition: guitypes.h:19
rect_ui16
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
jogwheel_cfg
const jogwheel_config_t jogwheel_cfg
Definition: guimain.c:95
padding_ui8
static padding_ui8_t padding_ui8(uint8_t l, uint8_t t, uint8_t r, uint8_t b)
Definition: guitypes.h:164
IDR_FNT_NORMAL
#define IDR_FNT_NORMAL
Definition: resource.h:10
IDR_FNT_SPECIAL
#define IDR_FNT_SPECIAL
Definition: resource.h:13
IDR_PNG_icon_pepa
#define IDR_PNG_icon_pepa
Definition: resource.h:44
_display_t::draw_text
display_draw_text_t * draw_text
Definition: display.h:35
ST7789V_DEF_MADCTL
#define ST7789V_DEF_MADCTL
Definition: st7789v.h:14
GPIO_PULLUP
#define GPIO_PULLUP
Definition: stm32f4xx_hal_gpio.h:171
_display_t::fill_rect
display_fill_rect_t * fill_rect
Definition: display.h:33
gpio_get
static int gpio_get(uint8_t pin8)
Definition: gpio.h:94
st7789v_cfg
const st7789v_config_t st7789v_cfg
Definition: guimain.c:85
COLOR_ORANGE
#define COLOR_ORANGE
Definition: guitypes.h:57
gpio_init
static void gpio_init(uint8_t pin8, uint32_t mode, uint32_t pull, uint32_t speed)
Definition: gpio.h:102
JOGWHEEL_PIN_EN1
#define JOGWHEEL_PIN_EN1
Definition: config_a3ides2209_02.h:59
JOGWHEEL_PIN_ENC
#define JOGWHEEL_PIN_ENC
Definition: config_a3ides2209_02.h:61
hspi2
SPI_HandleTypeDef hspi2
Definition: main.c:81
JOGWHEEL_DEF_FLG
#define JOGWHEEL_DEF_FLG
Definition: jogwheel.h:15
render_text_align
void render_text_align(rect_ui16_t rc, const char *text, font_t *font, color_t clr0, color_t clr1, padding_ui8_t padding, uint16_t flags)
Definition: display_helper.c:6
display
display_t * display
Definition: display.c:6
resource_font
font_t * resource_font(uint16_t id)
Definition: guitypes.c:186
ST7789V_DEF_COLMOD
#define ST7789V_DEF_COLMOD
Definition: st7789v.h:13
ST7789V_FLG_DMA
#define ST7789V_FLG_DMA
Definition: st7789v.h:9
ST7789V_PIN_RS
#define ST7789V_PIN_RS
Definition: config_a3ides2209_02.h:54
COLOR_BLACK
#define COLOR_BLACK
Definition: guitypes.h:40
JOGWHEEL_PIN_EN2
#define JOGWHEEL_PIN_EN2
Definition: config_a3ides2209_02.h:60
ST7789V_PIN_CS
#define ST7789V_PIN_CS
Definition: config_a3ides2209_02.h:53
GPIO_MODE_INPUT
#define GPIO_MODE_INPUT
Definition: stm32f4xx_hal_gpio.h:135
render_icon_align
void render_icon_align(rect_ui16_t rc, uint16_t id_res, color_t clr0, uint16_t flags)
Definition: display_helper.c:55
ST7789V_PIN_RST
#define ST7789V_PIN_RST
Definition: config_a3ides2209_02.h:55
GPIO_SPEED_FREQ_LOW
#define GPIO_SPEED_FREQ_LOW
Definition: stm32f4xx_hal_gpio.h:158
st7789v_config
st7789v_config_t st7789v_config
Definition: st7789v.c:905