eos_s3/aip/
ldo_50_ctrl_1.rs1#[doc = "Register `LDO_50_CTRL_1` reader"]
2pub struct R(crate::R<LDO_50_CTRL_1_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<LDO_50_CTRL_1_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<LDO_50_CTRL_1_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<LDO_50_CTRL_1_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `LDO_50_CTRL_1` writer"]
17pub struct W(crate::W<LDO_50_CTRL_1_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<LDO_50_CTRL_1_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<LDO_50_CTRL_1_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<LDO_50_CTRL_1_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `TEST` reader - Lab test and internal block characterization test control pins."]
38pub struct TEST_R(crate::FieldReader<u8, u8>);
39impl TEST_R {
40 #[inline(always)]
41 pub(crate) fn new(bits: u8) -> Self {
42 TEST_R(crate::FieldReader::new(bits))
43 }
44}
45impl core::ops::Deref for TEST_R {
46 type Target = crate::FieldReader<u8, u8>;
47 #[inline(always)]
48 fn deref(&self) -> &Self::Target {
49 &self.0
50 }
51}
52#[doc = "Field `TEST` writer - Lab test and internal block characterization test control pins."]
53pub struct TEST_W<'a> {
54 w: &'a mut W,
55}
56impl<'a> TEST_W<'a> {
57 #[doc = r"Writes raw bits to the field"]
58 #[inline(always)]
59 pub unsafe fn bits(self, value: u8) -> &'a mut W {
60 self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
61 self.w
62 }
63}
64#[doc = "Field `TESTREQ` reader - Request of connection of the anatestbus to an external pin for characterization"]
65pub struct TESTREQ_R(crate::FieldReader<bool, bool>);
66impl TESTREQ_R {
67 #[inline(always)]
68 pub(crate) fn new(bits: bool) -> Self {
69 TESTREQ_R(crate::FieldReader::new(bits))
70 }
71}
72impl core::ops::Deref for TESTREQ_R {
73 type Target = crate::FieldReader<bool, bool>;
74 #[inline(always)]
75 fn deref(&self) -> &Self::Target {
76 &self.0
77 }
78}
79impl R {
80 #[doc = "Bits 0:3 - Lab test and internal block characterization test control pins."]
81 #[inline(always)]
82 pub fn test(&self) -> TEST_R {
83 TEST_R::new((self.bits & 0x0f) as u8)
84 }
85 #[doc = "Bit 4 - Request of connection of the anatestbus to an external pin for characterization"]
86 #[inline(always)]
87 pub fn testreq(&self) -> TESTREQ_R {
88 TESTREQ_R::new(((self.bits >> 4) & 0x01) != 0)
89 }
90}
91impl W {
92 #[doc = "Bits 0:3 - Lab test and internal block characterization test control pins."]
93 #[inline(always)]
94 pub fn test(&mut self) -> TEST_W {
95 TEST_W { w: self }
96 }
97 #[doc = "Writes raw bits to the register."]
98 #[inline(always)]
99 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
100 self.0.bits(bits);
101 self
102 }
103}
104#[doc = "LDO_50 control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ldo_50_ctrl_1](index.html) module"]
105pub struct LDO_50_CTRL_1_SPEC;
106impl crate::RegisterSpec for LDO_50_CTRL_1_SPEC {
107 type Ux = u32;
108}
109#[doc = "`read()` method returns [ldo_50_ctrl_1::R](R) reader structure"]
110impl crate::Readable for LDO_50_CTRL_1_SPEC {
111 type Reader = R;
112}
113#[doc = "`write(|w| ..)` method takes [ldo_50_ctrl_1::W](W) writer structure"]
114impl crate::Writable for LDO_50_CTRL_1_SPEC {
115 type Writer = W;
116}
117#[doc = "`reset()` method sets LDO_50_CTRL_1 to value 0"]
118impl crate::Resettable for LDO_50_CTRL_1_SPEC {
119 #[inline(always)]
120 fn reset_value() -> Self::Ux {
121 0
122 }
123}