Struct s2pac_ch32v103::BKP

source ·
pub struct BKP { /* private fields */ }
Expand description

Backup registers

Implementations§

source§

impl BKP

source

pub const PTR: *const RegisterBlock = {0x40006c00 as *const bkp::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 datar1(&self) -> &DATAR1

0x04 - Backup data register (BKP_DR)

source

pub fn datar2(&self) -> &DATAR2

0x08 - Backup data register (BKP_DR)

source

pub fn datar3(&self) -> &DATAR3

0x0c - Backup data register (BKP_DR)

source

pub fn datar4(&self) -> &DATAR4

0x10 - Backup data register (BKP_DR)

source

pub fn datar5(&self) -> &DATAR5

0x14 - Backup data register (BKP_DR)

source

pub fn datar6(&self) -> &DATAR6

0x18 - Backup data register (BKP_DR)

source

pub fn datar7(&self) -> &DATAR7

0x1c - Backup data register (BKP_DR)

source

pub fn datar8(&self) -> &DATAR8

0x20 - Backup data register (BKP_DR)

source

pub fn datar9(&self) -> &DATAR9

0x24 - Backup data register (BKP_DR)

source

pub fn datar10(&self) -> &DATAR10

0x28 - Backup data register (BKP_DR)

source

pub fn octlr(&self) -> &OCTLR

0x2c - RTC clock calibration register (BKP_OCTLR)

source

pub fn tpctlr(&self) -> &TPCTLR

0x30 - Backup control register (BKP_TPCTLR)

source

pub fn tpcsr(&self) -> &TPCSR

0x34 - BKP_TPCSR control/status register (BKP_CSR)

Trait Implementations§

source§

impl Debug for BKP

source§

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

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

impl Deref for BKP

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl Send for BKP

Auto Trait Implementations§

§

impl RefUnwindSafe for BKP

§

impl !Sync for BKP

§

impl Unpin for BKP

§

impl UnwindSafe for BKP

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<T, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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.