Browse Source

Use lcd_uint_t in lcd_put_u8str_ind_P (#15909)

pull/1/head
Robby Candra 5 years ago
committed by Scott Lahteine
parent
commit
40bbe58371
  1. 4
      Marlin/src/lcd/lcdprint.cpp
  2. 4
      Marlin/src/lcd/lcdprint.h

4
Marlin/src/lcd/lcdprint.cpp

@ -35,9 +35,9 @@
* lcd_put_u8str_ind_P
* Print a string with an index substituted within it
*/
uint8_t lcd_put_u8str_ind_P(PGM_P const pstr, const uint8_t ind, const uint8_t maxlen/*=LCD_WIDTH*/) {
lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const uint8_t ind, const lcd_uint_t maxlen/*=LCD_WIDTH*/) {
uint8_t *p = (uint8_t*)pstr;
uint8_t n = maxlen;
lcd_uint_t n = maxlen;
for (; n; n--) {
wchar_t ch;
p = get_utf8_value_cb(p, read_byte_rom, &ch);

4
Marlin/src/lcd/lcdprint.h

@ -71,8 +71,8 @@ inline int lcd_put_u8str_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P con
return lcd_put_u8str_P(pstr);
}
uint8_t lcd_put_u8str_ind_P(PGM_P const pstr, const uint8_t ind, const uint8_t maxlen=20);
inline uint8_t lcd_put_u8str_ind_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P const pstr, const uint8_t ind, const uint8_t maxlen=20) {
lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const uint8_t ind, const lcd_uint_t maxlen=20);
inline lcd_uint_t lcd_put_u8str_ind_P(const lcd_uint_t col, const lcd_uint_t row, PGM_P const pstr, const uint8_t ind, const lcd_uint_t maxlen=20) {
lcd_moveto(col, row);
return lcd_put_u8str_ind_P(pstr, ind, maxlen);
}

Loading…
Cancel
Save