Dependents:   YMotor remoteContolledRobot Pokittris Pokittris ... more

PWMOut.h

Committer:
inst
Date:
2015-08-23
Revision:
0:f1e5739acc27

File content as of revision 0:f1e5739acc27:

#ifndef INCLUDED_PWM_OUT_H
#define INCLUDED_PWM_OUT_H

#include "mbed.h"

class PWMOut{
public:
    PWMOut( PinName p );
    void setDuty( float duty );
    void setPeriod_sec( float period );
    void setPeriod_us( uint32_t period );
    
private:
    PwmOut* mPWM;
    uint32_t mPeriod_us;
    Timer* mTimer;
    float mNextDuty;
};

#endif