Private
Public Access
2
0

pwm: Refined API. Work towards functionality

* Private functions added
* Added to CMakeLists

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2014-04-14 13:10:53 +01:00
parent f54e537d64
commit cb92c892cf
3 changed files with 148 additions and 2 deletions

View File

@@ -59,13 +59,22 @@ namespace maa {
*/
class PWM {
private:
int chipid, pin;
FILE *duty_fp;
void write_period(int period);
void write_duty(int duty);
int setup_duty_fp();
public:
/** Create an PWM object
*
* @param pin The PWM pin to operate on.
* @param chipid The chip in which the following pin is on.
* @param pin The PWM channel to operate on
*/
PWM(int pin);
PWM(int chipid, int pin);
/** Set the ouput duty-cycle percentage, as a float
*