Skip to content

Commit

Permalink
Update stm32g4 PAC to 0.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kevswims authored and luctius committed Feb 13, 2023
1 parent 3c55b87 commit 4e25b7c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/fdcan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
8 changes: 4 additions & 4 deletions src/opamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/pwm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()) });
}
}

Expand Down

0 comments on commit 4e25b7c

Please sign in to comment.