From f0e69e031852b83cfbb0fb65e57abc4f592df118 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 09:03:53 +0000 Subject: [PATCH 1/2] Update gd32f1 requirement from 0.6.0 to 0.8.0 Updates the requirements on [gd32f1](https://github.com/gd32-rust/gd32-rs) to permit the latest version. - [Changelog](https://github.com/gd32-rust/gd32-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/gd32-rust/gd32-rs/compare/0.6.0...0.8.0) --- updated-dependencies: - dependency-name: gd32f1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 7 ++++--- src/pwm.rs | 6 +++--- src/rcu.rs | 12 ++++++------ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 03d665e..ce2eb3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,17 +17,18 @@ default-target = "x86_64-unknown-linux-gnu" [dependencies] bxcan = "0.7.0" cast = { version = "0.3.0", default-features = false } -cortex-m = "0.7.5" +cortex-m = "0.7.7" cortex-m-rt = "0.7.1" embedded-dma = "0.2.0" embedded-hal = { version = "0.2.7", features = ["unproven"] } -gd32f1 = "0.6.0" +gd32f1 = { version = "0.8.0", features = ["critical-section"] } nb = "1.0.0" void = { version = "1.0.2", default-features = false } [dev-dependencies] -byteorder = { version = "1.4.3",default-features = false } +byteorder = { version = "1.4.3", default-features = false } cobs = { version = "0.2.3", default-features = false } +cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] } cortex-m-rtic = "1.1.2" cortex-m-semihosting = "0.5.0" crc16 = { version = "0.4.0", default-features = false } diff --git a/src/pwm.rs b/src/pwm.rs index 3e905db..d0d72d7 100644 --- a/src/pwm.rs +++ b/src/pwm.rs @@ -32,7 +32,7 @@ pub enum Polarity { impl From for timer0::chctl2::CH0P_A { fn from(polarity: Polarity) -> Self { match polarity { - Polarity::NotInverted => Self::NOTINVERTED, + Polarity::NotInverted => Self::NOT_INVERTED, Polarity::Inverted => Self::INVERTED, } } @@ -80,8 +80,8 @@ pub enum Alignment { impl From for timer0::ctl0::CAM_A { fn from(alignment: Alignment) -> Self { match alignment { - Alignment::Edge => Self::EDGEALIGNED, - Alignment::Center => Self::CENTERALIGNEDCOUNTINGUP, + Alignment::Edge => Self::EDGE_ALIGNED, + Alignment::Center => Self::CENTER_ALIGNED_COUNTING_UP, } } } diff --git a/src/rcu.rs b/src/rcu.rs index 7104373..22082a2 100644 --- a/src/rcu.rs +++ b/src/rcu.rs @@ -11,7 +11,7 @@ use crate::pac::{ fmc::ws::WSCNT_A, rcu::{ self, - cfg0::{ADCPSC_A, AHBPSC_A, APB1PSC_A, APB2PSC_A, PLLSEL_A, SCS_A}, + cfg0::{ADCPSC_A, AHBPSC_A, APB1PSC_A, PLLSEL_A, SCS_A}, }, RCU, }; @@ -313,11 +313,11 @@ impl CFGR { let (apb2psc, ppre2) = match hclk / self.pclk2.unwrap_or(hclk) { 0 => unreachable!(), - 1 => (APB2PSC_A::DIV1, 1), - 2 => (APB2PSC_A::DIV2, 2), - 3..=5 => (APB2PSC_A::DIV4, 4), - 6..=11 => (APB2PSC_A::DIV8, 8), - _ => (APB2PSC_A::DIV16, 16), + 1 => (APB1PSC_A::DIV1, 1), + 2 => (APB1PSC_A::DIV2, 2), + 3..=5 => (APB1PSC_A::DIV4, 4), + 6..=11 => (APB1PSC_A::DIV8, 8), + _ => (APB1PSC_A::DIV16, 16), }; let pclk2 = hclk / u32(ppre2); From 0b31084ea29322ef4e660552f00080d02afd00be Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Tue, 17 Oct 2023 14:29:03 +0100 Subject: [PATCH 2/2] Update more dependencies and docs. --- Cargo.toml | 16 ++++++++-------- README.md | 6 +++--- src/lib.rs | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ce2eb3a..5e55e2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,29 +18,29 @@ default-target = "x86_64-unknown-linux-gnu" bxcan = "0.7.0" cast = { version = "0.3.0", default-features = false } cortex-m = "0.7.7" -cortex-m-rt = "0.7.1" +cortex-m-rt = "0.7.3" embedded-dma = "0.2.0" embedded-hal = { version = "0.2.7", features = ["unproven"] } gd32f1 = { version = "0.8.0", features = ["critical-section"] } -nb = "1.0.0" +nb = "1.1.0" void = { version = "1.0.2", default-features = false } [dev-dependencies] -byteorder = { version = "1.4.3", default-features = false } +byteorder = { version = "1.5.0", default-features = false } cobs = { version = "0.2.3", default-features = false } cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] } -cortex-m-rtic = "1.1.2" +cortex-m-rtic = "1.1.4" cortex-m-semihosting = "0.5.0" crc16 = { version = "0.4.0", default-features = false } -either = { version = "1.6.1", default-features = false } -heapless = "0.7.14" +either = { version = "1.9.0", default-features = false } +heapless = "0.7.16" m = "0.1.1" mfrc522 = "0.6.0" panic-halt = "0.2.0" panic-itm = "0.4.2" panic-semihosting = "0.6.0" -serde = { version = "1.0.137", default-features = false } -serde_derive = "1.0.137" +serde = { version = "1.0.189", default-features = false } +serde_derive = "1.0.189" [features] device-selected = [] diff --git a/README.md b/README.md index b412319..c3dea47 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ You also need to add some dependencies to your `Cargo.toml`: ```toml [dependencies] embedded-hal = "0.2.7" -nb = "1.0.0" -cortex-m = "0.7.5" -cortex-m-rt = "0.7.1" +nb = "1.1.0" +cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] } +cortex-m-rt = "0.7.3" # Panic behaviour, see https://crates.io/keywords/panic-impl for alternatives panic-halt = "0.2.0" gd32f1x0-hal = { version = "0.7.1", features = ["rt", "gd32f130x8"] } diff --git a/src/lib.rs b/src/lib.rs index a1f6b29..ab3fd7e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,10 +63,10 @@ //! Most of the examples require the following additional dependencies //! ```toml //! [dependencies] -//! embedded-hal = "0.2.3" -//! nb = "0.1.2" -//! cortex-m = "0.6.2" -//! cortex-m-rt = "0.6.11" +//! embedded-hal = "0.2.7" +//! nb = "1.1.0" +//! cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] } +//! cortex-m-rt = "0.7.3" //! # Panic behaviour, see https://crates.io/keywords/panic-impl for alternatives //! panic-halt = "0.2.0" //! ```