File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 7
7
8
8
#pragma clang diagnostic push
9
9
#pragma ide diagnostic ignored "UnreachableCode"
10
- #if !defined(pgm_read_byte) && defined(__MBED__)
11
- #define pgm_read_byte (addr ) (*(const unsigned char *)(addr))
12
- #define pgm_read_word (addr ) (*(const unsigned short *)(addr))
13
- #define pgm_read_dword (addr ) (*(const unsigned long *)(addr))
14
- #define pgm_read_float (addr ) (*(const float *)(addr))
15
- #define pgm_read_ptr (addr ) (*(const void *)(addr))
16
- #define memcpy_P memcpy
17
- #endif // pgm_read_byte
18
10
19
11
Coord UnicodeFontHandler::textExtents (const char *text, int *baseline, bool progMem) {
20
12
if (adaFont == nullptr ) {
Original file line number Diff line number Diff line change 7
7
#include " Utf8TextProcessor.h"
8
8
#include " UnicodeFontDefs.h"
9
9
10
+ #if !defined(pgm_read_dword) && defined(__MBED__)
11
+ #define pgm_read_byte (addr ) (*(const unsigned char *)(addr))
12
+ #define pgm_read_word (addr ) (*(const unsigned short *)(addr))
13
+ #define pgm_read_dword (addr ) (*(const unsigned long *)(addr))
14
+ #define pgm_read_float (addr ) (*(const float *)(addr))
15
+ #define pgm_read_ptr (addr ) (*(addr))
16
+ #define memcpy_P memcpy
17
+ #endif // pgm_read_byte
18
+
10
19
/* *
11
20
* @file tcUnicodeHelper.h contains a Unicode handler that can process UTF-8 data and print it onto most display types.
12
21
*/
@@ -354,7 +363,7 @@ class UnicodeFontHandler {
354
363
*/
355
364
int getYAdvance () const {
356
365
if (adaFont == nullptr ) return 0 ;
357
- return pgm_read_byte (fontAdafruit ? &adaFont->yAdvance : &unicodeFont->yAdvance );
366
+ return pgm_read_byte (( fontAdafruit ? &adaFont->yAdvance : &unicodeFont->yAdvance ) );
358
367
}
359
368
360
369
/* *
You can’t perform that action at this time.
0 commit comments