1#[doc = "Register `ver` reader"]
2pub type R = crate::R<VER_SPEC>;
3#[doc = "Field `fel_sel_pad_sta` reader - Fel Select Pin Status"]
4pub type FEL_SEL_PAD_STA_R = crate::BitReader<FEL_SEL_PAD_STA_A>;
5#[doc = "Fel Select Pin Status\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7pub enum FEL_SEL_PAD_STA_A {
8 #[doc = "0: `0`"]
9 RUN_FEL = 0,
10 #[doc = "1: `1`"]
11 TRY_MEDIA_BOOT = 1,
12}
13impl From<FEL_SEL_PAD_STA_A> for bool {
14 #[inline(always)]
15 fn from(variant: FEL_SEL_PAD_STA_A) -> Self {
16 variant as u8 != 0
17 }
18}
19impl FEL_SEL_PAD_STA_R {
20 #[doc = "Get enumerated values variant"]
21 #[inline(always)]
22 pub const fn variant(&self) -> FEL_SEL_PAD_STA_A {
23 match self.bits {
24 false => FEL_SEL_PAD_STA_A::RUN_FEL,
25 true => FEL_SEL_PAD_STA_A::TRY_MEDIA_BOOT,
26 }
27 }
28 #[doc = "`0`"]
29 #[inline(always)]
30 pub fn is_run_fel(&self) -> bool {
31 *self == FEL_SEL_PAD_STA_A::RUN_FEL
32 }
33 #[doc = "`1`"]
34 #[inline(always)]
35 pub fn is_try_media_boot(&self) -> bool {
36 *self == FEL_SEL_PAD_STA_A::TRY_MEDIA_BOOT
37 }
38}
39#[doc = "Field `boot_sel_pad_sta` reader - "]
40pub type BOOT_SEL_PAD_STA_R = crate::FieldReader;
41impl R {
42 #[doc = "Bit 8 - Fel Select Pin Status"]
43 #[inline(always)]
44 pub fn fel_sel_pad_sta(&self) -> FEL_SEL_PAD_STA_R {
45 FEL_SEL_PAD_STA_R::new(((self.bits >> 8) & 1) != 0)
46 }
47 #[doc = "Bits 11:12"]
48 #[inline(always)]
49 pub fn boot_sel_pad_sta(&self) -> BOOT_SEL_PAD_STA_R {
50 BOOT_SEL_PAD_STA_R::new(((self.bits >> 11) & 3) as u8)
51 }
52}
53#[doc = "Version Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ver::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
54pub struct VER_SPEC;
55impl crate::RegisterSpec for VER_SPEC {
56 type Ux = u32;
57}
58#[doc = "`read()` method returns [`ver::R`](R) reader structure"]
59impl crate::Readable for VER_SPEC {}
60#[doc = "`reset()` method sets ver to value 0"]
61impl crate::Resettable for VER_SPEC {
62 const RESET_VALUE: Self::Ux = 0;
63}