[][src]Trait spectrusty_core::bus::PortAddress

pub trait PortAddress: Debug {
    pub const ADDRESS_MASK: u16;
    pub const ADDRESS_BITS: u16;
    pub fn match_port(address: u16) -> bool { ... }
}

A helper trait for matching I/O port addresses.

Associated Constants

pub const ADDRESS_MASK: u16[src]

Relevant address bits should be set to 1.

pub const ADDRESS_BITS: u16[src]

Bits from this constant will be matching only if ADDRESS_MASK constains 1 for bits in the same positions.

Loading content...

Provided methods

pub fn match_port(address: u16) -> bool[src]

Returns true if a provided address masked with ADDRESS_MASK matches ADDRESS_BITS.

Loading content...

Implementors

Loading content...