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 61ac6e0 commit af2d491
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions drivers/CoreDAC/source/CoreSTM32HalBasicTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ void CoreSTM32HalBasicTimer::_registerMspCallbacks()
{
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();
_hal.HAL_TIM_RegisterCallback(&_htim, HAL_TIM_BASE_MSPINIT_CB_ID, [_hal]([[maybe_unused]] TIM_HandleTypeDef *htim) {
_hal.HAL_RCC_TIM6_CLK_ENABLE();

self._hal.HAL_NVIC_SetPriority(TIM6_DAC_IRQn, 0x00, 0x00);
self._hal.HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
_hal.HAL_NVIC_SetPriority(TIM6_DAC_IRQn, 0x00, 0x00);
_hal.HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
});

_hal.HAL_TIM_RegisterCallback(&_htim, HAL_TIM_BASE_MSPDEINIT_CB_ID, []([[maybe_unused]] TIM_HandleTypeDef *htim) {
self._hal.HAL_RCC_TIM6_CLK_DISABLE();
});
_hal.HAL_TIM_RegisterCallback(&_htim, HAL_TIM_BASE_MSPDEINIT_CB_ID,
[]([[maybe_unused]] TIM_HandleTypeDef *htim) { _hal.HAL_RCC_TIM6_CLK_DISABLE(); });
}

void CoreSTM32HalBasicTimer::linkDACTimer(DAC_ChannelConfTypeDef *config)
Expand Down

0 comments on commit af2d491

Please sign in to comment.