STM8L15x Standard Peripherals Drivers: TIM2_Exported_Macros

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

TIM2_Exported_Macros

Defines

#define IS_TIM2_AUTOMATIC_OUTPUT_STATE(STATE)
 Macro TIM2 AOE Bit Set/Reset.
#define IS_TIM2_BREAK_POLARITY(POLARITY)
 Macro Break Polarity.
#define IS_TIM2_BREAK_STATE(STATE)
 Macro Break Input enable/disable.
#define IS_TIM2_CHANNEL(CHANNEL)
 Macro TIM2 Channel.
#define IS_TIM2_CLEAR_FLAG(FLAG)   ((((FLAG) & (uint16_t)0xE100) == 0x0000) && ((FLAG) != 0x0000))
#define IS_TIM2_COUNTER_MODE(MODE)
 Macro TIM2 Counter Mode.
#define IS_TIM2_DMA_SOURCE(SOURCE)
 Macro TIM2 DMA sources.
#define IS_TIM2_ENCODER_MODE(MODE)
 Macro TIM2 encoder mode.
#define IS_TIM2_EVENT_SOURCE(SOURCE)
 Macro TIM2 event source.
#define IS_TIM2_EXT_FILTER(EXTFILTER)   ((EXTFILTER) <= 0x0F)
 Macro TIM2 External Trigger Filter.
#define IS_TIM2_EXT_POLARITY(POLARITY)
 Macro TIM2 Trigger Polarity.
#define IS_TIM2_EXT_PRESCALER(PRESCALER)
 Macro TIM2 external trigger prescaler.
#define IS_TIM2_FORCED_ACTION(ACTION)
 Macro used by the assert function to check the different functions parameters.
#define IS_TIM2_GET_FLAG(FLAG)
 Macro TIM2 Flags.
#define IS_TIM2_GET_IT(IT)
#define IS_TIM2_IC_FILTER(ICFILTER)   ((ICFILTER) <= 0x0F)
 Macro TIM2 Input Capture Filter Value.
#define IS_TIM2_IC_POLARITY(POLARITY)
 Macro TIM2 IC POLARITY.
#define IS_TIM2_IC_PRESCALER(PRESCALER)
 Macro TIM2 IC PRESCALER.
#define IS_TIM2_IC_SELECTION(SELECTION)
 Macro TIM2 IC SELECTION.
#define IS_TIM2_IT(IT)   ((IT) != 0x00)
 Macro TIM2 Interrupts.
#define IS_TIM2_LOCK_LEVEL(LEVEL)
 Macro Lock levels.
#define IS_TIM2_OC_MODE(MODE)
 Macro TIM2 Output Compare and PWM modes.
#define IS_TIM2_OC_POLARITY(POLARITY)
 Macro TIM2 Output Compare Polarity.
#define IS_TIM2_OCIDLE_STATE(STATE)
 Macro TIM2 OC IDLE STATE.
#define IS_TIM2_OCM(MODE)
#define IS_TIM2_OPM_MODE(MODE)
 Macro TIM2 One Pulse Mode.
#define IS_TIM2_OSSI_STATE(STATE)
 Macro OSSI: Off-State Selection for Idle mode states.
#define IS_TIM2_OUTPUT_STATE(STATE)
 Macro TIM2 Output Compare states.
#define IS_TIM2_PRESCALER(PRESCALER)
 Macro TIM2 Prescaler.
#define IS_TIM2_PRESCALER_RELOAD(RELOAD)
 Macro TIM2 Prescaler Reload.
#define IS_TIM2_SLAVE_MODE(MODE)
 Macro TIM2 Slave mode.
#define IS_TIM2_TIX_TRIGGER_SELECTION(SELECTION)
#define IS_TIM2_TIXCLK_SOURCE(SOURCE)
 Macro TIM2 TIx external Clock Selection.
#define IS_TIM2_TRGO_SOURCE(SOURCE)
 Macro TIM2 TRGO source.
#define IS_TIM2_TRIGGER_SELECTION(SELECTION)
 Macro TIM2 Trigger Selection.
