RTEMS 6.1-rc4
|
Macros | |
#define | __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) |
Reset TIM handle state. | |
#define | __HAL_TIM_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1|=(TIM_CR1_CEN)) |
Enable the TIM peripheral. | |
#define | __HAL_TIM_MOE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->BDTR|=(TIM_BDTR_MOE)) |
Enable the TIM main Output. | |
#define | __HAL_TIM_DISABLE(__HANDLE__) |
Disable the TIM peripheral. | |
#define | __HAL_TIM_MOE_DISABLE(__HANDLE__) |
Disable the TIM main Output. | |
#define | __HAL_TIM_MOE_DISABLE_UNCONDITIONALLY(__HANDLE__) (__HANDLE__)->Instance->BDTR &= ~(TIM_BDTR_MOE) |
Disable the TIM main Output. | |
#define | __HAL_TIM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DIER |= (__INTERRUPT__)) |
Enable the specified TIM interrupt. | |
#define | __HAL_TIM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DIER &= ~(__INTERRUPT__)) |
Disable the specified TIM interrupt. | |
#define | __HAL_TIM_ENABLE_DMA(__HANDLE__, __DMA__) ((__HANDLE__)->Instance->DIER |= (__DMA__)) |
Enable the specified DMA request. | |
#define | __HAL_TIM_DISABLE_DMA(__HANDLE__, __DMA__) ((__HANDLE__)->Instance->DIER &= ~(__DMA__)) |
Disable the specified DMA request. | |
#define | __HAL_TIM_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR &(__FLAG__)) == (__FLAG__)) |
Check whether the specified TIM interrupt flag is set or not. | |
#define | __HAL_TIM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
Clear the specified TIM interrupt flag. | |
#define | __HAL_TIM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) |
Check whether the specified TIM interrupt source is enabled or not. | |
#define | __HAL_TIM_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->SR = ~(__INTERRUPT__)) |
Clear the TIM interrupt pending bits. | |
#define | __HAL_TIM_UIFREMAP_ENABLE(__HANDLE__) (((__HANDLE__)->Instance->CR1 |= TIM_CR1_UIFREMAP)) |
#define | __HAL_TIM_UIFREMAP_DISABLE(__HANDLE__) (((__HANDLE__)->Instance->CR1 &= ~TIM_CR1_UIFREMAP)) |
#define | __HAL_TIM_GET_UIFCPY(__COUNTER__) (((__COUNTER__) & (TIM_CNT_UIFCPY)) == (TIM_CNT_UIFCPY)) |
#define | __HAL_TIM_IS_TIM_COUNTING_DOWN(__HANDLE__) (((__HANDLE__)->Instance->CR1 &(TIM_CR1_DIR)) == (TIM_CR1_DIR)) |
Indicates whether or not the TIM Counter is used as downcounter. | |
#define | __HAL_TIM_SET_PRESCALER(__HANDLE__, __PRESC__) ((__HANDLE__)->Instance->PSC = (__PRESC__)) |
Set the TIM Prescaler on runtime. | |
#define | __HAL_TIM_SET_COUNTER(__HANDLE__, __COUNTER__) ((__HANDLE__)->Instance->CNT = (__COUNTER__)) |
Set the TIM Counter Register value on runtime. Note Please check if the bit 31 of CNT register is used as UIF copy or not, this may affect the counter range in case of 32 bits counter TIM instance. Bit 31 of CNT can be enabled/disabled using __HAL_TIM_UIFREMAP_ENABLE()/__HAL_TIM_UIFREMAP_DISABLE() macros. | |
#define | __HAL_TIM_GET_COUNTER(__HANDLE__) ((__HANDLE__)->Instance->CNT) |
Get the TIM Counter Register value on runtime. | |
#define | __HAL_TIM_SET_AUTORELOAD(__HANDLE__, __AUTORELOAD__) |
Set the TIM Autoreload Register value on runtime without calling another time any Init function. | |
#define | __HAL_TIM_GET_AUTORELOAD(__HANDLE__) ((__HANDLE__)->Instance->ARR) |
Get the TIM Autoreload Register value on runtime. | |
#define | __HAL_TIM_SET_CLOCKDIVISION(__HANDLE__, __CKD__) |
Set the TIM Clock Division value on runtime without calling another time any Init function. | |
#define | __HAL_TIM_GET_CLOCKDIVISION(__HANDLE__) ((__HANDLE__)->Instance->CR1 & TIM_CR1_CKD) |
Get the TIM Clock Division value on runtime. | |
#define | __HAL_TIM_SET_ICPRESCALER(__HANDLE__, __CHANNEL__, __ICPSC__) |
Set the TIM Input Capture prescaler on runtime without calling another time HAL_TIM_IC_ConfigChannel() function. | |
#define | __HAL_TIM_GET_ICPRESCALER(__HANDLE__, __CHANNEL__) |
Get the TIM Input Capture prescaler on runtime. | |
#define | __HAL_TIM_SET_COMPARE(__HANDLE__, __CHANNEL__, __COMPARE__) |
Set the TIM Capture Compare Register value on runtime without calling another time ConfigChannel function. | |
#define | __HAL_TIM_GET_COMPARE(__HANDLE__, __CHANNEL__) |
Get the TIM Capture Compare Register value on runtime. | |
#define | __HAL_TIM_ENABLE_OCxPRELOAD(__HANDLE__, __CHANNEL__) |
Set the TIM Output compare preload. | |
#define | __HAL_TIM_DISABLE_OCxPRELOAD(__HANDLE__, __CHANNEL__) |
Reset the TIM Output compare preload. | |
#define | __HAL_TIM_ENABLE_OCxFAST(__HANDLE__, __CHANNEL__) |
Enable fast mode for a given channel. | |
#define | __HAL_TIM_DISABLE_OCxFAST(__HANDLE__, __CHANNEL__) |
Disable fast mode for a given channel. | |
#define | __HAL_TIM_URS_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1|= TIM_CR1_URS) |
Set the Update Request Source (URS) bit of the TIMx_CR1 register. | |
#define | __HAL_TIM_URS_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1&=~TIM_CR1_URS) |
Reset the Update Request Source (URS) bit of the TIMx_CR1 register. | |
#define | __HAL_TIM_SET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__, __POLARITY__) |
Set the TIM Capture x input polarity on runtime. | |
#define | __HAL_TIM_SELECT_CCDMAREQUEST(__HANDLE__, __CCDMA__) MODIFY_REG((__HANDLE__)->Instance->CR2, TIM_CR2_CCDS, (__CCDMA__)) |
Select the Capture/compare DMA request source. | |
#define __HAL_TIM_CLEAR_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
Clear the specified TIM interrupt flag.
__HANDLE__ | specifies the TIM Handle. |
__FLAG__ | specifies the TIM interrupt flag to clear. This parameter can be one of the following values:
|
The | new state of FLAG (TRUE or FALSE). |
#define __HAL_TIM_CLEAR_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->SR = ~(__INTERRUPT__)) |
Clear the TIM interrupt pending bits.
__HANDLE__ | TIM handle |
__INTERRUPT__ | specifies the interrupt pending bit to clear. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_DISABLE | ( | __HANDLE__ | ) |
Disable the TIM peripheral.
__HANDLE__ | TIM handle |
None |
#define __HAL_TIM_DISABLE_DMA | ( | __HANDLE__, | |
__DMA__ | |||
) | ((__HANDLE__)->Instance->DIER &= ~(__DMA__)) |
Disable the specified DMA request.
__HANDLE__ | specifies the TIM Handle. |
__DMA__ | specifies the TIM DMA request to disable. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_DISABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->DIER &= ~(__INTERRUPT__)) |
Disable the specified TIM interrupt.
__HANDLE__ | specifies the TIM Handle. |
__INTERRUPT__ | specifies the TIM interrupt source to disable. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_DISABLE_OCxFAST | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
Disable fast mode for a given channel.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channels to be configured. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_DISABLE_OCxPRELOAD | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
Reset the TIM Output compare preload.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channels to be configured. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1|=(TIM_CR1_CEN)) |
Enable the TIM peripheral.
__HANDLE__ | TIM handle |
None |
#define __HAL_TIM_ENABLE_DMA | ( | __HANDLE__, | |
__DMA__ | |||
) | ((__HANDLE__)->Instance->DIER |= (__DMA__)) |
Enable the specified DMA request.
__HANDLE__ | specifies the TIM Handle. |
__DMA__ | specifies the TIM DMA request to enable. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->DIER |= (__INTERRUPT__)) |
Enable the specified TIM interrupt.
__HANDLE__ | specifies the TIM Handle. |
__INTERRUPT__ | specifies the TIM interrupt source to enable. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_ENABLE_OCxFAST | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
Enable fast mode for a given channel.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channels to be configured. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_ENABLE_OCxPRELOAD | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
Set the TIM Output compare preload.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channels to be configured. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_GET_AUTORELOAD | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->ARR) |
Get the TIM Autoreload Register value on runtime.
__HANDLE__ | TIM handle. |
16-bit | or 32-bit value of the timer auto-reload register(TIMx_ARR) |
#define __HAL_TIM_GET_CLOCKDIVISION | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1 & TIM_CR1_CKD) |
Get the TIM Clock Division value on runtime.
__HANDLE__ | TIM handle. |
The | clock division can be one of the following values:
|
#define __HAL_TIM_GET_COMPARE | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
Get the TIM Capture Compare Register value on runtime.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channel associated with the capture compare register This parameter can be one of the following values:
|
16-bit | or 32-bit value of the capture/compare register (TIMx_CCRy) |
#define __HAL_TIM_GET_COUNTER | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CNT) |
Get the TIM Counter Register value on runtime.
__HANDLE__ | TIM handle. |
16-bit | or 32-bit value of the timer counter register (TIMx_CNT) |
#define __HAL_TIM_GET_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | (((__HANDLE__)->Instance->SR &(__FLAG__)) == (__FLAG__)) |
Check whether the specified TIM interrupt flag is set or not.
__HANDLE__ | specifies the TIM Handle. |
__FLAG__ | specifies the TIM interrupt flag to check. This parameter can be one of the following values:
|
The | new state of FLAG (TRUE or FALSE). |
#define __HAL_TIM_GET_ICPRESCALER | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
Get the TIM Input Capture prescaler on runtime.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channels to be configured. This parameter can be one of the following values:
|
The | input capture prescaler can be one of the following values:
|
#define __HAL_TIM_GET_IT_SOURCE | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) |
Check whether the specified TIM interrupt source is enabled or not.
__HANDLE__ | TIM handle |
__INTERRUPT__ | specifies the TIM interrupt source to check. This parameter can be one of the following values:
|
The | state of TIM_IT (SET or RESET). |
#define __HAL_TIM_GET_UIFCPY | ( | __COUNTER__ | ) | (((__COUNTER__) & (TIM_CNT_UIFCPY)) == (TIM_CNT_UIFCPY)) |
@brief Get update interrupt flag (UIF) copy status. @param __COUNTER__ Counter value. @retval The state of UIFCPY (TRUE or FALSE).
mode.
#define __HAL_TIM_IS_TIM_COUNTING_DOWN | ( | __HANDLE__ | ) | (((__HANDLE__)->Instance->CR1 &(TIM_CR1_DIR)) == (TIM_CR1_DIR)) |
Indicates whether or not the TIM Counter is used as downcounter.
__HANDLE__ | TIM handle. |
False | (Counter used as upcounter) or True (Counter used as downcounter) |
#define __HAL_TIM_MOE_DISABLE | ( | __HANDLE__ | ) |
Disable the TIM main Output.
__HANDLE__ | TIM handle |
None |
#define __HAL_TIM_MOE_DISABLE_UNCONDITIONALLY | ( | __HANDLE__ | ) | (__HANDLE__)->Instance->BDTR &= ~(TIM_BDTR_MOE) |
Disable the TIM main Output.
__HANDLE__ | TIM handle |
None |
#define __HAL_TIM_MOE_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->BDTR|=(TIM_BDTR_MOE)) |
Enable the TIM main Output.
__HANDLE__ | TIM handle |
None |
#define __HAL_TIM_RESET_HANDLE_STATE | ( | __HANDLE__ | ) |
Reset TIM handle state.
__HANDLE__ | TIM handle. |
None |
#define __HAL_TIM_SELECT_CCDMAREQUEST | ( | __HANDLE__, | |
__CCDMA__ | |||
) | MODIFY_REG((__HANDLE__)->Instance->CR2, TIM_CR2_CCDS, (__CCDMA__)) |
Select the Capture/compare DMA request source.
__HANDLE__ | specifies the TIM Handle. |
__CCDMA__ | specifies Capture/compare DMA request source This parameter can be one of the following values:
|
None |
#define __HAL_TIM_SET_AUTORELOAD | ( | __HANDLE__, | |
__AUTORELOAD__ | |||
) |
Set the TIM Autoreload Register value on runtime without calling another time any Init function.
__HANDLE__ | TIM handle. |
__AUTORELOAD__ | specifies the Counter register new value. |
None |
#define __HAL_TIM_SET_CAPTUREPOLARITY | ( | __HANDLE__, | |
__CHANNEL__, | |||
__POLARITY__ | |||
) |
Set the TIM Capture x input polarity on runtime.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channels to be configured. This parameter can be one of the following values:
|
__POLARITY__ | Polarity for TIx source
|
None |
#define __HAL_TIM_SET_CLOCKDIVISION | ( | __HANDLE__, | |
__CKD__ | |||
) |
Set the TIM Clock Division value on runtime without calling another time any Init function.
__HANDLE__ | TIM handle. |
__CKD__ | specifies the clock division value. This parameter can be one of the following value:
|
None |
#define __HAL_TIM_SET_COMPARE | ( | __HANDLE__, | |
__CHANNEL__, | |||
__COMPARE__ | |||
) |
Set the TIM Capture Compare Register value on runtime without calling another time ConfigChannel function.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channels to be configured. This parameter can be one of the following values:
|
__COMPARE__ | specifies the Capture Compare register new value. |
None |
#define __HAL_TIM_SET_COUNTER | ( | __HANDLE__, | |
__COUNTER__ | |||
) | ((__HANDLE__)->Instance->CNT = (__COUNTER__)) |
Set the TIM Counter Register value on runtime. Note Please check if the bit 31 of CNT register is used as UIF copy or not, this may affect the counter range in case of 32 bits counter TIM instance. Bit 31 of CNT can be enabled/disabled using __HAL_TIM_UIFREMAP_ENABLE()/__HAL_TIM_UIFREMAP_DISABLE() macros.
__HANDLE__ | TIM handle. |
__COUNTER__ | specifies the Counter register new value. |
None |
#define __HAL_TIM_SET_ICPRESCALER | ( | __HANDLE__, | |
__CHANNEL__, | |||
__ICPSC__ | |||
) |
Set the TIM Input Capture prescaler on runtime without calling another time HAL_TIM_IC_ConfigChannel() function.
__HANDLE__ | TIM handle. |
__CHANNEL__ | TIM Channels to be configured. This parameter can be one of the following values:
|
__ICPSC__ | specifies the Input Capture4 prescaler new value. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_SET_PRESCALER | ( | __HANDLE__, | |
__PRESC__ | |||
) | ((__HANDLE__)->Instance->PSC = (__PRESC__)) |
Set the TIM Prescaler on runtime.
__HANDLE__ | TIM handle. |
__PRESC__ | specifies the Prescaler new value. |
None |
#define __HAL_TIM_UIFREMAP_DISABLE | ( | __HANDLE__ | ) | (((__HANDLE__)->Instance->CR1 &= ~TIM_CR1_UIFREMAP)) |
@brief Disable update interrupt flag (UIF) remapping. @param __HANDLE__ TIM handle. @retval None
mode.
#define __HAL_TIM_UIFREMAP_ENABLE | ( | __HANDLE__ | ) | (((__HANDLE__)->Instance->CR1 |= TIM_CR1_UIFREMAP)) |
@brief Force a continuous copy of the update interrupt flag (UIF) into the timer counter register (bit 31). @note This allows both the counter value and a potential roll-over condition signalled by the UIFCPY flag to be read in an atomic way. @param __HANDLE__ TIM handle. @retval None
mode.
#define __HAL_TIM_URS_DISABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1&=~TIM_CR1_URS) |
Reset the Update Request Source (URS) bit of the TIMx_CR1 register.
__HANDLE__ | TIM handle. |
None |
#define __HAL_TIM_URS_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1|= TIM_CR1_URS) |
Set the Update Request Source (URS) bit of the TIMx_CR1 register.
__HANDLE__ | TIM handle. |
None |