SSD1306 OLED display driver 1.7.8 This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays

Macros | Functions | Variables
FONTS: Supported LCD fonts

## Macros
#define | SSD1306_MORE_CHARS_REQUIRED 0xffff

## Functions
void | ssd1306_setCursor (lcdint_t x, lcdint_t y)
| Sets cursor position for text mode print functions. More...
void | ssd1306_setFixedFont (const uint8_t *progmemFont)
void | ssd1306_setFreeFont (const uint8_t *progmemFont)
void | ssd1306_setSecondaryFont (const uint8_t *progmemUnicode)
void | ssd1306_setFont6x8 (const uint8_t *progmemFont) __attribute__((deprecated))
void | ssd1306_getCharBitmap (uint16_t ch, SCharInfo *info)
| returns char data for currently set (active) font. More...
void | ssd1306_enableUtf8Mode (void)
void | ssd1306_enableAsciiMode (void)

## Variables
const PROGMEM uint8_t | ssd1306xled_font6x8 []
const PROGMEM uint8_t | ssd1306xled_font6x8_German []
const PROGMEM uint8_t | ssd1306xled_font6x8_AB []
const PROGMEM uint8_t | ssd1306xled_font5x7 []
const PROGMEM uint8_t | ssd1306xled_font5x7_AB []
const PROGMEM uint8_t | digital_font5x7_123 []
const PROGMEM uint8_t | digital_font5x7_AB []
const PROGMEM uint8_t | digital_font5x7 []
const PROGMEM uint8_t | free_calibri11x12 []
const PROGMEM uint8_t | free_calibri11x12_cyrillic []
const PROGMEM uint8_t | free_calibri11x12_latin []
const PROGMEM uint8_t | courier_new_font11x16_digits []
const PROGMEM uint8_t | comic_sans_font24x32_123 []

## Detailed Description

## Macro Definition Documentation

## ◆ SSD1306_MORE_CHARS_REQUIRED

#define SSD1306_MORE_CHARS_REQUIRED 0xffff

Flag means that more chars are required to decode utf-8

Definition at line 44 of file ssd1306_fonts.h.

## Function Documentation

## ◆ ssd1306_enableAsciiMode()

void ssd1306_enableAsciiMode | ( | void |  | ) |

Enables ascii mode for all text-functions. No any decoding will be performed

Definition at line 127 of file ssd1306_generic.c.

## ◆ ssd1306_enableUtf8Mode()

void ssd1306_enableUtf8Mode | ( | void |  | ) |

Enables utf8 support for all text-functions.

Note
  Unicode-16 only supported in text decoding functions.

Definition at line 120 of file ssd1306_generic.c.

## ◆ ssd1306_getCharBitmap()

void ssd1306_getCharBitmap | ( | uint16_t | ch,
|  | SCharInfo * | info
| ) |  |

returns char data for currently set (active) font.

Function returns char data for currently set font: pointer to progmem data for specified char, and width, height of the char. You can use these data to draw char manually using ssd1306_drawBitmap(), ssd1306_drawMonoBitmap8() or NanoCanvasOps::drawBitmap1().

Parameters

  ch | char to read from set font
  info | pointer to SCharInfo structure to fill with char data

See also
  ssd1306_setFixedFont

Definition at line 93 of file ssd1306_generic.c.

## ◆ ssd1306_setCursor()

void ssd1306_setCursor | ( | lcdint_t | x,
|  | lcdint_t | y
| ) |  |

Sets cursor position for text mode print functions.

Sets cursor position for text mode print functions.

Parameters

  x | xpos in pixels
  y | ypos in pixels

Definition at line 68 of file ssd1306_generic.c.

## ◆ ssd1306_setFixedFont()

void ssd1306_setFixedFont | ( | const uint8_t * | progmemFont | ) |

Function allows to set another fixed font for the library. By default, the font supports only first 128 - 32 ascii chars. Please refer to github wiki on how to generate new fonts.

Parameters

  progmemFont | - font to setup located in Flash area

Definition at line 218 of file ssd1306_generic.c.

## ◆ ssd1306_setFont6x8()

void ssd1306_setFont6x8 | ( | const uint8_t * | progmemFont | ) |

