[][src]Struct rpi_led_matrix::LedMatrixOptions

#[repr(C)]pub struct LedMatrixOptions { /* fields omitted */ }

The Rust representation of LedMatrixOptions, which contains parameters to specify your hardware setup.

Implementations

impl LedMatrixOptions[src]

pub fn new() -> LedMatrixOptions[src]

Creates a new LedMatrixOptions struct with the default parameters.

use rpi_led_matrix::{LedMatrix,LedMatrixOptions};
let mut options = LedMatrixOptions::new();
options.set_hardware_mapping("adafruit-hat-pwm");
let matrix = LedMatrix::new(Some(options), None).unwrap();

pub fn set_hardware_mapping(&mut self, mapping: &str)[src]

Sets the type of GPIO mapping used (e.g., "adafruit-hat-pwm").

pub fn set_rows(&mut self, rows: u32)[src]

Sets the number of rows on the panels being used. Typically 8, 16, 32 or 64.

pub fn set_cols(&mut self, cols: u32)[src]

Sets the number of columns on the panels being used. Typically 32 or 64.

pub fn set_chain_length(&mut self, chain_length: u32)[src]

Sets the number of panels daisy-chained together.

pub fn set_parallel(&mut self, parallel: u32)[src]

Sets the number of parallel chains. Valid range: [1,3].

pub fn set_pwm_bits(&mut self, pwm_bits: u8) -> Result<(), &'static str>[src]

Sets the number of PWM bits to use. Valid range: [1,11].

pub fn set_pwm_lsb_nanoseconds(&mut self, pwm_lsb_nanoseconds: u32)[src]

Sets the number of nanoseconds of delay for our LSB

pub fn set_brightness(&mut self, brightness: u8) -> Result<(), &'static str>[src]

Sets the pannel brightness in percent.

pub fn set_scan_mode(&mut self, scan_mode: u32)[src]

Sets the scan mode. 0: progressive, 1: interlaced.

pub fn set_led_rgb_sequence(&mut self, sequence: &str)[src]

Sets the ordering of the LEDs on your panel.

pub fn set_pixel_mapper_config(&mut self, mapper: &str)[src]

Semicolon-separated list of pixel-mappers to arrange pixels (e.g. "U-mapper;Rotate:90").

Valid mapping options

  • Mirror
  • Rotate:
  • U-mapper
  • V-mapper

pub fn set_hardware_pulsing(&mut self, enable: bool)[src]

Sets if hardware pin-pulse generation should be used.

pub fn set_refresh_rate(&mut self, enable: bool)[src]

Configures if the current refresh rate should be printed by the C++ library.

pub fn set_inverse_colors(&mut self, enable: bool)[src]

If set, invert the color displayed.

pub fn set_multiplexing(&mut self, multiplexing: u32)[src]

Sets the type of multiplexing used.

  1. direct
  2. Stripe
  3. Checkered
  4. Spiral
  5. ZStripe
  6. ZnMirrorZStripe
  7. coreman
  8. Kaler2Scan
  9. ZStripeUneven
  10. P10-128x4-Z
  11. QiangLiQ8
  12. InversedZStripe
  13. P10Outdoor1R1G1-1
  14. P10Outdoor1R1G1-2
  15. P10Outdoor1R1G1-3
  16. P10CoremanMapper
  17. P8Outdoor1R1G1

pub fn set_row_addr_type(&mut self, row_addr_type: u32)[src]

Sets the type of row addressing to be used.

  1. default
  2. AB-addressed panels
  3. direct row select
  4. ABC-addressed panels
  5. ABC Shift + DE direct

pub fn set_limit_refresh(&mut self, limit_refresh: u32)[src]

Limit refresh rate to this frequency in Hz. (0 = no limit)

Useful to keep a constant refresh rate on loaded system.

pub fn set_pwm_dither_bits(&mut self, pwm_dither_bits: u32)[src]

Configures how many bits to use for time-based dithering.

pub fn set_panel_type(&mut self, panel_type: &str)[src]

Needed to initialize special panels. Supported: 'FM6126A', 'FM6127'

Trait Implementations

impl Debug for LedMatrixOptions[src]

impl Default for LedMatrixOptions[src]

impl Drop for LedMatrixOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.