msp430f6736 0.1.3

Peripheral access API for MSP430f6736 microcontroller
Documentation
#[doc = "Register `UCB0I2CSA` reader"]
pub struct R(crate::R<UCB0I2CSA_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<UCB0I2CSA_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<UCB0I2CSA_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<UCB0I2CSA_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `UCB0I2CSA` writer"]
pub struct W(crate::W<UCB0I2CSA_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<UCB0I2CSA_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<UCB0I2CSA_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<UCB0I2CSA_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `UCSA0` reader - I2C Slave Address Bit 0"]
pub type UCSA0_R = crate::BitReader<bool>;
#[doc = "Field `UCSA0` writer - I2C Slave Address Bit 0"]
pub type UCSA0_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 0>;
#[doc = "Field `UCSA1` reader - I2C Slave Address Bit 1"]
pub type UCSA1_R = crate::BitReader<bool>;
#[doc = "Field `UCSA1` writer - I2C Slave Address Bit 1"]
pub type UCSA1_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 1>;
#[doc = "Field `UCSA2` reader - I2C Slave Address Bit 2"]
pub type UCSA2_R = crate::BitReader<bool>;
#[doc = "Field `UCSA2` writer - I2C Slave Address Bit 2"]
pub type UCSA2_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 2>;
#[doc = "Field `UCSA3` reader - I2C Slave Address Bit 3"]
pub type UCSA3_R = crate::BitReader<bool>;
#[doc = "Field `UCSA3` writer - I2C Slave Address Bit 3"]
pub type UCSA3_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 3>;
#[doc = "Field `UCSA4` reader - I2C Slave Address Bit 4"]
pub type UCSA4_R = crate::BitReader<bool>;
#[doc = "Field `UCSA4` writer - I2C Slave Address Bit 4"]
pub type UCSA4_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 4>;
#[doc = "Field `UCSA5` reader - I2C Slave Address Bit 5"]
pub type UCSA5_R = crate::BitReader<bool>;
#[doc = "Field `UCSA5` writer - I2C Slave Address Bit 5"]
pub type UCSA5_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 5>;
#[doc = "Field `UCSA6` reader - I2C Slave Address Bit 6"]
pub type UCSA6_R = crate::BitReader<bool>;
#[doc = "Field `UCSA6` writer - I2C Slave Address Bit 6"]
pub type UCSA6_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 6>;
#[doc = "Field `UCSA7` reader - I2C Slave Address Bit 7"]
pub type UCSA7_R = crate::BitReader<bool>;
#[doc = "Field `UCSA7` writer - I2C Slave Address Bit 7"]
pub type UCSA7_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 7>;
#[doc = "Field `UCSA8` reader - I2C Slave Address Bit 8"]
pub type UCSA8_R = crate::BitReader<bool>;
#[doc = "Field `UCSA8` writer - I2C Slave Address Bit 8"]
pub type UCSA8_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 8>;
#[doc = "Field `UCSA9` reader - I2C Slave Address Bit 9"]
pub type UCSA9_R = crate::BitReader<bool>;
#[doc = "Field `UCSA9` writer - I2C Slave Address Bit 9"]
pub type UCSA9_W<'a> = crate::BitWriter<'a, u16, UCB0I2CSA_SPEC, bool, 9>;
impl R {
    #[doc = "Bit 0 - I2C Slave Address Bit 0"]
    #[inline(always)]
    pub fn ucsa0(&self) -> UCSA0_R {
        UCSA0_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - I2C Slave Address Bit 1"]
    #[inline(always)]
    pub fn ucsa1(&self) -> UCSA1_R {
        UCSA1_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - I2C Slave Address Bit 2"]
    #[inline(always)]
    pub fn ucsa2(&self) -> UCSA2_R {
        UCSA2_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - I2C Slave Address Bit 3"]
    #[inline(always)]
    pub fn ucsa3(&self) -> UCSA3_R {
        UCSA3_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - I2C Slave Address Bit 4"]
    #[inline(always)]
    pub fn ucsa4(&self) -> UCSA4_R {
        UCSA4_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - I2C Slave Address Bit 5"]
    #[inline(always)]
    pub fn ucsa5(&self) -> UCSA5_R {
        UCSA5_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - I2C Slave Address Bit 6"]
    #[inline(always)]
    pub fn ucsa6(&self) -> UCSA6_R {
        UCSA6_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - I2C Slave Address Bit 7"]
    #[inline(always)]
    pub fn ucsa7(&self) -> UCSA7_R {
        UCSA7_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - I2C Slave Address Bit 8"]
    #[inline(always)]
    pub fn ucsa8(&self) -> UCSA8_R {
        UCSA8_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - I2C Slave Address Bit 9"]
    #[inline(always)]
    pub fn ucsa9(&self) -> UCSA9_R {
        UCSA9_R::new(((self.bits >> 9) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - I2C Slave Address Bit 0"]
    #[inline(always)]
    pub fn ucsa0(&mut self) -> UCSA0_W {
        UCSA0_W::new(self)
    }
    #[doc = "Bit 1 - I2C Slave Address Bit 1"]
    #[inline(always)]
    pub fn ucsa1(&mut self) -> UCSA1_W {
        UCSA1_W::new(self)
    }
    #[doc = "Bit 2 - I2C Slave Address Bit 2"]
    #[inline(always)]
    pub fn ucsa2(&mut self) -> UCSA2_W {
        UCSA2_W::new(self)
    }
    #[doc = "Bit 3 - I2C Slave Address Bit 3"]
    #[inline(always)]
    pub fn ucsa3(&mut self) -> UCSA3_W {
        UCSA3_W::new(self)
    }
    #[doc = "Bit 4 - I2C Slave Address Bit 4"]
    #[inline(always)]
    pub fn ucsa4(&mut self) -> UCSA4_W {
        UCSA4_W::new(self)
    }
    #[doc = "Bit 5 - I2C Slave Address Bit 5"]
    #[inline(always)]
    pub fn ucsa5(&mut self) -> UCSA5_W {
        UCSA5_W::new(self)
    }
    #[doc = "Bit 6 - I2C Slave Address Bit 6"]
    #[inline(always)]
    pub fn ucsa6(&mut self) -> UCSA6_W {
        UCSA6_W::new(self)
    }
    #[doc = "Bit 7 - I2C Slave Address Bit 7"]
    #[inline(always)]
    pub fn ucsa7(&mut self) -> UCSA7_W {
        UCSA7_W::new(self)
    }
    #[doc = "Bit 8 - I2C Slave Address Bit 8"]
    #[inline(always)]
    pub fn ucsa8(&mut self) -> UCSA8_W {
        UCSA8_W::new(self)
    }
    #[doc = "Bit 9 - I2C Slave Address Bit 9"]
    #[inline(always)]
    pub fn ucsa9(&mut self) -> UCSA9_W {
        UCSA9_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "USCI B0 I2C Slave Address\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ucb0i2csa](index.html) module"]
pub struct UCB0I2CSA_SPEC;
impl crate::RegisterSpec for UCB0I2CSA_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [ucb0i2csa::R](R) reader structure"]
impl crate::Readable for UCB0I2CSA_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ucb0i2csa::W](W) writer structure"]
impl crate::Writable for UCB0I2CSA_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets UCB0I2CSA to value 0"]
impl crate::Resettable for UCB0I2CSA_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}