Procházet zdrojové kódy

NUM_ARRAY => COUNT

Scott Lahteine před 6 roky
rodič
revize
4a7c6f7241
33 změnil soubory, kde provedl 37 přidání a 41 odebrání
  1. 6
    6
      Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp
  2. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_an.h
  3. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_bg.h
  4. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_ca.h
  5. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_cz.h
  6. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_da.h
  7. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_de.h
  8. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h
  9. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_el.h
  10. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_en.h
  11. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_es.h
  12. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_eu.h
  13. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_fi.h
  14. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_fr.h
  15. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_gl.h
  16. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_hr.h
  17. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_it.h
  18. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h
  19. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h
  20. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_nl.h
  21. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_pl.h
  22. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h
  23. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_pt.h
  24. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_ru.h
  25. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_sk.h
  26. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_test.h
  27. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_tr.h
  28. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_uk.h
  29. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h
  30. 1
    1
      Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h
  31. 1
    1
      Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
  32. 0
    4
      Marlin/src/lcd/fontutils.h
  33. 1
    1
      buildroot/share/fonts/uxggenpages.sh

+ 6
- 6
Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp Zobrazit soubor

@@ -901,12 +901,12 @@ int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) {
901 901
     return 1;
902 902
   }
903 903
   copy_address = NULL;
904
-  ret = pf_bsearch_r((void *)g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
904
+  ret = pf_bsearch_r((void *)g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
905 905
   if (ret >= 0) {
906 906
     copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_device + idx);
907 907
   }
908 908
   else {
909
-    ret = pf_bsearch_r((void *)g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
909
+    ret = pf_bsearch_r((void *)g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
910 910
     if (ret >= 0) copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_common + idx);
911 911
   }
912 912
 
@@ -1014,13 +1014,13 @@ int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
1014 1014
 
1015 1015
   int test_hd44780_charmap_all(void) {
1016 1016
     int flg_error = 0;
1017
-    if (test_hd44780_charmap(g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), "g_hd44780_charmap_device", 0) < 0) {
1017
+    if (test_hd44780_charmap(g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), "g_hd44780_charmap_device", 0) < 0) {
1018 1018
       flg_error = 1;
1019
-      test_hd44780_charmap(g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), "g_hd44780_charmap_device", 1);
1019
+      test_hd44780_charmap(g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), "g_hd44780_charmap_device", 1);
1020 1020
     }
1021
-    if (test_hd44780_charmap(g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), "g_hd44780_charmap_common", 0) < 0) {
1021
+    if (test_hd44780_charmap(g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), "g_hd44780_charmap_common", 0) < 0) {
1022 1022
       flg_error = 1;
1023
-      test_hd44780_charmap(g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), "g_hd44780_charmap_common", 1);
1023
+      test_hd44780_charmap(g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), "g_hd44780_charmap_common", 1);
1024 1024
     }
1025 1025
     if (flg_error) {
1026 1026
       TRACE("\nFAILED in hd44780 tests!\n");

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_an.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_bg.h Zobrazit soubor

@@ -64,7 +64,7 @@ const u8g_fntpgm_uint8_t fontpage_8_206_207[39] U8G_FONT_SECTION("fontpage_8_206
64 64
   0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x90,0xa8,0xe8,0xa8,0x90,0x04,0x05,0x05,0x06,
65 65
   0x01,0x00,0x70,0x90,0x70,0x50,0x90};
66 66
 
67
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
67
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
68 68
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
69 69
     FONTDATA_ITEM(8, 144, 149, fontpage_8_144_149), // 'А' -- 'Е'
70 70
     FONTDATA_ITEM(8, 151, 152, fontpage_8_151_152), // 'З' -- 'И'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_ca.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_cz.h Zobrazit soubor

@@ -38,7 +38,7 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253
38 38
   0x00,0x05,0x0a,0x0a,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x08,0x10,0x20,0x40,0x80,
39 39
   0xf8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8};
40 40
 
41
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
41
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
42 42
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
43 43
     FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č'
44 44
     FONTDATA_ITEM(2, 143, 143, fontpage_2_143_143), // 'ď' -- 'ď'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_da.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_de.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h Zobrazit soubor

