Skip to content

Commit 2a55ace

Browse files
committed
bump stm32g0 version
1 parent 865ed9d commit 2a55ace

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ portable-atomic = { version = "1.10.0", features = ["critical-section"] }
2626

2727
[dependencies.stm32g0]
2828
package = "stm32g0-staging"
29-
version = "0.16.0"
29+
version = "0.17.0"
3030
features = ["atomics"]
3131

3232
[dependencies.void]

src/analog/adc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl Adc {
308308
.chselr0()
309309
.modify(|_, w| unsafe { w.bits(1 << PIN::channel()) });
310310

311-
self.rb.isr().modify(|_, w| w.eos().set_bit());
311+
self.rb.isr().modify(|_, w| w.eos().clear_bit_by_one());
312312
self.rb.cr().modify(|_, w| w.adstart().set_bit());
313313
while self.rb.isr().read().eos().bit_is_clear() {}
314314

@@ -352,14 +352,14 @@ impl Adc {
352352
}
353353

354354
fn power_up(&mut self) {
355-
self.rb.isr().modify(|_, w| w.adrdy().set_bit());
355+
self.rb.isr().modify(|_, w| w.adrdy().clear_bit_by_one());
356356
self.rb.cr().modify(|_, w| w.aden().set_bit());
357357
while self.rb.isr().read().adrdy().bit_is_clear() {}
358358
}
359359

360360
fn power_down(&mut self) {
361361
self.rb.cr().modify(|_, w| w.addis().set_bit());
362-
self.rb.isr().modify(|_, w| w.adrdy().set_bit());
362+
self.rb.isr().modify(|_, w| w.adrdy().clear_bit_by_one());
363363
while self.rb.cr().read().aden().bit_is_set() {}
364364
}
365365
}

src/exti.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ impl ExtiExt for EXTI {
114114
feature = "stm32g070",
115115
feature = "stm32g031",
116116
feature = "stm32g041",
117-
feature = "stm32g0b1"
117+
feature = "stm32g0b1",
118+
feature = "stm32g0c1"
118119
))]
119120
self.imr1()
120121
.modify(|r, w| unsafe { w.bits(r.bits() | 1 << ev as u8) });

src/flash/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl WriteErase for UnlockedFlash {
131131
}
132132
#[cfg(not(feature = "stm32g0x0"))]
133133
unsafe {
134-
w.pnb().bits(page.0 as u8);
134+
w.pnb().bits(page.0 as _);
135135
}
136136
w.strt().set_bit()
137137
});

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ pub use stm32g0::stm32g070 as stm32;
4040
#[cfg(feature = "stm32g0b1")]
4141
pub use stm32g0::stm32g0b1 as stm32;
4242

43+
#[cfg(feature = "stm32g0c1")]
44+
pub use stm32g0::stm32g0c1 as stm32;
45+
4346
#[cfg(feature = "rt")]
4447
pub use crate::stm32::interrupt;
4548

src/serial/usart.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -886,14 +886,15 @@ uart_full!(USART2, usart2, 1);
886886
feature = "stm32g030",
887887
feature = "stm32g031",
888888
feature = "stm32g041",
889-
feature = "stm32g0b1"
889+
feature = "stm32g0b1",
890+
feature = "stm32g0c1",
890891
))]
891892
uart_basic!(USART2, usart2, 1);
892893

893-
#[cfg(any(feature = "stm32g070", feature = "stm32g071", feature = "stm32g081"))]
894+
#[cfg(any(feature = "stm32g070", feature = "stm32g071", feature = "stm32g081",))]
894895
uart_basic!(USART3, usart3, 1);
895896

896-
#[cfg(any(feature = "stm32g070", feature = "stm32g071", feature = "stm32g081"))]
897+
#[cfg(any(feature = "stm32g070", feature = "stm32g071", feature = "stm32g081",))]
897898
uart_basic!(USART4, usart4, 1);
898899

899900
// LPUART Should be given its own implementation when it needs to be used with features not present on

0 commit comments

Comments
 (0)