From 90b41644261440a535c35c1c75c22ce2606c5037 Mon Sep 17 00:00:00 2001 From: Liu Hancheng Date: Thu, 2 Jan 2025 12:47:13 +0800 Subject: [PATCH] dev: change name to bits --- embassy-stm32/src/timer/low_level.rs | 2 +- embassy-stm32/src/timer/simple_pwm.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/timer/low_level.rs b/embassy-stm32/src/timer/low_level.rs index a9c6dc303..796c33a27 100644 --- a/embassy-stm32/src/timer/low_level.rs +++ b/embassy-stm32/src/timer/low_level.rs @@ -236,7 +236,7 @@ impl<'d, T: CoreInstance> Timer<'d, T> { } /// get the capability of the timer - pub fn get_bits(&self) -> TimerBits { + pub fn bits(&self) -> TimerBits { T::BITS } diff --git a/embassy-stm32/src/timer/simple_pwm.rs b/embassy-stm32/src/timer/simple_pwm.rs index 0fc2a1bf0..f36fa026c 100644 --- a/embassy-stm32/src/timer/simple_pwm.rs +++ b/embassy-stm32/src/timer/simple_pwm.rs @@ -409,7 +409,7 @@ macro_rules! impl_waveform_chx { ..Default::default() }; - match self.inner.get_bits() { + match self.inner.bits() { TimerBits::Bits16 => { // the data must be aligned to double words assert!(duty.len() % 2 == 0);