pub type R = crate::R<ADC2ALTrs>;
pub type W = crate::W<ADC2ALTrs>;
pub type ADC2_ROUT0_R = crate::BitReader;
pub type ADC2_ROUT0_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADC2_ROUT1_R = crate::BitReader;
pub type ADC2_ROUT1_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn adc2_rout0(&self) -> ADC2_ROUT0_R {
ADC2_ROUT0_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn adc2_rout1(&self) -> ADC2_ROUT1_R {
ADC2_ROUT1_R::new(((self.bits >> 1) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ADC2ALT")
.field("adc2_rout1", &self.adc2_rout1())
.field("adc2_rout0", &self.adc2_rout0())
.finish()
}
}
impl W {
#[inline(always)]
pub fn adc2_rout0(&mut self) -> ADC2_ROUT0_W<ADC2ALTrs> {
ADC2_ROUT0_W::new(self, 0)
}
#[inline(always)]
pub fn adc2_rout1(&mut self) -> ADC2_ROUT1_W<ADC2ALTrs> {
ADC2_ROUT1_W::new(self, 1)
}
}
pub struct ADC2ALTrs;
impl crate::RegisterSpec for ADC2ALTrs {
type Ux = u32;
}
impl crate::Readable for ADC2ALTrs {}
impl crate::Writable for ADC2ALTrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ADC2ALTrs {}