|
STM8L15x Standard Peripherals Drivers
|
IRTIM configuration functions. More...
Functions | |
| void | IRTIM_Cmd (FunctionalState NewState) |
| Enables or disables the IRTIM peripheral. | |
| void | IRTIM_DeInit (void) |
| Deinitializes the IRTIM peripheral registers to their default reset values. | |
| void | IRTIM_HighSinkODCmd (FunctionalState NewState) |
| Enables or disables the High sink open drain buffer of the IRTIM peripheral. | |
Detailed Description
IRTIM configuration functions.
===============================================================================
IRTIM configuration functions
===============================================================================
===================================================================
IRTIM Driver: how to use it
===================================================================
To generate the infrared remote control signal, perform the following steps:
1. Use TIM2 channel 1 to generate the high frequency carrier signal
by calling TIM2_OC1Init()
2. Use TIM3 channel 1 to generate the modulation envelope by
calling TIM3_OC1Init()
3. Enable the IRTIM peripheral using IRTIM_Cmd()
Note1: When IRTIM peripheral is enabled, TIM2 channel 1 and TIM3 channel 1
become inactive (no signal on output) and can be used as GPIO.
Note2: The high sink LED driver capability (only available on the IRTIM pin)
can be activated using IRTIM_HighSinkODCmd() to sink the high
current needed to directly control an infrared LED
Function Documentation
| void IRTIM_Cmd | ( | FunctionalState | NewState | ) |
Enables or disables the IRTIM peripheral.
Definition at line 102 of file stm8l15x_irtim.c.
References DISABLE, IRTIM, IRTIM_CR_EN, and IS_FUNCTIONAL_STATE.
| void IRTIM_DeInit | ( | void | ) |
Deinitializes the IRTIM peripheral registers to their default reset values.
Definition at line 91 of file stm8l15x_irtim.c.
References IRTIM, and IRTIM_CR_RESET_VALUE.
| void IRTIM_HighSinkODCmd | ( | FunctionalState | NewState | ) |
Enables or disables the High sink open drain buffer of the IRTIM peripheral.
Definition at line 124 of file stm8l15x_irtim.c.
References DISABLE, IRTIM, IRTIM_CR_HSEN, and IS_FUNCTIONAL_STATE.