jh7110_vf2_13b_pac/spi6/
ssp_periph_id2.rs1#[doc = "Register `ssp_periph_id2` reader"]
2pub type R = crate::R<SSP_PERIPH_ID2_SPEC>;
3#[doc = "Register `ssp_periph_id2` writer"]
4pub type W = crate::W<SSP_PERIPH_ID2_SPEC>;
5#[doc = "Field `designer1` reader - These bits read back as 0x4"]
6pub type DESIGNER1_R = crate::FieldReader;
7#[doc = "Field `revision` reader - These bits return the peripheral revision"]
8pub type REVISION_R = crate::FieldReader;
9impl R {
10 #[doc = "Bits 0:3 - These bits read back as 0x4"]
11 #[inline(always)]
12 pub fn designer1(&self) -> DESIGNER1_R {
13 DESIGNER1_R::new((self.bits & 0x0f) as u8)
14 }
15 #[doc = "Bits 4:7 - These bits return the peripheral revision"]
16 #[inline(always)]
17 pub fn revision(&self) -> REVISION_R {
18 REVISION_R::new(((self.bits >> 4) & 0x0f) as u8)
19 }
20}
21impl W {
22 #[doc = r" Writes raw bits to the register."]
23 #[doc = r""]
24 #[doc = r" # Safety"]
25 #[doc = r""]
26 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
27 #[inline(always)]
28 pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
29 self.bits = bits;
30 self
31 }
32}
33#[doc = "The SSPPeriphID2 register is hard-coded and the fields within the register determine reset value. The SSPPeriphID0-3 registers are four 8-bit registers, that span address locations 0xFE0 to 0xFEC. The registers can conceptually be treated as a single 32-bit register.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ssp_periph_id2::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ssp_periph_id2::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
34pub struct SSP_PERIPH_ID2_SPEC;
35impl crate::RegisterSpec for SSP_PERIPH_ID2_SPEC {
36 type Ux = u16;
37}
38#[doc = "`read()` method returns [`ssp_periph_id2::R`](R) reader structure"]
39impl crate::Readable for SSP_PERIPH_ID2_SPEC {}
40#[doc = "`write(|w| ..)` method takes [`ssp_periph_id2::W`](W) writer structure"]
41impl crate::Writable for SSP_PERIPH_ID2_SPEC {
42 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
43 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
44}
45#[doc = "`reset()` method sets ssp_periph_id2 to value 0"]
46impl crate::Resettable for SSP_PERIPH_ID2_SPEC {
47 const RESET_VALUE: Self::Ux = 0;
48}