ASF docs  3.1.3
Some important library documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
unicode.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UNI_MAX_HEADER_SIZE   3
#define UNI_MAX_UTF8_SIZE   3
Define a ID for each text format

PS: This defines numbers are extract of ID3 norms

#define UNI_TYPE_UNKNOWN   0xFF
#define UNI_TYPE_ASCII   0x00
#define UNI_TYPE_UTF16LE   0x01
#define UNI_TYPE_UTF16BE   0x02
#define UNI_TYPE_UTF8   0x03

Functions

uint8_t unicode_header_scan (uint8_t *header)
 Detect the text format via a header (3 bytes)
uint8_t unicode_header_get (uint8_t *header, uint8_t txt_format)
 Return the header corresponding at text format identifier.
uint8_t utf8_to_unicode (uint8_t *utf8, uint16_t *unicode)
 Conversion UTF-8 to unicode.

Macro Definition Documentation

#define UNI_MAX_HEADER_SIZE   3

Definition at line 51 of file unicode.h.

#define UNI_MAX_UTF8_SIZE   3

Definition at line 52 of file unicode.h.

#define UNI_TYPE_ASCII   0x00

Definition at line 58 of file unicode.h.

#define UNI_TYPE_UNKNOWN   0xFF

Definition at line 57 of file unicode.h.

#define UNI_TYPE_UTF16BE   0x02

Definition at line 60 of file unicode.h.

#define UNI_TYPE_UTF16LE   0x01

Definition at line 59 of file unicode.h.

#define UNI_TYPE_UTF8   0x03

Definition at line 61 of file unicode.h.


Function Documentation

uint8_t unicode_header_get ( uint8_t *  header,
uint8_t  txt_format 
)
Parameters:
txt_formatUNI_TYPE_UTF8, UNI_TYPE_UTF16BE, UNI_TYPE_UTF16LE, UNI_TYPE_ASCII
headerheader to fill (array of 3B)
Returns:
the size of header

Definition at line 91 of file unicode.c.

uint8_t unicode_header_scan ( uint8_t *  header)
Parameters:
headerheader to analyse (array of 3B)
Returns:
text format identifier

Definition at line 62 of file unicode.c.

uint8_t utf8_to_unicode ( uint8_t *  utf8,
uint16_t *  unicode 
)
Parameters:
utf8array with utf8 codes (array of 3B max)
unicodepointer used to store the character unicode decoded
Returns:
the size of UTF8 decoded

Definition at line 121 of file unicode.c.