atsamd51p/sercom0/spim/
status.rs
1#[doc = "Register `STATUS` reader"]
2pub type R = crate::R<StatusSpec>;
3#[doc = "Register `STATUS` writer"]
4pub type W = crate::W<StatusSpec>;
5#[doc = "Field `BUFOVF` reader - Buffer Overflow"]
6pub type BufovfR = crate::BitReader;
7#[doc = "Field `BUFOVF` writer - Buffer Overflow"]
8pub type BufovfW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `LENERR` reader - Transaction Length Error"]
10pub type LenerrR = crate::BitReader;
11#[doc = "Field `LENERR` writer - Transaction Length Error"]
12pub type LenerrW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 2 - Buffer Overflow"]
15 #[inline(always)]
16 pub fn bufovf(&self) -> BufovfR {
17 BufovfR::new(((self.bits >> 2) & 1) != 0)
18 }
19 #[doc = "Bit 11 - Transaction Length Error"]
20 #[inline(always)]
21 pub fn lenerr(&self) -> LenerrR {
22 LenerrR::new(((self.bits >> 11) & 1) != 0)
23 }
24}
25impl W {
26 #[doc = "Bit 2 - Buffer Overflow"]
27 #[inline(always)]
28 #[must_use]
29 pub fn bufovf(&mut self) -> BufovfW<StatusSpec> {
30 BufovfW::new(self, 2)
31 }
32 #[doc = "Bit 11 - Transaction Length Error"]
33 #[inline(always)]
34 #[must_use]
35 pub fn lenerr(&mut self) -> LenerrW<StatusSpec> {
36 LenerrW::new(self, 11)
37 }
38}
39#[doc = "SPIM Status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`status::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct StatusSpec;
41impl crate::RegisterSpec for StatusSpec {
42 type Ux = u16;
43}
44#[doc = "`read()` method returns [`status::R`](R) reader structure"]
45impl crate::Readable for StatusSpec {}
46#[doc = "`write(|w| ..)` method takes [`status::W`](W) writer structure"]
47impl crate::Writable for StatusSpec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
51}
52#[doc = "`reset()` method sets STATUS to value 0"]
53impl crate::Resettable for StatusSpec {
54 const RESET_VALUE: u16 = 0;
55}