SSD1306 OLED display driver  1.7.13
This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
Functions
DIRECT DRAW: 16-bit API functions only for color displays

LCD direct draw functions only for color display. More...

Functions

void ssd1306_setRgbColor16 (uint8_t r, uint8_t g, uint8_t b)
 Sets default color. More...
 
void ssd1306_drawBufferFast16 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *data)
 
void ssd1306_drawMonoBuffer16 (lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
 
void ssd1306_fillScreen16 (uint16_t fill_Data)
 
void ssd1306_clearScreen16 (void)
 
void ssd1306_putPixel16 (lcdint_t x, lcdint_t y)
 
void ssd1306_putColorPixel16 (lcdint_t x, lcdint_t y, uint16_t color)
 
void ssd1306_drawVLine16 (lcdint_t x1, lcdint_t y1, lcdint_t y2)
 
void ssd1306_drawHLine16 (lcdint_t x1, lcdint_t y1, lcdint_t x2)
 
void ssd1306_drawLine8 (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
 
void ssd1306_drawRect16 (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
 
void ssd1306_fillRect16 (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2)
 
void ssd1306_drawMonoBitmap16 (lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
 
void ssd1306_drawBitmap16 (lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *bitmap)
 

Detailed Description

LCD direct draw functions only for color display.

LCD direct draw functions are applicable for color display types. These functions will NOT work in ssd1306 compatible mode. Use ssd1306_setMode() function to change display mode to NORMAL. You can combine combine NanoEngine capabilities with these functions. Direct draw functions draw directly in GDRAM and do not use any double-buffering.

Function Documentation

◆ ssd1306_clearScreen16()

void ssd1306_clearScreen16 ( void  )

Fills screen with zero-byte

Definition at line 102 of file ssd1306_16bit.c.

◆ ssd1306_drawBitmap16()

void ssd1306_drawBitmap16 ( lcdint_t  xpos,
lcdint_t  ypos,
lcduint_t  w,
lcduint_t  h,
const uint8_t *  bitmap 
)

Draw 16-bit color bitmap, located in Flash, directly to OLED display GDRAM. Each pixel of the bitmap is expected in 5-6-5 format.

Parameters
xposstart horizontal position in pixels
yposstart vertical position in pixels
wbitmap width in pixels
hbitmap height in pixels
bitmappointer to Flash data, containing 16-bit color bitmap.

Definition at line 244 of file ssd1306_16bit.c.

◆ ssd1306_drawBufferFast16()

void ssd1306_drawBufferFast16 ( lcdint_t  x,
lcdint_t  y,
lcduint_t  w,
lcduint_t  h,
const uint8_t *  data 
)

Draws 16-bit bitmap, located in SRAM, on the display Each byte represents separate pixel: refer to RGB_COLOR16 to understand RGB scheme, being used.

Parameters
x- horizontal position in pixels
y- vertical position in pixels
w- width of bitmap in pixels
h- height of bitmap in pixels
data- pointer to data, located in SRAM.

Definition at line 44 of file ssd1306_16bit.c.

◆ ssd1306_drawHLine16()

void ssd1306_drawHLine16 ( lcdint_t  x1,
lcdint_t  y1,
lcdint_t  x2 
)

Draw horizontal line directly in OLED display GDRAM.

Parameters
x1- left position in pixels
y1- vertical vertical position in pixels
x2- right position in pixels
Note
set color with ssd1306_setColor() function.

Definition at line 132 of file ssd1306_16bit.c.

◆ ssd1306_drawLine8()

void ssd1306_drawLine8 ( lcdint_t  x1,
lcdint_t  y1,
lcdint_t  x2,
lcdint_t  y2 
)

Draw line directly in OLED display GDRAM. This is software implementation. Some OLED controllers have hardware implementation. Refer to datasheet.

Parameters
x1- start horizontal position in pixels
y1- start vertical position in pixels
x2- end horizontal position in pixels
y2- end vertical position in pixels
Note
set color with ssd1306_setColor() function.

Definition at line 154 of file ssd1306_8bit.c.

◆ ssd1306_drawMonoBitmap16()

void ssd1306_drawMonoBitmap16 ( lcdint_t  xpos,
lcdint_t  ypos,
lcduint_t  w,
lcduint_t  h,
const uint8_t *  bitmap 
)

Draw monochrome bitmap, located in Flash, directly to OLED display GDRAM. The bitmap should be in ssd1306 format (each byte represents 8 vertical pixels)

Parameters
xposstart horizontal position in pixels
yposstart vertical position in pixels
wbitmap width in pixels
hbitmap height in pixels
bitmappointer to Flash data, containing monochrome bitmap.
Note
set color with ssd1306_setColor() function.

Definition at line 213 of file ssd1306_16bit.c.

◆ ssd1306_drawMonoBuffer16()

void ssd1306_drawMonoBuffer16 ( lcdint_t  xpos,
lcdint_t  ypos,
lcduint_t  w,
lcduint_t  h,
const uint8_t *  bitmap 
)

Draws 1-bit bitmap, located in SRAM, on the display Each bit represents separate pixel: refer to ssd1306 datasheet for more information.

Parameters
xposhorizontal position in pixels
yposvertical position in pixels
wwidth of bitmap in pixels
hheight of bitmap in pixels
bitmappointer to data, located in SRAM.

Definition at line 60 of file ssd1306_16bit.c.

◆ ssd1306_drawRect16()

void ssd1306_drawRect16 ( lcdint_t  x1,
lcdint_t  y1,
lcdint_t  x2,
lcdint_t  y2 
)

Draw rectangle directly in OLED display GDRAM. This is software implementation. Some OLED controllers have hardware implementation. Refer to datasheet.

Parameters
x1- start horizontal position in pixels
y1- start vertical position in pixels
x2- end horizontal position in pixels
y2- end vertical position in pixels
Note
set color with ssd1306_setColor() function.

Definition at line 186 of file ssd1306_16bit.c.

◆ ssd1306_drawVLine16()

void ssd1306_drawVLine16 ( lcdint_t  x1,
lcdint_t  y1,
lcdint_t  y2 
)

Draw vertical line directly in OLED display GDRAM.

Parameters
x1- horizontal position in pixels
y1- top vertical position in pixels
y2- bottom vertical position in pixels
Note
set color with ssd1306_setColor() function.

Definition at line 121 of file ssd1306_16bit.c.

◆ ssd1306_fillRect16()

void ssd1306_fillRect16 ( lcdint_t  x1,
lcdint_t  y1,
lcdint_t  x2,
lcdint_t  y2 
)

Fill rectangle directly in OLED display GDRAM. This is software implementation. Some OLED controllers have hardware implementation. Refer to datasheet.

Parameters
x1- start horizontal position in pixels
y1- start vertical position in pixels
x2- end horizontal position in pixels
y2- end vertical position in pixels
Note
set color with ssd1306_setColor() function.

Definition at line 194 of file ssd1306_16bit.c.

◆ ssd1306_fillScreen16()

void ssd1306_fillScreen16 ( uint16_t  fill_Data)

Fills screen with pattern byte

Parameters
fill_Datapattern color to fill screen with

Definition at line 91 of file ssd1306_16bit.c.

◆ ssd1306_putColorPixel16()

void ssd1306_putColorPixel16 ( lcdint_t  x,
lcdint_t  y,
uint16_t  color 
)

Puts single color point directly in OLED display GDRAM.

Parameters
x- horizontal position in pixels
y- vertical position in pixels
colorcolor in 16-bit format: 5-6-5

Definition at line 114 of file ssd1306_16bit.c.

◆ ssd1306_putPixel16()

void ssd1306_putPixel16 ( lcdint_t  x,
lcdint_t  y 
)

Puts single color point directly in OLED display GDRAM.

Parameters
x- horizontal position in pixels
y- vertical position in pixels
Note
set color with ssd1306_setColor() function.

Definition at line 107 of file ssd1306_16bit.c.

◆ ssd1306_setRgbColor16()

void ssd1306_setRgbColor16 ( uint8_t  r,
uint8_t  g,
uint8_t  b 
)

Sets default color.

Sets default color for monochrome operations. This function supports only 16-bit RGB mode. To work with RGB colors in 8-bit mode, please refer to ssd1306_setRgbColor8() function and RGB_COLOR8 macros.

Parameters
r- red in 0-255 range.
g- green in 0-255 range.
b- blue in 0-255 range.

Definition at line 39 of file ssd1306_16bit.c.