Timer channel implementation for Midgard.
More...
#include <timer.hpp>
template<auto Context, u8 Channel, typename Size>
struct bsp::mid::drv::TimerChannel< Context, Channel, Size >
Timer channel implementation for Midgard.
- Warning
- Do not use this on its own!
- Template Parameters
-
Context | Timer context |
Channel | Timer channel number |
Size | Timer width (16 bit or 32 bit) |
◆ setDutyCycle()
template<auto Context, u8 Channel, typename Size >
Set the duty cycle as a float value.
- Parameters
-
dutyCycle | Duty cycle in % [0 100] |
- Returns
- Success
◆ setPolarityHigh()
template<auto Context, u8 Channel, typename Size >
Start set pwm polarity.
- Parameters
-
highActive | Set channel to high active when true |
- Returns
- Success
◆ startPwm()
template<auto Context, u8 Channel, typename Size >
Start PWM generation for the channel.
- Note
- A duty cycle should be set with setDuty()
- Returns
- Success
◆ stopPwm()
template<auto Context, u8 Channel, typename Size >
Stop PWM generation for the channel.
- Note
- This function disables the counter when no PWM channel is active
- Returns
- Success
The documentation for this struct was generated from the following file: