LCC Fusion Project 1.0
LCC Automation
Loading...
Searching...
No Matches
PWM Class Referenceabstract

Abstract interface for a PWM driver. More...

#include <PWM_updated.h>

Inherited by FaBoPWM_PCA9685_PWMChannel< EXTENDER >.

Public Member Functions

virtual void set_period (uint32_t counts)=0
 
virtual uint32_t get_period ()=0
 
virtual void set_duty (uint32_t counts)=0
 
virtual uint32_t get_duty ()=0
 
void set_duty_percent (uint8_t percent)
 
uint8_t get_duty_percent ()
 
virtual uint32_t get_period_max ()=0
 
virtual uint32_t get_period_min ()=0
 

Protected Member Functions

 PWM ()
 Constructor.
 
 ~PWM ()
 Destructor.
 

Detailed Description

Abstract interface for a PWM driver.

Definition at line 42 of file PWM_updated.h.

Member Function Documentation

◆ get_duty()

virtual uint32_t PWM::get_duty ( )
pure virtual

Gets the duty cycle.

Returns
counts duty cycle in counts
Here is the caller graph for this function:

◆ get_duty_percent()

uint8_t PWM::get_duty_percent ( )
inline

Gets the duty cycle.

Returns
counts duty cycle in percent

Definition at line 71 of file PWM_updated.h.

Here is the call graph for this function:

◆ get_period()

virtual uint32_t PWM::get_period ( )
pure virtual

Get PWM period.

Returns
PWM period in counts
Here is the caller graph for this function:

◆ get_period_max()

virtual uint32_t PWM::get_period_max ( )
pure virtual

Get max period supported

Returns
period in counts

◆ get_period_min()

virtual uint32_t PWM::get_period_min ( )
pure virtual

Get min period supported

Returns
period in counts

◆ set_duty()

virtual void PWM::set_duty ( uint32_t  counts)
pure virtual

Sets the duty cycle.

Parameters
countsduty cycle in counts
Here is the caller graph for this function:

◆ set_duty_percent()

void PWM::set_duty_percent ( uint8_t  percent)
inline

Sets the duty cycle.

Parameters
countsduty cycle in percent, range 0 to 100

Definition at line 63 of file PWM_updated.h.

Here is the call graph for this function:

◆ set_period()

virtual void PWM::set_period ( uint32_t  counts)
pure virtual

Set PWM period.

Parameters
PWMperiod in counts
Here is the caller graph for this function:

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