40 lines
1.6 KiB
Rust
40 lines
1.6 KiB
Rust
#[doc = "Register `ENABLE` reader"]
|
|
pub type R = crate::R<EnableSpec>;
|
|
#[doc = "Register `ENABLE` writer"]
|
|
pub type W = crate::W<EnableSpec>;
|
|
#[doc = "Field `ENABLE` reader - Counter Enable"]
|
|
pub type EnableR = crate::BitReader;
|
|
#[doc = "Field `ENABLE` writer - Counter Enable"]
|
|
pub type EnableW<'a, REG> = crate::BitWriter<'a, REG>;
|
|
impl R {
|
|
#[doc = "Bit 0 - Counter Enable"]
|
|
#[inline(always)]
|
|
pub fn enable(&self) -> EnableR {
|
|
EnableR::new((self.bits & 1) != 0)
|
|
}
|
|
}
|
|
impl W {
|
|
#[doc = "Bit 0 - Counter Enable"]
|
|
#[inline(always)]
|
|
pub fn enable(&mut self) -> EnableW<EnableSpec> {
|
|
EnableW::new(self, 0)
|
|
}
|
|
}
|
|
#[doc = "Alternate access to the Counter ENABLE bit in the CTRL Register\n\nYou can [`read`](crate::Reg::read) this register and get [`enable::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`enable::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
|
|
pub struct EnableSpec;
|
|
impl crate::RegisterSpec for EnableSpec {
|
|
type Ux = u32;
|
|
}
|
|
#[doc = "`read()` method returns [`enable::R`](R) reader structure"]
|
|
impl crate::Readable for EnableSpec {}
|
|
#[doc = "`write(|w| ..)` method takes [`enable::W`](W) writer structure"]
|
|
impl crate::Writable for EnableSpec {
|
|
type Safety = crate::Unsafe;
|
|
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
|
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
|
|
}
|
|
#[doc = "`reset()` method sets ENABLE to value 0"]
|
|
impl crate::Resettable for EnableSpec {
|
|
const RESET_VALUE: u32 = 0;
|
|
}
|