Skip to main content

PinMap

Struct PinMap 

Source
pub struct PinMap {
    pub red0: usize,
    pub grn0: usize,
    pub blu0: usize,
    pub red1: usize,
    pub grn1: usize,
    pub blu1: usize,
    pub addr_lsb: usize,
    pub addr_bits: usize,
    pub latch: usize,
    pub oe: usize,
    pub spare: [usize; 3],
}
Expand description

Bit position of every HUB75 signal within one framebuffer word.

Naming note: color0_* (the red0/grn0/blu0 fields) carry the upper-half R0/G0/B0 triplet and drive the red1/grn1/blu1 accessors, while color1_* (red1/grn1/blu1 fields) carry the lower-half R1/G1/B1 triplet and drive red2/grn2/blu2.

The three colour signals of a triplet are assumed to be contiguous with red as the least-significant bit (true of every supported layout); the exact per-channel bits are recorded anyway so a driver can verify the wiring.

Fields§

§red0: usize

Bit of the upper-half red signal (R0, red1 accessor).

§grn0: usize

Bit of the upper-half green signal (G0, grn1 accessor).

§blu0: usize

Bit of the upper-half blue signal (B0, blu1 accessor).

§red1: usize

Bit of the lower-half red signal (R1, red2 accessor).

§grn1: usize

Bit of the lower-half green signal (G1, grn2 accessor).

§blu1: usize

Bit of the lower-half blue signal (B1, blu2 accessor).

§addr_lsb: usize

Least-significant bit of the row-address field (A).

§addr_bits: usize

Width of the row-address field in bits (A..E = 5).

§latch: usize

Bit of the latch / strobe (LAT) signal.

§oe: usize

Bit of the output-enable (OE) signal.

§spare: [usize; 3]

The unused (“spare”) bits in the word. The 16-bit layouts expose these through the dummy0/dummy1/dummy2 accessors; set to usize::MAX when unused.

Implementations§

Source§

impl PinMap

Source

pub const fn oe_mask(&self) -> u16

Mask covering the output-enable bit.

Source

pub const fn latch_mask(&self) -> u16

Mask covering the latch bit.

Source

pub const fn color0_mask(&self) -> u16

Mask covering the upper-half R0/G0/B0 colour bits.

Source

pub const fn color1_mask(&self) -> u16

Mask covering the lower-half R1/G1/B1 colour bits.

Source

pub const fn color_mask(&self) -> u16

Mask covering every colour bit.

Source

pub const fn addr_mask(&self) -> u16

Mask covering the whole row-address field.

Source

pub const fn addr_msb(&self) -> usize

Most-significant bit of the row-address field.

Trait Implementations§

Source§

impl Clone for PinMap

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for PinMap

Source§

impl Debug for PinMap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for PinMap

Source§

impl PartialEq for PinMap

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PinMap

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.