Prusa MINI Firmware overview
lcdsim.h
Go to the documentation of this file.
1 // lcdsim.h
2 #ifndef _LCDSIM_H
3 #define _LCDSIM_H
4 
5 #include <inttypes.h>
6 #include "config.h"
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif //__cplusplus
11 
12 #ifdef LCDSIM
13 extern uint32_t lcdsim_inval_mask[LCDSIM_ROWS];
14 #endif
15 
16 extern void lcdsim_init(void);
17 
18 extern void lcdsim_invalidate(void);
19 
20 extern uint8_t lcdsim_char_at(uint8_t col, uint8_t row);
21 
22 extern uint8_t *lcdsim_user_charset_ptr(void);
23 
24 extern uint16_t lcdsim_grab_text(char *text);
25 
26 #ifdef __cplusplus
27 }
28 #endif //__cplusplus
29 
30 #endif // _LCDSIM_H
RENDER_FLG
#define RENDER_FLG(a, r)
Definition: display_helper.h:10
LCD_CMD_DISPLAYCONTROL
#define LCD_CMD_DISPLAYCONTROL
Definition: lcdsim.c:12
LCD_FLG_BLINKON
#define LCD_FLG_BLINKON
Definition: lcdsim.c:25
pscreen_test_msgbox
screen_t * pscreen_test_msgbox
Definition: screen_test_msgbox.c:147
pscreen_test_term
screen_t * pscreen_test_term
Definition: screen_test_term.c:78
lcdsim.h
screen_menu_fw_update.h
window_register_class
int16_t window_register_class(window_class_t *cls)
Definition: window.c:90
lcdsim_blinkOn
int lcdsim_blinkOn
Definition: lcdsim.c:53
jogwheel_config
jogwheel_config_t jogwheel_config
Definition: jogwheel.c:95
WINDOW_CLS_DLG_LOADUNLOAD
int16_t WINDOW_CLS_DLG_LOADUNLOAD
Definition: window_dlg_statemachine.c:37
LCD_CMD_RETURNHOME
#define LCD_CMD_RETURNHOME
Definition: lcdsim.c:10
window_msgbox_id_icon
uint16_t window_msgbox_id_icon[5]
Definition: window_msgbox.c:62
pscreen_lan_settings
screen_t *const pscreen_lan_settings
Definition: screen_lan_settings.c:294
gui_loop_cb
gui_loop_cb_t * gui_loop_cb
Definition: gui.c:32
lcdsim_cmd_setDDRamAddr
void lcdsim_cmd_setDDRamAddr(int8_t addr)
Definition: lcdsim.c:110
MARLIN_EVT_SafetyTimerExpired
#define MARLIN_EVT_SafetyTimerExpired
Definition: marlin_events.h:35
_font_t
Definition: guitypes.h:76
lcdsim_func2line
int lcdsim_func2line
Definition: lcdsim.c:49
LCD_FLG_ENTRYSHIFTINC
#define LCD_FLG_ENTRYSHIFTINC
Definition: lcdsim.c:27
marlin_client.h
WINDOW_CLS_LCDSIM
int16_t WINDOW_CLS_LCDSIM
Definition: window_lcdsim.c:6
COLOR_WHITE
#define COLOR_WHITE
Definition: guitypes.h:41
jogwheel_changed
uint8_t jogwheel_changed
Definition: jogwheel.c:14
sys_reset
void sys_reset(void)
Definition: sys.cpp:20
update_firmware_screen
void update_firmware_screen(void)
Definition: guimain.c:247
PE12
#define PE12
Definition: variant.h:112
__SPI_HandleTypeDef
SPI handle Structure definition.
Definition: stm32f4xx_hal_spi.h:120
_jogwheel_config_t
Definition: jogwheel.h:20
gui_init
void gui_init(void)
Definition: gui.c:43
lcdsim_char_at
uint8_t lcdsim_char_at(uint8_t col, uint8_t row)
Definition: lcdsim.c:85
marlin_message_received
uint8_t marlin_message_received(void)
Definition: marlin_client.c:507
guimain_spi_test
int guimain_spi_test
Definition: guimain.c:74
lcdsim_invalidate
void lcdsim_invalidate(void)
Definition: lcdsim.c:79
window_temp_graph.h
window_class_dlg_preheat
const window_class_dlg_preheat_t window_class_dlg_preheat
Definition: window_dlg_preheat.c:114
pscreen_menu_calibration
screen_t * pscreen_menu_calibration
Definition: screen_menu_calibration.c:101
IWDG_HandleTypeDef
IWDG Handle Structure definition.
Definition: stm32f4xx_hal_iwdg.h:76
lcdsim_grab_text
uint16_t lcdsim_grab_text(char *text)
Definition: lcdsim.c:93
_st7789v_config_t
Definition: st7789v.h:19
diag.h
screen_register
int16_t screen_register(screen_t *pscreen)
Definition: screen.c:24
ALIGN_CENTER
#define ALIGN_CENTER
Definition: guitypes.h:19
window_class_dlg_popup
const window_class_dlg_popup_t window_class_dlg_popup
Definition: window_dlg_popup.c:51
rect_ui16
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
window_dlg_preheat.h
LCD_FLG_FUNC8BIT
#define LCD_FLG_FUNC8BIT
Definition: lcdsim.c:18
_gui_defaults_t::font
font_t * font
Definition: guitypes.h:110
lcdsim_addr2col
static uint8_t lcdsim_addr2col(uint8_t addr)
Definition: lcdsim.c:63
lcdsim_cmd_returnHome
void lcdsim_cmd_returnHome(void)
Definition: lcdsim.c:147
jogwheel_cfg
const jogwheel_config_t jogwheel_cfg
Definition: guimain.c:95
data
uint8_t data[8]
Definition: masstorage.h:49
LCD_DDRAM_SIZE
#define LCD_DDRAM_SIZE
Definition: lcdsim.c:6
LCD_FLG_ENTRYLEFT
#define LCD_FLG_ENTRYLEFT
Definition: lcdsim.c:26
padding_ui8
static padding_ui8_t padding_ui8(uint8_t l, uint8_t t, uint8_t r, uint8_t b)
Definition: guitypes.h:164
LCD_CMD_ENTRYMODESET
#define LCD_CMD_ENTRYMODESET
Definition: lcdsim.c:11
IDR_FNT_NORMAL
#define IDR_FNT_NORMAL
Definition: resource.h:10
i
uint8_t i
Definition: screen_test_graph.c:72
lcdsim_expander
uint8_t lcdsim_expander
Definition: lcdsim.c:34
WINDOW_CLS_DLG_PREHEAT
int16_t WINDOW_CLS_DLG_PREHEAT
Definition: window_dlg_preheat.c:22
MSGBOX_ICO_WARNING
#define MSGBOX_ICO_WARNING
Definition: window_msgbox.h:35
lcdsim_ddram
uint8_t lcdsim_ddram[LCD_DDRAM_SIZE]
Definition: lcdsim.c:36
window_dlg_popup.h
IDR_FNT_SPECIAL
#define IDR_FNT_SPECIAL
Definition: resource.h:13
window_file_list.h
pscreen_menu_service
screen_t * pscreen_menu_service
Definition: screen_menu_service.c:147
pscreen_filebrowser
screen_t * pscreen_filebrowser
Definition: screen_filebrowser.cpp:177
MARLIN_CMD_M600
#define MARLIN_CMD_M600
Definition: marlin_events.h:57
IDR_PNG_icon_pepa
#define IDR_PNG_icon_pepa
Definition: resource.h:44
LCD_CMD_CLEARDISPLAY
#define LCD_CMD_CLEARDISPLAY
Definition: lcdsim.c:9
_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
diag_fastboot
int diag_fastboot
Definition: diag.c:11
screen_open
void screen_open(int16_t screen_id)
Definition: screen.c:62
dbg.h
pscreen_menu_preheat
screen_t * pscreen_menu_preheat
Definition: screen_menu_preheat.cpp:93
marlin_client_loop
void marlin_client_loop(void)
Definition: marlin_client.c:118
gui_run
void gui_run(void)
Definition: guimain.c:107
lcdsim_entryShiftInc
int lcdsim_entryShiftInc
Definition: lcdsim.c:55
window_header.h
NULL
#define NULL
Definition: usbd_def.h:53
lcdsim_cmd_setCGRamAddr
void lcdsim_cmd_setCGRamAddr(int8_t addr)
Definition: lcdsim.c:115
F
#define F(str)
Definition: UHS_macros.h:164
WINDOW_CLS_LOGO
int16_t WINDOW_CLS_LOGO
Definition: window_logo.c:11
lcdsim_user_charset_ptr
uint8_t * lcdsim_user_charset_ptr(void)
Definition: lcdsim.c:89
LCD_FLG_SHIFTDISPLAY
#define LCD_FLG_SHIFTDISPLAY
Definition: lcdsim.c:21
pscreen_marlin
const screen_t * pscreen_marlin
Definition: screen_marlin.c:33
pscreen_menu_filament
screen_t * pscreen_menu_filament
Definition: screen_menu_filament.c:124
screen_get_curr
screen_t * screen_get_curr(void)
Definition: screen.c:114
window_class_dlg_wait
const window_class_dlg_wait_t window_class_dlg_wait
Definition: window_dlg_wait.c:128
MSGBOX_BTN_OK
#define MSGBOX_BTN_OK
Definition: window_msgbox.h:20
lcdsim_inval_mask
uint32_t lcdsim_inval_mask[LCDSIM_ROWS]
Definition: lcdsim.c:40
window_class_file_list
const window_class_file_list_t window_class_file_list
Definition: window_file_list.c:250
GPIO_PULLUP
#define GPIO_PULLUP
Definition: stm32f4xx_hal_gpio.h:171
WINDOW_CLS_DLG_WAIT
int16_t WINDOW_CLS_DLG_WAIT
Definition: window_dlg_wait.c:25
osDelay
osStatus osDelay(uint32_t millisec)
Wait for Timeout (Time Delay)
Definition: cmsis_os.c:365
marlin_host.h
_display_t::fill_rect
display_fill_rect_t * fill_rect
Definition: display.h:33
gui_dlg_change
dlg_result_t gui_dlg_change(void)
Definition: window_dlg_change.c:35
screen_close
void screen_close(void)
Definition: screen.c:80
lcdsim_invalidate
void lcdsim_invalidate(void)
Definition: lcdsim.c:79
gpio_get
static int gpio_get(uint8_t pin8)
Definition: gpio.h:94
lcdsim_cmd_displayControl
void lcdsim_cmd_displayControl(int displayOn, int cursorOn, int blinkOn)
Definition: lcdsim.c:136
IDR_PNG_header_icon_question
#define IDR_PNG_header_icon_question
Definition: resource.h:69
lcdsim_expander_write
void lcdsim_expander_write(uint8_t expander)
Definition: lcdsim.c:204
pscreen_wizard
screen_t * pscreen_wizard
Definition: screen_wizard.c:559
pscreen_splash
screen_t * pscreen_splash
Definition: screen_splash.c:144
window_class_temp_graph
const window_class_temp_graph_t window_class_temp_graph
Definition: window_temp_graph.c:132
HAL_IWDG_Refresh
HAL_StatusTypeDef HAL_IWDG_Refresh(IWDG_HandleTypeDef *hiwdg)
lcdsim_ddram_addr
int8_t lcdsim_ddram_addr
Definition: lcdsim.c:38
st7789v_cfg
const st7789v_config_t st7789v_cfg
Definition: guimain.c:85
lcdsim_func8bit
int lcdsim_func8bit
Definition: lcdsim.c:48
lcdsim_cmd_functionSet
void lcdsim_cmd_functionSet(int func8bit, int func2line, int func10dots)
Definition: lcdsim.c:119
pscreen_mesh_bed_lv
screen_t * pscreen_mesh_bed_lv
Definition: screen_mesh_bed_lv.cpp:228
COLOR_ORANGE
#define COLOR_ORANGE
Definition: guitypes.h:57
lcdsim_wr_data
void lcdsim_wr_data(uint8_t data)
Definition: lcdsim.c:184
marlin_client_init
marlin_vars_t * marlin_client_init(void)
Definition: marlin_client.c:84
pscreen_printing
screen_t * pscreen_printing
Definition: screen_printing.cpp:161
pscreen_menu_info
screen_t * pscreen_menu_info
Definition: screen_menu_info.c:66
LCD_CMD_CURSORSHIFT
#define LCD_CMD_CURSORSHIFT
Definition: lcdsim.c:13
LCD_FLG_SHIFTRIGHT
#define LCD_FLG_SHIFTRIGHT
Definition: lcdsim.c:22
LCD_EXPANDER_RS
#define LCD_EXPANDER_RS
Definition: lcdsim.c:29
gpio_init
static void gpio_init(uint8_t pin8, uint32_t mode, uint32_t pull, uint32_t speed)
Definition: gpio.h:102
pscreen_menu_move
screen_t * pscreen_menu_move
Definition: screen_menu_move.c:85
lcdsim_cgram_addr
int8_t lcdsim_cgram_addr
Definition: lcdsim.c:39
sys_fw_is_valid
int sys_fw_is_valid(void)
Definition: sys.cpp:266
LCD_CGRAM_SIZE
#define LCD_CGRAM_SIZE
Definition: lcdsim.c:7
pscreen_test_temperature
screen_t * pscreen_test_temperature
Definition: screen_test_temperature.cpp:109
JOGWHEEL_PIN_EN1
#define JOGWHEEL_PIN_EN1
Definition: config_a3ides2209_02.h:59
MARLIN_EVT_CommandBegin
#define MARLIN_EVT_CommandBegin
Definition: marlin_events.h:33
window_lcdsim.h
JOGWHEEL_PIN_ENC
#define JOGWHEEL_PIN_ENC
Definition: config_a3ides2209_02.h:61
hspi2
SPI_HandleTypeDef hspi2
Definition: main.c:81
lcdsim_char_at
uint8_t lcdsim_char_at(uint8_t col, uint8_t row)
Definition: lcdsim.c:85
IDR_PNG_header_icon_error
#define IDR_PNG_header_icon_error
Definition: resource.h:67
lcdsim_entryLeft
int lcdsim_entryLeft
Definition: lcdsim.c:54
JOGWHEEL_DEF_FLG
#define JOGWHEEL_DEF_FLG
Definition: jogwheel.h:15
lcdsim_cmd_cursorShift
void lcdsim_cmd_cursorShift(int shiftDisplay, int shiftRight)
Definition: lcdsim.c:125
screen_stack_push
void screen_stack_push(int16_t screen_id)
Definition: screen.c:48
_jogwheel_config_t::flg
uint8_t flg
Definition: jogwheel.h:24
jogwheel_button_down
uint16_t jogwheel_button_down
Definition: jogwheel.c:13
lcdsim_shift
int8_t lcdsim_shift
Definition: lcdsim.c:46
lcdsim_init
void lcdsim_init(void)
Definition: lcdsim.c:71
lcdsim_user_charset_ptr
uint8_t * lcdsim_user_charset_ptr(void)
Definition: lcdsim.c:89
window_dlg_change.h
pscreen_menu_fw_update
screen_t *const pscreen_menu_fw_update
Definition: screen_menu_fw_update.c:75
HAL_IWDG_Reset
int HAL_IWDG_Reset
Definition: main.c:103
hiwdg
IWDG_HandleTypeDef hiwdg
Definition: watchdog.h:24
window_class_logo
const window_class_logo_t window_class_logo
Definition: window_logo.c:51
JOGWHEEL_FLG_INV_DIR
#define JOGWHEEL_FLG_INV_DIR
Definition: jogwheel.h:8
lcdsim_func10dots
int lcdsim_func10dots
Definition: lcdsim.c:50
WINDOW_CLS_DLG_POPUP
int16_t WINDOW_CLS_DLG_POPUP
Definition: window_dlg_popup.c:16
st7789v.h
lcdsim_cgram
uint8_t lcdsim_cgram[LCD_CGRAM_SIZE]
Definition: lcdsim.c:37
gui_marlin_vars
marlin_vars_t * gui_marlin_vars
Definition: guimain.c:102
LCD_CMD_FUNCTIONSET
#define LCD_CMD_FUNCTIONSET
Definition: lcdsim.c:14
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
IDR_PNG_header_icon_info
#define IDR_PNG_header_icon_info
Definition: resource.h:66
pscreen_test_gui
screen_t * pscreen_test_gui
Definition: screen_test_gui.c:131
LCD_CMD_SETDDRAMADDR
#define LCD_CMD_SETDDRAMADDR
Definition: lcdsim.c:16
uint8_t
const uint8_t[]
Definition: 404_html.c:3
_window_class_t
Definition: window.h:67
IDR_FNT_BIG
#define IDR_FNT_BIG
Definition: resource.h:11
_dbg
#define _dbg(...)
Definition: dbg.h:50
lcdsim_addr2row
static uint8_t lcdsim_addr2row(uint8_t addr)
Definition: lcdsim.c:59
lcdsim_cursorOn
int lcdsim_cursorOn
Definition: lcdsim.c:52
IDR_PNG_header_icon_warning
#define IDR_PNG_header_icon_warning
Definition: resource.h:68
display
display_t * display
Definition: display.c:6
_screen_t
Definition: screen.h:18
LCD_FLG_FUNC2LINE
#define LCD_FLG_FUNC2LINE
Definition: lcdsim.c:19
pscreen_menu_settings
screen_t * pscreen_menu_settings
Definition: screen_menu_settings.c:133
LCD_FLG_DISPLAYON
#define LCD_FLG_DISPLAYON
Definition: lcdsim.c:23
pscreen_test_graph
screen_t * pscreen_test_graph
Definition: screen_test_graph.c:111
marlin_command
uint32_t marlin_command(void)
Definition: marlin_client.c:159
window_logo.h
pscreen_home
screen_t * pscreen_home
Definition: screen_home.cpp:278
window_class_header
const window_class_header_t window_class_header
Definition: window_header.c:183
resource_font
font_t * resource_font(uint16_t id)
Definition: guitypes.c:186
jogwheel.h
WINDOW_CLS_FILE_LIST
int16_t WINDOW_CLS_FILE_LIST
Definition: window_file_list.c:24
ST7789V_DEF_COLMOD
#define ST7789V_DEF_COLMOD
Definition: st7789v.h:13
gui_get_menu_timeout_id
int8_t gui_get_menu_timeout_id(void)
Definition: gui_timer.c:147
screen_print_preview.h
ST7789V_FLG_DMA
#define ST7789V_FLG_DMA
Definition: st7789v.h:9
stm32f4xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
ST7789V_PIN_RS
#define ST7789V_PIN_RS
Definition: config_a3ides2209_02.h:54
COLOR_BLACK
#define COLOR_BLACK
Definition: guitypes.h:40
_screen_t::id
int16_t id
Definition: screen.h:19
window_class_dlg_statemachine
const window_class_dlg_statemachine_t window_class_dlg_statemachine
Definition: window_dlg_statemachine.c:246
JOGWHEEL_PIN_EN2
#define JOGWHEEL_PIN_EN2
Definition: config_a3ides2209_02.h:60
_marlin_vars_t
Definition: marlin_vars.h:77
WINDOW_EVENT_MESSAGE
#define WINDOW_EVENT_MESSAGE
Definition: window.h:51
lcdsim_cmd_clearDisplay
void lcdsim_cmd_clearDisplay(void)
Definition: lcdsim.c:153
window_dlg_wait.h
pscreen_test
screen_t * pscreen_test
Definition: screen_test.c:157
LCD_CMD_SETCGRAMADDR
#define LCD_CMD_SETCGRAMADDR
Definition: lcdsim.c:15
lcdsim_init
void lcdsim_init(void)
Definition: lcdsim.c:71
pscreen_preheating
screen_t * pscreen_preheating
config.h
WINDOW_CLS_HEADER
int16_t WINDOW_CLS_HEADER
Definition: window_header.c:24
ST7789V_PIN_CS
#define ST7789V_PIN_CS
Definition: config_a3ides2209_02.h:53
_gui_defaults_t::font_big
font_t * font_big
Definition: guitypes.h:111
hwio_a3ides.h
gui.h
lcdsim_pos2addr
static uint8_t lcdsim_pos2addr(uint8_t col, uint8_t row)
Definition: lcdsim.c:67
gui_defaults
gui_defaults_t gui_defaults
Definition: gui.c:20
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
lcdsim_wr_cmd
void lcdsim_wr_cmd(uint8_t cmd)
Definition: lcdsim.c:165
st7789v_reset_delay
uint16_t st7789v_reset_delay
Definition: st7789v.c:920
hwio_beeper_tone2
void hwio_beeper_tone2(float frq, uint32_t del, float vol)
Definition: hwio_a3ides_2209_02.c:530
LCD_FLG_FUNC10DOTS
#define LCD_FLG_FUNC10DOTS
Definition: lcdsim.c:20
window_dlg_statemachine.h
pscreen_sysinfo
screen_t * pscreen_sysinfo
Definition: screen_sysinf.c:123
lcdsim_displayOn
int lcdsim_displayOn
Definition: lcdsim.c:51
LCD_EXPANDER_EN
#define LCD_EXPANDER_EN
Definition: lcdsim.c:31
screen_dispatch_event
void screen_dispatch_event(window_t *window, uint8_t event, void *param)
Definition: screen.c:103
gui_timer_expired
int8_t gui_timer_expired(int8_t id)
Definition: gui_timer.c:139
ST7789V_PIN_RST
#define ST7789V_PIN_RST
Definition: config_a3ides2209_02.h:55
menu_timeout_enabled
int8_t menu_timeout_enabled
Definition: guimain.c:103
pscreen_menu_tune
screen_t * pscreen_menu_tune
Definition: screen_menu_tune.cpp:203
pscreen_print_preview
screen_t *const pscreen_print_preview
Definition: screen_print_preview.c:77
screen_lan_settings.h
pscreen_watchdog
screen_t * pscreen_watchdog
Definition: screen_watchdog.c:78
gui_timer_delete
void gui_timer_delete(int8_t id)
Definition: gui_timer.c:79
lcdsim_grab_text
uint16_t lcdsim_grab_text(char *text)
Definition: lcdsim.c:93
WINDOW_CLS_TEMP_GRAPH
int16_t WINDOW_CLS_TEMP_GRAPH
Definition: window_temp_graph.c:8
pscreen_menu_temperature
screen_t * pscreen_menu_temperature
Definition: screen_menu_temperature.c:76
pscreen_messages
screen_t * pscreen_messages
Definition: screen_messages.c:122
pscreen_version_info
screen_t * pscreen_version_info
Definition: screen_version_info.cpp:109
window_class_lcdsim
const window_class_lcdsim_t window_class_lcdsim
Definition: window_lcdsim.c:58
GPIO_SPEED_FREQ_LOW
#define GPIO_SPEED_FREQ_LOW
Definition: stm32f4xx_hal_gpio.h:158
marlin_event_clr
int marlin_event_clr(uint8_t evt_id)
Definition: marlin_client.c:252
st7789v_config
st7789v_config_t st7789v_config
Definition: st7789v.c:905
lcdsim_cmd_entryModeSet
void lcdsim_cmd_entryModeSet(int entryLeft, int entryShiftInc)
Definition: lcdsim.c:142
pscreen_test_disp_mem
screen_t * pscreen_test_disp_mem
Definition: screen_test_disp_mem.c:629