pub trait PortAddress: Debug {
    const ADDRESS_MASK: u16;
    const ADDRESS_BITS: u16;

    fn match_port(address: u16) -> bool { ... }
}
Expand description

A helper trait for matching I/O port addresses.

Required Associated Constants§

Relevant address bits should be set to 1.

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

Provided Methods§

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

Implementors§