ConstReads a setting back from the four register bytes a channel holds.
The inverse of the builders above, so a caller can read a channel off the bus and see what it is set to rather than decoding the registers by hand.
The four channel registers.
The counts at which the output goes high and low.
Builds a setting with no phase delay: on at count 0, off at off.
The datasheet rules out the same count in on and off, so 0 is the full-off setting and 4096 or more the full-on one.
The count at which the output goes low, which sets the duty.
The four register bytes.
Builds a setting from explicit on and off counts.
The count at which the output goes high.
The count at which it goes low.
The four register bytes; counts are masked to 12 bits.
The setting that holds a channel continuously low, the power-on state. Its flag takes precedence over the full-on flag when both are set.
The four register bytes.
The setting that holds a channel continuously high.
The four register bytes.
Builds the setting that drives a hobby servo to a pulse width.
The high-pulse width in microseconds. Typical travel is about 1000 to 2000 microseconds.
OptionalupdateRateHz: number
The PWM frequency the controller is set to, usually 50.
The four register bytes.
The four register bytes for one PCA9685 channel.
Each call returns a buffer in the channel's own register order, so it can be written in a single bus transaction.