cc2538_pac/usb/
f4.rs

1#[doc = "Register `F4` reader"]
2pub type R = crate::R<F4Spec>;
3#[doc = "Register `F4` writer"]
4pub type W = crate::W<F4Spec>;
5#[doc = "Field `USBF4` reader - Endpoint 4 FIFO register Reading this register unloads one byte from the EP4 OUT FIFO. Writing to this register loads one byte into the EP4 IN FIFO."]
6pub type Usbf4R = crate::FieldReader;
7#[doc = "Field `USBF4` writer - Endpoint 4 FIFO register Reading this register unloads one byte from the EP4 OUT FIFO. Writing to this register loads one byte into the EP4 IN FIFO."]
8pub type Usbf4W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9impl R {
10    #[doc = "Bits 0:7 - Endpoint 4 FIFO register Reading this register unloads one byte from the EP4 OUT FIFO. Writing to this register loads one byte into the EP4 IN FIFO."]
11    #[inline(always)]
12    pub fn usbf4(&self) -> Usbf4R {
13        Usbf4R::new((self.bits & 0xff) as u8)
14    }
15}
16impl W {
17    #[doc = "Bits 0:7 - Endpoint 4 FIFO register Reading this register unloads one byte from the EP4 OUT FIFO. Writing to this register loads one byte into the EP4 IN FIFO."]
18    #[inline(always)]
19    pub fn usbf4(&mut self) -> Usbf4W<F4Spec> {
20        Usbf4W::new(self, 0)
21    }
22}
23#[doc = "IN/OUT endpoint 4 FIFO\n\nYou can [`read`](crate::Reg::read) this register and get [`f4::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`f4::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct F4Spec;
25impl crate::RegisterSpec for F4Spec {
26    type Ux = u32;
27}
28#[doc = "`read()` method returns [`f4::R`](R) reader structure"]
29impl crate::Readable for F4Spec {}
30#[doc = "`write(|w| ..)` method takes [`f4::W`](W) writer structure"]
31impl crate::Writable for F4Spec {
32    type Safety = crate::Unsafe;
33    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets F4 to value 0"]
37impl crate::Resettable for F4Spec {
38    const RESET_VALUE: u32 = 0;
39}