#[doc = "Register `CBINT` reader"]
pub type R = crate::R<CbintSpec>;
#[doc = "Register `CBINT` writer"]
pub type W = crate::W<CbintSpec>;
#[doc = "Field `CBIFG` reader - Comp. B Interrupt Flag"]
pub type CbifgR = crate::BitReader;
#[doc = "Field `CBIFG` writer - Comp. B Interrupt Flag"]
pub type CbifgW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CBIIFG` reader - Comp. B Interrupt Flag Inverted Polarity"]
pub type CbiifgR = crate::BitReader;
#[doc = "Field `CBIIFG` writer - Comp. B Interrupt Flag Inverted Polarity"]
pub type CbiifgW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CBIE` reader - Comp. B Interrupt Enable"]
pub type CbieR = crate::BitReader;
#[doc = "Field `CBIE` writer - Comp. B Interrupt Enable"]
pub type CbieW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `CBIIE` reader - Comp. B Interrupt Enable Inverted Polarity"]
pub type CbiieR = crate::BitReader;
#[doc = "Field `CBIIE` writer - Comp. B Interrupt Enable Inverted Polarity"]
pub type CbiieW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[doc = "Bit 0 - Comp. B Interrupt Flag"]
#[inline(always)]
pub fn cbifg(&self) -> CbifgR {
CbifgR::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Comp. B Interrupt Flag Inverted Polarity"]
#[inline(always)]
pub fn cbiifg(&self) -> CbiifgR {
CbiifgR::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 8 - Comp. B Interrupt Enable"]
#[inline(always)]
pub fn cbie(&self) -> CbieR {
CbieR::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - Comp. B Interrupt Enable Inverted Polarity"]
#[inline(always)]
pub fn cbiie(&self) -> CbiieR {
CbiieR::new(((self.bits >> 9) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Comp. B Interrupt Flag"]
#[inline(always)]
pub fn cbifg(&mut self) -> CbifgW<'_, CbintSpec> {
CbifgW::new(self, 0)
}
#[doc = "Bit 1 - Comp. B Interrupt Flag Inverted Polarity"]
#[inline(always)]
pub fn cbiifg(&mut self) -> CbiifgW<'_, CbintSpec> {
CbiifgW::new(self, 1)
}
#[doc = "Bit 8 - Comp. B Interrupt Enable"]
#[inline(always)]
pub fn cbie(&mut self) -> CbieW<'_, CbintSpec> {
CbieW::new(self, 8)
}
#[doc = "Bit 9 - Comp. B Interrupt Enable Inverted Polarity"]
#[inline(always)]
pub fn cbiie(&mut self) -> CbiieW<'_, CbintSpec> {
CbiieW::new(self, 9)
}
}
#[doc = "Comparator B Interrupt Register\n\nYou can [`read`](crate::Reg::read) this register and get [`cbint::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cbint::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CbintSpec;
impl crate::RegisterSpec for CbintSpec {
type Ux = u16;
}
#[doc = "`read()` method returns [`cbint::R`](R) reader structure"]
impl crate::Readable for CbintSpec {}
#[doc = "`write(|w| ..)` method takes [`cbint::W`](W) writer structure"]
impl crate::Writable for CbintSpec {
type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets CBINT to value 0"]
impl crate::Resettable for CbintSpec {}