1#[doc = "Register `CMD%s` reader"]
2pub type R = crate::R<CMD_SPEC>;
3#[doc = "Register `CMD%s` writer"]
4pub type W = crate::W<CMD_SPEC>;
5#[doc = "Field `COMMAND` reader - command0"]
6pub type COMMAND_R = crate::FieldReader<u16>;
7#[doc = "Field `COMMAND` writer - command0"]
8pub type COMMAND_W<'a, REG> = crate::FieldWriter<'a, REG, 14, u16>;
9#[doc = "Field `COMMAND_DONE` reader - command0_done"]
10pub type COMMAND_DONE_R = crate::BitReader;
11impl R {
12 #[doc = "Bits 0:13 - command0"]
13 #[inline(always)]
14 pub fn command(&self) -> COMMAND_R {
15 COMMAND_R::new((self.bits & 0x3fff) as u16)
16 }
17 #[doc = "Bit 31 - command0_done"]
18 #[inline(always)]
19 pub fn command_done(&self) -> COMMAND_DONE_R {
20 COMMAND_DONE_R::new(((self.bits >> 31) & 1) != 0)
21 }
22}
23#[cfg(feature = "impl-register-debug")]
24impl core::fmt::Debug for R {
25 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
26 f.debug_struct("CMD")
27 .field("command", &self.command())
28 .field("command_done", &self.command_done())
29 .finish()
30 }
31}
32impl W {
33 #[doc = "Bits 0:13 - command0"]
34 #[inline(always)]
35 pub fn command(&mut self) -> COMMAND_W<CMD_SPEC> {
36 COMMAND_W::new(self, 0)
37 }
38}
39#[doc = "I2C command%s register\n\nYou can [`read`](crate::Reg::read) this register and get [`cmd::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmd::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct CMD_SPEC;
41impl crate::RegisterSpec for CMD_SPEC {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`cmd::R`](R) reader structure"]
45impl crate::Readable for CMD_SPEC {}
46#[doc = "`write(|w| ..)` method takes [`cmd::W`](W) writer structure"]
47impl crate::Writable for CMD_SPEC {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets CMD%s to value 0x0903"]
53impl crate::Resettable for CMD_SPEC {
54 const RESET_VALUE: u32 = 0x0903;
55}