moondancer_pac/generated/usb0_ep_in/
endpoint.rs1#[doc = "Register `endpoint` reader"]
2pub type R = crate::R<ENDPOINT_SPEC>;
3#[doc = "Register `endpoint` writer"]
4pub type W = crate::W<ENDPOINT_SPEC>;
5#[doc = "Field `number` writer - number field"]
6pub type NUMBER_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
7#[doc = "Field `_0` reader - _0 field"]
8pub type _0_R = crate::FieldReader;
9#[doc = "Field `_0` writer - _0 field"]
10pub type _0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
11impl R {
12 #[doc = "Bits 4:7 - _0 field"]
13 #[inline(always)]
14 pub fn _0(&self) -> _0_R {
15 _0_R::new((self.bits >> 4) & 0x0f)
16 }
17}
18impl W {
19 #[doc = "Bits 0:3 - number field"]
20 #[inline(always)]
21 pub fn number(&mut self) -> NUMBER_W<ENDPOINT_SPEC> {
22 NUMBER_W::new(self, 0)
23 }
24 #[doc = "Bits 4:7 - _0 field"]
25 #[inline(always)]
26 pub fn _0(&mut self) -> _0_W<ENDPOINT_SPEC> {
27 _0_W::new(self, 4)
28 }
29}
30#[doc = "Endpoint register number: Contains the endpoint the enqueued packet is to be transmitted on. Writing to this field marks the relevant packet as ready to transmit; and thus should only be written after a full packet has been written into the FIFO. If no data has been placed into the DATA FIFO, a zero-length packet is generated. Note that any IN requests that do not match the endpoint number are automatically NAK'd.\n\nYou can [`read`](crate::Reg::read) this register and get [`endpoint::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`endpoint::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
31pub struct ENDPOINT_SPEC;
32impl crate::RegisterSpec for ENDPOINT_SPEC {
33 type Ux = u8;
34}
35#[doc = "`read()` method returns [`endpoint::R`](R) reader structure"]
36impl crate::Readable for ENDPOINT_SPEC {}
37#[doc = "`write(|w| ..)` method takes [`endpoint::W`](W) writer structure"]
38impl crate::Writable for ENDPOINT_SPEC {
39 type Safety = crate::Unsafe;
40 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
41 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
42}
43#[doc = "`reset()` method sets endpoint to value 0"]
44impl crate::Resettable for ENDPOINT_SPEC {
45 const RESET_VALUE: u8 = 0;
46}