|
Open Model Railroad Network (OpenMRN)
|
Specialization of the PWM abstract interface for the PCA9685. More...
#include <PCA9685PWM.hxx>
Public Member Functions | |
| PCA9685PWMBit (PCA9685PWM *instance, unsigned index) | |
| Constructor. | |
| ~PCA9685PWMBit () | |
| Destructor. | |
Public Member Functions inherited from PWM | |
| void | set_duty_percent (uint8_t percent) |
| Sets the duty cycle. | |
| uint8_t | get_duty_percent () |
| Gets the duty cycle. | |
Private Member Functions | |
| void | set_period (uint32_t counts) override |
| Set PWM period. | |
| uint32_t | get_period () override |
| Get PWM period. | |
| void | set_duty (uint32_t counts) override |
| Sets the duty cycle. | |
| uint32_t | get_duty () override |
| Gets the duty cycle. | |
| uint32_t | get_period_max () override |
| Get max period supported. | |
| uint32_t | get_period_min () override |
| Get min period supported. | |
| DISALLOW_COPY_AND_ASSIGN (PCA9685PWMBit) | |
Private Attributes | |
| PCA9685PWM * | instance_ |
| instance pointer to the whole chip complement | |
| unsigned | index_ |
| bit index within PCA9685 | |
Additional Inherited Members | |
Protected Member Functions inherited from PWM | |
| constexpr | PWM ()=default |
| Constructor. | |
| ~PWM ()=default | |
| Destructor. | |
Specialization of the PWM abstract interface for the PCA9685.
Definition at line 347 of file PCA9685PWM.hxx.
|
inline |
Constructor.
| instance | reference to the chip |
| index | channel index on the chip (0 through 15) |
Definition at line 353 of file PCA9685PWM.hxx.
|
inline |
Destructor.
Definition at line 362 of file PCA9685PWM.hxx.
|
inlineoverrideprivatevirtual |
Gets the duty cycle.
Implements PWM.
Definition at line 390 of file PCA9685PWM.hxx.
|
inlineoverrideprivatevirtual |
Get PWM period.
Implements PWM.
Definition at line 376 of file PCA9685PWM.hxx.
|
inlineoverrideprivatevirtual |
Get max period supported.
Implements PWM.
Definition at line 397 of file PCA9685PWM.hxx.
|
inlineoverrideprivatevirtual |
Get min period supported.
Implements PWM.
Definition at line 404 of file PCA9685PWM.hxx.
|
inlineoverrideprivatevirtual |
Sets the duty cycle.
| counts | duty cycle in counts |
Implements PWM.
Definition at line 383 of file PCA9685PWM.hxx.
|
inlineoverrideprivatevirtual |
Set PWM period.
| PWM | period in counts |
Implements PWM.
Definition at line 369 of file PCA9685PWM.hxx.
|
private |
bit index within PCA9685
Definition at line 413 of file PCA9685PWM.hxx.
|
private |
instance pointer to the whole chip complement
Definition at line 410 of file PCA9685PWM.hxx.