Prusa MINI Firmware overview
menu_service.cpp File Reference
#include "sys.h"
#include "cmsis_os.h"
#include "../Marlin/src/lcd/menu/menu.h"

Functions

void menu_system_reset ()
 
void menu_pll_on ()
 
void menu_pll_off ()
 
void menu_sscg_on ()
 
void menu_sscg_off ()
 
void menu_set_spi_prescaler ()
 
void _menu_endless_loop ()
 
void menu_spi_test1 ()
 
void menu_spi_test2 ()
 
void menu_go_dfu ()
 
void menu_service ()
 

Variables

int16_t sscg_freq_kHz = 5
 
int16_t sscg_depth = 5
 
int16_t spi_prescaler = 0
 
int guimain_spi_test
 

Function Documentation

◆ menu_system_reset()

void menu_system_reset ( )
18  {
19  sys_reset();
20 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_pll_on()

void menu_pll_on ( )
22  {
24  ui.refresh();
25 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_pll_off()

void menu_pll_off ( )
27  {
29  ui.refresh();
30 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_sscg_on()

void menu_sscg_on ( )
32  {
35  ui.refresh();
36 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_sscg_off()

void menu_sscg_off ( )
38  {
40  ui.refresh();
41 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_set_spi_prescaler()

void menu_set_spi_prescaler ( )
43  {
45  ui.refresh();
46 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _menu_endless_loop()

void _menu_endless_loop ( )
48  {
49  while (1) {
50  #ifndef _DEBUG
51  HAL_IWDG_Refresh(&hiwdg); //watchdog reset
52  #endif //_DEBUG
53  osDelay(1);
54  }
55 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_spi_test1()

void menu_spi_test1 ( )
57  {
58  guimain_spi_test = 1;
60 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_spi_test2()

void menu_spi_test2 ( )
62  {
63  guimain_spi_test = 2;
65 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_go_dfu()

void menu_go_dfu ( )
67  {
68  sys_dfu_boot();
69 }
Here is the call graph for this function:

◆ menu_service()

void menu_service ( )
71  {
72  START_MENU();
73  MENU_BACK(MSG_MAIN);
74  if (sys_pll_is_enabled()) {
75  MENU_ITEM(function, "System reset", menu_system_reset);
76  MENU_ITEM(function, "PLL disable", menu_pll_off);
77  if (sys_sscg_is_enabled()) {
78  MENU_ITEM(function, "SSCG disable", menu_sscg_off);
79  MENU_ITEM_EDIT(int3, "SSCG freq kHz", &sscg_freq_kHz, sscg_freq_kHz, sscg_freq_kHz);
80  MENU_ITEM_EDIT(int3, "SSCG depth %", &sscg_depth, sscg_depth, sscg_depth);
81  } else {
82  MENU_ITEM(function, "SSCG enable", menu_sscg_on);
83  MENU_ITEM_EDIT(int3, "SSCG freq kHz", &sscg_freq_kHz, 5, 200);
84  MENU_ITEM_EDIT(int3, "SSCG depth %", &sscg_depth, 1, 20);
85  }
86  } else {
87  MENU_ITEM(function, "PLL enable", menu_pll_on);
88  }
89  MENU_ITEM_EDIT_CALLBACK(int3, "SPI prescaler", &spi_prescaler, 0, 7, menu_set_spi_prescaler);
90  MENU_ITEM(function, "SPI test1", menu_spi_test1);
91  MENU_ITEM(function, "SPI test2", menu_spi_test2);
92  // MENU_ITEM(function, "DFU bootloader", menu_go_dfu);
93  END_MENU();
94 }
Here is the call graph for this function:

Variable Documentation

◆ sscg_freq_kHz

int16_t sscg_freq_kHz = 5

◆ sscg_depth

int16_t sscg_depth = 5

◆ spi_prescaler

int16_t spi_prescaler = 0

◆ guimain_spi_test

int guimain_spi_test
menu_pll_on
void menu_pll_on()
Definition: menu_service.cpp:22
sscg_freq_kHz
int16_t sscg_freq_kHz
Definition: menu_service.cpp:11
sys_spi_set_prescaler
void sys_spi_set_prescaler(int prescaler_num)
Definition: sys.cpp:230
sys_reset
void sys_reset(void)
Definition: sys.cpp:20
_menu_endless_loop
void _menu_endless_loop()
Definition: menu_service.cpp:48
sys_pll_is_enabled
int sys_pll_is_enabled(void)
Definition: sys.cpp:48
osDelay
osStatus osDelay(uint32_t millisec)
Wait for Timeout (Time Delay)
Definition: cmsis_os.c:365
sys_dfu_boot
void sys_dfu_boot(void)
Definition: sys.cpp:31
sys_sscg_enable
void sys_sscg_enable(void)
Definition: sys.cpp:140
HAL_IWDG_Refresh
HAL_StatusTypeDef HAL_IWDG_Refresh(IWDG_HandleTypeDef *hiwdg)
sys_pll_enable
void sys_pll_enable(void)
Definition: sys.cpp:78
menu_spi_test1
void menu_spi_test1()
Definition: menu_service.cpp:57
guimain_spi_test
int guimain_spi_test
Definition: guimain.c:74
menu_sscg_off
void menu_sscg_off()
Definition: menu_service.cpp:38
spi_prescaler
int16_t spi_prescaler
Definition: menu_service.cpp:13
menu_system_reset
void menu_system_reset()
Definition: menu_service.cpp:18
menu_set_spi_prescaler
void menu_set_spi_prescaler()
Definition: menu_service.cpp:43
sys_sscg_set_config
void sys_sscg_set_config(int freq, int depth)
Definition: sys.cpp:159
sys_sscg_disable
void sys_sscg_disable(void)
Definition: sys.cpp:125
ui
MarlinUI ui
sys_pll_disable
void sys_pll_disable(void)
Definition: sys.cpp:57
sscg_depth
int16_t sscg_depth
Definition: menu_service.cpp:12
menu_pll_off
void menu_pll_off()
Definition: menu_service.cpp:27
hiwdg
IWDG_HandleTypeDef hiwdg
Definition: watchdog.h:24
menu_sscg_on
void menu_sscg_on()
Definition: menu_service.cpp:32
sys_sscg_is_enabled
int sys_sscg_is_enabled(void)
Definition: sys.cpp:121
menu_spi_test2
void menu_spi_test2()
Definition: menu_service.cpp:62