lpc82x_pac/syscon/
syspllstat.rs

1#[doc = "Register `SYSPLLSTAT` reader"]
2pub struct R(crate::R<SYSPLLSTAT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SYSPLLSTAT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SYSPLLSTAT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SYSPLLSTAT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `LOCK` reader - PLL0 lock indicator"]
17pub struct LOCK_R(crate::FieldReader<bool, bool>);
18impl LOCK_R {
19    pub(crate) fn new(bits: bool) -> Self {
20        LOCK_R(crate::FieldReader::new(bits))
21    }
22}
23impl core::ops::Deref for LOCK_R {
24    type Target = crate::FieldReader<bool, bool>;
25    #[inline(always)]
26    fn deref(&self) -> &Self::Target {
27        &self.0
28    }
29}
30impl R {
31    #[doc = "Bit 0 - PLL0 lock indicator"]
32    #[inline(always)]
33    pub fn lock(&self) -> LOCK_R {
34        LOCK_R::new((self.bits & 0x01) != 0)
35    }
36}
37#[doc = "PLL status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [syspllstat](index.html) module"]
38pub struct SYSPLLSTAT_SPEC;
39impl crate::RegisterSpec for SYSPLLSTAT_SPEC {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [syspllstat::R](R) reader structure"]
43impl crate::Readable for SYSPLLSTAT_SPEC {
44    type Reader = R;
45}
46#[doc = "`reset()` method sets SYSPLLSTAT to value 0"]
47impl crate::Resettable for SYSPLLSTAT_SPEC {
48    #[inline(always)]
49    fn reset_value() -> Self::Ux {
50        0
51    }
52}