pub type R = crate::R<BSLOTRrs>;
pub type W = crate::W<BSLOTRrs>;
pub type FBOFF_R = crate::FieldReader;
pub type FBOFF_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
pub type SLOTSZ_R = crate::FieldReader;
pub type SLOTSZ_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type NBSLOT_R = crate::FieldReader;
pub type NBSLOT_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type SLOTEN_R = crate::FieldReader<u16>;
pub type SLOTEN_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
impl R {
#[inline(always)]
pub fn fboff(&self) -> FBOFF_R {
FBOFF_R::new((self.bits & 0x1f) as u8)
}
#[inline(always)]
pub fn slotsz(&self) -> SLOTSZ_R {
SLOTSZ_R::new(((self.bits >> 6) & 3) as u8)
}
#[inline(always)]
pub fn nbslot(&self) -> NBSLOT_R {
NBSLOT_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn sloten(&self) -> SLOTEN_R {
SLOTEN_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("BSLOTR")
.field("fboff", &self.fboff())
.field("slotsz", &self.slotsz())
.field("nbslot", &self.nbslot())
.field("sloten", &self.sloten())
.finish()
}
}
impl W {
#[inline(always)]
pub fn fboff(&mut self) -> FBOFF_W<BSLOTRrs> {
FBOFF_W::new(self, 0)
}
#[inline(always)]
pub fn slotsz(&mut self) -> SLOTSZ_W<BSLOTRrs> {
SLOTSZ_W::new(self, 6)
}
#[inline(always)]
pub fn nbslot(&mut self) -> NBSLOT_W<BSLOTRrs> {
NBSLOT_W::new(self, 8)
}
#[inline(always)]
pub fn sloten(&mut self) -> SLOTEN_W<BSLOTRrs> {
SLOTEN_W::new(self, 16)
}
}
pub struct BSLOTRrs;
impl crate::RegisterSpec for BSLOTRrs {
type Ux = u32;
}
impl crate::Readable for BSLOTRrs {}
impl crate::Writable for BSLOTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for BSLOTRrs {}