cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `RTCDOW` reader"]
pub type R = crate::R<RtcdowSpec>;
#[doc = "Register `RTCDOW` writer"]
pub type W = crate::W<RtcdowSpec>;
#[doc = "Field `DOW0` reader - Real Time Clock DOW Bit: 0"]
pub type Dow0R = crate::BitReader;
#[doc = "Field `DOW0` writer - Real Time Clock DOW Bit: 0"]
pub type Dow0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DOW1` reader - Real Time Clock DOW Bit: 1"]
pub type Dow1R = crate::BitReader;
#[doc = "Field `DOW1` writer - Real Time Clock DOW Bit: 1"]
pub type Dow1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DOW2` reader - Real Time Clock DOW Bit: 2"]
pub type Dow2R = crate::BitReader;
#[doc = "Field `DOW2` writer - Real Time Clock DOW Bit: 2"]
pub type Dow2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DOW3` reader - Real Time Clock DOW Bit: 3"]
pub type Dow3R = crate::BitReader;
#[doc = "Field `DOW3` writer - Real Time Clock DOW Bit: 3"]
pub type Dow3W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DOW4` reader - Real Time Clock DOW Bit: 4"]
pub type Dow4R = crate::BitReader;
#[doc = "Field `DOW4` writer - Real Time Clock DOW Bit: 4"]
pub type Dow4W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DOW5` reader - Real Time Clock DOW Bit: 5"]
pub type Dow5R = crate::BitReader;
#[doc = "Field `DOW5` writer - Real Time Clock DOW Bit: 5"]
pub type Dow5W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `DOW6` reader - Real Time Clock DOW Bit: 6"]
pub type Dow6R = crate::BitReader;
#[doc = "Field `DOW6` writer - Real Time Clock DOW Bit: 6"]
pub type Dow6W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - Real Time Clock DOW Bit: 0"]
    #[inline(always)]
    pub fn dow0(&self) -> Dow0R {
        Dow0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Real Time Clock DOW Bit: 1"]
    #[inline(always)]
    pub fn dow1(&self) -> Dow1R {
        Dow1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Real Time Clock DOW Bit: 2"]
    #[inline(always)]
    pub fn dow2(&self) -> Dow2R {
        Dow2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Real Time Clock DOW Bit: 3"]
    #[inline(always)]
    pub fn dow3(&self) -> Dow3R {
        Dow3R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Real Time Clock DOW Bit: 4"]
    #[inline(always)]
    pub fn dow4(&self) -> Dow4R {
        Dow4R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Real Time Clock DOW Bit: 5"]
    #[inline(always)]
    pub fn dow5(&self) -> Dow5R {
        Dow5R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Real Time Clock DOW Bit: 6"]
    #[inline(always)]
    pub fn dow6(&self) -> Dow6R {
        Dow6R::new(((self.bits >> 6) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - Real Time Clock DOW Bit: 0"]
    #[inline(always)]
    pub fn dow0(&mut self) -> Dow0W<'_, RtcdowSpec> {
        Dow0W::new(self, 0)
    }
    #[doc = "Bit 1 - Real Time Clock DOW Bit: 1"]
    #[inline(always)]
    pub fn dow1(&mut self) -> Dow1W<'_, RtcdowSpec> {
        Dow1W::new(self, 1)
    }
    #[doc = "Bit 2 - Real Time Clock DOW Bit: 2"]
    #[inline(always)]
    pub fn dow2(&mut self) -> Dow2W<'_, RtcdowSpec> {
        Dow2W::new(self, 2)
    }
    #[doc = "Bit 3 - Real Time Clock DOW Bit: 3"]
    #[inline(always)]
    pub fn dow3(&mut self) -> Dow3W<'_, RtcdowSpec> {
        Dow3W::new(self, 3)
    }
    #[doc = "Bit 4 - Real Time Clock DOW Bit: 4"]
    #[inline(always)]
    pub fn dow4(&mut self) -> Dow4W<'_, RtcdowSpec> {
        Dow4W::new(self, 4)
    }
    #[doc = "Bit 5 - Real Time Clock DOW Bit: 5"]
    #[inline(always)]
    pub fn dow5(&mut self) -> Dow5W<'_, RtcdowSpec> {
        Dow5W::new(self, 5)
    }
    #[doc = "Bit 6 - Real Time Clock DOW Bit: 6"]
    #[inline(always)]
    pub fn dow6(&mut self) -> Dow6W<'_, RtcdowSpec> {
        Dow6W::new(self, 6)
    }
}
#[doc = "Real Time Clock Day of week\n\nYou can [`read`](crate::Reg::read) this register and get [`rtcdow::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rtcdow::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct RtcdowSpec;
impl crate::RegisterSpec for RtcdowSpec {
    type Ux = u8;
}
#[doc = "`read()` method returns [`rtcdow::R`](R) reader structure"]
impl crate::Readable for RtcdowSpec {}
#[doc = "`write(|w| ..)` method takes [`rtcdow::W`](W) writer structure"]
impl crate::Writable for RtcdowSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets RTCDOW to value 0"]
impl crate::Resettable for RtcdowSpec {}