pub struct MAX7219<SPI, CS> { /* private fields */ }
Expand description

The MAX7219 Driver that initializes and communicates with the MAX7219 IC or chain of ICs.

Implementations

Constructor method. Creates a new instance of the MAX7219 driver.

Transmits raw data to the MAX7219 IC.

Arguments
  • arr - slice of data that needs to be transmitted
Errors
  • DriverError - returned if there is an error during transfer or addressing device

Configures the power mode of the MAX7219 IC.

Arguments
  • mode - one of the options in the Shutdown enum

Configures the decode mode on the input sent to the MAX7219 IC.

Arguments
  • mode - one of the options in the DecodeMode enum

Configures the intensity of the LEDs on the display connected to the MAX7219 IC.

Arguments
  • mode - one of the options in the Intensity enum

Configures the scanlimit for the MAX7219 IC. Applicable mostly to seven segment displays if certain digits (ex. on the left) need not to be shown.

Arguments
  • mode - one of the options in the ScanLimit enum

Method to perform a visual test of the display. If performing a test, display needs to be put back in normal operation mode after done.

Arguments
  • mode - one of the options in the DisplayTest enum

Method to draw a row if the MAX7219 is driving an 8x8 LED dot matrix display. Alternatively method will draw a digit in case the MAX7219 is driving a seven-segment display

Arguments
  • digit_addr - one of the options in the DigitRowAddress enum
  • led_data - the led row or seven segment digit activation data

Method to clear the display.

Method to initialize the MAX7219 and the connected display. This method has to be called before doing any display operations otherwise the display will not operate properly. The method provides an option to leave the display uncleared after initalization.

Arguments
  • clr_display - Boolean that reflects whether the display should be cleared or not after init

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.