STM32F10x Standard Peripherals Library  3.5.0
/opt/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_tim.h File Reference

This file contains all the functions prototypes for the TIM firmware library. More...

#include "stm32f10x.h"

Go to the source code of this file.

Data Structures

struct  TIM_TimeBaseInitTypeDef
 TIM Time Base Init structure definition. More...
struct  TIM_OCInitTypeDef
 TIM Output Compare Init structure definition. More...
struct  TIM_ICInitTypeDef
 TIM Input Capture Init structure definition. More...
struct  TIM_BDTRInitTypeDef
 BDTR structure definition. More...

Defines

#define IS_TIM_ALL_PERIPH(PERIPH)
#define IS_TIM_LIST1_PERIPH(PERIPH)
#define IS_TIM_LIST2_PERIPH(PERIPH)
#define IS_TIM_LIST3_PERIPH(PERIPH)
#define IS_TIM_LIST4_PERIPH(PERIPH)
#define IS_TIM_LIST5_PERIPH(PERIPH)
#define IS_TIM_LIST6_PERIPH(PERIPH)
#define IS_TIM_LIST7_PERIPH(PERIPH)
#define IS_TIM_LIST8_PERIPH(PERIPH)
#define IS_TIM_LIST9_PERIPH(PERIPH)
#define TIM_OCMode_Timing   ((uint16_t)0x0000)
#define TIM_OCMode_Active   ((uint16_t)0x0010)
#define TIM_OCMode_Inactive   ((uint16_t)0x0020)
#define TIM_OCMode_Toggle   ((uint16_t)0x0030)
#define TIM_OCMode_PWM1   ((uint16_t)0x0060)
#define TIM_OCMode_PWM2   ((uint16_t)0x0070)
#define IS_TIM_OC_MODE(MODE)
#define IS_TIM_OCM(MODE)
#define TIM_OPMode_Single   ((uint16_t)0x0008)
#define TIM_OPMode_Repetitive   ((uint16_t)0x0000)
#define IS_TIM_OPM_MODE(MODE)
#define TIM_Channel_1   ((uint16_t)0x0000)
#define TIM_Channel_2   ((uint16_t)0x0004)
#define TIM_Channel_3   ((uint16_t)0x0008)
#define TIM_Channel_4   ((uint16_t)0x000C)
#define IS_TIM_CHANNEL(CHANNEL)
#define IS_TIM_PWMI_CHANNEL(CHANNEL)
#define IS_TIM_COMPLEMENTARY_CHANNEL(CHANNEL)
#define TIM_CKD_DIV1   ((uint16_t)0x0000)
#define TIM_CKD_DIV2   ((uint16_t)0x0100)
#define TIM_CKD_DIV4   ((uint16_t)0x0200)
#define IS_TIM_CKD_DIV(DIV)
#define TIM_CounterMode_Up   ((uint16_t)0x0000)
#define TIM_CounterMode_Down   ((uint16_t)0x0010)
#define TIM_CounterMode_CenterAligned1   ((uint16_t)0x0020)
#define TIM_CounterMode_CenterAligned2   ((uint16_t)0x0040)
#define TIM_CounterMode_CenterAligned3   ((uint16_t)0x0060)
#define IS_TIM_COUNTER_MODE(MODE)
#define TIM_OCPolarity_High   ((uint16_t)0x0000)
#define TIM_OCPolarity_Low   ((uint16_t)0x0002)
#define IS_TIM_OC_POLARITY(POLARITY)
#define TIM_OCNPolarity_High   ((uint16_t)0x0000)
#define TIM_OCNPolarity_Low   ((uint16_t)0x0008)
#define IS_TIM_OCN_POLARITY(POLARITY)
#define TIM_OutputState_Disable   ((uint16_t)0x0000)
#define TIM_OutputState_Enable   ((uint16_t)0x0001)
#define IS_TIM_OUTPUT_STATE(STATE)
#define TIM_OutputNState_Disable   ((uint16_t)0x0000)
#define TIM_OutputNState_Enable   ((uint16_t)0x0004)
#define IS_TIM_OUTPUTN_STATE(STATE)
#define TIM_CCx_Enable   ((uint16_t)0x0001)
#define TIM_CCx_Disable   ((uint16_t)0x0000)
#define IS_TIM_CCX(CCX)
#define TIM_CCxN_Enable   ((uint16_t)0x0004)
#define TIM_CCxN_Disable   ((uint16_t)0x0000)
#define IS_TIM_CCXN(CCXN)
#define TIM_Break_Enable   ((uint16_t)0x1000)
#define TIM_Break_Disable   ((uint16_t)0x0000)
#define IS_TIM_BREAK_STATE(STATE)
#define TIM_BreakPolarity_Low   ((uint16_t)0x0000)
#define TIM_BreakPolarity_High   ((uint16_t)0x2000)
#define IS_TIM_BREAK_POLARITY(POLARITY)
#define TIM_AutomaticOutput_Enable   ((uint16_t)0x4000)
#define TIM_AutomaticOutput_Disable   ((uint16_t)0x0000)
#define IS_TIM_AUTOMATIC_OUTPUT_STATE(STATE)
#define TIM_LOCKLevel_OFF   ((uint16_t)0x0000)
#define TIM_LOCKLevel_1   ((uint16_t)0x0100)
#define TIM_LOCKLevel_2   ((uint16_t)0x0200)
#define TIM_LOCKLevel_3   ((uint16_t)0x0300)
#define IS_TIM_LOCK_LEVEL(LEVEL)
#define TIM_OSSIState_Enable   ((uint16_t)0x0400)
#define TIM_OSSIState_Disable   ((uint16_t)0x0000)
#define IS_TIM_OSSI_STATE(STATE)
#define TIM_OSSRState_Enable   ((uint16_t)0x0800)
#define TIM_OSSRState_Disable   ((uint16_t)0x0000)
#define IS_TIM_OSSR_STATE(STATE)
#define TIM_OCIdleState_Set   ((uint16_t)0x0100)
#define TIM_OCIdleState_Reset   ((uint16_t)0x0000)
#define IS_TIM_OCIDLE_STATE(STATE)
#define TIM_OCNIdleState_Set   ((uint16_t)0x0200)
#define TIM_OCNIdleState_Reset   ((uint16_t)0x0000)
#define IS_TIM_OCNIDLE_STATE(STATE)
#define TIM_ICPolarity_Rising   ((uint16_t)0x0000)
#define TIM_ICPolarity_Falling   ((uint16_t)0x0002)
#define TIM_ICPolarity_BothEdge   ((uint16_t)0x000A)
#define IS_TIM_IC_POLARITY(POLARITY)
#define IS_TIM_IC_POLARITY_LITE(POLARITY)
#define TIM_ICSelection_DirectTI   ((uint16_t)0x0001)
#define TIM_ICSelection_IndirectTI   ((uint16_t)0x0002)
#define TIM_ICSelection_TRC   ((uint16_t)0x0003)
#define IS_TIM_IC_SELECTION(SELECTION)
#define TIM_ICPSC_DIV1   ((uint16_t)0x0000)
#define TIM_ICPSC_DIV2   ((uint16_t)0x0004)
#define TIM_ICPSC_DIV4   ((uint16_t)0x0008)
#define TIM_ICPSC_DIV8   ((uint16_t)0x000C)
#define IS_TIM_IC_PRESCALER(PRESCALER)
#define TIM_IT_Update   ((uint16_t)0x0001)
#define TIM_IT_CC1   ((uint16_t)0x0002)
#define TIM_IT_CC2   ((uint16_t)0x0004)
#define TIM_IT_CC3   ((uint16_t)0x0008)
#define TIM_IT_CC4   ((uint16_t)0x0010)
#define TIM_IT_COM   ((uint16_t)0x0020)
#define TIM_IT_Trigger   ((uint16_t)0x0040)
#define TIM_IT_Break   ((uint16_t)0x0080)
#define IS_TIM_IT(IT)   ((((IT) & (uint16_t)0xFF00) == 0x0000) && ((IT) != 0x0000))
#define IS_TIM_GET_IT(IT)
#define TIM_DMABase_CR1   ((uint16_t)0x0000)
#define TIM_DMABase_CR2   ((uint16_t)0x0001)
#define TIM_DMABase_SMCR   ((uint16_t)0x0002)
#define TIM_DMABase_DIER   ((uint16_t)0x0003)
#define TIM_DMABase_SR   ((uint16_t)0x0004)
#define TIM_DMABase_EGR   ((uint16_t)0x0005)
#define TIM_DMABase_CCMR1   ((uint16_t)0x0006)
#define TIM_DMABase_CCMR2   ((uint16_t)0x0007)
#define TIM_DMABase_CCER   ((uint16_t)0x0008)
#define TIM_DMABase_CNT   ((uint16_t)0x0009)
#define TIM_DMABase_PSC   ((uint16_t)0x000A)
#define TIM_DMABase_ARR   ((uint16_t)0x000B)
#define TIM_DMABase_RCR   ((uint16_t)0x000C)
#define TIM_DMABase_CCR1   ((uint16_t)0x000D)
#define TIM_DMABase_CCR2   ((uint16_t)0x000E)
#define TIM_DMABase_CCR3   ((uint16_t)0x000F)
#define TIM_DMABase_CCR4   ((uint16_t)0x0010)
#define TIM_DMABase_BDTR   ((uint16_t)0x0011)
#define TIM_DMABase_DCR   ((uint16_t)0x0012)
#define IS_TIM_DMA_BASE(BASE)
#define TIM_DMABurstLength_1Transfer   ((uint16_t)0x0000)
#define TIM_DMABurstLength_2Transfers   ((uint16_t)0x0100)
#define TIM_DMABurstLength_3Transfers   ((uint16_t)0x0200)
#define TIM_DMABurstLength_4Transfers   ((uint16_t)0x0300)
#define TIM_DMABurstLength_5Transfers   ((uint16_t)0x0400)
#define TIM_DMABurstLength_6Transfers   ((uint16_t)0x0500)
#define TIM_DMABurstLength_7Transfers   ((uint16_t)0x0600)
#define TIM_DMABurstLength_8Transfers   ((uint16_t)0x0700)
#define TIM_DMABurstLength_9Transfers   ((uint16_t)0x0800)
#define TIM_DMABurstLength_10Transfers   ((uint16_t)0x0900)
#define TIM_DMABurstLength_11Transfers   ((uint16_t)0x0A00)
#define TIM_DMABurstLength_12Transfers   ((uint16_t)0x0B00)
#define TIM_DMABurstLength_13Transfers   ((uint16_t)0x0C00)
#define TIM_DMABurstLength_14Transfers   ((uint16_t)0x0D00)
#define TIM_DMABurstLength_15Transfers   ((uint16_t)0x0E00)
#define TIM_DMABurstLength_16Transfers   ((uint16_t)0x0F00)
#define TIM_DMABurstLength_17Transfers   ((uint16_t)0x1000)
#define TIM_DMABurstLength_18Transfers   ((uint16_t)0x1100)
#define IS_TIM_DMA_LENGTH(LENGTH)
#define TIM_DMA_Update   ((uint16_t)0x0100)
#define TIM_DMA_CC1   ((uint16_t)0x0200)
#define TIM_DMA_CC2   ((uint16_t)0x0400)
#define TIM_DMA_CC3   ((uint16_t)0x0800)
#define TIM_DMA_CC4   ((uint16_t)0x1000)
#define TIM_DMA_COM   ((uint16_t)0x2000)
#define TIM_DMA_Trigger   ((uint16_t)0x4000)
#define IS_TIM_DMA_SOURCE(SOURCE)   ((((SOURCE) & (uint16_t)0x80FF) == 0x0000) && ((SOURCE) != 0x0000))
#define TIM_ExtTRGPSC_OFF   ((uint16_t)0x0000)
#define TIM_ExtTRGPSC_DIV2   ((uint16_t)0x1000)
#define TIM_ExtTRGPSC_DIV4   ((uint16_t)0x2000)
#define TIM_ExtTRGPSC_DIV8   ((uint16_t)0x3000)
#define IS_TIM_EXT_PRESCALER(PRESCALER)
#define TIM_TS_ITR0   ((uint16_t)0x0000)
#define TIM_TS_ITR1   ((uint16_t)0x0010)
#define TIM_TS_ITR2   ((uint16_t)0x0020)
#define TIM_TS_ITR3   ((uint16_t)0x0030)
#define TIM_TS_TI1F_ED   ((uint16_t)0x0040)
#define TIM_TS_TI1FP1   ((uint16_t)0x0050)
#define TIM_TS_TI2FP2   ((uint16_t)0x0060)
#define TIM_TS_ETRF   ((uint16_t)0x0070)
#define IS_TIM_TRIGGER_SELECTION(SELECTION)
#define IS_TIM_INTERNAL_TRIGGER_SELECTION(SELECTION)
#define TIM_TIxExternalCLK1Source_TI1   ((uint16_t)0x0050)
#define TIM_TIxExternalCLK1Source_TI2   ((uint16_t)0x0060)
#define TIM_TIxExternalCLK1Source_TI1ED   ((uint16_t)0x0040)
#define IS_TIM_TIXCLK_SOURCE(SOURCE)
#define TIM_ExtTRGPolarity_Inverted   ((uint16_t)0x8000)
#define TIM_ExtTRGPolarity_NonInverted   ((uint16_t)0x0000)
#define IS_TIM_EXT_POLARITY(POLARITY)
#define TIM_PSCReloadMode_Update   ((uint16_t)0x0000)
#define TIM_PSCReloadMode_Immediate   ((uint16_t)0x0001)
#define IS_TIM_PRESCALER_RELOAD(RELOAD)
#define TIM_ForcedAction_Active   ((uint16_t)0x0050)
#define TIM_ForcedAction_InActive   ((uint16_t)0x0040)
#define IS_TIM_FORCED_ACTION(ACTION)
#define TIM_EncoderMode_TI1   ((uint16_t)0x0001)
#define TIM_EncoderMode_TI2   ((uint16_t)0x0002)
#define TIM_EncoderMode_TI12   ((uint16_t)0x0003)
#define IS_TIM_ENCODER_MODE(MODE)
#define TIM_EventSource_Update   ((uint16_t)0x0001)
#define TIM_EventSource_CC1   ((uint16_t)0x0002)
#define TIM_EventSource_CC2   ((uint16_t)0x0004)
#define TIM_EventSource_CC3   ((uint16_t)0x0008)
#define TIM_EventSource_CC4   ((uint16_t)0x0010)
#define TIM_EventSource_COM   ((uint16_t)0x0020)
#define TIM_EventSource_Trigger   ((uint16_t)0x0040)
#define TIM_EventSource_Break   ((uint16_t)0x0080)
#define IS_TIM_EVENT_SOURCE(SOURCE)   ((((SOURCE) & (uint16_t)0xFF00) == 0x0000) && ((SOURCE) != 0x0000))
#define TIM_UpdateSource_Global   ((uint16_t)0x0000)
#define TIM_UpdateSource_Regular   ((uint16_t)0x0001)
#define IS_TIM_UPDATE_SOURCE(SOURCE)
#define TIM_OCPreload_Enable   ((uint16_t)0x0008)
#define TIM_OCPreload_Disable   ((uint16_t)0x0000)
#define IS_TIM_OCPRELOAD_STATE(STATE)
#define TIM_OCFast_Enable   ((uint16_t)0x0004)
#define TIM_OCFast_Disable   ((uint16_t)0x0000)
#define IS_TIM_OCFAST_STATE(STATE)
#define TIM_OCClear_Enable   ((uint16_t)0x0080)
#define TIM_OCClear_Disable   ((uint16_t)0x0000)
#define IS_TIM_OCCLEAR_STATE(STATE)
#define TIM_TRGOSource_Reset   ((uint16_t)0x0000)
#define TIM_TRGOSource_Enable   ((uint16_t)0x0010)
#define TIM_TRGOSource_Update   ((uint16_t)0x0020)
#define TIM_TRGOSource_OC1   ((uint16_t)0x0030)
#define TIM_TRGOSource_OC1Ref   ((uint16_t)0x0040)
#define TIM_TRGOSource_OC2Ref   ((uint16_t)0x0050)
#define TIM_TRGOSource_OC3Ref   ((uint16_t)0x0060)
#define TIM_TRGOSource_OC4Ref   ((uint16_t)0x0070)
#define IS_TIM_TRGO_SOURCE(SOURCE)
#define TIM_SlaveMode_Reset   ((uint16_t)0x0004)
#define TIM_SlaveMode_Gated   ((uint16_t)0x0005)
#define TIM_SlaveMode_Trigger   ((uint16_t)0x0006)
#define TIM_SlaveMode_External1   ((uint16_t)0x0007)
#define IS_TIM_SLAVE_MODE(MODE)
#define TIM_MasterSlaveMode_Enable   ((uint16_t)0x0080)
#define TIM_MasterSlaveMode_Disable   ((uint16_t)0x0000)
#define IS_TIM_MSM_STATE(STATE)
#define TIM_FLAG_Update   ((uint16_t)0x0001)
#define TIM_FLAG_CC1   ((uint16_t)0x0002)
#define TIM_FLAG_CC2   ((uint16_t)0x0004)
#define TIM_FLAG_CC3   ((uint16_t)0x0008)
#define TIM_FLAG_CC4   ((uint16_t)0x0010)
#define TIM_FLAG_COM   ((uint16_t)0x0020)
#define TIM_FLAG_Trigger   ((uint16_t)0x0040)
#define TIM_FLAG_Break   ((uint16_t)0x0080)
#define TIM_FLAG_CC1OF   ((uint16_t)0x0200)
#define TIM_FLAG_CC2OF   ((uint16_t)0x0400)
#define TIM_FLAG_CC3OF   ((uint16_t)0x0800)
#define TIM_FLAG_CC4OF   ((uint16_t)0x1000)
#define IS_TIM_GET_FLAG(FLAG)
#define IS_TIM_CLEAR_FLAG(TIM_FLAG)   ((((TIM_FLAG) & (uint16_t)0xE100) == 0x0000) && ((TIM_FLAG) != 0x0000))
#define IS_TIM_IC_FILTER(ICFILTER)   ((ICFILTER) <= 0xF)
#define IS_TIM_EXT_FILTER(EXTFILTER)   ((EXTFILTER) <= 0xF)
#define TIM_DMABurstLength_1Byte   TIM_DMABurstLength_1Transfer
#define TIM_DMABurstLength_2Bytes   TIM_DMABurstLength_2Transfers
#define TIM_DMABurstLength_3Bytes   TIM_DMABurstLength_3Transfers
#define TIM_DMABurstLength_4Bytes   TIM_DMABurstLength_4Transfers
#define TIM_DMABurstLength_5Bytes   TIM_DMABurstLength_5Transfers
#define TIM_DMABurstLength_6Bytes   TIM_DMABurstLength_6Transfers
#define TIM_DMABurstLength_7Bytes   TIM_DMABurstLength_7Transfers
#define TIM_DMABurstLength_8Bytes   TIM_DMABurstLength_8Transfers
#define TIM_DMABurstLength_9Bytes   TIM_DMABurstLength_9Transfers
#define TIM_DMABurstLength_10Bytes   TIM_DMABurstLength_10Transfers
#define TIM_DMABurstLength_11Bytes   TIM_DMABurstLength_11Transfers
#define TIM_DMABurstLength_12Bytes   TIM_DMABurstLength_12Transfers
#define TIM_DMABurstLength_13Bytes   TIM_DMABurstLength_13Transfers
#define TIM_DMABurstLength_14Bytes   TIM_DMABurstLength_14Transfers
#define TIM_DMABurstLength_15Bytes   TIM_DMABurstLength_15Transfers
#define TIM_DMABurstLength_16Bytes   TIM_DMABurstLength_16Transfers
#define TIM_DMABurstLength_17Bytes   TIM_DMABurstLength_17Transfers
#define TIM_DMABurstLength_18Bytes   TIM_DMABurstLength_18Transfers