@@ -72,7 +72,7 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1
72 72
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa6,0xa6,0x00,0x01,0x00,0x00,
73 73
   0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xa8};
74 74
 
75
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
75
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
76 76
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
77 77
     FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ'
78 78
     FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_el.h Zobrazit soubor

@@ -75,7 +75,7 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1
75 75
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa6,0xa6,0x00,0x01,0x00,0x00,
76 76
   0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xa8};
77 77
 
78
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
78
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
79 79
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
80 80
     FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ'
81 81
     FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_en.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_es.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_eu.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_fi.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_fr.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_gl.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_hr.h Zobrazit soubor

@@ -22,7 +22,7 @@ const u8g_fntpgm_uint8_t fontpage_2_254_254[31] U8G_FONT_SECTION("fontpage_2_254
22 22
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0x00,0x08,0x00,0x00,
23 23
   0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8};
24 24
 
25
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
25
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
26 26
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
27 27
     FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć'
28 28
     FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_it.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h Zobrazit soubor

@@ -95,7 +95,7 @@ const u8g_fntpgm_uint8_t fontpage_97_252_252[24] U8G_FONT_SECTION("fontpage_97_2
95 95
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00,0x03,0x00,0x00,
96 96
   0x00,0x05,0x01,0x01,0x06,0x00,0x02,0xf8};
97 97
 
98
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
98
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
99 99
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
100 100
     FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ'
101 101
     FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h Zobrazit soubor

@@ -424,7 +424,7 @@ const u8g_fntpgm_uint8_t fontpage_431_136_136[34] U8G_FONT_SECTION("fontpage_431
424 424
   0x00,0x08,0x0b,0x0b,0x0a,0x01,0xfe,0x71,0x01,0xfd,0x01,0x71,0x49,0x89,0x49,0x71,
425 425
   0x01,0x01};
426 426
 
427
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
427
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
428 428
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
429 429
     FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거'
430 430
     FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_nl.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_pl.h Zobrazit soubor

@@ -28,7 +28,7 @@ const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252
28 28
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00,0x07,0x00,0x00,
29 29
   0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8};
30 30
 
31
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
31
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
32 32
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
33 33
     FONTDATA_ITEM(2, 133, 133, fontpage_2_133_133), // 'ą' -- 'ą'
34 34
     FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_pt.h Zobrazit soubor

@@ -5,5 +5,5 @@
5 5
  */
6 6
 #include <U8glib.h>
7 7
 
8
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
8
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
9 9
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_ru.h Zobrazit soubor

@@ -67,7 +67,7 @@ const u8g_fntpgm_uint8_t fontpage_8_209_209[30] U8G_FONT_SECTION("fontpage_8_209
67 67
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd1,0xd1,0x00,0x07,0x00,0x00,
68 68
   0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0xf0,0x80,0x70};
69 69
 
70
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
70
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
71 71
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
72 72
     FONTDATA_ITEM(8, 144, 152, fontpage_8_144_152), // 'А' -- 'И'
73 73
     FONTDATA_ITEM(8, 154, 168, fontpage_8_154_168), // 'К' -- 'Ш'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_sk.h Zobrazit soubor

@@ -46,7 +46,7 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253
46 46
   0x00,0x05,0x0a,0x0a,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x08,0x10,0x20,0x40,0x80,
47 47
   0xf8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8};
48 48
 
49
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
49
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
50 50
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
51 51
     FONTDATA_ITEM(2, 140, 143, fontpage_2_140_143), // 'Č' -- 'ď'
52 52
     FONTDATA_ITEM(2, 185, 186, fontpage_2_185_186), // 'Ĺ' -- 'ĺ'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_test.h Zobrazit soubor

@@ -217,7 +217,7 @@ const u8g_fntpgm_uint8_t fontpage_97_193_255[753] U8G_FONT_SECTION("fontpage_97_
217 217
   0x28,0x80,0x60,0x10,0x08,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x08,0x08,0x08,0x08,
218 218
   0x08};
219 219
 
