[−][src]Struct hub75::Hub75
Theory of Operation
This display is essentially split in half, with the top 16 rows being controlled by one set of shift registers (r1, g1, b1) and the botton 16 rows by another set (r2, g2, b2). So, the best way to update it is to show one of the botton and top rows in tandem. The row (between 0-15) is then selected by the A, B, C, D pins, which are just, as one might expect, the bits 0 to 3.
The display doesn't really do brightness, so we have to do it ourselves, by rendering the same frame multiple times, with some pixels being turned of if they are darker (pwm)
Methods
impl<PINS: Outputs> Hub75<PINS>
[src]
pub fn new(pins: PINS, brightness_bits: u8) -> Self
[src]
Create a new hub instance
Takes an implementation of the Outputs trait,
using a tuple (r1, g1, b1, r2, g2, b2, a, b, c, d, clk, lat, oe)
,
with every member implementing OutputPin
is usually the right choice.
brightness_bits
provides the number of brightness_bits for each color (1-8).
More bits allow for much more colors, especially in combination with the gamma correction,
but each extra bit doubles the time output
will take. This might lead to noticable flicker.
3-4 bits are usually a good choice.
pub fn output<DELAY: DelayUs<u8>>(&mut self, delay: &mut DELAY)
[src]
Output the buffer to the display
Takes some time and should be called quite often, otherwise the output will flicker
pub fn clear(&mut self)
[src]
Clear the output
It's a bit faster than using the embedded_graphics interface to do the same
Trait Implementations
impl<PINS: Outputs> Drawing<Rgb565> for Hub75<PINS>
[src]
fn draw<T>(&mut self, item_pixels: T) where
T: IntoIterator<Item = Pixel<Rgb565>>,
[src]
T: IntoIterator<Item = Pixel<Rgb565>>,
impl<PINS: Outputs> SizedDrawing<Rgb565> for Hub75<PINS>
[src]
fn draw_sized<T>(&mut self, item_pixels: T) where
T: IntoIterator<Item = Pixel<Rgb565>> + Dimensions,
[src]
T: IntoIterator<Item = Pixel<Rgb565>> + Dimensions,
Auto Trait Implementations
impl<PINS> Send for Hub75<PINS> where
PINS: Send,
PINS: Send,
impl<PINS> Sync for Hub75<PINS> where
PINS: Sync,
PINS: Sync,
impl<PINS> Unpin for Hub75<PINS> where
PINS: Unpin,
PINS: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,