pub struct HBN { /* private fields */ }
Expand description
Hibernate (Deep sleep) control
Implementations§
Source§impl HBN
impl HBN
Sourcepub const PTR: *const RegisterBlock = {0x2000f000 as *const hbn::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x2000f000 as *const hbn::RegisterBlock}
Pointer to the register block
Sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
Sourcepub unsafe fn steal() -> Self
pub unsafe fn steal() -> Self
Steal an instance of this peripheral
§Safety
Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.
Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.
Methods from Deref<Target = RegisterBlock>§
Sourcepub fn rtc_time_lo(&self) -> &RTC_TIME_LO
pub fn rtc_time_lo(&self) -> &RTC_TIME_LO
0x0c - Low bits of Real-Time Clock time
Sourcepub fn rtc_time_hi(&self) -> &RTC_TIME_HI
pub fn rtc_time_hi(&self) -> &RTC_TIME_HI
0x10 - High bits of Real-Time Clock time
Sourcepub fn interrupt_mode(&self) -> &INTERRUPT_MODE
pub fn interrupt_mode(&self) -> &INTERRUPT_MODE
0x14 - Hibernate interrupt contol
Sourcepub fn interrupt_state(&self) -> &INTERRUPT_STATE
pub fn interrupt_state(&self) -> &INTERRUPT_STATE
0x18 - Hibernate interrupt state
Sourcepub fn interrupt_clear(&self) -> &INTERRUPT_CLEAR
pub fn interrupt_clear(&self) -> &INTERRUPT_CLEAR
0x1c - Clear hibernate interrupt
Sourcepub fn hbn_pir_cfg(&self) -> &HBN_PIR_CFG
pub fn hbn_pir_cfg(&self) -> &HBN_PIR_CFG
0x20 - HBN_PIR_CFG.
Sourcepub fn hbn_pir_vth(&self) -> &HBN_PIR_VTH
pub fn hbn_pir_vth(&self) -> &HBN_PIR_VTH
0x24 - HBN_PIR_VTH.
Sourcepub fn hbn_pir_interval(&self) -> &HBN_PIR_INTERVAL
pub fn hbn_pir_interval(&self) -> &HBN_PIR_INTERVAL
0x28 - HBN_PIR_INTERVAL.
Sourcepub fn hbn_bor_cfg(&self) -> &HBN_BOR_CFG
pub fn hbn_bor_cfg(&self) -> &HBN_BOR_CFG
0x2c - HBN_BOR_CFG.
Sourcepub fn hbn_pad_ctrl_0(&self) -> &HBN_PAD_CTRL_0
pub fn hbn_pad_ctrl_0(&self) -> &HBN_PAD_CTRL_0
0x38 - HBN_PAD_CTRL_0.
Sourcepub fn hbn_pad_ctrl_1(&self) -> &HBN_PAD_CTRL_1
pub fn hbn_pad_ctrl_1(&self) -> &HBN_PAD_CTRL_1
0x3c - HBN_PAD_CTRL_1.
Sourcepub fn rtc_control_0(&self) -> &RTC_CONTROL_0
pub fn rtc_control_0(&self) -> &RTC_CONTROL_0
0x208 - Real-Time Clock control and reset register 0
Sourcepub fn rtc_control_1(&self) -> &RTC_CONTROL_1
pub fn rtc_control_1(&self) -> &RTC_CONTROL_1
0x20c - Real-Time Clock control and reset register 1