Enum ssd1322::command::Command[][src]

pub enum Command {
Show 21 variants EnableGrayScaleTable, SetColumnAddress(u8u8), SetRowAddress(u8u8), SetRemapping(IncrementAxisColumnRemapNibbleRemapComScanDirectionComLayout), SetStartLine(u8), SetDisplayOffset(u8), SetDisplayMode(DisplayMode), EnablePartialDisplay(u8u8), DisablePartialDisplay, SetSleepMode(bool), SetPhaseLengths(u8u8), SetClockFoscDivset(u8u8), SetDisplayEnhancements(boolbool), SetSecondPrechargePeriod(u8), SetDefaultGrayScaleTable, SetPreChargeVoltage(u8), SetComDeselectVoltage(u8), SetContrastCurrent(u8), SetMasterContrast(u8), SetMuxRatio(u8), SetCommandLock(bool),
}
Expand description

Enumerates most of the valid commands that can be sent to the SSD1322 along with their parameter values. Commands which accept an array of similar “arguments” as a slice are encoded by BufCommand instead to avoid lifetime parameters on this enum.

Variants

EnableGrayScaleTable

Enable the gray scale gamma table (see BufCommand::SetGrayScaleTable).

SetColumnAddress(u8u8)

Set the column start and end address range when writing to the display RAM. The column address pointer is reset to the start column address such that WriteImageData will begin writing there. Range is 0-119. (Note 1)

SetRowAddress(u8u8)

Set the row start and end address range when writing to the display RAM. The row address pointer is reset to the start row address such that WriteImageData will begin writing there. Range is 0-127.

Set the direction of display address increment, column address remapping, data nibble remapping, COM scan direction, and COM line layout. See documentation for each enum for details.

SetStartLine(u8)

Set the display start line. Setting this to e.g. 40 will cause the first row of pixels on the display to display row 40 or the display RAM, and rows 0-39 of the display RAM will be wrapped to the bottom, “rolling” the displayed image upwards. This transformation is applied before the MUX ratio setting, meaning if the MUX ratio is set to 90, display rows 0->89 will always be active, and the “rolled” image will be rendered within those display rows. Range is 0-127.

SetDisplayOffset(u8)

Set the display COM line offset. This has a similar effect to SetStartLine, rolling the displayed image upwards as the values increase, except that it is applied after the MUX ratio setting. This means both the image and the display rows seleced by the MUX ratio setting will be rolled upwards. Range is 0-127.

SetDisplayMode(DisplayMode)

Set the display operating mode. See enum for details.

EnablePartialDisplay(u8u8)

Enable partial display mode. This selects an inclusive range of rows start and end in the display area which will be active, while all others remain inactive. Range is 0-127, where start must be <= end.

DisablePartialDisplay

Disable partial display mode.

SetSleepMode(bool)

Control sleep mode. When sleep mode is enabled (true), the display multiplexer and driver circuits are powered off.

SetPhaseLengths(u8u8)

Set the refresh phase lengths. The first phase (reset) can be set from 5-31 DCLKs, and the second (first pre-charge) can be set from 3-15 DCLKs. The display module datasheet should have appropriate values.

SetClockFoscDivset(u8u8)

Set the oscillator frequency Fosc and the display clock divider. The relationship between the frequency settings 0-15 and the actual Fosc value is not documented, except that higher values increase the frequency. The divider DIVSET is a value n from 0-10, where DCLK is produced by dividing Fosc by 2^n. The resulting DCLK rate indirectly determines the refresh rate of the display (the exact rate depends on the MUX ratio and some other things).

SetDisplayEnhancements(boolbool)

Enable or disable display enhancements “external VSL” and “Enhanced low GS display quality”.

SetSecondPrechargePeriod(u8)

Set the second pre-charge period. Range 0-15 DCLKs.

SetDefaultGrayScaleTable

Set the gray scale gamma table to the factory default.

SetPreChargeVoltage(u8)

Set the pre-charge voltage level, from 0.2Vcc to 0.6Vcc. Range 0-31.

SetComDeselectVoltage(u8)

Set the COM deselect voltage level, from 0.72Vcc to 0.86Vcc. Range 0-7.

SetContrastCurrent(u8)

Set the contrast current. Range 0-255.

SetMasterContrast(u8)

Set the master contrast control, uniformly reducing all grayscale levels by 0-15 sixteenths. Range 0 (maximum dimming) to 15 (normal contrast).

SetMuxRatio(u8)

Set the MUX ratio, which controls the number of COM lines that are active and thus the number of display pixel rows which are active. Which COM lines are active is controlled by SetDisplayOffset, and how the COM lines map to display RAM row addresses is controlled by SetStartLine. Range 16-128.

SetCommandLock(bool)

Set whether the command lock is enabled or disabled. Enabling the command lock (true) blocks all commands except SetCommandLock.

Implementations

Transmit the command encoded by self to the display on interface iface.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.