Lines Matching full:backend
195 ) -> <IO::Backend as IoBackend>::View<'a, U> { in io_view_assert()
203 let ptr = IO::Backend::as_ptr(view); in io_view_assert()
207 unsafe { IO::Backend::project_view(view, projected_ptr) } in io_view_assert()
215 ) -> Result<<IO::Backend as IoBackend>::View<'a, U>> { in io_view()
217 let ptr = IO::Backend::as_ptr(view); in io_view()
226 Ok(unsafe { IO::Backend::project_view(view, projected_ptr) }) in io_view()
242 /// View type for this I/O backend.
243 type View<'a, T: ?Sized + KnownSize>: IoBase<'a, Backend = Self, Target = T>;
247 /// The returned pointer is private implementation detail of the backend; it is likely not
264 /// Trait indicating that an I/O backend supports operations of a certain type and providing an
280 /// Trait indicating that an I/O backend supports memory copy operations.
392 /// This trait defines which backend shall be used for I/O operations and provides a method to
399 type Backend: IoBackend; typedef
405 fn as_view(self) -> <Self::Backend as IoBackend>::View<'a, Self::Target>; in as_view()
419 KnownSize::size(Self::Backend::as_ptr(self.as_view())) in size()
428 Self::Backend::as_ptr(self.as_view()).len() in len()
465 fn try_cast<U>(self) -> Result<<Self::Backend as IoBackend>::View<'a, U>> in try_cast()
471 let ptr = Self::Backend::as_ptr(view); in try_cast()
482 Ok(unsafe { Self::Backend::project_view(view, ptr.cast()) }) in try_cast()
487 /// This only works for primitives supported by the I/O backend.
501 Self::Backend: IoCapable<Self::Target>, in read_val()
504 Self::Backend::io_read(self.as_view()) in read_val()
509 /// This only works for primitives supported by the I/O backend.
523 Self::Backend: IoCapable<Self::Target>, in write_val()
526 Self::Backend::io_write(self.as_view(), value) in write_val()
550 Self::Backend: IoCopyable, in copy_read()
553 Self::Backend::copy_read(self.as_view()) in copy_read()
577 Self::Backend: IoCopyable, in copy_write()
580 Self::Backend::copy_write(self.as_view(), value); in copy_write()
602 Self::Backend: IoCopyable, in copy_from_slice()
609 Self::Backend::copy_to_io(self.as_view(), data.as_ptr()); in copy_from_slice()
633 Self::Backend: IoCopyable, in copy_to_slice()
640 Self::Backend::copy_from_io(self.as_view(), data.as_mut_ptr()); in copy_to_slice()
649 Self::Backend: IoCapable<u8>, in try_read8()
659 Self::Backend: IoCapable<u16>, in try_read16()
669 Self::Backend: IoCapable<u32>, in try_read32()
679 Self::Backend: IoCapable<u64>, in try_read64()
689 Self::Backend: IoCapable<u8>, in try_write8()
699 Self::Backend: IoCapable<u16>, in try_write16()
709 Self::Backend: IoCapable<u32>, in try_write32()
719 Self::Backend: IoCapable<u64>, in try_write64()
731 Self::Backend: IoCapable<u8>, in read8()
743 Self::Backend: IoCapable<u16>, in read16()
755 Self::Backend: IoCapable<u32>, in read32()
767 Self::Backend: IoCapable<u64>, in read64()
779 Self::Backend: IoCapable<u8>, in write8()
791 Self::Backend: IoCapable<u16>, in write16()
803 Self::Backend: IoCapable<u32>, in write32()
815 Self::Backend: IoCapable<u64>, in write64()
847 Self::Backend: IoCapable<L::IoType>, in try_read()
850 Ok(Self::Backend::io_read(view).into()) in try_read()
880 Self::Backend: IoCapable<L::IoType>, in try_write()
884 Self::Backend::io_write(view, io_value); in try_write()
925 Self::Backend: IoCapable<L::IoType>, in try_write_reg()
958 Self::Backend: IoCapable<L::IoType>, in try_update()
963 let value: T = Self::Backend::io_read(view).into(); in try_update()
965 Self::Backend::io_write(view, io_value); in try_update()
995 Self::Backend: IoCapable<L::IoType>, in read()
998 Self::Backend::io_read(view).into() in read()
1026 Self::Backend: IoCapable<L::IoType>, in write()
1030 Self::Backend::io_write(view, io_value); in write()
1069 Self::Backend: IoCapable<L::IoType>, in write_reg()
1102 Self::Backend: IoCapable<L::IoType>, in update()
1106 let value: T = Self::Backend::io_read(view).into(); in update()
1108 Self::Backend::io_write(view, io_value); in update()
1157 type Backend = MmioBackend; typedef
1166 /// I/O Backend for memory-mapped I/O.
1191 /// Implements [`IoCapable`] on `$backend` for `$ty` using `$read_fn` and `$write_fn`.
1193 ($backend: ident, $ty:ty, $read_fn:ident, $write_fn:ident) => {
1194 impl IoCapable<$ty> for $backend {
1196 fn io_read(view: <$backend as IoBackend>::View<'_, $ty>) -> $ty {
1197 // SAFETY: `$backend::as_ptr(view)` is a valid pointer for MMIO operations for both
1199 unsafe { bindings::$read_fn($backend::as_ptr(view).cast_const().cast()) }
1203 fn io_write(view: <$backend as IoBackend>::View<'_, $ty>, value: $ty) {
1204 // SAFETY: `$backend::as_ptr(view)` is a valid pointer for MMIO operations for both
1206 unsafe { bindings::$write_fn(value, $backend::as_ptr(view).cast()) }
1258 /// I/O Backend for memory-mapped I/O, with relaxed access semantics.
1280 type Backend = RelaxedMmioBackend; typedef
1325 /// I/O Backend for system memory.
1479 type Backend = SysMemBackend; typedef
1483 fn as_view(self) -> <Self::Backend as IoBackend>::View<'a, Self::Target> { in as_view()
1488 /// I/O Backend for [`IoSysMap`].
1616 type Backend = IoSysMapBackend; typedef
1633 T: Io<'a, Backend: IoBackend<View<'a, T::Target> = T>>,
1638 T::Backend::as_ptr(self.0) in as_ptr()
1648 ) -> <T::Backend as IoBackend>::View<'a, U> { in project_view()
1650 unsafe { T::Backend::project_view::<T::Target, _>(self.0, ptr) } in project_view()