Noiasca Liquid Crystal
A light weight LCD Library to print UTF-8 and special characters easily.
Macros | Functions | Variables
NoiascaConverter.h File Reference

Macros

#define NOIASCA_CONVERTER_H
 

Functions

uint8_t convert_dummy (uint32_t &special, uint8_t &value)
 dummy implementation More...
 
uint8_t convert (uint32_t &special, uint8_t &value)
 Converts Ä --> A. More...
 
uint8_t convert_ae (uint32_t &special, uint8_t &value)
 Converts Ä --> Ae. More...
 
uint8_t convert_uml (uint32_t &special, uint8_t &value, char umlA, char umlO, char umlU)
 Converts Ä --> Any character handed over in the parameter. More...
 
uint8_t convert_small (uint32_t &special, uint8_t &value)
 Converts Ä --> ä More...
 
uint8_t convert_special (uint32_t &special, uint8_t &value)
 Converts Ä --> Ä More...
 
uint8_t convert_ST7070 (uint32_t &special, uint8_t &value)
 Converter for ST7070. More...
 
uint8_t convert_ST7070_ext (uint32_t &special, uint8_t &value)
 Converter for ST7070. More...
 
uint8_t convert_SPLC780D1_002A (uint32_t &special, uint8_t &value)
 SPLC780D1 002A. More...
 
uint8_t convert_SPLC780D1_003A (uint32_t &special, uint8_t &value)
 SPLC780D1 003A. More...
 
uint8_t convert_SPLC780D1_015A (uint32_t &special, uint8_t &value)
 SPLC780D1 015A. More...
 
uint8_t convert_custom (uint32_t &special, uint8_t &value)
 maps UTF-8 characters including up to 8 custom characters More...
 
uint8_t convert_generic (uint32_t &special, uint8_t &value, const Mapping *language, size_t lang_len)
 Generic converter WITHOUT HW specific, without äöü overrule (as this should be in the ROM table) More...
 
uint8_t convert_LEC1621_01 (uint32_t &special, uint8_t &value)
 LEC1621 font 1. More...
 
uint8_t convert_LEC1621_02 (uint32_t &special, uint8_t &value)
 LEC1621 font 2. More...
 
uint8_t convert_LEC1621_03 (uint32_t &special, uint8_t &value)
 LEC1621 font 3. More...
 
uint8_t convert_HW (uint32_t &special, uint8_t &value, const Mapping *language, size_t lang_len)
 HD44780 A00. More...
 
uint8_t convert_ASCII (uint32_t &special, uint8_t &value)
 the full ASCII converter More...
 
uint8_t convert_gmw (uint32_t &special, uint8_t &value)
 Western. More...
 
uint8_t convert_gmq (uint32_t &special, uint8_t &value)
 Northern. More...
 
uint8_t convert_roa (uint32_t &special, uint8_t &value)
 Romance. More...
 
uint8_t convert_sla (uint32_t &special, uint8_t &value)
 Slavic. More...
 
uint8_t convert_de (uint32_t &special, uint8_t &value)
 German. More...
 
uint8_t convert_en (uint32_t &special, uint8_t &value)
 English. More...
 
uint8_t convert_es (uint32_t &special, uint8_t &value)
 Spanish and Catalan. More...
 
uint8_t convert_fr (uint32_t &special, uint8_t &value)
 French. More...
 
uint8_t convert_fi (uint32_t &special, uint8_t &value)
 Finnish. More...
 
uint8_t convert_hu (uint32_t &special, uint8_t &value)
 Hungarian. More...
 
uint8_t convert_cyrillic_min (uint32_t &special, uint8_t &value)
 Cyrillic to plain ASCII. More...
 

Variables

const Mapping ROM_A00[] PROGMEM
 the standard HD44780 A00 ROM character set (English - Japanese) More...
 
constexpr byte NOPRINT = 0
 
constexpr byte PRINT = 1
 
constexpr byte PRINT2 = 2
 
constexpr byte ADDE = 4
 
const PROGMEM uint8_t UML [3][8]
 
uint32_t utf8_to_customChar [8]
 

Macro Definition Documentation

◆ NOIASCA_CONVERTER_H

#define NOIASCA_CONVERTER_H

