[−][src]Struct max6955::Max6955
MAX6955 driver
Methods
impl<I2C, E> Max6955<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn new(i2c: I2C) -> Result<Self, E>
[src]
Construct a new MAX6955 driver instance with I2C peripheral and default address of 0x60
.
Arguments
i2c
- I2C interface
Errors
E
- returned in case there was an error reading/writing to the device
pub fn with_address(i2c: I2C, addr: u8) -> Result<Self, E>
[src]
Construct a new MAX6955 driver instance with I2C peripheral and address.
Arguments
i2c
- I2C interfaceaddr
- device address. This can be0x60
~0x6F
. See table 5 in the datasheet.
Errors
E
- returned in case there was an error reading/writing to the device
pub fn set_address(&mut self, addr: u8)
[src]
Set device address
Arguments
addr
- device address. This can be0x60
~0x6F
. See table 5 in the datasheet.
pub fn set_global_intensity(&mut self, intensity: u8) -> Result<(), E>
[src]
pub fn set_blink(&mut self, mode: BlinkMode, rate: BlinkRate) -> Result<(), E>
[src]
Control Blinking
Arguments
mode
-BlinkMode::Enable
: blink,BlinkMode::Disable
: not blinkrate
-BlinkRate::Fast
: 0.5s cycle,BlinkRate::Slow
: 1.0s cycle
pub fn powerup(&mut self) -> Result<(), E>
[src]
Power up Display
pub fn shutdown(&mut self) -> Result<(), E>
[src]
Shutdown Display
pub fn set_digit_type(&mut self, digit_type: DigitType) -> Result<(), E>
[src]
pub fn set_pin_mode(&mut self, port: usize, pin_mode: PinMode) -> Result<(), E>
[src]
pub fn set_decode_mode(&mut self, mode: DecodeMode) -> Result<(), E>
[src]
pub fn test(&mut self, enable: bool) -> Result<(), E>
[src]
pub fn clear_display(&mut self) -> Result<(), E>
[src]
Clear Display
pub fn write_str(&mut self, text: &str) -> Result<(), E>
[src]
Auto Trait Implementations
impl<I2C> Send for Max6955<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for Max6955<I2C> where
I2C: Sync,
I2C: Sync,
impl<I2C> Unpin for Max6955<I2C> where
I2C: Unpin,
I2C: 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>,