#define IS_TIM2_UPDATE_SOURCE(SOURCE)
 Macro TIM2 update source.

Define Documentation

#define IS_TIM2_AUTOMATIC_OUTPUT_STATE (   STATE)
Value:

Macro TIM2 AOE Bit Set/Reset.

Definition at line 594 of file stm8l15x_tim2.h.

Referenced by TIM2_BKRConfig().

#define IS_TIM2_BREAK_POLARITY (   POLARITY)
Value:
(((POLARITY) == TIM2_BreakPolarity_Low) || \
   ((POLARITY) == TIM2_BreakPolarity_High))

Macro Break Polarity.

Definition at line 587 of file stm8l15x_tim2.h.

Referenced by TIM2_BKRConfig().

#define IS_TIM2_BREAK_STATE (   STATE)
Value:
(((STATE) == TIM2_BreakState_Enable) || \
   ((STATE) == TIM2_BreakState_Disable))

Macro Break Input enable/disable.

Definition at line 580 of file stm8l15x_tim2.h.

Referenced by TIM2_BKRConfig().

#define IS_TIM2_CHANNEL (   CHANNEL)
Value:
(((CHANNEL) == TIM2_Channel_1) || \
   ((CHANNEL) == TIM2_Channel_2) )

Macro TIM2 Channel.

Definition at line 549 of file stm8l15x_tim2.h.

Referenced by TIM2_CCxCmd(), TIM2_ICInit(), TIM2_PWMIConfig(), and TIM2_SelectOCxM().

#define IS_TIM2_CLEAR_FLAG (   FLAG)    ((((FLAG) & (uint16_t)0xE100) == 0x0000) && ((FLAG) != 0x0000))

Definition at line 772 of file stm8l15x_tim2.h.

Referenced by TIM2_ClearFlag().

#define IS_TIM2_COUNTER_MODE (   MODE)
Value:

Macro TIM2 Counter Mode.

Definition at line 556 of file stm8l15x_tim2.h.

Referenced by TIM2_CounterModeConfig(), and TIM2_TimeBaseInit().

#define IS_TIM2_DMA_SOURCE (   SOURCE)
Value:
(((SOURCE) == TIM2_DMASource_Update) || \
   ((SOURCE) == TIM2_DMASource_CC1) || \
   ((SOURCE) == TIM2_DMASource_CC2))

Macro TIM2 DMA sources.

Definition at line 779 of file stm8l15x_tim2.h.

Referenced by TIM2_DMACmd().

#define IS_TIM2_ENCODER_MODE (   MODE)
Value:
(((MODE) == TIM2_EncoderMode_TI1) || \
   ((MODE) == TIM2_EncoderMode_TI2) || \
   ((MODE) == TIM2_EncoderMode_TI12))

Macro TIM2 encoder mode.

Definition at line 723 of file stm8l15x_tim2.h.

Referenced by TIM2_EncoderInterfaceConfig().

#define IS_TIM2_EVENT_SOURCE (   SOURCE)
Value:
((((SOURCE) & (uint8_t)0x18) == 0x00) && \
   ((SOURCE) != 0x00))

Macro TIM2 event source.

Definition at line 731 of file stm8l15x_tim2.h.

Referenced by TIM2_GenerateEvent().

#define IS_TIM2_EXT_FILTER (   EXTFILTER)    ((EXTFILTER) <= 0x0F)

Macro TIM2 External Trigger Filter.

Definition at line 710 of file stm8l15x_tim2.h.

Referenced by TIM2_ETRConfig().

#define IS_TIM2_EXT_POLARITY (   POLARITY)
Value:
(((POLARITY) == TIM2_ExtTRGPolarity_Inverted) || \
   ((POLARITY) == TIM2_ExtTRGPolarity_NonInverted))

Macro TIM2 Trigger Polarity.

Definition at line 703 of file stm8l15x_tim2.h.

Referenced by TIM2_ETRConfig().

