corstone300_pac/isram0mpc/
blk_max.rs1#[doc = "Register `BLK_MAX` reader"]
6pub struct R(crate::R<BLK_MAX_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<BLK_MAX_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<BLK_MAX_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<BLK_MAX_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Field `BLK_SIZE` reader - Block size"]
21pub type BLK_SIZE_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `IN_PROGRESS` reader - Initialization in progress"]
23pub type IN_PROGRESS_R = crate::BitReader<bool>;
24impl R {
25 #[doc = "Bits 0:3 - Block size"]
26 #[inline(always)]
27 pub fn blk_size(&self) -> BLK_SIZE_R {
28 BLK_SIZE_R::new((self.bits & 0x0f) as u8)
29 }
30 #[doc = "Bit 31 - Initialization in progress"]
31 #[inline(always)]
32 pub fn in_progress(&self) -> IN_PROGRESS_R {
33 IN_PROGRESS_R::new(((self.bits >> 31) & 1) != 0)
34 }
35}
36#[doc = "Maximum value of block based index register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [blk_max](index.html) module"]
37pub struct BLK_MAX_SPEC;
38impl crate::RegisterSpec for BLK_MAX_SPEC {
39 type Ux = u32;
40}
41#[doc = "`read()` method returns [blk_max::R](R) reader structure"]
42impl crate::Readable for BLK_MAX_SPEC {
43 type Reader = R;
44}
45#[doc = "`reset()` method sets BLK_MAX to value 0"]
46impl crate::Resettable for BLK_MAX_SPEC {
47 #[inline(always)]
48 fn reset_value() -> Self::Ux {
49 0
50 }
51}