Function Documentation

◆ convert_dummy()

uint8_t convert_dummy ( uint32_t &  special,
uint8_t &  value 
)

dummy implementation

no convertion at all

◆ convert()

uint8_t convert ( uint32_t &  special,
uint8_t &  value 
)

Converts Ä --> A.

HD44780 A00 could be replaced by convert_uml if we would accept the additional 3 lines of Step2 but as this is the standard converter, I'll keep it as it is

◆ convert_ae()

uint8_t convert_ae ( uint32_t &  special,
uint8_t &  value 
)

Converts Ä --> Ae.

HD44780 A00

◆ convert_uml()

uint8_t convert_uml ( uint32_t &  special,
uint8_t &  value,
char  umlA,
char  umlO,
char  umlU 
)

Converts Ä --> Any character handed over in the parameter.

"internal" main function which will be called from several other converters accepts parameters for Ä Ö Ü

◆ convert_small()

uint8_t convert_small ( uint32_t &  special,
uint8_t &  value 
)

Converts Ä --> ä

HD44780 A00 (implicit)

◆ convert_special()

uint8_t convert_special ( uint32_t &  special,
uint8_t &  value 
)

Converts Ä --> Ä

HD44780 A00 (implicit) needs 3 special characters for Ä Ö Ü

◆ convert_ST7070()

uint8_t convert_ST7070 ( uint32_t &  special,
uint8_t &  value 
)

Converter for ST7070.

small variant

◆ convert_ST7070_ext()

uint8_t convert_ST7070_ext ( uint32_t &  special,
uint8_t &  value 
)

Converter for ST7070.

extended version

◆ convert_SPLC780D1_002A()

uint8_t convert_SPLC780D1_002A ( uint32_t &  special,
uint8_t &  value 
)

SPLC780D1 002A.

different ROM - more characters cyrillic in the upper area code duplicated convert_SPLC780D1_002A, convert_SPLC780D1_003A

◆ convert_SPLC780D1_003A()

uint8_t convert_SPLC780D1_003A ( uint32_t &  special,
uint8_t &  value 
)

SPLC780D1 003A.

no mapping in ASCII needed different ROM - more characters European code duplicated convert_SPLC780D1_002A, convert_SPLC780D1_003A

◆ convert_SPLC780D1_015A()

uint8_t convert_SPLC780D1_015A ( uint32_t &  special,
uint8_t &  value 
)

SPLC780D1 015A.

different ROM - more characters cyrillic in the upper area code duplicated convert_SPLC780D1_002A, convert_SPLC780D1_003A, convert_SPLC780D1_015A

◆ convert_custom()

uint8_t convert_custom ( uint32_t &  special,
uint8_t &  value 
)

maps UTF-8 characters including up to 8 custom characters

this converter is somehow similar to convert_uml but it relies on an (extern) array for the replacement to custom characters. Does ROM_A00 conversion.

◆ convert_generic()

uint8_t convert_generic ( uint32_t &  special,
uint8_t &  value,
const Mapping *  language,
size_t  lang_len 
)

Generic converter WITHOUT HW specific, without äöü overrule (as this should be in the ROM table)

needs additional parameters to define the table. Does no ROM conversion. code based on convert_SPLC780D1_002A, convert_SPLC780D1_003A - but changed to accept the mapping table

◆ convert_LEC1621_01()

uint8_t convert_LEC1621_01 ( uint32_t &  special,
uint8_t &  value 
)

LEC1621 font 1.

◆ convert_LEC1621_02()

uint8_t convert_LEC1621_02 ( uint32_t &  special,
uint8_t &  value 
)

LEC1621 font 2.

MISSING: the Latin letters are in ascending order and should be implemented in a separate converter similar to ST7070_ext to save flash memory (3 x 16 characters) the mapping is complete, but there are several 7bit characters not according to ASCII this should be fixed with a separate converter

◆ convert_LEC1621_03()

uint8_t convert_LEC1621_03 ( uint32_t &  special,
uint8_t &  value 
)

LEC1621 font 3.

reuse of ROM_SPLC780D1_003A

◆ convert_HW()

uint8_t convert_HW ( uint32_t &  special,
uint8_t &  value,
const Mapping *  language,
size_t  lang_len 
)

