#[doc = "Register `PMMCTL1` reader"]
pub type R = crate::R<Pmmctl1Spec>;
#[doc = "Register `PMMCTL1` writer"]
pub type W = crate::W<Pmmctl1Spec>;
#[doc = "Field `PMMREFMD` reader - PMM Reference Mode"]
pub type PmmrefmdR = crate::BitReader;
#[doc = "Field `PMMREFMD` writer - PMM Reference Mode"]
pub type PmmrefmdW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMMCMD0` reader - PMM Voltage Regulator Current Mode Bit: 0"]
pub type Pmmcmd0R = crate::BitReader;
#[doc = "Field `PMMCMD0` writer - PMM Voltage Regulator Current Mode Bit: 0"]
pub type Pmmcmd0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMMCMD1` reader - PMM Voltage Regulator Current Mode Bit: 1"]
pub type Pmmcmd1R = crate::BitReader;
#[doc = "Field `PMMCMD1` writer - PMM Voltage Regulator Current Mode Bit: 1"]
pub type Pmmcmd1W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[doc = "Bit 0 - PMM Reference Mode"]
#[inline(always)]
pub fn pmmrefmd(&self) -> PmmrefmdR {
PmmrefmdR::new((self.bits & 1) != 0)
}
#[doc = "Bit 4 - PMM Voltage Regulator Current Mode Bit: 0"]
#[inline(always)]
pub fn pmmcmd0(&self) -> Pmmcmd0R {
Pmmcmd0R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - PMM Voltage Regulator Current Mode Bit: 1"]
#[inline(always)]
pub fn pmmcmd1(&self) -> Pmmcmd1R {
Pmmcmd1R::new(((self.bits >> 5) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - PMM Reference Mode"]
#[inline(always)]
pub fn pmmrefmd(&mut self) -> PmmrefmdW<'_, Pmmctl1Spec> {
PmmrefmdW::new(self, 0)
}
#[doc = "Bit 4 - PMM Voltage Regulator Current Mode Bit: 0"]
#[inline(always)]
pub fn pmmcmd0(&mut self) -> Pmmcmd0W<'_, Pmmctl1Spec> {
Pmmcmd0W::new(self, 4)
}
#[doc = "Bit 5 - PMM Voltage Regulator Current Mode Bit: 1"]
#[inline(always)]
pub fn pmmcmd1(&mut self) -> Pmmcmd1W<'_, Pmmctl1Spec> {
Pmmcmd1W::new(self, 5)
}
}
#[doc = "PMM Control 1\n\nYou can [`read`](crate::Reg::read) this register and get [`pmmctl1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pmmctl1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct Pmmctl1Spec;
impl crate::RegisterSpec for Pmmctl1Spec {
type Ux = u16;
}
#[doc = "`read()` method returns [`pmmctl1::R`](R) reader structure"]
impl crate::Readable for Pmmctl1Spec {}
#[doc = "`write(|w| ..)` method takes [`pmmctl1::W`](W) writer structure"]
impl crate::Writable for Pmmctl1Spec {
type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PMMCTL1 to value 0"]
impl crate::Resettable for Pmmctl1Spec {}