Simplify counting of printable characters

This commit is contained in:
Scott Lahteine
2017-05-31 23:25:08 -05:00
parent 8d69394ae1
commit 4a96433b7e
3 changed files with 10 additions and 18 deletions

View File

@ -23,7 +23,7 @@
#ifndef UTF_MAPPER_H
#define UTF_MAPPER_H
#include "language.h"
#include "language.h"
#if ENABLED(DOGLCD)
#define HARDWARE_CHAR_OUT u8g.print
@ -144,6 +144,8 @@
#endif // DISPLAY_CHARSET_HD44780
#endif // SIMULATE_ROMFONT
#define PRINTABLE(C) (((C) & 0xC0u) != 0x80u)
#if ENABLED(MAPPER_C2C3)
char charset_mapper(const char c) {
@ -466,8 +468,11 @@
#define MAPPER_NON
#undef PRINTABLE
#define PRINTABLE(C) true
char charset_mapper(const char c) {
HARDWARE_CHAR_OUT( c );
HARDWARE_CHAR_OUT(c);
return 1;
}