PropWare
2.1.2
C++ objects and CMake build system for Parallax Propeller
|
Click here for docs on the
develop
branch.
#include <pwm2.h>
Public Member Functions | |
void | Start (void) |
void | Stop (void) |
void | SetPinX (const int pinX) |
void | SetPinY (const int pinY) |
void | SetDutyX (const int percent) |
void | SetDutyY (const int percent) |
void | SetFrequency (const int frequency) |
Run a high speed pulse width modulation (PWM) class that can output up to two channels of duty cycled PWM at a single frequency.
The two channels are channel X and channel Y.
Requires a cog to operate. No external hardware is required beyond whatever you are PWM'ing.
You can use this class to PWM H bridges, LEDs, audio, etc.
Copyright (c) 2013 Kenneth Bedolla (libpr) opel ler@k enne thbed olla .com
void libpropeller::PWM2::SetDutyX | ( | const int | percent | ) |
void libpropeller::PWM2::SetDutyY | ( | const int | percent | ) |
void libpropeller::PWM2::SetFrequency | ( | const int | frequency | ) |
Set the frequency to output channel X and Y on.
frequency | The frequency in Hz, [0..40000??] |
Definition at line 120 of file pwm2.h.
void libpropeller::PWM2::SetPinX | ( | const int | pinX | ) |
void libpropeller::PWM2::SetPinY | ( | const int | pinY | ) |
void libpropeller::PWM2::Start | ( | void | ) |
void libpropeller::PWM2::Stop | ( | void | ) |