rp2040_pac/usbctrl_regs/
sof_wr.rs

1#[doc = "Register `SOF_WR` writer"]
2pub type W = crate::W<SOF_WR_SPEC>;
3#[doc = "Field `COUNT` writer - "]
4pub type COUNT_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16>;
5impl W {
6    #[doc = "Bits 0:10"]
7    #[inline(always)]
8    #[must_use]
9    pub fn count(&mut self) -> COUNT_W<SOF_WR_SPEC> {
10        COUNT_W::new(self, 0)
11    }
12    #[doc = r" Writes raw bits to the register."]
13    #[doc = r""]
14    #[doc = r" # Safety"]
15    #[doc = r""]
16    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
17    #[inline(always)]
18    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
19        self.bits = bits;
20        self
21    }
22}
23#[doc = "Set the SOF (Start of Frame) frame number in the host controller. The SOF packet is sent every 1ms and the host will increment the frame number by 1 each time.  
24
25You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`sof_wr::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
26pub struct SOF_WR_SPEC;
27impl crate::RegisterSpec for SOF_WR_SPEC {
28    type Ux = u32;
29}
30#[doc = "`write(|w| ..)` method takes [`sof_wr::W`](W) writer structure"]
31impl crate::Writable for SOF_WR_SPEC {
32    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
33    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34}
35#[doc = "`reset()` method sets SOF_WR to value 0"]
36impl crate::Resettable for SOF_WR_SPEC {
37    const RESET_VALUE: u32 = 0;
38}