This commit is contained in:
nzasch
2025-06-28 00:58:29 +02:00
parent b9232f66b0
commit 28b7af65b6
123 changed files with 105128 additions and 104148 deletions

View File

@@ -1,20 +1,20 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32g4xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
******************************************************************************
* @file stm32g4xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
@@ -81,9 +81,8 @@ void NMI_Handler(void)
/* USER CODE END NonMaskableInt_IRQn 0 */
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
while (1)
{
}
while (1) {
}
/* USER CODE END NonMaskableInt_IRQn 1 */
}
@@ -274,11 +273,22 @@ void TIM2_IRQHandler(void)
/* USER CODE END TIM2_IRQn 0 */
HAL_TIM_IRQHandler(&htim2);
/* USER CODE BEGIN TIM2_IRQn 1 */
uint16_t adc_val;
adc_val = HAL_ADC_GetValue(&hadc1);
vu_value = vu_meter(adc_val);
TIM2->CCR1 = adc_val;
TIM2->CCR2 = adc_val;
uint16_t adc_val;
adc_val = HAL_ADC_GetValue(&hadc1);
if (blocco) {
#ifdef MODALITA_BLOCCO_PERMANENTE
TIM2->CCR1 = 0;
TIM2->CCR2 = 0;
#endif
#ifdef MODALITA_BLOCCO_BASSA_POTENZA
TIM2->CCR1 = adc_val >> DIVISORE_BLOCCO_BASSA_POTENZA;
TIM2->CCR2 = adc_val >> DIVISORE_BLOCCO_BASSA_POTENZA;
#endif
} else {
TIM2->CCR1 = adc_val;
TIM2->CCR2 = adc_val; // ???
}
ui_volume = vu_meter(adc_val);
/* USER CODE END TIM2_IRQn 1 */
}
@@ -292,7 +302,8 @@ void TIM3_IRQHandler(void)
/* USER CODE END TIM3_IRQn 0 */
HAL_TIM_IRQHandler(&htim3);
/* USER CODE BEGIN TIM3_IRQn 1 */
sys_tick = 1;
// base tempi
sys_tick = 1;
/* USER CODE END TIM3_IRQn 1 */
}