-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RTC mapping for STM32F405 targets.
- Loading branch information
1 parent
95290a2
commit 8042ba1
Showing
4 changed files
with
163 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
//! Real-time clock. | ||
//! | ||
//! For STM32F4 series of high-performance MCUs with DSP and FPU instructions. | ||
|
||
use drone_core::periph; | ||
|
||
periph::singular! { | ||
/// Extracts RTC register tokens. | ||
pub macro periph_rtc; | ||
|
||
/// RTC peripheral. | ||
pub struct RtcPeriph; | ||
|
||
drone_stm32_map_pieces::reg; | ||
crate; | ||
|
||
PWR { | ||
CR { | ||
DBP; | ||
} | ||
} | ||
|
||
RCC { | ||
APB1ENR { | ||
PWREN; | ||
} | ||
CFGR { | ||
RTCPRE; | ||
} | ||
CSR { | ||
LSIRDY; | ||
LSION; | ||
} | ||
BDCR { | ||
BDRST; | ||
RTCEN; | ||
RTCSEL1; | ||
RTCSEL0; | ||
LSEBYP; | ||
LSERDY; | ||
LSEON; | ||
} | ||
} | ||
|
||
RTC { | ||
TR; | ||
DR; | ||
CR; | ||
ISR; | ||
PRER; | ||
WUTR; | ||
CALIBR; | ||
ALRMBR; | ||
ALRMAR; | ||
WPR; | ||
SSR; | ||
SHIFTR; | ||
TSTR; | ||
TSDR; | ||
TSSSR; | ||
CALR; | ||
TAFCR; | ||
ALRMASSR; | ||
ALRMBSSR; | ||
BKP0R; | ||
BKP1R; | ||
BKP2R; | ||
BKP3R; | ||
BKP4R; | ||
BKP5R; | ||
BKP6R; | ||
BKP7R; | ||
BKP8R; | ||
BKP9R; | ||
BKP10R; | ||
BKP11R; | ||
BKP12R; | ||
BKP13R; | ||
BKP14R; | ||
BKP15R; | ||
BKP16R; | ||
BKP17R; | ||
BKP18R; | ||
BKP19R; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters