atsamd51n/pcc/
wpsr.rs

1#[doc = "Register `WPSR` reader"]
2pub type R = crate::R<WpsrSpec>;
3#[doc = "Field `WPVS` reader - Write Protection Violation Source"]
4pub type WpvsR = crate::BitReader;
5#[doc = "Field `WPVSRC` reader - Write Protection Violation Status"]
6pub type WpvsrcR = crate::FieldReader<u16>;
7impl R {
8    #[doc = "Bit 0 - Write Protection Violation Source"]
9    #[inline(always)]
10    pub fn wpvs(&self) -> WpvsR {
11        WpvsR::new((self.bits & 1) != 0)
12    }
13    #[doc = "Bits 8:23 - Write Protection Violation Status"]
14    #[inline(always)]
15    pub fn wpvsrc(&self) -> WpvsrcR {
16        WpvsrcR::new(((self.bits >> 8) & 0xffff) as u16)
17    }
18}
19#[doc = "Write Protection Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`wpsr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
20pub struct WpsrSpec;
21impl crate::RegisterSpec for WpsrSpec {
22    type Ux = u32;
23}
24#[doc = "`read()` method returns [`wpsr::R`](R) reader structure"]
25impl crate::Readable for WpsrSpec {}
26#[doc = "`reset()` method sets WPSR to value 0"]
27impl crate::Resettable for WpsrSpec {
28    const RESET_VALUE: u32 = 0;
29}