[−][src]Struct spark_ser7seg::SevSegSpim
Methods
impl<SPIM, CS> SevSegSpim<SPIM, CS> where
SPIM: Write<u8>,
CS: OutputPin,
[src]
SPIM: Write<u8>,
CS: OutputPin,
pub fn new(spim: SPIM, csn: CS) -> Self
[src]
Create a new SparkFun Serial Seven Segment display using a SPI (Master) port. The SPI port has a maximum frequency of 250kHz, and must be in Mode 0.
pub fn set_cursor(&mut self, col: u8) -> Result<(), Error<SPIM::Error>>
[src]
Set the digit cursor to a particular location
col
may be 0..=3, from left to right.
pub fn clear(&mut self) -> Result<(), Error<SPIM::Error>>
[src]
Completely clear the display
pub fn write_digit(&mut self, digit: u8) -> Result<(), Error<SPIM::Error>>
[src]
Write a digit to the curent cursor position. This also increments the cursor position
pub fn write_punctuation(
&mut self,
punct_flags: PunctuationFlags
) -> Result<(), Error<SPIM::Error>>
[src]
&mut self,
punct_flags: PunctuationFlags
) -> Result<(), Error<SPIM::Error>>
Write the requested punctuation to the display. This does not take
the current state into account, so any unset flags in punct_flags
will turn the corresponding LEDs off.
pub fn write_digits(&mut self, digits: &[u8]) -> Result<(), Error<SPIM::Error>>
[src]
Write the requested digits to the display, starting at the current cursor position. Each digit must be in the range 0x0..=0xF, and up to 4 digits may be updated at once. The cursor is incremented after each digit
pub fn set_num(&mut self, num: u16) -> Result<(), Error<SPIM::Error>>
[src]
Write the number to the display. The number will be left-filled with zeroes if necessary. After this function, the cursor will be at position 0.
Auto Trait Implementations
impl<SPIM, CS> Send for SevSegSpim<SPIM, CS> where
CS: Send,
SPIM: Send,
CS: Send,
SPIM: Send,
impl<SPIM, CS> Sync for SevSegSpim<SPIM, CS> where
CS: Sync,
SPIM: Sync,
CS: Sync,
SPIM: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,