mimxrt685s_pac/flexspi/
flsha2cr0.rs1#[doc = "Register `FLSHA2CR0` reader"]
2pub type R = crate::R<Flsha2cr0Spec>;
3#[doc = "Register `FLSHA2CR0` writer"]
4pub type W = crate::W<Flsha2cr0Spec>;
5#[doc = "Field `FLSHSZ` reader - Flash Size in KByte."]
6pub type FlshszR = crate::FieldReader<u32>;
7#[doc = "Field `FLSHSZ` writer - Flash Size in KByte."]
8pub type FlshszW<'a, REG> = crate::FieldWriter<'a, REG, 23, u32>;
9impl R {
10 #[doc = "Bits 0:22 - Flash Size in KByte."]
11 #[inline(always)]
12 pub fn flshsz(&self) -> FlshszR {
13 FlshszR::new(self.bits & 0x007f_ffff)
14 }
15}
16#[cfg(feature = "debug")]
17impl core::fmt::Debug for R {
18 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19 f.debug_struct("FLSHA2CR0")
20 .field("flshsz", &self.flshsz())
21 .finish()
22 }
23}
24impl W {
25 #[doc = "Bits 0:22 - Flash Size in KByte."]
26 #[inline(always)]
27 pub fn flshsz(&mut self) -> FlshszW<Flsha2cr0Spec> {
28 FlshszW::new(self, 0)
29 }
30}
31#[doc = "Flash Control Register 0\n\nYou can [`read`](crate::Reg::read) this register and get [`flsha2cr0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`flsha2cr0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
32pub struct Flsha2cr0Spec;
33impl crate::RegisterSpec for Flsha2cr0Spec {
34 type Ux = u32;
35}
36#[doc = "`read()` method returns [`flsha2cr0::R`](R) reader structure"]
37impl crate::Readable for Flsha2cr0Spec {}
38#[doc = "`write(|w| ..)` method takes [`flsha2cr0::W`](W) writer structure"]
39impl crate::Writable for Flsha2cr0Spec {
40 type Safety = crate::Unsafe;
41 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
42 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
43}
44#[doc = "`reset()` method sets FLSHA2CR0 to value 0x0001_0000"]
45impl crate::Resettable for Flsha2cr0Spec {
46 const RESET_VALUE: u32 = 0x0001_0000;
47}