Abstract class for 'constant current (CC)' LED driver component. Including "LedPwmOutCC API" class.

Dependents:   PCA995xA

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LedPwmOutCC.cpp Source File

LedPwmOutCC.cpp

00001 #include    "mbed.h"
00002 #include    "LedPwmOutCC.h"
00003 
00004 LedPwmOutCC::LedPwmOutCC( CompLedDvrCC &ledp, LedPinName pin_name )
00005     : leddvrp( &ledp ), pin( pin_name )
00006 {
00007     pwm( 0.0 );
00008 }
00009 
00010 LedPwmOutCC::~LedPwmOutCC()
00011 {
00012 }
00013 
00014 void LedPwmOutCC::pwm( float v )
00015 {
00016     leddvrp->pwm( pin, v );
00017 }
00018 
00019 void LedPwmOutCC::current( float v )
00020 {
00021     leddvrp->current( pin, v );
00022 }
00023 LedPwmOutCC& LedPwmOutCC::operator=( float rhs )
00024 {
00025     pwm( rhs );
00026     return ( *this );
00027 }