Loading...
Searching...
No Matches
pwm_chan_t Struct Reference

PWM channel. More...

Detailed Description

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.

Definition at line 469 of file periph_cpu.h.

#include <periph_cpu.h>

Data Fields

gpio_t pin
 GPIO pin mapped to this channel.
 
uint8_t cc_chan
 capture compare channel used
 

Field Documentation

◆ cc_chan

uint8_t pwm_chan_t::cc_chan

capture compare channel used

Capture/compare channel used: 0..3 for OC1..OC4 or 4..6 for OC1N..OC3N for advanced timers.

Definition at line 471 of file periph_cpu.h.

◆ pin

gpio_t pwm_chan_t::pin

GPIO pin mapped to this channel.

Definition at line 470 of file periph_cpu.h.


The documentation for this struct was generated from the following files: