From 4e25b7c32954cc661bb569e0521d758d97d0caba Mon Sep 17 00:00:00 2001 From: Kevin Lannen Date: Sun, 12 Feb 2023 13:33:51 -0700 Subject: [PATCH] Update stm32g4 PAC to 0.15.1 --- Cargo.toml | 2 +- src/fdcan.rs | 2 +- src/opamp.rs | 8 ++++---- src/pwm.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d75663fc..4d2a6f7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ version = "0.0.0" [dependencies] nb = "0.1.1" -stm32g4 = "0.14.0" +stm32g4 = "0.15.1" paste = "1.0" bitflags = "1.2" vcell = "0.1" diff --git a/src/fdcan.rs b/src/fdcan.rs index 83bffe7e..601309b6 100644 --- a/src/fdcan.rs +++ b/src/fdcan.rs @@ -1162,7 +1162,7 @@ where pub fn error_counters(&self) -> ErrorCounters { let can = self.registers(); let cel: u8 = can.ecr.read().cel().bits(); - let rp: bool = can.ecr.read().rp().bits(); + let rp: bool = can.ecr.read().rp().bit(); let rec: u8 = can.ecr.read().rec().bits(); let tec: u8 = can.ecr.read().tec().bits(); diff --git a/src/opamp.rs b/src/opamp.rs index acb074d0..05c7107f 100644 --- a/src/opamp.rs +++ b/src/opamp.rs @@ -256,8 +256,8 @@ macro_rules! opamps { .output() .opaintoen() .variant(match output { - Some(_) => OPAINTOEN_A::OUTPUTPIN, - None => OPAINTOEN_A::ADCCHANNEL, + Some(_) => OPAINTOEN_A::OutputPin, + None => OPAINTOEN_A::Adcchannel, }) .opaen() .enabled() @@ -324,8 +324,8 @@ macro_rules! opamps { .$inverting_mask() .opaintoen() .variant(match output { - Some(_) => OPAINTOEN_A::OUTPUTPIN, - None => OPAINTOEN_A::ADCCHANNEL, + Some(_) => OPAINTOEN_A::OutputPin, + None => OPAINTOEN_A::Adcchannel, }) .opaen() .enabled() diff --git a/src/pwm.rs b/src/pwm.rs index e29a4bfc..33f61e3f 100644 --- a/src/pwm.rs +++ b/src/pwm.rs @@ -1526,7 +1526,7 @@ macro_rules! tim_pin_hal { // Even though the field is 20 bits long for 16-bit counters, only 16 bits are // valid, so we convert to the appropriate type. - tim.$ccrx.read().ccr().bits() as $typ + tim.$ccrx().read().ccr().bits() as $typ } fn get_max_duty(&self) -> Self::Duty { @@ -1551,7 +1551,7 @@ macro_rules! tim_pin_hal { fn set_duty(&mut self, duty: Self::Duty) { let tim = unsafe { &*$TIMX::ptr() }; - tim.$ccrx.write(|w| unsafe { w.ccr().bits(duty.into()) }); + tim.$ccrx().write(|w| unsafe { w.ccr().bits(duty.into()) }); } }