moondancer_pac/generated/usb2_ep_out/
control.rs

1#[doc = "Register `control` reader"]
2pub type R = crate::R<CONTROL_SPEC>;
3#[doc = "Register `control` writer"]
4pub type W = crate::W<CONTROL_SPEC>;
5#[doc = "Field `address` reader - address field"]
6pub type ADDRESS_R = crate::FieldReader;
7#[doc = "Field `address` writer - address field"]
8pub type ADDRESS_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9impl R {
10    #[doc = "Bits 0:7 - address field"]
11    #[inline(always)]
12    pub fn address(&self) -> ADDRESS_R {
13        ADDRESS_R::new(self.bits)
14    }
15}
16impl W {
17    #[doc = "Bits 0:7 - address field"]
18    #[inline(always)]
19    pub fn address(&mut self) -> ADDRESS_W<CONTROL_SPEC> {
20        ADDRESS_W::new(self, 0)
21    }
22}
23#[doc = "Control register address: Controls the current device's USB address. Should be written after a SET_ADDRESS request is received. Automatically resets back to zero on a USB reset.\n\nYou can [`read`](crate::Reg::read) this register and get [`control::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`control::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct CONTROL_SPEC;
25impl crate::RegisterSpec for CONTROL_SPEC {
26    type Ux = u8;
27}
28#[doc = "`read()` method returns [`control::R`](R) reader structure"]
29impl crate::Readable for CONTROL_SPEC {}
30#[doc = "`write(|w| ..)` method takes [`control::W`](W) writer structure"]
31impl crate::Writable for CONTROL_SPEC {
32    type Safety = crate::Unsafe;
33    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
34    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
35}
36#[doc = "`reset()` method sets control to value 0"]
37impl crate::Resettable for CONTROL_SPEC {
38    const RESET_VALUE: u8 = 0;
39}