STM32L4xx_HAL_Driver  1.14.0
TIMEx Private Functions

Functions

void TIMEx_DMACommutationCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Commutation callback. More...
 
void TIMEx_DMACommutationHalfCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Commutation half complete callback. More...
 
static void TIM_CCxNChannelCmd (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelNState)
 Enables or disables the TIM Capture Compare Channel xN. More...
 

Detailed Description

Function Documentation

◆ TIM_CCxNChannelCmd()

static void TIM_CCxNChannelCmd ( TIM_TypeDef *  TIMx,
uint32_t  Channel,
uint32_t  ChannelNState 
)
static

Enables or disables the TIM Capture Compare Channel xN.

Parameters
TIMxto select the TIM peripheral
Channelspecifies the TIM Channel This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1
  • TIM_CHANNEL_2: TIM Channel 2
  • TIM_CHANNEL_3: TIM Channel 3
ChannelNStatespecifies the TIM Channel CCxNE bit new state. This parameter can be: TIM_CCxN_ENABLE or TIM_CCxN_Disable.
Return values
None

Definition at line 2348 of file stm32l4xx_hal_tim_ex.c.

2349 {
2350  uint32_t tmp;
2351 
2352  tmp = TIM_CCER_CC1NE << (Channel & 0x1FU); /* 0x1FU = 31 bits max shift */
2353 
2354  /* Reset the CCxNE Bit */
2355  TIMx->CCER &= ~tmp;
2356 
2357  /* Set or reset the CCxNE Bit */
2358  TIMx->CCER |= (uint32_t)(ChannelNState << (Channel & 0x1FU)); /* 0x1FU = 31 bits max shift */
2359 }

◆ TIMEx_DMACommutationCplt()

void TIMEx_DMACommutationCplt ( DMA_HandleTypeDef hdma)

TIM DMA Commutation callback.

Parameters
hdmapointer to DMA handle.
Return values
None

Definition at line 2302 of file stm32l4xx_hal_tim_ex.c.

2303 {
2304  TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
2305 
2306  /* Change the htim state */
2307  htim->State = HAL_TIM_STATE_READY;
2308 
2309 #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
2310  htim->CommutationCallback(htim);
2311 #else
2313 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
2314 }
DMA handle Structure definition.
void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim)
Hall commutation changed callback in non-blocking mode.
struct __TIM_HandleTypeDef else typedef struct endif TIM_HandleTypeDef
TIM Time Base Handle Structure definition.

◆ TIMEx_DMACommutationHalfCplt()

void TIMEx_DMACommutationHalfCplt ( DMA_HandleTypeDef hdma)

TIM DMA Commutation half complete callback.

Parameters
hdmapointer to DMA handle.
Return values
None

Definition at line 2321 of file stm32l4xx_hal_tim_ex.c.

2322 {
2323  TIM_HandleTypeDef *htim = (TIM_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
2324 
2325  /* Change the htim state */
2326  htim->State = HAL_TIM_STATE_READY;
2327 
2328 #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
2329  htim->CommutationHalfCpltCallback(htim);
2330 #else
2332 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
2333 }
DMA handle Structure definition.
void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim)
Hall commutation changed half complete callback in non-blocking mode.
struct __TIM_HandleTypeDef else typedef struct endif TIM_HandleTypeDef
TIM Time Base Handle Structure definition.