source: trunk/firmware/Debug125A/esr_PP.c @ 6

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