Skip to content

Commit bcea5c1

Browse files
committed
Allow setting initial duty in OperatorConfig
1 parent a394f35 commit bcea5c1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/mcpwm.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,20 @@ impl OperatorConfig {
564564
self
565565
}
566566

567+
/// Set initual duty cycle for output A as percentage
568+
#[must_use]
569+
pub fn duty_a(mut self, duty: Duty) -> Self {
570+
self.duty_a = duty;
571+
self
572+
}
573+
574+
/// Set initual duty cycle for output B as percentage
575+
#[must_use]
576+
pub fn duty_b(mut self, duty: Duty) -> Self {
577+
self.duty_b = duty;
578+
self
579+
}
580+
567581
/// Lowest frequency which the operator needs to be able to reach
568582
///
569583
/// This setting will limit what frequency range the operator can reach.

0 commit comments

Comments
 (0)