pub type R = crate::R<SWLEVELrs>;
pub type W = crate::W<SWLEVELrs>;
pub type Ch0levelR = crate::BitReader;
pub type Ch0levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch1levelR = crate::BitReader;
pub type Ch1levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch2levelR = crate::BitReader;
pub type Ch2levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch3levelR = crate::BitReader;
pub type Ch3levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch4levelR = crate::BitReader;
pub type Ch4levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch5levelR = crate::BitReader;
pub type Ch5levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch6levelR = crate::BitReader;
pub type Ch6levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch7levelR = crate::BitReader;
pub type Ch7levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch8levelR = crate::BitReader;
pub type Ch8levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch9levelR = crate::BitReader;
pub type Ch9levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch10levelR = crate::BitReader;
pub type Ch10levelW<'a, REG> = crate::BitWriter<'a, REG>;
pub type Ch11levelR = crate::BitReader;
pub type Ch11levelW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn ch0level(&self) -> Ch0levelR {
Ch0levelR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ch1level(&self) -> Ch1levelR {
Ch1levelR::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn ch2level(&self) -> Ch2levelR {
Ch2levelR::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn ch3level(&self) -> Ch3levelR {
Ch3levelR::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn ch4level(&self) -> Ch4levelR {
Ch4levelR::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn ch5level(&self) -> Ch5levelR {
Ch5levelR::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn ch6level(&self) -> Ch6levelR {
Ch6levelR::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn ch7level(&self) -> Ch7levelR {
Ch7levelR::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn ch8level(&self) -> Ch8levelR {
Ch8levelR::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ch9level(&self) -> Ch9levelR {
Ch9levelR::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn ch10level(&self) -> Ch10levelR {
Ch10levelR::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn ch11level(&self) -> Ch11levelR {
Ch11levelR::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SWLEVEL")
.field("ch0level", &self.ch0level())
.field("ch1level", &self.ch1level())
.field("ch2level", &self.ch2level())
.field("ch3level", &self.ch3level())
.field("ch4level", &self.ch4level())
.field("ch5level", &self.ch5level())
.field("ch6level", &self.ch6level())
.field("ch7level", &self.ch7level())
.field("ch8level", &self.ch8level())
.field("ch9level", &self.ch9level())
.field("ch10level", &self.ch10level())
.field("ch11level", &self.ch11level())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ch0level(&mut self) -> Ch0levelW<'_, SWLEVELrs> {
Ch0levelW::new(self, 0)
}
#[inline(always)]
pub fn ch1level(&mut self) -> Ch1levelW<'_, SWLEVELrs> {
Ch1levelW::new(self, 1)
}
#[inline(always)]
pub fn ch2level(&mut self) -> Ch2levelW<'_, SWLEVELrs> {
Ch2levelW::new(self, 2)
}
#[inline(always)]
pub fn ch3level(&mut self) -> Ch3levelW<'_, SWLEVELrs> {
Ch3levelW::new(self, 3)
}
#[inline(always)]
pub fn ch4level(&mut self) -> Ch4levelW<'_, SWLEVELrs> {
Ch4levelW::new(self, 4)
}
#[inline(always)]
pub fn ch5level(&mut self) -> Ch5levelW<'_, SWLEVELrs> {
Ch5levelW::new(self, 5)
}
#[inline(always)]
pub fn ch6level(&mut self) -> Ch6levelW<'_, SWLEVELrs> {
Ch6levelW::new(self, 6)
}
#[inline(always)]
pub fn ch7level(&mut self) -> Ch7levelW<'_, SWLEVELrs> {
Ch7levelW::new(self, 7)
}
#[inline(always)]
pub fn ch8level(&mut self) -> Ch8levelW<'_, SWLEVELrs> {
Ch8levelW::new(self, 8)
}
#[inline(always)]
pub fn ch9level(&mut self) -> Ch9levelW<'_, SWLEVELrs> {
Ch9levelW::new(self, 9)
}
#[inline(always)]
pub fn ch10level(&mut self) -> Ch10levelW<'_, SWLEVELrs> {
Ch10levelW::new(self, 10)
}
#[inline(always)]
pub fn ch11level(&mut self) -> Ch11levelW<'_, SWLEVELrs> {
Ch11levelW::new(self, 11)
}
}
pub struct SWLEVELrs;
impl crate::RegisterSpec for SWLEVELrs {
type Ux = u32;
}
impl crate::Readable for SWLEVELrs {}
impl crate::Writable for SWLEVELrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for SWLEVELrs {}