atsam4ls2c_pac/usbc/
upcon0set.rs

1#[doc = "Register `UPCON0SET` writer"]
2pub struct W(crate::W<UPCON0SET_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<UPCON0SET_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl core::ops::DerefMut for W {
11    #[inline(always)]
12    fn deref_mut(&mut self) -> &mut Self::Target {
13        &mut self.0
14    }
15}
16impl From<crate::W<UPCON0SET_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<UPCON0SET_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Field `RXINES` writer - RXINE Set"]
23pub type RXINES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
24#[doc = "Field `TXOUTES` writer - TXOUTE Set"]
25pub type TXOUTES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
26#[doc = "Field `TXSTPES` writer - TXSTPE Set"]
27pub type TXSTPES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
28#[doc = "Field `PERRES` writer - PERRE Set"]
29pub type PERRES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
30#[doc = "Field `NAKEDES` writer - NAKEDE Set"]
31pub type NAKEDES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
32#[doc = "Field `ERRORFIES` writer - ERRORFIE Set"]
33pub type ERRORFIES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
34#[doc = "Field `RXSTALLDES` writer - RXSTALLDE Set"]
35pub type RXSTALLDES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
36#[doc = "Field `RAMACERES` writer - RAMACERE Set"]
37pub type RAMACERES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
38#[doc = "Field `NBUSYBKES` writer - NBUSYBKE Set"]
39pub type NBUSYBKES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
40#[doc = "Field `FIFOCONS` writer - FIFOCON Set"]
41pub type FIFOCONS_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
42#[doc = "Field `PFREEZES` writer - PFREEZE Set"]
43pub type PFREEZES_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
44#[doc = "Field `INITDTGLS` writer - INITDTGL Set"]
45pub type INITDTGLS_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
46#[doc = "Field `INITBKS` writer - INITBK Set"]
47pub type INITBKS_W<'a, const O: u8> = crate::BitWriter<'a, u32, UPCON0SET_SPEC, bool, O>;
48impl W {
49    #[doc = "Bit 0 - RXINE Set"]
50    #[inline(always)]
51    #[must_use]
52    pub fn rxines(&mut self) -> RXINES_W<0> {
53        RXINES_W::new(self)
54    }
55    #[doc = "Bit 1 - TXOUTE Set"]
56    #[inline(always)]
57    #[must_use]
58    pub fn txoutes(&mut self) -> TXOUTES_W<1> {
59        TXOUTES_W::new(self)
60    }
61    #[doc = "Bit 2 - TXSTPE Set"]
62    #[inline(always)]
63    #[must_use]
64    pub fn txstpes(&mut self) -> TXSTPES_W<2> {
65        TXSTPES_W::new(self)
66    }
67    #[doc = "Bit 3 - PERRE Set"]
68    #[inline(always)]
69    #[must_use]
70    pub fn perres(&mut self) -> PERRES_W<3> {
71        PERRES_W::new(self)
72    }
73    #[doc = "Bit 4 - NAKEDE Set"]
74    #[inline(always)]
75    #[must_use]
76    pub fn nakedes(&mut self) -> NAKEDES_W<4> {
77        NAKEDES_W::new(self)
78    }
79    #[doc = "Bit 5 - ERRORFIE Set"]
80    #[inline(always)]
81    #[must_use]
82    pub fn errorfies(&mut self) -> ERRORFIES_W<5> {
83        ERRORFIES_W::new(self)
84    }
85    #[doc = "Bit 6 - RXSTALLDE Set"]
86    #[inline(always)]
87    #[must_use]
88    pub fn rxstalldes(&mut self) -> RXSTALLDES_W<6> {
89        RXSTALLDES_W::new(self)
90    }
91    #[doc = "Bit 10 - RAMACERE Set"]
92    #[inline(always)]
93    #[must_use]
94    pub fn ramaceres(&mut self) -> RAMACERES_W<10> {
95        RAMACERES_W::new(self)
96    }
97    #[doc = "Bit 12 - NBUSYBKE Set"]
98    #[inline(always)]
99    #[must_use]
100    pub fn nbusybkes(&mut self) -> NBUSYBKES_W<12> {
101        NBUSYBKES_W::new(self)
102    }
103    #[doc = "Bit 14 - FIFOCON Set"]
104    #[inline(always)]
105    #[must_use]
106    pub fn fifocons(&mut self) -> FIFOCONS_W<14> {
107        FIFOCONS_W::new(self)
108    }
109    #[doc = "Bit 17 - PFREEZE Set"]
110    #[inline(always)]
111    #[must_use]
112    pub fn pfreezes(&mut self) -> PFREEZES_W<17> {
113        PFREEZES_W::new(self)
114    }
115    #[doc = "Bit 18 - INITDTGL Set"]
116    #[inline(always)]
117    #[must_use]
118    pub fn initdtgls(&mut self) -> INITDTGLS_W<18> {
119        INITDTGLS_W::new(self)
120    }
121    #[doc = "Bit 19 - INITBK Set"]
122    #[inline(always)]
123    #[must_use]
124    pub fn initbks(&mut self) -> INITBKS_W<19> {
125        INITBKS_W::new(self)
126    }
127    #[doc = "Writes raw bits to the register."]
128    #[inline(always)]
129    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
130        self.0.bits(bits);
131        self
132    }
133}
134#[doc = "Pipe Control Set Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [upcon0set](index.html) module"]
135pub struct UPCON0SET_SPEC;
136impl crate::RegisterSpec for UPCON0SET_SPEC {
137    type Ux = u32;
138}
139#[doc = "`write(|w| ..)` method takes [upcon0set::W](W) writer structure"]
140impl crate::Writable for UPCON0SET_SPEC {
141    type Writer = W;
142    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
143    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
144}
145#[doc = "`reset()` method sets UPCON0SET to value 0"]
146impl crate::Resettable for UPCON0SET_SPEC {
147    const RESET_VALUE: Self::Ux = 0;
148}