From 61ac6e0d170af8a077c3c5710b19979186807f55 Mon Sep 17 00:00:00 2001 From: Yann Locatelli Date: Thu, 4 Jul 2024 14:44:55 +0200 Subject: [PATCH] Update CoreSTM32HalBasicTimer.cpp --- drivers/CoreDAC/source/CoreSTM32HalBasicTimer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/CoreDAC/source/CoreSTM32HalBasicTimer.cpp b/drivers/CoreDAC/source/CoreSTM32HalBasicTimer.cpp index bb54da1113..d8512ababb 100644 --- a/drivers/CoreDAC/source/CoreSTM32HalBasicTimer.cpp +++ b/drivers/CoreDAC/source/CoreSTM32HalBasicTimer.cpp @@ -39,7 +39,7 @@ void CoreSTM32HalBasicTimer::initialize(float frequency) timerMasterConfig.MasterOutputTrigger = TIM_TRGO_UPDATE; _hal.HAL_TIMEx_MasterConfigSynchronization(&_htim, &timerMasterConfig); - static const auto &self = *this; + static auto &self = (*this); _hal.HAL_TIM_RegisterCallback(&_htim, HAL_TIM_PERIOD_ELAPSED_CB_ID, []([[maybe_unused]] TIM_HandleTypeDef *htim) { if (self._callback != nullptr) { self._callback(); @@ -49,7 +49,7 @@ void CoreSTM32HalBasicTimer::initialize(float frequency) void CoreSTM32HalBasicTimer::_registerMspCallbacks() { - static const auto &self = *this; + static auto &self = (*this); _hal.HAL_TIM_RegisterCallback(&_htim, HAL_TIM_BASE_MSPINIT_CB_ID, []([[maybe_unused]] TIM_HandleTypeDef *htim) { self._hal.HAL_RCC_TIM6_CLK_ENABLE();