atsamd11d/tc1/count16/
readreq.rs
1#[doc = "Register `READREQ` reader"]
2pub type R = crate::R<ReadreqSpec>;
3#[doc = "Register `READREQ` writer"]
4pub type W = crate::W<ReadreqSpec>;
5#[doc = "Field `ADDR` reader - Address"]
6pub type AddrR = crate::FieldReader;
7#[doc = "Field `ADDR` writer - Address"]
8pub type AddrW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
9#[doc = "Field `RCONT` reader - Read Continuously"]
10pub type RcontR = crate::BitReader;
11#[doc = "Field `RCONT` writer - Read Continuously"]
12pub type RcontW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RREQ` reader - Read Request"]
14pub type RreqR = crate::BitReader;
15#[doc = "Field `RREQ` writer - Read Request"]
16pub type RreqW<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[doc = "Bits 0:4 - Address"]
19 #[inline(always)]
20 pub fn addr(&self) -> AddrR {
21 AddrR::new((self.bits & 0x1f) as u8)
22 }
23 #[doc = "Bit 14 - Read Continuously"]
24 #[inline(always)]
25 pub fn rcont(&self) -> RcontR {
26 RcontR::new(((self.bits >> 14) & 1) != 0)
27 }
28 #[doc = "Bit 15 - Read Request"]
29 #[inline(always)]
30 pub fn rreq(&self) -> RreqR {
31 RreqR::new(((self.bits >> 15) & 1) != 0)
32 }
33}
34impl W {
35 #[doc = "Bits 0:4 - Address"]
36 #[inline(always)]
37 #[must_use]
38 pub fn addr(&mut self) -> AddrW<ReadreqSpec> {
39 AddrW::new(self, 0)
40 }
41 #[doc = "Bit 14 - Read Continuously"]
42 #[inline(always)]
43 #[must_use]
44 pub fn rcont(&mut self) -> RcontW<ReadreqSpec> {
45 RcontW::new(self, 14)
46 }
47 #[doc = "Bit 15 - Read Request"]
48 #[inline(always)]
49 #[must_use]
50 pub fn rreq(&mut self) -> RreqW<ReadreqSpec> {
51 RreqW::new(self, 15)
52 }
53}
54#[doc = "Read Request\n\nYou can [`read`](crate::Reg::read) this register and get [`readreq::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`readreq::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct ReadreqSpec;
56impl crate::RegisterSpec for ReadreqSpec {
57 type Ux = u16;
58}
59#[doc = "`read()` method returns [`readreq::R`](R) reader structure"]
60impl crate::Readable for ReadreqSpec {}
61#[doc = "`write(|w| ..)` method takes [`readreq::W`](W) writer structure"]
62impl crate::Writable for ReadreqSpec {
63 type Safety = crate::Unsafe;
64 const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
65 const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
66}
67#[doc = "`reset()` method sets READREQ to value 0"]
68impl crate::Resettable for ReadreqSpec {
69 const RESET_VALUE: u16 = 0;
70}