HD44780 A00.

Replaces not existing diacritic letters with their native counterpart. Accepts addtional parameter for the language mapping (language families). Will be called by several specific alias functions. Does ROM_A00 conversion.

◆ convert_ASCII()

uint8_t convert_ASCII ( uint32_t &  special,
uint8_t &  value 
)

the full ASCII converter

◆ convert_gmw()

uint8_t convert_gmw ( uint32_t &  special,
uint8_t &  value 
)

Western.

◆ convert_gmq()

uint8_t convert_gmq ( uint32_t &  special,
uint8_t &  value 
)

Northern.

◆ convert_roa()

uint8_t convert_roa ( uint32_t &  special,
uint8_t &  value 
)

Romance.

◆ convert_sla()

uint8_t convert_sla ( uint32_t &  special,
uint8_t &  value 
)

Slavic.

◆ convert_de()

uint8_t convert_de ( uint32_t &  special,
uint8_t &  value 
)

German.

◆ convert_en()

uint8_t convert_en ( uint32_t &  special,
uint8_t &  value 
)

English.

◆ convert_es()

uint8_t convert_es ( uint32_t &  special,
uint8_t &  value 
)

Spanish and Catalan.

◆ convert_fr()

uint8_t convert_fr ( uint32_t &  special,
uint8_t &  value 
)

French.

◆ convert_fi()

uint8_t convert_fi ( uint32_t &  special,
uint8_t &  value 
)

Finnish.

◆ convert_hu()

uint8_t convert_hu ( uint32_t &  special,
uint8_t &  value 
)

Hungarian.

◆ convert_cyrillic_min()

uint8_t convert_cyrillic_min ( uint32_t &  special,
uint8_t &  value 
)

Cyrillic to plain ASCII.

Variable Documentation

◆ PROGMEM

const Mapping ROM_LEC1621_02 [] PROGMEM

the standard HD44780 A00 ROM character set (English - Japanese)

character mapping for the LEC1621_02 ROM (English Russian)

character mapping for the LEC1621_01 ROM (Western European - I)

character mapping for the SPLC780D1 015A ROM (HEBREW, CYRILLIC)

character mapping for the SPLC780D1 003A ROM (European Languages)

character mapping for the SPLC780D1 002A ROM (Cyrillic characters)

the ST7070 ROM character set (page 2)

the ST7070 ROM character set (page 1)

greek 0x70 - 0xAF missing in the table

sorted by UTF8 - 2 byte characters only this table also contains some normalization of characters if not supported by the ROM not complete, missing end of datasheet rows 7, D, E, complete row F,

plus supplements for European Languages splitted in 2 byte and 3 byte, then sorted by ROM address this table also contains some normalization of characters if not supported by the ROM

Hebrew (quite complete ) Cyrillic (uncomplete, only capital letters) plus some LATIN for European Languages no mapping for Katakana sorted by ROM address (no preference for ä ö ü...)

plus supplements for European Languages splitted in 2 byte and 3 byte, then sorted by ROM address - currently unsorted this table also contains some normalization of German Umlauts if not supported by the ROM the mapping is not complete

sorted by UTF-8 Cyrillic follows ROM_SPLC780D1_002A MISSING: the Latin letters are straight forward and should be implemented in a separate converter (similar to ST7070_ext) the mapping is complete, but there are several 7bit characters not according to ASCII

◆ NOPRINT

constexpr byte NOPRINT = 0
constexpr

◆ PRINT

constexpr byte PRINT = 1
constexpr

◆ PRINT2

constexpr byte PRINT2 = 2
constexpr

◆ ADDE

constexpr byte ADDE = 4
constexpr

◆ UML

const PROGMEM uint8_t UML[3][8]
Initial value:
= {
{0b10001, 0b01110, 0b10001, 0b10001, 0b11111, 0b10001, 0b10001, 0},
{0b10001, 0b01110, 0b10001, 0b10001, 0b10001, 0b10001, 0b01110, 0},
{0b10001, 0b00000, 0b10001, 0b10001, 0b10001, 0b10001, 0b01110, 0}
}

◆ utf8_to_customChar

uint32_t utf8_to_customChar[8]
extern