Skip to content

Commit ab0da9f

Browse files
committed
clippy + msrv 1.62
1 parent 2af033b commit ab0da9f

File tree

8 files changed

+17
-14
lines changed

8 files changed

+17
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1818

1919
### Changed
2020

21+
- Bump MSRV to 1.62
2122
- Use `stm32f4-staging` until `stm32f4` is released [#706]
2223
- RTIC2 monotonics fix: CC1 instead of CC3
2324
- Allow different lengths of buffers in hal_1 SpiBus impl [#566]

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
edition = "2021"
3-
rust-version = "1.60"
3+
rust-version = "1.62"
44

55
authors = ["Daniel Egger <daniel@eggers-club.de>"]
66
categories = ["embedded", "hardware-support", "no-std"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ stm32f4xx-hal
44
[![Crates.io](https://img.shields.io/crates/d/stm32f4xx-hal.svg)](https://crates.io/crates/stm32f4xx-hal)
55
[![Crates.io](https://img.shields.io/crates/v/stm32f4xx-hal.svg)](https://crates.io/crates/stm32f4xx-hal)
66
[![Released API docs](https://docs.rs/stm32f4xx-hal/badge.svg)](https://docs.rs/stm32f4xx-hal)
7-
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.60+-blue.svg)
7+
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.62+-blue.svg)
88
[![dependency status](https://deps.rs/repo/github/stm32-rs/stm32f4xx-hal/status.svg)](https://deps.rs/repo/github/stm32-rs/stm32f4xx-hal)
99
[![Continuous integration](https://github.com/stm32-rs/stm32f4xx-hal/workflows/Continuous%20integration/badge.svg)](https://github.com/stm32-rs/stm32f4xx-hal)
1010

src/adc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ macro_rules! adc {
448448
/// # Arguments
449449
/// * `channel` - channel to configure
450450
/// * `sequence` - where in the sequence to sample the channel. Also called rank in some STM docs/code
451-
/// * `sample_time` - how long to sample for. See datasheet and ref manual to work out how long you need\
452-
/// to sample for at a given ADC clock frequency
451+
/// * `sample_time` - how long to sample for. See datasheet and ref manual to work out how long you need
452+
/// to sample for at a given ADC clock frequency
453453
pub fn configure_channel<CHANNEL>(&mut self, _channel: &CHANNEL, sequence: config::Sequence, sample_time: config::SampleTime)
454454
where
455455
CHANNEL: embedded_hal_02::adc::Channel<pac::$adc_type, ID=u8>

src/dma/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ where
13181318
/// # Panics
13191319
///
13201320
/// * When the FIFO is disabled or double buffering is enabled in `DmaConfig` while initializing
1321-
/// a memory to memory transfer.
1321+
/// a memory to memory transfer.
13221322
pub fn init_memory_to_memory(
13231323
mut stream: STREAM,
13241324
peripheral: PERIPHERAL,

src/dwt.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,21 @@ impl Delay {
6969
/// Delay ticks
7070
/// NOTE DCB and DWT need to be set up for this to work, so it is private
7171
fn delay_ticks(mut start: u32, ticks: u64) {
72-
if ticks < (core::u32::MAX / 2) as u64 {
72+
if ticks < (u32::MAX / 2) as u64 {
7373
// Simple delay
7474
let ticks = ticks as u32;
7575
while (DWT::cycle_count().wrapping_sub(start)) < ticks {}
76-
} else if ticks <= core::u32::MAX as u64 {
76+
} else if ticks <= u32::MAX as u64 {
7777
// Try to avoid race conditions by limiting delay to u32::MAX / 2
7878
let mut ticks = ticks as u32;
79-
ticks -= core::u32::MAX / 2;
80-
while (DWT::cycle_count().wrapping_sub(start)) < core::u32::MAX / 2 {}
81-
start -= core::u32::MAX / 2;
79+
ticks -= u32::MAX / 2;
80+
while (DWT::cycle_count().wrapping_sub(start)) < u32::MAX / 2 {}
81+
start -= u32::MAX / 2;
8282
while (DWT::cycle_count().wrapping_sub(start)) < ticks {}
8383
} else {
8484
// Delay for ticks, then delay for rest * u32::MAX
8585
let mut rest = (ticks >> 32) as u32;
86-
let ticks = (ticks & core::u32::MAX as u64) as u32;
86+
let ticks = (ticks & u32::MAX as u64) as u32;
8787
loop {
8888
while (DWT::cycle_count().wrapping_sub(start)) < ticks {}
8989
if rest == 0 {

src/gpio.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
//! - **Dynamic**: Pin mode is selected at runtime. See changing configurations for more details
2828
//! - Input
2929
//! - **PullUp**: Input connected to high with a weak pull up resistor. Will be high when nothing
30-
//! is connected
30+
//! is connected
3131
//! - **PullDown**: Input connected to high with a weak pull up resistor. Will be low when nothing
32-
//! is connected
32+
//! is connected
3333
//! - **Floating**: Input not pulled to high or low. Will be undefined when nothing is connected
3434
//! - Output
3535
//! - **PushPull**: Output which either drives the pin high or low
3636
//! - **OpenDrain**: Output which leaves the gate floating, or pulls it do ground in drain
37-
//! mode. Can be used as an input in the `open` configuration
37+
//! mode. Can be used as an input in the `open` configuration
3838
//!
3939
//! ## Changing modes
4040
//! The simplest way to change the pin mode is to use the `into_<mode>` functions. These return a

src/timer/pwm_input.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use fugit::HertzU32 as Hertz;
99
/// This peripheral will emit an interrupt on CC2 events, which occurs at two times in this mode:
1010
/// 1. When a new cycle is started: the duty cycle will be `1.00`
1111
/// 2. When the period is captured. the duty cycle will be an observable value.
12+
///
1213
/// An example interrupt handler is provided:
1314
/// ```
1415
/// use stm32f4xx_hal::{pac::TIM8, pwm_input::PwmInput};
@@ -74,6 +75,7 @@ macro_rules! hal {
7475
/// This device will emit an interrupt on CC1, which occurs at two times in this mode:
7576
/// 1. When a new cycle is started: the duty cycle will be `1.00`
7677
/// 2. When the period is captured. the duty cycle will be an observable value.
78+
///
7779
/// See the pwm input example for an suitable interrupt handler.
7880
pub fn pwm_input(
7981
mut self,

0 commit comments

Comments
 (0)