220
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
220
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
221 221
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
222 222
     FONTDATA_ITEM(8, 128, 255, fontpage_8_128_255), // 'Ѐ' -- 'ѿ'
223 223
     FONTDATA_ITEM(97, 129, 191, fontpage_97_129_191), // 'め' -- 'タ'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_tr.h Zobrazit soubor

@@ -17,7 +17,7 @@ const u8g_fntpgm_uint8_t fontpage_2_223_223[30] U8G_FONT_SECTION("fontpage_2_223
17 17
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xdf,0xdf,0x00,0x05,0xfe,0x00,
18 18
   0x00,0x05,0x07,0x07,0x06,0x00,0xfe,0x78,0x80,0x70,0x08,0xf0,0x10,0x60};
19 19
 
20
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
20
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
21 21
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
22 22
     FONTDATA_ITEM(2, 159, 159, fontpage_2_159_159), // 'ğ' -- 'ğ'
23 23
     FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_uk.h Zobrazit soubor

@@ -76,7 +76,7 @@ const u8g_fntpgm_uint8_t fontpage_8_214_214[29] U8G_FONT_SECTION("fontpage_8_214
76 76
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd6,0xd6,0x00,0x06,0x00,0x00,
77 77
   0x00,0x03,0x06,0x06,0x06,0x01,0x00,0x40,0x00,0xc0,0x40,0x40,0xe0};
78 78
 
79
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
79
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
80 80
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
81 81
     FONTDATA_ITEM(8, 134, 134, fontpage_8_134_134), // 'І' -- 'І'
82 82
     FONTDATA_ITEM(8, 144, 146, fontpage_8_144_146), // 'А' -- 'В'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h Zobrazit soubor

@@ -1031,7 +1031,7 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510
1031 1031
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x9a,0x9a,0x00,0x08,0x00,0x00,
1032 1032
   0x00,0x02,0x07,0x07,0x0c,0x06,0x01,0xc0,0xc0,0x00,0x00,0x00,0xc0,0xc0};
1033 1033
 
1034
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
1034
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
1035 1035
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
1036 1036
     FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿'
1037 1037
     FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一'

+ 1
- 1
Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h Zobrazit soubor

@@ -1093,7 +1093,7 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510
1093 1093
   0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x9a,0x9a,0x00,0x08,0x00,0x00,
1094 1094
   0x00,0x02,0x07,0x07,0x0c,0x06,0x01,0xc0,0xc0,0x00,0x00,0x00,0xc0,0xc0};
1095 1095
 
1096
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
1096
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
1097 1097
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
1098 1098
     FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿'
1099 1099
     FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一'

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp Zobrazit soubor

@@ -215,7 +215,7 @@ void MarlinUI::init_lcd() {
215 215
     u8g.setRot270();  // Rotate screen by 270°
216 216
   #endif
217 217
 
218
-  uxg_SetUtf8Fonts(g_fontinfo, NUM_ARRAY(g_fontinfo));
218
+  uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo));
219 219
 }
220 220
 
221 221
 // The kill screen is displayed for unrecoverable conditions

+ 0
- 4
Marlin/src/lcd/fontutils.h Zobrazit soubor

@@ -27,10 +27,6 @@ uint8_t read_byte_rom(uint8_t * str);
27 27
 #define wchar_t uint32_t
28 28
 //typedef uint32_t wchar_t;
29 29
 
30
-#ifndef NUM_ARRAY
31
-  #define NUM_ARRAY(a) (sizeof(a)/sizeof((a)[0]))
32
-#endif
33
-
34 30
 typedef uint16_t pixel_len_t;
35 31
 #define PIXEL_LEN_NOLIMIT ((pixel_len_t)(-1))
36 32
 

+ 1
- 1
buildroot/share/fonts/uxggenpages.sh Zobrazit soubor

@@ -169,6 +169,6 @@ cat <<EOF >fontutf8-data.h
169 169
  */
170 170
 #include <U8glib.h>
171 171
 $TMPA
172
-#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
172
+#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
173 173
 static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {$TMPB};
174 174
 EOF

Loading…
Zrušit
Uložit