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

Dependents:   PCA995xA

Committer:
nxp_ip
Date:
Thu Jun 16 22:59:43 2022 +0000
Revision:
2:cc08ac7ed407
Parent:
0:6d2f6c0fcc40
Suppressing warning in KeilStudio and fix of API document

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nxp_ip 0:6d2f6c0fcc40 1 #include "mbed.h"
nxp_ip 0:6d2f6c0fcc40 2 #include "LedPwmOutCC.h"
nxp_ip 0:6d2f6c0fcc40 3
nxp_ip 0:6d2f6c0fcc40 4 LedPwmOutCC::LedPwmOutCC( CompLedDvrCC &ledp, LedPinName pin_name )
nxp_ip 0:6d2f6c0fcc40 5 : leddvrp( &ledp ), pin( pin_name )
nxp_ip 0:6d2f6c0fcc40 6 {
nxp_ip 0:6d2f6c0fcc40 7 pwm( 0.0 );
nxp_ip 0:6d2f6c0fcc40 8 }
nxp_ip 0:6d2f6c0fcc40 9
nxp_ip 0:6d2f6c0fcc40 10 LedPwmOutCC::~LedPwmOutCC()
nxp_ip 0:6d2f6c0fcc40 11 {
nxp_ip 0:6d2f6c0fcc40 12 }
nxp_ip 0:6d2f6c0fcc40 13
nxp_ip 0:6d2f6c0fcc40 14 void LedPwmOutCC::pwm( float v )
nxp_ip 0:6d2f6c0fcc40 15 {
nxp_ip 0:6d2f6c0fcc40 16 leddvrp->pwm( pin, v );
nxp_ip 0:6d2f6c0fcc40 17 }
nxp_ip 0:6d2f6c0fcc40 18
nxp_ip 0:6d2f6c0fcc40 19 void LedPwmOutCC::current( float v )
nxp_ip 0:6d2f6c0fcc40 20 {
nxp_ip 0:6d2f6c0fcc40 21 leddvrp->current( pin, v );
nxp_ip 0:6d2f6c0fcc40 22 }
nxp_ip 0:6d2f6c0fcc40 23 LedPwmOutCC& LedPwmOutCC::operator=( float rhs )
nxp_ip 0:6d2f6c0fcc40 24 {
nxp_ip 0:6d2f6c0fcc40 25 pwm( rhs );
nxp_ip 0:6d2f6c0fcc40 26 return ( *this );
nxp_ip 2:cc08ac7ed407 27 }