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

Dependents:   PCA962x PCA9632

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LedPwmOut.cpp Source File

LedPwmOut.cpp

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