STM8S/A Standard Peripherals Drivers
|
This file contains all functions prototype and macros for the TIM1 peripheral. More...
#include "stm8s.h"
Go to the source code of this file.
Defines | |
#define | IS_TIM1_AUTOMATIC_OUTPUT_STATE_OK(STATE) |
#define | IS_TIM1_BREAK_POLARITY_OK(POLARITY) |
#define | IS_TIM1_BREAK_STATE_OK(STATE) |
#define | IS_TIM1_CHANNEL_OK(CHANNEL) |
#define | IS_TIM1_CLEAR_FLAG_OK(FLAG) ((((uint16_t)(FLAG) & (uint16_t)0xE100) == 0x0000) && ((FLAG) != 0x0000)) |
#define | IS_TIM1_COMPLEMENTARY_CHANNEL_OK(CHANNEL) |
#define | IS_TIM1_COUNTER_MODE_OK(MODE) |
#define | IS_TIM1_ENCODER_MODE_OK(MODE) |
#define | IS_TIM1_EVENT_SOURCE_OK(SOURCE) ((SOURCE) != 0x00) |
#define | IS_TIM1_EXT_POLARITY_OK(POLARITY) |
#define | IS_TIM1_EXT_PRESCALER_OK(PRESCALER) |
#define | IS_TIM1_EXT_TRG_FILTER_OK(FILTER) ((FILTER) <= 0x0F) |
TIM1 External Trigger Filer Value. | |
#define | IS_TIM1_FORCED_ACTION_OK(ACTION) |
#define | IS_TIM1_GET_FLAG_OK(FLAG) |
#define | IS_TIM1_GET_IT_OK(IT) |
#define | IS_TIM1_IC_FILTER_OK(ICFILTER) ((ICFILTER) <= 0x0F) |
TIM1 Input Capture Filer Value. | |
#define | IS_TIM1_IC_POLARITY_OK(POLARITY) |
#define | IS_TIM1_IC_PRESCALER_OK(PRESCALER) |
#define | IS_TIM1_IC_SELECTION_OK(SELECTION) |
#define | IS_TIM1_IT_OK(IT) ((IT) != 0x00) |
#define | IS_TIM1_LOCK_LEVEL_OK(LEVEL) |
#define | IS_TIM1_OC_MODE_OK(MODE) |
#define | IS_TIM1_OC_POLARITY_OK(POLARITY) |
#define | IS_TIM1_OCIDLE_STATE_OK(STATE) |
#define | IS_TIM1_OCM_OK(MODE) |
#define | IS_TIM1_OCN_POLARITY_OK(POLARITY) |
#define | IS_TIM1_OCNIDLE_STATE_OK(STATE) |
#define | IS_TIM1_OPM_MODE_OK(MODE) |
#define | IS_TIM1_OSSI_STATE_OK(STATE) |
#define | IS_TIM1_OUTPUT_STATE_OK(STATE) |
#define | IS_TIM1_OUTPUTN_STATE_OK(STATE) |
#define | IS_TIM1_PRESCALER_RELOAD_OK(RELOAD) |
#define | IS_TIM1_PWMI_CHANNEL_OK(CHANNEL) |
#define | IS_TIM1_SLAVE_MODE_OK(MODE) |
#define | IS_TIM1_TIX_TRIGGER_SELECTION_OK(SELECTION) |
#define | IS_TIM1_TIXCLK_SOURCE_OK(SOURCE) |
#define | IS_TIM1_TRGO_SOURCE_OK(SOURCE) |
#define | IS_TIM1_TRIGGER_SELECTION_OK(SELECTION) |
#define | IS_TIM1_UPDATE_SOURCE_OK(SOURCE) |
Enumerations | |
enum | TIM1_AutomaticOutput_TypeDef { TIM1_AUTOMATICOUTPUT_ENABLE = ((uint8_t)0x40), TIM1_AUTOMATICOUTPUT_DISABLE = ((uint8_t)0x00) } |
TIM1 AOE Bit Set/Reset. More... | |
enum | TIM1_BreakPolarity_TypeDef { TIM1_BREAKPOLARITY_LOW = ((uint8_t)0x00), TIM1_BREAKPOLARITY_HIGH = ((uint8_t)0x20) } |
TIM1 Break Polarity. More... | |
enum | TIM1_BreakState_TypeDef { TIM1_BREAK_ENABLE = ((uint8_t)0x10), TIM1_BREAK_DISABLE = ((uint8_t)0x00) } |
TIM1 Break Input enable/disable. More... | |
enum | TIM1_Channel_TypeDef { TIM1_CHANNEL_1 = ((uint8_t)0x00), TIM1_CHANNEL_2 = ((uint8_t)0x01), TIM1_CHANNEL_3 = ((uint8_t)0x02), TIM1_CHANNEL_4 = ((uint8_t)0x03) } |
TIM1 Channel. More... | |
enum | TIM1_CounterMode_TypeDef { TIM1_COUNTERMODE_UP = ((uint8_t)0x00), TIM1_COUNTERMODE_DOWN = ((uint8_t)0x10), TIM1_COUNTERMODE_CENTERALIGNED1 = ((uint8_t)0x20), TIM1_COUNTERMODE_CENTERALIGNED2 = ((uint8_t)0x40), TIM1_COUNTERMODE_CENTERALIGNED3 = ((uint8_t)0x60) } |
TIM1 Counter Mode. More... | |
enum | TIM1_EncoderMode_TypeDef { TIM1_ENCODERMODE_TI1 = ((uint8_t)0x01), TIM1_ENCODERMODE_TI2 = ((uint8_t)0x02), TIM1_ENCODERMODE_TI12 = ((uint8_t)0x03) } |
TIM1 Encoder Mode. More... | |
enum | TIM1_EventSource_TypeDef { TIM1_EVENTSOURCE_UPDATE = ((uint8_t)0x01), TIM1_EVENTSOURCE_CC1 = ((uint8_t)0x02), TIM1_EVENTSOURCE_CC2 = ((uint8_t)0x04), TIM1_EVENTSOURCE_CC3 = ((uint8_t)0x08), TIM1_EVENTSOURCE_CC4 = ((uint8_t)0x10), TIM1_EVENTSOURCE_COM = ((uint8_t)0x20), TIM1_EVENTSOURCE_TRIGGER = ((uint8_t)0x40), TIM1_EVENTSOURCE_BREAK = ((uint8_t)0x80) } |
TIM1 Event Source. More... | |
enum | TIM1_ExtTRGPolarity_TypeDef { TIM1_EXTTRGPOLARITY_INVERTED = ((uint8_t)0x80), TIM1_EXTTRGPOLARITY_NONINVERTED = ((uint8_t)0x00) } |
TIM1 External Trigger Polarity. More... | |
enum | TIM1_ExtTRGPSC_TypeDef { TIM1_EXTTRGPSC_OFF = ((uint8_t)0x00), TIM1_EXTTRGPSC_DIV2 = ((uint8_t)0x10), TIM1_EXTTRGPSC_DIV4 = ((uint8_t)0x20), TIM1_EXTTRGPSC_DIV8 = ((uint8_t)0x30) } |
TIM1 External Trigger Prescaler. More... | |
enum | TIM1_FLAG_TypeDef { TIM1_FLAG_UPDATE = ((uint16_t)0x0001), TIM1_FLAG_CC1 = ((uint16_t)0x0002), TIM1_FLAG_CC2 = ((uint16_t)0x0004), TIM1_FLAG_CC3 = ((uint16_t)0x0008), TIM1_FLAG_CC4 = ((uint16_t)0x0010), TIM1_FLAG_COM = ((uint16_t)0x0020), TIM1_FLAG_TRIGGER = ((uint16_t)0x0040), TIM1_FLAG_BREAK = ((uint16_t)0x0080), TIM1_FLAG_CC1OF = ((uint16_t)0x0200), TIM1_FLAG_CC2OF = ((uint16_t)0x0400), TIM1_FLAG_CC3OF = ((uint16_t)0x0800), TIM1_FLAG_CC4OF = ((uint16_t)0x1000) } |
TIM1 Flags. More... | |
enum | TIM1_ForcedAction_TypeDef { TIM1_FORCEDACTION_ACTIVE = ((uint8_t)0x50), TIM1_FORCEDACTION_INACTIVE = ((uint8_t)0x40) } |
TIM1 Forced Action. More... | |
enum | TIM1_ICPolarity_TypeDef { TIM1_ICPOLARITY_RISING = ((uint8_t)0x00), TIM1_ICPOLARITY_FALLING = ((uint8_t)0x01) } |
TIM1 Input Capture Polarity. More... | |
enum | TIM1_ICPSC_TypeDef { TIM1_ICPSC_DIV1 = ((uint8_t)0x00), TIM1_ICPSC_DIV2 = ((uint8_t)0x04), TIM1_ICPSC_DIV4 = ((uint8_t)0x08), TIM1_ICPSC_DIV8 = ((uint8_t)0x0C) } |
TIM1 Input Capture Prescaler. More... | |
enum | TIM1_ICSelection_TypeDef { TIM1_ICSELECTION_DIRECTTI = ((uint8_t)0x01), TIM1_ICSELECTION_INDIRECTTI = ((uint8_t)0x02), TIM1_ICSELECTION_TRGI = ((uint8_t)0x03) } |
TIM1 Input Capture Selection. More... | |
enum | TIM1_IT_TypeDef { TIM1_IT_UPDATE = ((uint8_t)0x01), TIM1_IT_CC1 = ((uint8_t)0x02), TIM1_IT_CC2 = ((uint8_t)0x04), TIM1_IT_CC3 = ((uint8_t)0x08), TIM1_IT_CC4 = ((uint8_t)0x10), TIM1_IT_COM = ((uint8_t)0x20), TIM1_IT_TRIGGER = ((uint8_t)0x40), TIM1_IT_BREAK = ((uint8_t)0x80) } |
TIM1 interrupt sources. More... | |
enum | TIM1_LockLevel_TypeDef { TIM1_LOCKLEVEL_OFF = ((uint8_t)0x00), TIM1_LOCKLEVEL_1 = ((uint8_t)0x01), TIM1_LOCKLEVEL_2 = ((uint8_t)0x02), TIM1_LOCKLEVEL_3 = ((uint8_t)0x03) } |
TIM1 Lock levels. More... | |
enum | TIM1_OCIdleState_TypeDef { TIM1_OCIDLESTATE_SET = ((uint8_t)0x55), TIM1_OCIDLESTATE_RESET = ((uint8_t)0x00) } |
TIM1 Output Compare Idle State. More... | |
enum | TIM1_OCMode_TypeDef { TIM1_OCMODE_TIMING = ((uint8_t)0x00), TIM1_OCMODE_ACTIVE = ((uint8_t)0x10), TIM1_OCMODE_INACTIVE = ((uint8_t)0x20), TIM1_OCMODE_TOGGLE = ((uint8_t)0x30), TIM1_OCMODE_PWM1 = ((uint8_t)0x60), TIM1_OCMODE_PWM2 = ((uint8_t)0x70) } |
TIM1 Output Compare and PWM modes. More... | |
enum | TIM1_OCNIdleState_TypeDef { TIM1_OCNIDLESTATE_SET = ((uint8_t)0x2A), TIM1_OCNIDLESTATE_RESET = ((uint8_t)0x00) } |
TIM1 Output Compare N Idle State. More... | |
enum | TIM1_OCNPolarity_TypeDef { TIM1_OCNPOLARITY_HIGH = ((uint8_t)0x00), TIM1_OCNPOLARITY_LOW = ((uint8_t)0x88) } |
TIM1 Output Compare N Polarity. More... | |
enum | TIM1_OCPolarity_TypeDef { TIM1_OCPOLARITY_HIGH = ((uint8_t)0x00), TIM1_OCPOLARITY_LOW = ((uint8_t)0x22) } |
TIM1 Output Compare Polarity. More... | |
enum | TIM1_OPMode_TypeDef { TIM1_OPMODE_SINGLE = ((uint8_t)0x01), TIM1_OPMODE_REPETITIVE = ((uint8_t)0x00) } |
TIM1 One Pulse Mode. More... | |
enum | TIM1_OSSIState_TypeDef { TIM1_OSSISTATE_ENABLE = ((uint8_t)0x04), TIM1_OSSISTATE_DISABLE = ((uint8_t)0x00) } |
TIM1 OSSI: Off-State Selection for Idle mode states. More... | |
enum | TIM1_OutputNState_TypeDef { TIM1_OUTPUTNSTATE_DISABLE = ((uint8_t)0x00), TIM1_OUTPUTNSTATE_ENABLE = ((uint8_t)0x44) } |
TIM1 Output Compare N States. More... | |
enum | TIM1_OutputState_TypeDef { TIM1_OUTPUTSTATE_DISABLE = ((uint8_t)0x00), TIM1_OUTPUTSTATE_ENABLE = ((uint8_t)0x11) } |
TIM1 Output Compare states. More... | |
enum | TIM1_PSCReloadMode_TypeDef { TIM1_PSCRELOADMODE_UPDATE = ((uint8_t)0x00), TIM1_PSCRELOADMODE_IMMEDIATE = ((uint8_t)0x01) } |
TIM1 Prescaler Reload Mode. More... | |
enum | TIM1_SlaveMode_TypeDef { TIM1_SLAVEMODE_RESET = ((uint8_t)0x04), TIM1_SLAVEMODE_GATED = ((uint8_t)0x05), TIM1_SLAVEMODE_TRIGGER = ((uint8_t)0x06), TIM1_SLAVEMODE_EXTERNAL1 = ((uint8_t)0x07) } |
TIM1 Slave Mode. More... | |
enum | TIM1_TIxExternalCLK1Source_TypeDef { TIM1_TIXEXTERNALCLK1SOURCE_TI1ED = ((uint8_t)0x40), TIM1_TIXEXTERNALCLK1SOURCE_TI1 = ((uint8_t)0x50), TIM1_TIXEXTERNALCLK1SOURCE_TI2 = ((uint8_t)0x60) } |
TIM1 TIx External Clock Source. More... | |
enum | TIM1_TRGOSource_TypeDef { TIM1_TRGOSOURCE_RESET = ((uint8_t)0x00), TIM1_TRGOSOURCE_ENABLE = ((uint8_t)0x10), TIM1_TRGOSOURCE_UPDATE = ((uint8_t)0x20), TIM1_TRGOSource_OC1 = ((uint8_t)0x30), TIM1_TRGOSOURCE_OC1REF = ((uint8_t)0x40), TIM1_TRGOSOURCE_OC2REF = ((uint8_t)0x50), TIM1_TRGOSOURCE_OC3REF = ((uint8_t)0x60) } |
TIM1 Trigger Output Source. More... | |
enum | TIM1_TS_TypeDef { TIM1_TS_TIM6 = ((uint8_t)0x00), TIM1_TS_TIM5 = ((uint8_t)0x30), TIM1_TS_TI1F_ED = ((uint8_t)0x40), TIM1_TS_TI1FP1 = ((uint8_t)0x50), TIM1_TS_TI2FP2 = ((uint8_t)0x60), TIM1_TS_ETRF = ((uint8_t)0x70) } |
TIM1 Internal Trigger Selection. More... | |
enum | TIM1_UpdateSource_TypeDef { TIM1_UPDATESOURCE_GLOBAL = ((uint8_t)0x00), TIM1_UPDATESOURCE_REGULAR = ((uint8_t)0x01) } |
TIM1 Update Source. More... | |
Functions | |
void | TIM1_ARRPreloadConfig (FunctionalState NewState) |
Enables or disables TIM1 peripheral Preload register on ARR. | |
void | TIM1_BDTRConfig (TIM1_OSSIState_TypeDef TIM1_OSSIState, TIM1_LockLevel_TypeDef TIM1_LockLevel, uint8_t TIM1_DeadTime, TIM1_BreakState_TypeDef TIM1_Break, TIM1_BreakPolarity_TypeDef TIM1_BreakPolarity, TIM1_AutomaticOutput_TypeDef TIM1_AutomaticOutput) |
Configures the Break feature, dead time, Lock level, the OSSI, and the AOE(automatic output enable). | |
void | TIM1_CCPreloadControl (FunctionalState NewState) |
Sets or Resets the TIM1 peripheral Capture Compare Preload Control bit. | |
void | TIM1_CCxCmd (TIM1_Channel_TypeDef TIM1_Channel, FunctionalState NewState) |
Enables or disables the TIM1 Capture Compare Channel x (x=1,..,4). | |
void | TIM1_CCxNCmd (TIM1_Channel_TypeDef TIM1_Channel, FunctionalState NewState) |
Enables or disables the TIM1 Capture Compare Channel xN (xN=1,..,3). | |
void | TIM1_ClearFlag (TIM1_FLAG_TypeDef TIM1_FLAG) |
Clears the TIM1�s pending flags. | |
void | TIM1_ClearITPendingBit (TIM1_IT_TypeDef TIM1_IT) |
Clears the TIM1's interrupt pending bits. | |
void | TIM1_Cmd (FunctionalState NewState) |
Enables or disables the TIM1 peripheral. | |
void | TIM1_CounterModeConfig (TIM1_CounterMode_TypeDef TIM1_CounterMode) |
Specifies the TIM1 Counter Mode to be used. | |
void | TIM1_CtrlPWMOutputs (FunctionalState NewState) |
Enables or disables the TIM1 peripheral Main Outputs. | |
void | TIM1_DeInit (void) |
Deinitializes the TIM1 peripheral registers to their default reset values. | |
void | TIM1_EncoderInterfaceConfig (TIM1_EncoderMode_TypeDef TIM1_EncoderMode, TIM1_ICPolarity_TypeDef TIM1_IC1Polarity, TIM1_ICPolarity_TypeDef TIM1_IC2Polarity) |
Configures the TIM1 Encoder Interface. | |
void | TIM1_ETRClockMode1Config (TIM1_ExtTRGPSC_TypeDef TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity_TypeDef TIM1_ExtTRGPolarity, uint8_t ExtTRGFilter) |
Configures the TIM1 External clock Mode1. | |
void | TIM1_ETRClockMode2Config (TIM1_ExtTRGPSC_TypeDef TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity_TypeDef TIM1_ExtTRGPolarity, uint8_t ExtTRGFilter) |
Configures the TIM1 External clock Mode2. | |
void | TIM1_ETRConfig (TIM1_ExtTRGPSC_TypeDef TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity_TypeDef TIM1_ExtTRGPolarity, uint8_t ExtTRGFilter) |
Configures the TIM1 External Trigger. | |
void | TIM1_ForcedOC1Config (TIM1_ForcedAction_TypeDef TIM1_ForcedAction) |
Forces the TIM1 Channel1 output waveform to active or inactive level. | |
void | TIM1_ForcedOC2Config (TIM1_ForcedAction_TypeDef TIM1_ForcedAction) |
Forces the TIM1 Channel2 output waveform to active or inactive level. | |
void | TIM1_ForcedOC3Config (TIM1_ForcedAction_TypeDef TIM1_ForcedAction) |
Forces the TIM1 Channel3 output waveform to active or inactive level. | |
void | TIM1_ForcedOC4Config (TIM1_ForcedAction_TypeDef TIM1_ForcedAction) |
Forces the TIM1 Channel4 output waveform to active or inactive level. | |
void | TIM1_GenerateEvent (TIM1_EventSource_TypeDef TIM1_EventSource) |
Configures the TIM1 event to be generated by software. | |
uint16_t | TIM1_GetCapture1 (void) |
Gets the TIM1 Input Capture 1 value. | |
uint16_t | TIM1_GetCapture2 (void) |
Gets the TIM1 Input Capture 2 value. | |
uint16_t | TIM1_GetCapture3 (void) |
Gets the TIM1 Input Capture 3 value. | |
uint16_t | TIM1_GetCapture4 (void) |
Gets the TIM1 Input Capture 4 value. | |
uint16_t | TIM1_GetCounter (void) |
Gets the TIM1 Counter value. | |
FlagStatus | TIM1_GetFlagStatus (TIM1_FLAG_TypeDef TIM1_FLAG) |
Checks whether the specified TIM1 flag is set or not. | |
ITStatus | TIM1_GetITStatus (TIM1_IT_TypeDef TIM1_IT) |
Checks whether the TIM1 interrupt has occurred or not. | |
uint16_t | TIM1_GetPrescaler (void) |
Gets the TIM1 Prescaler value. | |
void | TIM1_ICInit (TIM1_Channel_TypeDef TIM1_Channel, TIM1_ICPolarity_TypeDef TIM1_ICPolarity, TIM1_ICSelection_TypeDef TIM1_ICSelection, TIM1_ICPSC_TypeDef TIM1_ICPrescaler, uint8_t TIM1_ICFilter) |
Initializes the TIM1 peripheral according to the specified parameters. | |
void | TIM1_InternalClockConfig (void) |
Configures the TIM1 internal Clock. | |
void | TIM1_ITConfig (TIM1_IT_TypeDef TIM1_IT, FunctionalState NewState) |
Enables or disables the specified TIM1 interrupts. | |
void | TIM1_OC1FastConfig (FunctionalState NewState) |
Configures the TIM1 Capture Compare 1 Fast feature. | |
void | TIM1_OC1Init (TIM1_OCMode_TypeDef TIM1_OCMode, TIM1_OutputState_TypeDef TIM1_OutputState, TIM1_OutputNState_TypeDef TIM1_OutputNState, uint16_t TIM1_Pulse, TIM1_OCPolarity_TypeDef TIM1_OCPolarity, TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity, TIM1_OCIdleState_TypeDef TIM1_OCIdleState, TIM1_OCNIdleState_TypeDef TIM1_OCNIdleState) |
Initializes the TIM1 Channel1 according to the specified parameters. | |
void | TIM1_OC1NPolarityConfig (TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity) |
Configures the TIM1 Channel 1N polarity. | |
void | TIM1_OC1PolarityConfig (TIM1_OCPolarity_TypeDef TIM1_OCPolarity) |
Configures the TIM1 Channel 1 polarity. | |
void | TIM1_OC1PreloadConfig (FunctionalState NewState) |
Enables or disables the TIM1 peripheral Preload Register on CCR1. | |
void | TIM1_OC2FastConfig (FunctionalState NewState) |
Configures the TIM1 Capture Compare 2 Fast feature. | |
void | TIM1_OC2Init (TIM1_OCMode_TypeDef TIM1_OCMode, TIM1_OutputState_TypeDef TIM1_OutputState, TIM1_OutputNState_TypeDef TIM1_OutputNState, uint16_t TIM1_Pulse, TIM1_OCPolarity_TypeDef TIM1_OCPolarity, TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity, TIM1_OCIdleState_TypeDef TIM1_OCIdleState, TIM1_OCNIdleState_TypeDef TIM1_OCNIdleState) |
Initializes the TIM1 Channel2 according to the specified parameters. | |
void | TIM1_OC2NPolarityConfig (TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity) |
Configures the TIM1 Channel 2N polarity. | |
void | TIM1_OC2PolarityConfig (TIM1_OCPolarity_TypeDef TIM1_OCPolarity) |
Configures the TIM1 Channel 2 polarity. | |
void | TIM1_OC2PreloadConfig (FunctionalState NewState) |
Enables or disables the TIM1 peripheral Preload Register on CCR2. | |
void | TIM1_OC3FastConfig (FunctionalState NewState) |
Configures the TIM1 Capture Compare 3 Fast feature. | |
void | TIM1_OC3Init (TIM1_OCMode_TypeDef TIM1_OCMode, TIM1_OutputState_TypeDef TIM1_OutputState, TIM1_OutputNState_TypeDef TIM1_OutputNState, uint16_t TIM1_Pulse, TIM1_OCPolarity_TypeDef TIM1_OCPolarity, TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity, TIM1_OCIdleState_TypeDef TIM1_OCIdleState, TIM1_OCNIdleState_TypeDef TIM1_OCNIdleState) |
Initializes the TIM1 Channel3 according to the specified parameters. | |
void | TIM1_OC3NPolarityConfig (TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity) |
Configures the TIM1 Channel 3N polarity. | |
void | TIM1_OC3PolarityConfig (TIM1_OCPolarity_TypeDef TIM1_OCPolarity) |
Configures the TIM1 Channel 3 polarity. | |
void | TIM1_OC3PreloadConfig (FunctionalState NewState) |
Enables or disables the TIM1 peripheral Preload Register on CCR3. | |
void | TIM1_OC4FastConfig (FunctionalState NewState) |
Configures the TIM1 Capture Compare 4 Fast feature. | |
void | TIM1_OC4Init (TIM1_OCMode_TypeDef TIM1_OCMode, TIM1_OutputState_TypeDef TIM1_OutputState, uint16_t TIM1_Pulse, TIM1_OCPolarity_TypeDef TIM1_OCPolarity, TIM1_OCIdleState_TypeDef TIM1_OCIdleState) |
Initializes the TIM1 Channel4 according to the specified parameters. | |
void | TIM1_OC4PolarityConfig (TIM1_OCPolarity_TypeDef TIM1_OCPolarity) |
Configures the TIM1 Channel 4 polarity. | |
void | TIM1_OC4PreloadConfig (FunctionalState NewState) |
Enables or disables the TIM1 peripheral Preload Register on CCR4. | |
void | TIM1_PrescalerConfig (uint16_t Prescaler, TIM1_PSCReloadMode_TypeDef TIM1_PSCReloadMode) |
Configures the TIM1 Prescaler. | |
void | TIM1_PWMIConfig (TIM1_Channel_TypeDef TIM1_Channel, TIM1_ICPolarity_TypeDef TIM1_ICPolarity, TIM1_ICSelection_TypeDef TIM1_ICSelection, TIM1_ICPSC_TypeDef TIM1_ICPrescaler, uint8_t TIM1_ICFilter) |
Configures the TIM1 peripheral in PWM Input Mode according to the specified parameters. | |
void | TIM1_SelectCOM (FunctionalState NewState) |
Selects the TIM1 peripheral Commutation event. | |
void | TIM1_SelectHallSensor (FunctionalState NewState) |
Enables or Disables the TIM1�s Hall sensor interface. | |
void | TIM1_SelectInputTrigger (TIM1_TS_TypeDef TIM1_InputTriggerSource) |
Selects the TIM1 Input Trigger source. | |
void | TIM1_SelectMasterSlaveMode (FunctionalState NewState) |
Sets or Resets the TIM1 Master/Slave Mode. | |
void | TIM1_SelectOCxM (TIM1_Channel_TypeDef TIM1_Channel, TIM1_OCMode_TypeDef TIM1_OCMode) |
Selects the TIM1 Output Compare Mode. | |
void | TIM1_SelectOnePulseMode (TIM1_OPMode_TypeDef TIM1_OPMode) |
Selects the TIM1�s One Pulse Mode. | |
void | TIM1_SelectOutputTrigger (TIM1_TRGOSource_TypeDef TIM1_TRGOSource) |
Selects the TIM1 Trigger Output Mode. | |
void | TIM1_SelectSlaveMode (TIM1_SlaveMode_TypeDef TIM1_SlaveMode) |
Selects the TIM1 Slave Mode. | |
void | TIM1_SetAutoreload (uint16_t Autoreload) |
Sets the TIM1 Autoreload Register value. | |
void | TIM1_SetCompare1 (uint16_t Compare1) |
Sets the TIM1 Capture Compare1 Register value. | |
void | TIM1_SetCompare2 (uint16_t Compare2) |
Sets the TIM1 Capture Compare2 Register value. | |
void | TIM1_SetCompare3 (uint16_t Compare3) |
Sets the TIM1 Capture Compare3 Register value. | |
void | TIM1_SetCompare4 (uint16_t Compare4) |
Sets the TIM1 Capture Compare4 Register value. | |
void | TIM1_SetCounter (uint16_t Counter) |
Sets the TIM1 Counter Register value. | |
void | TIM1_SetIC1Prescaler (TIM1_ICPSC_TypeDef TIM1_IC1Prescaler) |
Sets the TIM1 Input Capture 1 prescaler. | |
void | TIM1_SetIC2Prescaler (TIM1_ICPSC_TypeDef TIM1_IC2Prescaler) |
Sets the TIM1 Input Capture 2 prescaler. | |
void | TIM1_SetIC3Prescaler (TIM1_ICPSC_TypeDef TIM1_IC3Prescaler) |
Sets the TIM1 Input Capture 3 prescaler. | |
void | TIM1_SetIC4Prescaler (TIM1_ICPSC_TypeDef TIM1_IC4Prescaler) |
Sets the TIM1 Input Capture 4 prescaler. | |
void | TIM1_TimeBaseInit (uint16_t TIM1_Prescaler, TIM1_CounterMode_TypeDef TIM1_CounterMode, uint16_t TIM1_Period, uint8_t TIM1_RepetitionCounter) |
Initializes the TIM1 Time Base Unit according to the specified parameters. | |
void | TIM1_TIxExternalClockConfig (TIM1_TIxExternalCLK1Source_TypeDef TIM1_TIxExternalCLKSource, TIM1_ICPolarity_TypeDef TIM1_ICPolarity, uint8_t ICFilter) |
Configures the TIM1 Trigger as External Clock. | |
void | TIM1_UpdateDisableConfig (FunctionalState NewState) |
Enables or Disables the TIM1 Update event. | |
void | TIM1_UpdateRequestConfig (TIM1_UpdateSource_TypeDef TIM1_UpdateSource) |
Selects the TIM1 Update Request Interrupt source. |
Detailed Description
This file contains all functions prototype and macros for the TIM1 peripheral.
- Attention:
© COPYRIGHT 2014 STMicroelectronics
Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.st.com/software_license_agreement_liberty_v2
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file stm8s_tim1.h.