|
DUDS
|
Distributed Update of Data from Something
|
This is a Linux-only PWM driver that I need for my eclipse project. More...
#include <SysPwm.hpp>
Public Member Functions | |
| SysPwm (int chip, int channel) | |
| ~SysPwm () | |
| void | disable () |
| double | dutyCycle () const |
| void | dutyCycle (double ratio) |
| void | dutyFull () |
| std::chrono::nanoseconds | dutyPeriod () const |
| void | dutyPeriod (const std::chrono::nanoseconds &ns) |
| void | dutyZero () |
| void | enable (bool state=true) |
| bool | enabled () const |
| void | frequency (unsigned int hz) |
| unsigned int | frequency () const |
| std::chrono::nanoseconds | period () const |
| void | period (const std::chrono::nanoseconds &ns) |
Private Attributes | |
| std::fstream | dc |
| std::chrono::nanoseconds | dutyNs |
| std::fstream | en |
| std::fstream | per |
| std::chrono::nanoseconds | periodNs |
| bool | running |
This is a Linux-only PWM driver that I need for my eclipse project.
I intend to make a generalized interface, but I need to investigate PWM devices a bit more before I can make a decent one.
Definition at line 35 of file SysPwm.hpp.
| duds::hardware::interface::linux::SysPwm::SysPwm | ( | int | chip, |
| int | channel | ||
| ) |
Definition at line 23 of file SysPwm.cpp.
| duds::hardware::interface::linux::SysPwm::~SysPwm | ( | ) |
Definition at line 74 of file SysPwm.cpp.
|
inline |
Definition at line 46 of file SysPwm.hpp.
Referenced by ~SysPwm().
| double duds::hardware::interface::linux::SysPwm::dutyCycle | ( | ) | const |
Definition at line 104 of file SysPwm.cpp.
| void duds::hardware::interface::linux::SysPwm::dutyCycle | ( | double | ratio | ) |
Definition at line 119 of file SysPwm.cpp.
|
inline |
Definition at line 59 of file SysPwm.hpp.
|
inline |
Definition at line 52 of file SysPwm.hpp.
Referenced by dutyCycle().
| void duds::hardware::interface::linux::SysPwm::dutyPeriod | ( | const std::chrono::nanoseconds & | ns | ) |
Definition at line 93 of file SysPwm.cpp.
|
inline |
Definition at line 56 of file SysPwm.hpp.
| void duds::hardware::interface::linux::SysPwm::enable | ( | bool | state = true | ) |
Definition at line 78 of file SysPwm.cpp.
|
inline |
Definition at line 49 of file SysPwm.hpp.
| void duds::hardware::interface::linux::SysPwm::frequency | ( | unsigned int | hz | ) |
Definition at line 126 of file SysPwm.cpp.
| unsigned int duds::hardware::interface::linux::SysPwm::frequency | ( | ) | const |
Definition at line 134 of file SysPwm.cpp.
|
inline |
Definition at line 64 of file SysPwm.hpp.
Referenced by frequency().
| void duds::hardware::interface::linux::SysPwm::period | ( | const std::chrono::nanoseconds & | ns | ) |
Definition at line 108 of file SysPwm.cpp.
|
private |
Definition at line 37 of file SysPwm.hpp.
Referenced by dutyPeriod(), and SysPwm().
|
private |
Definition at line 39 of file SysPwm.hpp.
Referenced by dutyCycle(), dutyPeriod(), and SysPwm().
|
private |
Definition at line 36 of file SysPwm.hpp.
|
private |
Definition at line 38 of file SysPwm.hpp.
|
private |
Definition at line 40 of file SysPwm.hpp.
Referenced by dutyCycle(), frequency(), period(), and SysPwm().
|
private |
Definition at line 41 of file SysPwm.hpp.