Skip to content

Commit 93973df

Browse files
authored
Fix outstanding clippy warnings (#128)
* fix incorrect stm32g4a1 feature flags * fix doc comments * add transmit type args
1 parent f8b6ff8 commit 93973df

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

examples/utils/logger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cfg_if::cfg_if! {
3333
InterruptSync::new(
3434
// We must not use Peripherals::steal() here to get an ITM instance, as the
3535
// code might expect to be able to call Peripherals::take() later on.
36-
ItmDest::new(core::mem::transmute(()))
36+
ItmDest::new(core::mem::transmute::<(), stm32g4xx_hal::stm32::ITM>(()))
3737
)
3838
},
3939
};

src/adc.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl Temperature {
8585
/// ## Arguments
8686
/// * `sample`: ADC sample taken on the [`Temperature`] channel.
8787
/// * `vdda`: Analog reference voltage (vref+) when the temperature
88-
/// sample was taken, in volts.
88+
/// sample was taken, in volts.
8989
/// * `resolution`: Configured ADC resolution.
9090
#[inline(always)]
9191
pub fn temperature_to_degrees_centigrade(
@@ -110,7 +110,7 @@ impl Temperature {
110110
/// ## Arguments
111111
/// * `sample`: ADC sample taken on the [`Temperature`] channel.
112112
/// * `vdda`: Analog reference voltage (vref+) when the temperature
113-
/// sample was taken, in millivolts.
113+
/// sample was taken, in millivolts.
114114
/// * `resolution`: Configured ADC resolution.
115115
#[inline(always)]
116116
pub fn temperature_to_degrees_centigrade_coarse(
@@ -1901,7 +1901,7 @@ macro_rules! adc {
19011901
/// * `channel` - channel to configure
19021902
/// * `sequence` - where in the sequence to sample the channel. Also called rank in some STM docs/code
19031903
/// * `sample_time` - how long to sample for. See datasheet and ref manual to work out how long you need\
1904-
/// to sample for at a given ADC clock frequency
1904+
/// to sample for at a given ADC clock frequency
19051905
pub fn configure_channel<CHANNEL>(&mut self, _channel: &CHANNEL, sequence: config::Sequence, sample_time: config::SampleTime)
19061906
where
19071907
CHANNEL: Channel<stm32::$adc_type, ID=u8>
@@ -2122,6 +2122,7 @@ macro_rules! adc {
21222122
/// Enables the ADC clock, resets the peripheral (optionally), runs calibration and applies the supplied config
21232123
/// # Arguments
21242124
/// * `reset` - should a reset be performed. This is provided because on some devices multiple ADCs share the same common reset
2125+
///
21252126
/// TODO: fix needing SYST
21262127
#[inline(always)]
21272128
fn claim(self, cs: ClockSource, rcc: &Rcc, delay: &mut impl DelayUs<u8>, reset: bool) -> Adc<stm32::$adc_type, Disabled> {
@@ -2407,7 +2408,7 @@ macro_rules! adc {
24072408
/// * `channel` - channel to configure
24082409
/// * `sequence` - where in the sequence to sample the channel. Also called rank in some STM docs/code
24092410
/// * `sample_time` - how long to sample for. See datasheet and ref manual to work out how long you need\
2410-
/// to sample for at a given ADC clock frequency
2411+
/// to sample for at a given ADC clock frequency
24112412
#[inline(always)]
24122413
pub fn configure_channel<CHANNEL>(&mut self, channel: &CHANNEL, sequence: config::Sequence, sample_time: config::SampleTime)
24132414
where

src/can.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ mod fdcan1 {
141141
feature = "stm32g483",
142142
feature = "stm32g484",
143143
feature = "stm32g491",
144-
feature = "stm32g4A1",
144+
feature = "stm32g4a1",
145145
))]
146146
mod fdcan2 {
147147
use super::sealed;

src/dma/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ macro_rules! dma_stream {
523523
feature = "stm32g483",
524524
feature = "stm32g484",
525525
feature = "stm32g491",
526-
feature = "stm32g49a",
526+
feature = "stm32g4a1",
527527
))]
528528
dma_stream!(
529529
// Note: the field names start from one, unlike the RM where they start from

src/dma/transfer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ transfer_constructor!(
707707
feature = "stm32g483",
708708
feature = "stm32g484",
709709
feature = "stm32g491",
710-
feature = "stm32g49a",
710+
feature = "stm32g4a1",
711711
))]
712712
transfer_constructor!(
713713
(DMA1, Stream6),

src/pwm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ use crate::stm32::RCC;
181181
feature = "stm32g483",
182182
feature = "stm32g484",
183183
feature = "stm32g491",
184-
feature = "stm32g4A1"
184+
feature = "stm32g4a1"
185185
))]
186186
use crate::stm32::TIM20;
187187
#[cfg(any(
@@ -874,7 +874,7 @@ pins! {
874874
feature = "stm32g483",
875875
feature = "stm32g484",
876876
feature = "stm32g491",
877-
feature = "stm32g4A1"
877+
feature = "stm32g4a1"
878878
))]
879879
pins! {
880880
TIM20:
@@ -1753,7 +1753,7 @@ tim_pin_hal! {
17531753
feature = "stm32g483",
17541754
feature = "stm32g484",
17551755
feature = "stm32g491",
1756-
feature = "stm32g4A1"
1756+
feature = "stm32g4a1"
17571757
))]
17581758
tim_pin_hal! {
17591759
TIM20: (C1, cc1e, cc1p, ccmr1_output, oc1pe, oc1m, ccr1, u16, cc1ne, cc1np),

src/rcc/enable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ bus! {
152152
feature = "stm32g483",
153153
feature = "stm32g484",
154154
feature = "stm32g491",
155-
feature = "stm32g4A1"
155+
feature = "stm32g4a1"
156156
))]
157157
bus! {
158158
FDCAN2 => (APB1_1, 25),

0 commit comments

Comments
 (0)