Struct io::Pio [] [src]

pub struct Pio<T> {
    port: u16,
    value: PhantomData<T>,
}
[]

Generic PIO

Fields

port
value

Methods

impl<T> Pio<T>

fn new(port: u16) -> Self[]

Create a PIO from a given port

Trait Implementations

impl Io<u8> for Pio<u8>

[]

Read/Write for byte PIO

fn read(&self) -> u8

fn write(&mut self, value: u8)

fn readf(&self, flags: T) -> bool where T: BitAnd<Output=T> + PartialEq<T> + Copy

fn writef(&mut self, flags: T, value: bool) where T: BitAnd<Output=T> + BitOr<Output=T> + Not<Output=T>

impl Io<u16> for Pio<u16>

[]

Read/Write for word PIO

fn read(&self) -> u16

fn write(&mut self, value: u16)

fn readf(&self, flags: T) -> bool where T: BitAnd<Output=T> + PartialEq<T> + Copy

fn writef(&mut self, flags: T, value: bool) where T: BitAnd<Output=T> + BitOr<Output=T> + Not<Output=T>

impl Io<u32> for Pio<u32>

[]

Read/Write for doubleword PIO

fn read(&self) -> u32

fn write(&mut self, value: u32)

fn readf(&self, flags: T) -> bool where T: BitAnd<Output=T> + PartialEq<T> + Copy

fn writef(&mut self, flags: T, value: bool) where T: BitAnd<Output=T> + BitOr<Output=T> + Not<Output=T>

Derived Implementations

impl<T: Clone> Clone for Pio<T>

fn clone(&self) -> Pio<T>

fn clone_from(&mut self, source: &Self)

impl<T: Copy> Copy for Pio<T>