From af9845cbba36bab5f7577be6028c50a29ea8fd63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sun, 27 Sep 2020 23:23:44 +0200 Subject: [PATCH] Improve style --- stm-firmware/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stm-firmware/main.c b/stm-firmware/main.c index 93a95bd..aebd5cc 100644 --- a/stm-firmware/main.c +++ b/stm-firmware/main.c @@ -51,7 +51,9 @@ static void setup_nvic_priorities(void) /* Setup Priorities */ NVIC_SetPriority(ADC_IRQn, 2); + /* Measurement ADC DMA */ NVIC_SetPriority(DMA2_Stream0_IRQn, 1); + /* Shelmatta UART TX */ NVIC_SetPriority(DMA2_Stream7_IRQn, 3); } @@ -147,6 +149,7 @@ static void setup_unused_pins(void) 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) @@ -220,8 +223,8 @@ int main(void) menu_wait_request = reflow_menu_handle(); handle_shell_uart_input(shell_handle); - safety_controller_handle(); + /* Todo: Remove this */ oven_driver_set_power(0); oven_driver_apply_power_level(); @@ -241,6 +244,9 @@ void sdio_wait_ms(uint32_t ms) systick_wait_ms(ms); } +/** + * @brief Handles the TX of UART1 (Shellmatta) + */ void DMA2_Stream7_IRQHandler(void) { uint32_t hisr = DMA2->HISR;