pub struct USPIBridgeConfig {
pub device_count: u8,
pub segment_mappings: Vec<SegmentMapping>,
pub default_brightness: u8,
pub max_virtual_devices: u8,
}Expand description
uSPIBridge configuration for multiple MAX7219 devices
Fields§
§device_count: u8Number of MAX7219 devices in the daisy chain
segment_mappings: Vec<SegmentMapping>Segment mappings for each device
default_brightness: u8Default brightness level (0-15)
max_virtual_devices: u8Maximum number of virtual devices supported
Implementations§
Source§impl USPIBridgeConfig
impl USPIBridgeConfig
Sourcepub fn with_device_count(self, count: u8) -> Self
pub fn with_device_count(self, count: u8) -> Self
Set the number of devices in the daisy chain
Sourcepub fn with_segment_mapping(
self,
device_id: usize,
mapping: SegmentMapping,
) -> Self
pub fn with_segment_mapping( self, device_id: usize, mapping: SegmentMapping, ) -> Self
Set the segment mapping for a specific device
Sourcepub fn with_all_devices_segment_mapping(self, mapping: SegmentMapping) -> Self
pub fn with_all_devices_segment_mapping(self, mapping: SegmentMapping) -> Self
Set the same segment mapping for all devices
Sourcepub fn with_default_brightness(self, brightness: u8) -> Self
pub fn with_default_brightness(self, brightness: u8) -> Self
Set the default brightness level
Sourcepub fn with_max_virtual_devices(self, max_devices: u8) -> Self
pub fn with_max_virtual_devices(self, max_devices: u8) -> Self
Set the maximum number of virtual devices
Trait Implementations§
Source§impl Clone for USPIBridgeConfig
impl Clone for USPIBridgeConfig
Source§fn clone(&self) -> USPIBridgeConfig
fn clone(&self) -> USPIBridgeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for USPIBridgeConfig
impl Debug for USPIBridgeConfig
Auto Trait Implementations§
impl Freeze for USPIBridgeConfig
impl RefUnwindSafe for USPIBridgeConfig
impl Send for USPIBridgeConfig
impl Sync for USPIBridgeConfig
impl Unpin for USPIBridgeConfig
impl UnsafeUnpin for USPIBridgeConfig
impl UnwindSafe for USPIBridgeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more