Skip to main content

mcxa_pac/usb0/
usbfrmadjust.rs

1#[doc = "Register `USBFRMADJUST` reader"]
2pub type R = crate::R<UsbfrmadjustSpec>;
3#[doc = "Register `USBFRMADJUST` writer"]
4pub type W = crate::W<UsbfrmadjustSpec>;
5#[doc = "Field `ADJ` reader - Frame Adjustment"]
6pub type AdjR = crate::FieldReader;
7#[doc = "Field `ADJ` writer - Frame Adjustment"]
8pub type AdjW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9impl R {
10    #[doc = "Bits 0:7 - Frame Adjustment"]
11    #[inline(always)]
12    pub fn adj(&self) -> AdjR {
13        AdjR::new(self.bits)
14    }
15}
16#[cfg(feature = "debug")]
17impl core::fmt::Debug for R {
18    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19        f.debug_struct("USBFRMADJUST").field("adj", &self.adj()).finish()
20    }
21}
22impl W {
23    #[doc = "Bits 0:7 - Frame Adjustment"]
24    #[inline(always)]
25    pub fn adj(&mut self) -> AdjW<'_, UsbfrmadjustSpec> {
26        AdjW::new(self, 0)
27    }
28}
29#[doc = "Frame Adjust\n\nYou can [`read`](crate::Reg::read) this register and get [`usbfrmadjust::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`usbfrmadjust::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
30pub struct UsbfrmadjustSpec;
31impl crate::RegisterSpec for UsbfrmadjustSpec {
32    type Ux = u8;
33}
34#[doc = "`read()` method returns [`usbfrmadjust::R`](R) reader structure"]
35impl crate::Readable for UsbfrmadjustSpec {}
36#[doc = "`write(|w| ..)` method takes [`usbfrmadjust::W`](W) writer structure"]
37impl crate::Writable for UsbfrmadjustSpec {
38    type Safety = crate::Unsafe;
39}
40#[doc = "`reset()` method sets USBFRMADJUST to value 0"]
41impl crate::Resettable for UsbfrmadjustSpec {}