atsamd51p/nvmctrl/
seestat.rs

1#[doc = "Register `SEESTAT` reader"]
2pub type R = crate::R<SeestatSpec>;
3#[doc = "Field `ASEES` reader - Active SmartEEPROM Sector"]
4pub type AseesR = crate::BitReader;
5#[doc = "Field `LOAD` reader - Page Buffer Loaded"]
6pub type LoadR = crate::BitReader;
7#[doc = "Field `BUSY` reader - Busy"]
8pub type BusyR = crate::BitReader;
9#[doc = "Field `LOCK` reader - SmartEEPROM Write Access Is Locked"]
10pub type LockR = crate::BitReader;
11#[doc = "Field `RLOCK` reader - SmartEEPROM Write Access To Register Address Space Is Locked"]
12pub type RlockR = crate::BitReader;
13#[doc = "Field `SBLK` reader - Blocks Number In a Sector"]
14pub type SblkR = crate::FieldReader;
15#[doc = "Field `PSZ` reader - SmartEEPROM Page Size"]
16pub type PszR = crate::FieldReader;
17impl R {
18    #[doc = "Bit 0 - Active SmartEEPROM Sector"]
19    #[inline(always)]
20    pub fn asees(&self) -> AseesR {
21        AseesR::new((self.bits & 1) != 0)
22    }
23    #[doc = "Bit 1 - Page Buffer Loaded"]
24    #[inline(always)]
25    pub fn load(&self) -> LoadR {
26        LoadR::new(((self.bits >> 1) & 1) != 0)
27    }
28    #[doc = "Bit 2 - Busy"]
29    #[inline(always)]
30    pub fn busy(&self) -> BusyR {
31        BusyR::new(((self.bits >> 2) & 1) != 0)
32    }
33    #[doc = "Bit 3 - SmartEEPROM Write Access Is Locked"]
34    #[inline(always)]
35    pub fn lock(&self) -> LockR {
36        LockR::new(((self.bits >> 3) & 1) != 0)
37    }
38    #[doc = "Bit 4 - SmartEEPROM Write Access To Register Address Space Is Locked"]
39    #[inline(always)]
40    pub fn rlock(&self) -> RlockR {
41        RlockR::new(((self.bits >> 4) & 1) != 0)
42    }
43    #[doc = "Bits 8:11 - Blocks Number In a Sector"]
44    #[inline(always)]
45    pub fn sblk(&self) -> SblkR {
46        SblkR::new(((self.bits >> 8) & 0x0f) as u8)
47    }
48    #[doc = "Bits 16:18 - SmartEEPROM Page Size"]
49    #[inline(always)]
50    pub fn psz(&self) -> PszR {
51        PszR::new(((self.bits >> 16) & 7) as u8)
52    }
53}
54#[doc = "SmartEEPROM Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`seestat::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct SeestatSpec;
56impl crate::RegisterSpec for SeestatSpec {
57    type Ux = u32;
58}
59#[doc = "`read()` method returns [`seestat::R`](R) reader structure"]
60impl crate::Readable for SeestatSpec {}
61#[doc = "`reset()` method sets SEESTAT to value 0"]
62impl crate::Resettable for SeestatSpec {
63    const RESET_VALUE: u32 = 0;
64}