Struct spark_ser7seg::i2c::SevSegI2c [−][src]
Implementations
impl<I2C> SevSegI2c<I2C> where
I2C: Write,
[src]
I2C: Write,
pub fn new(i2c: I2C, addr: Option<u8>) -> Self
[src]
Create a new SparkFun Serial Seven Segment display using an I2C port. The I2C port supports 100kHz and 400kHz modes.
If no address is supplied, the default 7-bit address of 0x71
will be used.
pub fn set_address(&mut self, addr: u8)
[src]
Update the address of the display used by the library.
This does NOT reconfigure the display to use this new address.
For now, this is probably not useful until we implement the "change address" command in the main interface.
pub fn release(self) -> I2C
[src]
Release the components
Trait Implementations
impl<I2C> SevenSegInterface for SevSegI2c<I2C> where
I2C: Write,
[src]
I2C: Write,
type InterfaceError = I2cError<I2C::Error>
A single error type used by the interface
fn send(&mut self, data: &[u8]) -> Result<(), Error<Self::InterfaceError>>
[src]
fn set_cursor(&mut self, col: u8) -> Result<(), Error<Self::InterfaceError>>
[src]
fn set_brightness(
&mut self,
bright: u8
) -> Result<(), Error<Self::InterfaceError>>
[src]
&mut self,
bright: u8
) -> Result<(), Error<Self::InterfaceError>>
fn clear(&mut self) -> Result<(), Error<Self::InterfaceError>>
[src]
fn write_digit(&mut self, digit: u8) -> Result<(), Error<Self::InterfaceError>>
[src]
fn write_punctuation(
&mut self,
punct_flags: PunctuationFlags
) -> Result<(), Error<Self::InterfaceError>>
[src]
&mut self,
punct_flags: PunctuationFlags
) -> Result<(), Error<Self::InterfaceError>>
fn write_digits(
&mut self,
digits: &[u8]
) -> Result<(), Error<Self::InterfaceError>>
[src]
&mut self,
digits: &[u8]
) -> Result<(), Error<Self::InterfaceError>>
fn set_num(&mut self, num: u16) -> Result<(), Error<Self::InterfaceError>>
[src]
Auto Trait Implementations
impl<I2C> Send for SevSegI2c<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for SevSegI2c<I2C> where
I2C: Sync,
I2C: Sync,
impl<I2C> Unpin for SevSegI2c<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,
pub 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.
pub 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>,