Functions

void TIM_DeInit (TIM_TypeDef *TIMx)
 Deinitializes the TIMx peripheral registers to their default reset values.
void TIM_TimeBaseInit (TIM_TypeDef *TIMx, TIM_TimeBaseInitTypeDef *TIM_TimeBaseInitStruct)
 Initializes the TIMx Time Base Unit peripheral according to the specified parameters in the TIM_TimeBaseInitStruct.
void TIM_OC1Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel1 according to the specified parameters in the TIM_OCInitStruct.
void TIM_OC2Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel2 according to the specified parameters in the TIM_OCInitStruct.
void TIM_OC3Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel3 according to the specified parameters in the TIM_OCInitStruct.
void TIM_OC4Init (TIM_TypeDef *TIMx, TIM_OCInitTypeDef *TIM_OCInitStruct)
 Initializes the TIMx Channel4 according to the specified parameters in the TIM_OCInitStruct.
void TIM_ICInit (TIM_TypeDef *TIMx, TIM_ICInitTypeDef *TIM_ICInitStruct)
 Initializes the TIM peripheral according to the specified parameters in the TIM_ICInitStruct.
void TIM_PWMIConfig (TIM_TypeDef *TIMx, TIM_ICInitTypeDef *TIM_ICInitStruct)
 Configures the TIM peripheral according to the specified parameters in the TIM_ICInitStruct to measure an external PWM signal.
