Skip to content

Commit

Permalink
Update CoreSTM32HalBasicTimer.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Jul 4, 2024
1 parent ee6f940 commit 61ac6e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/CoreDAC/source/CoreSTM32HalBasicTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 61ac6e0

Please sign in to comment.