pub enum Command {
Show 27 variants Contrast(u8), AllOn(bool), Invert(bool), DisplayOn(bool), HScrollSetup(HScrollDirPagePageNFrames), VHScrollSetup(VHScrollDirPagePageNFramesu8), EnableScroll(bool), VScrollArea(u8u8), LowerColStart(u8), UpperColStart(u8), ColStart(u8), AddressMode(AddrMode), ColumnAddress(u8u8), PageAddress(PagePage), PageStart(Page), StartLine(u8), SegmentRemap(bool), Multiplex(u8), ReverseComDir(bool), DisplayOffset(u8), ComPinConfig(boolbool), DisplayClockDiv(u8u8), PreChargePeriod(u8u8), VcomhDeselect(VcomhLevel), Noop, ChargePump(bool), InternalIref(boolbool),
}
Expand description

SSD1306 Commands Commands

Variants

Contrast(u8)

Set contrast. Higher number is higher contrast. Default = 0x7F

AllOn(bool)

Turn entire display on. If set, all pixels will be set to on, if not, the value in memory will be used.

Invert(bool)

Invert display.

DisplayOn(bool)

Turn display on or off.

HScrollSetup(HScrollDirPagePageNFrames)

Set up horizontal scrolling. Values are scroll direction, start page, end page, and number of frames per step.

VHScrollSetup(VHScrollDirPagePageNFramesu8)

Set up horizontal + vertical scrolling. Values are scroll direction, start page, end page, number of frames per step, and vertical scrolling offset. Scrolling offset may be from 0-63

EnableScroll(bool)

Enable scrolling

VScrollArea(u8u8)

Setup vertical scroll area. Values are number of rows above scroll area (0-63) and number of rows of scrolling. (0-64)

LowerColStart(u8)

Set the lower nibble of the column start address register for Page addressing mode, using the lower 4 bits given. This is only for page addressing mode

UpperColStart(u8)

Set the upper nibble of the column start address register for Page addressing mode, using the lower 4 bits given. This is only for page addressing mode

ColStart(u8)

Set the column start address register for Page addressing mode. Combines LowerColStart and UpperColStart This is only for page addressing mode

AddressMode(AddrMode)

Set addressing mode

ColumnAddress(u8u8)

Setup column start and end address values range from 0-127 This is only for horizontal or vertical addressing mode

PageAddress(PagePage)

Setup page start and end address This is only for horizontal or vertical addressing mode

PageStart(Page)

Set GDDRAM page start address for Page addressing mode

StartLine(u8)

Set display start line from 0-63

SegmentRemap(bool)

Reverse columns from 127-0

Multiplex(u8)

Set multipex ratio from 15-63 (MUX-1)

ReverseComDir(bool)

Scan from COM[n-1] to COM0 (where N is mux ratio)

DisplayOffset(u8)

Set vertical shift

ComPinConfig(boolbool)

Setup com hardware configuration First value indicates sequential (false) or alternative (true) pin configuration. Second value disables (false) or enables (true) left/right remap.

DisplayClockDiv(u8u8)

Set up display clock. First value is oscillator frequency, increasing with higher value Second value is divide ratio - 1

PreChargePeriod(u8u8)

Set up phase 1 and 2 of precharge period. Each value must be in the range 1 - 15.

VcomhDeselect(VcomhLevel)

Set Vcomh Deselect level

Noop

NOOP

ChargePump(bool)

Enable charge pump

InternalIref(boolbool)

Select external or internal I REF. Only for 72 x 40 display with SSD1306B driver

Implementations

Send command to SSD1306

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Casts the value.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.

Returns the argument unchanged.

Calls U::from(self).

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

Casts the value.
Casts the value.
Casts the value.
Casts the value.
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.
Casts the value.
Casts the value.
Casts the value.
Casts the value.