Trait rstubs::arch::io::PortRaw

source ·
pub trait PortRaw: Sized + Copy {
    // Required methods
    unsafe fn read(addr: u16) -> Self;
    unsafe fn write(self, addr: u16);
}
Expand description

A raw value that can be written/read to/from IO ports.

It is implemented for [u8], [u16], and [u32].

Required Methods§

source

unsafe fn read(addr: u16) -> Self

Write to the specified port addr

source

unsafe fn write(self, addr: u16)

Read from the specified port addr

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PortRaw for u8

source§

unsafe fn write(self, addr: u16)

source§

unsafe fn read(addr: u16) -> Self

source§

impl PortRaw for u16

source§

unsafe fn write(self, addr: u16)

source§

unsafe fn read(addr: u16) -> Self

source§

impl PortRaw for u32

source§

unsafe fn write(self, addr: u16)

source§

unsafe fn read(addr: u16) -> Self

Implementors§