Unicode¶
Unicode decoder block. It can decode sequence of UTF-8 characters,
between 1
and 4
bytes long.
Note
This is simple implementation and does not support string encoding.
-
group
LWESP_UNICODE
Unicode support manager.
Functions
-
lwespr_t
lwespi_unicode_decode
(lwesp_unicode_t *uni, uint8_t ch)¶ Decode single character for unicode (UTF-8 only) format.
- Return
lwespOK Function succedded, there is a valid UTF-8 sequence
- Return
lwespINPROG Function continues well but expects some more data to finish sequence
- Return
lwespERR Error in UTF-8 sequence
- Parameters
[inout] s
: Pointer to unicode decode control structure[in] c
: UTF-8 character sequence to test for device
-
struct
lwesp_unicode_t
- #include <lwesp_private.h>
Unicode support structure.
Public Members
-
uint8_t
ch
[4] UTF-8 max characters
-
uint8_t
t
Total expected length in UTF-8 sequence
-
uint8_t
r
Remaining bytes in UTF-8 sequence
-
lwespr_t
res
Current result of processing
-
uint8_t
-
lwespr_t