1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_hardware_sdmmc::natural::*;
8
9 #[derive(Debug, PartialEq)]
10 #[repr(C)]
11 pub struct CqhciInitializeCommandQueueingRequest {
12 pub virtual_interrupt: ::fidl_next::fuchsia::zx::Interrupt,
13
14 pub virtual_interrupt_lifeline: ::fidl_next::fuchsia::zx::EventPair,
15 }
16
17 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingRequest, ___E>
18 for CqhciInitializeCommandQueueingRequest
19 where
20 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21 ___E: ::fidl_next::fuchsia::HandleEncoder,
22 {
23 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
24 Self,
25 crate::wire::CqhciInitializeCommandQueueingRequest,
26 > = unsafe {
27 ::fidl_next::CopyOptimization::enable_if(
28 true && <::fidl_next::fuchsia::zx::Interrupt as ::fidl_next::Encode<
29 ::fidl_next::wire::fuchsia::Interrupt,
30 ___E,
31 >>::COPY_OPTIMIZATION
32 .is_enabled()
33 && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
34 ::fidl_next::wire::fuchsia::EventPair,
35 ___E,
36 >>::COPY_OPTIMIZATION
37 .is_enabled(),
38 )
39 };
40
41 #[inline]
42 fn encode(
43 self,
44 encoder_: &mut ___E,
45 out_: &mut ::core::mem::MaybeUninit<crate::wire::CqhciInitializeCommandQueueingRequest>,
46 _: (),
47 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
48 ::fidl_next::munge! {
49 let crate::wire::CqhciInitializeCommandQueueingRequest {
50 virtual_interrupt,
51 virtual_interrupt_lifeline,
52
53 } = out_;
54 }
55
56 ::fidl_next::Encode::encode(self.virtual_interrupt, encoder_, virtual_interrupt, ())?;
57
58 let mut _field =
59 unsafe { ::fidl_next::Slot::new_unchecked(virtual_interrupt.as_mut_ptr()) };
60
61 ::fidl_next::Encode::encode(
62 self.virtual_interrupt_lifeline,
63 encoder_,
64 virtual_interrupt_lifeline,
65 (),
66 )?;
67
68 let mut _field = unsafe {
69 ::fidl_next::Slot::new_unchecked(virtual_interrupt_lifeline.as_mut_ptr())
70 };
71
72 Ok(())
73 }
74 }
75
76 unsafe impl<___E>
77 ::fidl_next::EncodeOption<
78 ::fidl_next::wire::Box<'static, crate::wire::CqhciInitializeCommandQueueingRequest>,
79 ___E,
80 > for CqhciInitializeCommandQueueingRequest
81 where
82 ___E: ::fidl_next::Encoder + ?Sized,
83 CqhciInitializeCommandQueueingRequest:
84 ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingRequest, ___E>,
85 {
86 #[inline]
87 fn encode_option(
88 this: ::core::option::Option<Self>,
89 encoder: &mut ___E,
90 out: &mut ::core::mem::MaybeUninit<
91 ::fidl_next::wire::Box<'static, crate::wire::CqhciInitializeCommandQueueingRequest>,
92 >,
93 _: (),
94 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
95 if let Some(inner) = this {
96 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
97 ::fidl_next::wire::Box::encode_present(out);
98 } else {
99 ::fidl_next::wire::Box::encode_absent(out);
100 }
101
102 Ok(())
103 }
104 }
105
106 impl ::fidl_next::FromWire<crate::wire::CqhciInitializeCommandQueueingRequest>
107 for CqhciInitializeCommandQueueingRequest
108 {
109 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
110 crate::wire::CqhciInitializeCommandQueueingRequest,
111 Self,
112 > = unsafe {
113 ::fidl_next::CopyOptimization::enable_if(
114 true && <::fidl_next::fuchsia::zx::Interrupt as ::fidl_next::FromWire<
115 ::fidl_next::wire::fuchsia::Interrupt,
116 >>::COPY_OPTIMIZATION
117 .is_enabled()
118 && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
119 ::fidl_next::wire::fuchsia::EventPair,
120 >>::COPY_OPTIMIZATION
121 .is_enabled(),
122 )
123 };
124
125 #[inline]
126 fn from_wire(wire: crate::wire::CqhciInitializeCommandQueueingRequest) -> Self {
127 Self {
128 virtual_interrupt: ::fidl_next::FromWire::from_wire(wire.virtual_interrupt),
129
130 virtual_interrupt_lifeline: ::fidl_next::FromWire::from_wire(
131 wire.virtual_interrupt_lifeline,
132 ),
133 }
134 }
135 }
136
137 #[derive(Debug, PartialEq)]
138 pub struct CqhciInitializeCommandQueueingResponse {
139 pub cqhci_mmio: ::fidl_next::fuchsia::zx::Vmo,
140
141 pub cqhci_mmio_offset: u64,
142
143 pub sdhci_mmio: ::fidl_next::fuchsia::zx::Vmo,
144
145 pub sdhci_mmio_offset: u64,
146
147 pub bti: ::fidl_next::fuchsia::zx::Bti,
148
149 pub interrupt: ::fidl_next::fuchsia::zx::Interrupt,
150 }
151
152 unsafe impl<___E> ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingResponse, ___E>
153 for CqhciInitializeCommandQueueingResponse
154 where
155 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
156 ___E: ::fidl_next::fuchsia::HandleEncoder,
157 {
158 #[inline]
159 fn encode(
160 self,
161 encoder_: &mut ___E,
162 out_: &mut ::core::mem::MaybeUninit<
163 crate::wire::CqhciInitializeCommandQueueingResponse,
164 >,
165 _: (),
166 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
167 ::fidl_next::munge! {
168 let crate::wire::CqhciInitializeCommandQueueingResponse {
169 cqhci_mmio,
170 cqhci_mmio_offset,
171 sdhci_mmio,
172 sdhci_mmio_offset,
173 bti,
174 interrupt,
175
176 } = out_;
177 }
178
179 ::fidl_next::Encode::encode(self.cqhci_mmio, encoder_, cqhci_mmio, ())?;
180
181 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cqhci_mmio.as_mut_ptr()) };
182
183 ::fidl_next::Encode::encode(self.cqhci_mmio_offset, encoder_, cqhci_mmio_offset, ())?;
184
185 let mut _field =
186 unsafe { ::fidl_next::Slot::new_unchecked(cqhci_mmio_offset.as_mut_ptr()) };
187
188 ::fidl_next::Encode::encode(self.sdhci_mmio, encoder_, sdhci_mmio, ())?;
189
190 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(sdhci_mmio.as_mut_ptr()) };
191
192 ::fidl_next::Encode::encode(self.sdhci_mmio_offset, encoder_, sdhci_mmio_offset, ())?;
193
194 let mut _field =
195 unsafe { ::fidl_next::Slot::new_unchecked(sdhci_mmio_offset.as_mut_ptr()) };
196
197 ::fidl_next::Encode::encode(self.bti, encoder_, bti, ())?;
198
199 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bti.as_mut_ptr()) };
200
201 ::fidl_next::Encode::encode(self.interrupt, encoder_, interrupt, ())?;
202
203 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interrupt.as_mut_ptr()) };
204
205 Ok(())
206 }
207 }
208
209 unsafe impl<___E>
210 ::fidl_next::EncodeOption<
211 ::fidl_next::wire::Box<'static, crate::wire::CqhciInitializeCommandQueueingResponse>,
212 ___E,
213 > for CqhciInitializeCommandQueueingResponse
214 where
215 ___E: ::fidl_next::Encoder + ?Sized,
216 CqhciInitializeCommandQueueingResponse:
217 ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingResponse, ___E>,
218 {
219 #[inline]
220 fn encode_option(
221 this: ::core::option::Option<Self>,
222 encoder: &mut ___E,
223 out: &mut ::core::mem::MaybeUninit<
224 ::fidl_next::wire::Box<
225 'static,
226 crate::wire::CqhciInitializeCommandQueueingResponse,
227 >,
228 >,
229 _: (),
230 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
231 if let Some(inner) = this {
232 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
233 ::fidl_next::wire::Box::encode_present(out);
234 } else {
235 ::fidl_next::wire::Box::encode_absent(out);
236 }
237
238 Ok(())
239 }
240 }
241
242 impl ::fidl_next::FromWire<crate::wire::CqhciInitializeCommandQueueingResponse>
243 for CqhciInitializeCommandQueueingResponse
244 {
245 #[inline]
246 fn from_wire(wire: crate::wire::CqhciInitializeCommandQueueingResponse) -> Self {
247 Self {
248 cqhci_mmio: ::fidl_next::FromWire::from_wire(wire.cqhci_mmio),
249
250 cqhci_mmio_offset: ::fidl_next::FromWire::from_wire(wire.cqhci_mmio_offset),
251
252 sdhci_mmio: ::fidl_next::FromWire::from_wire(wire.sdhci_mmio),
253
254 sdhci_mmio_offset: ::fidl_next::FromWire::from_wire(wire.sdhci_mmio_offset),
255
256 bti: ::fidl_next::FromWire::from_wire(wire.bti),
257
258 interrupt: ::fidl_next::FromWire::from_wire(wire.interrupt),
259 }
260 }
261 }
262
263 #[derive(Debug, PartialEq)]
264 #[repr(C)]
265 pub struct SdmmcRegisterInBandInterruptRequest {
266 pub interrupt_cb: ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::DriverChannel>,
267 }
268
269 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcRegisterInBandInterruptRequest, ___E>
270 for SdmmcRegisterInBandInterruptRequest
271 where
272 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
273 ___E: ::fidl_next::fuchsia::HandleEncoder,
274 {
275 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
276 Self,
277 crate::wire::SdmmcRegisterInBandInterruptRequest,
278 > = unsafe {
279 ::fidl_next::CopyOptimization::enable_if(
280 true
281
282 && <
283 ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::DriverChannel> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>, ___E>
284 >::COPY_OPTIMIZATION.is_enabled()
285
286 )
287 };
288
289 #[inline]
290 fn encode(
291 self,
292 encoder_: &mut ___E,
293 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRegisterInBandInterruptRequest>,
294 _: (),
295 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
296 ::fidl_next::munge! {
297 let crate::wire::SdmmcRegisterInBandInterruptRequest {
298 interrupt_cb,
299
300 } = out_;
301 }
302
303 ::fidl_next::Encode::encode(self.interrupt_cb, encoder_, interrupt_cb, ())?;
304
305 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interrupt_cb.as_mut_ptr()) };
306
307 Ok(())
308 }
309 }
310
311 unsafe impl<___E>
312 ::fidl_next::EncodeOption<
313 ::fidl_next::wire::Box<'static, crate::wire::SdmmcRegisterInBandInterruptRequest>,
314 ___E,
315 > for SdmmcRegisterInBandInterruptRequest
316 where
317 ___E: ::fidl_next::Encoder + ?Sized,
318 SdmmcRegisterInBandInterruptRequest:
319 ::fidl_next::Encode<crate::wire::SdmmcRegisterInBandInterruptRequest, ___E>,
320 {
321 #[inline]
322 fn encode_option(
323 this: ::core::option::Option<Self>,
324 encoder: &mut ___E,
325 out: &mut ::core::mem::MaybeUninit<
326 ::fidl_next::wire::Box<'static, crate::wire::SdmmcRegisterInBandInterruptRequest>,
327 >,
328 _: (),
329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
330 if let Some(inner) = this {
331 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
332 ::fidl_next::wire::Box::encode_present(out);
333 } else {
334 ::fidl_next::wire::Box::encode_absent(out);
335 }
336
337 Ok(())
338 }
339 }
340
341 impl ::fidl_next::FromWire<crate::wire::SdmmcRegisterInBandInterruptRequest>
342 for SdmmcRegisterInBandInterruptRequest
343 {
344 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
345 crate::wire::SdmmcRegisterInBandInterruptRequest,
346 Self,
347 > = unsafe {
348 ::fidl_next::CopyOptimization::enable_if(
349 true
350
351 && <
352 ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::DriverChannel> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>>
353 >::COPY_OPTIMIZATION.is_enabled()
354
355 )
356 };
357
358 #[inline]
359 fn from_wire(wire: crate::wire::SdmmcRegisterInBandInterruptRequest) -> Self {
360 Self { interrupt_cb: ::fidl_next::FromWire::from_wire(wire.interrupt_cb) }
361 }
362 }
363
364 #[derive(Debug, PartialEq)]
365 pub struct SdmmcRegisterVmoRequest {
366 pub vmo_id: u32,
367
368 pub client_id: u8,
369
370 pub vmo: ::fidl_next::fuchsia::zx::Vmo,
371
372 pub offset: u64,
373
374 pub size: u64,
375
376 pub vmo_rights: crate::natural::SdmmcVmoRight,
377 }
378
379 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcRegisterVmoRequest, ___E>
380 for SdmmcRegisterVmoRequest
381 where
382 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
383 ___E: ::fidl_next::fuchsia::HandleEncoder,
384 {
385 #[inline]
386 fn encode(
387 self,
388 encoder_: &mut ___E,
389 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRegisterVmoRequest>,
390 _: (),
391 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
392 ::fidl_next::munge! {
393 let crate::wire::SdmmcRegisterVmoRequest {
394 vmo_id,
395 client_id,
396 vmo,
397 offset,
398 size,
399 vmo_rights,
400
401 } = out_;
402 }
403
404 ::fidl_next::Encode::encode(self.vmo_id, encoder_, vmo_id, ())?;
405
406 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo_id.as_mut_ptr()) };
407
408 ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
409
410 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_id.as_mut_ptr()) };
411
412 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
413
414 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo.as_mut_ptr()) };
415
416 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
417
418 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
419
420 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
421
422 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(size.as_mut_ptr()) };
423
424 ::fidl_next::Encode::encode(self.vmo_rights, encoder_, vmo_rights, ())?;
425
426 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo_rights.as_mut_ptr()) };
427
428 Ok(())
429 }
430 }
431
432 unsafe impl<___E>
433 ::fidl_next::EncodeOption<
434 ::fidl_next::wire::Box<'static, crate::wire::SdmmcRegisterVmoRequest>,
435 ___E,
436 > for SdmmcRegisterVmoRequest
437 where
438 ___E: ::fidl_next::Encoder + ?Sized,
439 SdmmcRegisterVmoRequest: ::fidl_next::Encode<crate::wire::SdmmcRegisterVmoRequest, ___E>,
440 {
441 #[inline]
442 fn encode_option(
443 this: ::core::option::Option<Self>,
444 encoder: &mut ___E,
445 out: &mut ::core::mem::MaybeUninit<
446 ::fidl_next::wire::Box<'static, crate::wire::SdmmcRegisterVmoRequest>,
447 >,
448 _: (),
449 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
450 if let Some(inner) = this {
451 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
452 ::fidl_next::wire::Box::encode_present(out);
453 } else {
454 ::fidl_next::wire::Box::encode_absent(out);
455 }
456
457 Ok(())
458 }
459 }
460
461 impl ::fidl_next::FromWire<crate::wire::SdmmcRegisterVmoRequest> for SdmmcRegisterVmoRequest {
462 #[inline]
463 fn from_wire(wire: crate::wire::SdmmcRegisterVmoRequest) -> Self {
464 Self {
465 vmo_id: ::fidl_next::FromWire::from_wire(wire.vmo_id),
466
467 client_id: ::fidl_next::FromWire::from_wire(wire.client_id),
468
469 vmo: ::fidl_next::FromWire::from_wire(wire.vmo),
470
471 offset: ::fidl_next::FromWire::from_wire(wire.offset),
472
473 size: ::fidl_next::FromWire::from_wire(wire.size),
474
475 vmo_rights: ::fidl_next::FromWire::from_wire(wire.vmo_rights),
476 }
477 }
478 }
479
480 #[derive(Debug, PartialEq)]
481 #[repr(C)]
482 pub struct SdmmcUnregisterVmoResponse {
483 pub vmo: ::fidl_next::fuchsia::zx::Vmo,
484 }
485
486 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoResponse, ___E>
487 for SdmmcUnregisterVmoResponse
488 where
489 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
490 ___E: ::fidl_next::fuchsia::HandleEncoder,
491 {
492 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
493 Self,
494 crate::wire::SdmmcUnregisterVmoResponse,
495 > = unsafe {
496 ::fidl_next::CopyOptimization::enable_if(
497 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<
498 ::fidl_next::wire::fuchsia::Vmo,
499 ___E,
500 >>::COPY_OPTIMIZATION
501 .is_enabled(),
502 )
503 };
504
505 #[inline]
506 fn encode(
507 self,
508 encoder_: &mut ___E,
509 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcUnregisterVmoResponse>,
510 _: (),
511 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
512 ::fidl_next::munge! {
513 let crate::wire::SdmmcUnregisterVmoResponse {
514 vmo,
515
516 } = out_;
517 }
518
519 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
520
521 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo.as_mut_ptr()) };
522
523 Ok(())
524 }
525 }
526
527 unsafe impl<___E>
528 ::fidl_next::EncodeOption<
529 ::fidl_next::wire::Box<'static, crate::wire::SdmmcUnregisterVmoResponse>,
530 ___E,
531 > for SdmmcUnregisterVmoResponse
532 where
533 ___E: ::fidl_next::Encoder + ?Sized,
534 SdmmcUnregisterVmoResponse:
535 ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoResponse, ___E>,
536 {
537 #[inline]
538 fn encode_option(
539 this: ::core::option::Option<Self>,
540 encoder: &mut ___E,
541 out: &mut ::core::mem::MaybeUninit<
542 ::fidl_next::wire::Box<'static, crate::wire::SdmmcUnregisterVmoResponse>,
543 >,
544 _: (),
545 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
546 if let Some(inner) = this {
547 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
548 ::fidl_next::wire::Box::encode_present(out);
549 } else {
550 ::fidl_next::wire::Box::encode_absent(out);
551 }
552
553 Ok(())
554 }
555 }
556
557 impl ::fidl_next::FromWire<crate::wire::SdmmcUnregisterVmoResponse> for SdmmcUnregisterVmoResponse {
558 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
559 crate::wire::SdmmcUnregisterVmoResponse,
560 Self,
561 > = unsafe {
562 ::fidl_next::CopyOptimization::enable_if(
563 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
564 ::fidl_next::wire::fuchsia::Vmo,
565 >>::COPY_OPTIMIZATION
566 .is_enabled(),
567 )
568 };
569
570 #[inline]
571 fn from_wire(wire: crate::wire::SdmmcUnregisterVmoResponse) -> Self {
572 Self { vmo: ::fidl_next::FromWire::from_wire(wire.vmo) }
573 }
574 }
575
576 #[derive(Debug, PartialEq)]
577 pub enum SdmmcBuffer {
578 VmoId(u32),
579
580 Vmo(::fidl_next::fuchsia::zx::Vmo),
581 }
582
583 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcBuffer, ___E> for SdmmcBuffer
584 where
585 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
586 ___E: ::fidl_next::fuchsia::HandleEncoder,
587 {
588 #[inline]
589 fn encode(
590 self,
591 encoder: &mut ___E,
592 out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcBuffer>,
593 _: (),
594 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
595 ::fidl_next::munge!(let crate::wire::SdmmcBuffer { raw, _phantom: _ } = out);
596
597 match self {
598 Self::VmoId(value) => ::fidl_next::wire::Union::encode_as_static::<
599 ___E,
600 ::fidl_next::wire::Uint32,
601 >(value, 1, encoder, raw, ())?,
602
603 Self::Vmo(value) => ::fidl_next::wire::Union::encode_as_static::<
604 ___E,
605 ::fidl_next::wire::fuchsia::Vmo,
606 >(value, 2, encoder, raw, ())?,
607 }
608
609 Ok(())
610 }
611 }
612
613 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::SdmmcBuffer, ___E> for SdmmcBuffer
614 where
615 ___E: ?Sized,
616 SdmmcBuffer: ::fidl_next::Encode<crate::wire::SdmmcBuffer, ___E>,
617 {
618 #[inline]
619 fn encode_option(
620 this: ::core::option::Option<Self>,
621 encoder: &mut ___E,
622 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SdmmcBuffer>,
623 _: (),
624 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
625 ::fidl_next::munge!(let crate::wire_optional::SdmmcBuffer { raw, _phantom: _ } = &mut *out);
626
627 if let Some(inner) = this {
628 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
629 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
630 } else {
631 ::fidl_next::wire::Union::encode_absent(raw);
632 }
633
634 Ok(())
635 }
636 }
637
638 impl ::fidl_next::FromWire<crate::wire::SdmmcBuffer> for SdmmcBuffer {
639 #[inline]
640 fn from_wire(wire: crate::wire::SdmmcBuffer) -> Self {
641 let wire = ::core::mem::ManuallyDrop::new(wire);
642 match wire.raw.ordinal() {
643 1 => Self::VmoId(::fidl_next::FromWire::from_wire(unsafe {
644 wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
645 })),
646
647 2 => Self::Vmo(::fidl_next::FromWire::from_wire(unsafe {
648 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
649 })),
650
651 _ => unsafe { ::core::hint::unreachable_unchecked() },
652 }
653 }
654 }
655
656 impl ::fidl_next::FromWireOption<crate::wire_optional::SdmmcBuffer> for SdmmcBuffer {
657 #[inline]
658 fn from_wire_option(
659 wire: crate::wire_optional::SdmmcBuffer,
660 ) -> ::core::option::Option<Self> {
661 if let Some(inner) = wire.into_option() {
662 Some(::fidl_next::FromWire::from_wire(inner))
663 } else {
664 None
665 }
666 }
667 }
668
669 impl ::fidl_next::FromWireOption<crate::wire_optional::SdmmcBuffer> for Box<SdmmcBuffer> {
670 #[inline]
671 fn from_wire_option(
672 wire: crate::wire_optional::SdmmcBuffer,
673 ) -> ::core::option::Option<Self> {
674 <
675 SdmmcBuffer as ::fidl_next::FromWireOption<crate::wire_optional::SdmmcBuffer>
676 >::from_wire_option(wire).map(Box::new)
677 }
678 }
679
680 #[derive(Debug, PartialEq)]
681 #[repr(C)]
682 pub struct SdmmcBufferRegion {
683 pub buffer: crate::natural::SdmmcBuffer,
684
685 pub offset: u64,
686
687 pub size: u64,
688 }
689
690 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcBufferRegion, ___E> for SdmmcBufferRegion
691 where
692 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
693 ___E: ::fidl_next::fuchsia::HandleEncoder,
694 {
695 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
696 Self,
697 crate::wire::SdmmcBufferRegion,
698 > = unsafe {
699 ::fidl_next::CopyOptimization::enable_if(
700 true
701
702 && <
703 crate::natural::SdmmcBuffer as ::fidl_next::Encode<crate::wire::SdmmcBuffer, ___E>
704 >::COPY_OPTIMIZATION.is_enabled()
705
706 && <
707 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
708 >::COPY_OPTIMIZATION.is_enabled()
709
710 && <
711 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
712 >::COPY_OPTIMIZATION.is_enabled()
713
714 )
715 };
716
717 #[inline]
718 fn encode(
719 self,
720 encoder_: &mut ___E,
721 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcBufferRegion>,
722 _: (),
723 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
724 ::fidl_next::munge! {
725 let crate::wire::SdmmcBufferRegion {
726 buffer,
727 offset,
728 size,
729
730 } = out_;
731 }
732
733 ::fidl_next::Encode::encode(self.buffer, encoder_, buffer, ())?;
734
735 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buffer.as_mut_ptr()) };
736
737 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
738
739 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
740
741 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
742
743 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(size.as_mut_ptr()) };
744
745 Ok(())
746 }
747 }
748
749 unsafe impl<___E>
750 ::fidl_next::EncodeOption<
751 ::fidl_next::wire::Box<'static, crate::wire::SdmmcBufferRegion>,
752 ___E,
753 > for SdmmcBufferRegion
754 where
755 ___E: ::fidl_next::Encoder + ?Sized,
756 SdmmcBufferRegion: ::fidl_next::Encode<crate::wire::SdmmcBufferRegion, ___E>,
757 {
758 #[inline]
759 fn encode_option(
760 this: ::core::option::Option<Self>,
761 encoder: &mut ___E,
762 out: &mut ::core::mem::MaybeUninit<
763 ::fidl_next::wire::Box<'static, crate::wire::SdmmcBufferRegion>,
764 >,
765 _: (),
766 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
767 if let Some(inner) = this {
768 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
769 ::fidl_next::wire::Box::encode_present(out);
770 } else {
771 ::fidl_next::wire::Box::encode_absent(out);
772 }
773
774 Ok(())
775 }
776 }
777
778 impl ::fidl_next::FromWire<crate::wire::SdmmcBufferRegion> for SdmmcBufferRegion {
779 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
780 crate::wire::SdmmcBufferRegion,
781 Self,
782 > = unsafe {
783 ::fidl_next::CopyOptimization::enable_if(
784 true && <crate::natural::SdmmcBuffer as ::fidl_next::FromWire<
785 crate::wire::SdmmcBuffer,
786 >>::COPY_OPTIMIZATION
787 .is_enabled()
788 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
789 .is_enabled()
790 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
791 .is_enabled(),
792 )
793 };
794
795 #[inline]
796 fn from_wire(wire: crate::wire::SdmmcBufferRegion) -> Self {
797 Self {
798 buffer: ::fidl_next::FromWire::from_wire(wire.buffer),
799
800 offset: ::fidl_next::FromWire::from_wire(wire.offset),
801
802 size: ::fidl_next::FromWire::from_wire(wire.size),
803 }
804 }
805 }
806
807 #[derive(Debug, PartialEq)]
808 pub struct SdmmcReq {
809 pub cmd_idx: u32,
810
811 pub cmd_flags: u32,
812
813 pub arg: u32,
814
815 pub blocksize: u32,
816
817 pub suppress_error_messages: bool,
818
819 pub client_id: u8,
820
821 pub use_inline_crypto: bool,
822
823 pub slot: u8,
824
825 pub dun: u32,
826
827 pub buffers: ::std::vec::Vec<crate::natural::SdmmcBufferRegion>,
828 }
829
830 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcReq<'static>, ___E> for SdmmcReq
831 where
832 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
833 ___E: ::fidl_next::Encoder,
834 ___E: ::fidl_next::fuchsia::HandleEncoder,
835 {
836 #[inline]
837 fn encode(
838 self,
839 encoder_: &mut ___E,
840 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcReq<'static>>,
841 _: (),
842 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
843 ::fidl_next::munge! {
844 let crate::wire::SdmmcReq {
845 cmd_idx,
846 cmd_flags,
847 arg,
848 blocksize,
849 suppress_error_messages,
850 client_id,
851 use_inline_crypto,
852 slot,
853 dun,
854 buffers,
855
856 } = out_;
857 }
858
859 ::fidl_next::Encode::encode(self.cmd_idx, encoder_, cmd_idx, ())?;
860
861 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cmd_idx.as_mut_ptr()) };
862
863 ::fidl_next::Encode::encode(self.cmd_flags, encoder_, cmd_flags, ())?;
864
865 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cmd_flags.as_mut_ptr()) };
866
867 ::fidl_next::Encode::encode(self.arg, encoder_, arg, ())?;
868
869 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arg.as_mut_ptr()) };
870
871 ::fidl_next::Encode::encode(self.blocksize, encoder_, blocksize, ())?;
872
873 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(blocksize.as_mut_ptr()) };
874
875 ::fidl_next::Encode::encode(
876 self.suppress_error_messages,
877 encoder_,
878 suppress_error_messages,
879 (),
880 )?;
881
882 let mut _field =
883 unsafe { ::fidl_next::Slot::new_unchecked(suppress_error_messages.as_mut_ptr()) };
884
885 ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
886
887 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_id.as_mut_ptr()) };
888
889 ::fidl_next::Encode::encode(self.use_inline_crypto, encoder_, use_inline_crypto, ())?;
890
891 let mut _field =
892 unsafe { ::fidl_next::Slot::new_unchecked(use_inline_crypto.as_mut_ptr()) };
893
894 ::fidl_next::Encode::encode(self.slot, encoder_, slot, ())?;
895
896 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(slot.as_mut_ptr()) };
897
898 ::fidl_next::Encode::encode(self.dun, encoder_, dun, ())?;
899
900 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dun.as_mut_ptr()) };
901
902 ::fidl_next::Encode::encode(self.buffers, encoder_, buffers, (4294967295, ()))?;
903
904 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buffers.as_mut_ptr()) };
905 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
906
907 Ok(())
908 }
909 }
910
911 unsafe impl<___E>
912 ::fidl_next::EncodeOption<
913 ::fidl_next::wire::Box<'static, crate::wire::SdmmcReq<'static>>,
914 ___E,
915 > for SdmmcReq
916 where
917 ___E: ::fidl_next::Encoder + ?Sized,
918 SdmmcReq: ::fidl_next::Encode<crate::wire::SdmmcReq<'static>, ___E>,
919 {
920 #[inline]
921 fn encode_option(
922 this: ::core::option::Option<Self>,
923 encoder: &mut ___E,
924 out: &mut ::core::mem::MaybeUninit<
925 ::fidl_next::wire::Box<'static, crate::wire::SdmmcReq<'static>>,
926 >,
927 _: (),
928 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
929 if let Some(inner) = this {
930 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
931 ::fidl_next::wire::Box::encode_present(out);
932 } else {
933 ::fidl_next::wire::Box::encode_absent(out);
934 }
935
936 Ok(())
937 }
938 }
939
940 impl<'de> ::fidl_next::FromWire<crate::wire::SdmmcReq<'de>> for SdmmcReq {
941 #[inline]
942 fn from_wire(wire: crate::wire::SdmmcReq<'de>) -> Self {
943 Self {
944 cmd_idx: ::fidl_next::FromWire::from_wire(wire.cmd_idx),
945
946 cmd_flags: ::fidl_next::FromWire::from_wire(wire.cmd_flags),
947
948 arg: ::fidl_next::FromWire::from_wire(wire.arg),
949
950 blocksize: ::fidl_next::FromWire::from_wire(wire.blocksize),
951
952 suppress_error_messages: ::fidl_next::FromWire::from_wire(
953 wire.suppress_error_messages,
954 ),
955
956 client_id: ::fidl_next::FromWire::from_wire(wire.client_id),
957
958 use_inline_crypto: ::fidl_next::FromWire::from_wire(wire.use_inline_crypto),
959
960 slot: ::fidl_next::FromWire::from_wire(wire.slot),
961
962 dun: ::fidl_next::FromWire::from_wire(wire.dun),
963
964 buffers: ::fidl_next::FromWire::from_wire(wire.buffers),
965 }
966 }
967 }
968
969 #[derive(Debug, PartialEq)]
970 pub struct SdmmcRequestRequest {
971 pub reqs: ::std::vec::Vec<crate::natural::SdmmcReq>,
972 }
973
974 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcRequestRequest<'static>, ___E>
975 for SdmmcRequestRequest
976 where
977 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
978 ___E: ::fidl_next::Encoder,
979 ___E: ::fidl_next::fuchsia::HandleEncoder,
980 {
981 #[inline]
982 fn encode(
983 self,
984 encoder_: &mut ___E,
985 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRequestRequest<'static>>,
986 _: (),
987 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
988 ::fidl_next::munge! {
989 let crate::wire::SdmmcRequestRequest {
990 reqs,
991
992 } = out_;
993 }
994
995 ::fidl_next::Encode::encode(self.reqs, encoder_, reqs, (4294967295, ()))?;
996
997 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reqs.as_mut_ptr()) };
998 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
999
1000 Ok(())
1001 }
1002 }
1003
1004 unsafe impl<___E>
1005 ::fidl_next::EncodeOption<
1006 ::fidl_next::wire::Box<'static, crate::wire::SdmmcRequestRequest<'static>>,
1007 ___E,
1008 > for SdmmcRequestRequest
1009 where
1010 ___E: ::fidl_next::Encoder + ?Sized,
1011 SdmmcRequestRequest: ::fidl_next::Encode<crate::wire::SdmmcRequestRequest<'static>, ___E>,
1012 {
1013 #[inline]
1014 fn encode_option(
1015 this: ::core::option::Option<Self>,
1016 encoder: &mut ___E,
1017 out: &mut ::core::mem::MaybeUninit<
1018 ::fidl_next::wire::Box<'static, crate::wire::SdmmcRequestRequest<'static>>,
1019 >,
1020 _: (),
1021 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1022 if let Some(inner) = this {
1023 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1024 ::fidl_next::wire::Box::encode_present(out);
1025 } else {
1026 ::fidl_next::wire::Box::encode_absent(out);
1027 }
1028
1029 Ok(())
1030 }
1031 }
1032
1033 impl<'de> ::fidl_next::FromWire<crate::wire::SdmmcRequestRequest<'de>> for SdmmcRequestRequest {
1034 #[inline]
1035 fn from_wire(wire: crate::wire::SdmmcRequestRequest<'de>) -> Self {
1036 Self { reqs: ::fidl_next::FromWire::from_wire(wire.reqs) }
1037 }
1038 }
1039}
1040
1041pub mod wire {
1042
1043 pub use fidl_next_common_fuchsia_hardware_sdmmc::wire::*;
1044
1045 #[derive(Debug)]
1047 #[repr(C)]
1048 pub struct CqhciInitializeCommandQueueingRequest {
1049 pub virtual_interrupt: ::fidl_next::wire::fuchsia::Interrupt,
1050
1051 pub virtual_interrupt_lifeline: ::fidl_next::wire::fuchsia::EventPair,
1052 }
1053
1054 static_assertions::const_assert_eq!(
1055 std::mem::size_of::<CqhciInitializeCommandQueueingRequest>(),
1056 8
1057 );
1058 static_assertions::const_assert_eq!(
1059 std::mem::align_of::<CqhciInitializeCommandQueueingRequest>(),
1060 4
1061 );
1062
1063 static_assertions::const_assert_eq!(
1064 std::mem::offset_of!(CqhciInitializeCommandQueueingRequest, virtual_interrupt),
1065 0
1066 );
1067
1068 static_assertions::const_assert_eq!(
1069 std::mem::offset_of!(CqhciInitializeCommandQueueingRequest, virtual_interrupt_lifeline),
1070 4
1071 );
1072
1073 impl ::fidl_next::Constrained for CqhciInitializeCommandQueueingRequest {
1074 type Constraint = ();
1075
1076 fn validate(
1077 _: ::fidl_next::Slot<'_, Self>,
1078 _: Self::Constraint,
1079 ) -> Result<(), ::fidl_next::ValidationError> {
1080 Ok(())
1081 }
1082 }
1083
1084 unsafe impl ::fidl_next::Wire for CqhciInitializeCommandQueueingRequest {
1085 type Narrowed<'de> = CqhciInitializeCommandQueueingRequest;
1086
1087 #[inline]
1088 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1089 ::fidl_next::munge! {
1090 let Self {
1091 virtual_interrupt,
1092 virtual_interrupt_lifeline,
1093
1094 } = &mut *out_;
1095 }
1096
1097 ::fidl_next::Wire::zero_padding(virtual_interrupt);
1098
1099 ::fidl_next::Wire::zero_padding(virtual_interrupt_lifeline);
1100 }
1101 }
1102
1103 unsafe impl<___D> ::fidl_next::Decode<___D> for CqhciInitializeCommandQueueingRequest
1104 where
1105 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1106 ___D: ::fidl_next::fuchsia::HandleDecoder,
1107 {
1108 fn decode(
1109 slot_: ::fidl_next::Slot<'_, Self>,
1110 decoder_: &mut ___D,
1111 _: (),
1112 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1113 ::fidl_next::munge! {
1114 let Self {
1115 mut virtual_interrupt,
1116 mut virtual_interrupt_lifeline,
1117
1118 } = slot_;
1119 }
1120
1121 let _field = virtual_interrupt.as_mut();
1122
1123 ::fidl_next::Decode::decode(virtual_interrupt.as_mut(), decoder_, ())?;
1124
1125 let _field = virtual_interrupt_lifeline.as_mut();
1126
1127 ::fidl_next::Decode::decode(virtual_interrupt_lifeline.as_mut(), decoder_, ())?;
1128
1129 Ok(())
1130 }
1131 }
1132
1133 impl ::fidl_next::IntoNatural for CqhciInitializeCommandQueueingRequest {
1134 type Natural = crate::natural::CqhciInitializeCommandQueueingRequest;
1135 }
1136
1137 #[derive(Debug)]
1139 #[repr(C)]
1140 pub struct CqhciInitializeCommandQueueingResponse {
1141 pub cqhci_mmio: ::fidl_next::wire::fuchsia::Vmo,
1142
1143 pub cqhci_mmio_offset: ::fidl_next::wire::Uint64,
1144
1145 pub sdhci_mmio: ::fidl_next::wire::fuchsia::Vmo,
1146
1147 pub sdhci_mmio_offset: ::fidl_next::wire::Uint64,
1148
1149 pub bti: ::fidl_next::wire::fuchsia::Bti,
1150
1151 pub interrupt: ::fidl_next::wire::fuchsia::Interrupt,
1152 }
1153
1154 static_assertions::const_assert_eq!(
1155 std::mem::size_of::<CqhciInitializeCommandQueueingResponse>(),
1156 40
1157 );
1158 static_assertions::const_assert_eq!(
1159 std::mem::align_of::<CqhciInitializeCommandQueueingResponse>(),
1160 8
1161 );
1162
1163 static_assertions::const_assert_eq!(
1164 std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, cqhci_mmio),
1165 0
1166 );
1167
1168 static_assertions::const_assert_eq!(
1169 std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, cqhci_mmio_offset),
1170 8
1171 );
1172
1173 static_assertions::const_assert_eq!(
1174 std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, sdhci_mmio),
1175 16
1176 );
1177
1178 static_assertions::const_assert_eq!(
1179 std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, sdhci_mmio_offset),
1180 24
1181 );
1182
1183 static_assertions::const_assert_eq!(
1184 std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, bti),
1185 32
1186 );
1187
1188 static_assertions::const_assert_eq!(
1189 std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, interrupt),
1190 36
1191 );
1192
1193 impl ::fidl_next::Constrained for CqhciInitializeCommandQueueingResponse {
1194 type Constraint = ();
1195
1196 fn validate(
1197 _: ::fidl_next::Slot<'_, Self>,
1198 _: Self::Constraint,
1199 ) -> Result<(), ::fidl_next::ValidationError> {
1200 Ok(())
1201 }
1202 }
1203
1204 unsafe impl ::fidl_next::Wire for CqhciInitializeCommandQueueingResponse {
1205 type Narrowed<'de> = CqhciInitializeCommandQueueingResponse;
1206
1207 #[inline]
1208 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1209 ::fidl_next::munge! {
1210 let Self {
1211 cqhci_mmio,
1212 cqhci_mmio_offset,
1213 sdhci_mmio,
1214 sdhci_mmio_offset,
1215 bti,
1216 interrupt,
1217
1218 } = &mut *out_;
1219 }
1220
1221 ::fidl_next::Wire::zero_padding(cqhci_mmio);
1222
1223 ::fidl_next::Wire::zero_padding(cqhci_mmio_offset);
1224
1225 ::fidl_next::Wire::zero_padding(sdhci_mmio);
1226
1227 ::fidl_next::Wire::zero_padding(sdhci_mmio_offset);
1228
1229 ::fidl_next::Wire::zero_padding(bti);
1230
1231 ::fidl_next::Wire::zero_padding(interrupt);
1232
1233 unsafe {
1234 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
1235 }
1236
1237 unsafe {
1238 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1239 }
1240 }
1241 }
1242
1243 unsafe impl<___D> ::fidl_next::Decode<___D> for CqhciInitializeCommandQueueingResponse
1244 where
1245 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1246 ___D: ::fidl_next::fuchsia::HandleDecoder,
1247 {
1248 fn decode(
1249 slot_: ::fidl_next::Slot<'_, Self>,
1250 decoder_: &mut ___D,
1251 _: (),
1252 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1253 if slot_.as_bytes()[20..24] != [0u8; 4] {
1254 return Err(::fidl_next::DecodeError::InvalidPadding);
1255 }
1256
1257 if slot_.as_bytes()[4..8] != [0u8; 4] {
1258 return Err(::fidl_next::DecodeError::InvalidPadding);
1259 }
1260
1261 ::fidl_next::munge! {
1262 let Self {
1263 mut cqhci_mmio,
1264 mut cqhci_mmio_offset,
1265 mut sdhci_mmio,
1266 mut sdhci_mmio_offset,
1267 mut bti,
1268 mut interrupt,
1269
1270 } = slot_;
1271 }
1272
1273 let _field = cqhci_mmio.as_mut();
1274
1275 ::fidl_next::Decode::decode(cqhci_mmio.as_mut(), decoder_, ())?;
1276
1277 let _field = cqhci_mmio_offset.as_mut();
1278
1279 ::fidl_next::Decode::decode(cqhci_mmio_offset.as_mut(), decoder_, ())?;
1280
1281 let _field = sdhci_mmio.as_mut();
1282
1283 ::fidl_next::Decode::decode(sdhci_mmio.as_mut(), decoder_, ())?;
1284
1285 let _field = sdhci_mmio_offset.as_mut();
1286
1287 ::fidl_next::Decode::decode(sdhci_mmio_offset.as_mut(), decoder_, ())?;
1288
1289 let _field = bti.as_mut();
1290
1291 ::fidl_next::Decode::decode(bti.as_mut(), decoder_, ())?;
1292
1293 let _field = interrupt.as_mut();
1294
1295 ::fidl_next::Decode::decode(interrupt.as_mut(), decoder_, ())?;
1296
1297 Ok(())
1298 }
1299 }
1300
1301 impl ::fidl_next::IntoNatural for CqhciInitializeCommandQueueingResponse {
1302 type Natural = crate::natural::CqhciInitializeCommandQueueingResponse;
1303 }
1304
1305 #[derive(Debug)]
1307 #[repr(C)]
1308 pub struct SdmmcRegisterInBandInterruptRequest {
1309 pub interrupt_cb:
1310 ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>,
1311 }
1312
1313 static_assertions::const_assert_eq!(
1314 std::mem::size_of::<SdmmcRegisterInBandInterruptRequest>(),
1315 4
1316 );
1317 static_assertions::const_assert_eq!(
1318 std::mem::align_of::<SdmmcRegisterInBandInterruptRequest>(),
1319 4
1320 );
1321
1322 static_assertions::const_assert_eq!(
1323 std::mem::offset_of!(SdmmcRegisterInBandInterruptRequest, interrupt_cb),
1324 0
1325 );
1326
1327 impl ::fidl_next::Constrained for SdmmcRegisterInBandInterruptRequest {
1328 type Constraint = ();
1329
1330 fn validate(
1331 _: ::fidl_next::Slot<'_, Self>,
1332 _: Self::Constraint,
1333 ) -> Result<(), ::fidl_next::ValidationError> {
1334 Ok(())
1335 }
1336 }
1337
1338 unsafe impl ::fidl_next::Wire for SdmmcRegisterInBandInterruptRequest {
1339 type Narrowed<'de> = SdmmcRegisterInBandInterruptRequest;
1340
1341 #[inline]
1342 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1343 ::fidl_next::munge! {
1344 let Self {
1345 interrupt_cb,
1346
1347 } = &mut *out_;
1348 }
1349
1350 ::fidl_next::Wire::zero_padding(interrupt_cb);
1351 }
1352 }
1353
1354 unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcRegisterInBandInterruptRequest
1355 where
1356 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1357 ___D: ::fidl_next::fuchsia::HandleDecoder,
1358 {
1359 fn decode(
1360 slot_: ::fidl_next::Slot<'_, Self>,
1361 decoder_: &mut ___D,
1362 _: (),
1363 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1364 ::fidl_next::munge! {
1365 let Self {
1366 mut interrupt_cb,
1367
1368 } = slot_;
1369 }
1370
1371 let _field = interrupt_cb.as_mut();
1372
1373 ::fidl_next::Decode::decode(interrupt_cb.as_mut(), decoder_, ())?;
1374
1375 Ok(())
1376 }
1377 }
1378
1379 impl ::fidl_next::IntoNatural for SdmmcRegisterInBandInterruptRequest {
1380 type Natural = crate::natural::SdmmcRegisterInBandInterruptRequest;
1381 }
1382
1383 #[derive(Debug)]
1385 #[repr(C)]
1386 pub struct SdmmcRegisterVmoRequest {
1387 pub vmo_id: ::fidl_next::wire::Uint32,
1388
1389 pub client_id: u8,
1390
1391 pub vmo: ::fidl_next::wire::fuchsia::Vmo,
1392
1393 pub offset: ::fidl_next::wire::Uint64,
1394
1395 pub size: ::fidl_next::wire::Uint64,
1396
1397 pub vmo_rights: crate::wire::SdmmcVmoRight,
1398 }
1399
1400 static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcRegisterVmoRequest>(), 40);
1401 static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcRegisterVmoRequest>(), 8);
1402
1403 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRegisterVmoRequest, vmo_id), 0);
1404
1405 static_assertions::const_assert_eq!(
1406 std::mem::offset_of!(SdmmcRegisterVmoRequest, client_id),
1407 4
1408 );
1409
1410 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRegisterVmoRequest, vmo), 8);
1411
1412 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRegisterVmoRequest, offset), 16);
1413
1414 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRegisterVmoRequest, size), 24);
1415
1416 static_assertions::const_assert_eq!(
1417 std::mem::offset_of!(SdmmcRegisterVmoRequest, vmo_rights),
1418 32
1419 );
1420
1421 impl ::fidl_next::Constrained for SdmmcRegisterVmoRequest {
1422 type Constraint = ();
1423
1424 fn validate(
1425 _: ::fidl_next::Slot<'_, Self>,
1426 _: Self::Constraint,
1427 ) -> Result<(), ::fidl_next::ValidationError> {
1428 Ok(())
1429 }
1430 }
1431
1432 unsafe impl ::fidl_next::Wire for SdmmcRegisterVmoRequest {
1433 type Narrowed<'de> = SdmmcRegisterVmoRequest;
1434
1435 #[inline]
1436 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1437 ::fidl_next::munge! {
1438 let Self {
1439 vmo_id,
1440 client_id,
1441 vmo,
1442 offset,
1443 size,
1444 vmo_rights,
1445
1446 } = &mut *out_;
1447 }
1448
1449 ::fidl_next::Wire::zero_padding(vmo_id);
1450
1451 ::fidl_next::Wire::zero_padding(client_id);
1452
1453 ::fidl_next::Wire::zero_padding(vmo);
1454
1455 ::fidl_next::Wire::zero_padding(offset);
1456
1457 ::fidl_next::Wire::zero_padding(size);
1458
1459 ::fidl_next::Wire::zero_padding(vmo_rights);
1460
1461 unsafe {
1462 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
1463 }
1464
1465 unsafe {
1466 out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
1467 }
1468
1469 unsafe {
1470 out_.as_mut_ptr().cast::<u8>().add(5).write_bytes(0, 3);
1471 }
1472 }
1473 }
1474
1475 unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcRegisterVmoRequest
1476 where
1477 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1478 ___D: ::fidl_next::fuchsia::HandleDecoder,
1479 {
1480 fn decode(
1481 slot_: ::fidl_next::Slot<'_, Self>,
1482 decoder_: &mut ___D,
1483 _: (),
1484 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1485 if slot_.as_bytes()[36..40] != [0u8; 4] {
1486 return Err(::fidl_next::DecodeError::InvalidPadding);
1487 }
1488
1489 if slot_.as_bytes()[12..16] != [0u8; 4] {
1490 return Err(::fidl_next::DecodeError::InvalidPadding);
1491 }
1492
1493 if slot_.as_bytes()[5..8] != [0u8; 3] {
1494 return Err(::fidl_next::DecodeError::InvalidPadding);
1495 }
1496
1497 ::fidl_next::munge! {
1498 let Self {
1499 mut vmo_id,
1500 mut client_id,
1501 mut vmo,
1502 mut offset,
1503 mut size,
1504 mut vmo_rights,
1505
1506 } = slot_;
1507 }
1508
1509 let _field = vmo_id.as_mut();
1510
1511 ::fidl_next::Decode::decode(vmo_id.as_mut(), decoder_, ())?;
1512
1513 let _field = client_id.as_mut();
1514
1515 ::fidl_next::Decode::decode(client_id.as_mut(), decoder_, ())?;
1516
1517 let _field = vmo.as_mut();
1518
1519 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
1520
1521 let _field = offset.as_mut();
1522
1523 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
1524
1525 let _field = size.as_mut();
1526
1527 ::fidl_next::Decode::decode(size.as_mut(), decoder_, ())?;
1528
1529 let _field = vmo_rights.as_mut();
1530
1531 ::fidl_next::Decode::decode(vmo_rights.as_mut(), decoder_, ())?;
1532
1533 Ok(())
1534 }
1535 }
1536
1537 impl ::fidl_next::IntoNatural for SdmmcRegisterVmoRequest {
1538 type Natural = crate::natural::SdmmcRegisterVmoRequest;
1539 }
1540
1541 #[derive(Debug)]
1543 #[repr(C)]
1544 pub struct SdmmcUnregisterVmoResponse {
1545 pub vmo: ::fidl_next::wire::fuchsia::Vmo,
1546 }
1547
1548 static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcUnregisterVmoResponse>(), 4);
1549 static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcUnregisterVmoResponse>(), 4);
1550
1551 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcUnregisterVmoResponse, vmo), 0);
1552
1553 impl ::fidl_next::Constrained for SdmmcUnregisterVmoResponse {
1554 type Constraint = ();
1555
1556 fn validate(
1557 _: ::fidl_next::Slot<'_, Self>,
1558 _: Self::Constraint,
1559 ) -> Result<(), ::fidl_next::ValidationError> {
1560 Ok(())
1561 }
1562 }
1563
1564 unsafe impl ::fidl_next::Wire for SdmmcUnregisterVmoResponse {
1565 type Narrowed<'de> = SdmmcUnregisterVmoResponse;
1566
1567 #[inline]
1568 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1569 ::fidl_next::munge! {
1570 let Self {
1571 vmo,
1572
1573 } = &mut *out_;
1574 }
1575
1576 ::fidl_next::Wire::zero_padding(vmo);
1577 }
1578 }
1579
1580 unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcUnregisterVmoResponse
1581 where
1582 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1583 ___D: ::fidl_next::fuchsia::HandleDecoder,
1584 {
1585 fn decode(
1586 slot_: ::fidl_next::Slot<'_, Self>,
1587 decoder_: &mut ___D,
1588 _: (),
1589 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1590 ::fidl_next::munge! {
1591 let Self {
1592 mut vmo,
1593
1594 } = slot_;
1595 }
1596
1597 let _field = vmo.as_mut();
1598
1599 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
1600
1601 Ok(())
1602 }
1603 }
1604
1605 impl ::fidl_next::IntoNatural for SdmmcUnregisterVmoResponse {
1606 type Natural = crate::natural::SdmmcUnregisterVmoResponse;
1607 }
1608
1609 #[repr(transparent)]
1611 pub struct SdmmcBuffer {
1612 pub(crate) raw: ::fidl_next::wire::Union,
1613 pub(crate) _phantom: ::core::marker::PhantomData<()>,
1614 }
1615
1616 impl Drop for SdmmcBuffer {
1617 fn drop(&mut self) {
1618 match self.raw.ordinal() {
1619 1 => {
1620 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
1621 }
1622
1623 2 => {
1624 let _ = unsafe {
1625 self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
1626 };
1627 }
1628
1629 _ => unsafe { ::core::hint::unreachable_unchecked() },
1630 }
1631 }
1632 }
1633
1634 impl ::fidl_next::Constrained for SdmmcBuffer {
1635 type Constraint = ();
1636
1637 fn validate(
1638 _: ::fidl_next::Slot<'_, Self>,
1639 _: Self::Constraint,
1640 ) -> Result<(), ::fidl_next::ValidationError> {
1641 Ok(())
1642 }
1643 }
1644
1645 unsafe impl ::fidl_next::Wire for SdmmcBuffer {
1646 type Narrowed<'de> = SdmmcBuffer;
1647
1648 #[inline]
1649 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1650 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
1651 ::fidl_next::wire::Union::zero_padding(raw);
1652 }
1653 }
1654
1655 pub mod sdmmc_buffer {
1656 pub enum Ref<'de> {
1657 VmoId(&'de ::fidl_next::wire::Uint32),
1658
1659 Vmo(&'de ::fidl_next::wire::fuchsia::Vmo),
1660 }
1661 }
1662
1663 impl SdmmcBuffer {
1664 pub fn as_ref(&self) -> crate::wire::sdmmc_buffer::Ref<'_> {
1665 match self.raw.ordinal() {
1666 1 => crate::wire::sdmmc_buffer::Ref::VmoId(unsafe {
1667 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
1668 }),
1669
1670 2 => crate::wire::sdmmc_buffer::Ref::Vmo(unsafe {
1671 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
1672 }),
1673
1674 _ => unsafe { ::core::hint::unreachable_unchecked() },
1675 }
1676 }
1677 }
1678
1679 unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcBuffer
1680 where
1681 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1682 ___D: ::fidl_next::fuchsia::HandleDecoder,
1683 {
1684 fn decode(
1685 mut slot: ::fidl_next::Slot<'_, Self>,
1686 decoder: &mut ___D,
1687 _: (),
1688 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1689 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
1690 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
1691 1 => ::fidl_next::wire::Union::decode_as_static::<___D, ::fidl_next::wire::Uint32>(
1692 raw,
1693 decoder,
1694 (),
1695 )?,
1696
1697 2 => ::fidl_next::wire::Union::decode_as_static::<
1698 ___D,
1699 ::fidl_next::wire::fuchsia::Vmo,
1700 >(raw, decoder, ())?,
1701
1702 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
1703 }
1704
1705 Ok(())
1706 }
1707 }
1708
1709 impl ::core::fmt::Debug for SdmmcBuffer {
1710 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1711 match self.raw.ordinal() {
1712 1 => unsafe {
1713 self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
1714 },
1715 2 => unsafe {
1716 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>().fmt(f)
1717 },
1718 _ => unsafe { ::core::hint::unreachable_unchecked() },
1719 }
1720 }
1721 }
1722
1723 impl ::fidl_next::IntoNatural for SdmmcBuffer {
1724 type Natural = crate::natural::SdmmcBuffer;
1725 }
1726
1727 #[derive(Debug)]
1729 #[repr(C)]
1730 pub struct SdmmcBufferRegion {
1731 pub buffer: crate::wire::SdmmcBuffer,
1732
1733 pub offset: ::fidl_next::wire::Uint64,
1734
1735 pub size: ::fidl_next::wire::Uint64,
1736 }
1737
1738 static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcBufferRegion>(), 32);
1739 static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcBufferRegion>(), 8);
1740
1741 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcBufferRegion, buffer), 0);
1742
1743 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcBufferRegion, offset), 16);
1744
1745 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcBufferRegion, size), 24);
1746
1747 impl ::fidl_next::Constrained for SdmmcBufferRegion {
1748 type Constraint = ();
1749
1750 fn validate(
1751 _: ::fidl_next::Slot<'_, Self>,
1752 _: Self::Constraint,
1753 ) -> Result<(), ::fidl_next::ValidationError> {
1754 Ok(())
1755 }
1756 }
1757
1758 unsafe impl ::fidl_next::Wire for SdmmcBufferRegion {
1759 type Narrowed<'de> = SdmmcBufferRegion;
1760
1761 #[inline]
1762 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1763 ::fidl_next::munge! {
1764 let Self {
1765 buffer,
1766 offset,
1767 size,
1768
1769 } = &mut *out_;
1770 }
1771
1772 ::fidl_next::Wire::zero_padding(buffer);
1773
1774 ::fidl_next::Wire::zero_padding(offset);
1775
1776 ::fidl_next::Wire::zero_padding(size);
1777 }
1778 }
1779
1780 unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcBufferRegion
1781 where
1782 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1783 ___D: ::fidl_next::fuchsia::HandleDecoder,
1784 {
1785 fn decode(
1786 slot_: ::fidl_next::Slot<'_, Self>,
1787 decoder_: &mut ___D,
1788 _: (),
1789 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1790 ::fidl_next::munge! {
1791 let Self {
1792 mut buffer,
1793 mut offset,
1794 mut size,
1795
1796 } = slot_;
1797 }
1798
1799 let _field = buffer.as_mut();
1800
1801 ::fidl_next::Decode::decode(buffer.as_mut(), decoder_, ())?;
1802
1803 let _field = offset.as_mut();
1804
1805 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
1806
1807 let _field = size.as_mut();
1808
1809 ::fidl_next::Decode::decode(size.as_mut(), decoder_, ())?;
1810
1811 Ok(())
1812 }
1813 }
1814
1815 impl ::fidl_next::IntoNatural for SdmmcBufferRegion {
1816 type Natural = crate::natural::SdmmcBufferRegion;
1817 }
1818
1819 #[derive(Debug)]
1821 #[repr(C)]
1822 pub struct SdmmcReq<'de> {
1823 pub cmd_idx: ::fidl_next::wire::Uint32,
1824
1825 pub cmd_flags: ::fidl_next::wire::Uint32,
1826
1827 pub arg: ::fidl_next::wire::Uint32,
1828
1829 pub blocksize: ::fidl_next::wire::Uint32,
1830
1831 pub suppress_error_messages: bool,
1832
1833 pub client_id: u8,
1834
1835 pub use_inline_crypto: bool,
1836
1837 pub slot: u8,
1838
1839 pub dun: ::fidl_next::wire::Uint32,
1840
1841 pub buffers: ::fidl_next::wire::Vector<'de, crate::wire::SdmmcBufferRegion>,
1842 }
1843
1844 static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcReq<'_>>(), 40);
1845 static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcReq<'_>>(), 8);
1846
1847 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, cmd_idx), 0);
1848
1849 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, cmd_flags), 4);
1850
1851 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, arg), 8);
1852
1853 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, blocksize), 12);
1854
1855 static_assertions::const_assert_eq!(
1856 std::mem::offset_of!(SdmmcReq<'_>, suppress_error_messages),
1857 16
1858 );
1859
1860 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, client_id), 17);
1861
1862 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, use_inline_crypto), 18);
1863
1864 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, slot), 19);
1865
1866 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, dun), 20);
1867
1868 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, buffers), 24);
1869
1870 impl ::fidl_next::Constrained for SdmmcReq<'_> {
1871 type Constraint = ();
1872
1873 fn validate(
1874 _: ::fidl_next::Slot<'_, Self>,
1875 _: Self::Constraint,
1876 ) -> Result<(), ::fidl_next::ValidationError> {
1877 Ok(())
1878 }
1879 }
1880
1881 unsafe impl ::fidl_next::Wire for SdmmcReq<'static> {
1882 type Narrowed<'de> = SdmmcReq<'de>;
1883
1884 #[inline]
1885 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1886 ::fidl_next::munge! {
1887 let Self {
1888 cmd_idx,
1889 cmd_flags,
1890 arg,
1891 blocksize,
1892 suppress_error_messages,
1893 client_id,
1894 use_inline_crypto,
1895 slot,
1896 dun,
1897 buffers,
1898
1899 } = &mut *out_;
1900 }
1901
1902 ::fidl_next::Wire::zero_padding(cmd_idx);
1903
1904 ::fidl_next::Wire::zero_padding(cmd_flags);
1905
1906 ::fidl_next::Wire::zero_padding(arg);
1907
1908 ::fidl_next::Wire::zero_padding(blocksize);
1909
1910 ::fidl_next::Wire::zero_padding(suppress_error_messages);
1911
1912 ::fidl_next::Wire::zero_padding(client_id);
1913
1914 ::fidl_next::Wire::zero_padding(use_inline_crypto);
1915
1916 ::fidl_next::Wire::zero_padding(slot);
1917
1918 ::fidl_next::Wire::zero_padding(dun);
1919
1920 ::fidl_next::Wire::zero_padding(buffers);
1921 }
1922 }
1923
1924 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SdmmcReq<'de>
1925 where
1926 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1927 ___D: ::fidl_next::Decoder<'de>,
1928 ___D: ::fidl_next::fuchsia::HandleDecoder,
1929 {
1930 fn decode(
1931 slot_: ::fidl_next::Slot<'_, Self>,
1932 decoder_: &mut ___D,
1933 _: (),
1934 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1935 ::fidl_next::munge! {
1936 let Self {
1937 mut cmd_idx,
1938 mut cmd_flags,
1939 mut arg,
1940 mut blocksize,
1941 mut suppress_error_messages,
1942 mut client_id,
1943 mut use_inline_crypto,
1944 mut slot,
1945 mut dun,
1946 mut buffers,
1947
1948 } = slot_;
1949 }
1950
1951 let _field = cmd_idx.as_mut();
1952
1953 ::fidl_next::Decode::decode(cmd_idx.as_mut(), decoder_, ())?;
1954
1955 let _field = cmd_flags.as_mut();
1956
1957 ::fidl_next::Decode::decode(cmd_flags.as_mut(), decoder_, ())?;
1958
1959 let _field = arg.as_mut();
1960
1961 ::fidl_next::Decode::decode(arg.as_mut(), decoder_, ())?;
1962
1963 let _field = blocksize.as_mut();
1964
1965 ::fidl_next::Decode::decode(blocksize.as_mut(), decoder_, ())?;
1966
1967 let _field = suppress_error_messages.as_mut();
1968
1969 ::fidl_next::Decode::decode(suppress_error_messages.as_mut(), decoder_, ())?;
1970
1971 let _field = client_id.as_mut();
1972
1973 ::fidl_next::Decode::decode(client_id.as_mut(), decoder_, ())?;
1974
1975 let _field = use_inline_crypto.as_mut();
1976
1977 ::fidl_next::Decode::decode(use_inline_crypto.as_mut(), decoder_, ())?;
1978
1979 let _field = slot.as_mut();
1980
1981 ::fidl_next::Decode::decode(slot.as_mut(), decoder_, ())?;
1982
1983 let _field = dun.as_mut();
1984
1985 ::fidl_next::Decode::decode(dun.as_mut(), decoder_, ())?;
1986
1987 let _field = buffers.as_mut();
1988 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1989 ::fidl_next::Decode::decode(buffers.as_mut(), decoder_, (4294967295, ()))?;
1990
1991 Ok(())
1992 }
1993 }
1994
1995 impl<'de> ::fidl_next::IntoNatural for SdmmcReq<'de> {
1996 type Natural = crate::natural::SdmmcReq;
1997 }
1998
1999 #[derive(Debug)]
2001 #[repr(C)]
2002 pub struct SdmmcRequestRequest<'de> {
2003 pub reqs: ::fidl_next::wire::Vector<'de, crate::wire::SdmmcReq<'de>>,
2004 }
2005
2006 static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcRequestRequest<'_>>(), 16);
2007 static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcRequestRequest<'_>>(), 8);
2008
2009 static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRequestRequest<'_>, reqs), 0);
2010
2011 impl ::fidl_next::Constrained for SdmmcRequestRequest<'_> {
2012 type Constraint = ();
2013
2014 fn validate(
2015 _: ::fidl_next::Slot<'_, Self>,
2016 _: Self::Constraint,
2017 ) -> Result<(), ::fidl_next::ValidationError> {
2018 Ok(())
2019 }
2020 }
2021
2022 unsafe impl ::fidl_next::Wire for SdmmcRequestRequest<'static> {
2023 type Narrowed<'de> = SdmmcRequestRequest<'de>;
2024
2025 #[inline]
2026 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2027 ::fidl_next::munge! {
2028 let Self {
2029 reqs,
2030
2031 } = &mut *out_;
2032 }
2033
2034 ::fidl_next::Wire::zero_padding(reqs);
2035 }
2036 }
2037
2038 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SdmmcRequestRequest<'de>
2039 where
2040 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2041 ___D: ::fidl_next::Decoder<'de>,
2042 ___D: ::fidl_next::fuchsia::HandleDecoder,
2043 {
2044 fn decode(
2045 slot_: ::fidl_next::Slot<'_, Self>,
2046 decoder_: &mut ___D,
2047 _: (),
2048 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2049 ::fidl_next::munge! {
2050 let Self {
2051 mut reqs,
2052
2053 } = slot_;
2054 }
2055
2056 let _field = reqs.as_mut();
2057 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2058 ::fidl_next::Decode::decode(reqs.as_mut(), decoder_, (4294967295, ()))?;
2059
2060 Ok(())
2061 }
2062 }
2063
2064 impl<'de> ::fidl_next::IntoNatural for SdmmcRequestRequest<'de> {
2065 type Natural = crate::natural::SdmmcRequestRequest;
2066 }
2067}
2068
2069pub mod wire_optional {
2070
2071 pub use fidl_next_common_fuchsia_hardware_sdmmc::wire_optional::*;
2072
2073 #[repr(transparent)]
2074 pub struct SdmmcBuffer {
2075 pub(crate) raw: ::fidl_next::wire::Union,
2076 pub(crate) _phantom: ::core::marker::PhantomData<()>,
2077 }
2078
2079 impl ::fidl_next::Constrained for SdmmcBuffer {
2080 type Constraint = ();
2081
2082 fn validate(
2083 _: ::fidl_next::Slot<'_, Self>,
2084 _: Self::Constraint,
2085 ) -> Result<(), ::fidl_next::ValidationError> {
2086 Ok(())
2087 }
2088 }
2089
2090 unsafe impl ::fidl_next::Wire for SdmmcBuffer {
2091 type Narrowed<'de> = SdmmcBuffer;
2092
2093 #[inline]
2094 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2095 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2096 ::fidl_next::wire::Union::zero_padding(raw);
2097 }
2098 }
2099
2100 impl SdmmcBuffer {
2101 pub fn is_some(&self) -> bool {
2102 self.raw.is_some()
2103 }
2104
2105 pub fn is_none(&self) -> bool {
2106 self.raw.is_none()
2107 }
2108
2109 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SdmmcBuffer> {
2110 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
2111 }
2112
2113 pub fn into_option(self) -> ::core::option::Option<crate::wire::SdmmcBuffer> {
2114 if self.is_some() {
2115 Some(crate::wire::SdmmcBuffer {
2116 raw: self.raw,
2117 _phantom: ::core::marker::PhantomData,
2118 })
2119 } else {
2120 None
2121 }
2122 }
2123 }
2124
2125 unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcBuffer
2126 where
2127 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2128 ___D: ::fidl_next::fuchsia::HandleDecoder,
2129 {
2130 fn decode(
2131 mut slot: ::fidl_next::Slot<'_, Self>,
2132 decoder: &mut ___D,
2133 _: (),
2134 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2135 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2136 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2137 1 => ::fidl_next::wire::Union::decode_as_static::<___D, ::fidl_next::wire::Uint32>(
2138 raw,
2139 decoder,
2140 (),
2141 )?,
2142
2143 2 => ::fidl_next::wire::Union::decode_as_static::<
2144 ___D,
2145 ::fidl_next::wire::fuchsia::Vmo,
2146 >(raw, decoder, ())?,
2147
2148 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
2149 _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
2150 }
2151
2152 Ok(())
2153 }
2154 }
2155
2156 impl ::core::fmt::Debug for SdmmcBuffer {
2157 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2158 self.as_ref().fmt(f)
2159 }
2160 }
2161
2162 impl ::fidl_next::IntoNatural for SdmmcBuffer {
2163 type Natural = ::core::option::Option<crate::natural::SdmmcBuffer>;
2164 }
2165}
2166
2167pub mod generic {
2168
2169 pub use fidl_next_common_fuchsia_hardware_sdmmc::generic::*;
2170
2171 pub struct CqhciInitializeCommandQueueingRequest<T0, T1> {
2173 pub virtual_interrupt: T0,
2174
2175 pub virtual_interrupt_lifeline: T1,
2176 }
2177
2178 unsafe impl<___E, T0, T1>
2179 ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingRequest, ___E>
2180 for CqhciInitializeCommandQueueingRequest<T0, T1>
2181 where
2182 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2183 ___E: ::fidl_next::fuchsia::HandleEncoder,
2184 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Interrupt, ___E>,
2185 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
2186 {
2187 #[inline]
2188 fn encode(
2189 self,
2190 encoder_: &mut ___E,
2191 out_: &mut ::core::mem::MaybeUninit<crate::wire::CqhciInitializeCommandQueueingRequest>,
2192 _: (),
2193 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2194 ::fidl_next::munge! {
2195 let crate::wire::CqhciInitializeCommandQueueingRequest {
2196 virtual_interrupt,
2197 virtual_interrupt_lifeline,
2198
2199 } = out_;
2200 }
2201
2202 ::fidl_next::Encode::encode(self.virtual_interrupt, encoder_, virtual_interrupt, ())?;
2203
2204 ::fidl_next::Encode::encode(
2205 self.virtual_interrupt_lifeline,
2206 encoder_,
2207 virtual_interrupt_lifeline,
2208 (),
2209 )?;
2210
2211 Ok(())
2212 }
2213 }
2214
2215 pub struct CqhciInitializeCommandQueueingResponse<T0, T1, T2, T3, T4, T5> {
2217 pub cqhci_mmio: T0,
2218
2219 pub cqhci_mmio_offset: T1,
2220
2221 pub sdhci_mmio: T2,
2222
2223 pub sdhci_mmio_offset: T3,
2224
2225 pub bti: T4,
2226
2227 pub interrupt: T5,
2228 }
2229
2230 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
2231 ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingResponse, ___E>
2232 for CqhciInitializeCommandQueueingResponse<T0, T1, T2, T3, T4, T5>
2233 where
2234 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2235 ___E: ::fidl_next::fuchsia::HandleEncoder,
2236 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2237 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2238 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2239 T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2240 T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Bti, ___E>,
2241 T5: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Interrupt, ___E>,
2242 {
2243 #[inline]
2244 fn encode(
2245 self,
2246 encoder_: &mut ___E,
2247 out_: &mut ::core::mem::MaybeUninit<
2248 crate::wire::CqhciInitializeCommandQueueingResponse,
2249 >,
2250 _: (),
2251 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2252 ::fidl_next::munge! {
2253 let crate::wire::CqhciInitializeCommandQueueingResponse {
2254 cqhci_mmio,
2255 cqhci_mmio_offset,
2256 sdhci_mmio,
2257 sdhci_mmio_offset,
2258 bti,
2259 interrupt,
2260
2261 } = out_;
2262 }
2263
2264 ::fidl_next::Encode::encode(self.cqhci_mmio, encoder_, cqhci_mmio, ())?;
2265
2266 ::fidl_next::Encode::encode(self.cqhci_mmio_offset, encoder_, cqhci_mmio_offset, ())?;
2267
2268 ::fidl_next::Encode::encode(self.sdhci_mmio, encoder_, sdhci_mmio, ())?;
2269
2270 ::fidl_next::Encode::encode(self.sdhci_mmio_offset, encoder_, sdhci_mmio_offset, ())?;
2271
2272 ::fidl_next::Encode::encode(self.bti, encoder_, bti, ())?;
2273
2274 ::fidl_next::Encode::encode(self.interrupt, encoder_, interrupt, ())?;
2275
2276 Ok(())
2277 }
2278 }
2279
2280 pub struct SdmmcRegisterInBandInterruptRequest<T0> {
2282 pub interrupt_cb: T0,
2283 }
2284
2285 unsafe impl<___E, T0>
2286 ::fidl_next::Encode<crate::wire::SdmmcRegisterInBandInterruptRequest, ___E>
2287 for SdmmcRegisterInBandInterruptRequest<T0>
2288 where
2289 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2290 ___E: ::fidl_next::fuchsia::HandleEncoder,
2291 T0: ::fidl_next::Encode<
2292 ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>,
2293 ___E,
2294 >,
2295 {
2296 #[inline]
2297 fn encode(
2298 self,
2299 encoder_: &mut ___E,
2300 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRegisterInBandInterruptRequest>,
2301 _: (),
2302 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2303 ::fidl_next::munge! {
2304 let crate::wire::SdmmcRegisterInBandInterruptRequest {
2305 interrupt_cb,
2306
2307 } = out_;
2308 }
2309
2310 ::fidl_next::Encode::encode(self.interrupt_cb, encoder_, interrupt_cb, ())?;
2311
2312 Ok(())
2313 }
2314 }
2315
2316 pub struct SdmmcRegisterVmoRequest<T0, T1, T2, T3, T4, T5> {
2318 pub vmo_id: T0,
2319
2320 pub client_id: T1,
2321
2322 pub vmo: T2,
2323
2324 pub offset: T3,
2325
2326 pub size: T4,
2327
2328 pub vmo_rights: T5,
2329 }
2330
2331 unsafe impl<___E, T0, T1, T2, T3, T4, T5>
2332 ::fidl_next::Encode<crate::wire::SdmmcRegisterVmoRequest, ___E>
2333 for SdmmcRegisterVmoRequest<T0, T1, T2, T3, T4, T5>
2334 where
2335 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2336 ___E: ::fidl_next::fuchsia::HandleEncoder,
2337 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2338 T1: ::fidl_next::Encode<u8, ___E>,
2339 T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2340 T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2341 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2342 T5: ::fidl_next::Encode<crate::wire::SdmmcVmoRight, ___E>,
2343 {
2344 #[inline]
2345 fn encode(
2346 self,
2347 encoder_: &mut ___E,
2348 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRegisterVmoRequest>,
2349 _: (),
2350 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2351 ::fidl_next::munge! {
2352 let crate::wire::SdmmcRegisterVmoRequest {
2353 vmo_id,
2354 client_id,
2355 vmo,
2356 offset,
2357 size,
2358 vmo_rights,
2359
2360 } = out_;
2361 }
2362
2363 ::fidl_next::Encode::encode(self.vmo_id, encoder_, vmo_id, ())?;
2364
2365 ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
2366
2367 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
2368
2369 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
2370
2371 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
2372
2373 ::fidl_next::Encode::encode(self.vmo_rights, encoder_, vmo_rights, ())?;
2374
2375 Ok(())
2376 }
2377 }
2378
2379 pub struct SdmmcUnregisterVmoResponse<T0> {
2381 pub vmo: T0,
2382 }
2383
2384 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoResponse, ___E>
2385 for SdmmcUnregisterVmoResponse<T0>
2386 where
2387 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2388 ___E: ::fidl_next::fuchsia::HandleEncoder,
2389 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2390 {
2391 #[inline]
2392 fn encode(
2393 self,
2394 encoder_: &mut ___E,
2395 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcUnregisterVmoResponse>,
2396 _: (),
2397 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2398 ::fidl_next::munge! {
2399 let crate::wire::SdmmcUnregisterVmoResponse {
2400 vmo,
2401
2402 } = out_;
2403 }
2404
2405 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
2406
2407 Ok(())
2408 }
2409 }
2410
2411 pub struct SdmmcBufferRegion<T0, T1, T2> {
2413 pub buffer: T0,
2414
2415 pub offset: T1,
2416
2417 pub size: T2,
2418 }
2419
2420 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::SdmmcBufferRegion, ___E>
2421 for SdmmcBufferRegion<T0, T1, T2>
2422 where
2423 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2424 ___E: ::fidl_next::fuchsia::HandleEncoder,
2425 T0: ::fidl_next::Encode<crate::wire::SdmmcBuffer, ___E>,
2426 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2427 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2428 {
2429 #[inline]
2430 fn encode(
2431 self,
2432 encoder_: &mut ___E,
2433 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcBufferRegion>,
2434 _: (),
2435 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2436 ::fidl_next::munge! {
2437 let crate::wire::SdmmcBufferRegion {
2438 buffer,
2439 offset,
2440 size,
2441
2442 } = out_;
2443 }
2444
2445 ::fidl_next::Encode::encode(self.buffer, encoder_, buffer, ())?;
2446
2447 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
2448
2449 ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
2450
2451 Ok(())
2452 }
2453 }
2454
2455 pub struct SdmmcReq<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> {
2457 pub cmd_idx: T0,
2458
2459 pub cmd_flags: T1,
2460
2461 pub arg: T2,
2462
2463 pub blocksize: T3,
2464
2465 pub suppress_error_messages: T4,
2466
2467 pub client_id: T5,
2468
2469 pub use_inline_crypto: T6,
2470
2471 pub slot: T7,
2472
2473 pub dun: T8,
2474
2475 pub buffers: T9,
2476 }
2477
2478 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
2479 ::fidl_next::Encode<crate::wire::SdmmcReq<'static>, ___E>
2480 for SdmmcReq<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
2481 where
2482 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2483 ___E: ::fidl_next::Encoder,
2484 ___E: ::fidl_next::fuchsia::HandleEncoder,
2485 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2486 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2487 T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2488 T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2489 T4: ::fidl_next::Encode<bool, ___E>,
2490 T5: ::fidl_next::Encode<u8, ___E>,
2491 T6: ::fidl_next::Encode<bool, ___E>,
2492 T7: ::fidl_next::Encode<u8, ___E>,
2493 T8: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2494 T9: ::fidl_next::Encode<
2495 ::fidl_next::wire::Vector<'static, crate::wire::SdmmcBufferRegion>,
2496 ___E,
2497 >,
2498 {
2499 #[inline]
2500 fn encode(
2501 self,
2502 encoder_: &mut ___E,
2503 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcReq<'static>>,
2504 _: (),
2505 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2506 ::fidl_next::munge! {
2507 let crate::wire::SdmmcReq {
2508 cmd_idx,
2509 cmd_flags,
2510 arg,
2511 blocksize,
2512 suppress_error_messages,
2513 client_id,
2514 use_inline_crypto,
2515 slot,
2516 dun,
2517 buffers,
2518
2519 } = out_;
2520 }
2521
2522 ::fidl_next::Encode::encode(self.cmd_idx, encoder_, cmd_idx, ())?;
2523
2524 ::fidl_next::Encode::encode(self.cmd_flags, encoder_, cmd_flags, ())?;
2525
2526 ::fidl_next::Encode::encode(self.arg, encoder_, arg, ())?;
2527
2528 ::fidl_next::Encode::encode(self.blocksize, encoder_, blocksize, ())?;
2529
2530 ::fidl_next::Encode::encode(
2531 self.suppress_error_messages,
2532 encoder_,
2533 suppress_error_messages,
2534 (),
2535 )?;
2536
2537 ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
2538
2539 ::fidl_next::Encode::encode(self.use_inline_crypto, encoder_, use_inline_crypto, ())?;
2540
2541 ::fidl_next::Encode::encode(self.slot, encoder_, slot, ())?;
2542
2543 ::fidl_next::Encode::encode(self.dun, encoder_, dun, ())?;
2544
2545 ::fidl_next::Encode::encode(self.buffers, encoder_, buffers, (4294967295, ()))?;
2546
2547 Ok(())
2548 }
2549 }
2550
2551 pub struct SdmmcRequestRequest<T0> {
2553 pub reqs: T0,
2554 }
2555
2556 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcRequestRequest<'static>, ___E>
2557 for SdmmcRequestRequest<T0>
2558 where
2559 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2560 ___E: ::fidl_next::Encoder,
2561 ___E: ::fidl_next::fuchsia::HandleEncoder,
2562 T0: ::fidl_next::Encode<
2563 ::fidl_next::wire::Vector<'static, crate::wire::SdmmcReq<'static>>,
2564 ___E,
2565 >,
2566 {
2567 #[inline]
2568 fn encode(
2569 self,
2570 encoder_: &mut ___E,
2571 out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRequestRequest<'static>>,
2572 _: (),
2573 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2574 ::fidl_next::munge! {
2575 let crate::wire::SdmmcRequestRequest {
2576 reqs,
2577
2578 } = out_;
2579 }
2580
2581 ::fidl_next::Encode::encode(self.reqs, encoder_, reqs, (4294967295, ()))?;
2582
2583 Ok(())
2584 }
2585 }
2586}
2587
2588pub use self::natural::*;
2589
2590#[derive(PartialEq, Debug)]
2592pub struct Cqhci;
2593
2594#[cfg(feature = "driver")]
2595impl ::fidl_next::HasTransport for Cqhci {
2596 type Transport = ::fdf_fidl::DriverChannel;
2597}
2598
2599pub mod cqhci {
2600 pub mod prelude {
2601 pub use crate::{
2602 Cqhci, CqhciClientHandler, CqhciLocalClientHandler, CqhciLocalServerHandler,
2603 CqhciServerHandler, cqhci,
2604 };
2605
2606 pub use crate::natural::CqhciInitializeCommandQueueingRequest;
2607
2608 pub use crate::natural::CqhciDisableCqhciResponse;
2609
2610 pub use crate::natural::CqhciEnableCqhciResponse;
2611
2612 pub use crate::natural::CqhciInitializeCommandQueueingResponse;
2613 }
2614
2615 pub struct InitializeCommandQueueing;
2616
2617 impl ::fidl_next::Method for InitializeCommandQueueing {
2618 const ORDINAL: u64 = 359559202570093266;
2619 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2620 ::fidl_next::protocol::Flexibility::Strict;
2621
2622 type Protocol = crate::Cqhci;
2623
2624 type Request = crate::wire::CqhciInitializeCommandQueueingRequest;
2625 }
2626
2627 impl ::fidl_next::TwoWayMethod for InitializeCommandQueueing {
2628 type Response = ::fidl_next::wire::Result<
2629 'static,
2630 crate::wire::CqhciInitializeCommandQueueingResponse,
2631 ::fidl_next::wire::Int32,
2632 >;
2633 }
2634
2635 impl<___R> ::fidl_next::Respond<___R> for InitializeCommandQueueing {
2636 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
2637
2638 fn respond(response: ___R) -> Self::Output {
2639 ::core::result::Result::Ok(response)
2640 }
2641 }
2642
2643 impl<___R> ::fidl_next::RespondErr<___R> for InitializeCommandQueueing {
2644 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
2645
2646 fn respond_err(response: ___R) -> Self::Output {
2647 ::core::result::Result::Err(response)
2648 }
2649 }
2650
2651 pub struct EnableCqhci;
2652
2653 impl ::fidl_next::Method for EnableCqhci {
2654 const ORDINAL: u64 = 7267012061448928954;
2655 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2656 ::fidl_next::protocol::Flexibility::Strict;
2657
2658 type Protocol = crate::Cqhci;
2659
2660 type Request = ::fidl_next::wire::EmptyMessageBody;
2661 }
2662
2663 impl ::fidl_next::TwoWayMethod for EnableCqhci {
2664 type Response = ::fidl_next::wire::Result<
2665 'static,
2666 crate::wire::CqhciEnableCqhciResponse,
2667 ::fidl_next::wire::Int32,
2668 >;
2669 }
2670
2671 impl<___R> ::fidl_next::Respond<___R> for EnableCqhci {
2672 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
2673
2674 fn respond(response: ___R) -> Self::Output {
2675 ::core::result::Result::Ok(response)
2676 }
2677 }
2678
2679 impl<___R> ::fidl_next::RespondErr<___R> for EnableCqhci {
2680 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
2681
2682 fn respond_err(response: ___R) -> Self::Output {
2683 ::core::result::Result::Err(response)
2684 }
2685 }
2686
2687 pub struct DisableCqhci;
2688
2689 impl ::fidl_next::Method for DisableCqhci {
2690 const ORDINAL: u64 = 4177196635683073751;
2691 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2692 ::fidl_next::protocol::Flexibility::Strict;
2693
2694 type Protocol = crate::Cqhci;
2695
2696 type Request = ::fidl_next::wire::EmptyMessageBody;
2697 }
2698
2699 impl ::fidl_next::TwoWayMethod for DisableCqhci {
2700 type Response = ::fidl_next::wire::Result<
2701 'static,
2702 crate::wire::CqhciDisableCqhciResponse,
2703 ::fidl_next::wire::Int32,
2704 >;
2705 }
2706
2707 impl<___R> ::fidl_next::Respond<___R> for DisableCqhci {
2708 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
2709
2710 fn respond(response: ___R) -> Self::Output {
2711 ::core::result::Result::Ok(response)
2712 }
2713 }
2714
2715 impl<___R> ::fidl_next::RespondErr<___R> for DisableCqhci {
2716 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
2717
2718 fn respond_err(response: ___R) -> Self::Output {
2719 ::core::result::Result::Err(response)
2720 }
2721 }
2722
2723 mod ___detail {
2724 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Cqhci
2725 where
2726 ___T: ::fidl_next::Transport,
2727 {
2728 type Client = CqhciClient<___T>;
2729 type Server = CqhciServer<___T>;
2730 }
2731
2732 #[repr(transparent)]
2734 pub struct CqhciClient<___T: ::fidl_next::Transport> {
2735 #[allow(dead_code)]
2736 client: ::fidl_next::protocol::Client<___T>,
2737 }
2738
2739 impl<___T> CqhciClient<___T>
2740 where
2741 ___T: ::fidl_next::Transport,
2742 {
2743 #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once. The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts. Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`. The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt. The CQHCI\n driver will destroy the peer end upon shutdown, which should be handled by the server as a\n signal to stop monitoring the virtual interrupt and return to monitoring the physical\n interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
2744 pub fn initialize_command_queueing(
2745 &self,
2746
2747 virtual_interrupt: impl ::fidl_next::Encode<
2748 ::fidl_next::wire::fuchsia::Interrupt,
2749 <___T as ::fidl_next::Transport>::SendBuffer,
2750 >,
2751
2752 virtual_interrupt_lifeline: impl ::fidl_next::Encode<
2753 ::fidl_next::wire::fuchsia::EventPair,
2754 <___T as ::fidl_next::Transport>::SendBuffer,
2755 >,
2756 ) -> ::fidl_next::TwoWayFuture<'_, super::InitializeCommandQueueing, ___T>
2757 where
2758 <___T as ::fidl_next::Transport>::SendBuffer:
2759 ::fidl_next::encoder::InternalHandleEncoder,
2760 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2761 {
2762 self.initialize_command_queueing_with(
2763 crate::generic::CqhciInitializeCommandQueueingRequest {
2764 virtual_interrupt,
2765
2766 virtual_interrupt_lifeline,
2767 },
2768 )
2769 }
2770
2771 #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once. The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts. Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`. The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt. The CQHCI\n driver will destroy the peer end upon shutdown, which should be handled by the server as a\n signal to stop monitoring the virtual interrupt and return to monitoring the physical\n interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
2772 pub fn initialize_command_queueing_with<___R>(
2773 &self,
2774 request: ___R,
2775 ) -> ::fidl_next::TwoWayFuture<'_, super::InitializeCommandQueueing, ___T>
2776 where
2777 ___R: ::fidl_next::Encode<
2778 crate::wire::CqhciInitializeCommandQueueingRequest,
2779 <___T as ::fidl_next::Transport>::SendBuffer,
2780 >,
2781 {
2782 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2783 359559202570093266,
2784 <super::InitializeCommandQueueing as ::fidl_next::Method>::FLEXIBILITY,
2785 request,
2786 ))
2787 }
2788
2789 #[doc = " Enables the Command Queueing Engine. The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
2790 pub fn enable_cqhci(&self) -> ::fidl_next::TwoWayFuture<'_, super::EnableCqhci, ___T> {
2791 ::fidl_next::TwoWayFuture::from_untyped(
2792 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2793 7267012061448928954,
2794 <super::EnableCqhci as ::fidl_next::Method>::FLEXIBILITY,
2795 (),
2796 ),
2797 )
2798 }
2799
2800 #[doc = " Disables the Command Queueing Engine. `EnableCqhci` must have previously been called. From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
2801 pub fn disable_cqhci(
2802 &self,
2803 ) -> ::fidl_next::TwoWayFuture<'_, super::DisableCqhci, ___T> {
2804 ::fidl_next::TwoWayFuture::from_untyped(
2805 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2806 4177196635683073751,
2807 <super::DisableCqhci as ::fidl_next::Method>::FLEXIBILITY,
2808 (),
2809 ),
2810 )
2811 }
2812 }
2813
2814 #[repr(transparent)]
2816 pub struct CqhciServer<___T: ::fidl_next::Transport> {
2817 server: ::fidl_next::protocol::Server<___T>,
2818 }
2819
2820 impl<___T> CqhciServer<___T> where ___T: ::fidl_next::Transport {}
2821 }
2822}
2823
2824#[diagnostic::on_unimplemented(
2825 note = "If {Self} implements the non-local CqhciClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2826)]
2827
2828pub trait CqhciLocalClientHandler<
2832 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2833 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2834>
2835{
2836}
2837
2838impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Cqhci
2839where
2840 ___H: CqhciLocalClientHandler<___T>,
2841 ___T: ::fidl_next::Transport,
2842{
2843 async fn on_event(
2844 handler: &mut ___H,
2845 ordinal: u64,
2846 flexibility: ::fidl_next::protocol::Flexibility,
2847 body: ::fidl_next::Body<___T>,
2848 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2849 match ordinal {
2850 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2851 }
2852 }
2853}
2854
2855#[diagnostic::on_unimplemented(
2856 note = "If {Self} implements the non-local CqhciServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2857)]
2858
2859pub trait CqhciLocalServerHandler<
2863 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2864 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2865>
2866{
2867 #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once. The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts. Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`. The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt. The CQHCI\n driver will destroy the peer end upon shutdown, which should be handled by the server as a\n signal to stop monitoring the virtual interrupt and return to monitoring the physical\n interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
2868 fn initialize_command_queueing(
2869 &mut self,
2870
2871 request: ::fidl_next::Request<cqhci::InitializeCommandQueueing, ___T>,
2872
2873 responder: ::fidl_next::Responder<cqhci::InitializeCommandQueueing, ___T>,
2874 ) -> impl ::core::future::Future<Output = ()>;
2875
2876 #[doc = " Enables the Command Queueing Engine. The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
2877 fn enable_cqhci(
2878 &mut self,
2879
2880 responder: ::fidl_next::Responder<cqhci::EnableCqhci, ___T>,
2881 ) -> impl ::core::future::Future<Output = ()>;
2882
2883 #[doc = " Disables the Command Queueing Engine. `EnableCqhci` must have previously been called. From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
2884 fn disable_cqhci(
2885 &mut self,
2886
2887 responder: ::fidl_next::Responder<cqhci::DisableCqhci, ___T>,
2888 ) -> impl ::core::future::Future<Output = ()>;
2889}
2890
2891impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Cqhci
2892where
2893 ___H: CqhciLocalServerHandler<___T>,
2894 ___T: ::fidl_next::Transport,
2895 for<'de> crate::wire::CqhciInitializeCommandQueueingRequest: ::fidl_next::Decode<
2896 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2897 Constraint = (),
2898 >,
2899{
2900 async fn on_one_way(
2901 handler: &mut ___H,
2902 ordinal: u64,
2903 flexibility: ::fidl_next::protocol::Flexibility,
2904 body: ::fidl_next::Body<___T>,
2905 ) -> ::core::result::Result<
2906 (),
2907 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2908 > {
2909 match ordinal {
2910 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2911 }
2912 }
2913
2914 async fn on_two_way(
2915 handler: &mut ___H,
2916 ordinal: u64,
2917 flexibility: ::fidl_next::protocol::Flexibility,
2918 body: ::fidl_next::Body<___T>,
2919 responder: ::fidl_next::protocol::Responder<___T>,
2920 ) -> ::core::result::Result<
2921 (),
2922 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2923 > {
2924 match ordinal {
2925 359559202570093266 => {
2926 let responder = ::fidl_next::Responder::from_untyped(responder);
2927
2928 match ::fidl_next::AsDecoderExt::into_decoded(body) {
2929 Ok(decoded) => {
2930 handler
2931 .initialize_command_queueing(
2932 ::fidl_next::Request::from_decoded(decoded),
2933 responder,
2934 )
2935 .await;
2936 Ok(())
2937 }
2938 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2939 ordinal: 359559202570093266,
2940 error,
2941 }),
2942 }
2943 }
2944
2945 7267012061448928954 => {
2946 let responder = ::fidl_next::Responder::from_untyped(responder);
2947
2948 handler.enable_cqhci(responder).await;
2949 Ok(())
2950 }
2951
2952 4177196635683073751 => {
2953 let responder = ::fidl_next::Responder::from_untyped(responder);
2954
2955 handler.disable_cqhci(responder).await;
2956 Ok(())
2957 }
2958
2959 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2960 }
2961 }
2962}
2963
2964pub trait CqhciClientHandler<
2968 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2969 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2970>
2971{
2972}
2973
2974impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Cqhci
2975where
2976 ___H: CqhciClientHandler<___T> + ::core::marker::Send,
2977 ___T: ::fidl_next::Transport,
2978{
2979 async fn on_event(
2980 handler: &mut ___H,
2981 ordinal: u64,
2982 flexibility: ::fidl_next::protocol::Flexibility,
2983 body: ::fidl_next::Body<___T>,
2984 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2985 match ordinal {
2986 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2987 }
2988 }
2989}
2990
2991pub trait CqhciServerHandler<
2995 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2996 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2997>
2998{
2999 #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once. The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts. Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`. The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt. The CQHCI\n driver will destroy the peer end upon shutdown, which should be handled by the server as a\n signal to stop monitoring the virtual interrupt and return to monitoring the physical\n interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
3000 fn initialize_command_queueing(
3001 &mut self,
3002
3003 request: ::fidl_next::Request<cqhci::InitializeCommandQueueing, ___T>,
3004
3005 responder: ::fidl_next::Responder<cqhci::InitializeCommandQueueing, ___T>,
3006 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3007
3008 #[doc = " Enables the Command Queueing Engine. The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
3009 fn enable_cqhci(
3010 &mut self,
3011
3012 responder: ::fidl_next::Responder<cqhci::EnableCqhci, ___T>,
3013 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3014
3015 #[doc = " Disables the Command Queueing Engine. `EnableCqhci` must have previously been called. From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
3016 fn disable_cqhci(
3017 &mut self,
3018
3019 responder: ::fidl_next::Responder<cqhci::DisableCqhci, ___T>,
3020 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3021}
3022
3023impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Cqhci
3024where
3025 ___H: CqhciServerHandler<___T> + ::core::marker::Send,
3026 ___T: ::fidl_next::Transport,
3027 for<'de> crate::wire::CqhciInitializeCommandQueueingRequest: ::fidl_next::Decode<
3028 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3029 Constraint = (),
3030 >,
3031{
3032 async fn on_one_way(
3033 handler: &mut ___H,
3034 ordinal: u64,
3035 flexibility: ::fidl_next::protocol::Flexibility,
3036 body: ::fidl_next::Body<___T>,
3037 ) -> ::core::result::Result<
3038 (),
3039 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3040 > {
3041 match ordinal {
3042 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3043 }
3044 }
3045
3046 async fn on_two_way(
3047 handler: &mut ___H,
3048 ordinal: u64,
3049 flexibility: ::fidl_next::protocol::Flexibility,
3050 body: ::fidl_next::Body<___T>,
3051 responder: ::fidl_next::protocol::Responder<___T>,
3052 ) -> ::core::result::Result<
3053 (),
3054 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3055 > {
3056 match ordinal {
3057 359559202570093266 => {
3058 let responder = ::fidl_next::Responder::from_untyped(responder);
3059
3060 match ::fidl_next::AsDecoderExt::into_decoded(body) {
3061 Ok(decoded) => {
3062 handler
3063 .initialize_command_queueing(
3064 ::fidl_next::Request::from_decoded(decoded),
3065 responder,
3066 )
3067 .await;
3068 Ok(())
3069 }
3070 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3071 ordinal: 359559202570093266,
3072 error,
3073 }),
3074 }
3075 }
3076
3077 7267012061448928954 => {
3078 let responder = ::fidl_next::Responder::from_untyped(responder);
3079
3080 handler.enable_cqhci(responder).await;
3081 Ok(())
3082 }
3083
3084 4177196635683073751 => {
3085 let responder = ::fidl_next::Responder::from_untyped(responder);
3086
3087 handler.disable_cqhci(responder).await;
3088 Ok(())
3089 }
3090
3091 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3092 }
3093 }
3094}
3095
3096impl<___T> CqhciClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
3097
3098impl<___H, ___T> CqhciLocalClientHandler<___T> for ::fidl_next::Local<___H>
3099where
3100 ___H: CqhciClientHandler<___T>,
3101 ___T: ::fidl_next::Transport,
3102{
3103}
3104
3105impl<___H, ___T> CqhciLocalServerHandler<___T> for ::fidl_next::Local<___H>
3106where
3107 ___H: CqhciServerHandler<___T>,
3108 ___T: ::fidl_next::Transport,
3109{
3110 async fn initialize_command_queueing(
3111 &mut self,
3112
3113 request: ::fidl_next::Request<cqhci::InitializeCommandQueueing, ___T>,
3114
3115 responder: ::fidl_next::Responder<cqhci::InitializeCommandQueueing, ___T>,
3116 ) {
3117 ___H::initialize_command_queueing(&mut self.0, request, responder).await
3118 }
3119
3120 async fn enable_cqhci(&mut self, responder: ::fidl_next::Responder<cqhci::EnableCqhci, ___T>) {
3121 ___H::enable_cqhci(&mut self.0, responder).await
3122 }
3123
3124 async fn disable_cqhci(
3125 &mut self,
3126
3127 responder: ::fidl_next::Responder<cqhci::DisableCqhci, ___T>,
3128 ) {
3129 ___H::disable_cqhci(&mut self.0, responder).await
3130 }
3131}
3132
3133#[derive(PartialEq, Debug)]
3135pub struct Sdmmc;
3136
3137impl ::fidl_next::Discoverable for Sdmmc {
3138 const PROTOCOL_NAME: &'static str = "fuchsia.hardware.sdmmc.Sdmmc";
3139}
3140
3141#[cfg(feature = "driver")]
3142impl ::fidl_next::HasTransport for Sdmmc {
3143 type Transport = ::fdf_fidl::DriverChannel;
3144}
3145
3146pub mod sdmmc {
3147 pub mod prelude {
3148 pub use crate::{
3149 Sdmmc, SdmmcClientHandler, SdmmcLocalClientHandler, SdmmcLocalServerHandler,
3150 SdmmcServerHandler, sdmmc,
3151 };
3152
3153 pub use crate::natural::CqhciInitializeCommandQueueingRequest;
3154
3155 pub use crate::natural::CqhciDisableCqhciResponse;
3156
3157 pub use crate::natural::CqhciEnableCqhciResponse;
3158
3159 pub use crate::natural::CqhciInitializeCommandQueueingResponse;
3160
3161 pub use crate::natural::SdmmcPerformTuningRequest;
3162
3163 pub use crate::natural::SdmmcRegisterInBandInterruptRequest;
3164
3165 pub use crate::natural::SdmmcRegisterVmoRequest;
3166
3167 pub use crate::natural::SdmmcRequestRequest;
3168
3169 pub use crate::natural::SdmmcSetBusFreqRequest;
3170
3171 pub use crate::natural::SdmmcSetBusWidthRequest;
3172
3173 pub use crate::natural::SdmmcSetSignalVoltageRequest;
3174
3175 pub use crate::natural::SdmmcSetTimingRequest;
3176
3177 pub use crate::natural::SdmmcUnregisterVmoRequest;
3178
3179 pub use crate::natural::SdmmcHostInfoResponse;
3180
3181 pub use crate::natural::SdmmcHwResetResponse;
3182
3183 pub use crate::natural::SdmmcPerformTuningResponse;
3184
3185 pub use crate::natural::SdmmcRegisterInBandInterruptResponse;
3186
3187 pub use crate::natural::SdmmcRegisterVmoResponse;
3188
3189 pub use crate::natural::SdmmcRequestResponse;
3190
3191 pub use crate::natural::SdmmcSetBusFreqResponse;
3192
3193 pub use crate::natural::SdmmcSetBusWidthResponse;
3194
3195 pub use crate::natural::SdmmcSetSignalVoltageResponse;
3196
3197 pub use crate::natural::SdmmcSetTimingResponse;
3198
3199 pub use crate::natural::SdmmcUnregisterVmoResponse;
3200 }
3201
3202 pub struct InitializeCommandQueueing;
3203
3204 impl ::fidl_next::Method for InitializeCommandQueueing {
3205 const ORDINAL: u64 = 359559202570093266;
3206 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3207 ::fidl_next::protocol::Flexibility::Strict;
3208
3209 type Protocol = crate::Sdmmc;
3210
3211 type Request = crate::wire::CqhciInitializeCommandQueueingRequest;
3212 }
3213
3214 impl ::fidl_next::TwoWayMethod for InitializeCommandQueueing {
3215 type Response = ::fidl_next::wire::Result<
3216 'static,
3217 crate::wire::CqhciInitializeCommandQueueingResponse,
3218 ::fidl_next::wire::Int32,
3219 >;
3220 }
3221
3222 impl<___R> ::fidl_next::Respond<___R> for InitializeCommandQueueing {
3223 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3224
3225 fn respond(response: ___R) -> Self::Output {
3226 ::core::result::Result::Ok(response)
3227 }
3228 }
3229
3230 impl<___R> ::fidl_next::RespondErr<___R> for InitializeCommandQueueing {
3231 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3232
3233 fn respond_err(response: ___R) -> Self::Output {
3234 ::core::result::Result::Err(response)
3235 }
3236 }
3237
3238 pub struct EnableCqhci;
3239
3240 impl ::fidl_next::Method for EnableCqhci {
3241 const ORDINAL: u64 = 7267012061448928954;
3242 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3243 ::fidl_next::protocol::Flexibility::Strict;
3244
3245 type Protocol = crate::Sdmmc;
3246
3247 type Request = ::fidl_next::wire::EmptyMessageBody;
3248 }
3249
3250 impl ::fidl_next::TwoWayMethod for EnableCqhci {
3251 type Response = ::fidl_next::wire::Result<
3252 'static,
3253 crate::wire::CqhciEnableCqhciResponse,
3254 ::fidl_next::wire::Int32,
3255 >;
3256 }
3257
3258 impl<___R> ::fidl_next::Respond<___R> for EnableCqhci {
3259 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3260
3261 fn respond(response: ___R) -> Self::Output {
3262 ::core::result::Result::Ok(response)
3263 }
3264 }
3265
3266 impl<___R> ::fidl_next::RespondErr<___R> for EnableCqhci {
3267 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3268
3269 fn respond_err(response: ___R) -> Self::Output {
3270 ::core::result::Result::Err(response)
3271 }
3272 }
3273
3274 pub struct DisableCqhci;
3275
3276 impl ::fidl_next::Method for DisableCqhci {
3277 const ORDINAL: u64 = 4177196635683073751;
3278 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3279 ::fidl_next::protocol::Flexibility::Strict;
3280
3281 type Protocol = crate::Sdmmc;
3282
3283 type Request = ::fidl_next::wire::EmptyMessageBody;
3284 }
3285
3286 impl ::fidl_next::TwoWayMethod for DisableCqhci {
3287 type Response = ::fidl_next::wire::Result<
3288 'static,
3289 crate::wire::CqhciDisableCqhciResponse,
3290 ::fidl_next::wire::Int32,
3291 >;
3292 }
3293
3294 impl<___R> ::fidl_next::Respond<___R> for DisableCqhci {
3295 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3296
3297 fn respond(response: ___R) -> Self::Output {
3298 ::core::result::Result::Ok(response)
3299 }
3300 }
3301
3302 impl<___R> ::fidl_next::RespondErr<___R> for DisableCqhci {
3303 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3304
3305 fn respond_err(response: ___R) -> Self::Output {
3306 ::core::result::Result::Err(response)
3307 }
3308 }
3309
3310 pub struct HostInfo;
3311
3312 impl ::fidl_next::Method for HostInfo {
3313 const ORDINAL: u64 = 8475471856809867100;
3314 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3315 ::fidl_next::protocol::Flexibility::Strict;
3316
3317 type Protocol = crate::Sdmmc;
3318
3319 type Request = ::fidl_next::wire::EmptyMessageBody;
3320 }
3321
3322 impl ::fidl_next::TwoWayMethod for HostInfo {
3323 type Response = ::fidl_next::wire::Result<
3324 'static,
3325 crate::wire::SdmmcHostInfoResponse,
3326 ::fidl_next::wire::Int32,
3327 >;
3328 }
3329
3330 impl<___R> ::fidl_next::Respond<___R> for HostInfo {
3331 type Output = ::core::result::Result<
3332 crate::generic::SdmmcHostInfoResponse<___R>,
3333 ::fidl_next::util::Never,
3334 >;
3335
3336 fn respond(response: ___R) -> Self::Output {
3337 ::core::result::Result::Ok(crate::generic::SdmmcHostInfoResponse { info: response })
3338 }
3339 }
3340
3341 impl<___R> ::fidl_next::RespondErr<___R> for HostInfo {
3342 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3343
3344 fn respond_err(response: ___R) -> Self::Output {
3345 ::core::result::Result::Err(response)
3346 }
3347 }
3348
3349 pub struct SetSignalVoltage;
3350
3351 impl ::fidl_next::Method for SetSignalVoltage {
3352 const ORDINAL: u64 = 5360485811549546918;
3353 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3354 ::fidl_next::protocol::Flexibility::Strict;
3355
3356 type Protocol = crate::Sdmmc;
3357
3358 type Request = crate::wire::SdmmcSetSignalVoltageRequest;
3359 }
3360
3361 impl ::fidl_next::TwoWayMethod for SetSignalVoltage {
3362 type Response = ::fidl_next::wire::Result<
3363 'static,
3364 crate::wire::SdmmcSetSignalVoltageResponse,
3365 ::fidl_next::wire::Int32,
3366 >;
3367 }
3368
3369 impl<___R> ::fidl_next::Respond<___R> for SetSignalVoltage {
3370 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3371
3372 fn respond(response: ___R) -> Self::Output {
3373 ::core::result::Result::Ok(response)
3374 }
3375 }
3376
3377 impl<___R> ::fidl_next::RespondErr<___R> for SetSignalVoltage {
3378 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3379
3380 fn respond_err(response: ___R) -> Self::Output {
3381 ::core::result::Result::Err(response)
3382 }
3383 }
3384
3385 pub struct SetBusWidth;
3386
3387 impl ::fidl_next::Method for SetBusWidth {
3388 const ORDINAL: u64 = 3438431046250338573;
3389 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3390 ::fidl_next::protocol::Flexibility::Strict;
3391
3392 type Protocol = crate::Sdmmc;
3393
3394 type Request = crate::wire::SdmmcSetBusWidthRequest;
3395 }
3396
3397 impl ::fidl_next::TwoWayMethod for SetBusWidth {
3398 type Response = ::fidl_next::wire::Result<
3399 'static,
3400 crate::wire::SdmmcSetBusWidthResponse,
3401 ::fidl_next::wire::Int32,
3402 >;
3403 }
3404
3405 impl<___R> ::fidl_next::Respond<___R> for SetBusWidth {
3406 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3407
3408 fn respond(response: ___R) -> Self::Output {
3409 ::core::result::Result::Ok(response)
3410 }
3411 }
3412
3413 impl<___R> ::fidl_next::RespondErr<___R> for SetBusWidth {
3414 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3415
3416 fn respond_err(response: ___R) -> Self::Output {
3417 ::core::result::Result::Err(response)
3418 }
3419 }
3420
3421 pub struct SetBusFreq;
3422
3423 impl ::fidl_next::Method for SetBusFreq {
3424 const ORDINAL: u64 = 6624771772063616636;
3425 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3426 ::fidl_next::protocol::Flexibility::Strict;
3427
3428 type Protocol = crate::Sdmmc;
3429
3430 type Request = crate::wire::SdmmcSetBusFreqRequest;
3431 }
3432
3433 impl ::fidl_next::TwoWayMethod for SetBusFreq {
3434 type Response = ::fidl_next::wire::Result<
3435 'static,
3436 crate::wire::SdmmcSetBusFreqResponse,
3437 ::fidl_next::wire::Int32,
3438 >;
3439 }
3440
3441 impl<___R> ::fidl_next::Respond<___R> for SetBusFreq {
3442 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3443
3444 fn respond(response: ___R) -> Self::Output {
3445 ::core::result::Result::Ok(response)
3446 }
3447 }
3448
3449 impl<___R> ::fidl_next::RespondErr<___R> for SetBusFreq {
3450 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3451
3452 fn respond_err(response: ___R) -> Self::Output {
3453 ::core::result::Result::Err(response)
3454 }
3455 }
3456
3457 pub struct SetTiming;
3458
3459 impl ::fidl_next::Method for SetTiming {
3460 const ORDINAL: u64 = 7991421876873192632;
3461 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3462 ::fidl_next::protocol::Flexibility::Strict;
3463
3464 type Protocol = crate::Sdmmc;
3465
3466 type Request = crate::wire::SdmmcSetTimingRequest;
3467 }
3468
3469 impl ::fidl_next::TwoWayMethod for SetTiming {
3470 type Response = ::fidl_next::wire::Result<
3471 'static,
3472 crate::wire::SdmmcSetTimingResponse,
3473 ::fidl_next::wire::Int32,
3474 >;
3475 }
3476
3477 impl<___R> ::fidl_next::Respond<___R> for SetTiming {
3478 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3479
3480 fn respond(response: ___R) -> Self::Output {
3481 ::core::result::Result::Ok(response)
3482 }
3483 }
3484
3485 impl<___R> ::fidl_next::RespondErr<___R> for SetTiming {
3486 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3487
3488 fn respond_err(response: ___R) -> Self::Output {
3489 ::core::result::Result::Err(response)
3490 }
3491 }
3492
3493 pub struct HwReset;
3494
3495 impl ::fidl_next::Method for HwReset {
3496 const ORDINAL: u64 = 3335326454881665312;
3497 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3498 ::fidl_next::protocol::Flexibility::Strict;
3499
3500 type Protocol = crate::Sdmmc;
3501
3502 type Request = ::fidl_next::wire::EmptyMessageBody;
3503 }
3504
3505 impl ::fidl_next::TwoWayMethod for HwReset {
3506 type Response = ::fidl_next::wire::Result<
3507 'static,
3508 crate::wire::SdmmcHwResetResponse,
3509 ::fidl_next::wire::Int32,
3510 >;
3511 }
3512
3513 impl<___R> ::fidl_next::Respond<___R> for HwReset {
3514 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3515
3516 fn respond(response: ___R) -> Self::Output {
3517 ::core::result::Result::Ok(response)
3518 }
3519 }
3520
3521 impl<___R> ::fidl_next::RespondErr<___R> for HwReset {
3522 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3523
3524 fn respond_err(response: ___R) -> Self::Output {
3525 ::core::result::Result::Err(response)
3526 }
3527 }
3528
3529 pub struct PerformTuning;
3530
3531 impl ::fidl_next::Method for PerformTuning {
3532 const ORDINAL: u64 = 5267400993243262226;
3533 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3534 ::fidl_next::protocol::Flexibility::Strict;
3535
3536 type Protocol = crate::Sdmmc;
3537
3538 type Request = crate::wire::SdmmcPerformTuningRequest;
3539 }
3540
3541 impl ::fidl_next::TwoWayMethod for PerformTuning {
3542 type Response = ::fidl_next::wire::Result<
3543 'static,
3544 crate::wire::SdmmcPerformTuningResponse,
3545 ::fidl_next::wire::Int32,
3546 >;
3547 }
3548
3549 impl<___R> ::fidl_next::Respond<___R> for PerformTuning {
3550 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3551
3552 fn respond(response: ___R) -> Self::Output {
3553 ::core::result::Result::Ok(response)
3554 }
3555 }
3556
3557 impl<___R> ::fidl_next::RespondErr<___R> for PerformTuning {
3558 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3559
3560 fn respond_err(response: ___R) -> Self::Output {
3561 ::core::result::Result::Err(response)
3562 }
3563 }
3564
3565 pub struct RegisterInBandInterrupt;
3566
3567 impl ::fidl_next::Method for RegisterInBandInterrupt {
3568 const ORDINAL: u64 = 7280830926204192948;
3569 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3570 ::fidl_next::protocol::Flexibility::Strict;
3571
3572 type Protocol = crate::Sdmmc;
3573
3574 type Request = crate::wire::SdmmcRegisterInBandInterruptRequest;
3575 }
3576
3577 impl ::fidl_next::TwoWayMethod for RegisterInBandInterrupt {
3578 type Response = ::fidl_next::wire::Result<
3579 'static,
3580 crate::wire::SdmmcRegisterInBandInterruptResponse,
3581 ::fidl_next::wire::Int32,
3582 >;
3583 }
3584
3585 impl<___R> ::fidl_next::Respond<___R> for RegisterInBandInterrupt {
3586 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3587
3588 fn respond(response: ___R) -> Self::Output {
3589 ::core::result::Result::Ok(response)
3590 }
3591 }
3592
3593 impl<___R> ::fidl_next::RespondErr<___R> for RegisterInBandInterrupt {
3594 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3595
3596 fn respond_err(response: ___R) -> Self::Output {
3597 ::core::result::Result::Err(response)
3598 }
3599 }
3600
3601 pub struct AckInBandInterrupt;
3602
3603 impl ::fidl_next::Method for AckInBandInterrupt {
3604 const ORDINAL: u64 = 6808342210488695055;
3605 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3606 ::fidl_next::protocol::Flexibility::Strict;
3607
3608 type Protocol = crate::Sdmmc;
3609
3610 type Request = ::fidl_next::wire::EmptyMessageBody;
3611 }
3612
3613 pub struct RegisterVmo;
3614
3615 impl ::fidl_next::Method for RegisterVmo {
3616 const ORDINAL: u64 = 1214620982318353152;
3617 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3618 ::fidl_next::protocol::Flexibility::Strict;
3619
3620 type Protocol = crate::Sdmmc;
3621
3622 type Request = crate::wire::SdmmcRegisterVmoRequest;
3623 }
3624
3625 impl ::fidl_next::TwoWayMethod for RegisterVmo {
3626 type Response = ::fidl_next::wire::Result<
3627 'static,
3628 crate::wire::SdmmcRegisterVmoResponse,
3629 ::fidl_next::wire::Int32,
3630 >;
3631 }
3632
3633 impl<___R> ::fidl_next::Respond<___R> for RegisterVmo {
3634 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
3635
3636 fn respond(response: ___R) -> Self::Output {
3637 ::core::result::Result::Ok(response)
3638 }
3639 }
3640
3641 impl<___R> ::fidl_next::RespondErr<___R> for RegisterVmo {
3642 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3643
3644 fn respond_err(response: ___R) -> Self::Output {
3645 ::core::result::Result::Err(response)
3646 }
3647 }
3648
3649 pub struct UnregisterVmo;
3650
3651 impl ::fidl_next::Method for UnregisterVmo {
3652 const ORDINAL: u64 = 8712572721256898471;
3653 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3654 ::fidl_next::protocol::Flexibility::Strict;
3655
3656 type Protocol = crate::Sdmmc;
3657
3658 type Request = crate::wire::SdmmcUnregisterVmoRequest;
3659 }
3660
3661 impl ::fidl_next::TwoWayMethod for UnregisterVmo {
3662 type Response = ::fidl_next::wire::Result<
3663 'static,
3664 crate::wire::SdmmcUnregisterVmoResponse,
3665 ::fidl_next::wire::Int32,
3666 >;
3667 }
3668
3669 impl<___R> ::fidl_next::Respond<___R> for UnregisterVmo {
3670 type Output = ::core::result::Result<
3671 crate::generic::SdmmcUnregisterVmoResponse<___R>,
3672 ::fidl_next::util::Never,
3673 >;
3674
3675 fn respond(response: ___R) -> Self::Output {
3676 ::core::result::Result::Ok(crate::generic::SdmmcUnregisterVmoResponse { vmo: response })
3677 }
3678 }
3679
3680 impl<___R> ::fidl_next::RespondErr<___R> for UnregisterVmo {
3681 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3682
3683 fn respond_err(response: ___R) -> Self::Output {
3684 ::core::result::Result::Err(response)
3685 }
3686 }
3687
3688 pub struct Request;
3689
3690 impl ::fidl_next::Method for Request {
3691 const ORDINAL: u64 = 2766657126441407958;
3692 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3693 ::fidl_next::protocol::Flexibility::Strict;
3694
3695 type Protocol = crate::Sdmmc;
3696
3697 type Request = crate::wire::SdmmcRequestRequest<'static>;
3698 }
3699
3700 impl ::fidl_next::TwoWayMethod for Request {
3701 type Response = ::fidl_next::wire::Result<
3702 'static,
3703 crate::wire::SdmmcRequestResponse,
3704 ::fidl_next::wire::Int32,
3705 >;
3706 }
3707
3708 impl<___R> ::fidl_next::Respond<___R> for Request {
3709 type Output = ::core::result::Result<
3710 crate::generic::SdmmcRequestResponse<___R>,
3711 ::fidl_next::util::Never,
3712 >;
3713
3714 fn respond(response: ___R) -> Self::Output {
3715 ::core::result::Result::Ok(crate::generic::SdmmcRequestResponse { response: response })
3716 }
3717 }
3718
3719 impl<___R> ::fidl_next::RespondErr<___R> for Request {
3720 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
3721
3722 fn respond_err(response: ___R) -> Self::Output {
3723 ::core::result::Result::Err(response)
3724 }
3725 }
3726
3727 mod ___detail {
3728 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Sdmmc
3729 where
3730 ___T: ::fidl_next::Transport,
3731 {
3732 type Client = SdmmcClient<___T>;
3733 type Server = SdmmcServer<___T>;
3734 }
3735
3736 #[repr(transparent)]
3738 pub struct SdmmcClient<___T: ::fidl_next::Transport> {
3739 #[allow(dead_code)]
3740 client: ::fidl_next::protocol::Client<___T>,
3741 }
3742
3743 impl<___T> SdmmcClient<___T>
3744 where
3745 ___T: ::fidl_next::Transport,
3746 {
3747 #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once. The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts. Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`. The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt. The CQHCI\n driver will destroy the peer end upon shutdown, which should be handled by the server as a\n signal to stop monitoring the virtual interrupt and return to monitoring the physical\n interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
3748 pub fn initialize_command_queueing(
3749 &self,
3750
3751 virtual_interrupt: impl ::fidl_next::Encode<
3752 ::fidl_next::wire::fuchsia::Interrupt,
3753 <___T as ::fidl_next::Transport>::SendBuffer,
3754 >,
3755
3756 virtual_interrupt_lifeline: impl ::fidl_next::Encode<
3757 ::fidl_next::wire::fuchsia::EventPair,
3758 <___T as ::fidl_next::Transport>::SendBuffer,
3759 >,
3760 ) -> ::fidl_next::TwoWayFuture<'_, super::InitializeCommandQueueing, ___T>
3761 where
3762 <___T as ::fidl_next::Transport>::SendBuffer:
3763 ::fidl_next::encoder::InternalHandleEncoder,
3764 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3765 {
3766 self.initialize_command_queueing_with(
3767 crate::generic::CqhciInitializeCommandQueueingRequest {
3768 virtual_interrupt,
3769
3770 virtual_interrupt_lifeline,
3771 },
3772 )
3773 }
3774
3775 #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once. The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts. Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`. The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt. The CQHCI\n driver will destroy the peer end upon shutdown, which should be handled by the server as a\n signal to stop monitoring the virtual interrupt and return to monitoring the physical\n interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
3776 pub fn initialize_command_queueing_with<___R>(
3777 &self,
3778 request: ___R,
3779 ) -> ::fidl_next::TwoWayFuture<'_, super::InitializeCommandQueueing, ___T>
3780 where
3781 ___R: ::fidl_next::Encode<
3782 crate::wire::CqhciInitializeCommandQueueingRequest,
3783 <___T as ::fidl_next::Transport>::SendBuffer,
3784 >,
3785 {
3786 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3787 359559202570093266,
3788 <super::InitializeCommandQueueing as ::fidl_next::Method>::FLEXIBILITY,
3789 request,
3790 ))
3791 }
3792
3793 #[doc = " Enables the Command Queueing Engine. The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
3794 pub fn enable_cqhci(&self) -> ::fidl_next::TwoWayFuture<'_, super::EnableCqhci, ___T> {
3795 ::fidl_next::TwoWayFuture::from_untyped(
3796 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3797 7267012061448928954,
3798 <super::EnableCqhci as ::fidl_next::Method>::FLEXIBILITY,
3799 (),
3800 ),
3801 )
3802 }
3803
3804 #[doc = " Disables the Command Queueing Engine. `EnableCqhci` must have previously been called. From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
3805 pub fn disable_cqhci(
3806 &self,
3807 ) -> ::fidl_next::TwoWayFuture<'_, super::DisableCqhci, ___T> {
3808 ::fidl_next::TwoWayFuture::from_untyped(
3809 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3810 4177196635683073751,
3811 <super::DisableCqhci as ::fidl_next::Method>::FLEXIBILITY,
3812 (),
3813 ),
3814 )
3815 }
3816
3817 #[doc = " Get host info.\n"]
3818 pub fn host_info(&self) -> ::fidl_next::TwoWayFuture<'_, super::HostInfo, ___T> {
3819 ::fidl_next::TwoWayFuture::from_untyped(
3820 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3821 8475471856809867100,
3822 <super::HostInfo as ::fidl_next::Method>::FLEXIBILITY,
3823 (),
3824 ),
3825 )
3826 }
3827
3828 #[doc = " Set signal voltage.\n"]
3829 pub fn set_signal_voltage(
3830 &self,
3831
3832 voltage: impl ::fidl_next::Encode<
3833 crate::wire::SdmmcVoltage,
3834 <___T as ::fidl_next::Transport>::SendBuffer,
3835 >,
3836 ) -> ::fidl_next::TwoWayFuture<'_, super::SetSignalVoltage, ___T>
3837 where
3838 <___T as ::fidl_next::Transport>::SendBuffer:
3839 ::fidl_next::encoder::InternalHandleEncoder,
3840 {
3841 self.set_signal_voltage_with(crate::generic::SdmmcSetSignalVoltageRequest {
3842 voltage,
3843 })
3844 }
3845
3846 #[doc = " Set signal voltage.\n"]
3847 pub fn set_signal_voltage_with<___R>(
3848 &self,
3849 request: ___R,
3850 ) -> ::fidl_next::TwoWayFuture<'_, super::SetSignalVoltage, ___T>
3851 where
3852 ___R: ::fidl_next::Encode<
3853 crate::wire::SdmmcSetSignalVoltageRequest,
3854 <___T as ::fidl_next::Transport>::SendBuffer,
3855 >,
3856 {
3857 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3858 5360485811549546918,
3859 <super::SetSignalVoltage as ::fidl_next::Method>::FLEXIBILITY,
3860 request,
3861 ))
3862 }
3863
3864 #[doc = " Set bus width.\n"]
3865 pub fn set_bus_width(
3866 &self,
3867
3868 bus_width: impl ::fidl_next::Encode<
3869 crate::wire::SdmmcBusWidth,
3870 <___T as ::fidl_next::Transport>::SendBuffer,
3871 >,
3872 ) -> ::fidl_next::TwoWayFuture<'_, super::SetBusWidth, ___T>
3873 where
3874 <___T as ::fidl_next::Transport>::SendBuffer:
3875 ::fidl_next::encoder::InternalHandleEncoder,
3876 {
3877 self.set_bus_width_with(crate::generic::SdmmcSetBusWidthRequest { bus_width })
3878 }
3879
3880 #[doc = " Set bus width.\n"]
3881 pub fn set_bus_width_with<___R>(
3882 &self,
3883 request: ___R,
3884 ) -> ::fidl_next::TwoWayFuture<'_, super::SetBusWidth, ___T>
3885 where
3886 ___R: ::fidl_next::Encode<
3887 crate::wire::SdmmcSetBusWidthRequest,
3888 <___T as ::fidl_next::Transport>::SendBuffer,
3889 >,
3890 {
3891 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3892 3438431046250338573,
3893 <super::SetBusWidth as ::fidl_next::Method>::FLEXIBILITY,
3894 request,
3895 ))
3896 }
3897
3898 #[doc = " Set bus frequency, zero means disable the clock to the card.\n"]
3899 pub fn set_bus_freq(
3900 &self,
3901
3902 bus_freq: impl ::fidl_next::Encode<
3903 ::fidl_next::wire::Uint32,
3904 <___T as ::fidl_next::Transport>::SendBuffer,
3905 >,
3906 ) -> ::fidl_next::TwoWayFuture<'_, super::SetBusFreq, ___T>
3907 where
3908 <___T as ::fidl_next::Transport>::SendBuffer:
3909 ::fidl_next::encoder::InternalHandleEncoder,
3910 {
3911 self.set_bus_freq_with(crate::generic::SdmmcSetBusFreqRequest { bus_freq })
3912 }
3913
3914 #[doc = " Set bus frequency, zero means disable the clock to the card.\n"]
3915 pub fn set_bus_freq_with<___R>(
3916 &self,
3917 request: ___R,
3918 ) -> ::fidl_next::TwoWayFuture<'_, super::SetBusFreq, ___T>
3919 where
3920 ___R: ::fidl_next::Encode<
3921 crate::wire::SdmmcSetBusFreqRequest,
3922 <___T as ::fidl_next::Transport>::SendBuffer,
3923 >,
3924 {
3925 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3926 6624771772063616636,
3927 <super::SetBusFreq as ::fidl_next::Method>::FLEXIBILITY,
3928 request,
3929 ))
3930 }
3931
3932 #[doc = " Set mmc timing.\n"]
3933 pub fn set_timing(
3934 &self,
3935
3936 timing: impl ::fidl_next::Encode<
3937 crate::wire::SdmmcTiming,
3938 <___T as ::fidl_next::Transport>::SendBuffer,
3939 >,
3940 ) -> ::fidl_next::TwoWayFuture<'_, super::SetTiming, ___T>
3941 where
3942 <___T as ::fidl_next::Transport>::SendBuffer:
3943 ::fidl_next::encoder::InternalHandleEncoder,
3944 {
3945 self.set_timing_with(crate::generic::SdmmcSetTimingRequest { timing })
3946 }
3947
3948 #[doc = " Set mmc timing.\n"]
3949 pub fn set_timing_with<___R>(
3950 &self,
3951 request: ___R,
3952 ) -> ::fidl_next::TwoWayFuture<'_, super::SetTiming, ___T>
3953 where
3954 ___R: ::fidl_next::Encode<
3955 crate::wire::SdmmcSetTimingRequest,
3956 <___T as ::fidl_next::Transport>::SendBuffer,
3957 >,
3958 {
3959 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3960 7991421876873192632,
3961 <super::SetTiming as ::fidl_next::Method>::FLEXIBILITY,
3962 request,
3963 ))
3964 }
3965
3966 #[doc = " Issue a hw reset.\n"]
3967 pub fn hw_reset(&self) -> ::fidl_next::TwoWayFuture<'_, super::HwReset, ___T> {
3968 ::fidl_next::TwoWayFuture::from_untyped(
3969 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3970 3335326454881665312,
3971 <super::HwReset as ::fidl_next::Method>::FLEXIBILITY,
3972 (),
3973 ),
3974 )
3975 }
3976
3977 #[doc = " Perform tuning.\n"]
3978 pub fn perform_tuning(
3979 &self,
3980
3981 cmd_idx: impl ::fidl_next::Encode<
3982 ::fidl_next::wire::Uint32,
3983 <___T as ::fidl_next::Transport>::SendBuffer,
3984 >,
3985 ) -> ::fidl_next::TwoWayFuture<'_, super::PerformTuning, ___T>
3986 where
3987 <___T as ::fidl_next::Transport>::SendBuffer:
3988 ::fidl_next::encoder::InternalHandleEncoder,
3989 {
3990 self.perform_tuning_with(crate::generic::SdmmcPerformTuningRequest { cmd_idx })
3991 }
3992
3993 #[doc = " Perform tuning.\n"]
3994 pub fn perform_tuning_with<___R>(
3995 &self,
3996 request: ___R,
3997 ) -> ::fidl_next::TwoWayFuture<'_, super::PerformTuning, ___T>
3998 where
3999 ___R: ::fidl_next::Encode<
4000 crate::wire::SdmmcPerformTuningRequest,
4001 <___T as ::fidl_next::Transport>::SendBuffer,
4002 >,
4003 {
4004 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4005 5267400993243262226,
4006 <super::PerformTuning as ::fidl_next::Method>::FLEXIBILITY,
4007 request,
4008 ))
4009 }
4010
4011 #[doc = " Register the given callback to be called when an in-band interrupt is received from the\n card. Before calling the callback the protocol implementation will disable the in-band\n interrupt in the controller. In-band interrupts can be re-enabled by calling\n `AckInBandInterrupt()` once the previous interrupt has been handled by the client.\n"]
4012 pub fn register_in_band_interrupt(
4013 &self,
4014
4015 interrupt_cb: impl ::fidl_next::Encode<
4016 ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>,
4017 <___T as ::fidl_next::Transport>::SendBuffer,
4018 >,
4019 ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterInBandInterrupt, ___T>
4020 where
4021 <___T as ::fidl_next::Transport>::SendBuffer:
4022 ::fidl_next::encoder::InternalHandleEncoder,
4023 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4024 {
4025 self.register_in_band_interrupt_with(
4026 crate::generic::SdmmcRegisterInBandInterruptRequest { interrupt_cb },
4027 )
4028 }
4029
4030 #[doc = " Register the given callback to be called when an in-band interrupt is received from the\n card. Before calling the callback the protocol implementation will disable the in-band\n interrupt in the controller. In-band interrupts can be re-enabled by calling\n `AckInBandInterrupt()` once the previous interrupt has been handled by the client.\n"]
4031 pub fn register_in_band_interrupt_with<___R>(
4032 &self,
4033 request: ___R,
4034 ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterInBandInterrupt, ___T>
4035 where
4036 ___R: ::fidl_next::Encode<
4037 crate::wire::SdmmcRegisterInBandInterruptRequest,
4038 <___T as ::fidl_next::Transport>::SendBuffer,
4039 >,
4040 {
4041 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4042 7280830926204192948,
4043 <super::RegisterInBandInterrupt as ::fidl_next::Method>::FLEXIBILITY,
4044 request,
4045 ))
4046 }
4047
4048 pub fn ack_in_band_interrupt(&self) -> ::fidl_next::SendFuture<'_, ___T> {
4049 ::fidl_next::SendFuture::from_untyped(
4050 self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
4051 6808342210488695055,
4052 <super::AckInBandInterrupt as ::fidl_next::Method>::FLEXIBILITY,
4053 (),
4054 ),
4055 )
4056 }
4057
4058 #[doc = " In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to\n Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32\n value.\n Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit\n field containing SdmmcVmoRight values, and determines the read/write permissions used by\n the implementation when pinning or mapping the VMO. The implementation may pin vmo during\n this call or any time it is used in a request, and may keep it pinned until the VMO is\n unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for\n this VMO to be registered in (that is, two different VMOs may use the same ID if they are\n registered for different clients).\n"]
4059 pub fn register_vmo(
4060 &self,
4061
4062 vmo_id: impl ::fidl_next::Encode<
4063 ::fidl_next::wire::Uint32,
4064 <___T as ::fidl_next::Transport>::SendBuffer,
4065 >,
4066
4067 client_id: impl ::fidl_next::Encode<u8, <___T as ::fidl_next::Transport>::SendBuffer>,
4068
4069 vmo: impl ::fidl_next::Encode<
4070 ::fidl_next::wire::fuchsia::Vmo,
4071 <___T as ::fidl_next::Transport>::SendBuffer,
4072 >,
4073
4074 offset: impl ::fidl_next::Encode<
4075 ::fidl_next::wire::Uint64,
4076 <___T as ::fidl_next::Transport>::SendBuffer,
4077 >,
4078
4079 size: impl ::fidl_next::Encode<
4080 ::fidl_next::wire::Uint64,
4081 <___T as ::fidl_next::Transport>::SendBuffer,
4082 >,
4083
4084 vmo_rights: impl ::fidl_next::Encode<
4085 crate::wire::SdmmcVmoRight,
4086 <___T as ::fidl_next::Transport>::SendBuffer,
4087 >,
4088 ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterVmo, ___T>
4089 where
4090 <___T as ::fidl_next::Transport>::SendBuffer:
4091 ::fidl_next::encoder::InternalHandleEncoder,
4092 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4093 {
4094 self.register_vmo_with(crate::generic::SdmmcRegisterVmoRequest {
4095 vmo_id,
4096
4097 client_id,
4098
4099 vmo,
4100
4101 offset,
4102
4103 size,
4104
4105 vmo_rights,
4106 })
4107 }
4108
4109 #[doc = " In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to\n Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32\n value.\n Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit\n field containing SdmmcVmoRight values, and determines the read/write permissions used by\n the implementation when pinning or mapping the VMO. The implementation may pin vmo during\n this call or any time it is used in a request, and may keep it pinned until the VMO is\n unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for\n this VMO to be registered in (that is, two different VMOs may use the same ID if they are\n registered for different clients).\n"]
4110 pub fn register_vmo_with<___R>(
4111 &self,
4112 request: ___R,
4113 ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterVmo, ___T>
4114 where
4115 ___R: ::fidl_next::Encode<
4116 crate::wire::SdmmcRegisterVmoRequest,
4117 <___T as ::fidl_next::Transport>::SendBuffer,
4118 >,
4119 {
4120 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4121 1214620982318353152,
4122 <super::RegisterVmo as ::fidl_next::Method>::FLEXIBILITY,
4123 request,
4124 ))
4125 }
4126
4127 #[doc = " The callee unmaps/unpins the VMO and returns ownership to the caller.\n"]
4128 pub fn unregister_vmo(
4129 &self,
4130
4131 vmo_id: impl ::fidl_next::Encode<
4132 ::fidl_next::wire::Uint32,
4133 <___T as ::fidl_next::Transport>::SendBuffer,
4134 >,
4135
4136 client_id: impl ::fidl_next::Encode<u8, <___T as ::fidl_next::Transport>::SendBuffer>,
4137 ) -> ::fidl_next::TwoWayFuture<'_, super::UnregisterVmo, ___T>
4138 where
4139 <___T as ::fidl_next::Transport>::SendBuffer:
4140 ::fidl_next::encoder::InternalHandleEncoder,
4141 {
4142 self.unregister_vmo_with(crate::generic::SdmmcUnregisterVmoRequest {
4143 vmo_id,
4144
4145 client_id,
4146 })
4147 }
4148
4149 #[doc = " The callee unmaps/unpins the VMO and returns ownership to the caller.\n"]
4150 pub fn unregister_vmo_with<___R>(
4151 &self,
4152 request: ___R,
4153 ) -> ::fidl_next::TwoWayFuture<'_, super::UnregisterVmo, ___T>
4154 where
4155 ___R: ::fidl_next::Encode<
4156 crate::wire::SdmmcUnregisterVmoRequest,
4157 <___T as ::fidl_next::Transport>::SendBuffer,
4158 >,
4159 {
4160 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4161 8712572721256898471,
4162 <super::UnregisterVmo as ::fidl_next::Method>::FLEXIBILITY,
4163 request,
4164 ))
4165 }
4166
4167 #[doc = " Perform the requests in order, atomically (i.e., no intervening requests). Furthermore,\n calls are replied to in the order they are received. If an error occurs, abort any remaining\n requests. Else, return the response of the last request.\n\n The protocol implementation chooses whether or not to use DMA\n depending on the properties of the request and the capabilities of the controller.\n\n Clients are responsible for performing the following cache operations:\n\n After read requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that\n have been mapped by the client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.\n\n Note that writing to any portion of a buffer before Request has returned can corrupt the\n received data.\n\n Before write requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the\n client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.\n"]
4168 pub fn request(
4169 &self,
4170
4171 reqs: impl ::fidl_next::Encode<
4172 ::fidl_next::wire::Vector<'static, crate::wire::SdmmcReq<'static>>,
4173 <___T as ::fidl_next::Transport>::SendBuffer,
4174 >,
4175 ) -> ::fidl_next::TwoWayFuture<'_, super::Request, ___T>
4176 where
4177 <___T as ::fidl_next::Transport>::SendBuffer:
4178 ::fidl_next::encoder::InternalHandleEncoder,
4179 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4180 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4181 {
4182 self.request_with(crate::generic::SdmmcRequestRequest { reqs })
4183 }
4184
4185 #[doc = " Perform the requests in order, atomically (i.e., no intervening requests). Furthermore,\n calls are replied to in the order they are received. If an error occurs, abort any remaining\n requests. Else, return the response of the last request.\n\n The protocol implementation chooses whether or not to use DMA\n depending on the properties of the request and the capabilities of the controller.\n\n Clients are responsible for performing the following cache operations:\n\n After read requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that\n have been mapped by the client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.\n\n Note that writing to any portion of a buffer before Request has returned can corrupt the\n received data.\n\n Before write requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the\n client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.\n"]
4186 pub fn request_with<___R>(
4187 &self,
4188 request: ___R,
4189 ) -> ::fidl_next::TwoWayFuture<'_, super::Request, ___T>
4190 where
4191 ___R: ::fidl_next::Encode<
4192 crate::wire::SdmmcRequestRequest<'static>,
4193 <___T as ::fidl_next::Transport>::SendBuffer,
4194 >,
4195 {
4196 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4197 2766657126441407958,
4198 <super::Request as ::fidl_next::Method>::FLEXIBILITY,
4199 request,
4200 ))
4201 }
4202 }
4203
4204 #[repr(transparent)]
4206 pub struct SdmmcServer<___T: ::fidl_next::Transport> {
4207 server: ::fidl_next::protocol::Server<___T>,
4208 }
4209
4210 impl<___T> SdmmcServer<___T> where ___T: ::fidl_next::Transport {}
4211 }
4212}
4213
4214#[diagnostic::on_unimplemented(
4215 note = "If {Self} implements the non-local SdmmcClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4216)]
4217
4218pub trait SdmmcLocalClientHandler<
4222 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4223 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4224>
4225{
4226}
4227
4228impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Sdmmc
4229where
4230 ___H: SdmmcLocalClientHandler<___T>,
4231 ___T: ::fidl_next::Transport,
4232{
4233 async fn on_event(
4234 handler: &mut ___H,
4235 ordinal: u64,
4236 flexibility: ::fidl_next::protocol::Flexibility,
4237 body: ::fidl_next::Body<___T>,
4238 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4239 match ordinal {
4240 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4241 }
4242 }
4243}
4244
4245#[diagnostic::on_unimplemented(
4246 note = "If {Self} implements the non-local SdmmcServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4247)]
4248
4249pub trait SdmmcLocalServerHandler<
4253 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4254 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4255>
4256{
4257 #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once. The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts. Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`. The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt. The CQHCI\n driver will destroy the peer end upon shutdown, which should be handled by the server as a\n signal to stop monitoring the virtual interrupt and return to monitoring the physical\n interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
4258 fn initialize_command_queueing(
4259 &mut self,
4260
4261 request: ::fidl_next::Request<sdmmc::InitializeCommandQueueing, ___T>,
4262
4263 responder: ::fidl_next::Responder<sdmmc::InitializeCommandQueueing, ___T>,
4264 ) -> impl ::core::future::Future<Output = ()>;
4265
4266 #[doc = " Enables the Command Queueing Engine. The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
4267 fn enable_cqhci(
4268 &mut self,
4269
4270 responder: ::fidl_next::Responder<sdmmc::EnableCqhci, ___T>,
4271 ) -> impl ::core::future::Future<Output = ()>;
4272
4273 #[doc = " Disables the Command Queueing Engine. `EnableCqhci` must have previously been called. From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
4274 fn disable_cqhci(
4275 &mut self,
4276
4277 responder: ::fidl_next::Responder<sdmmc::DisableCqhci, ___T>,
4278 ) -> impl ::core::future::Future<Output = ()>;
4279
4280 #[doc = " Get host info.\n"]
4281 fn host_info(
4282 &mut self,
4283
4284 responder: ::fidl_next::Responder<sdmmc::HostInfo, ___T>,
4285 ) -> impl ::core::future::Future<Output = ()>;
4286
4287 #[doc = " Set signal voltage.\n"]
4288 fn set_signal_voltage(
4289 &mut self,
4290
4291 request: ::fidl_next::Request<sdmmc::SetSignalVoltage, ___T>,
4292
4293 responder: ::fidl_next::Responder<sdmmc::SetSignalVoltage, ___T>,
4294 ) -> impl ::core::future::Future<Output = ()>;
4295
4296 #[doc = " Set bus width.\n"]
4297 fn set_bus_width(
4298 &mut self,
4299
4300 request: ::fidl_next::Request<sdmmc::SetBusWidth, ___T>,
4301
4302 responder: ::fidl_next::Responder<sdmmc::SetBusWidth, ___T>,
4303 ) -> impl ::core::future::Future<Output = ()>;
4304
4305 #[doc = " Set bus frequency, zero means disable the clock to the card.\n"]
4306 fn set_bus_freq(
4307 &mut self,
4308
4309 request: ::fidl_next::Request<sdmmc::SetBusFreq, ___T>,
4310
4311 responder: ::fidl_next::Responder<sdmmc::SetBusFreq, ___T>,
4312 ) -> impl ::core::future::Future<Output = ()>;
4313
4314 #[doc = " Set mmc timing.\n"]
4315 fn set_timing(
4316 &mut self,
4317
4318 request: ::fidl_next::Request<sdmmc::SetTiming, ___T>,
4319
4320 responder: ::fidl_next::Responder<sdmmc::SetTiming, ___T>,
4321 ) -> impl ::core::future::Future<Output = ()>;
4322
4323 #[doc = " Issue a hw reset.\n"]
4324 fn hw_reset(
4325 &mut self,
4326
4327 responder: ::fidl_next::Responder<sdmmc::HwReset, ___T>,
4328 ) -> impl ::core::future::Future<Output = ()>;
4329
4330 #[doc = " Perform tuning.\n"]
4331 fn perform_tuning(
4332 &mut self,
4333
4334 request: ::fidl_next::Request<sdmmc::PerformTuning, ___T>,
4335
4336 responder: ::fidl_next::Responder<sdmmc::PerformTuning, ___T>,
4337 ) -> impl ::core::future::Future<Output = ()>;
4338
4339 #[doc = " Register the given callback to be called when an in-band interrupt is received from the\n card. Before calling the callback the protocol implementation will disable the in-band\n interrupt in the controller. In-band interrupts can be re-enabled by calling\n `AckInBandInterrupt()` once the previous interrupt has been handled by the client.\n"]
4340 fn register_in_band_interrupt(
4341 &mut self,
4342
4343 request: ::fidl_next::Request<sdmmc::RegisterInBandInterrupt, ___T>,
4344
4345 responder: ::fidl_next::Responder<sdmmc::RegisterInBandInterrupt, ___T>,
4346 ) -> impl ::core::future::Future<Output = ()>;
4347
4348 fn ack_in_band_interrupt(&mut self) -> impl ::core::future::Future<Output = ()>;
4349
4350 #[doc = " In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to\n Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32\n value.\n Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit\n field containing SdmmcVmoRight values, and determines the read/write permissions used by\n the implementation when pinning or mapping the VMO. The implementation may pin vmo during\n this call or any time it is used in a request, and may keep it pinned until the VMO is\n unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for\n this VMO to be registered in (that is, two different VMOs may use the same ID if they are\n registered for different clients).\n"]
4351 fn register_vmo(
4352 &mut self,
4353
4354 request: ::fidl_next::Request<sdmmc::RegisterVmo, ___T>,
4355
4356 responder: ::fidl_next::Responder<sdmmc::RegisterVmo, ___T>,
4357 ) -> impl ::core::future::Future<Output = ()>;
4358
4359 #[doc = " The callee unmaps/unpins the VMO and returns ownership to the caller.\n"]
4360 fn unregister_vmo(
4361 &mut self,
4362
4363 request: ::fidl_next::Request<sdmmc::UnregisterVmo, ___T>,
4364
4365 responder: ::fidl_next::Responder<sdmmc::UnregisterVmo, ___T>,
4366 ) -> impl ::core::future::Future<Output = ()>;
4367
4368 #[doc = " Perform the requests in order, atomically (i.e., no intervening requests). Furthermore,\n calls are replied to in the order they are received. If an error occurs, abort any remaining\n requests. Else, return the response of the last request.\n\n The protocol implementation chooses whether or not to use DMA\n depending on the properties of the request and the capabilities of the controller.\n\n Clients are responsible for performing the following cache operations:\n\n After read requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that\n have been mapped by the client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.\n\n Note that writing to any portion of a buffer before Request has returned can corrupt the\n received data.\n\n Before write requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the\n client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.\n"]
4369 fn request(
4370 &mut self,
4371
4372 request: ::fidl_next::Request<sdmmc::Request, ___T>,
4373
4374 responder: ::fidl_next::Responder<sdmmc::Request, ___T>,
4375 ) -> impl ::core::future::Future<Output = ()>;
4376}
4377
4378impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Sdmmc
4379where
4380 ___H: SdmmcLocalServerHandler<___T>,
4381 ___T: ::fidl_next::Transport,
4382 for<'de> crate::wire::CqhciInitializeCommandQueueingRequest: ::fidl_next::Decode<
4383 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4384 Constraint = (),
4385 >,
4386 for<'de> crate::wire::SdmmcSetSignalVoltageRequest: ::fidl_next::Decode<
4387 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4388 Constraint = (),
4389 >,
4390 for<'de> crate::wire::SdmmcSetBusWidthRequest: ::fidl_next::Decode<
4391 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4392 Constraint = (),
4393 >,
4394 for<'de> crate::wire::SdmmcSetBusFreqRequest: ::fidl_next::Decode<
4395 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4396 Constraint = (),
4397 >,
4398 for<'de> crate::wire::SdmmcSetTimingRequest: ::fidl_next::Decode<
4399 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4400 Constraint = (),
4401 >,
4402 for<'de> crate::wire::SdmmcPerformTuningRequest: ::fidl_next::Decode<
4403 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4404 Constraint = (),
4405 >,
4406 for<'de> crate::wire::SdmmcRegisterInBandInterruptRequest: ::fidl_next::Decode<
4407 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4408 Constraint = (),
4409 >,
4410 for<'de> crate::wire::SdmmcRegisterVmoRequest: ::fidl_next::Decode<
4411 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4412 Constraint = (),
4413 >,
4414 for<'de> crate::wire::SdmmcUnregisterVmoRequest: ::fidl_next::Decode<
4415 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4416 Constraint = (),
4417 >,
4418 for<'de> crate::wire::SdmmcRequestRequest<'de>: ::fidl_next::Decode<
4419 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4420 Constraint = (),
4421 >,
4422{
4423 async fn on_one_way(
4424 handler: &mut ___H,
4425 ordinal: u64,
4426 flexibility: ::fidl_next::protocol::Flexibility,
4427 body: ::fidl_next::Body<___T>,
4428 ) -> ::core::result::Result<
4429 (),
4430 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4431 > {
4432 match ordinal {
4433 6808342210488695055 => {
4434 handler.ack_in_band_interrupt().await;
4435 Ok(())
4436 }
4437
4438 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4439 }
4440 }
4441
4442 async fn on_two_way(
4443 handler: &mut ___H,
4444 ordinal: u64,
4445 flexibility: ::fidl_next::protocol::Flexibility,
4446 body: ::fidl_next::Body<___T>,
4447 responder: ::fidl_next::protocol::Responder<___T>,
4448 ) -> ::core::result::Result<
4449 (),
4450 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4451 > {
4452 match ordinal {
4453 359559202570093266 => {
4454 let responder = ::fidl_next::Responder::from_untyped(responder);
4455
4456 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4457 Ok(decoded) => {
4458 handler
4459 .initialize_command_queueing(
4460 ::fidl_next::Request::from_decoded(decoded),
4461 responder,
4462 )
4463 .await;
4464 Ok(())
4465 }
4466 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4467 ordinal: 359559202570093266,
4468 error,
4469 }),
4470 }
4471 }
4472
4473 7267012061448928954 => {
4474 let responder = ::fidl_next::Responder::from_untyped(responder);
4475
4476 handler.enable_cqhci(responder).await;
4477 Ok(())
4478 }
4479
4480 4177196635683073751 => {
4481 let responder = ::fidl_next::Responder::from_untyped(responder);
4482
4483 handler.disable_cqhci(responder).await;
4484 Ok(())
4485 }
4486
4487 8475471856809867100 => {
4488 let responder = ::fidl_next::Responder::from_untyped(responder);
4489
4490 handler.host_info(responder).await;
4491 Ok(())
4492 }
4493
4494 5360485811549546918 => {
4495 let responder = ::fidl_next::Responder::from_untyped(responder);
4496
4497 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4498 Ok(decoded) => {
4499 handler
4500 .set_signal_voltage(
4501 ::fidl_next::Request::from_decoded(decoded),
4502 responder,
4503 )
4504 .await;
4505 Ok(())
4506 }
4507 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4508 ordinal: 5360485811549546918,
4509 error,
4510 }),
4511 }
4512 }
4513
4514 3438431046250338573 => {
4515 let responder = ::fidl_next::Responder::from_untyped(responder);
4516
4517 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4518 Ok(decoded) => {
4519 handler
4520 .set_bus_width(::fidl_next::Request::from_decoded(decoded), responder)
4521 .await;
4522 Ok(())
4523 }
4524 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4525 ordinal: 3438431046250338573,
4526 error,
4527 }),
4528 }
4529 }
4530
4531 6624771772063616636 => {
4532 let responder = ::fidl_next::Responder::from_untyped(responder);
4533
4534 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4535 Ok(decoded) => {
4536 handler
4537 .set_bus_freq(::fidl_next::Request::from_decoded(decoded), responder)
4538 .await;
4539 Ok(())
4540 }
4541 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4542 ordinal: 6624771772063616636,
4543 error,
4544 }),
4545 }
4546 }
4547
4548 7991421876873192632 => {
4549 let responder = ::fidl_next::Responder::from_untyped(responder);
4550
4551 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4552 Ok(decoded) => {
4553 handler
4554 .set_timing(::fidl_next::Request::from_decoded(decoded), responder)
4555 .await;
4556 Ok(())
4557 }
4558 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4559 ordinal: 7991421876873192632,
4560 error,
4561 }),
4562 }
4563 }
4564
4565 3335326454881665312 => {
4566 let responder = ::fidl_next::Responder::from_untyped(responder);
4567
4568 handler.hw_reset(responder).await;
4569 Ok(())
4570 }
4571
4572 5267400993243262226 => {
4573 let responder = ::fidl_next::Responder::from_untyped(responder);
4574
4575 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4576 Ok(decoded) => {
4577 handler
4578 .perform_tuning(::fidl_next::Request::from_decoded(decoded), responder)
4579 .await;
4580 Ok(())
4581 }
4582 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4583 ordinal: 5267400993243262226,
4584 error,
4585 }),
4586 }
4587 }
4588
4589 7280830926204192948 => {
4590 let responder = ::fidl_next::Responder::from_untyped(responder);
4591
4592 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4593 Ok(decoded) => {
4594 handler
4595 .register_in_band_interrupt(
4596 ::fidl_next::Request::from_decoded(decoded),
4597 responder,
4598 )
4599 .await;
4600 Ok(())
4601 }
4602 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4603 ordinal: 7280830926204192948,
4604 error,
4605 }),
4606 }
4607 }
4608
4609 1214620982318353152 => {
4610 let responder = ::fidl_next::Responder::from_untyped(responder);
4611
4612 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4613 Ok(decoded) => {
4614 handler
4615 .register_vmo(::fidl_next::Request::from_decoded(decoded), responder)
4616 .await;
4617 Ok(())
4618 }
4619 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4620 ordinal: 1214620982318353152,
4621 error,
4622 }),
4623 }
4624 }
4625
4626 8712572721256898471 => {
4627 let responder = ::fidl_next::Responder::from_untyped(responder);
4628
4629 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4630 Ok(decoded) => {
4631 handler
4632 .unregister_vmo(::fidl_next::Request::from_decoded(decoded), responder)
4633 .await;
4634 Ok(())
4635 }
4636 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4637 ordinal: 8712572721256898471,
4638 error,
4639 }),
4640 }
4641 }
4642
4643 2766657126441407958 => {
4644 let responder = ::fidl_next::Responder::from_untyped(responder);
4645
4646 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4647 Ok(decoded) => {
4648 handler
4649 .request(::fidl_next::Request::from_decoded(decoded), responder)
4650 .await;
4651 Ok(())
4652 }
4653 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4654 ordinal: 2766657126441407958,
4655 error,
4656 }),
4657 }
4658 }
4659
4660 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4661 }
4662 }
4663}
4664
4665pub trait SdmmcClientHandler<
4669 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4670 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4671>
4672{
4673}
4674
4675impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Sdmmc
4676where
4677 ___H: SdmmcClientHandler<___T> + ::core::marker::Send,
4678 ___T: ::fidl_next::Transport,
4679{
4680 async fn on_event(
4681 handler: &mut ___H,
4682 ordinal: u64,
4683 flexibility: ::fidl_next::protocol::Flexibility,
4684 body: ::fidl_next::Body<___T>,
4685 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4686 match ordinal {
4687 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4688 }
4689 }
4690}
4691
4692pub trait SdmmcServerHandler<
4696 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4697 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4698>
4699{
4700 #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once. The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts. Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`. The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt. The CQHCI\n driver will destroy the peer end upon shutdown, which should be handled by the server as a\n signal to stop monitoring the virtual interrupt and return to monitoring the physical\n interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
4701 fn initialize_command_queueing(
4702 &mut self,
4703
4704 request: ::fidl_next::Request<sdmmc::InitializeCommandQueueing, ___T>,
4705
4706 responder: ::fidl_next::Responder<sdmmc::InitializeCommandQueueing, ___T>,
4707 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4708
4709 #[doc = " Enables the Command Queueing Engine. The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
4710 fn enable_cqhci(
4711 &mut self,
4712
4713 responder: ::fidl_next::Responder<sdmmc::EnableCqhci, ___T>,
4714 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4715
4716 #[doc = " Disables the Command Queueing Engine. `EnableCqhci` must have previously been called. From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
4717 fn disable_cqhci(
4718 &mut self,
4719
4720 responder: ::fidl_next::Responder<sdmmc::DisableCqhci, ___T>,
4721 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4722
4723 #[doc = " Get host info.\n"]
4724 fn host_info(
4725 &mut self,
4726
4727 responder: ::fidl_next::Responder<sdmmc::HostInfo, ___T>,
4728 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4729
4730 #[doc = " Set signal voltage.\n"]
4731 fn set_signal_voltage(
4732 &mut self,
4733
4734 request: ::fidl_next::Request<sdmmc::SetSignalVoltage, ___T>,
4735
4736 responder: ::fidl_next::Responder<sdmmc::SetSignalVoltage, ___T>,
4737 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4738
4739 #[doc = " Set bus width.\n"]
4740 fn set_bus_width(
4741 &mut self,
4742
4743 request: ::fidl_next::Request<sdmmc::SetBusWidth, ___T>,
4744
4745 responder: ::fidl_next::Responder<sdmmc::SetBusWidth, ___T>,
4746 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4747
4748 #[doc = " Set bus frequency, zero means disable the clock to the card.\n"]
4749 fn set_bus_freq(
4750 &mut self,
4751
4752 request: ::fidl_next::Request<sdmmc::SetBusFreq, ___T>,
4753
4754 responder: ::fidl_next::Responder<sdmmc::SetBusFreq, ___T>,
4755 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4756
4757 #[doc = " Set mmc timing.\n"]
4758 fn set_timing(
4759 &mut self,
4760
4761 request: ::fidl_next::Request<sdmmc::SetTiming, ___T>,
4762
4763 responder: ::fidl_next::Responder<sdmmc::SetTiming, ___T>,
4764 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4765
4766 #[doc = " Issue a hw reset.\n"]
4767 fn hw_reset(
4768 &mut self,
4769
4770 responder: ::fidl_next::Responder<sdmmc::HwReset, ___T>,
4771 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4772
4773 #[doc = " Perform tuning.\n"]
4774 fn perform_tuning(
4775 &mut self,
4776
4777 request: ::fidl_next::Request<sdmmc::PerformTuning, ___T>,
4778
4779 responder: ::fidl_next::Responder<sdmmc::PerformTuning, ___T>,
4780 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4781
4782 #[doc = " Register the given callback to be called when an in-band interrupt is received from the\n card. Before calling the callback the protocol implementation will disable the in-band\n interrupt in the controller. In-band interrupts can be re-enabled by calling\n `AckInBandInterrupt()` once the previous interrupt has been handled by the client.\n"]
4783 fn register_in_band_interrupt(
4784 &mut self,
4785
4786 request: ::fidl_next::Request<sdmmc::RegisterInBandInterrupt, ___T>,
4787
4788 responder: ::fidl_next::Responder<sdmmc::RegisterInBandInterrupt, ___T>,
4789 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4790
4791 fn ack_in_band_interrupt(
4792 &mut self,
4793 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4794
4795 #[doc = " In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to\n Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32\n value.\n Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit\n field containing SdmmcVmoRight values, and determines the read/write permissions used by\n the implementation when pinning or mapping the VMO. The implementation may pin vmo during\n this call or any time it is used in a request, and may keep it pinned until the VMO is\n unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for\n this VMO to be registered in (that is, two different VMOs may use the same ID if they are\n registered for different clients).\n"]
4796 fn register_vmo(
4797 &mut self,
4798
4799 request: ::fidl_next::Request<sdmmc::RegisterVmo, ___T>,
4800
4801 responder: ::fidl_next::Responder<sdmmc::RegisterVmo, ___T>,
4802 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4803
4804 #[doc = " The callee unmaps/unpins the VMO and returns ownership to the caller.\n"]
4805 fn unregister_vmo(
4806 &mut self,
4807
4808 request: ::fidl_next::Request<sdmmc::UnregisterVmo, ___T>,
4809
4810 responder: ::fidl_next::Responder<sdmmc::UnregisterVmo, ___T>,
4811 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4812
4813 #[doc = " Perform the requests in order, atomically (i.e., no intervening requests). Furthermore,\n calls are replied to in the order they are received. If an error occurs, abort any remaining\n requests. Else, return the response of the last request.\n\n The protocol implementation chooses whether or not to use DMA\n depending on the properties of the request and the capabilities of the controller.\n\n Clients are responsible for performing the following cache operations:\n\n After read requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that\n have been mapped by the client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.\n\n Note that writing to any portion of a buffer before Request has returned can corrupt the\n received data.\n\n Before write requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the\n client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.\n"]
4814 fn request(
4815 &mut self,
4816
4817 request: ::fidl_next::Request<sdmmc::Request, ___T>,
4818
4819 responder: ::fidl_next::Responder<sdmmc::Request, ___T>,
4820 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4821}
4822
4823impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Sdmmc
4824where
4825 ___H: SdmmcServerHandler<___T> + ::core::marker::Send,
4826 ___T: ::fidl_next::Transport,
4827 for<'de> crate::wire::CqhciInitializeCommandQueueingRequest: ::fidl_next::Decode<
4828 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4829 Constraint = (),
4830 >,
4831 for<'de> crate::wire::SdmmcSetSignalVoltageRequest: ::fidl_next::Decode<
4832 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4833 Constraint = (),
4834 >,
4835 for<'de> crate::wire::SdmmcSetBusWidthRequest: ::fidl_next::Decode<
4836 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4837 Constraint = (),
4838 >,
4839 for<'de> crate::wire::SdmmcSetBusFreqRequest: ::fidl_next::Decode<
4840 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4841 Constraint = (),
4842 >,
4843 for<'de> crate::wire::SdmmcSetTimingRequest: ::fidl_next::Decode<
4844 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4845 Constraint = (),
4846 >,
4847 for<'de> crate::wire::SdmmcPerformTuningRequest: ::fidl_next::Decode<
4848 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4849 Constraint = (),
4850 >,
4851 for<'de> crate::wire::SdmmcRegisterInBandInterruptRequest: ::fidl_next::Decode<
4852 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4853 Constraint = (),
4854 >,
4855 for<'de> crate::wire::SdmmcRegisterVmoRequest: ::fidl_next::Decode<
4856 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4857 Constraint = (),
4858 >,
4859 for<'de> crate::wire::SdmmcUnregisterVmoRequest: ::fidl_next::Decode<
4860 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4861 Constraint = (),
4862 >,
4863 for<'de> crate::wire::SdmmcRequestRequest<'de>: ::fidl_next::Decode<
4864 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4865 Constraint = (),
4866 >,
4867{
4868 async fn on_one_way(
4869 handler: &mut ___H,
4870 ordinal: u64,
4871 flexibility: ::fidl_next::protocol::Flexibility,
4872 body: ::fidl_next::Body<___T>,
4873 ) -> ::core::result::Result<
4874 (),
4875 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4876 > {
4877 match ordinal {
4878 6808342210488695055 => {
4879 handler.ack_in_band_interrupt().await;
4880 Ok(())
4881 }
4882
4883 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4884 }
4885 }
4886
4887 async fn on_two_way(
4888 handler: &mut ___H,
4889 ordinal: u64,
4890 flexibility: ::fidl_next::protocol::Flexibility,
4891 body: ::fidl_next::Body<___T>,
4892 responder: ::fidl_next::protocol::Responder<___T>,
4893 ) -> ::core::result::Result<
4894 (),
4895 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4896 > {
4897 match ordinal {
4898 359559202570093266 => {
4899 let responder = ::fidl_next::Responder::from_untyped(responder);
4900
4901 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4902 Ok(decoded) => {
4903 handler
4904 .initialize_command_queueing(
4905 ::fidl_next::Request::from_decoded(decoded),
4906 responder,
4907 )
4908 .await;
4909 Ok(())
4910 }
4911 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4912 ordinal: 359559202570093266,
4913 error,
4914 }),
4915 }
4916 }
4917
4918 7267012061448928954 => {
4919 let responder = ::fidl_next::Responder::from_untyped(responder);
4920
4921 handler.enable_cqhci(responder).await;
4922 Ok(())
4923 }
4924
4925 4177196635683073751 => {
4926 let responder = ::fidl_next::Responder::from_untyped(responder);
4927
4928 handler.disable_cqhci(responder).await;
4929 Ok(())
4930 }
4931
4932 8475471856809867100 => {
4933 let responder = ::fidl_next::Responder::from_untyped(responder);
4934
4935 handler.host_info(responder).await;
4936 Ok(())
4937 }
4938
4939 5360485811549546918 => {
4940 let responder = ::fidl_next::Responder::from_untyped(responder);
4941
4942 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4943 Ok(decoded) => {
4944 handler
4945 .set_signal_voltage(
4946 ::fidl_next::Request::from_decoded(decoded),
4947 responder,
4948 )
4949 .await;
4950 Ok(())
4951 }
4952 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4953 ordinal: 5360485811549546918,
4954 error,
4955 }),
4956 }
4957 }
4958
4959 3438431046250338573 => {
4960 let responder = ::fidl_next::Responder::from_untyped(responder);
4961
4962 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4963 Ok(decoded) => {
4964 handler
4965 .set_bus_width(::fidl_next::Request::from_decoded(decoded), responder)
4966 .await;
4967 Ok(())
4968 }
4969 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4970 ordinal: 3438431046250338573,
4971 error,
4972 }),
4973 }
4974 }
4975
4976 6624771772063616636 => {
4977 let responder = ::fidl_next::Responder::from_untyped(responder);
4978
4979 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4980 Ok(decoded) => {
4981 handler
4982 .set_bus_freq(::fidl_next::Request::from_decoded(decoded), responder)
4983 .await;
4984 Ok(())
4985 }
4986 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4987 ordinal: 6624771772063616636,
4988 error,
4989 }),
4990 }
4991 }
4992
4993 7991421876873192632 => {
4994 let responder = ::fidl_next::Responder::from_untyped(responder);
4995
4996 match ::fidl_next::AsDecoderExt::into_decoded(body) {
4997 Ok(decoded) => {
4998 handler
4999 .set_timing(::fidl_next::Request::from_decoded(decoded), responder)
5000 .await;
5001 Ok(())
5002 }
5003 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5004 ordinal: 7991421876873192632,
5005 error,
5006 }),
5007 }
5008 }
5009
5010 3335326454881665312 => {
5011 let responder = ::fidl_next::Responder::from_untyped(responder);
5012
5013 handler.hw_reset(responder).await;
5014 Ok(())
5015 }
5016
5017 5267400993243262226 => {
5018 let responder = ::fidl_next::Responder::from_untyped(responder);
5019
5020 match ::fidl_next::AsDecoderExt::into_decoded(body) {
5021 Ok(decoded) => {
5022 handler
5023 .perform_tuning(::fidl_next::Request::from_decoded(decoded), responder)
5024 .await;
5025 Ok(())
5026 }
5027 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5028 ordinal: 5267400993243262226,
5029 error,
5030 }),
5031 }
5032 }
5033
5034 7280830926204192948 => {
5035 let responder = ::fidl_next::Responder::from_untyped(responder);
5036
5037 match ::fidl_next::AsDecoderExt::into_decoded(body) {
5038 Ok(decoded) => {
5039 handler
5040 .register_in_band_interrupt(
5041 ::fidl_next::Request::from_decoded(decoded),
5042 responder,
5043 )
5044 .await;
5045 Ok(())
5046 }
5047 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5048 ordinal: 7280830926204192948,
5049 error,
5050 }),
5051 }
5052 }
5053
5054 1214620982318353152 => {
5055 let responder = ::fidl_next::Responder::from_untyped(responder);
5056
5057 match ::fidl_next::AsDecoderExt::into_decoded(body) {
5058 Ok(decoded) => {
5059 handler
5060 .register_vmo(::fidl_next::Request::from_decoded(decoded), responder)
5061 .await;
5062 Ok(())
5063 }
5064 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5065 ordinal: 1214620982318353152,
5066 error,
5067 }),
5068 }
5069 }
5070
5071 8712572721256898471 => {
5072 let responder = ::fidl_next::Responder::from_untyped(responder);
5073
5074 match ::fidl_next::AsDecoderExt::into_decoded(body) {
5075 Ok(decoded) => {
5076 handler
5077 .unregister_vmo(::fidl_next::Request::from_decoded(decoded), responder)
5078 .await;
5079 Ok(())
5080 }
5081 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5082 ordinal: 8712572721256898471,
5083 error,
5084 }),
5085 }
5086 }
5087
5088 2766657126441407958 => {
5089 let responder = ::fidl_next::Responder::from_untyped(responder);
5090
5091 match ::fidl_next::AsDecoderExt::into_decoded(body) {
5092 Ok(decoded) => {
5093 handler
5094 .request(::fidl_next::Request::from_decoded(decoded), responder)
5095 .await;
5096 Ok(())
5097 }
5098 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5099 ordinal: 2766657126441407958,
5100 error,
5101 }),
5102 }
5103 }
5104
5105 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5106 }
5107 }
5108}
5109
5110impl<___T> SdmmcClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
5111
5112impl<___H, ___T> SdmmcLocalClientHandler<___T> for ::fidl_next::Local<___H>
5113where
5114 ___H: SdmmcClientHandler<___T>,
5115 ___T: ::fidl_next::Transport,
5116{
5117}
5118
5119impl<___H, ___T> SdmmcLocalServerHandler<___T> for ::fidl_next::Local<___H>
5120where
5121 ___H: SdmmcServerHandler<___T>,
5122 ___T: ::fidl_next::Transport,
5123{
5124 async fn initialize_command_queueing(
5125 &mut self,
5126
5127 request: ::fidl_next::Request<sdmmc::InitializeCommandQueueing, ___T>,
5128
5129 responder: ::fidl_next::Responder<sdmmc::InitializeCommandQueueing, ___T>,
5130 ) {
5131 ___H::initialize_command_queueing(&mut self.0, request, responder).await
5132 }
5133
5134 async fn enable_cqhci(&mut self, responder: ::fidl_next::Responder<sdmmc::EnableCqhci, ___T>) {
5135 ___H::enable_cqhci(&mut self.0, responder).await
5136 }
5137
5138 async fn disable_cqhci(
5139 &mut self,
5140
5141 responder: ::fidl_next::Responder<sdmmc::DisableCqhci, ___T>,
5142 ) {
5143 ___H::disable_cqhci(&mut self.0, responder).await
5144 }
5145
5146 async fn host_info(&mut self, responder: ::fidl_next::Responder<sdmmc::HostInfo, ___T>) {
5147 ___H::host_info(&mut self.0, responder).await
5148 }
5149
5150 async fn set_signal_voltage(
5151 &mut self,
5152
5153 request: ::fidl_next::Request<sdmmc::SetSignalVoltage, ___T>,
5154
5155 responder: ::fidl_next::Responder<sdmmc::SetSignalVoltage, ___T>,
5156 ) {
5157 ___H::set_signal_voltage(&mut self.0, request, responder).await
5158 }
5159
5160 async fn set_bus_width(
5161 &mut self,
5162
5163 request: ::fidl_next::Request<sdmmc::SetBusWidth, ___T>,
5164
5165 responder: ::fidl_next::Responder<sdmmc::SetBusWidth, ___T>,
5166 ) {
5167 ___H::set_bus_width(&mut self.0, request, responder).await
5168 }
5169
5170 async fn set_bus_freq(
5171 &mut self,
5172
5173 request: ::fidl_next::Request<sdmmc::SetBusFreq, ___T>,
5174
5175 responder: ::fidl_next::Responder<sdmmc::SetBusFreq, ___T>,
5176 ) {
5177 ___H::set_bus_freq(&mut self.0, request, responder).await
5178 }
5179
5180 async fn set_timing(
5181 &mut self,
5182
5183 request: ::fidl_next::Request<sdmmc::SetTiming, ___T>,
5184
5185 responder: ::fidl_next::Responder<sdmmc::SetTiming, ___T>,
5186 ) {
5187 ___H::set_timing(&mut self.0, request, responder).await
5188 }
5189
5190 async fn hw_reset(&mut self, responder: ::fidl_next::Responder<sdmmc::HwReset, ___T>) {
5191 ___H::hw_reset(&mut self.0, responder).await
5192 }
5193
5194 async fn perform_tuning(
5195 &mut self,
5196
5197 request: ::fidl_next::Request<sdmmc::PerformTuning, ___T>,
5198
5199 responder: ::fidl_next::Responder<sdmmc::PerformTuning, ___T>,
5200 ) {
5201 ___H::perform_tuning(&mut self.0, request, responder).await
5202 }
5203
5204 async fn register_in_band_interrupt(
5205 &mut self,
5206
5207 request: ::fidl_next::Request<sdmmc::RegisterInBandInterrupt, ___T>,
5208
5209 responder: ::fidl_next::Responder<sdmmc::RegisterInBandInterrupt, ___T>,
5210 ) {
5211 ___H::register_in_band_interrupt(&mut self.0, request, responder).await
5212 }
5213
5214 async fn ack_in_band_interrupt(&mut self) {
5215 ___H::ack_in_band_interrupt(&mut self.0).await
5216 }
5217
5218 async fn register_vmo(
5219 &mut self,
5220
5221 request: ::fidl_next::Request<sdmmc::RegisterVmo, ___T>,
5222
5223 responder: ::fidl_next::Responder<sdmmc::RegisterVmo, ___T>,
5224 ) {
5225 ___H::register_vmo(&mut self.0, request, responder).await
5226 }
5227
5228 async fn unregister_vmo(
5229 &mut self,
5230
5231 request: ::fidl_next::Request<sdmmc::UnregisterVmo, ___T>,
5232
5233 responder: ::fidl_next::Responder<sdmmc::UnregisterVmo, ___T>,
5234 ) {
5235 ___H::unregister_vmo(&mut self.0, request, responder).await
5236 }
5237
5238 async fn request(
5239 &mut self,
5240
5241 request: ::fidl_next::Request<sdmmc::Request, ___T>,
5242
5243 responder: ::fidl_next::Responder<sdmmc::Request, ___T>,
5244 ) {
5245 ___H::request(&mut self.0, request, responder).await
5246 }
5247}
5248
5249#[derive(Debug)]
5251pub struct SdmmcService;
5252
5253impl ::fidl_next::DiscoverableService for SdmmcService {
5254 const SERVICE_NAME: &'static str = "fuchsia.hardware.sdmmc.SdmmcService";
5255 const MEMBER_NAMES: &'static [&'static str] = &["sdmmc", "inline_crypto"];
5256}
5257
5258impl ::fidl_next::HasServiceRequest<::fdf_fidl::DriverChannel> for SdmmcService {}
5259
5260impl<___C> ::fidl_next::Service<___C> for SdmmcService
5261where
5262 ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
5263 ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
5264{
5265 type Connector = SdmmcServiceConnector<___C>;
5266}
5267
5268#[repr(transparent)]
5270pub struct SdmmcServiceConnector<___C> {
5271 #[allow(dead_code)]
5272 connector: ___C,
5273}
5274
5275impl<___C> SdmmcServiceConnector<___C>
5276where
5277 ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
5278 ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
5279{
5280 pub fn sdmmc(
5282 &self,
5283 server_end: ::fidl_next::ServerEnd<crate::Sdmmc, ::fdf_fidl::DriverChannel>,
5284 ) -> ::core::result::Result<
5285 (),
5286 <___C as ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>>::Error,
5287 > {
5288 ::fidl_next::protocol::ServiceConnector::<::fdf_fidl::DriverChannel>::connect_to_member(
5289 &self.connector,
5290 "sdmmc",
5291 server_end.into_untyped(),
5292 )
5293 }
5294
5295 pub fn inline_crypto(
5297 &self,
5298 server_end: ::fidl_next::ServerEnd<
5299 ::fidl_next_fuchsia_hardware_inlineencryption::DriverDevice,
5300 ::fdf_fidl::DriverChannel,
5301 >,
5302 ) -> ::core::result::Result<
5303 (),
5304 <___C as ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>>::Error,
5305 > {
5306 ::fidl_next::protocol::ServiceConnector::<::fdf_fidl::DriverChannel>::connect_to_member(
5307 &self.connector,
5308 "inline_crypto",
5309 server_end.into_untyped(),
5310 )
5311 }
5312}
5313
5314pub trait SdmmcServiceHandler {
5316 fn sdmmc(&self, server_end: ::fidl_next::ServerEnd<crate::Sdmmc, ::fdf_fidl::DriverChannel>);
5318
5319 fn inline_crypto(
5321 &self,
5322 server_end: ::fidl_next::ServerEnd<
5323 ::fidl_next_fuchsia_hardware_inlineencryption::DriverDevice,
5324 ::fdf_fidl::DriverChannel,
5325 >,
5326 );
5327}
5328
5329impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for SdmmcService
5330where
5331 ___H: SdmmcServiceHandler,
5332 ::fdf_fidl::DriverChannel: ::fidl_next::InstanceFromServiceTransport<___T>,
5333 ::fdf_fidl::DriverChannel: ::fidl_next::InstanceFromServiceTransport<___T>,
5334{
5335 fn on_connection(handler: &___H, member: &str, server_end: ___T) {
5336 use ::fidl_next::InstanceFromServiceTransport;
5337 match member {
5338 "sdmmc" => handler.sdmmc(::fidl_next::ServerEnd::from_untyped(
5339 ::fdf_fidl::DriverChannel::from_service_transport(server_end),
5340 )),
5341
5342 "inline_crypto" => handler.inline_crypto(::fidl_next::ServerEnd::from_untyped(
5343 ::fdf_fidl::DriverChannel::from_service_transport(server_end),
5344 )),
5345
5346 _ => unreachable!(),
5347 }
5348 }
5349}
5350
5351pub use fidl_next_common_fuchsia_hardware_sdmmc::*;