STM8L15x Standard Peripherals Drivers
|
TIM4 driver modules. More...
Modules | |
TIM4_Exported_Types | |
TIM4_Exported_Macros | |
TIM4_Private_Functions | |
Functions | |
void | TIM4_ARRPreloadConfig (FunctionalState NewState) |
Enables or disables TIM4 peripheral Preload register on ARR. | |
void | TIM4_ClearFlag (TIM4_FLAG_TypeDef TIM4_FLAG) |
Clears the TIM�s pending flags. | |
void | TIM4_ClearITPendingBit (TIM4_IT_TypeDef TIM4_IT) |
Clears the TIM4's interrupt pending bits. | |
void | TIM4_Cmd (FunctionalState NewState) |
Enables or disables the TIM4 peripheral. | |
void | TIM4_DeInit (void) |
Deinitializes the TIM4 peripheral registers to their default reset values. | |
void | TIM4_DMACmd (TIM4_DMASource_TypeDef TIM4_DMASource, FunctionalState NewState) |
Enables or disables the TIMx�s DMA Requests. | |
void | TIM4_GenerateEvent (TIM4_EventSource_TypeDef TIM4_EventSource) |
Configures the TIM4 event to be generated by software. | |
uint8_t | TIM4_GetCounter (void) |
Gets the TIM4 Counter value. | |
FlagStatus | TIM4_GetFlagStatus (TIM4_FLAG_TypeDef TIM4_FLAG) |
Checks whether the specified TIM4 flag is set or not. | |
ITStatus | TIM4_GetITStatus (TIM4_IT_TypeDef TIM4_IT) |
Checks whether the TIM4 interrupt has occurred or not. | |
TIM4_Prescaler_TypeDef | TIM4_GetPrescaler (void) |
Gets the TIM4 Prescaler value. | |
void | TIM4_InternalClockConfig (void) |
Enables the TIM4 internal Clock. | |
void | TIM4_ITConfig (TIM4_IT_TypeDef TIM4_IT, FunctionalState NewState) |
Enables or disables the specified TIM4 interrupts. | |
void | TIM4_PrescalerConfig (TIM4_Prescaler_TypeDef Prescaler, TIM4_PSCReloadMode_TypeDef TIM4_PSCReloadMode) |
Configures the TIM4 Prescaler. | |
void | TIM4_SelectInputTrigger (TIM4_TRGSelection_TypeDef TIM4_InputTriggerSource) |
Selects the TIM4 Input Trigger source. | |
void | TIM4_SelectMasterSlaveMode (FunctionalState NewState) |
Sets or Resets the TIM4 Master/Slave Mode. | |
void | TIM4_SelectOnePulseMode (TIM4_OPMode_TypeDef TIM4_OPMode) |
Selects the TIM4�s One Pulse Mode. | |
void | TIM4_SelectOutputTrigger (TIM4_TRGOSource_TypeDef TIM4_TRGOSource) |
Selects the TIM4 Trigger Output Mode. | |
void | TIM4_SelectSlaveMode (TIM4_SlaveMode_TypeDef TIM4_SlaveMode) |
Selects the TIM4 Slave Mode. | |
void | TIM4_SetAutoreload (uint8_t Autoreload) |
Sets the TIM4 Autoreload Register value. | |
void | TIM4_SetCounter (uint8_t Counter) |
Sets the TIM4 Counter Register value. | |
void | TIM4_TimeBaseInit (TIM4_Prescaler_TypeDef TIM4_Prescaler, uint8_t TIM4_Period) |
Initializes the TIM4 Time Base Unit according to the specified parameters. | |
void | TIM4_UpdateDisableConfig (FunctionalState NewState) |
Enables or Disables the TIM4 Update event. | |
void | TIM4_UpdateRequestConfig (TIM4_UpdateSource_TypeDef TIM4_UpdateSource) |
Selects the TIM4 Update Request Interrupt source. |
Detailed Description
TIM4 driver modules.
Function Documentation
void TIM4_ARRPreloadConfig | ( | FunctionalState | NewState | ) |
Enables or disables TIM4 peripheral Preload register on ARR.
Definition at line 336 of file stm8l15x_tim4.c.
References DISABLE, IS_FUNCTIONAL_STATE, TIM4, and TIM4_CR1_ARPE.
void TIM4_ClearFlag | ( | TIM4_FLAG_TypeDef | TIM4_FLAG | ) |
Clears the TIM�s pending flags.
Definition at line 494 of file stm8l15x_tim4.c.
References IS_TIM4_CLEAR_FLAG, and TIM4.
void TIM4_ClearITPendingBit | ( | TIM4_IT_TypeDef | TIM4_IT | ) |
Clears the TIM4's interrupt pending bits.
Definition at line 544 of file stm8l15x_tim4.c.
References IS_TIM4_IT, and TIM4.
void TIM4_Cmd | ( | FunctionalState | NewState | ) |
Enables or disables the TIM4 peripheral.
Definition at line 382 of file stm8l15x_tim4.c.
References DISABLE, IS_FUNCTIONAL_STATE, TIM4, and TIM4_CR1_CEN.
void TIM4_DeInit | ( | void | ) |
Deinitializes the TIM4 peripheral registers to their default reset values.
Definition at line 124 of file stm8l15x_tim4.c.
References TIM4, TIM4_ARR_RESET_VALUE, TIM4_CNTR_RESET_VALUE, TIM4_CR1_RESET_VALUE, TIM4_CR2_RESET_VALUE, TIM4_IER_RESET_VALUE, TIM4_PSCR_RESET_VALUE, TIM4_SMCR_RESET_VALUE, and TIM4_SR1_RESET_VALUE.
void TIM4_DMACmd | ( | TIM4_DMASource_TypeDef | TIM4_DMASource, |
FunctionalState | NewState | ||
) |
Enables or disables the TIMx�s DMA Requests.
Definition at line 562 of file stm8l15x_tim4.c.
References DISABLE, IS_FUNCTIONAL_STATE, IS_TIM4_DMA_SOURCE, and TIM4.
void TIM4_GenerateEvent | ( | TIM4_EventSource_TypeDef | TIM4_EventSource | ) |
Configures the TIM4 event to be generated by software.
Definition at line 450 of file stm8l15x_tim4.c.
References IS_TIM4_EVENT_SOURCE, and TIM4.
uint8_t TIM4_GetCounter | ( | void | ) |
FlagStatus TIM4_GetFlagStatus | ( | TIM4_FLAG_TypeDef | TIM4_FLAG | ) |
Checks whether the specified TIM4 flag is set or not.
Definition at line 468 of file stm8l15x_tim4.c.
References IS_TIM4_GET_FLAG, RESET, SET, and TIM4.
ITStatus TIM4_GetITStatus | ( | TIM4_IT_TypeDef | TIM4_IT | ) |
Checks whether the TIM4 interrupt has occurred or not.
Definition at line 512 of file stm8l15x_tim4.c.
References IS_TIM4_GET_IT, RESET, SET, and TIM4.
TIM4_Prescaler_TypeDef TIM4_GetPrescaler | ( | void | ) |
void TIM4_InternalClockConfig | ( | void | ) |
Enables the TIM4 internal Clock.
Definition at line 601 of file stm8l15x_tim4.c.
References TIM4, and TIM4_SMCR_SMS.
void TIM4_ITConfig | ( | TIM4_IT_TypeDef | TIM4_IT, |
FunctionalState | NewState | ||
) |
Enables or disables the specified TIM4 interrupts.
Definition at line 424 of file stm8l15x_tim4.c.
References DISABLE, IS_FUNCTIONAL_STATE, IS_TIM4_IT, and TIM4.
void TIM4_PrescalerConfig | ( | TIM4_Prescaler_TypeDef | Prescaler, |
TIM4_PSCReloadMode_TypeDef | TIM4_PSCReloadMode | ||
) |
Configures the TIM4 Prescaler.
Definition at line 199 of file stm8l15x_tim4.c.
References IS_TIM4_Prescaler, IS_TIM4_Prescaler_RELOAD, TIM4, TIM4_EGR_UG, and TIM4_PSCReloadMode_Immediate.
void TIM4_SelectInputTrigger | ( | TIM4_TRGSelection_TypeDef | TIM4_InputTriggerSource | ) |
Selects the TIM4 Input Trigger source.
Definition at line 645 of file stm8l15x_tim4.c.
References IS_TIM4_TRIGGER_SELECTION, TIM4, and TIM4_SMCR_TS.
void TIM4_SelectMasterSlaveMode | ( | FunctionalState | NewState | ) |
Sets or Resets the TIM4 Master/Slave Mode.
Definition at line 724 of file stm8l15x_tim4.c.
References DISABLE, IS_FUNCTIONAL_STATE, TIM4, and TIM4_SMCR_MSM.
void TIM4_SelectOnePulseMode | ( | TIM4_OPMode_TypeDef | TIM4_OPMode | ) |
Selects the TIM4�s One Pulse Mode.
Definition at line 360 of file stm8l15x_tim4.c.
References IS_TIM4_OPM_MODE, TIM4, TIM4_CR1_OPM, and TIM4_OPMode_Single.
void TIM4_SelectOutputTrigger | ( | TIM4_TRGOSource_TypeDef | TIM4_TRGOSource | ) |
Selects the TIM4 Trigger Output Mode.
Definition at line 670 of file stm8l15x_tim4.c.
References IS_TIM4_TRGO_SOURCE, TIM4, and TIM4_CR2_MMS.
void TIM4_SelectSlaveMode | ( | TIM4_SlaveMode_TypeDef | TIM4_SlaveMode | ) |
Selects the TIM4 Slave Mode.
Definition at line 700 of file stm8l15x_tim4.c.
References IS_TIM4_SLAVE_MODE, TIM4, and TIM4_SMCR_SMS.
void TIM4_SetAutoreload | ( | uint8_t | Autoreload | ) |
Sets the TIM4 Autoreload Register value.
Definition at line 238 of file stm8l15x_tim4.c.
References TIM4.
void TIM4_SetCounter | ( | uint8_t | Counter | ) |
Sets the TIM4 Counter Register value.
Definition at line 226 of file stm8l15x_tim4.c.
References TIM4.
void TIM4_TimeBaseInit | ( | TIM4_Prescaler_TypeDef | TIM4_Prescaler, |
uint8_t | TIM4_Period | ||
) |
Initializes the TIM4 Time Base Unit according to the specified parameters.
Definition at line 159 of file stm8l15x_tim4.c.
References IS_TIM4_Prescaler, TIM4, and TIM4_EventSource_Update.
void TIM4_UpdateDisableConfig | ( | FunctionalState | NewState | ) |
Enables or Disables the TIM4 Update event.
Definition at line 290 of file stm8l15x_tim4.c.
References DISABLE, IS_FUNCTIONAL_STATE, TIM4, and TIM4_CR1_UDIS.
void TIM4_UpdateRequestConfig | ( | TIM4_UpdateSource_TypeDef | TIM4_UpdateSource | ) |
Selects the TIM4 Update Request Interrupt source.
Definition at line 314 of file stm8l15x_tim4.c.
References IS_TIM4_UPDATE_SOURCE, TIM4, TIM4_CR1_URS, and TIM4_UpdateSource_Regular.