Skip to content

Commit c416cb7

Browse files
committed
Make rtc optional
This relies on an external dependecy. Better make it optional to be able to reduce reliance on external dependencies.
1 parent c64a948 commit c416cb7

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1818

1919
- Support cortex-m-rt `v0.7.0` but still allow `v0.6.13` ([#283])
2020

21+
### Breaking Changes
22+
23+
- Make `rtc` an optional feature. Without that feature `rtcc` as a dependency is
24+
not needed. ([#283])
25+
2126
## [v0.8.0] - 2021-08-16
2227

2328
### Added

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ embedded-hal = { version = "0.2.5", features = ["unproven"] }
4242
embedded-time = "0.12.0"
4343
nb = "1.0.0"
4444
paste = "1.0.5"
45-
rtcc = "0.2.1"
45+
rtcc = { version = "0.2.1", optional = true }
4646
stm32f3 = { version = "0.13.2", default-features = false }
4747
bxcan = { version = ">=0.4, <0.6", optional = true }
4848
stm32-usbd = { version = "0.6.0", optional = true }
@@ -73,6 +73,7 @@ ld = []
7373
rt = ["stm32f3/rt"]
7474
can = ["bxcan"]
7575
usb = ["stm32-usbd"]
76+
rtc = ["rtcc"]
7677

7778
svd-f301 = ["stm32f3/stm32f301"]
7879
svd-f302 = ["stm32f3/stm32f302"]

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@
8282
8383
Enable USB peripherals on supported targets via the [`stm32-usbd`](https://crates.io/crates/sttm32-usbd) crate.
8484
85+
### `rtc`
86+
87+
Enables RTC support, build upon [`rtcc`](https://crates.io/crates/rtcc) crate.
88+
8589
### `enumset`
8690
8791
Enable functions, which leverage [`enumset`](https://crates.io/crates/enumset).
@@ -180,6 +184,8 @@ pub mod interrupts;
180184
pub mod prelude;
181185
pub mod pwm;
182186
pub mod rcc;
187+
#[cfg(feature = "rtc")]
188+
#[cfg_attr(docsrs, doc(cfg(feature = "rtc")))]
183189
pub mod rtc;
184190
pub mod serial;
185191
pub mod spi;

0 commit comments

Comments
 (0)