Skip to content

Commit 61ac6e0

Browse files
committed
Update CoreSTM32HalBasicTimer.cpp
1 parent ee6f940 commit 61ac6e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/CoreDAC/source/CoreSTM32HalBasicTimer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void CoreSTM32HalBasicTimer::initialize(float frequency)
3939
timerMasterConfig.MasterOutputTrigger = TIM_TRGO_UPDATE;
4040
_hal.HAL_TIMEx_MasterConfigSynchronization(&_htim, &timerMasterConfig);
4141

42-
static const auto &self = *this;
42+
static auto &self = (*this);
4343
_hal.HAL_TIM_RegisterCallback(&_htim, HAL_TIM_PERIOD_ELAPSED_CB_ID, []([[maybe_unused]] TIM_HandleTypeDef *htim) {
4444
if (self._callback != nullptr) {
4545
self._callback();
@@ -49,7 +49,7 @@ void CoreSTM32HalBasicTimer::initialize(float frequency)
4949

5050
void CoreSTM32HalBasicTimer::_registerMspCallbacks()
5151
{
52-
static const auto &self = *this;
52+
static auto &self = (*this);
5353

5454
_hal.HAL_TIM_RegisterCallback(&_htim, HAL_TIM_BASE_MSPINIT_CB_ID, []([[maybe_unused]] TIM_HandleTypeDef *htim) {
5555
self._hal.HAL_RCC_TIM6_CLK_ENABLE();

0 commit comments

Comments
 (0)