source: trunk/firmware/Debug125A/self_discharge_PP.c @ 26

Last change on this file since 26 was 26, checked in by f.jahn, 7 weeks ago
  • Bug in ADC Kalibrierung (STM32 ADC Strom) behoben
  • DMA Buffer für ADC 1 und ADC wird vor Überschreibung während bearbeitung geschützt, indem Datenübertragung nur einmalig erfolgt und erst nach Auswertung wieder gestartet wird
  • RS485Modbus: Timeout Zeit wird für Baudraten >19200 korrekt berechnet
  • Hardware ID geändert
  • Separates Register für "Batterie Empty detection mode" auf Adresse 92 angelegt
File size: 49.5 KB
Line 
1# 1 "D:\\projekte\\ecsSmartPro\\trunk\\firmware\\Src\\self_discharge.c"
2# 1 "<built-in>" 1
3# 1 "<built-in>" 3
4# 380 "<built-in>" 3
5# 1 "<command line>" 1
6# 1 "<built-in>" 2
7# 1 "D:\\projekte\\ecsSmartPro\\trunk\\firmware\\Src\\self_discharge.c" 2
8# 1 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\stdio.h" 1 3
9# 20 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\stdio.h" 3
10# 1 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL.h" 1 3
11# 17 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL.h" 3
12# 1 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_ConfDefaults.h" 1 3
13# 67 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_ConfDefaults.h" 3
14# 1 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Conf.h" 1 3
15# 35 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Conf.h" 3
16# 1 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Arm_Conf.h" 1 3
17# 748 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Arm_Conf.h" 3
18static __inline__ __attribute__((__always_inline__)) void __SEGGER_RTL_WR_PARTIAL_WORD_func(char *addr, unsigned w, int n) {
19  switch (n) {
20  default: addr[3] = (-1) > 0 ? w : w >> 24;
21  case 3: addr[2] = (-1) > 0 ? w >> 8 : w >> 16;
22  case 2: addr[1] = (-1) > 0 ? w >> 16 : w >> 8;
23  case 1: addr[0] = (-1) > 0 ? w >> 24 : w;
24  case 0: ;
25  }
26}
27
28static __inline__ __attribute__((__always_inline__)) void __SEGGER_RTL_WR_WORD_func(char *addr, unsigned w) {
29  __SEGGER_RTL_WR_PARTIAL_WORD_func(addr, w, 4);
30}
31
32static __inline__ __attribute__((__always_inline__)) unsigned __SEGGER_RTL_RD_WORD_func(const void *addr) {
33  const unsigned char *pAddr = (const unsigned char *)addr;
34
35  return pAddr[0] * ((-1) > 0 ? 0x1000000u : 0x1u) +
36         pAddr[1] * ((-1) > 0 ? 0x10000u : 0x100u) +
37         pAddr[2] * ((-1) > 0 ? 0x100u : 0x10000u) +
38         pAddr[3] * ((-1) > 0 ? 0x1u : 0x1000000u);
39}
40
41static __inline__ __attribute__((__always_inline__)) unsigned __SEGGER_RTL_BYTE_PATTERN_func(unsigned x) {
42  return x * 0x01010101uL;
43}
44
45static __inline__ __attribute__((__always_inline__)) unsigned __SEGGER_RTL_FILL_HEAD_func(const void *pOrigin, unsigned Word, unsigned Standin) {
46  unsigned Mask;
47  unsigned Fill;
48
49  (void)pOrigin;
50
51  Fill = __SEGGER_RTL_BYTE_PATTERN_func(Standin);
52# 792 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Arm_Conf.h" 3
53  Mask = 0xFFFFFFFFu;
54  Mask <<= 8 * (((unsigned)(pOrigin)) & 3u);
55
56  return (Word & Mask) | (Fill & ~Mask);
57
58
59}
60
61static __inline__ __attribute__((__always_inline__)) unsigned __SEGGER_RTL_FILL_TAIL_func(unsigned n, unsigned Word, unsigned Standin) {
62  unsigned Mask;
63  unsigned Fill;
64# 817 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Arm_Conf.h" 3
65  if (n >= 4) {
66    return Word;
67  } else {
68    Fill = __SEGGER_RTL_BYTE_PATTERN_func(Standin);
69    Mask = 0xFFFFFFFFu << (8 * n);
70
71    return (Fill & Mask) | (Word & ~Mask);
72  }
73
74
75}
76
77static __inline__ __attribute__((__always_inline__)) unsigned __SEGGER_RTL_ZBYTE_CHECK_func(unsigned x) {
78
79
80
81
82
83
84
85  return ((x-0x01010101u) & ~x & 0x80808080u);
86
87
88}
89
90static __inline__ __attribute__((__always_inline__)) unsigned __SEGGER_RTL_DIFF_INDEX_func(unsigned x, unsigned y) {
91# 866 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Arm_Conf.h" 3
92  if ((x & 0x000000FFuL) != (y & 0x000000FFuL)) { return 0; }
93  if ((x & 0x0000FF00uL) != (y & 0x0000FF00uL)) { return 1; }
94  if ((x & 0x00FF0000uL) != (y & 0x00FF0000uL)) { return 2; }
95  if ((x & 0xFF000000uL) != (y & 0xFF000000uL)) { return 3; }
96  return 4;
97
98
99}
100
101static __inline__ __attribute__((__always_inline__)) unsigned __SEGGER_RTL_DIFF_BYTE_func(unsigned x, int Index) {
102
103
104
105  return (x >> (8*Index)) & 0xFF;
106
107}
108
109static __inline__ __attribute__((__always_inline__)) unsigned __SEGGER_RTL_ZBYTE_INDEX_func(unsigned x) {
110# 919 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Arm_Conf.h" 3
111  if ((x & 0x000000FFuL) == 0) { return 0; }
112  if ((x & 0x0000FF00uL) == 0) { return 1; }
113  if ((x & 0x00FF0000uL) == 0) { return 2; }
114  if ((x & 0xFF000000uL) == 0) { return 3; }
115  return 4;
116
117
118}
119
120static __inline__ __attribute__((__always_inline__)) _Bool __SEGGER_RTL_atomic_is_lock_free(unsigned size, const volatile void *ptr) {
121  switch (size) {
122  case 1: return 1;
123  case 2: return ((unsigned)ptr & 1) == 0;
124  case 4: return ((unsigned)ptr & 3) == 0;
125  default: return 0;
126  }
127}
128# 946 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Arm_Conf.h" 3
129extern const int __aeabi_SIGABRT;
130extern const int __aeabi_SIGINT;
131extern const int __aeabi_SIGILL;
132extern const int __aeabi_SIGFPE;
133extern const int __aeabi_SIGSEGV;
134extern const int __aeabi_SIGTERM;
135
136void __aeabi_SIG_DFL(int sig);
137void __aeabi_SIG_IGN(int sig);
138void __aeabi_SIG_ERR(int sig);
139# 36 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_Conf.h" 2 3
140# 68 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL_ConfDefaults.h" 2 3
141# 18 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL.h" 2 3
142# 38 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL.h" 3
143  typedef struct __SEGGER_RTL_FILE_impl __SEGGER_RTL_FILE;
144
145
146typedef struct __SEGGER_RTL_locale_data_s __SEGGER_RTL_locale_t;
147typedef struct __SEGGER_RTL_locale_codeset_s __SEGGER_RTL_locale_codeset_t;
148
149typedef struct {
150
151
152
153  const char * decimal_point;
154  const char * thousands_sep;
155  const char * grouping;
156
157  const char * int_curr_symbol;
158  const char * currency_symbol;
159  const char * mon_decimal_point;
160  const char * mon_thousands_sep;
161  const char * mon_grouping;
162  const char * positive_sign;
163  const char * negative_sign;
164
165  char int_frac_digits;
166  char frac_digits;
167  char p_cs_precedes;
168  char p_sep_by_space;
169  char n_cs_precedes;
170  char n_sep_by_space;
171  char p_sign_posn;
172  char n_sign_posn;
173  char int_p_cs_precedes;
174  char int_n_cs_precedes;
175  char int_p_sep_by_space;
176  char int_n_sep_by_space;
177  char int_p_sign_posn;
178  char int_n_sign_posn;
179
180
181
182
183  const char *day_names;
184  const char *abbrev_day_names;
185  const char *month_names;
186  const char *abbrev_month_names;
187  const char *am_pm_indicator;
188  const char *date_format;
189  const char *time_format;
190  const char *date_time_format;
191} __SEGGER_RTL_locale_data_t;
192
193struct __SEGGER_RTL_locale_data_s {
194  const char * name;
195  const __SEGGER_RTL_locale_data_t * data;
196  const __SEGGER_RTL_locale_codeset_t * codeset;
197};
198
199struct __SEGGER_RTL_POSIX_locale_s {
200  const __SEGGER_RTL_locale_t *__category[5];
201};
202
203struct timeval;
204# 107 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL.h" 3
205extern struct __SEGGER_RTL_POSIX_locale_s __SEGGER_RTL_global_locale;
206extern struct __SEGGER_RTL_POSIX_locale_s * __SEGGER_RTL_locale_ptr;
207extern char * __SEGGER_RTL_locale_name_buffer;
208# 118 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL.h" 3
209extern const __SEGGER_RTL_locale_t __SEGGER_RTL_c_locale;
210extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_1;
211extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_2;
212extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_3;
213extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_4;
214extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_5;
215extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_6;
216extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_7;
217extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_8;
218extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_9;
219extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_10;
220extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_11;
221extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_13;
222extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_14;
223extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_15;
224extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_iso8859_16;
225extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1250;
226extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1251;
227extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1252;
228extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1253;
229extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1254;
230extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1255;
231extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1256;
232extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1257;
233extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_cp1258;
234
235extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_c_locale_data;
236extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_aa_DJ_locale;
237extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_aa_ER_locale;
238extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_aa_ET_locale;
239extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_af_NA_locale;
240extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_af_ZA_locale;
241extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ak_GH_locale;
242extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_am_ET_locale;
243extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_AE_locale;
244extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_BH_locale;
245extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_DZ_locale;
246extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_EG_locale;
247extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_IQ_locale;
248extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_JO_locale;
249extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_KW_locale;
250extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_LB_locale;
251extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_LY_locale;
252extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_MA_locale;
253extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_OM_locale;
254extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_QA_locale;
255extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_SA_locale;
256extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_SD_locale;
257extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_SY_locale;
258extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_TN_locale;
259extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ar_YE_locale;
260extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_as_IN_locale;
261extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_asa_TZ_locale;
262extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_az_Arab_IR_locale;
263extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_az_AZ_locale;
264extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_az_Cyrl_AZ_locale;
265extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_az_IR_locale;
266extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_az_Latn_AZ_locale;
267extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_be_BY_locale;
268extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bem_ZM_locale;
269extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bez_TZ_locale;
270extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bg_BG_locale;
271extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bm_ML_locale;
272extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bn_BD_locale;
273extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bn_IN_locale;
274extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bo_CN_locale;
275extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bo_IN_locale;
276extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_br_FR_locale;
277extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_brx_IN_locale;
278extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_bs_BA_locale;
279extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_byn_ER_locale;
280extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ca_ES_locale;
281extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_cch_NG_locale;
282extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_cgg_UG_locale;
283extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_chr_US_locale;
284extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_cs_CZ_locale;
285extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_cy_GB_locale;
286extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_da_DK_locale;
287extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_dav_KE_locale;
288extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_de_AT_locale;
289extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_de_BE_locale;
290extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_de_CH_locale;
291extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_de_DE_locale;
292extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_de_LI_locale;
293extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_de_LU_locale;
294extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_dv_MV_locale;
295extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_dz_BT_locale;
296extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ebu_KE_locale;
297extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ee_GH_locale;
298extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ee_TG_locale;
299extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_el_CY_locale;
300extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_el_GR_locale;
301extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_AS_locale;
302extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_AU_locale;
303extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_BE_locale;
304extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_BW_locale;
305extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_BZ_locale;
306extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_CA_locale;
307extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_Dsrt_US_locale;
308extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_GB_locale;
309extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_GU_locale;
310extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_HK_locale;
311extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_IE_locale;
312extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_IN_locale;
313extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_JM_locale;
314extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_MH_locale;
315extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_MP_locale;
316extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_MT_locale;
317extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_MU_locale;
318extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_NA_locale;
319extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_NZ_locale;
320extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_PH_locale;
321extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_PK_locale;
322extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_SG_locale;
323extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_TT_locale;
324extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_UM_locale;
325extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_US_locale;
326extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_US_POSIX_locale;
327extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_VI_locale;
328extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_ZA_locale;
329extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_ZW_locale;
330extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_en_ZZ_locale;
331extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_AR_locale;
332extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_BO_locale;
333extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_CL_locale;
334extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_CO_locale;
335extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_CR_locale;
336extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_DO_locale;
337extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_EC_locale;
338extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_ES_locale;
339extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_GQ_locale;
340extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_GT_locale;
341extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_HN_locale;
342extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_MX_locale;
343extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_NI_locale;
344extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_PA_locale;
345extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_PE_locale;
346extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_PR_locale;
347extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_PY_locale;
348extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_SV_locale;
349extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_US_locale;
350extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_UY_locale;
351extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_es_VE_locale;
352extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_et_EE_locale;
353extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_eu_ES_locale;
354extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fa_AF_locale;
355extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fa_IR_locale;
356extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ff_SN_locale;
357extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fi_FI_locale;
358extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fil_PH_locale;
359extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fo_FO_locale;
360extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_BE_locale;
361extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_BF_locale;
362extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_BI_locale;
363extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_BJ_locale;
364extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_BL_locale;
365extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_CA_locale;
366extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_CD_locale;
367extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_CF_locale;
368extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_CG_locale;
369extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_CH_locale;
370extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_CI_locale;
371extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_CM_locale;
372extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_DJ_locale;
373extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_FR_locale;
374extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_GA_locale;
375extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_GN_locale;
376extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_GP_locale;
377extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_GQ_locale;
378extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_KM_locale;
379extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_LU_locale;
380extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_MC_locale;
381extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_MF_locale;
382extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_MG_locale;
383extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_ML_locale;
384extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_MQ_locale;
385extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_NE_locale;
386extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_RE_locale;
387extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_RW_locale;
388extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_SN_locale;
389extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_TD_locale;
390extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fr_TG_locale;
391extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_fur_IT_locale;
392extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ga_IE_locale;
393extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_gaa_GH_locale;
394extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_gez_ER_locale;
395extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_gez_ET_locale;
396extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_gl_ES_locale;
397extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_gsw_CH_locale;
398extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_gu_IN_locale;
399extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_guz_KE_locale;
400extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_gv_GB_locale;
401extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_Arab_NG_locale;
402extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_Arab_SD_locale;
403extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_GH_locale;
404extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_Latn_GH_locale;
405extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_Latn_NE_locale;
406extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_Latn_NG_locale;
407extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_NE_locale;
408extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_NG_locale;
409extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ha_SD_locale;
410extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_haw_US_locale;
411extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_he_IL_locale;
412extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_hi_IN_locale;
413extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_hr_HR_locale;
414extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_hu_HU_locale;
415extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_hy_AM_locale;
416extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_id_ID_locale;
417extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ig_NG_locale;
418extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ii_CN_locale;
419extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_is_IS_locale;
420extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_it_CH_locale;
421extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_it_IT_locale;
422extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ja_JP_locale;
423extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_jmc_TZ_locale;
424extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ka_GE_locale;
425extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kab_DZ_locale;
426extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kaj_NG_locale;
427extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kam_KE_locale;
428extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kcg_NG_locale;
429extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kde_TZ_locale;
430extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kea_CV_locale;
431extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kfo_CI_locale;
432extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_khq_ML_locale;
433extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ki_KE_locale;
434extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kk_Cyrl_KZ_locale;
435extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kk_KZ_locale;
436extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kl_GL_locale;
437extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kln_KE_locale;
438extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_km_KH_locale;
439extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kn_IN_locale;
440extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ko_KR_locale;
441extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kok_IN_locale;
442extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kpe_GN_locale;
443extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kpe_LR_locale;
444extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ksb_TZ_locale;
445extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ksh_DE_locale;
446extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ku_Arab_IQ_locale;
447extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ku_Arab_IR_locale;
448extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ku_IQ_locale;
449extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ku_IR_locale;
450extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ku_Latn_SY_locale;
451extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ku_Latn_TR_locale;
452extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ku_SY_locale;
453extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ku_TR_locale;
454extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_kw_GB_locale;
455extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ky_KG_locale;
456extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_lag_TZ_locale;
457extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_lg_UG_locale;
458extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ln_CD_locale;
459extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ln_CG_locale;
460extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_lo_LA_locale;
461extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_lt_LT_locale;
462extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_luo_KE_locale;
463extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_luy_KE_locale;
464extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_lv_LV_locale;
465extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mas_KE_locale;
466extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mas_TZ_locale;
467extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mer_KE_locale;
468extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mfe_MU_locale;
469extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mg_MG_locale;
470extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mi_NZ_locale;
471extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mk_MK_locale;
472extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ml_IN_locale;
473extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mn_CN_locale;
474extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mn_Cyrl_MN_locale;
475extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mn_MN_locale;
476extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mn_Mong_CN_locale;
477extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mr_IN_locale;
478extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ms_BN_locale;
479extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ms_MY_locale;
480extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_mt_MT_locale;
481extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_my_MM_locale;
482extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_naq_NA_locale;
483extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nb_NO_locale;
484extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nd_ZW_locale;
485extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nds_DE_locale;
486extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ne_IN_locale;
487extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ne_NP_locale;
488extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nl_BE_locale;
489extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nl_NL_locale;
490extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nn_NO_locale;
491extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nr_ZA_locale;
492extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nso_ZA_locale;
493extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ny_MW_locale;
494extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_nyn_UG_locale;
495extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_oc_FR_locale;
496extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_om_ET_locale;
497extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_om_KE_locale;
498extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_or_IN_locale;
499extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pa_Arab_PK_locale;
500extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pa_Guru_IN_locale;
501extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pa_IN_locale;
502extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pa_PK_locale;
503extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pl_PL_locale;
504extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ps_AF_locale;
505extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pt_AO_locale;
506extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pt_BR_locale;
507extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pt_GW_locale;
508extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pt_MZ_locale;
509extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_pt_PT_locale;
510extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_rm_CH_locale;
511extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ro_MD_locale;
512extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ro_RO_locale;
513extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_rof_TZ_locale;
514extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ru_MD_locale;
515extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ru_RU_locale;
516extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ru_UA_locale;
517extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_rw_RW_locale;
518extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_rwk_TZ_locale;
519extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sa_IN_locale;
520extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_saq_KE_locale;
521extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_se_FI_locale;
522extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_se_NO_locale;
523extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_seh_MZ_locale;
524extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ses_ML_locale;
525extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sg_CF_locale;
526extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sh_BA_locale;
527extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sh_CS_locale;
528extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sh_YU_locale;
529extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_shi_Latn_MA_locale;
530extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_shi_MA_locale;
531extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_shi_Tfng_MA_locale;
532extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_si_LK_locale;
533extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sid_ET_locale;
534extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sk_SK_locale;
535extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sl_SI_locale;
536extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sn_ZW_locale;
537extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_so_DJ_locale;
538extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_so_ET_locale;
539extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_so_KE_locale;
540extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_so_SO_locale;
541extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sq_AL_locale;
542extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_BA_locale;
543extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_CS_locale;
544extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Cyrl_BA_locale;
545extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Cyrl_CS_locale;
546extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Cyrl_ME_locale;
547extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Cyrl_RS_locale;
548extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Cyrl_YU_locale;
549extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Latn_BA_locale;
550extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Latn_CS_locale;
551extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Latn_ME_locale;
552extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Latn_RS_locale;
553extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_Latn_YU_locale;
554extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_ME_locale;
555extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_RS_locale;
556extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sr_YU_locale;
557extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ss_SZ_locale;
558extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ss_ZA_locale;
559extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ssy_ER_locale;
560extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_st_LS_locale;
561extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_st_ZA_locale;
562extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sv_FI_locale;
563extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sv_SE_locale;
564extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sw_KE_locale;
565extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_sw_TZ_locale;
566extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_syr_SY_locale;
567extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ta_IN_locale;
568extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ta_LK_locale;
569extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_te_IN_locale;
570extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_teo_KE_locale;
571extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_teo_UG_locale;
572extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tg_Cyrl_TJ_locale;
573extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tg_TJ_locale;
574extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_th_TH_locale;
575extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ti_ER_locale;
576extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ti_ET_locale;
577extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tig_ER_locale;
578extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tl_PH_locale;
579extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tn_ZA_locale;
580extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_to_TO_locale;
581extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tr_TR_locale;
582extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_trv_TW_locale;
583extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ts_ZA_locale;
584extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tt_RU_locale;
585extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tzm_Latn_MA_locale;
586extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_tzm_MA_locale;
587extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ug_Arab_CN_locale;
588extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ug_CN_locale;
589extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_uk_UA_locale;
590extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ur_IN_locale;
591extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ur_PK_locale;
592extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_uz_AF_locale;
593extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_uz_Arab_AF_locale;
594extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_uz_Cyrl_UZ_locale;
595extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_uz_Latn_UZ_locale;
596extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_uz_UZ_locale;
597extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_ve_ZA_locale;
598extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_vi_VN_locale;
599extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_vun_TZ_locale;
600extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_wal_ET_locale;
601extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_wo_Latn_SN_locale;
602extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_wo_SN_locale;
603extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_xh_ZA_locale;
604extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_xog_UG_locale;
605extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_yo_NG_locale;
606extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_CN_locale;
607extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_Hans_CN_locale;
608extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_Hans_HK_locale;
609extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_Hans_MO_locale;
610extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_Hans_SG_locale;
611extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_Hant_HK_locale;
612extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_Hant_MO_locale;
613extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_Hant_TW_locale;
614extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_HK_locale;
615extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_MO_locale;
616extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_SG_locale;
617extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zh_TW_locale;
618extern const __SEGGER_RTL_locale_data_t __SEGGER_RTL_zu_ZA_locale;
619
620extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_ascii;
621extern const __SEGGER_RTL_locale_codeset_t __SEGGER_RTL_codeset_utf8;
622
623extern const char __SEGGER_RTL_data_utf8_period [];
624extern const char __SEGGER_RTL_data_utf8_comma [];
625extern const char __SEGGER_RTL_data_utf8_space [];
626extern const char __SEGGER_RTL_data_utf8_plus [];
627extern const char __SEGGER_RTL_data_utf8_minus [];
628extern const char __SEGGER_RTL_data_empty_string[];
629# 546 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL.h" 3
630int __SEGGER_RTL_X_set_time_of_day (const struct timeval *__tp);
631int __SEGGER_RTL_X_get_time_of_day (struct timeval *__tp);
632const __SEGGER_RTL_locale_t * __SEGGER_RTL_X_find_locale (const char *__locale);
633__SEGGER_RTL_FILE * __SEGGER_RTL_X_file_open (const char *__filename, const char *__mode);
634__SEGGER_RTL_FILE * __SEGGER_RTL_X_file_dopen (int __descriptor, const char *__mode);
635int __SEGGER_RTL_X_file_stat (__SEGGER_RTL_FILE *__stream);
636int __SEGGER_RTL_X_file_read (__SEGGER_RTL_FILE *__stream, char *__s, unsigned __len);
637int __SEGGER_RTL_X_file_write (__SEGGER_RTL_FILE *__stream, const char *__s, unsigned __len);
638int __SEGGER_RTL_X_file_unget (__SEGGER_RTL_FILE *__stream, int __c);
639int __SEGGER_RTL_X_file_close (__SEGGER_RTL_FILE *__stream);
640int __SEGGER_RTL_X_file_error (__SEGGER_RTL_FILE *__stream);
641int __SEGGER_RTL_X_file_flush (__SEGGER_RTL_FILE *__stream);
642int __SEGGER_RTL_X_file_eof (__SEGGER_RTL_FILE *__stream);
643void __SEGGER_RTL_X_file_clrerr (__SEGGER_RTL_FILE *__stream);
644int __SEGGER_RTL_X_file_seek (__SEGGER_RTL_FILE *__stream, long __offset, int __whence);
645int __SEGGER_RTL_X_file_getpos (__SEGGER_RTL_FILE *__stream, long *__pos);
646int __SEGGER_RTL_X_file_bufsize (__SEGGER_RTL_FILE *__stream);
647__SEGGER_RTL_FILE * __SEGGER_RTL_X_file_tmpfile (void);
648char * __SEGGER_RTL_X_file_tmpnam (char *__s, unsigned __max);
649int __SEGGER_RTL_X_file_remove (const char *__filename);
650int __SEGGER_RTL_X_file_rename (const char *__old, const char *__new);
651void __attribute__((__weak__)) __SEGGER_RTL_X_heap_lock (void);
652void __attribute__((__weak__)) __SEGGER_RTL_X_heap_unlock (void);
653int __attribute__((__weak__)) __SEGGER_RTL_X_atomic_lock (void);
654void __attribute__((__weak__)) __SEGGER_RTL_X_atomic_unlock (int __state);
655int __attribute__((__weak__)) __SEGGER_RTL_X_atomic_is_lock_free (unsigned int __size, void *__ptr);
656void __attribute__((__weak__)) __SEGGER_RTL_X_atomic_synchronize (void);
657volatile int * __aeabi_errno_addr (void);
658void __aeabi_assert (const char *__expression, const char *__filename, int __line);
659# 584 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\__SEGGER_RTL.h" 3
660void __SEGGER_RTL_execute_at_exit_fns (void);
661void __SEGGER_RTL_set_locale_name_buffer (char *__buffer);
662int __SEGGER_RTL_mb_max (const struct __SEGGER_RTL_POSIX_locale_s *__loc);
663int __SEGGER_RTL_mb_cur_max (void);
664void __SEGGER_RTL_init_heap (void *__ptr, unsigned int __size);
665# 21 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\stdio.h" 2 3
666# 72 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\stdio.h" 3
667typedef unsigned int size_t;
668
669
670
671
672typedef long fpos_t;
673
674
675
676
677typedef struct __SEGGER_RTL_FILE_impl FILE;
678
679
680
681
682typedef struct __SEGGER_RTL_POSIX_locale_s *locale_t;
683# 97 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\stdio.h" 3
684extern FILE *stdin;
685extern FILE *stdout;
686extern FILE *stderr;
687# 108 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\stdio.h" 3
688int putchar (int __c);
689int getchar (void);
690int puts (const char *__s);
691char * gets (char *__s);
692int sprintf (char *__s, const char *__format, ...);
693int sprintf_l (char *__s, locale_t __loc, const char *__format, ...);
694int snprintf (char *__s, size_t __n, const char *__format, ...);
695int snprintf_l (char *__s, size_t __n, locale_t __loc, const char *__format, ...);
696int vsnprintf (char *__s, size_t __n, const char *__format, __builtin_va_list __arg);
697int vsnprintf_l (char *__s, size_t __n, locale_t __loc, const char *__format, __builtin_va_list __arg);
698int printf (const char *__format, ...);
699int printf_l (locale_t __loc, const char *__format, ...);
700int vprintf (const char *__format, __builtin_va_list __arg);
701int vprintf_l (locale_t __loc, const char *__format, __builtin_va_list __arg);
702int vsprintf (char *__s, const char *__format, __builtin_va_list __arg);
703int vsprintf_l (char *__s, locale_t __loc, const char *__format, __builtin_va_list __arg);
704int vasprintf (char **__strp, const char *__format, __builtin_va_list __ap);
705int vasprintf_l (char **__strp, locale_t __loc, const char *__format, __builtin_va_list __ap);
706int asprintf (char **__strp, const char *__format, ...);
707int asprintf_l (char **__strp, locale_t __loc, const char *__format, ...);
708
709int scanf (const char *__format, ...);
710int scanf_l (locale_t __loc, const char *__format, ...);
711int sscanf (const char *__s, const char *__format, ...);
712int sscanf_l (const char *__s, locale_t __loc, const char *__format, ...);
713int vscanf (const char *__format, __builtin_va_list __arg);
714int vscanf_l (locale_t __loc, const char *__format, __builtin_va_list __arg);
715int vsscanf (const char *__s, const char *__format, __builtin_va_list __arg);
716int vsscanf_l (const char *__s, locale_t __loc, const char *__format, __builtin_va_list __arg);
717
718void clearerr (FILE *);
719int fclose (FILE *);
720int feof (FILE *);
721int ferror (FILE *);
722int fflush (FILE *);
723int fgetc (FILE *);
724int fgetpos (FILE *, fpos_t *);
725char * fgets (char *, int, FILE *);
726int fileno (FILE *);
727FILE * fopen (const char *, const char *);
728int fprintf (FILE *, const char *, ...);
729int fprintf_l (FILE *, locale_t, const char *, ...);
730int vfprintf (FILE *__stream, const char *__format, __builtin_va_list __arg);
731int vfprintf_l (FILE *__stream, locale_t loc, const char *__format, __builtin_va_list __arg);
732int fputc (int, FILE *);
733int fputs (const char *, FILE *);
734size_t fread (void *, size_t, size_t, FILE *);
735FILE * freopen (const char *, const char *, FILE *);
736int fscanf (FILE *, const char *, ...);
737int fscanf_l (FILE *, locale_t, const char *, ...);
738int vfscanf (FILE *, const char *, __builtin_va_list);
739int vfscanf_l (FILE *, locale_t, const char *, __builtin_va_list);
740int fseek (FILE *, long, int);
741int fsetpos (FILE *, const fpos_t *);
742long ftell (FILE *);
743size_t fwrite (const void *, size_t, size_t, FILE *);
744int getc (FILE *);
745void perror (const char *);
746int putc (int, FILE *);
747int remove (const char *);
748int rename (const char *, const char *);
749void rewind (FILE *);
750void setbuf (FILE *, char *);
751int setvbuf (FILE *, char *, int, size_t);
752FILE * tmpfile (void);
753char * tmpnam (char *);
754int ungetc (int, FILE *);
755
756
757
758
759
760int dprintf (int, const char *, ...);
761int vdprintf (int, const char *, __builtin_va_list);
762FILE * fdopen (int, const char *);
763# 2 "D:\\projekte\\ecsSmartPro\\trunk\\firmware\\Src\\self_discharge.c" 2
764# 1 "D:/projekte/ecsSmartPro/trunk/firmware/Inc\\sysdata.h" 1
765# 15 "D:/projekte/ecsSmartPro/trunk/firmware/Inc\\sysdata.h"
766# 1 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\stdint.h" 1 3
767# 272 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\stdint.h" 3
768typedef signed char int8_t;
769typedef unsigned char uint8_t;
770typedef short int16_t;
771typedef unsigned short uint16_t;
772typedef int int32_t;
773typedef unsigned int uint32_t;
774typedef long long int int64_t;
775typedef long long unsigned int uint64_t;
776
777typedef signed char int_least8_t;
778typedef short int_least16_t;
779typedef int int_least32_t;
780typedef long long int int_least64_t;
781typedef unsigned char uint_least8_t;
782typedef unsigned short uint_least16_t;
783typedef unsigned int uint_least32_t;
784typedef long long unsigned int uint_least64_t;
785
786typedef signed char int_fast8_t;
787typedef short int_fast16_t;
788typedef int int_fast32_t;
789typedef long long int int_fast64_t;
790typedef unsigned char uint_fast8_t;
791typedef unsigned short uint_fast16_t;
792typedef unsigned int uint_fast32_t;
793typedef long long unsigned int uint_fast64_t;
794
795typedef int intptr_t;
796typedef unsigned int uintptr_t;
797
798typedef long long int intmax_t;
799typedef long long unsigned int uintmax_t;
800# 16 "D:/projekte/ecsSmartPro/trunk/firmware/Inc\\sysdata.h" 2
801# 25 "D:/projekte/ecsSmartPro/trunk/firmware/Inc\\sysdata.h"
802typedef union
803{
804 uint16_t w;
805 int16_t sw;
806 uint8_t b[2];
807 int8_t sb[2];
808} bword_t;
809
810
811
812typedef struct
813{
814
815 uint16_t device_type;
816 uint16_t reserved0;
817 uint32_t sn;
818
819 uint16_t fw_revision_major;
820 uint16_t fw_revision_minor;
821
822 uint16_t fw_revision_revision;
823 uint16_t reserved1;
824
825 uint32_t baudrate;
826
827 uint16_t parityMode;
828 uint16_t stopBit;
829
830 uint16_t slave_address;
831 uint16_t command;
832
833 uint16_t ibn_day;
834 uint16_t ibn_month;
835 uint16_t ibn_year;
836 uint16_t user_id;
837 uint16_t reserved2[8];
838
839
840 uint16_t lvpStart;
841 uint16_t lvpStop;
842
843 uint16_t ovpStart;
844 uint16_t ovpStop;
845
846 int16_t loadCurrentLimit;
847 int16_t chargeCurrentLimit;
848
849
850 int16_t chargeStopHighTemperatureStart;
851 int16_t chargeStopHighTemperatureStop;
852
853 int16_t chargeStopLowTemperatureStart;
854 int16_t chargeStopLowTemperatureStop;
855
856 int16_t dischargeStopHighTemperatureStart;
857 int16_t dischargeStopHighTemperatureStop;
858
859 int16_t dischargeStopLowTemperatureStart;
860 int16_t dischargeStopLowTemperatureStop;
861
862
863
864 uint16_t peukert;
865 uint16_t cef;
866
867 uint16_t iBatFull;
868 uint16_t tBatFull;
869
870 uint16_t uBatFull;
871 uint16_t uBatEmpty;
872 uint32_t cellCapacity;
873 uint32_t battEnergy;
874 uint16_t socCalcMode;
875 uint16_t reserved3;
876 uint16_t cellRatedDischargeTime;
877 int16_t uBatEmptyCompStartTemp;
878 int16_t uBatEmptyCompStopTemp;
879 uint16_t uBatEmptyCompStopVolt;
880 int16_t extraDischargeStrom_mA;
881 uint16_t cefW;
882 uint16_t lvpMode;
883 uint16_t ovpMode;
884
885
886 int32_t batteryCurrentOffset;
887 int16_t batteryCurrentOffsetRefTemperatureShunt;
888 int16_t batteryCurrentOffsetRefTemperatureChip;
889 int32_t batteryCurrentOffsetRefshuntVoltage;
890
891 int32_t batteryCurrentOffsetCommonModeCalibrationVoltage;
892 int32_t batteryCurrentOffsetCommonModeCompensationFactor;
893
894 int16_t batteryCurrentOffsetTemperatureCalibrationTemperature;
895 int16_t reserved4;
896 int32_t batteryCurrentOffsetTemperatureCompensationFactor;
897
898 int32_t batteryCurrentGainCorrectionFaktor;
899 int16_t batteryCurrentGainRefTempShunt;
900 int16_t batteryCurrentGainRefTempChip;
901 int32_t batteryCurrentGainRefCurrent;
902
903 int16_t batteryCurrentGainTemperatureCalibrationShuntTemperature;
904 int16_t reserved5;
905 int32_t batteryCurrentGainTemperatureCompensationShuntFactor;
906 int16_t batteryCurrentGainTemperatureCalibrationChipTemperature;
907 int16_t reserved6;
908 int32_t batteryCurrentGainTemperatureCompensationChipFactor;
909
910 uint32_t reserved7[6];
911
912} device_parameter_t;
913
914
915
916typedef struct
917{
918              uint16_t voltageVref;
919              uint16_t realVdd;
920              int16_t chipTemperature;
921              int16_t shuntTemperature;
922              int16_t shuntTemperatureMax;
923              int16_t shuntTemperatureMin;
924              uint32_t shuntVoltage;
925              int32_t batteryVoltage;
926              int32_t batteryVoltageMax;
927              int32_t batteryVoltageMin;
928              int32_t batteryCurrent;
929              int32_t batteryCurrentMax;
930              int32_t batteryCurrentMin;
931              int32_t batteryCurrentCorrected;
932              int32_t mAhCounter;
933              int64_t mAsCounter;
934              int32_t soc;
935              int16_t ovpState;
936              int16_t lvpState;
937              int32_t batteryPower;
938              int32_t detectedCapacity;
939              int32_t detectedEnergy;
940              int16_t SoH;
941              int16_t efficiency;
942              int16_t selfDischarge;
943              int16_t selfDischargeAvg;
944              int16_t esr;
945              int16_t esr_fast;
946              uint32_t lastTimeVbatFull;
947              uint32_t lastTimeVbatEmpty;
948              uint32_t onTime;
949              uint32_t dischargeTotalAh;
950              uint32_t chargeTotalAh;
951              uint32_t dischargeTotalWh;
952              uint32_t chargeTotalWh;
953              uint16_t fullCyclesCnt;
954              uint16_t reserved8;
955              int64_t mAs_AutoMode;
956              int64_t mWs_AutoMode;
957              uint16_t ovp_sense;
958              uint16_t lvp_sense;
959              uint16_t reserved9;
960              uint16_t reserved10;
961              uint16_t reserved11;
962              uint16_t reserved12;
963              uint16_t reserved13;
964              uint16_t reserved14;
965              uint16_t reserved15;
966              uint16_t reserved16;
967              uint16_t reserved17;
968              uint16_t reserved18;
969
970
971              int32_t mAh_AutoMode;
972              int32_t mWh_AutoMode;
973              int64_t mWsCounter;
974              int32_t mWhCounter;
975              int32_t correctedStromForChargeWhCnt;
976              uint16_t uBatEmptyTempComp;
977              uint16_t adc_restarts;
978              int16_t reserved19;
979              int16_t reserved20;
980              int32_t battryCurrentRaw;
981              int32_t batteryCurrentOffsetCommonModeCorrectionADCSteps;
982              int32_t fast_current;
983              int32_t fast_voltage;
984              int16_t esrCalcStatus;
985              uint16_t esrCalcTime;
986              int16_t selfDischargeStatus;
987              uint16_t selfDischargeTime;
988              uint8_t message[24];
989              int32_t current_buffer[32];
990              int32_t voltage_buffer[32];
991              int32_t current_buffer_fast[32];
992              int32_t voltage_buffer_fast[32];
993
994} device_values_t;
995
996
997
998typedef struct
999{
1000 device_parameter_t parameter;
1001 device_values_t values;
1002} sys_data_struct_t;
1003
1004
1005typedef volatile union
1006{
1007 sys_data_struct_t s;
1008 bword_t mb[sizeof(sys_data_struct_t) / 2];
1009} sys_data_t;
1010
1011
1012
1013extern sys_data_t sys_data;
1014
1015
1016
1017void SYS_DATA_Init(void);
1018# 3 "D:\\projekte\\ecsSmartPro\\trunk\\firmware\\Src\\self_discharge.c" 2
1019# 1 "D:/projekte/ecsSmartPro/trunk/firmware/Inc\\self_discharge.h" 1
1020# 1 "C:/Program Files/SEGGER/SEGGER Embedded Studio 8.22a/include\\inttypes.h" 1 3
1021# 2 "D:/projekte/ecsSmartPro/trunk/firmware/Inc\\self_discharge.h" 2
1022
1023int16_t SELF_DISCHARGE_Exec(void);
1024# 4 "D:\\projekte\\ecsSmartPro\\trunk\\firmware\\Src\\self_discharge.c" 2
1025
1026
1027
1028
1029int16_t SELF_DISCHARGE_Exec(void)
1030{
1031
1032  const double batt_float_voltage_tol = 0.03;
1033  const int32_t batt_voltage_holding_tol = 10;
1034  int32_t max_u = sys_data.s.parameter.uBatFull * ( 1 + batt_float_voltage_tol);
1035  int32_t min_u = sys_data.s.parameter.uBatFull * ( 1 - batt_float_voltage_tol);
1036  static uint32_t holding_counter = 0;
1037  static int32_t u_hold = 0;
1038
1039
1040  sys_data.s.values.selfDischargeTime = holding_counter;
1041
1042  int32_t u = sys_data.s.values.batteryVoltage;
1043
1044  if (u > max_u)
1045  {
1046    u_hold = 0;
1047    holding_counter = 0;
1048    return -1;
1049  }
1050
1051  if (u < min_u)
1052  {
1053    u_hold = 0;
1054    holding_counter = 0;
1055    return -1;
1056  }
1057
1058
1059  if (u_hold == 0)
1060  {
1061    u_hold = u;
1062  }
1063
1064  int32_t u_hold_max = u_hold + batt_voltage_holding_tol;
1065  int32_t u_hold_min = u_hold - batt_voltage_holding_tol;
1066
1067  if (u > u_hold_max)
1068  {
1069    u_hold = 0;
1070    holding_counter = 0;
1071
1072    return -2;
1073  }
1074
1075
1076  if (u < u_hold_min)
1077  {
1078    u_hold = 0;
1079    holding_counter = 0;
1080
1081    return -2;
1082  }
1083
1084
1085  if (sys_data.s.values.batteryCurrent < sys_data.s.parameter.extraDischargeStrom_mA)
1086  {
1087
1088    u_hold = 0;
1089    holding_counter = 0;
1090
1091    return -3;
1092  }
1093
1094  holding_counter++;
1095  if (holding_counter > (10800 ))
1096  {
1097    sys_data.s.values.selfDischarge = sys_data.s.values.batteryCurrent - sys_data.s.parameter.extraDischargeStrom_mA;
1098  }
1099
1100
1101
1102  if (sys_data.s.values.selfDischarge > 0)
1103  {
1104
1105
1106    static uint32_t last_days;
1107    static unsigned long avgsum = 0;
1108
1109
1110    uint32_t days = sys_data.s.values.onTime / (24U * 3600U);
1111
1112
1113    if (days != last_days)
1114    {
1115      last_days = days;
1116
1117      uint32_t avgval;
1118
1119      avgsum -= avgsum/64;
1120      avgsum += sys_data.s.values.selfDischarge;
1121      avgval = avgsum / 64;
1122
1123      sys_data.s.values.selfDischargeAvg = avgval;
1124    }
1125
1126  }
1127
1128
1129
1130  return 0;
1131
1132
1133}
Note: See TracBrowser for help on using the repository browser.