13#if defined(STM32) && defined(HAL_TIM_MODULE_ENABLED)
14#ifndef SEMF_TIMER_USE_CUSTOM_CALLBACK
23LinkedQueue<Stm32Timer> Stm32Timer::m_queue;
25: m_hwHandle(&hwHandle)
32 auto errorCode = HAL_TIM_Base_Start_IT(m_hwHandle);
33 if (errorCode != HAL_OK)
35 if (errorCode == HAL_ERROR)
40 else if (errorCode == HAL_BUSY)
45 else if (errorCode == HAL_TIMEOUT)
56 auto errorCode = HAL_TIM_Base_Stop_IT(m_hwHandle);
57 if (errorCode != HAL_OK)
59 if (errorCode == HAL_ERROR)
64 else if (errorCode == HAL_BUSY)
69 else if (errorCode == HAL_TIMEOUT)
80 m_hwHandle->Instance->CNT = m_hwHandle->Instance->ARR;
97 if (&hwHandle == m_hwHandle)
Class for representing errors. Every error should have a unique source code. As a user feel encourage...
LinkedQueue is an managed single linked queue implementation.
Timer implementation for STM32 as peripheral timer.
Stm32Timer(TIM_HandleTypeDef &hwHandle)
Constructor.
void isr(TIM_HandleTypeDef &hwHandle)
Interrupt service routine for adc conversion finished.
static void systemIsr(TIM_HandleTypeDef &hwHandle)
System-wide interrupt service routine for adc conversion finished.
static LinkedQueue< Stm32Timer > * queue()
Get the list with all timers.
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)