cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `UCB0IE` reader"]
pub type R = crate::R<Ucb0ieSpec>;
#[doc = "Register `UCB0IE` writer"]
pub type W = crate::W<Ucb0ieSpec>;
#[doc = "Field `UCRXIE` reader - USCI Receive Interrupt Enable"]
pub type UcrxieR = crate::BitReader;
#[doc = "Field `UCRXIE` writer - USCI Receive Interrupt Enable"]
pub type UcrxieW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `UCTXIE` reader - USCI Transmit Interrupt Enable"]
pub type UctxieR = crate::BitReader;
#[doc = "Field `UCTXIE` writer - USCI Transmit Interrupt Enable"]
pub type UctxieW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `UCSTTIE` reader - START Condition interrupt enable"]
pub type UcsttieR = crate::BitReader;
#[doc = "Field `UCSTTIE` writer - START Condition interrupt enable"]
pub type UcsttieW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `UCSTPIE` reader - STOP Condition interrupt enable"]
pub type UcstpieR = crate::BitReader;
#[doc = "Field `UCSTPIE` writer - STOP Condition interrupt enable"]
pub type UcstpieW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `UCALIE` reader - Arbitration Lost interrupt enable"]
pub type UcalieR = crate::BitReader;
#[doc = "Field `UCALIE` writer - Arbitration Lost interrupt enable"]
pub type UcalieW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `UCNACKIE` reader - NACK Condition interrupt enable"]
pub type UcnackieR = crate::BitReader;
#[doc = "Field `UCNACKIE` writer - NACK Condition interrupt enable"]
pub type UcnackieW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - USCI Receive Interrupt Enable"]
    #[inline(always)]
    pub fn ucrxie(&self) -> UcrxieR {
        UcrxieR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - USCI Transmit Interrupt Enable"]
    #[inline(always)]
    pub fn uctxie(&self) -> UctxieR {
        UctxieR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - START Condition interrupt enable"]
    #[inline(always)]
    pub fn ucsttie(&self) -> UcsttieR {
        UcsttieR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - STOP Condition interrupt enable"]
    #[inline(always)]
    pub fn ucstpie(&self) -> UcstpieR {
        UcstpieR::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Arbitration Lost interrupt enable"]
    #[inline(always)]
    pub fn ucalie(&self) -> UcalieR {
        UcalieR::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - NACK Condition interrupt enable"]
    #[inline(always)]
    pub fn ucnackie(&self) -> UcnackieR {
        UcnackieR::new(((self.bits >> 5) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - USCI Receive Interrupt Enable"]
    #[inline(always)]
    pub fn ucrxie(&mut self) -> UcrxieW<'_, Ucb0ieSpec> {
        UcrxieW::new(self, 0)
    }
    #[doc = "Bit 1 - USCI Transmit Interrupt Enable"]
    #[inline(always)]
    pub fn uctxie(&mut self) -> UctxieW<'_, Ucb0ieSpec> {
        UctxieW::new(self, 1)
    }
    #[doc = "Bit 2 - START Condition interrupt enable"]
    #[inline(always)]
    pub fn ucsttie(&mut self) -> UcsttieW<'_, Ucb0ieSpec> {
        UcsttieW::new(self, 2)
    }
    #[doc = "Bit 3 - STOP Condition interrupt enable"]
    #[inline(always)]
    pub fn ucstpie(&mut self) -> UcstpieW<'_, Ucb0ieSpec> {
        UcstpieW::new(self, 3)
    }
    #[doc = "Bit 4 - Arbitration Lost interrupt enable"]
    #[inline(always)]
    pub fn ucalie(&mut self) -> UcalieW<'_, Ucb0ieSpec> {
        UcalieW::new(self, 4)
    }
    #[doc = "Bit 5 - NACK Condition interrupt enable"]
    #[inline(always)]
    pub fn ucnackie(&mut self) -> UcnackieW<'_, Ucb0ieSpec> {
        UcnackieW::new(self, 5)
    }
}
#[doc = "USCI B0 Interrupt Enable Register\n\nYou can [`read`](crate::Reg::read) this register and get [`ucb0ie::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ucb0ie::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct Ucb0ieSpec;
impl crate::RegisterSpec for Ucb0ieSpec {
    type Ux = u8;
}
#[doc = "`read()` method returns [`ucb0ie::R`](R) reader structure"]
impl crate::Readable for Ucb0ieSpec {}
#[doc = "`write(|w| ..)` method takes [`ucb0ie::W`](W) writer structure"]
impl crate::Writable for Ucb0ieSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets UCB0IE to value 0"]
impl crate::Resettable for Ucb0ieSpec {}