Abstract class for LED driver component. Including "LedPwmOut API" class.
Embed:
(wiki syntax)
Show/hide line numbers
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 }
Generated on Tue Jul 12 2022 18:53:22 by 1.7.2