1#[doc = "Register `ISOINCONFIG` reader"]
2pub struct R(crate::R<ISOINCONFIG_SPEC>);
3impl core::ops::Deref for R {
4type Target = crate::R<ISOINCONFIG_SPEC>;
5#[inline(always)]
6fn deref(&self) -> &Self::Target {
7&self.0
8}
9}
10impl From<crate::R<ISOINCONFIG_SPEC>> for R {
11#[inline(always)]
12fn from(reader: crate::R<ISOINCONFIG_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `ISOINCONFIG` writer"]
17pub struct W(crate::W<ISOINCONFIG_SPEC>);
18impl core::ops::Deref for W {
19type Target = crate::W<ISOINCONFIG_SPEC>;
20#[inline(always)]
21fn deref(&self) -> &Self::Target {
22&self.0
23}
24}
25impl core::ops::DerefMut for W {
26#[inline(always)]
27fn deref_mut(&mut self) -> &mut Self::Target {
28&mut self.0
29}
30}
31impl From<crate::W<ISOINCONFIG_SPEC>> for W {
32#[inline(always)]
33fn from(writer: crate::W<ISOINCONFIG_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `RESPONSE` reader - Controls the response of the ISO IN endpoint to an IN token when no data is ready to be sent"]
38pub type RESPONSE_R = crate::BitReader<RESPONSE_A>;
39#[doc = "Controls the response of the ISO IN endpoint to an IN token when no data is ready to be sent\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq)]
41pub enum RESPONSE_A {
42#[doc = "0: Endpoint does not respond in that case"]
43NO_RESP = 0,
44#[doc = "1: Endpoint responds with a zero-length data packet in that case"]
45ZERO_DATA = 1,
46}
47impl From<RESPONSE_A> for bool {
48#[inline(always)]
49fn from(variant: RESPONSE_A) -> Self {
50 variant as u8 != 0
51}
52}
53impl RESPONSE_R {
54#[doc = "Get enumerated values variant"]
55 #[inline(always)]
56pub fn variant(&self) -> RESPONSE_A {
57match self.bits {
58false => RESPONSE_A::NO_RESP,
59true => RESPONSE_A::ZERO_DATA,
60 }
61 }
62#[doc = "Checks if the value of the field is `NO_RESP`"]
63 #[inline(always)]
64pub fn is_no_resp(&self) -> bool {
65*self == RESPONSE_A::NO_RESP
66 }
67#[doc = "Checks if the value of the field is `ZERO_DATA`"]
68 #[inline(always)]
69pub fn is_zero_data(&self) -> bool {
70*self == RESPONSE_A::ZERO_DATA
71 }
72}
73#[doc = "Field `RESPONSE` writer - Controls the response of the ISO IN endpoint to an IN token when no data is ready to be sent"]
74pub type RESPONSE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ISOINCONFIG_SPEC, RESPONSE_A, O>;
75impl<'a, const O: u8> RESPONSE_W<'a, O> {
76#[doc = "Endpoint does not respond in that case"]
77 #[inline(always)]
78pub fn no_resp(self) -> &'a mut W {
79self.variant(RESPONSE_A::NO_RESP)
80 }
81#[doc = "Endpoint responds with a zero-length data packet in that case"]
82 #[inline(always)]
83pub fn zero_data(self) -> &'a mut W {
84self.variant(RESPONSE_A::ZERO_DATA)
85 }
86}
87impl R {
88#[doc = "Bit 0 - Controls the response of the ISO IN endpoint to an IN token when no data is ready to be sent"]
89 #[inline(always)]
90pub fn response(&self) -> RESPONSE_R {
91 RESPONSE_R::new((self.bits & 1) != 0)
92 }
93}
94impl W {
95#[doc = "Bit 0 - Controls the response of the ISO IN endpoint to an IN token when no data is ready to be sent"]
96 #[inline(always)]
97pub fn response(&mut self) -> RESPONSE_W<0> {
98 RESPONSE_W::new(self)
99 }
100#[doc = "Writes raw bits to the register."]
101 #[inline(always)]
102pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
103self.0.bits(bits);
104self
105}
106}
107#[doc = "Controls the response of the ISO IN endpoint to an IN token when no data is ready to be sent\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [isoinconfig](index.html) module"]
108pub struct ISOINCONFIG_SPEC;
109impl crate::RegisterSpec for ISOINCONFIG_SPEC {
110type Ux = u32;
111}
112#[doc = "`read()` method returns [isoinconfig::R](R) reader structure"]
113impl crate::Readable for ISOINCONFIG_SPEC {
114type Reader = R;
115}
116#[doc = "`write(|w| ..)` method takes [isoinconfig::W](W) writer structure"]
117impl crate::Writable for ISOINCONFIG_SPEC {
118type Writer = W;
119}
120#[doc = "`reset()` method sets ISOINCONFIG to value 0"]
121impl crate::Resettable for ISOINCONFIG_SPEC {
122#[inline(always)]
123fn reset_value() -> Self::Ux {
1240
125}
126}