Enum ssd1306::command::Command

source ·
pub enum Command {
Show 27 variants Contrast(u8), AllOn(bool), Invert(bool), DisplayOn(bool), HScrollSetup(HScrollDir, Page, Page, NFrames), VHScrollSetup(VHScrollDir, Page, Page, NFrames, u8), EnableScroll(bool), VScrollArea(u8, u8), LowerColStart(u8), UpperColStart(u8), ColStart(u8), AddressMode(AddrMode), ColumnAddress(u8, u8), PageAddress(Page, Page), PageStart(Page), StartLine(u8), SegmentRemap(bool), Multiplex(u8), ReverseComDir(bool), DisplayOffset(u8), ComPinConfig(bool, bool), DisplayClockDiv(u8, u8), PreChargePeriod(u8, u8), VcomhDeselect(VcomhLevel), Noop, ChargePump(bool), InternalIref(bool, bool),
}
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(HScrollDir, Page, Page, NFrames)

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

§

VHScrollSetup(VHScrollDir, Page, Page, NFrames, u8)

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(u8, u8)

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(u8, u8)

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

§

PageAddress(Page, Page)

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 multiplex 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(bool, bool)

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(u8, u8)

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

§

PreChargePeriod(u8, u8)

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(bool, bool)

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

Implementations§

source§

impl Command

source

pub fn send<DI>(self, iface: &mut DI) -> Result<(), DisplayError>

Send command to SSD1306

Trait Implementations§

source§

impl Clone for Command

source§

fn clone(&self) -> Command

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Command

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for Command

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.