Skip to content

Commit 47f59b9

Browse files
committed
move rtc traits declaration location
1 parent 6242a84 commit 47f59b9

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/rtc.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
//! RTC peripheral abstraction
22
3-
mod traits;
4-
53
use void::Void;
64

75
use crate::{
86
datetime::*,
97
hal::timer::{self, Cancel as _},
108
pwr,
119
rcc::{APB1R1, BDCR},
12-
rtc::traits::{RtcGpio, RtcIsr},
1310
stm32::{EXTI, RTC},
11+
traits::rtc::{RtcGpio, RtcIsr},
1412
};
1513

1614
/// Interrupt event
@@ -485,7 +483,7 @@ impl Rtc {
485483
feature = "private_product_L41_L42",
486484
feature = "private_product_L4P_L4Q"
487485
)))]
488-
impl traits::RtcIsr for Rtc {
486+
impl RtcIsr for Rtc {
489487
/// true if initf bit indicates RTC peripheral is in init mode
490488
fn is_init_mode(rtc: &RTC) -> bool {
491489
rtc.isr.read().initf().bit_is_set()
@@ -559,7 +557,7 @@ impl traits::RtcIsr for Rtc {
559557
feature = "private_product_L41_L42",
560558
feature = "private_product_L4P_L4Q"
561559
))]
562-
impl traits::RtcIsr for Rtc {
560+
impl RtcIsr for Rtc {
563561
/// true if initf bit indicates RTC peripheral is in init mode
564562
fn is_init_mode(rtc: &RTC) -> bool {
565563
rtc.icsr.read().initf().bit_is_set()
@@ -635,7 +633,7 @@ impl traits::RtcIsr for Rtc {
635633
feature = "private_product_L41_L42",
636634
feature = "private_product_L4P_L4Q"
637635
)))]
638-
impl traits::RtcGpio for Rtc {
636+
impl RtcGpio for Rtc {
639637
fn reset_gpio(rtc: &RTC) {
640638
rtc.or
641639
.modify(|_, w| w.rtc_alarm_type().clear_bit().rtc_out_rmp().clear_bit());
@@ -647,7 +645,7 @@ impl traits::RtcGpio for Rtc {
647645
feature = "private_product_L41_L42",
648646
feature = "private_product_L4P_L4Q"
649647
))]
650-
impl traits::RtcGpio for Rtc {
648+
impl RtcGpio for Rtc {
651649
fn reset_gpio(rtc: &RTC) {
652650
rtc.cr.modify(|_, w| {
653651
w.out2en()

src/traits/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pub mod flash;
2+
pub(crate) mod rtc;
File renamed without changes.

0 commit comments

Comments
 (0)