Enum ssd1322::command::Command [−][src]
pub enum Command {}Show 21 variants
EnableGrayScaleTable, SetColumnAddress(u8, u8), SetRowAddress(u8, u8), SetRemapping(IncrementAxis, ColumnRemap, NibbleRemap, ComScanDirection, ComLayout), SetStartLine(u8), SetDisplayOffset(u8), SetDisplayMode(DisplayMode), EnablePartialDisplay(u8, u8), DisablePartialDisplay, SetSleepMode(bool), SetPhaseLengths(u8, u8), SetClockFoscDivset(u8, u8), SetDisplayEnhancements(bool, bool), 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
Enable the gray scale gamma table (see BufCommand::SetGrayScaleTable
).
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)
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.
SetRemapping(IncrementAxis, ColumnRemap, NibbleRemap, ComScanDirection, ComLayout)
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.
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
.
Disable partial display mode.
SetSleepMode(bool)
Control sleep mode. When sleep mode is enabled (true
), the display multiplexer and driver
circuits are powered off.
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.
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).
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.
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
pub fn send<DI>(self, iface: &mut DI) -> Result<(), CommandError<DI::Error>> where
DI: DisplayInterface,
pub fn send<DI>(self, iface: &mut DI) -> Result<(), CommandError<DI::Error>> where
DI: DisplayInterface,
Transmit the command encoded by self
to the display on interface iface
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Command
impl UnwindSafe for Command
Blanket Implementations
Mutably borrows from an owned value. Read more