Enum capsules_extra::ssd1306::Command

source ·
#[repr(usize)]
pub enum Command {
Show 25 variants SetChargePump { enable: bool, }, SetContrast { contrast: u8, }, EntireDisplayOn { ignore_ram: bool, }, SetDisplayInvert { inverse: bool, }, SetDisplayOnOff { on: bool, }, ContinuousHorizontalScroll { left: bool, page_start: u8, interval: u8, page_end: u8, }, ContinuousVerticalHorizontalScroll { left: bool, page_start: u8, interval: u8, page_end: u8, vertical_offset: u8, }, DeactivateScroll = 46, ActivateScroll = 47, SetVerticalScrollArea { rows_fixed: u8, rows_scroll: u8, }, SetLowerColumnStartAddress { address: u8, }, SetHigherColumnStartAddress { address: u8, }, SetMemoryAddressingMode { mode: u8, }, SetColumnAddress { column_start: u8, column_end: u8, }, SetPageAddress { page_start: u8, page_end: u8, }, SetPageStartAddress { address: u8, }, SetDisplayStartLine { line: u8, }, SetSegmentRemap { reverse: bool, }, SetMultiplexRatio { ratio: u8, }, SetComScanDirection { decrement: bool, }, SetDisplayOffset { vertical_shift: u8, }, SetComPins { alternative: bool, enable_com: bool, }, SetDisplayClockDivide { divide_ratio: u8, oscillator_frequency: u8, }, SetPrechargePeriod { phase1: u8, phase2: u8, }, SetVcomDeselect { level: u8, },
}

Variants§

§

SetChargePump

Charge Pump Setting.

Fields

§enable: bool
§

SetContrast

SetContrastControl. Double byte command to select 1 out of 256 contrast steps. Contrast increases as the value increases.

Fields

§contrast: u8
§

EntireDisplayOn

Entire Display On.

Fields

§ignore_ram: bool
§

SetDisplayInvert

Set Normal Display.

Fields

§inverse: bool
§

SetDisplayOnOff

Set Display Off.

Fields

§on: bool
§

ContinuousHorizontalScroll

Continuous Horizontal Scroll. Right or Left Horizontal Scroll.

Fields

§left: bool
§page_start: u8
§interval: u8
§page_end: u8
§

ContinuousVerticalHorizontalScroll

Continuous Vertical and Horizontal Scroll. Vertical and Right Horizontal Scroll.

Fields

§left: bool
§page_start: u8
§interval: u8
§page_end: u8
§vertical_offset: u8
§

DeactivateScroll = 46

Deactivate Scroll. Stop scrolling that is configured by scroll commands.

§

ActivateScroll = 47

Activate Scroll. Start scrolling that is configured by scroll commands.

§

SetVerticalScrollArea

Set Vertical Scroll Area. Set number of rows in top fixed area. The number of rows in top fixed area is referenced to the top of the GDDRAM (i.e. row 0).

Fields

§rows_fixed: u8
§rows_scroll: u8
§

SetLowerColumnStartAddress

Set Lower Column Start Address for Page Addressing Mode.

Set the lower nibble of the column start address register for Page Addressing Mode using X[3:0] as data bits. The initial display line register is reset to 0000b after RESET.

Fields

§address: u8
§

SetHigherColumnStartAddress

Set Higher Column Start Address for Page Addressing Mode.

Set the higher nibble of the column start address register for Page Addressing Mode using X[3:0] as data bits. The initial display line register is reset to 0000b after RESET.

Fields

§address: u8
§

SetMemoryAddressingMode

Set Memory Addressing Mode.

Fields

§mode: u8
§

SetColumnAddress

Set Column Address. Setup column start and end address.

Fields

§column_start: u8
§column_end: u8
§

SetPageAddress

Set Page Address. Setup page start and end address.

Fields

§page_start: u8
§page_end: u8
§

SetPageStartAddress

Set Page Start Address for Page Addressing Mode. Set GDDRAM Page Start Address (PAGE0~PAGE7) for Page Addressing Mode using X[2:0].

Fields

§address: u8
§

SetDisplayStartLine

Set Display Start Line. Set display RAM display start line register from 0-63 using X[5:0].

Fields

§line: u8
§

SetSegmentRemap

Set Segment Remap.

Fields

§reverse: bool
§

SetMultiplexRatio

Set Multiplex Ratio.

Fields

§ratio: u8
§

SetComScanDirection

Set COM Output Scan Direction.

Fields

§decrement: bool
§

SetDisplayOffset

Set Display Offset. Set vertical shift by COM from 0-63.

Fields

§vertical_shift: u8
§

SetComPins

Set COM Pins Hardware Configuration

Fields

§alternative: bool
§enable_com: bool
§

SetDisplayClockDivide

Set Display Clock Divide Ratio/Oscillator Frequency.

Fields

§divide_ratio: u8
§oscillator_frequency: u8
§

SetPrechargePeriod

Set Pre-charge Period.

Fields

§phase1: u8
§phase2: u8
§

SetVcomDeselect

Set VCOMH Deselect Level.

Fields

§level: u8

Implementations§

source§

impl Command

source

pub fn encode(self, buffer: &mut SubSliceMut<'static, u8>)

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 PartialEq for Command

source§

fn eq(&self, other: &Command) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Command

source§

impl StructuralPartialEq 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> 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<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
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, 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.