pub type R = crate::R<UR2rs>;
pub type W = crate::W<UR2rs>;
pub type BORH_R = crate::FieldReader;
pub type BORH_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type BOOT_ADD0_R = crate::FieldReader<u16>;
pub type BOOT_ADD0_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
impl R {
#[inline(always)]
pub fn borh(&self) -> BORH_R {
BORH_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn boot_add0(&self) -> BOOT_ADD0_R {
BOOT_ADD0_R::new(((self.bits >> 16) & 0xffff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("UR2")
.field("borh", &self.borh())
.field("boot_add0", &self.boot_add0())
.finish()
}
}
impl W {
#[inline(always)]
pub fn borh(&mut self) -> BORH_W<UR2rs> {
BORH_W::new(self, 0)
}
#[inline(always)]
pub fn boot_add0(&mut self) -> BOOT_ADD0_W<UR2rs> {
BOOT_ADD0_W::new(self, 16)
}
}
pub struct UR2rs;
impl crate::RegisterSpec for UR2rs {
type Ux = u32;
}
impl crate::Readable for UR2rs {}
impl crate::Writable for UR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for UR2rs {}