Zephyr C++ Toolkit
Loading...
Searching...
No Matches
zct::PwmReal Class Reference

#include <PwmReal.hpp>

Inheritance diagram for zct::PwmReal:
Collaboration diagram for zct::PwmReal:

Public Member Functions

 PwmReal (const char *name, const struct pwm_dt_spec &pwmDtSpec)
 
virtual ~PwmReal ()=default
 Destroy the PWM.
 
virtual void set (uint32_t periodNs, uint32_t pulseWidthNs) override
 Set the PWM period and pulse width.
 
- Public Member Functions inherited from zct::IPwm
 IPwm (const char *name)
 
virtual ~IPwm ()=default
 Destroy the PWM.
 

Protected Attributes

const struct pwm_dt_spec & m_pwmDtSpec
 
- Protected Attributes inherited from zct::IPwm
const char * m_name
 

Constructor & Destructor Documentation

◆ PwmReal()

zct::PwmReal::PwmReal ( const char *  name,
const struct pwm_dt_spec &  pwmDtSpec 
)

◆ ~PwmReal()

virtual zct::PwmReal::~PwmReal ( )
virtualdefault

Destroy the PWM.

Member Function Documentation

◆ set()

void zct::PwmReal::set ( uint32_t  periodNs,
uint32_t  pulseWidthNs 
)
overridevirtual

Set the PWM period and pulse width.

Parameters
periodNsThe period of the PWM signal in nanoseconds.
pulseWidthNsThe pulse width of the PWM signal in nanoseconds.

Implements zct::IPwm.

Member Data Documentation

◆ m_pwmDtSpec

const struct pwm_dt_spec& zct::PwmReal::m_pwmDtSpec
protected

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