pub type R = crate::R<AWLTRrs>;
pub type W = crate::W<AWLTRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BKAWL0 {
NotAssigned = 0,
Assigned = 1,
}
impl From<BKAWL0> for bool {
#[inline(always)]
fn from(variant: BKAWL0) -> Self {
variant as u8 != 0
}
}
pub type BKAWL_R = crate::BitReader<BKAWL0>;
impl BKAWL_R {
#[inline(always)]
pub const fn variant(&self) -> BKAWL0 {
match self.bits {
false => BKAWL0::NotAssigned,
true => BKAWL0::Assigned,
}
}
#[inline(always)]
pub fn is_not_assigned(&self) -> bool {
*self == BKAWL0::NotAssigned
}
#[inline(always)]
pub fn is_assigned(&self) -> bool {
*self == BKAWL0::Assigned
}
}
pub type BKAWL_W<'a, REG> = crate::BitWriter<'a, REG, BKAWL0>;
impl<'a, REG> BKAWL_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn not_assigned(self) -> &'a mut crate::W<REG> {
self.variant(BKAWL0::NotAssigned)
}
#[inline(always)]
pub fn assigned(self) -> &'a mut crate::W<REG> {
self.variant(BKAWL0::Assigned)
}
}
pub type AWLT_R = crate::FieldReader<u32>;
pub type AWLT_W<'a, REG> = crate::FieldWriter<'a, REG, 24, u32, crate::Safe>;
impl R {
#[inline(always)]
pub fn bkawl(&self, n: u8) -> BKAWL_R {
#[allow(clippy::no_effect)] [(); 4][n as usize];
BKAWL_R::new(((self.bits >> n) & 1) != 0)
}
#[inline(always)]
pub fn bkawl_iter(&self) -> impl Iterator<Item = BKAWL_R> + '_ {
(0..4).map(move |n| BKAWL_R::new(((self.bits >> n) & 1) != 0))
}
#[inline(always)]
pub fn bkawl0(&self) -> BKAWL_R {
BKAWL_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn bkawl1(&self) -> BKAWL_R {
BKAWL_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn bkawl2(&self) -> BKAWL_R {
BKAWL_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn bkawl3(&self) -> BKAWL_R {
BKAWL_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn awlt(&self) -> AWLT_R {
AWLT_R::new((self.bits >> 8) & 0x00ff_ffff)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AWLTR")
.field("awlt", &self.awlt())
.field("bkawl0", &self.bkawl0())
.field("bkawl1", &self.bkawl1())
.field("bkawl2", &self.bkawl2())
.field("bkawl3", &self.bkawl3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn bkawl(&mut self, n: u8) -> BKAWL_W<AWLTRrs> {
#[allow(clippy::no_effect)] [(); 4][n as usize];
BKAWL_W::new(self, n)
}
#[inline(always)]
pub fn bkawl0(&mut self) -> BKAWL_W<AWLTRrs> {
BKAWL_W::new(self, 0)
}
#[inline(always)]
pub fn bkawl1(&mut self) -> BKAWL_W<AWLTRrs> {
BKAWL_W::new(self, 1)
}
#[inline(always)]
pub fn bkawl2(&mut self) -> BKAWL_W<AWLTRrs> {
BKAWL_W::new(self, 2)
}
#[inline(always)]
pub fn bkawl3(&mut self) -> BKAWL_W<AWLTRrs> {
BKAWL_W::new(self, 3)
}
#[inline(always)]
pub fn awlt(&mut self) -> AWLT_W<AWLTRrs> {
AWLT_W::new(self, 8)
}
}
pub struct AWLTRrs;
impl crate::RegisterSpec for AWLTRrs {
type Ux = u32;
}
impl crate::Readable for AWLTRrs {}
impl crate::Writable for AWLTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AWLTRrs {}