diff --git a/rp2040-hal/src/pwm/mod.rs b/rp2040-hal/src/pwm/mod.rs index 2282bc8..d0ae990 100644 --- a/rp2040-hal/src/pwm/mod.rs +++ b/rp2040-hal/src/pwm/mod.rs @@ -520,18 +520,6 @@ impl Channel { duty_cycle, } } - - /// Invert channel output - #[inline] - pub fn set_inverted(&mut self) { - self.regs.write_inv_b(true) - } - - /// Invert channel output or not - #[inline] - pub fn clr_inverted(&mut self) { - self.regs.write_inv_b(false) - } } impl Sealed for Channel {} @@ -603,6 +591,18 @@ impl> Channel { pin: pin.into_mode(), } } + + /// Invert channel output + #[inline] + pub fn set_inverted(&mut self) { + self.regs.write_inv_a(true) + } + + /// Stop inverting channel output + #[inline] + pub fn clr_inverted(&mut self) { + self.regs.write_inv_a(false) + } } impl> Channel { @@ -618,6 +618,18 @@ impl> Channel { pin: pin.into_mode(), } } + + /// Invert channel output + #[inline] + pub fn set_inverted(&mut self) { + self.regs.write_inv_b(true) + } + + /// Stop inverting channel output + #[inline] + pub fn clr_inverted(&mut self) { + self.regs.write_inv_b(false) + } } impl> Channel {