#define IS_TIM2_EXT_PRESCALER (   PRESCALER)
Value:
(((PRESCALER) == TIM2_ExtTRGPSC_OFF)  || \
   ((PRESCALER) == TIM2_ExtTRGPSC_DIV2) || \
   ((PRESCALER) == TIM2_ExtTRGPSC_DIV4) || \
   ((PRESCALER) == TIM2_ExtTRGPSC_DIV8))

Macro TIM2 external trigger prescaler.

Definition at line 668 of file stm8l15x_tim2.h.

Referenced by TIM2_ETRConfig().

#define IS_TIM2_FORCED_ACTION (   ACTION)
Value:
(((ACTION) == TIM2_ForcedAction_Active) || \
   ((ACTION) == TIM2_ForcedAction_Inactive))

Macro used by the assert function to check the different functions parameters.

Macro TIM2 Forced Action

Definition at line 502 of file stm8l15x_tim2.h.

Referenced by TIM2_ForcedOC1Config(), and TIM2_ForcedOC2Config().

#define IS_TIM2_GET_FLAG (   FLAG)
Value:
(((FLAG) == TIM2_FLAG_Update)  || \
   ((FLAG) == TIM2_FLAG_CC1)     || \
   ((FLAG) == TIM2_FLAG_CC2)     || \
   ((FLAG) == TIM2_FLAG_Trigger) || \
   ((FLAG) == TIM2_FLAG_Break)   || \
   ((FLAG) == TIM2_FLAG_CC1OF)   || \
   ((FLAG) == TIM2_FLAG_CC2OF))

Macro TIM2 Flags.

Definition at line 763 of file stm8l15x_tim2.h.

Referenced by TIM2_GetFlagStatus().

#define IS_TIM2_GET_IT (   IT)
Value:
(((IT) == TIM2_IT_Update)  || \
   ((IT) == TIM2_IT_CC1)     || \
   ((IT) == TIM2_IT_CC2)     || \
   ((IT) == TIM2_IT_Trigger) || \
   ((IT) == TIM2_IT_Break))

Definition at line 658 of file stm8l15x_tim2.h.

Referenced by TIM2_GetITStatus().

#define IS_TIM2_IC_FILTER (   ICFILTER)    ((ICFILTER) <= 0x0F)

Macro TIM2 Input Capture Filter Value.

Definition at line 649 of file stm8l15x_tim2.h.

Referenced by TI1_Config(), TI2_Config(), and TIM2_TIxExternalClockConfig().

#define IS_TIM2_IC_POLARITY (   POLARITY)
Value:
(((POLARITY) == TIM2_ICPolarity_Rising) || \
   ((POLARITY) == TIM2_ICPolarity_Falling))

Macro TIM2 IC POLARITY.

Definition at line 625 of file stm8l15x_tim2.h.

Referenced by TI1_Config(), TI2_Config(), TIM2_EncoderInterfaceConfig(), and TIM2_TIxExternalClockConfig().

#define IS_TIM2_IC_PRESCALER (   PRESCALER)
Value:
(((PRESCALER) == TIM2_ICPSC_DIV1) || \
   ((PRESCALER) == TIM2_ICPSC_DIV2) || \
   ((PRESCALER) == TIM2_ICPSC_DIV4) || \
   ((PRESCALER) == TIM2_ICPSC_DIV8))

Macro TIM2 IC PRESCALER.

Definition at line 640 of file stm8l15x_tim2.h.

Referenced by TIM2_SetIC1Prescaler(), and TIM2_SetIC2Prescaler().

#define IS_TIM2_IC_SELECTION (   SELECTION)
Value:
(((SELECTION) == TIM2_ICSelection_DirectTI)   || \
   ((SELECTION) == TIM2_ICSelection_IndirectTI) || \
   ((SELECTION) == TIM2_ICSelection_TRGI))

Macro TIM2 IC SELECTION.

Definition at line 632 of file stm8l15x_tim2.h.

Referenced by TI1_Config(), and TI2_Config().

#define IS_TIM2_IT (   IT)    ((IT) != 0x00)

Macro TIM2 Interrupts.

Definition at line 655 of file stm8l15x_tim2.h.

Referenced by TIM2_ClearITPendingBit(), and TIM2_ITConfig().

