Skip to content

Commit 3467550

Browse files
committed
Add patch for SRAM voltage control
1 parent 4a2125d commit 3467550

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

patch/MCXA256.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ _include:
1010
- "lpuart.yaml"
1111
- "mrcc.yaml"
1212
- "port.yaml"
13+
- "spc.yaml"
1314
- "trng.yaml"

patch/spc.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SPC0:
2+
SRAMCTL:
3+
VSM:
4+
_replace_enum:
5+
Sram1v0: [1, "SRAM configured for 1.0v"]
6+
Sram1v2: [3, "SRAM configured for 1.2v"]

src/spc0/sramctl.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ pub type W = crate::W<SramctlSpec>;
77
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
88
#[repr(u8)]
99
pub enum Vsm {
10-
#[doc = "1: 1.0 V"]
11-
Vsm1 = 1,
12-
#[doc = "2: 1.1 V"]
13-
Vsm2 = 2,
10+
#[doc = "1: SRAM configured for 1.0v"]
11+
Sram1v0 = 1,
12+
#[doc = "3: SRAM configured for 1.2v"]
13+
Sram1v2 = 3,
1414
}
1515
impl From<Vsm> for u8 {
1616
#[inline(always)]
@@ -29,20 +29,20 @@ impl VsmR {
2929
#[inline(always)]
3030
pub const fn variant(&self) -> Option<Vsm> {
3131
match self.bits {
32-
1 => Some(Vsm::Vsm1),
33-
2 => Some(Vsm::Vsm2),
32+
1 => Some(Vsm::Sram1v0),
33+
3 => Some(Vsm::Sram1v2),
3434
_ => None,
3535
}
3636
}
37-
#[doc = "1.0 V"]
37+
#[doc = "SRAM configured for 1.0v"]
3838
#[inline(always)]
39-
pub fn is_vsm1(&self) -> bool {
40-
*self == Vsm::Vsm1
39+
pub fn is_sram1v0(&self) -> bool {
40+
*self == Vsm::Sram1v0
4141
}
42-
#[doc = "1.1 V"]
42+
#[doc = "SRAM configured for 1.2v"]
4343
#[inline(always)]
44-
pub fn is_vsm2(&self) -> bool {
45-
*self == Vsm::Vsm2
44+
pub fn is_sram1v2(&self) -> bool {
45+
*self == Vsm::Sram1v2
4646
}
4747
}
4848
#[doc = "Field `VSM` writer - Voltage Select Margin"]
@@ -52,15 +52,15 @@ where
5252
REG: crate::Writable + crate::RegisterSpec,
5353
REG::Ux: From<u8>,
5454
{
55-
#[doc = "1.0 V"]
55+
#[doc = "SRAM configured for 1.0v"]
5656
#[inline(always)]
57-
pub fn vsm1(self) -> &'a mut crate::W<REG> {
58-
self.variant(Vsm::Vsm1)
57+
pub fn sram1v0(self) -> &'a mut crate::W<REG> {
58+
self.variant(Vsm::Sram1v0)
5959
}
60-
#[doc = "1.1 V"]
60+
#[doc = "SRAM configured for 1.2v"]
6161
#[inline(always)]
62-
pub fn vsm2(self) -> &'a mut crate::W<REG> {
63-
self.variant(Vsm::Vsm2)
62+
pub fn sram1v2(self) -> &'a mut crate::W<REG> {
63+
self.variant(Vsm::Sram1v2)
6464
}
6565
}
6666
#[doc = "SRAM Voltage Update Request\n\nValue on reset: 0"]

0 commit comments

Comments
 (0)