From 6dc6c8521edfeafc22383239cbd02830dfc76ba4 Mon Sep 17 00:00:00 2001 From: Alex Crawford Date: Sun, 20 Dec 2020 22:04:08 -0800 Subject: [PATCH] WIP: *: bump cortex-m to 0.7.0 This almost certainly breaks the other devices. --- Cargo.toml | 4 ++-- src/timer.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d7464b5..0cec5b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ repository = "https://github.com/chrysn/efm32gg-hal" # documentation = "https://docs.rs/efm32gg-hal" # only to be advertised when actually useful [dependencies] -cortex-m = "0.6.0" +cortex-m = "0.7.0" # version is a wild guess. dependency on unproven features should only be # present if own unproven feature is active (but how do i do that?). @@ -28,7 +28,7 @@ embedded-hal = { version = "0.2.0", features = ["unproven"] } # even smoother. efm32gg990 = { version = "0.1.2", optional = true } -efm32gg11b820 = { version = "0.7.0", optional = true } +efm32gg11b820 = { version = "0.9.0", optional = true } efr32xg1 = { version = "0.2.0", optional = true } [features] diff --git a/src/timer.rs b/src/timer.rs index c57328f..42049aa 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -193,12 +193,12 @@ macro_rules! timerchannel { }); } fn get_mode(&self) -> ChannelMode { - use registers::$timerN::$ccX_ctrl::MODER; - match unsafe { &*Self::register() }.$ccX_ctrl.read().mode() { - MODER::OFF => ChannelMode::Off, - MODER::INPUTCAPTURE => ChannelMode::InputCapture, - MODER::OUTPUTCOMPARE => ChannelMode::OutputCompare, - MODER::PWM => ChannelMode::Pwm, + use registers::$timerN::$ccX_ctrl::MODE_A; + match unsafe { &*Self::register() }.$ccX_ctrl.read().mode().variant() { + MODE_A::OFF => ChannelMode::Off, + MODE_A::INPUTCAPTURE => ChannelMode::InputCapture, + MODE_A::OUTPUTCOMPARE => ChannelMode::OutputCompare, + MODE_A::PWM => ChannelMode::Pwm, } }