#define IS_TIM2_LOCK_LEVEL (   LEVEL)
Value:
(((LEVEL) == TIM2_LockLevel_Off) || \
   ((LEVEL) == TIM2_LockLevel_1)   || \
   ((LEVEL) == TIM2_LockLevel_2)   || \
   ((LEVEL) == TIM2_LockLevel_3))

Macro Lock levels.

Definition at line 601 of file stm8l15x_tim2.h.

Referenced by TIM2_BKRConfig().

#define IS_TIM2_OC_MODE (   MODE)
Value:
(((MODE) ==  TIM2_OCMode_Timing)  || \
   ((MODE) == TIM2_OCMode_Active)   || \
   ((MODE) == TIM2_OCMode_Inactive) || \
   ((MODE) == TIM2_OCMode_Toggle)   || \
   ((MODE) == TIM2_OCMode_PWM1)     || \
   ((MODE) == TIM2_OCMode_PWM2))

Macro TIM2 Output Compare and PWM modes.

Definition at line 522 of file stm8l15x_tim2.h.

Referenced by TIM2_OC1Init(), and TIM2_OC2Init().

#define IS_TIM2_OC_POLARITY (   POLARITY)
Value:
(((POLARITY) == TIM2_OCPolarity_High) || \
   ((POLARITY) == TIM2_OCPolarity_Low))

Macro TIM2 Output Compare Polarity.

Definition at line 566 of file stm8l15x_tim2.h.

Referenced by TIM2_OC1Init(), TIM2_OC1PolarityConfig(), TIM2_OC2Init(), and TIM2_OC2PolarityConfig().

#define IS_TIM2_OCIDLE_STATE (   STATE)
Value:
(((STATE) == TIM2_OCIdleState_Set) || \
   ((STATE) == TIM2_OCIdleState_Reset))

Macro TIM2 OC IDLE STATE.

Definition at line 617 of file stm8l15x_tim2.h.

Referenced by TIM2_OC1Init(), and TIM2_OC2Init().

#define IS_TIM2_OCM (   MODE)
Value:
(((MODE) ==  TIM2_OCMode_Timing)  || \
   ((MODE) == TIM2_OCMode_Active)   || \
   ((MODE) == TIM2_OCMode_Inactive) || \
   ((MODE) == TIM2_OCMode_Toggle)   || \
   ((MODE) == TIM2_OCMode_PWM1)     || \
   ((MODE) == TIM2_OCMode_PWM2)     || \
   ((MODE) == (uint8_t)TIM2_ForcedAction_Active) || \
   ((MODE) == (uint8_t)TIM2_ForcedAction_Inactive))

Definition at line 530 of file stm8l15x_tim2.h.

Referenced by TIM2_SelectOCxM().

#define IS_TIM2_OPM_MODE (   MODE)
Value:
(((MODE) == TIM2_OPMode_Single) || \
   ((MODE) == TIM2_OPMode_Repetitive))

Macro TIM2 One Pulse Mode.

Definition at line 542 of file stm8l15x_tim2.h.

Referenced by TIM2_SelectOnePulseMode().

#define IS_TIM2_OSSI_STATE (   STATE)
Value:
(((STATE) == TIM2_OSSIState_Enable) || \
   ((STATE) == TIM2_OSSIState_Disable))

Macro OSSI: Off-State Selection for Idle mode states.

Definition at line 610 of file stm8l15x_tim2.h.

Referenced by TIM2_BKRConfig().

#define IS_TIM2_OUTPUT_STATE (   STATE)
Value:
(((STATE) == TIM2_OutputState_Disable) || \
   ((STATE) == TIM2_OutputState_Enable))

Macro TIM2 Output Compare states.

Definition at line 573 of file stm8l15x_tim2.h.

Referenced by TIM2_OC1Init(), and TIM2_OC2Init().

