Skip to content

Commit e74297a

Browse files
committed
Update PAC stm32l4 to v0.15.1
1 parent 4f74a92 commit e74297a

File tree

5 files changed

+6
-33
lines changed

5 files changed

+6
-33
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ edition = "2018"
2323
[dependencies]
2424
cortex-m = "0.7"
2525
nb = "0.1.1"
26-
stm32l4 = "0.14.0"
26+
stm32l4 = "0.15.1"
2727
embedded-dma = "0.1"
2828
bxcan = ">=0.4, <0.7"
2929
fugit = "0.3.5"

src/pwm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ macro_rules! pwm_channels {
370370

371371
#[inline(always)]
372372
fn get_duty(&self) -> Self::Duty {
373-
unsafe { (*$TIMX::ptr()).$ccrX.read().$ccr().bits() }
373+
unsafe { (*$TIMX::ptr()).$ccrX().read().$ccr().bits() }
374374
}
375375

376376
#[inline(always)]
@@ -380,7 +380,7 @@ macro_rules! pwm_channels {
380380

381381
#[inline(always)]
382382
fn set_duty(&mut self, duty: Self::Duty) {
383-
unsafe { (*$TIMX::ptr()).$ccrX.write(|w| w.$ccr().bits(duty)) }
383+
unsafe { (*$TIMX::ptr()).$ccrX().write(|w| w.$ccr().bits(duty)) }
384384
}
385385
}
386386
)+

src/rtc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ impl Rtc {
271271
rtc_registers::clear_alarm_a_flag(rtc);
272272
while !rtc_registers::is_alarm_a_accessible(rtc) {}
273273

274-
rtc.alrmar.modify(|_, w| unsafe {
274+
rtc.alrmar().modify(|_, w| unsafe {
275275
w.dt()
276276
.bits(dt)
277277
.du()
@@ -307,7 +307,7 @@ impl Rtc {
307307
rtc_registers::clear_alarm_b_flag(rtc);
308308
while !rtc_registers::is_alarm_b_accessible(rtc) {}
309309

310-
rtc.alrmbr.modify(|_, w| unsafe {
310+
rtc.alrmbr().modify(|_, w| unsafe {
311311
w.dt()
312312
.bits(dt)
313313
.du()

src/tsc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl<SPIN> Tsc<SPIN> {
267267
/// Reads the tsc group 2 count register
268268
/// WARNING, just returns the contents of the register! No validation of the correct pin
269269
pub fn read_unchecked(&self) -> u16 {
270-
self.tsc.iog2cr.read().cnt().bits()
270+
self.tsc.iog2cr().read().cnt().bits()
271271
}
272272

273273
/// Is the tsc performing an aquisition

src/watchdog.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,7 @@ impl IndependentWatchdog {
2727

2828
/// Debug independent watchdog stopped when core is halted
2929
pub fn stop_on_debug(&self, dbgmcu: &DBGMCU, stop: bool) {
30-
#[cfg(any(
31-
feature = "stm32l431",
32-
feature = "stm32l451",
33-
feature = "stm32l471",
34-
feature = "stm32l412",
35-
feature = "stm32l422",
36-
feature = "stm32l432",
37-
feature = "stm32l442",
38-
feature = "stm32l452",
39-
feature = "stm32l462",
40-
feature = "stm32l433",
41-
feature = "stm32l443",
42-
))]
4330
dbgmcu.apb1fzr1.modify(|_, w| w.dbg_iwdg_stop().bit(stop));
44-
#[cfg(not(any(
45-
feature = "stm32l431",
46-
feature = "stm32l451",
47-
feature = "stm32l471",
48-
feature = "stm32l412",
49-
feature = "stm32l422",
50-
feature = "stm32l432",
51-
feature = "stm32l442",
52-
feature = "stm32l452",
53-
feature = "stm32l462",
54-
feature = "stm32l433",
55-
feature = "stm32l443",
56-
)))]
57-
dbgmcu.apb1_fzr1.modify(|_, w| w.dbg_iwdg_stop().bit(stop));
5831
}
5932

6033
/// Sets the watchdog timer timout period. Max: 32768 ms

0 commit comments

Comments
 (0)