void TIM_BDTRConfig (TIM_TypeDef *TIMx, TIM_BDTRInitTypeDef *TIM_BDTRInitStruct)
 Configures the: Break feature, dead time, Lock level, the OSSI, the OSSR State and the AOE(automatic output enable).
void TIM_TimeBaseStructInit (TIM_TimeBaseInitTypeDef *TIM_TimeBaseInitStruct)
 Fills each TIM_TimeBaseInitStruct member with its default value.
void TIM_OCStructInit (TIM_OCInitTypeDef *TIM_OCInitStruct)
 Fills each TIM_OCInitStruct member with its default value.
void TIM_ICStructInit (TIM_ICInitTypeDef *TIM_ICInitStruct)
 Fills each TIM_ICInitStruct member with its default value.
void TIM_BDTRStructInit (TIM_BDTRInitTypeDef *TIM_BDTRInitStruct)
 Fills each TIM_BDTRInitStruct member with its default value.
void TIM_Cmd (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or disables the specified TIM peripheral.
void TIM_CtrlPWMOutputs (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or disables the TIM peripheral Main Outputs.
void TIM_ITConfig (TIM_TypeDef *TIMx, uint16_t TIM_IT, FunctionalState NewState)
 Enables or disables the specified TIM interrupts.
void TIM_GenerateEvent (TIM_TypeDef *TIMx, uint16_t TIM_EventSource)
 Configures the TIMx event to be generate by software.
void TIM_DMAConfig (TIM_TypeDef *TIMx, uint16_t TIM_DMABase, uint16_t TIM_DMABurstLength)
 Configures the TIMx's DMA interface.
void TIM_DMACmd (TIM_TypeDef *TIMx, uint16_t TIM_DMASource, FunctionalState NewState)
 Enables or disables the TIMx's DMA Requests.
void TIM_InternalClockConfig (TIM_TypeDef *TIMx)
 Configures the TIMx internal Clock.
void TIM_ITRxExternalClockConfig (TIM_TypeDef *TIMx, uint16_t TIM_InputTriggerSource)
 Configures the TIMx Internal Trigger as External Clock.
void TIM_TIxExternalClockConfig (TIM_TypeDef *TIMx, uint16_t TIM_TIxExternalCLKSource, uint16_t TIM_ICPolarity, uint16_t ICFilter)
 Configures the TIMx Trigger as External Clock.
void TIM_ETRClockMode1Config (TIM_TypeDef *TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter)
 Configures the External clock Mode1.
void TIM_ETRClockMode2Config (TIM_TypeDef *TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter)
 Configures the External clock Mode2.
void TIM_ETRConfig (TIM_TypeDef *TIMx, uint16_t TIM_ExtTRGPrescaler, uint16_t TIM_ExtTRGPolarity, uint16_t ExtTRGFilter)
 Configures the TIMx External Trigger (ETR).
void TIM_PrescalerConfig (TIM_TypeDef *TIMx, uint16_t Prescaler, uint16_t TIM_PSCReloadMode)
 Configures the TIMx Prescaler.
void TIM_CounterModeConfig (TIM_TypeDef *TIMx, uint16_t TIM_CounterMode)
 Specifies the TIMx Counter Mode to be used.
void TIM_SelectInputTrigger (TIM_TypeDef *TIMx, uint16_t TIM_InputTriggerSource)
 Selects the Input Trigger source.
void TIM_EncoderInterfaceConfig (TIM_TypeDef *TIMx, uint16_t TIM_EncoderMode, uint16_t TIM_IC1Polarity, uint16_t TIM_IC2Polarity)
 Configures the TIMx Encoder Interface.
void TIM_ForcedOC1Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 1 waveform to active or inactive level.
void TIM_ForcedOC2Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 2 waveform to active or inactive level.
void TIM_ForcedOC3Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 3 waveform to active or inactive level.
void TIM_ForcedOC4Config (TIM_TypeDef *TIMx, uint16_t TIM_ForcedAction)
 Forces the TIMx output 4 waveform to active or inactive level.
void TIM_ARRPreloadConfig (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or disables TIMx peripheral Preload register on ARR.
void TIM_SelectCOM (TIM_TypeDef *TIMx, FunctionalState NewState)
 Selects the TIM peripheral Commutation event.
void TIM_SelectCCDMA (TIM_TypeDef *TIMx, FunctionalState NewState)
 Selects the TIMx peripheral Capture Compare DMA source.
void TIM_CCPreloadControl (TIM_TypeDef *TIMx, FunctionalState NewState)
 Sets or Resets the TIM peripheral Capture Compare Preload Control bit.
void TIM_OC1PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR1.
void TIM_OC2PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR2.
void TIM_OC3PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR3.
void TIM_OC4PreloadConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPreload)
 Enables or disables the TIMx peripheral Preload register on CCR4.
void TIM_OC1FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 1 Fast feature.
void TIM_OC2FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 2 Fast feature.
void TIM_OC3FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 3 Fast feature.
void TIM_OC4FastConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCFast)
 Configures the TIMx Output Compare 4 Fast feature.
void TIM_ClearOC1Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF1 signal on an external event.
void TIM_ClearOC2Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF2 signal on an external event.
void TIM_ClearOC3Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF3 signal on an external event.
void TIM_ClearOC4Ref (TIM_TypeDef *TIMx, uint16_t TIM_OCClear)
 Clears or safeguards the OCREF4 signal on an external event.
void TIM_OC1PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 1 polarity.
void TIM_OC1NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 Configures the TIMx Channel 1N polarity.
void TIM_OC2PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 2 polarity.
void TIM_OC2NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 Configures the TIMx Channel 2N polarity.
void TIM_OC3PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 3 polarity.
void TIM_OC3NPolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCNPolarity)
 Configures the TIMx Channel 3N polarity.