#define IS_TIM2_PRESCALER (   PRESCALER)
Value:
(((PRESCALER) == TIM2_Prescaler_1)  || \
   ((PRESCALER) == TIM2_Prescaler_2)  || \
   ((PRESCALER) == TIM2_Prescaler_4)  || \
   ((PRESCALER) == TIM2_Prescaler_8)  || \
   ((PRESCALER) == TIM2_Prescaler_16) || \
   ((PRESCALER) == TIM2_Prescaler_32) || \
   ((PRESCALER) == TIM2_Prescaler_64) || \
   ((PRESCALER) == TIM2_Prescaler_128))

Macro TIM2 Prescaler.

Definition at line 509 of file stm8l15x_tim2.h.

Referenced by TIM2_PrescalerConfig(), and TIM2_TimeBaseInit().

#define IS_TIM2_PRESCALER_RELOAD (   RELOAD)
Value:
(((RELOAD) == TIM2_PSCReloadMode_Update) || \
   ((RELOAD) == TIM2_PSCReloadMode_Immediate))

Macro TIM2 Prescaler Reload.

Definition at line 716 of file stm8l15x_tim2.h.

Referenced by TIM2_PrescalerConfig().

#define IS_TIM2_SLAVE_MODE (   MODE)
Value:
(((MODE) == TIM2_SlaveMode_Reset)   || \
   ((MODE) == TIM2_SlaveMode_Gated)   || \
   ((MODE) == TIM2_SlaveMode_Trigger) || \
   ((MODE) == TIM2_SlaveMode_External1))

Macro TIM2 Slave mode.

Definition at line 755 of file stm8l15x_tim2.h.

Referenced by TIM2_SelectSlaveMode().

#define IS_TIM2_TIX_TRIGGER_SELECTION (   SELECTION)
Value:
(((SELECTION) == TIM2_TRGSelection_TI1F_ED) || \
   ((SELECTION) == TIM2_TRGSelection_TI1FP1)  || \
   ((SELECTION) == TIM2_TRGSelection_TI2FP2))

Definition at line 687 of file stm8l15x_tim2.h.

#define IS_TIM2_TIXCLK_SOURCE (   SOURCE)
Value:

Macro TIM2 TIx external Clock Selection.

Definition at line 695 of file stm8l15x_tim2.h.

Referenced by TIM2_TIxExternalClockConfig().

#define IS_TIM2_TRGO_SOURCE (   SOURCE)
Value:
(((SOURCE) == TIM2_TRGOSource_Reset)  || \
   ((SOURCE) == TIM2_TRGOSource_Enable) || \
   ((SOURCE) == TIM2_TRGOSource_Update) || \
   ((SOURCE) == TIM2_TRGOSource_OC1)    || \
   ((SOURCE) == TIM2_TRGOSource_OC1REF) || \
   ((SOURCE) == TIM2_TRGOSource_OC2REF))

Macro TIM2 TRGO source.

Definition at line 745 of file stm8l15x_tim2.h.

Referenced by TIM2_SelectOutputTrigger().

#define IS_TIM2_TRIGGER_SELECTION (   SELECTION)
Value:
(((SELECTION) == TIM2_TRGSelection_TIM4) || \
   ((SELECTION) == TIM2_TRGSelection_TIM1) || \
   ((SELECTION) == TIM2_TRGSelection_TIM3) || \
   ((SELECTION) == TIM2_TRGSelection_TIM5) || \
   ((SELECTION) == TIM2_TRGSelection_TI1F_ED) || \
   ((SELECTION) == TIM2_TRGSelection_TI1FP1)  || \
   ((SELECTION) == TIM2_TRGSelection_TI2FP2)  || \
   ((SELECTION) == TIM2_TRGSelection_ETRF))

Macro TIM2 Trigger Selection.

Definition at line 676 of file stm8l15x_tim2.h.

Referenced by TIM2_SelectInputTrigger().

#define IS_TIM2_UPDATE_SOURCE (   SOURCE)
Value:
(((SOURCE) == TIM2_UpdateSource_Global) || \
   ((SOURCE) == TIM2_UpdateSource_Regular))

Macro TIM2 update source.

Definition at line 738 of file stm8l15x_tim2.h.

Referenced by TIM2_UpdateRequestConfig().

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com