Function allows to set another font for the library. By default, the font supports only first 128 - 32 ascii chars. First 32 chars of ascii table are non-printable, and removed from the font table to reduce flash memory consumption. Default font doesn't support russian characters. Using this function you can implement your own fonts. First font char must be started with <space> image.

Parameters

  progmemFont | - font to setup located in Flash area

Deprecated:
  Use ssd1306_setFixedFont() instead.

Definition at line 880 of file ssd1306_1bit.c.

## ◆ ssd1306_setFreeFont()

void ssd1306_setFreeFont | ( | const uint8_t * | progmemFont | ) |

Function allows to set another free font for the library. By default, the font supports only first 128 - 32 ascii chars. Please refer to github wiki on how to generate new fonts.

Parameters

  progmemFont | - font to setup located in Flash area

Note
  This function supports new fonts of ssd1306 library 1.7.8 and above

Definition at line 290 of file ssd1306_generic.c.

## ◆ ssd1306_setSecondaryFont()

void ssd1306_setSecondaryFont | ( | const uint8_t * | progmemUnicode | ) |

Function allows sets secondary font for specific language. Use it if you want to use additional font to combine capabilities of ascii fonts and language specific font.

Parameters

  progmemUnicode | font containing unicode table (refer to ssd1306xled_font6x8_German as example).

Definition at line 82 of file ssd1306_generic.c.

## Variable Documentation

## ◆ comic_sans_font24x32_123

const uint8_t comic_sans_font24x32_123

Comic Sans ASCII font 24x32 with digits only (Ascii codes 32 - 64).

Warning
  can be used only with ssd1306_printFixed() and ssd1306_setFixedFont() functions.

Definition at line 634 of file ssd1306_fonts.c.

## ◆ courier_new_font11x16_digits

const PROGMEM uint8_t courier_new_font11x16_digits[]

Standard ASCII font 11x16 with digits only (Ascii codes 32 - 64).

Warning
  can be used only with ssd1306_printFixed() and ssd1306_setFixedFont() functions.

Definition at line 595 of file ssd1306_fonts.c.

## ◆ digital_font5x7

const uint8_t digital_font5x7

Digital ASCII 5x7 font

Definition at line 249 of file ssd1306_fonts.c.

## ◆ digital_font5x7_123

const PROGMEM uint8_t digital_font5x7_123[]

Digital ASCII 5x7 font with only digits and operation signs

## ◆ digital_font5x7_AB

const uint8_t digital_font5x7_AB

Digital ASCII 5x7 font with only capital letters

Definition at line 350 of file ssd1306_fonts.c.

## ◆ free_calibri11x12

const uint8_t free_calibri11x12

Calibri ASCII 11x12 font

######

Calibri

Definition at line 684 of file ssd1306_fonts.c.

## ◆ free_calibri11x12_cyrillic

const uint8_t free_calibri11x12_cyrillic

Calibri ASCII 11x12 font cyrillic

Definition at line 899 of file ssd1306_fonts.c.

## ◆ free_calibri11x12_latin

const uint8_t free_calibri11x12_latin

Calibri ASCII 11x12 font basic latin

Definition at line 1051 of file ssd1306_fonts.c.

## ◆ ssd1306xled_font5x7

const PROGMEM uint8_t ssd1306xled_font5x7[]

Standard ASCII 5x7 font

Definition at line 420 of file ssd1306_fonts.c.

## ◆ ssd1306xled_font5x7_AB

const PROGMEM uint8_t ssd1306xled_font5x7_AB[]

Standard ASCII 5x7 font with only capital letters

Definition at line 522 of file ssd1306_fonts.c.

## ◆ ssd1306xled_font6x8

const PROGMEM uint8_t ssd1306xled_font6x8[]

Standard ASCII 6x8 font

Definition at line 41 of file ssd1306_fonts.c.

## ◆ ssd1306xled_font6x8_AB

const PROGMEM uint8_t ssd1306xled_font6x8_AB[]

Standard ASCII 6x8 AB font with only capital letters

Definition at line 163 of file ssd1306_fonts.c.

## ◆ ssd1306xled_font6x8_German

const PROGMEM uint8_t ssd1306xled_font6x8_German[]

German chars for standard ASCII 6x8 font

Definition at line 144 of file ssd1306_fonts.c.