xmc4100/usb0/
dieptxf4.rs

1#[doc = "Register `DIEPTXF4` reader"]
2pub type R = crate::R<DIEPTXF4_SPEC>;
3#[doc = "Register `DIEPTXF4` writer"]
4pub type W = crate::W<DIEPTXF4_SPEC>;
5#[doc = "Field `INEPnTxFStAddr` reader - IN Endpoint FIFOn Transmit RAM Start Address"]
6pub type INEPN_TX_FST_ADDR_R = crate::FieldReader<u16>;
7#[doc = "Field `INEPnTxFStAddr` writer - IN Endpoint FIFOn Transmit RAM Start Address"]
8pub type INEPN_TX_FST_ADDR_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `INEPnTxFDep` reader - IN Endpoint TxFIFO Depth"]
10pub type INEPN_TX_FDEP_R = crate::FieldReader<u16>;
11#[doc = "Field `INEPnTxFDep` writer - IN Endpoint TxFIFO Depth"]
12pub type INEPN_TX_FDEP_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
13impl R {
14    #[doc = "Bits 0:15 - IN Endpoint FIFOn Transmit RAM Start Address"]
15    #[inline(always)]
16    pub fn inepn_tx_fst_addr(&self) -> INEPN_TX_FST_ADDR_R {
17        INEPN_TX_FST_ADDR_R::new((self.bits & 0xffff) as u16)
18    }
19    #[doc = "Bits 16:31 - IN Endpoint TxFIFO Depth"]
20    #[inline(always)]
21    pub fn inepn_tx_fdep(&self) -> INEPN_TX_FDEP_R {
22        INEPN_TX_FDEP_R::new(((self.bits >> 16) & 0xffff) as u16)
23    }
24}
25impl W {
26    #[doc = "Bits 0:15 - IN Endpoint FIFOn Transmit RAM Start Address"]
27    #[inline(always)]
28    pub fn inepn_tx_fst_addr(&mut self) -> INEPN_TX_FST_ADDR_W<DIEPTXF4_SPEC> {
29        INEPN_TX_FST_ADDR_W::new(self, 0)
30    }
31    #[doc = "Bits 16:31 - IN Endpoint TxFIFO Depth"]
32    #[inline(always)]
33    pub fn inepn_tx_fdep(&mut self) -> INEPN_TX_FDEP_W<DIEPTXF4_SPEC> {
34        INEPN_TX_FDEP_W::new(self, 16)
35    }
36}
37#[doc = "Device IN Endpoint 4 Transmit FIFO Size Register\n\nYou can [`read`](crate::Reg::read) this register and get [`dieptxf4::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dieptxf4::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
38pub struct DIEPTXF4_SPEC;
39impl crate::RegisterSpec for DIEPTXF4_SPEC {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [`dieptxf4::R`](R) reader structure"]
43impl crate::Readable for DIEPTXF4_SPEC {}
44#[doc = "`write(|w| ..)` method takes [`dieptxf4::W`](W) writer structure"]
45impl crate::Writable for DIEPTXF4_SPEC {
46    type Safety = crate::Unsafe;
47    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
48    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
49}
50#[doc = "`reset()` method sets DIEPTXF4 to value 0x0100_042a"]
51impl crate::Resettable for DIEPTXF4_SPEC {
52    const RESET_VALUE: u32 = 0x0100_042a;
53}