[−][src]Struct rpi_led_matrix::LedMatrixOptions
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.
- direct
- Stripe
- Checkered
- Spiral
- ZStripe
- ZnMirrorZStripe
- coreman
- Kaler2Scan
- ZStripeUneven
- P10-128x4-Z
- QiangLiQ8
- InversedZStripe
- P10Outdoor1R1G1-1
- P10Outdoor1R1G1-2
- P10Outdoor1R1G1-3
- P10CoremanMapper
- P8Outdoor1R1G1
pub fn set_row_addr_type(&mut self, row_addr_type: u32)
[src]
Sets the type of row addressing to be used.
- default
- AB-addressed panels
- direct row select
- ABC-addressed panels
- 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
impl RefUnwindSafe for LedMatrixOptions
impl !Send for LedMatrixOptions
impl !Sync for LedMatrixOptions
impl Unpin for LedMatrixOptions
impl UnwindSafe for LedMatrixOptions
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>,