void TIM_OC4PolarityConfig (TIM_TypeDef *TIMx, uint16_t TIM_OCPolarity)
 Configures the TIMx channel 4 polarity.
void TIM_CCxCmd (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_CCx)
 Enables or disables the TIM Capture Compare Channel x.
void TIM_CCxNCmd (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_CCxN)
 Enables or disables the TIM Capture Compare Channel xN.
void TIM_SelectOCxM (TIM_TypeDef *TIMx, uint16_t TIM_Channel, uint16_t TIM_OCMode)
 Selects the TIM Output Compare Mode.
void TIM_UpdateDisableConfig (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or Disables the TIMx Update event.
void TIM_UpdateRequestConfig (TIM_TypeDef *TIMx, uint16_t TIM_UpdateSource)
 Configures the TIMx Update Request Interrupt source.
void TIM_SelectHallSensor (TIM_TypeDef *TIMx, FunctionalState NewState)
 Enables or disables the TIMx's Hall sensor interface.
void TIM_SelectOnePulseMode (TIM_TypeDef *TIMx, uint16_t TIM_OPMode)
 Selects the TIMx's One Pulse Mode.
void TIM_SelectOutputTrigger (TIM_TypeDef *TIMx, uint16_t TIM_TRGOSource)
 Selects the TIMx Trigger Output Mode.
void TIM_SelectSlaveMode (TIM_TypeDef *TIMx, uint16_t TIM_SlaveMode)
 Selects the TIMx Slave Mode.
void TIM_SelectMasterSlaveMode (TIM_TypeDef *TIMx, uint16_t TIM_MasterSlaveMode)
 Sets or Resets the TIMx Master/Slave Mode.
void TIM_SetCounter (TIM_TypeDef *TIMx, uint16_t Counter)
 Sets the TIMx Counter Register value.
void TIM_SetAutoreload (TIM_TypeDef *TIMx, uint16_t Autoreload)
 Sets the TIMx Autoreload Register value.
void TIM_SetCompare1 (TIM_TypeDef *TIMx, uint16_t Compare1)
 Sets the TIMx Capture Compare1 Register value.
void TIM_SetCompare2 (TIM_TypeDef *TIMx, uint16_t Compare2)
 Sets the TIMx Capture Compare2 Register value.
void TIM_SetCompare3 (TIM_TypeDef *TIMx, uint16_t Compare3)
 Sets the TIMx Capture Compare3 Register value.
void TIM_SetCompare4 (TIM_TypeDef *TIMx, uint16_t Compare4)
 Sets the TIMx Capture Compare4 Register value.
void TIM_SetIC1Prescaler (TIM_TypeDef *TIMx, uint16_t TIM_ICPSC)
 Sets the TIMx Input Capture 1 prescaler.
void TIM_SetIC2Prescaler (TIM_TypeDef *TIMx, uint16_t TIM_ICPSC)
 Sets the TIMx Input Capture 2 prescaler.
void TIM_SetIC3Prescaler (TIM_TypeDef *TIMx, uint16_t TIM_ICPSC)
 Sets the TIMx Input Capture 3 prescaler.
void TIM_SetIC4Prescaler (TIM_TypeDef *TIMx, uint16_t TIM_ICPSC)
 Sets the TIMx Input Capture 4 prescaler.
void TIM_SetClockDivision (TIM_TypeDef *TIMx, uint16_t TIM_CKD)
 Sets the TIMx Clock Division value.
uint16_t TIM_GetCapture1 (TIM_TypeDef *TIMx)
 Gets the TIMx Input Capture 1 value.
uint16_t TIM_GetCapture2 (TIM_TypeDef *TIMx)
 Gets the TIMx Input Capture 2 value.
uint16_t TIM_GetCapture3 (TIM_TypeDef *TIMx)
 Gets the TIMx Input Capture 3 value.
uint16_t TIM_GetCapture4 (TIM_TypeDef *TIMx)
 Gets the TIMx Input Capture 4 value.
uint16_t TIM_GetCounter (TIM_TypeDef *TIMx)
 Gets the TIMx Counter value.
uint16_t TIM_GetPrescaler (TIM_TypeDef *TIMx)
 Gets the TIMx Prescaler value.
FlagStatus TIM_GetFlagStatus (TIM_TypeDef *TIMx, uint16_t TIM_FLAG)
 Checks whether the specified TIM flag is set or not.
void TIM_ClearFlag (TIM_TypeDef *TIMx, uint16_t TIM_FLAG)
 Clears the TIMx's pending flags.
ITStatus TIM_GetITStatus (TIM_TypeDef *TIMx, uint16_t TIM_IT)
 Checks whether the TIM interrupt has occurred or not.
void TIM_ClearITPendingBit (TIM_TypeDef *TIMx, uint16_t TIM_IT)
 Clears the TIMx's interrupt pending bits.

Detailed Description

This file contains all the functions prototypes for the TIM firmware library.

Author:
MCD Application Team
Version:
V3.5.0
Date:
11-March-2011
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 stm32f10x_tim.h.