STM8L15x Standard Peripherals Drivers: Specific interface management functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

Specific interface management functions

Specific interface management functions. More...

Functions

void TIM2_EncoderInterfaceConfig (TIM2_EncoderMode_TypeDef TIM2_EncoderMode, TIM2_ICPolarity_TypeDef TIM2_IC1Polarity, TIM2_ICPolarity_TypeDef TIM2_IC2Polarity)
 Configures the TIM2 Encoder Interface.
void TIM2_SelectHallSensor (FunctionalState NewState)
 Enables or Disables the TIM�s Hall sensor interface.

Detailed Description

Specific interface management functions.

 ===============================================================================
                    Specific interface management functions
 ===============================================================================  


Function Documentation

void TIM2_EncoderInterfaceConfig ( TIM2_EncoderMode_TypeDef  TIM2_EncoderMode,
TIM2_ICPolarity_TypeDef  TIM2_IC1Polarity,
TIM2_ICPolarity_TypeDef  TIM2_IC2Polarity 
)

Configures the TIM2 Encoder Interface.

Parameters:
TIM2_EncoderMode,:Specifies the TIM2 Encoder Mode. This parameter can be one of the following values:
  • TIM2_EncoderMode_TI1: Encoder mode 1
  • TIM2_EncoderMode_TI2: Encoder mode 2
  • TIM2_EncoderMode_TI12: Encoder mode 3
TIM2_IC1Polarity,:Specifies the IC1 Polarity. This parameter can be one of the following values:
  • TIM2_ICPolarity_Rising: Input Capture on Rising Edge
  • TIM2_ICPolarity_Falling: Input Capture on Falling Edge
TIM2_IC2Polarity,:Specifies the IC2 Polarity. This parameter can be one of the following values:
  • TIM2_ICPolarity_Rising: Input Capture on Rising Edge
  • TIM2_ICPolarity_Falling: Input Capture on Falling Edge
Return values:
None

Definition at line 1952 of file stm8l15x_tim2.c.

References IS_TIM2_ENCODER_MODE, IS_TIM2_IC_POLARITY, TIM2, TIM2_ICPolarity_Falling, TIM_CCER1_CC1P, TIM_CCER1_CC2P, TIM_CCMR_CCxS, TIM_CCMR_TIxDirect_Set, TIM_SMCR_MSM, and TIM_SMCR_TS.

void TIM2_SelectHallSensor ( FunctionalState  NewState)

Enables or Disables the TIM�s Hall sensor interface.

Parameters:
NewState,:The new state of the TIM2 Hall sensor interface. This parameter can be ENABLE or DISABLE
Return values:
None

Definition at line 2009 of file stm8l15x_tim2.c.

References DISABLE, IS_FUNCTIONAL_STATE, TIM2, and TIM_CR2_TI1S.

STM8S Firmware Library: Overview

 

 

 

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