14 #define PROTOCOL_VERSION "1.0"
17 #define PROGMEM_I2 __attribute__((section(".progmem0")))
18 #define PROGMEM_I1 __attribute__((section(".progmem1")))
19 #define PROGMEM_N1 __attribute__((section(".progmem2")))
20 #define _I(s) (__extension__({static const char __c[] PROGMEM_I1 = s; &__c[0];}))
27 #define PROGMEM_I2 __attribute__((section(".loc_sec")))
29 #define PROGMEM_I1 __attribute__((section(".loc_pri")))
31 #define PROGMEM_N1 __attribute__((section(".noloc")))
32 #define _I(s) (__extension__({static const char __c[] PROGMEM_I1 = "\xff\xff" s; &__c[0];}))
33 #define ISTR(s) "\xff\xff" s
34 #define _i(s) lang_get_translation(_I(s))
35 #define _T(s) lang_get_translation(s)
39 #define _N(s) (__extension__({static const char __c[] PROGMEM_N1 = s; &__c[0];}))
69 #define LANG_ID_FORCE_SELECTION 254
73 #define LANG_ID_UNDEFINED 255
77 #define LANG_ID_DEFAULT LANG_ID_PRI
81 #define LANG_MAGIC 0x4bb45aa5
85 #define LANG_CODE_XX 0x3f3f
86 #define LANG_CODE_EN 0x656e
87 #define LANG_CODE_CZ 0x6373
88 #define LANG_CODE_DE 0x6465
89 #define LANG_CODE_ES 0x6573
90 #define LANG_CODE_FR 0x6672
91 #define LANG_CODE_IT 0x6974
92 #define LANG_CODE_PL 0x706c
93 #ifdef COMMUNITY_LANGUAGE_SUPPORT
94 #ifdef COMMUNITY_LANG_GROUP1_NL
95 #define LANG_CODE_NL 0x6e6c
97 #ifdef COMMUNITY_LANG_GROUP1_SV
98 #define LANG_CODE_SV 0x7376
100 #ifdef COMMUNITY_LANG_GROUP1_NO
101 #define LANG_CODE_NO 0x6E6F
103 #ifdef COMMUNITY_LANG_GROUP1_DA
104 #define LANG_CODE_DA 0x6461
106 #ifdef COMMUNITY_LANG_GROUP1_SL
107 #define LANG_CODE_SL 0x736C
109 #ifdef COMMUNITY_LANG_GROUP1_HU
110 #define LANG_CODE_HU 0x6875
112 #ifdef COMMUNITY_LANG_GROUP1_LB
113 #define LANG_CODE_LB 0x6C62
115 #ifdef COMMUNITY_LANG_GROUP1_HR
116 #define LANG_CODE_HR 0x6872
118 #ifdef COMMUNITY_LANG_GROUP2_LT
119 #define LANG_CODE_LT 0x6C74
121 #ifdef COMMUNITY_LANG_GROUP1_SK
122 #define LANG_CODE_SK 0x736b
124 #ifdef COMMUNITY_LANG_GROUP1_RO
125 #define LANG_CODE_RO 0x726F
134 #if defined(__cplusplus)
142 extern const char _SEC_LANG[LANG_SIZE_RESERVED];
143 extern const char* lang_get_translation(
const char* s);
144 #define _SEC_LANG_TABLE ((uint16_t)&_SEC_LANG)
164 #ifdef DEBUG_SEC_LANG
165 extern const char* lang_get_sec_lang_str_by_id(uint16_t
id);
166 extern uint16_t lang_print_sec_lang();
169 extern void lang_boot_update_start(uint8_t lang);
171 #if defined(__cplusplus)
175 #define CAT2(_s1, _s2) _s1
176 #define CAT4(_s1, _s2, _s3, _s4) _s1
178 #include "messages.h"
uint8_t lang_selected
Currectly active language selection.
Definition: language.c:17
uint8_t lang_is_selected(void)
Definition: language.c:27
uint8_t lang_select(uint8_t lang)
selects language, eeprom is updated in case of success
Definition: language.c:52
const char * lang_get_name_by_code(uint16_t code)
Definition: language.c:204
uint8_t lang_check(uint16_t addr)
performs checksum test of secondary language data
Definition: language.c:96
uint8_t lang_get_count(void)
Definition: language.c:23
uint16_t lang_get_code(uint8_t lang)
reads lang code from xflash or progmem
Definition: language.c:170
void lang_reset(void)
reset language to "LANG_ID_FORCE_SELECTION", epprom is updated
Definition: language.c:26
uint8_t lang_get_header(uint8_t lang, lang_table_header_t *header, uint32_t *offset)
reads lang table header and offset in xflash or progmem
Definition: language.c:136
lang_table_t structure - (size= 16byte + 2*count)
Definition: language.h:56