efm32tg11b_pac/efm32tg11b540/crypto0/
cmd.rs1#[doc = "Register `CMD` reader"]
2pub struct R(crate::R<CMD_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CMD_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CMD_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CMD_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CMD` writer"]
17pub struct W(crate::W<CMD_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CMD_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<CMD_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CMD_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `INSTR` reader - Execute Instruction"]
38pub type INSTR_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `INSTR` writer - Execute Instruction"]
40pub type INSTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CMD_SPEC, u8, u8, 8, O>;
41#[doc = "Field `SEQSTART` writer - Encryption/Decryption SEQUENCE Start"]
42pub type SEQSTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
43#[doc = "Field `SEQSTOP` writer - Sequence Stop"]
44pub type SEQSTOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
45#[doc = "Field `SEQSTEP` writer - Sequence Step"]
46pub type SEQSTEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
47impl R {
48 #[doc = "Bits 0:7 - Execute Instruction"]
49 #[inline(always)]
50 pub fn instr(&self) -> INSTR_R {
51 INSTR_R::new((self.bits & 0xff) as u8)
52 }
53}
54impl W {
55 #[doc = "Bits 0:7 - Execute Instruction"]
56 #[inline(always)]
57 #[must_use]
58 pub fn instr(&mut self) -> INSTR_W<0> {
59 INSTR_W::new(self)
60 }
61 #[doc = "Bit 9 - Encryption/Decryption SEQUENCE Start"]
62 #[inline(always)]
63 #[must_use]
64 pub fn seqstart(&mut self) -> SEQSTART_W<9> {
65 SEQSTART_W::new(self)
66 }
67 #[doc = "Bit 10 - Sequence Stop"]
68 #[inline(always)]
69 #[must_use]
70 pub fn seqstop(&mut self) -> SEQSTOP_W<10> {
71 SEQSTOP_W::new(self)
72 }
73 #[doc = "Bit 11 - Sequence Step"]
74 #[inline(always)]
75 #[must_use]
76 pub fn seqstep(&mut self) -> SEQSTEP_W<11> {
77 SEQSTEP_W::new(self)
78 }
79 #[doc = "Writes raw bits to the register."]
80 #[inline(always)]
81 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
82 self.0.bits(bits);
83 self
84 }
85}
86#[doc = "Command Register\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 [cmd](index.html) module"]
87pub struct CMD_SPEC;
88impl crate::RegisterSpec for CMD_SPEC {
89 type Ux = u32;
90}
91#[doc = "`read()` method returns [cmd::R](R) reader structure"]
92impl crate::Readable for CMD_SPEC {
93 type Reader = R;
94}
95#[doc = "`write(|w| ..)` method takes [cmd::W](W) writer structure"]
96impl crate::Writable for CMD_SPEC {
97 type Writer = W;
98 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
99 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
100}
101#[doc = "`reset()` method sets CMD to value 0"]
102impl crate::Resettable for CMD_SPEC {
103 const RESET_VALUE: Self::Ux = 0;
104}