PCA9685 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Attributes | Friends | List of all members
pca9685::Pwm Struct Reference

The value of one channel: its four registers, decoded (table 7, figure 9). More...

#include <pca9685_types.hpp>

Public Attributes

uint16_t on_count {0}
 LEDn_ON[11:0], 0 to 4095.
 
uint16_t off_count {0}
 
bool full_on {false}
 LEDn_ON_H[4].
 
bool full_off {true}
 LEDn_OFF_H[4]. Reset value: set.
 

Friends

constexpr bool operator== (const Pwm &lhs, const Pwm &rhs) noexcept=default
 Exact comparison of every field (integral members only, KB-CPP20-033).
 

Detailed Description

The value of one channel: its four registers, decoded (table 7, figure 9).

The output is asserted when the 12-bit counter reaches on_count and negated when it reaches off_count. full_on (LEDn_ON_H bit 4) keeps it asserted, full_off (LEDn_OFF_H bit 4) keeps it negated and takes precedence over full_on. Pwm{} is the reset value: off.

Member Data Documentation

◆ off_count

uint16_t pca9685::Pwm::off_count {0}

LEDn_OFF[11:0], 0 to 4095; not equal to on_count unless a full bit is set (section 7.3.4).


The documentation for this struct was generated from the following file: