Struct HBN

Source
pub struct HBN { /* private fields */ }
Expand description

Hibernate (Deep sleep) control

Implementations§

Source§

impl HBN

Source

pub const PTR: *const RegisterBlock = {0x2000f000 as *const hbn::RegisterBlock}

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

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>§

Source

pub fn control(&self) -> &CONTROL

0x00 - Miscellaneous control register

Source

pub fn time_lo(&self) -> &TIME_LO

0x04 - Low bits of hibernate time

Source

pub fn time_hi(&self) -> &TIME_HI

0x08 - High bits of hibernate time

Source

pub fn rtc_time_lo(&self) -> &RTC_TIME_LO

0x0c - Low bits of Real-Time Clock time

Source

pub fn rtc_time_hi(&self) -> &RTC_TIME_HI

0x10 - High bits of Real-Time Clock time

Source

pub fn interrupt_mode(&self) -> &INTERRUPT_MODE

0x14 - Hibernate interrupt contol

Source

pub fn interrupt_state(&self) -> &INTERRUPT_STATE

0x18 - Hibernate interrupt state

Source

pub fn interrupt_clear(&self) -> &INTERRUPT_CLEAR

0x1c - Clear hibernate interrupt

Source

pub fn hbn_pir_cfg(&self) -> &HBN_PIR_CFG

0x20 - HBN_PIR_CFG.

Source

pub fn hbn_pir_vth(&self) -> &HBN_PIR_VTH

0x24 - HBN_PIR_VTH.

Source

pub fn hbn_pir_interval(&self) -> &HBN_PIR_INTERVAL

0x28 - HBN_PIR_INTERVAL.

Source

pub fn hbn_bor_cfg(&self) -> &HBN_BOR_CFG

0x2c - HBN_BOR_CFG.

Source

pub fn global(&self) -> &GLOBAL

0x30 - Global hibernate configuration

Source

pub fn sram(&self) -> &SRAM

0x34 - Static Random-Access Memory hibernate control

Source

pub fn hbn_pad_ctrl_0(&self) -> &HBN_PAD_CTRL_0

0x38 - HBN_PAD_CTRL_0.

Source

pub fn hbn_pad_ctrl_1(&self) -> &HBN_PAD_CTRL_1

0x3c - HBN_PAD_CTRL_1.

Source

pub fn vbat_ldo(&self) -> &VBAT_LDO

0x40 - vbat_ldo.

Source

pub fn hbn_rsv0(&self) -> &HBN_RSV0

0x100 - HBN_RSV0.

Source

pub fn hbn_rsv1(&self) -> &HBN_RSV1

0x104 - HBN_RSV1.

Source

pub fn hbn_rsv2(&self) -> &HBN_RSV2

0x108 - HBN_RSV2.

Source

pub fn hbn_rsv3(&self) -> &HBN_RSV3

0x10c - HBN_RSV3.

Source

pub fn rc32k(&self) -> &RC32K

0x200 - 32-kHz internal RC oscillator control

Source

pub fn xtal32k(&self) -> &XTAL32K

0x204 - External crystal oscillator control

Source

pub fn rtc_control_0(&self) -> &RTC_CONTROL_0

0x208 - Real-Time Clock control and reset register 0

Source

pub fn rtc_control_1(&self) -> &RTC_CONTROL_1

0x20c - Real-Time Clock control and reset register 1

Trait Implementations§

Source§

impl Debug for HBN

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for HBN

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for HBN

Auto Trait Implementations§

§

impl Freeze for HBN

§

impl RefUnwindSafe for HBN

§

impl !Sync for HBN

§

impl Unpin for HBN

§

impl UnwindSafe for HBN

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.