mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/stm32/periph_pwm: add doc for complementary timer channels
This commit is contained in:
parent
62210303ab
commit
d8cf5a0c66
@ -33,10 +33,21 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* @brief PWM channel
|
||||
*
|
||||
* When using a general-purpose timer for a PWM device, the outputs OC<n> of
|
||||
* each of the four capture/compare channels can be used as PWM channel.
|
||||
* The respective capture/compare channel is then specified with 0...3 in
|
||||
* `cc_chan` for the outputs OC1...OC4.
|
||||
*
|
||||
* Advanced timers like TIM1 and TIM8 have additionally three complementary
|
||||
* outputs OC<n>N of the capture/compare channels, which can also be used
|
||||
* as PWM channels. These complementary outputs are defined with an offset
|
||||
* of 4, i.e. they are specified in `cc_chan` with 4...6 for OC1N...OC3N.
|
||||
*/
|
||||
typedef struct {
|
||||
gpio_t pin; /**< GPIO pin mapped to this channel */
|
||||
uint8_t cc_chan; /**< capture compare channel used */
|
||||
uint8_t cc_chan; /**< Capture/compare channel used: 0..3 for OC1..OC4
|
||||
or 4..6 for OC1N..OC3N for advanced timers */
|
||||
} pwm_chan_t;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user