moondancer_pac/generated/usb1_ep_out/
endpoint.rs

1#[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` reader - number field"]
6pub type NUMBER_R = crate::FieldReader;
7#[doc = "Field `number` writer - number field"]
8pub type NUMBER_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `_0` reader - _0 field"]
10pub type _0_R = crate::FieldReader;
11#[doc = "Field `_0` writer - _0 field"]
12pub type _0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13impl R {
14    #[doc = "Bits 0:3 - number field"]
15    #[inline(always)]
16    pub fn number(&self) -> NUMBER_R {
17        NUMBER_R::new(self.bits & 0x0f)
18    }
19    #[doc = "Bits 4:7 - _0 field"]
20    #[inline(always)]
21    pub fn _0(&self) -> _0_R {
22        _0_R::new((self.bits >> 4) & 0x0f)
23    }
24}
25impl W {
26    #[doc = "Bits 0:3 - number field"]
27    #[inline(always)]
28    pub fn number(&mut self) -> NUMBER_W<ENDPOINT_SPEC> {
29        NUMBER_W::new(self, 0)
30    }
31    #[doc = "Bits 4:7 - _0 field"]
32    #[inline(always)]
33    pub fn _0(&mut self) -> _0_W<ENDPOINT_SPEC> {
34        _0_W::new(self, 4)
35    }
36}
37#[doc = "Endpoint register number: Selects the endpoint number to prime. This interface allows priming multiple endpoints at once. That is, multiple endpoints can be ready to receive data at a time. See the `prime` and `enable` bits for usage.\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)."]
38pub struct ENDPOINT_SPEC;
39impl crate::RegisterSpec for ENDPOINT_SPEC {
40    type Ux = u8;
41}
42#[doc = "`read()` method returns [`endpoint::R`](R) reader structure"]
43impl crate::Readable for ENDPOINT_SPEC {}
44#[doc = "`write(|w| ..)` method takes [`endpoint::W`](W) writer structure"]
45impl crate::Writable for ENDPOINT_SPEC {
46    type Safety = crate::Unsafe;
47    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
48    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
49}
50#[doc = "`reset()` method sets endpoint to value 0"]
51impl crate::Resettable for ENDPOINT_SPEC {
52    const RESET_VALUE: u8 = 0;
53}