Skip to content

Commit

Permalink
comment tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Oct 31, 2023
1 parent b69c4a8 commit 30a5052
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Marlin/src/lcd/utf8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ int pf_bsearch_r(void *userdata, size_t num_data, pf_bsearch_cb_comp_t cb_comp,
return -1;
}

/* Returns true if passed byte is first byte of UTF-8 char sequence */
// Is the passed byte the first byte of a UTF-8 char sequence?
static inline bool utf8_is_start_byte_of_char(const uint8_t b) {
return 0x80 != (b & 0xC0);
}

/* This function gets the character at the pstart position, interpreting UTF8 multibyte sequences
and returns the pointer to the next character */
/**
* Get the character at pstart, interpreting UTF8 multibyte sequences.
* Return the pointer to the next character.
*/
const uint8_t* get_utf8_value_cb(const uint8_t *pstart, read_byte_cb_t cb_read_byte, lchar_t &pval) {
uint32_t val = 0;
const uint8_t *p = pstart;
Expand Down

0 comments on commit 30a5052

Please sign in to comment.