Use new gui module in main

This commit is contained in:
Mario Hüttel 2020-11-29 19:04:10 +01:00
parent b6d4a2e35e
commit 687c72bde7

View File

@ -40,7 +40,7 @@
#include <reflow-controller/shell-uart-config.h>
#include <reflow-controller/oven-driver.h>
#include <fatfs/ff.h>
#include <reflow-controller/reflow-menu.h>
#include <reflow-controller/ui/gui.h>
#include <reflow-controller/safety/safety-controller.h>
#include <reflow-controller/settings/settings.h>
@ -141,33 +141,17 @@ static bool mount_sd_card_if_avail(bool mounted)
return mounted;
}
static void setup_unused_pins(void)
{
int i;
rcc_manager_enable_clock(&RCC->AHB1ENR, BITMASK_TO_BITNO(RCC_AHB1ENR_GPIOEEN));
GPIOE->MODER = 0UL;
for (i = 0; i < 16; i++)
GPIOE->PUPDR |= PULLDOWN(i);
rcc_manager_disable_clock(&RCC->AHB1ENR, BITMASK_TO_BITNO(RCC_AHB1ENR_GPIOEEN));
}
static inline void setup_system(void)
{
setup_nvic_priorities();
systick_setup();
oven_driver_init();
digio_setup_default_all();
led_setup();
loudspeaker_setup();
reflow_menu_init();
gui_init();
uart_gpio_config();
setup_shell_uart(&shell_uart);
setup_unused_pins();
safety_controller_init();
adc_pt1000_setup_meas();
}
@ -220,7 +204,7 @@ int main(void)
quarter_sec_timestamp = systick_get_global_tick();
}
menu_wait_request = reflow_menu_handle();
menu_wait_request = gui_handle();
handle_shell_uart_input(shell_handle);
safety_controller_handle();