Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: PCA9626_Hello PCA9624_Hello PCA9622_Hello
base_class/CompLedDvr/LedPwmOut.cpp@3:40f83904f0a8, 2015-03-04 (annotated)
- Committer:
- nxp_ip
- Date:
- Wed Mar 04 05:59:40 2015 +0000
- Revision:
- 3:40f83904f0a8
API of "LedPwmOut class" implemented
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| nxp_ip | 3:40f83904f0a8 | 1 | #include "mbed.h" |
| nxp_ip | 3:40f83904f0a8 | 2 | #include "LedPwmOut.h" |
| nxp_ip | 3:40f83904f0a8 | 3 | |
| nxp_ip | 3:40f83904f0a8 | 4 | LedPwmOut::LedPwmOut( CompLedDvr &ledp, LedPinName pin_name ) |
| nxp_ip | 3:40f83904f0a8 | 5 | : leddvrp( &ledp ), pin( pin_name ) |
| nxp_ip | 3:40f83904f0a8 | 6 | { |
| nxp_ip | 3:40f83904f0a8 | 7 | pwm( 0.0 ); |
| nxp_ip | 3:40f83904f0a8 | 8 | } |
| nxp_ip | 3:40f83904f0a8 | 9 | |
| nxp_ip | 3:40f83904f0a8 | 10 | LedPwmOut::~LedPwmOut() |
| nxp_ip | 3:40f83904f0a8 | 11 | { |
| nxp_ip | 3:40f83904f0a8 | 12 | } |
| nxp_ip | 3:40f83904f0a8 | 13 | |
| nxp_ip | 3:40f83904f0a8 | 14 | void LedPwmOut::pwm( float v ) |
| nxp_ip | 3:40f83904f0a8 | 15 | { |
| nxp_ip | 3:40f83904f0a8 | 16 | leddvrp->pwm( pin, v ); |
| nxp_ip | 3:40f83904f0a8 | 17 | } |
| nxp_ip | 3:40f83904f0a8 | 18 | |
| nxp_ip | 3:40f83904f0a8 | 19 | LedPwmOut& LedPwmOut::operator=( float rhs ) |
| nxp_ip | 3:40f83904f0a8 | 20 | { |
| nxp_ip | 3:40f83904f0a8 | 21 | pwm( rhs ); |
| nxp_ip | 3:40f83904f0a8 | 22 | return ( *this ); |
| nxp_ip | 3:40f83904f0a8 | 23 | } |
PCA9622, PCA9624, PCA9626 : 8, 16 & 24ch LED driver (Voltage switch type)