mimxrt685s_pac/powerquad/
control.rs1#[doc = "Register `CONTROL` reader"]
2pub type R = crate::R<ControlSpec>;
3#[doc = "Register `CONTROL` writer"]
4pub type W = crate::W<ControlSpec>;
5#[doc = "Field `decode_opcode` reader - opcode specific to decode_machine"]
6pub type DecodeOpcodeR = crate::FieldReader;
7#[doc = "Field `decode_opcode` writer - opcode specific to decode_machine"]
8pub type DecodeOpcodeW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `decode_machine` reader - 0 : Coprocessor , 1 : matrix , 2 : fft , 3 : fir , 4 : stat , 5 : cordic , 6 -15 : NA"]
10pub type DecodeMachineR = crate::FieldReader;
11#[doc = "Field `decode_machine` writer - 0 : Coprocessor , 1 : matrix , 2 : fft , 3 : fir , 4 : stat , 5 : cordic , 6 -15 : NA"]
12pub type DecodeMachineW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13#[doc = "Field `inst_busy` reader - Instruction busy signal when high indicates processing is on"]
14pub type InstBusyR = crate::BitReader;
15impl R {
16 #[doc = "Bits 0:3 - opcode specific to decode_machine"]
17 #[inline(always)]
18 pub fn decode_opcode(&self) -> DecodeOpcodeR {
19 DecodeOpcodeR::new((self.bits & 0x0f) as u8)
20 }
21 #[doc = "Bits 4:7 - 0 : Coprocessor , 1 : matrix , 2 : fft , 3 : fir , 4 : stat , 5 : cordic , 6 -15 : NA"]
22 #[inline(always)]
23 pub fn decode_machine(&self) -> DecodeMachineR {
24 DecodeMachineR::new(((self.bits >> 4) & 0x0f) as u8)
25 }
26 #[doc = "Bit 31 - Instruction busy signal when high indicates processing is on"]
27 #[inline(always)]
28 pub fn inst_busy(&self) -> InstBusyR {
29 InstBusyR::new(((self.bits >> 31) & 1) != 0)
30 }
31}
32#[cfg(feature = "debug")]
33impl core::fmt::Debug for R {
34 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
35 f.debug_struct("CONTROL")
36 .field("decode_opcode", &self.decode_opcode())
37 .field("decode_machine", &self.decode_machine())
38 .field("inst_busy", &self.inst_busy())
39 .finish()
40 }
41}
42impl W {
43 #[doc = "Bits 0:3 - opcode specific to decode_machine"]
44 #[inline(always)]
45 pub fn decode_opcode(&mut self) -> DecodeOpcodeW<ControlSpec> {
46 DecodeOpcodeW::new(self, 0)
47 }
48 #[doc = "Bits 4:7 - 0 : Coprocessor , 1 : matrix , 2 : fft , 3 : fir , 4 : stat , 5 : cordic , 6 -15 : NA"]
49 #[inline(always)]
50 pub fn decode_machine(&mut self) -> DecodeMachineW<ControlSpec> {
51 DecodeMachineW::new(self, 4)
52 }
53}
54#[doc = "PowerQuad Control register\n\nYou can [`read`](crate::Reg::read) this register and get [`control::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`control::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct ControlSpec;
56impl crate::RegisterSpec for ControlSpec {
57 type Ux = u32;
58}
59#[doc = "`read()` method returns [`control::R`](R) reader structure"]
60impl crate::Readable for ControlSpec {}
61#[doc = "`write(|w| ..)` method takes [`control::W`](W) writer structure"]
62impl crate::Writable for ControlSpec {
63 type Safety = crate::Unsafe;
64 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
65 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
66}
67#[doc = "`reset()` method sets CONTROL to value 0"]
68impl crate::Resettable for ControlSpec {
69 const RESET_VALUE: u32 = 0;
70}