🧑‍💻 Extend LCD string substitution (#24278)

This commit is contained in:
Scott Lahteine
2022-06-03 22:56:38 -05:00
committed by GitHub
parent 9c872b214c
commit 8aca38351c
83 changed files with 1062 additions and 1306 deletions

View File

@@ -40,13 +40,8 @@
#include "fontutils.h"
uint8_t read_byte_ram(uint8_t * str) {
return *str;
}
uint8_t read_byte_rom(uint8_t * str) {
return pgm_read_byte(str);
}
uint8_t read_byte_ram(const uint8_t *str) { return *str; }
uint8_t read_byte_rom(const uint8_t *str) { return pgm_read_byte(str); }
/**
* @brief Using binary search to find the position by data_pin
@@ -104,9 +99,9 @@ static inline bool utf8_is_start_byte_of_char(const uint8_t b) {
/* This function gets the character at the pstart position, interpreting UTF8 multibyte sequences
and returns the pointer to the next character */
uint8_t* get_utf8_value_cb(uint8_t *pstart, read_byte_cb_t cb_read_byte, wchar_t *pval) {
const uint8_t* get_utf8_value_cb(const uint8_t *pstart, read_byte_cb_t cb_read_byte, wchar_t *pval) {
uint32_t val = 0;
uint8_t *p = pstart;
const uint8_t *p = pstart;
#define NEXT_6_BITS() do{ val <<= 6; p++; valcur = cb_read_byte(p); val |= (valcur & 0x3F); }while(0)