Prusa MINI Firmware overview
|
Macros | |
#define | __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_TIM_STATE_RESET) |
Reset TIM handle state. More... | |
#define | __HAL_TIM_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1|=(TIM_CR1_CEN)) |
Enable the TIM peripheral. More... | |
#define | __HAL_TIM_MOE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->BDTR|=(TIM_BDTR_MOE)) |
Enable the TIM main Output. More... | |
#define | __HAL_TIM_DISABLE(__HANDLE__) |
Disable the TIM peripheral. More... | |
#define | __HAL_TIM_MOE_DISABLE(__HANDLE__) |
Disable the TIM main Output. More... | |
#define | __HAL_TIM_MOE_DISABLE_UNCONDITIONALLY(__HANDLE__) (__HANDLE__)->Instance->BDTR &= ~(TIM_BDTR_MOE) |
Disable the TIM main Output. More... | |
#define | __HAL_TIM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DIER |= (__INTERRUPT__)) |
Enable the specified TIM interrupt. More... | |
#define | __HAL_TIM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DIER &= ~(__INTERRUPT__)) |
Disable the specified TIM interrupt. More... | |
#define | __HAL_TIM_ENABLE_DMA(__HANDLE__, __DMA__) ((__HANDLE__)->Instance->DIER |= (__DMA__)) |
Enable the specified DMA request. More... | |
#define | __HAL_TIM_DISABLE_DMA(__HANDLE__, __DMA__) ((__HANDLE__)->Instance->DIER &= ~(__DMA__)) |
Disable the specified DMA request. More... | |
#define | __HAL_TIM_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR &(__FLAG__)) == (__FLAG__)) |
Check whether the specified TIM interrupt flag is set or not. More... | |
#define | __HAL_TIM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
Clear the specified TIM interrupt flag. More... | |
#define | __HAL_TIM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->DIER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Check whether the specified TIM interrupt source is enabled or not. More... | |
#define | __HAL_TIM_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->SR = ~(__INTERRUPT__)) |
Clear the TIM interrupt pending bits. More... | |
#define | __HAL_TIM_IS_TIM_COUNTING_DOWN(__HANDLE__) (((__HANDLE__)->Instance->CR1 &(TIM_CR1_DIR)) == (TIM_CR1_DIR)) |
#define | __HAL_TIM_SET_PRESCALER(__HANDLE__, __PRESC__) ((__HANDLE__)->Instance->PSC = (__PRESC__)) |
Set the TIM Prescaler on runtime. More... | |
#define | TIM_SET_ICPRESCALERVALUE(__HANDLE__, __CHANNEL__, __ICPSC__) |
#define | TIM_RESET_ICPRESCALERVALUE(__HANDLE__, __CHANNEL__) |
#define | TIM_SET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__, __POLARITY__) |
#define | TIM_RESET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__) |
#define | __HAL_TIM_SET_COMPARE(__HANDLE__, __CHANNEL__, __COMPARE__) (*(__IO uint32_t *)(&((__HANDLE__)->Instance->CCR1) + ((__CHANNEL__) >> 2U)) = (__COMPARE__)) |
Sets the TIM Capture Compare Register value on runtime without calling another time ConfigChannel function. More... | |
#define | __HAL_TIM_GET_COMPARE(__HANDLE__, __CHANNEL__) (*(__IO uint32_t *)(&((__HANDLE__)->Instance->CCR1) + ((__CHANNEL__) >> 2U))) |
Gets the TIM Capture Compare Register value on runtime. More... | |
#define | __HAL_TIM_SET_COUNTER(__HANDLE__, __COUNTER__) ((__HANDLE__)->Instance->CNT = (__COUNTER__)) |
Sets the TIM Counter Register value on runtime. More... | |
#define | __HAL_TIM_GET_COUNTER(__HANDLE__) ((__HANDLE__)->Instance->CNT) |
Gets the TIM Counter Register value on runtime. More... | |
#define | __HAL_TIM_SET_AUTORELOAD(__HANDLE__, __AUTORELOAD__) |
Sets the TIM Autoreload Register value on runtime without calling another time any Init function. More... | |
#define | __HAL_TIM_GET_AUTORELOAD(__HANDLE__) ((__HANDLE__)->Instance->ARR) |
Gets the TIM Autoreload Register value on runtime. More... | |
#define | __HAL_TIM_SET_CLOCKDIVISION(__HANDLE__, __CKD__) |
Sets the TIM Clock Division value on runtime without calling another time any Init function. More... | |
#define | __HAL_TIM_GET_CLOCKDIVISION(__HANDLE__) ((__HANDLE__)->Instance->CR1 & TIM_CR1_CKD) |
Gets the TIM Clock Division value on runtime. More... | |
#define | __HAL_TIM_SET_ICPRESCALER(__HANDLE__, __CHANNEL__, __ICPSC__) |
Sets the TIM Input Capture prescaler on runtime without calling another time HAL_TIM_IC_ConfigChannel() function. More... | |
#define | __HAL_TIM_GET_ICPRESCALER(__HANDLE__, __CHANNEL__) |
Get the TIM Input Capture prescaler on runtime. More... | |
#define | __HAL_TIM_URS_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1|= (TIM_CR1_URS)) |
Set the Update Request Source (URS) bit of the TIMx_CR1 register. More... | |
#define | __HAL_TIM_URS_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1&=~(TIM_CR1_URS)) |
Reset the Update Request Source (URS) bit of the TIMx_CR1 register. More... | |
#define | __HAL_TIM_SET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__, __POLARITY__) |
Sets the TIM Capture x input polarity on runtime. More... | |
#define __HAL_TIM_RESET_HANDLE_STATE | ( | __HANDLE__ | ) | ((__HANDLE__)->State = HAL_TIM_STATE_RESET) |
Reset TIM handle state.
<strong>HANDLE</strong> | TIM handle |
None |
#define __HAL_TIM_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1|=(TIM_CR1_CEN)) |
Enable the TIM peripheral.
<strong>HANDLE</strong> | TIM handle |
None |
#define __HAL_TIM_MOE_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->BDTR|=(TIM_BDTR_MOE)) |
Enable the TIM main Output.
<strong>HANDLE</strong> | TIM handle |
None |
#define __HAL_TIM_DISABLE | ( | __HANDLE__ | ) |
Disable the TIM peripheral.
<strong>HANDLE</strong> | TIM handle |
None |
#define __HAL_TIM_MOE_DISABLE | ( | __HANDLE__ | ) |
Disable the TIM main Output.
<strong>HANDLE</strong> | TIM handle |
None |
#define __HAL_TIM_MOE_DISABLE_UNCONDITIONALLY | ( | __HANDLE__ | ) | (__HANDLE__)->Instance->BDTR &= ~(TIM_BDTR_MOE) |
Disable the TIM main Output.
<strong>HANDLE</strong> | TIM handle |
None |
#define __HAL_TIM_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->DIER |= (__INTERRUPT__)) |
Enable the specified TIM interrupt.
<strong>HANDLE</strong> | specifies the TIM Handle. |
<strong>INTERRUPT</strong> | specifies the TIM interrupt source to enable. 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.
<strong>HANDLE</strong> | specifies the TIM Handle. |
<strong>INTERRUPT</strong> | specifies the TIM interrupt source to disable. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_ENABLE_DMA | ( | __HANDLE__, | |
__DMA__ | |||
) | ((__HANDLE__)->Instance->DIER |= (__DMA__)) |
Enable the specified DMA request.
<strong>HANDLE</strong> | specifies the TIM Handle. |
<strong>DMA</strong> | specifies the TIM DMA request to enable. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_DISABLE_DMA | ( | __HANDLE__, | |
__DMA__ | |||
) | ((__HANDLE__)->Instance->DIER &= ~(__DMA__)) |
Disable the specified DMA request.
<strong>HANDLE</strong> | specifies the TIM Handle. |
<strong>DMA</strong> | specifies the TIM DMA request to disable. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_GET_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | (((__HANDLE__)->Instance->SR &(__FLAG__)) == (__FLAG__)) |
Check whether the specified TIM interrupt flag is set or not.
<strong>HANDLE</strong> | specifies the TIM Handle. |
<strong>FLAG</strong> | 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_CLEAR_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
Clear the specified TIM interrupt flag.
<strong>HANDLE</strong> | specifies the TIM Handle. |
<strong>FLAG</strong> | 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_GET_IT_SOURCE | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((((__HANDLE__)->Instance->DIER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Check whether the specified TIM interrupt source is enabled or not.
<strong>HANDLE</strong> | TIM handle |
<strong>INTERRUPT</strong> | 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_CLEAR_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->SR = ~(__INTERRUPT__)) |
Clear the TIM interrupt pending bits.
<strong>HANDLE</strong> | TIM handle |
<strong>INTERRUPT</strong> | specifies the interrupt pending bit to clear. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_IS_TIM_COUNTING_DOWN | ( | __HANDLE__ | ) | (((__HANDLE__)->Instance->CR1 &(TIM_CR1_DIR)) == (TIM_CR1_DIR)) |
@brief Indicates whether or not the TIM Counter is used as downcounter. @param __HANDLE__ TIM handle. @retval False (Counter used as upcounter) or True (Counter used as downcounter) @note This macro is particularly useful to get the counting mode when the timer operates in Center-aligned mode or Encoder
mode.
#define __HAL_TIM_SET_PRESCALER | ( | __HANDLE__, | |
__PRESC__ | |||
) | ((__HANDLE__)->Instance->PSC = (__PRESC__)) |
Set the TIM Prescaler on runtime.
<strong>HANDLE</strong> | TIM handle. |
<strong>PRESC</strong> | specifies the Prescaler new value. |
None |
#define TIM_SET_ICPRESCALERVALUE | ( | __HANDLE__, | |
__CHANNEL__, | |||
__ICPSC__ | |||
) |
#define TIM_RESET_ICPRESCALERVALUE | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
#define TIM_SET_CAPTUREPOLARITY | ( | __HANDLE__, | |
__CHANNEL__, | |||
__POLARITY__ | |||
) |
#define TIM_RESET_CAPTUREPOLARITY | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
#define __HAL_TIM_SET_COMPARE | ( | __HANDLE__, | |
__CHANNEL__, | |||
__COMPARE__ | |||
) | (*(__IO uint32_t *)(&((__HANDLE__)->Instance->CCR1) + ((__CHANNEL__) >> 2U)) = (__COMPARE__)) |
Sets the TIM Capture Compare Register value on runtime without calling another time ConfigChannel function.
<strong>HANDLE</strong> | TIM handle. |
<strong>CHANNEL</strong> | TIM Channels to be configured. This parameter can be one of the following values:
|
<strong>COMPARE</strong> | specifies the Capture Compare register new value. |
None |
#define __HAL_TIM_GET_COMPARE | ( | __HANDLE__, | |
__CHANNEL__ | |||
) | (*(__IO uint32_t *)(&((__HANDLE__)->Instance->CCR1) + ((__CHANNEL__) >> 2U))) |
Gets the TIM Capture Compare Register value on runtime.
<strong>HANDLE</strong> | TIM handle. |
<strong>CHANNEL</strong> | 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_SET_COUNTER | ( | __HANDLE__, | |
__COUNTER__ | |||
) | ((__HANDLE__)->Instance->CNT = (__COUNTER__)) |
Sets the TIM Counter Register value on runtime.
<strong>HANDLE</strong> | TIM handle. |
<strong>COUNTER</strong> | specifies the Counter register new value. |
None |
#define __HAL_TIM_GET_COUNTER | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CNT) |
Gets the TIM Counter Register value on runtime.
<strong>HANDLE</strong> | TIM handle. |
16-bit | or 32-bit value of the timer counter register (TIMx_CNT) |
#define __HAL_TIM_SET_AUTORELOAD | ( | __HANDLE__, | |
__AUTORELOAD__ | |||
) |
Sets the TIM Autoreload Register value on runtime without calling another time any Init function.
<strong>HANDLE</strong> | TIM handle. |
<strong>AUTORELOAD</strong> | specifies the Counter register new value. |
None |
#define __HAL_TIM_GET_AUTORELOAD | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->ARR) |
Gets the TIM Autoreload Register value on runtime.
<strong>HANDLE</strong> | TIM handle. |
16-bit | or 32-bit value of the timer auto-reload register(TIMx_ARR) |
#define __HAL_TIM_SET_CLOCKDIVISION | ( | __HANDLE__, | |
__CKD__ | |||
) |
Sets the TIM Clock Division value on runtime without calling another time any Init function.
<strong>HANDLE</strong> | TIM handle. |
<strong>CKD</strong> | specifies the clock division value. This parameter can be one of the following value:
|
None |
#define __HAL_TIM_GET_CLOCKDIVISION | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1 & TIM_CR1_CKD) |
Gets the TIM Clock Division value on runtime.
<strong>HANDLE</strong> | TIM handle. |
The | clock division can be one of the following values:
|
#define __HAL_TIM_SET_ICPRESCALER | ( | __HANDLE__, | |
__CHANNEL__, | |||
__ICPSC__ | |||
) |
Sets the TIM Input Capture prescaler on runtime without calling another time HAL_TIM_IC_ConfigChannel() function.
<strong>HANDLE</strong> | TIM handle. |
<strong>CHANNEL</strong> | TIM Channels to be configured. This parameter can be one of the following values:
|
<strong>ICPSC</strong> | specifies the Input Capture4 prescaler new value. This parameter can be one of the following values:
|
None |
#define __HAL_TIM_GET_ICPRESCALER | ( | __HANDLE__, | |
__CHANNEL__ | |||
) |
Get the TIM Input Capture prescaler on runtime.
<strong>HANDLE</strong> | TIM handle. |
<strong>CHANNEL</strong> | 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_URS_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1|= (TIM_CR1_URS)) |
Set the Update Request Source (URS) bit of the TIMx_CR1 register.
<strong>HANDLE</strong> | TIM handle. |
None |
#define __HAL_TIM_URS_DISABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1&=~(TIM_CR1_URS)) |
Reset the Update Request Source (URS) bit of the TIMx_CR1 register.
<strong>HANDLE</strong> | TIM handle. |
None |
#define __HAL_TIM_SET_CAPTUREPOLARITY | ( | __HANDLE__, | |
__CHANNEL__, | |||
__POLARITY__ | |||
) |
Sets the TIM Capture x input polarity on runtime.
<strong>HANDLE</strong> | TIM handle. |
<strong>CHANNEL</strong> | TIM Channels to be configured. This parameter can be one of the following values:
|
<strong>POLARITY</strong> | Polarity for TIx source
|
None |