Abstract class for 'constant current (CC)' LED driver component. Including "LedPwmOutCC API" class.
LedPwmOutCC.cpp
- Committer:
- nxp_ip
- Date:
- 2015-03-04
- Revision:
- 0:6d2f6c0fcc40
- Child:
- 2:cc08ac7ed407
File content as of revision 0:6d2f6c0fcc40:
#include "mbed.h"
#include "LedPwmOutCC.h"
LedPwmOutCC::LedPwmOutCC( CompLedDvrCC &ledp, LedPinName pin_name )
: leddvrp( &ledp ), pin( pin_name )
{
pwm( 0.0 );
}
LedPwmOutCC::~LedPwmOutCC()
{
}
void LedPwmOutCC::pwm( float v )
{
leddvrp->pwm( pin, v );
}
void LedPwmOutCC::current( float v )
{
leddvrp->current( pin, v );
}
LedPwmOutCC& LedPwmOutCC::operator=( float rhs )
{
pwm( rhs );
return ( *this );
}