STM8L15x Standard Peripherals Drivers
|
stm8l15x_tim4.h File Reference
This file contains all the functions prototypes for the TIM4 firmware library. More...
#include "stm8l15x.h"
Go to the source code of this file.
Defines | |
#define | IS_TIM4_CLEAR_FLAG(FLAG) ((((FLAG) & (uint8_t)0xBE) == 0x00) && ((FLAG) != 0x00)) |
#define | IS_TIM4_DMA_SOURCE(SOURCE) (((SOURCE) == TIM4_DMASource_Update)) |
Macro TIM4 DMA sources. | |
#define | IS_TIM4_EVENT_SOURCE(SOURCE) |
Macro TIM4 Event source. | |
#define | IS_TIM4_GET_FLAG(FLAG) |
Macro TIM4 Flags. | |
#define | IS_TIM4_GET_IT(IT) |
#define | IS_TIM4_IT(IT) |
Macro TIM4 interrupts. | |
#define | IS_TIM4_OPM_MODE(MODE) |
Macro TIM4 One Pulse Mode. | |
#define | IS_TIM4_Prescaler(PRESCALER) |
Macro used by the assert function to check the different functions parameters. | |
#define | IS_TIM4_Prescaler_RELOAD(RELOAD) |
Macro TIM4 Prescaler reload. | |
#define | IS_TIM4_SLAVE_MODE(MODE) |
Macro TIM4 Slave mode. | |
#define | IS_TIM4_TRGO_SOURCE(SOURCE) |
Macro TIM4 TRGO source. | |
#define | IS_TIM4_TRIGGER_SELECTION(SELECTION) |
Macro TIM4 Trigger selection. | |
#define | IS_TIM4_UPDATE_SOURCE(SOURCE) |
Macro TIM4 Update source. | |
Enumerations | |
enum | TIM4_DMASource_TypeDef { TIM4_DMASource_Update = ((uint8_t)0x01) } |
enum | TIM4_EventSource_TypeDef { TIM4_EventSource_Update = ((uint8_t)0x01), TIM4_EventSource_Trigger = ((uint8_t)0x40) } |
enum | TIM4_FLAG_TypeDef { TIM4_FLAG_Update = ((uint8_t)0x01), TIM4_FLAG_Trigger = ((uint8_t)0x40) } |
enum | TIM4_IT_TypeDef { TIM4_IT_Update = ((uint8_t)0x01), TIM4_IT_Trigger = ((uint8_t)0x40) } |
enum | TIM4_OPMode_TypeDef { TIM4_OPMode_Single = ((uint8_t) 0x01), TIM4_OPMode_Repetitive = ((uint8_t) 0x00) } |
enum | TIM4_Prescaler_TypeDef { TIM4_Prescaler_1 = ((uint8_t)0x00), TIM4_Prescaler_2 = ((uint8_t)0x01), TIM4_Prescaler_4 = ((uint8_t)0x02), TIM4_Prescaler_8 = ((uint8_t)0x03), TIM4_Prescaler_16 = ((uint8_t)0x04), TIM4_Prescaler_32 = ((uint8_t)0x05), TIM4_Prescaler_64 = ((uint8_t)0x06), TIM4_Prescaler_128 = ((uint8_t)0x07), TIM4_Prescaler_256 = ((uint8_t)0x08), TIM4_Prescaler_512 = ((uint8_t)0x09), TIM4_Prescaler_1024 = ((uint8_t)0x0A), TIM4_Prescaler_2048 = ((uint8_t)0x0B), TIM4_Prescaler_4096 = ((uint8_t)0x0C), TIM4_Prescaler_8192 = ((uint8_t)0x0D), TIM4_Prescaler_16384 = ((uint8_t)0x0E), TIM4_Prescaler_32768 = ((uint8_t)0x0F) } |
enum | TIM4_PSCReloadMode_TypeDef { TIM4_PSCReloadMode_Update = ((uint8_t)0x00), TIM4_PSCReloadMode_Immediate = ((uint8_t)0x01) } |
enum | TIM4_SlaveMode_TypeDef { TIM4_SlaveMode_Disable = ((uint8_t)0x00), TIM4_SlaveMode_Reset = ((uint8_t)0x04), TIM4_SlaveMode_Gated = ((uint8_t)0x05), TIM4_SlaveMode_Trigger = ((uint8_t)0x06), TIM4_SlaveMode_External1 = ((uint8_t)0x07) } |
enum | TIM4_TRGOSource_TypeDef { TIM4_TRGOSource_Reset = ((uint8_t)0x00), TIM4_TRGOSource_Enable = ((uint8_t)0x10), TIM4_TRGOSource_Update = ((uint8_t)0x20) } |
enum | TIM4_TRGSelection_TypeDef { TIM4_TRGSelection_TIM5 = ((uint8_t)0x00), TIM4_TRGSelection_TIM1 = ((uint8_t)0x10), TIM4_TRGSelection_TIM3 = ((uint8_t)0x20), TIM4_TRGSelection_TIM2 = ((uint8_t)0x30) } |
enum | TIM4_UpdateSource_TypeDef { TIM4_UpdateSource_Global = ((uint8_t)0x00), TIM4_UpdateSource_Regular = ((uint8_t)0x01) } |
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
This file contains all the functions prototypes for the TIM4 firmware library.
- Attention:
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
© COPYRIGHT 2011 STMicroelectronics
Definition in file stm8l15x_tim4.h.