-
Notifications
You must be signed in to change notification settings - Fork 24
Display Configuration
void SSD1306_SetDisplayStartLine( struct SSD1306_Device* DeviceHandle, int Line )
SSD1306 Datasheet page 36:
This command sets the Display Start Line register to determine starting address of display RAM, by selecting a value from 0 to 63. With value equal to 0, RAM row 0 is mapped to COM0. With value equal to 1, RAM row 1 is mapped to COM0 and so on.
- Pointer to device handle
- New value for display start line
Note: Untested outside init
void SSD1306_SetContrast( struct SSD1306_Device* DeviceHandle, uint8_t Contrast )
SSD1306 Datasheet page 36:
This command sets the Contrast Setting of the display. The chip has 256 contrast steps from 00h to FFh. The segment output current increases as the contrast step value increases.
- Pointer to device handle
- New value for contrast
void SSD1306_SetInverted( struct SSD1306_Device* DeviceHandle, bool Inverted )
SSD1306 Datasheet page: 37
This command sets the display to be either normal or inverse. In normal display a RAM data of 1 indicates an “ON” pixel while in inverse display a RAM data of 0 indicates an “ON” pixel.
- Pointer to device handle
- True if the display should be inverted, false for normal display
void SSD1306_DisplayOn( struct SSD1306_Device* DeviceHandle )
void SSD1306_DisplayOff( struct SSD1306_Device* DeviceHandle )
SSD1306 Datasheet page: 37
These single byte commands are used to turn the OLED panel display ON or OFF. When the display is ON, the selected circuits by Set Master Configuration command will be turned ON. When the display is OFF, those circuits will be turned OFF and the segment and common output are in VSS state and high impedance state, respectively.
Note: Untested outside init
void SSD1306_Update( struct SSD1306_Device* DeviceHandle )
Copies the local framebuffer to the display.
This MUST be called when you want to display what you've drawn.
- Pointer to device handle
void SSD1306_SetHFlip( struct SSD1306_Device* DeviceHandle, bool On )
void SSD1306_SetVFlip( struct SSD1306_Device* DeviceHandle, bool On )
SSD1306 Datasheet page 63: Set Segment Re-map:
This command changes the mapping between the display data column address and the segment driver. It allows flexibility in OLED module design. Please refer to Table 9-1. This command only affects subsequent data input. Data already stored in GDDRAM will have no changes.
- Pointer to device handle
- True to enable horizontal/vertical flip