nrf9160_pac/ficr_s/info/
package.rs

1#[doc = "Register `PACKAGE` reader"]
2pub struct R(crate::R<PACKAGE_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PACKAGE_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PACKAGE_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PACKAGE_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `PACKAGE` reader - Package option"]
17pub type PACKAGE_R = crate::FieldReader<u32, PACKAGE_A>;
18#[doc = "Package option\n\nValue on reset: 8192"]
19#[derive(Clone, Copy, Debug, PartialEq)]
20#[repr(u32)]
21pub enum PACKAGE_A {
22    #[doc = "8192: CCxx - 236 ball wlCSP"]
23    CC = 8192,
24}
25impl From<PACKAGE_A> for u32 {
26    #[inline(always)]
27    fn from(variant: PACKAGE_A) -> Self {
28        variant as _
29    }
30}
31impl PACKAGE_R {
32    #[doc = "Get enumerated values variant"]
33    #[inline(always)]
34    pub fn variant(&self) -> Option<PACKAGE_A> {
35        match self.bits {
36            8192 => Some(PACKAGE_A::CC),
37            _ => None,
38        }
39    }
40    #[doc = "Checks if the value of the field is `CC`"]
41    #[inline(always)]
42    pub fn is_cc(&self) -> bool {
43        *self == PACKAGE_A::CC
44    }
45}
46impl R {
47    #[doc = "Bits 0:31 - Package option"]
48    #[inline(always)]
49    pub fn package(&self) -> PACKAGE_R {
50        PACKAGE_R::new(self.bits)
51    }
52}
53#[doc = "Package option\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 [package](index.html) module"]
54pub struct PACKAGE_SPEC;
55impl crate::RegisterSpec for PACKAGE_SPEC {
56    type Ux = u32;
57}
58#[doc = "`read()` method returns [package::R](R) reader structure"]
59impl crate::Readable for PACKAGE_SPEC {
60    type Reader = R;
61}
62#[doc = "`reset()` method sets PACKAGE to value 0x2000"]
63impl crate::Resettable for PACKAGE_SPEC {
64    #[inline(always)]
65    fn reset_value() -> Self::Ux {
66        0x2000
67    }
68}