Abstract class for LED driver component. Including "LedPwmOut API" class.

Dependents:   PCA962x PCA9632

LedPwmOut.cpp

Committer:
nxp_ip
Date:
2015-03-04
Revision:
0:a0e4342d3b3d

File content as of revision 0:a0e4342d3b3d:

#include    "mbed.h"
#include    "LedPwmOut.h"

LedPwmOut::LedPwmOut( CompLedDvr &ledp, LedPinName pin_name )
    : leddvrp( &ledp ), pin( pin_name )
{
    pwm( 0.0 );
}

LedPwmOut::~LedPwmOut()
{
}

void LedPwmOut::pwm( float v )
{
    leddvrp->pwm( pin, v );
}

LedPwmOut& LedPwmOut::operator=( float rhs )
{
    pwm( rhs );
    return ( *this );
}