Fix DEBUG_SEC_LANG

This commit is contained in:
Alex Voinea 2022-02-06 00:23:40 +01:00
parent e1ebc82654
commit e358cb2b78
2 changed files with 3 additions and 3 deletions

View File

@ -1242,9 +1242,9 @@ void setup()
printf_P(_n("_SEC_LANG_TABLE checksum = %04x\n"), sum); printf_P(_n("_SEC_LANG_TABLE checksum = %04x\n"), sum);
sum = (sum >> 8) | ((sum & 0xff) << 8); //swap bytes sum = (sum >> 8) | ((sum & 0xff) << 8); //swap bytes
if (sum == header.checksum) if (sum == header.checksum)
puts_P(_n("Checksum OK"), sum); printf_P(_n("Checksum OK\n"), sum);
else else
puts_P(_n("Checksum NG"), sum); printf_P(_n("Checksum NG\n"), sum);
} }
else else
puts_P(_n("lang_get_header failed!")); puts_P(_n("lang_get_header failed!"));

View File

@ -264,7 +264,7 @@ uint16_t lang_print_sec_lang(FILE* out)
printf_P(_n(" _lt_resv0 = 0x%04x\n"), _lt_resv0); printf_P(_n(" _lt_resv0 = 0x%04x\n"), _lt_resv0);
printf_P(_n(" _lt_resv1 = 0x%08lx\n"), _lt_resv1); printf_P(_n(" _lt_resv1 = 0x%08lx\n"), _lt_resv1);
if (_lt_magic != LANG_MAGIC) return 0; if (_lt_magic != LANG_MAGIC) return 0;
puts_P(_n(" strings:\n")); puts_P(_n(" strings:"));
uint16_t ui = _SEC_LANG_TABLE; //table pointer uint16_t ui = _SEC_LANG_TABLE; //table pointer
for (ui = 0; ui < _lt_count; ui++) for (ui = 0; ui < _lt_count; ui++)
fprintf_P(out, _n(" %3d %S\n"), ui, lang_get_sec_lang_str_by_id(ui)); fprintf_P(out, _n(" %3d %S\n"), ui, lang_get_sec_lang_str_by_id(ui));