-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand_handlers.lst
More file actions
3388 lines (3387 loc) · 135 KB
/
Copy pathcommand_handlers.lst
File metadata and controls
3388 lines (3387 loc) · 135 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1 .file "command_handlers.c"
2 __SP_H__ = 0x3e
3 __SP_L__ = 0x3d
4 __SREG__ = 0x3f
5 __RAMPZ__ = 0x3b
6 __tmp_reg__ = 0
7 __zero_reg__ = 1
8 .text
9 .Ltext0:
10 .cfi_sections .debug_frame
11 .section .rodata.str1.1,"aMS",@progbits,1
12 .LC0:
13 0000 5265 7365 .string "Resetting...."
13 7474 696E
13 672E 2E2E
13 2E00
14 .section .text.command_handle_reset,"ax",@progbits
15 .global command_handle_reset
17 command_handle_reset:
18 .LFB13:
19 .file 1 "command_handlers.c"
1:command_handlers.c **** /*
2:command_handlers.c **** *
3:command_handlers.c **** * Copyright (C) 2013 Bas Brugman
4:command_handlers.c **** * http://www.visionnaire.nl
5:command_handlers.c **** *
6:command_handlers.c **** * Licensed under the Apache License, Version 2.0 (the "License");
7:command_handlers.c **** * you may not use this file except in compliance with the License.
8:command_handlers.c **** * You may obtain a copy of the License at
9:command_handlers.c **** *
10:command_handlers.c **** * http://www.apache.org/licenses/LICENSE-2.0
11:command_handlers.c **** *
12:command_handlers.c **** * Unless required by applicable law or agreed to in writing, software
13:command_handlers.c **** * distributed under the License is distributed on an "AS IS" BASIS,
14:command_handlers.c **** * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15:command_handlers.c **** * See the License for the specific language governing permissions and
16:command_handlers.c **** * limitations under the License.
17:command_handlers.c **** *
18:command_handlers.c **** */
19:command_handlers.c **** #include <stdlib.h>
20:command_handlers.c **** #include <stdint.h>
21:command_handlers.c **** #include <string.h>
22:command_handlers.c **** #include <avr/io.h>
23:command_handlers.c **** #include <avr/pgmspace.h>
24:command_handlers.c **** #include <avr/eeprom.h>
25:command_handlers.c ****
26:command_handlers.c **** #include "command_handlers.h"
27:command_handlers.c ****
28:command_handlers.c **** const char *btob(uint8_t x) {
29:command_handlers.c **** byte_buf[0] = '\0';
30:command_handlers.c **** uint8_t z;
31:command_handlers.c **** for (z = 128; z > 0; z >>= 1) {
32:command_handlers.c **** strcat(byte_buf, ((x & z) == z) ? "1" : "0");
33:command_handlers.c **** }
34:command_handlers.c **** return byte_buf;
35:command_handlers.c **** }
36:command_handlers.c ****
37:command_handlers.c **** void register_commands() {
38:command_handlers.c **** command_register("help", help_info, COMMAND_NO_PRIV, command_handle_help);
39:command_handlers.c **** command_register("reset", reset_info, COMMAND_NO_PRIV, command_handle_reset);
40:command_handlers.c **** command_register("show version", show_version_info, COMMAND_NO_PRIV, command_handle_show_version)
41:command_handlers.c **** command_register("show state", show_state_info, COMMAND_NO_PRIV, command_handle_show_state);
42:command_handlers.c **** command_register("show conf", show_conf_info, COMMAND_NO_PRIV, command_handle_show_conf);
43:command_handlers.c **** command_register("show voltage", show_voltage_info, COMMAND_NO_PRIV, command_handle_show_voltage)
44:command_handlers.c **** command_register("set dsense", set_sense_info, COMMAND_NO_PRIV, command_handle_set_sense);
45:command_handlers.c **** command_register("set conf", set_conf_info, COMMAND_NO_PRIV, command_handle_set_conf);
46:command_handlers.c **** }
47:command_handlers.c ****
48:command_handlers.c **** char *display_state_info() {
49:command_handlers.c **** strcpy(uart_buf, "st: ");
50:command_handlers.c **** strcat(uart_buf, btob(g_state >> 8));
51:command_handlers.c **** strcat(uart_buf, ".");
52:command_handlers.c **** strcat(uart_buf, btob(g_state));
53:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
54:command_handlers.c **** strcat(uart_buf, "ds: ");
55:command_handlers.c **** strcat(uart_buf, btob(g_dyn_senses >> 8));
56:command_handlers.c **** strcat(uart_buf, ".");
57:command_handlers.c **** strcat(uart_buf, btob(g_dyn_senses));
58:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
59:command_handlers.c **** strcat(uart_buf, "dss:");
60:command_handlers.c **** strcat(uart_buf, btob(g_dyn_senses_status >> 8));
61:command_handlers.c **** strcat(uart_buf, ".");
62:command_handlers.c **** strcat(uart_buf, btob(g_dyn_senses_status));
63:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
64:command_handlers.c **** return uart_buf;
65:command_handlers.c **** }
66:command_handlers.c ****
67:command_handlers.c **** char *display_voltage_info() {
68:command_handlers.c **** char accu_str[5];
69:command_handlers.c **** char x_str[5];
70:command_handlers.c **** char y_str[5];
71:command_handlers.c **** char z_str[5];
72:command_handlers.c **** utoa(g_adc_voltage[0],accu_str,10);
73:command_handlers.c **** utoa(g_adc_voltage[1],x_str,10);
74:command_handlers.c **** utoa(g_adc_voltage[2],y_str,10);
75:command_handlers.c **** utoa(g_adc_voltage[3],z_str,10);
76:command_handlers.c **** strcpy(uart_buf, "battery: ");
77:command_handlers.c **** strcat(uart_buf, accu_str);
78:command_handlers.c **** strcat(uart_buf, " x: ");
79:command_handlers.c **** strcat(uart_buf, x_str);
80:command_handlers.c **** strcat(uart_buf, " y: ");
81:command_handlers.c **** strcat(uart_buf, y_str);
82:command_handlers.c **** strcat(uart_buf, " z: ");
83:command_handlers.c **** strcat(uart_buf, z_str);
84:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
85:command_handlers.c **** return uart_buf;
86:command_handlers.c **** }
87:command_handlers.c ****
88:command_handlers.c **** char *display_conf_info() {
89:command_handlers.c **** char tmp_str[32];
90:command_handlers.c **** utoa(g_settings.deep_sleep_counter,tmp_str,10);
91:command_handlers.c **** strcpy(uart_buf, "deep sleep counter (dsc): ");
92:command_handlers.c **** strcat(uart_buf, tmp_str);
93:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
94:command_handlers.c **** utoa(g_settings.settle_time,tmp_str,10);
95:command_handlers.c **** strcat(uart_buf, "settle time (st): ");
96:command_handlers.c **** strcat(uart_buf, tmp_str);
97:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
98:command_handlers.c **** utoa(g_settings.alarm_settle_time,tmp_str,10);
99:command_handlers.c **** strcat(uart_buf, "alarm settle time (ast): ");
100:command_handlers.c **** strcat(uart_buf, tmp_str);
101:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
102:command_handlers.c **** utoa(g_settings.indicator_sound,tmp_str,10);
103:command_handlers.c **** strcat(uart_buf, "indicator sound (is): ");
104:command_handlers.c **** strcat(uart_buf, tmp_str);
105:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
106:command_handlers.c **** utoa(g_settings.blink_speed,tmp_str,10);
107:command_handlers.c **** strcat(uart_buf, "blink speed (bs): ");
108:command_handlers.c **** strcat(uart_buf, tmp_str);
109:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
110:command_handlers.c **** utoa(g_settings.alarm_counter,tmp_str,10);
111:command_handlers.c **** strcat(uart_buf, "alarm counter (ac): ");
112:command_handlers.c **** strcat(uart_buf, tmp_str);
113:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
114:command_handlers.c **** utoa(g_settings.alarm_trigger,tmp_str,10);
115:command_handlers.c **** strcat(uart_buf, "alarm trigger (at): ");
116:command_handlers.c **** strcat(uart_buf, tmp_str);
117:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
118:command_handlers.c **** utoa(g_settings.alarm_trigger_counter,tmp_str,10);
119:command_handlers.c **** strcat(uart_buf, "alarm trigger (atc): ");
120:command_handlers.c **** strcat(uart_buf, tmp_str);
121:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
122:command_handlers.c **** utoa(g_settings.alarm_thres_min,tmp_str,10);
123:command_handlers.c **** strcat(uart_buf, "alarm min. threshold (amint): ");
124:command_handlers.c **** strcat(uart_buf, tmp_str);
125:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
126:command_handlers.c **** utoa(g_settings.alarm_thres_max,tmp_str,10);
127:command_handlers.c **** strcat(uart_buf, "alarm max.threshold (amaxt): ");
128:command_handlers.c **** strcat(uart_buf, tmp_str);
129:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
130:command_handlers.c **** utoa(g_settings.backpedal,tmp_str,10);
131:command_handlers.c **** strcat(uart_buf, "backpedal (bp): ");
132:command_handlers.c **** strcat(uart_buf, tmp_str);
133:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
134:command_handlers.c **** utoa(g_settings.backpedal_thres_min,tmp_str,10);
135:command_handlers.c **** strcat(uart_buf, "backpedal threshold (bpt): ");
136:command_handlers.c **** strcat(uart_buf, tmp_str);
137:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
138:command_handlers.c **** utoa(g_settings.startup_sound,tmp_str,10);
139:command_handlers.c **** strcat(uart_buf, "startup sound (ss): ");
140:command_handlers.c **** strcat(uart_buf, tmp_str);
141:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
142:command_handlers.c **** utoa(g_settings.alarm_sound,tmp_str,10);
143:command_handlers.c **** strcat(uart_buf, "alarm sound (as): ");
144:command_handlers.c **** strcat(uart_buf, tmp_str);
145:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
146:command_handlers.c **** strcat(uart_buf, "password (p): ");
147:command_handlers.c **** strcat(uart_buf, g_settings.passwd);
148:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
149:command_handlers.c **** return uart_buf;
150:command_handlers.c **** }
151:command_handlers.c ****
152:command_handlers.c **** void command_handle_show_version(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
153:command_handlers.c **** strcpy_P(cmd_output, g_firmware_version);
154:command_handlers.c **** }
155:command_handlers.c ****
156:command_handlers.c **** void command_handle_show_state(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
157:command_handlers.c **** strcpy(cmd_output, display_state_info());
158:command_handlers.c **** }
159:command_handlers.c ****
160:command_handlers.c **** void command_handle_set_sense(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
161:command_handlers.c **** g_senses = 0; // deactivate physical senses, because they can conflict
162:command_handlers.c **** g_dyn_senses = (uint16_t)(strtol(args[0], NULL, 2));
163:command_handlers.c **** g_dyn_senses_status = (uint16_t)(strtol(args[1], NULL, 2));
164:command_handlers.c **** strcpy(cmd_output, "Senses updated.");
165:command_handlers.c **** }
166:command_handlers.c ****
167:command_handlers.c **** void command_handle_set_conf(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
168:command_handlers.c **** uint8_t success = 1;
169:command_handlers.c **** if (strcmp("dsc", args[0]) == 0) {
170:command_handlers.c **** eeprom_update_word(&g_rom_settings.deep_sleep_counter, (uint16_t)(atoi(args[1])));
171:command_handlers.c **** } else if (strcmp("st", args[0]) == 0) {
172:command_handlers.c **** eeprom_update_word(&g_rom_settings.settle_time, (uint16_t)(atoi(args[1])));
173:command_handlers.c **** } else if (strcmp("ast", args[0]) == 0) {
174:command_handlers.c **** eeprom_update_word(&g_rom_settings.alarm_settle_time, (uint16_t)(atoi(args[1])));
175:command_handlers.c **** } else if (strcmp("is", args[0]) == 0) {
176:command_handlers.c **** eeprom_update_byte(&g_rom_settings.indicator_sound, (uint8_t)(atoi(args[1])));
177:command_handlers.c **** } else if (strcmp("bs", args[0]) == 0) {
178:command_handlers.c **** eeprom_update_word(&g_rom_settings.blink_speed, (uint16_t)(atoi(args[1])));
179:command_handlers.c **** } else if (strcmp("ac", args[0]) == 0) {
180:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_counter, (uint8_t)(atoi(args[1])));
181:command_handlers.c **** } else if (strcmp("at", args[0]) == 0) {
182:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_trigger, (uint8_t)(atoi(args[1])));
183:command_handlers.c **** } else if (strcmp("atc", args[0]) == 0) {
184:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_trigger_counter, (uint8_t)(atoi(args[1])));
185:command_handlers.c **** } else if (strcmp("amint", args[0]) == 0) {
186:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_thres_min, (uint8_t)(atoi(args[1])));
187:command_handlers.c **** } else if (strcmp("amaxt", args[0]) == 0) {
188:command_handlers.c **** eeprom_update_word(&g_rom_settings.alarm_thres_max, (uint16_t)(atoi(args[1])));
189:command_handlers.c **** } else if (strcmp("bp", args[0]) == 0) {
190:command_handlers.c **** eeprom_update_byte(&g_rom_settings.backpedal, (uint8_t)(atoi(args[1])));
191:command_handlers.c **** } else if (strcmp("bpt", args[0]) == 0) {
192:command_handlers.c **** eeprom_update_word(&g_rom_settings.backpedal_thres_min, (uint16_t)(atoi(args[1])));
193:command_handlers.c **** } else if (strcmp("ss", args[0]) == 0) {
194:command_handlers.c **** eeprom_update_byte(&g_rom_settings.startup_sound, (uint8_t)(atoi(args[1])));
195:command_handlers.c **** } else if (strcmp("as", args[0]) == 0) {
196:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_sound, (uint8_t)(atoi(args[1])));
197:command_handlers.c **** } else if (strcmp("p", args[0]) == 0) {
198:command_handlers.c **** eeprom_update_block(args[1], &g_rom_settings.passwd, 32);
199:command_handlers.c **** } else {
200:command_handlers.c **** success = 0;
201:command_handlers.c **** }
202:command_handlers.c **** if (success) {
203:command_handlers.c **** strcpy(cmd_output, "Update successful, RESET the device to use new values!");
204:command_handlers.c **** } else {
205:command_handlers.c **** strcpy(cmd_output, "Configuration options error! Use set conf [abbreviation] [value].");
206:command_handlers.c **** }
207:command_handlers.c **** }
208:command_handlers.c ****
209:command_handlers.c **** void command_handle_show_conf(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
210:command_handlers.c **** strcpy(cmd_output, display_conf_info());
211:command_handlers.c **** }
212:command_handlers.c ****
213:command_handlers.c **** void command_handle_show_voltage(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
214:command_handlers.c **** strcpy(cmd_output, display_voltage_info());
215:command_handlers.c **** }
216:command_handlers.c ****
217:command_handlers.c **** void command_handle_help(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
218:command_handlers.c **** strcpy_P(uart_buf, help_info);
219:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
220:command_handlers.c **** strcat_P(uart_buf, reset_info);
221:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
222:command_handlers.c **** strcat_P(uart_buf, show_version_info);
223:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
224:command_handlers.c **** strcat_P(uart_buf, show_state_info);
225:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
226:command_handlers.c **** strcat_P(uart_buf, show_voltage_info);
227:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
228:command_handlers.c **** strcat_P(uart_buf, set_sense_info);
229:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
230:command_handlers.c **** strcat_P(uart_buf, set_conf_info);
231:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
232:command_handlers.c **** strcat_P(uart_buf, show_conf_info);
233:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
234:command_handlers.c **** strcpy(cmd_output, uart_buf);
235:command_handlers.c **** }
236:command_handlers.c ****
237:command_handlers.c **** void command_handle_reset(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
20 .loc 1 237 0
21 .cfi_startproc
22 .LVL0:
23 /* prologue: function */
24 /* frame size = 0 */
25 /* stack size = 0 */
26 .L__stack_usage = 0
238:command_handlers.c **** g_mcu_reset = 1;
27 .loc 1 238 0
28 0000 21E0 ldi r18,lo8(1)
29 0002 2093 0000 sts g_mcu_reset,r18
239:command_handlers.c **** strcpy(cmd_output, "Resetting....");
30 .loc 1 239 0
31 0006 2EE0 ldi r18,lo8(14)
32 0008 E0E0 ldi r30,lo8(.LC0)
33 000a F0E0 ldi r31,hi8(.LC0)
34 000c DC01 movw r26,r24
35 0:
36 000e 0190 ld r0,Z+
37 0010 0D92 st X+,r0
38 0012 2A95 dec r18
39 0014 01F4 brne 0b
40 0016 0895 ret
41 .cfi_endproc
42 .LFE13:
44 .section .text.command_handle_show_version,"ax",@progbits
45 .global command_handle_show_version
47 command_handle_show_version:
48 .LFB6:
152:command_handlers.c **** void command_handle_show_version(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
49 .loc 1 152 0
50 .cfi_startproc
51 .LVL1:
52 /* prologue: function */
53 /* frame size = 0 */
54 /* stack size = 0 */
55 .L__stack_usage = 0
153:command_handlers.c **** strcpy_P(cmd_output, g_firmware_version);
56 .loc 1 153 0
57 0000 60E0 ldi r22,lo8(g_firmware_version)
58 0002 70E0 ldi r23,hi8(g_firmware_version)
59 .LVL2:
60 0004 0C94 0000 jmp strcpy_P
61 .LVL3:
62 .cfi_endproc
63 .LFE6:
65 .section .rodata.str1.1
66 .LC1:
67 000e 5365 6E73 .string "Senses updated."
67 6573 2075
67 7064 6174
67 6564 2E00
68 .section .text.command_handle_set_sense,"ax",@progbits
69 .global command_handle_set_sense
71 command_handle_set_sense:
72 .LFB8:
160:command_handlers.c **** void command_handle_set_sense(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
73 .loc 1 160 0
74 .cfi_startproc
75 .LVL4:
76 0000 0F93 push r16
77 .LCFI0:
78 .cfi_def_cfa_offset 3
79 .cfi_offset 16, -2
80 0002 1F93 push r17
81 .LCFI1:
82 .cfi_def_cfa_offset 4
83 .cfi_offset 17, -3
84 0004 CF93 push r28
85 .LCFI2:
86 .cfi_def_cfa_offset 5
87 .cfi_offset 28, -4
88 0006 DF93 push r29
89 .LCFI3:
90 .cfi_def_cfa_offset 6
91 .cfi_offset 29, -5
92 /* prologue: function */
93 /* frame size = 0 */
94 /* stack size = 4 */
95 .L__stack_usage = 4
96 0008 EC01 movw r28,r24
97 000a 8B01 movw r16,r22
161:command_handlers.c **** g_senses = 0; // deactivate physical senses, because they can conflict
98 .loc 1 161 0
99 000c 1092 0000 sts g_senses+1,__zero_reg__
100 0010 1092 0000 sts g_senses,__zero_reg__
162:command_handlers.c **** g_dyn_senses = (uint16_t)(strtol(args[0], NULL, 2));
101 .loc 1 162 0
102 0014 42E0 ldi r20,lo8(2)
103 0016 50E0 ldi r21,0
104 0018 60E0 ldi r22,0
105 001a 70E0 ldi r23,0
106 .LVL5:
107 001c C801 movw r24,r16
108 .LVL6:
109 001e 0E94 0000 call strtol
110 .LVL7:
111 0022 7093 0000 sts g_dyn_senses+1,r23
112 0026 6093 0000 sts g_dyn_senses,r22
163:command_handlers.c **** g_dyn_senses_status = (uint16_t)(strtol(args[1], NULL, 2));
113 .loc 1 163 0
114 002a 42E0 ldi r20,lo8(2)
115 002c 50E0 ldi r21,0
116 002e 60E0 ldi r22,0
117 0030 70E0 ldi r23,0
118 0032 C801 movw r24,r16
119 0034 8096 adiw r24,32
120 0036 0E94 0000 call strtol
121 .LVL8:
122 003a 7093 0000 sts g_dyn_senses_status+1,r23
123 003e 6093 0000 sts g_dyn_senses_status,r22
164:command_handlers.c **** strcpy(cmd_output, "Senses updated.");
124 .loc 1 164 0
125 0042 80E1 ldi r24,lo8(16)
126 0044 E0E0 ldi r30,lo8(.LC1)
127 0046 F0E0 ldi r31,hi8(.LC1)
128 0048 DE01 movw r26,r28
129 0:
130 004a 0190 ld r0,Z+
131 004c 0D92 st X+,r0
132 004e 8A95 dec r24
133 0050 01F4 brne 0b
134 /* epilogue start */
165:command_handlers.c **** }
135 .loc 1 165 0
136 0052 DF91 pop r29
137 0054 CF91 pop r28
138 .LVL9:
139 0056 1F91 pop r17
140 0058 0F91 pop r16
141 .LVL10:
142 005a 0895 ret
143 .cfi_endproc
144 .LFE8:
146 .section .rodata.str1.1
147 .LC2:
148 001e 6473 6300 .string "dsc"
149 .LC3:
150 0022 7374 00 .string "st"
151 .LC4:
152 0025 6173 7400 .string "ast"
153 .LC5:
154 0029 6973 00 .string "is"
155 .LC6:
156 002c 6273 00 .string "bs"
157 .LC7:
158 002f 6163 00 .string "ac"
159 .LC8:
160 0032 6174 00 .string "at"
161 .LC9:
162 0035 6174 6300 .string "atc"
163 .LC10:
164 0039 616D 696E .string "amint"
164 7400
165 .LC11:
166 003f 616D 6178 .string "amaxt"
166 7400
167 .LC12:
168 0045 6270 00 .string "bp"
169 .LC13:
170 0048 6270 7400 .string "bpt"
171 .LC14:
172 004c 7373 00 .string "ss"
173 .LC15:
174 004f 6173 00 .string "as"
175 .LC16:
176 0052 7000 .string "p"
177 .LC17:
178 0054 5570 6461 .string "Update successful, RESET the device to use new values!"
178 7465 2073
178 7563 6365
178 7373 6675
178 6C2C 2052
179 .LC18:
180 008b 436F 6E66 .string "Configuration options error! Use set conf [abbreviation] [value]."
180 6967 7572
180 6174 696F
180 6E20 6F70
180 7469 6F6E
181 .section .text.command_handle_set_conf,"ax",@progbits
182 .global command_handle_set_conf
184 command_handle_set_conf:
185 .LFB9:
167:command_handlers.c **** void command_handle_set_conf(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
186 .loc 1 167 0
187 .cfi_startproc
188 .LVL11:
189 0000 0F93 push r16
190 .LCFI4:
191 .cfi_def_cfa_offset 3
192 .cfi_offset 16, -2
193 0002 1F93 push r17
194 .LCFI5:
195 .cfi_def_cfa_offset 4
196 .cfi_offset 17, -3
197 0004 CF93 push r28
198 .LCFI6:
199 .cfi_def_cfa_offset 5
200 .cfi_offset 28, -4
201 0006 DF93 push r29
202 .LCFI7:
203 .cfi_def_cfa_offset 6
204 .cfi_offset 29, -5
205 /* prologue: function */
206 /* frame size = 0 */
207 /* stack size = 4 */
208 .L__stack_usage = 4
209 0008 8C01 movw r16,r24
210 000a EB01 movw r28,r22
211 .LVL12:
169:command_handlers.c **** if (strcmp("dsc", args[0]) == 0) {
212 .loc 1 169 0
213 000c 80E0 ldi r24,lo8(.LC2)
214 000e 90E0 ldi r25,hi8(.LC2)
215 .LVL13:
216 0010 0E94 0000 call strcmp
217 .LVL14:
218 0014 892B or r24,r25
219 0016 01F4 brne .+2
220 0018 00C0 rjmp .L23
171:command_handlers.c **** } else if (strcmp("st", args[0]) == 0) {
221 .loc 1 171 0
222 001a BE01 movw r22,r28
223 001c 80E0 ldi r24,lo8(.LC3)
224 001e 90E0 ldi r25,hi8(.LC3)
225 0020 0E94 0000 call strcmp
226 .LVL15:
227 0024 892B or r24,r25
228 0026 01F4 brne .+2
229 0028 00C0 rjmp .L24
173:command_handlers.c **** } else if (strcmp("ast", args[0]) == 0) {
230 .loc 1 173 0
231 002a BE01 movw r22,r28
232 002c 80E0 ldi r24,lo8(.LC4)
233 002e 90E0 ldi r25,hi8(.LC4)
234 0030 0E94 0000 call strcmp
235 .LVL16:
236 0034 892B or r24,r25
237 0036 01F4 brne .+2
238 0038 00C0 rjmp .L25
175:command_handlers.c **** } else if (strcmp("is", args[0]) == 0) {
239 .loc 1 175 0
240 003a BE01 movw r22,r28
241 003c 80E0 ldi r24,lo8(.LC5)
242 003e 90E0 ldi r25,hi8(.LC5)
243 0040 0E94 0000 call strcmp
244 .LVL17:
245 0044 892B or r24,r25
246 0046 01F4 brne .+2
247 0048 00C0 rjmp .L26
177:command_handlers.c **** } else if (strcmp("bs", args[0]) == 0) {
248 .loc 1 177 0
249 004a BE01 movw r22,r28
250 004c 80E0 ldi r24,lo8(.LC6)
251 004e 90E0 ldi r25,hi8(.LC6)
252 0050 0E94 0000 call strcmp
253 .LVL18:
254 0054 892B or r24,r25
255 0056 01F4 brne .+2
256 0058 00C0 rjmp .L27
179:command_handlers.c **** } else if (strcmp("ac", args[0]) == 0) {
257 .loc 1 179 0
258 005a BE01 movw r22,r28
259 005c 80E0 ldi r24,lo8(.LC7)
260 005e 90E0 ldi r25,hi8(.LC7)
261 0060 0E94 0000 call strcmp
262 .LVL19:
263 0064 892B or r24,r25
264 0066 01F4 brne .+2
265 0068 00C0 rjmp .L28
181:command_handlers.c **** } else if (strcmp("at", args[0]) == 0) {
266 .loc 1 181 0
267 006a BE01 movw r22,r28
268 006c 80E0 ldi r24,lo8(.LC8)
269 006e 90E0 ldi r25,hi8(.LC8)
270 0070 0E94 0000 call strcmp
271 .LVL20:
272 0074 892B or r24,r25
273 0076 01F4 brne .+2
274 0078 00C0 rjmp .L29
183:command_handlers.c **** } else if (strcmp("atc", args[0]) == 0) {
275 .loc 1 183 0
276 007a BE01 movw r22,r28
277 007c 80E0 ldi r24,lo8(.LC9)
278 007e 90E0 ldi r25,hi8(.LC9)
279 0080 0E94 0000 call strcmp
280 .LVL21:
281 0084 892B or r24,r25
282 0086 01F4 brne .+2
283 0088 00C0 rjmp .L30
185:command_handlers.c **** } else if (strcmp("amint", args[0]) == 0) {
284 .loc 1 185 0
285 008a BE01 movw r22,r28
286 008c 80E0 ldi r24,lo8(.LC10)
287 008e 90E0 ldi r25,hi8(.LC10)
288 0090 0E94 0000 call strcmp
289 .LVL22:
290 0094 892B or r24,r25
291 0096 01F4 brne .+2
292 0098 00C0 rjmp .L31
187:command_handlers.c **** } else if (strcmp("amaxt", args[0]) == 0) {
293 .loc 1 187 0
294 009a BE01 movw r22,r28
295 009c 80E0 ldi r24,lo8(.LC11)
296 009e 90E0 ldi r25,hi8(.LC11)
297 00a0 0E94 0000 call strcmp
298 .LVL23:
299 00a4 892B or r24,r25
300 00a6 01F4 brne .+2
301 00a8 00C0 rjmp .L32
189:command_handlers.c **** } else if (strcmp("bp", args[0]) == 0) {
302 .loc 1 189 0
303 00aa BE01 movw r22,r28
304 00ac 80E0 ldi r24,lo8(.LC12)
305 00ae 90E0 ldi r25,hi8(.LC12)
306 00b0 0E94 0000 call strcmp
307 .LVL24:
308 00b4 892B or r24,r25
309 00b6 01F4 brne .+2
310 00b8 00C0 rjmp .L33
191:command_handlers.c **** } else if (strcmp("bpt", args[0]) == 0) {
311 .loc 1 191 0
312 00ba BE01 movw r22,r28
313 00bc 80E0 ldi r24,lo8(.LC13)
314 00be 90E0 ldi r25,hi8(.LC13)
315 00c0 0E94 0000 call strcmp
316 .LVL25:
317 00c4 892B or r24,r25
318 00c6 01F4 brne .+2
319 00c8 00C0 rjmp .L34
193:command_handlers.c **** } else if (strcmp("ss", args[0]) == 0) {
320 .loc 1 193 0
321 00ca BE01 movw r22,r28
322 00cc 80E0 ldi r24,lo8(.LC14)
323 00ce 90E0 ldi r25,hi8(.LC14)
324 00d0 0E94 0000 call strcmp
325 .LVL26:
326 00d4 892B or r24,r25
327 00d6 01F4 brne .+2
328 00d8 00C0 rjmp .L35
195:command_handlers.c **** } else if (strcmp("as", args[0]) == 0) {
329 .loc 1 195 0
330 00da BE01 movw r22,r28
331 00dc 80E0 ldi r24,lo8(.LC15)
332 00de 90E0 ldi r25,hi8(.LC15)
333 00e0 0E94 0000 call strcmp
334 .LVL27:
335 00e4 892B or r24,r25
336 00e6 01F4 brne .+2
337 00e8 00C0 rjmp .L36
197:command_handlers.c **** } else if (strcmp("p", args[0]) == 0) {
338 .loc 1 197 0
339 00ea BE01 movw r22,r28
340 00ec 80E0 ldi r24,lo8(.LC16)
341 00ee 90E0 ldi r25,hi8(.LC16)
342 00f0 0E94 0000 call strcmp
343 .LVL28:
344 00f4 892B or r24,r25
345 00f6 01F4 brne .+2
346 00f8 00C0 rjmp .L37
347 .LVL29:
205:command_handlers.c **** strcpy(cmd_output, "Configuration options error! Use set conf [abbreviation] [value].");
348 .loc 1 205 0
349 00fa 82E4 ldi r24,lo8(66)
350 00fc E0E0 ldi r30,lo8(.LC18)
351 00fe F0E0 ldi r31,hi8(.LC18)
352 0100 D801 movw r26,r16
353 0:
354 0102 0190 ld r0,Z+
355 0104 0D92 st X+,r0
356 0106 8A95 dec r24
357 0108 01F4 brne 0b
358 010a 00C0 rjmp .L4
359 .LVL30:
360 .L23:
170:command_handlers.c **** eeprom_update_word(&g_rom_settings.deep_sleep_counter, (uint16_t)(atoi(args[1])));
361 .loc 1 170 0
362 010c CE01 movw r24,r28
363 010e 8096 adiw r24,32
364 0110 0E94 0000 call atoi
365 .LVL31:
366 0114 BC01 movw r22,r24
367 0116 80E0 ldi r24,lo8(g_rom_settings)
368 0118 90E0 ldi r25,hi8(g_rom_settings)
369 011a 0E94 0000 call __eeupd_word_m1284p
370 .LVL32:
371 .L6:
203:command_handlers.c **** strcpy(cmd_output, "Update successful, RESET the device to use new values!");
372 .loc 1 203 0
373 011e 87E3 ldi r24,lo8(55)
374 0120 E0E0 ldi r30,lo8(.LC17)
375 0122 F0E0 ldi r31,hi8(.LC17)
376 0124 D801 movw r26,r16
377 0:
378 0126 0190 ld r0,Z+
379 0128 0D92 st X+,r0
380 012a 8A95 dec r24
381 012c 01F4 brne 0b
382 .LVL33:
383 .L4:
384 /* epilogue start */
207:command_handlers.c **** }
385 .loc 1 207 0
386 012e DF91 pop r29
387 0130 CF91 pop r28
388 .LVL34:
389 0132 1F91 pop r17
390 0134 0F91 pop r16
391 .LVL35:
392 0136 0895 ret
393 .LVL36:
394 .L24:
172:command_handlers.c **** eeprom_update_word(&g_rom_settings.settle_time, (uint16_t)(atoi(args[1])));
395 .loc 1 172 0
396 0138 CE01 movw r24,r28
397 013a 8096 adiw r24,32
398 013c 0E94 0000 call atoi
399 .LVL37:
400 0140 BC01 movw r22,r24
401 0142 80E0 ldi r24,lo8(g_rom_settings+2)
402 0144 90E0 ldi r25,hi8(g_rom_settings+2)
403 0146 0E94 0000 call __eeupd_word_m1284p
404 .LVL38:
405 014a 00C0 rjmp .L6
406 .L25:
174:command_handlers.c **** eeprom_update_word(&g_rom_settings.alarm_settle_time, (uint16_t)(atoi(args[1])));
407 .loc 1 174 0
408 014c CE01 movw r24,r28
409 014e 8096 adiw r24,32
410 0150 0E94 0000 call atoi
411 .LVL39:
412 0154 BC01 movw r22,r24
413 0156 80E0 ldi r24,lo8(g_rom_settings+4)
414 0158 90E0 ldi r25,hi8(g_rom_settings+4)
415 015a 0E94 0000 call __eeupd_word_m1284p
416 .LVL40:
417 015e 00C0 rjmp .L6
418 .L27:
178:command_handlers.c **** eeprom_update_word(&g_rom_settings.blink_speed, (uint16_t)(atoi(args[1])));
419 .loc 1 178 0
420 0160 CE01 movw r24,r28
421 0162 8096 adiw r24,32
422 0164 0E94 0000 call atoi
423 .LVL41:
424 0168 BC01 movw r22,r24
425 016a 80E0 ldi r24,lo8(g_rom_settings+7)
426 016c 90E0 ldi r25,hi8(g_rom_settings+7)
427 016e 0E94 0000 call __eeupd_word_m1284p
428 .LVL42:
429 0172 00C0 rjmp .L6
430 .L26:
176:command_handlers.c **** eeprom_update_byte(&g_rom_settings.indicator_sound, (uint8_t)(atoi(args[1])));
431 .loc 1 176 0
432 0174 CE01 movw r24,r28
433 0176 8096 adiw r24,32
434 0178 0E94 0000 call atoi
435 .LVL43:
436 017c 682F mov r22,r24
437 017e 80E0 ldi r24,lo8(g_rom_settings+6)
438 0180 90E0 ldi r25,hi8(g_rom_settings+6)
439 0182 0E94 0000 call __eeupd_byte_m1284p
440 .LVL44:
441 0186 00C0 rjmp .L6
442 .L28:
180:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_counter, (uint8_t)(atoi(args[1])));
443 .loc 1 180 0
444 0188 CE01 movw r24,r28
445 018a 8096 adiw r24,32
446 018c 0E94 0000 call atoi
447 .LVL45:
448 0190 682F mov r22,r24
449 0192 80E0 ldi r24,lo8(g_rom_settings+9)
450 0194 90E0 ldi r25,hi8(g_rom_settings+9)
451 0196 0E94 0000 call __eeupd_byte_m1284p
452 .LVL46:
453 019a 00C0 rjmp .L6
454 .L31:
186:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_thres_min, (uint8_t)(atoi(args[1])));
455 .loc 1 186 0
456 019c CE01 movw r24,r28
457 019e 8096 adiw r24,32
458 01a0 0E94 0000 call atoi
459 .LVL47:
460 01a4 682F mov r22,r24
461 01a6 80E0 ldi r24,lo8(g_rom_settings+12)
462 01a8 90E0 ldi r25,hi8(g_rom_settings+12)
463 01aa 0E94 0000 call __eeupd_byte_m1284p
464 .LVL48:
465 01ae 00C0 rjmp .L6
466 .L29:
182:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_trigger, (uint8_t)(atoi(args[1])));
467 .loc 1 182 0
468 01b0 CE01 movw r24,r28
469 01b2 8096 adiw r24,32
470 01b4 0E94 0000 call atoi
471 .LVL49:
472 01b8 682F mov r22,r24
473 01ba 80E0 ldi r24,lo8(g_rom_settings+10)
474 01bc 90E0 ldi r25,hi8(g_rom_settings+10)
475 01be 0E94 0000 call __eeupd_byte_m1284p
476 .LVL50:
477 01c2 00C0 rjmp .L6
478 .L30:
184:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_trigger_counter, (uint8_t)(atoi(args[1])));
479 .loc 1 184 0
480 01c4 CE01 movw r24,r28
481 01c6 8096 adiw r24,32
482 01c8 0E94 0000 call atoi
483 .LVL51:
484 01cc 682F mov r22,r24
485 01ce 80E0 ldi r24,lo8(g_rom_settings+11)
486 01d0 90E0 ldi r25,hi8(g_rom_settings+11)
487 01d2 0E94 0000 call __eeupd_byte_m1284p
488 .LVL52:
489 01d6 00C0 rjmp .L6
490 .L32:
188:command_handlers.c **** eeprom_update_word(&g_rom_settings.alarm_thres_max, (uint16_t)(atoi(args[1])));
491 .loc 1 188 0
492 01d8 CE01 movw r24,r28
493 01da 8096 adiw r24,32
494 01dc 0E94 0000 call atoi
495 .LVL53:
496 01e0 BC01 movw r22,r24
497 01e2 80E0 ldi r24,lo8(g_rom_settings+13)
498 01e4 90E0 ldi r25,hi8(g_rom_settings+13)
499 01e6 0E94 0000 call __eeupd_word_m1284p
500 .LVL54:
501 01ea 00C0 rjmp .L6
502 .L33:
190:command_handlers.c **** eeprom_update_byte(&g_rom_settings.backpedal, (uint8_t)(atoi(args[1])));
503 .loc 1 190 0
504 01ec CE01 movw r24,r28
505 01ee 8096 adiw r24,32
506 01f0 0E94 0000 call atoi
507 .LVL55:
508 01f4 682F mov r22,r24
509 01f6 80E0 ldi r24,lo8(g_rom_settings+15)
510 01f8 90E0 ldi r25,hi8(g_rom_settings+15)
511 01fa 0E94 0000 call __eeupd_byte_m1284p
512 .LVL56:
513 01fe 00C0 rjmp .L6
514 .L34:
192:command_handlers.c **** eeprom_update_word(&g_rom_settings.backpedal_thres_min, (uint16_t)(atoi(args[1])));
515 .loc 1 192 0
516 0200 CE01 movw r24,r28
517 0202 8096 adiw r24,32
518 0204 0E94 0000 call atoi
519 .LVL57:
520 0208 BC01 movw r22,r24
521 020a 80E0 ldi r24,lo8(g_rom_settings+16)
522 020c 90E0 ldi r25,hi8(g_rom_settings+16)
523 020e 0E94 0000 call __eeupd_word_m1284p
524 .LVL58:
525 0212 00C0 rjmp .L6
526 .L35:
194:command_handlers.c **** eeprom_update_byte(&g_rom_settings.startup_sound, (uint8_t)(atoi(args[1])));
527 .loc 1 194 0
528 0214 CE01 movw r24,r28
529 0216 8096 adiw r24,32
530 0218 0E94 0000 call atoi
531 .LVL59:
532 021c 682F mov r22,r24
533 021e 80E0 ldi r24,lo8(g_rom_settings+18)
534 0220 90E0 ldi r25,hi8(g_rom_settings+18)
535 0222 0E94 0000 call __eeupd_byte_m1284p
536 .LVL60:
537 0226 00C0 rjmp .L6
538 .L36:
196:command_handlers.c **** eeprom_update_byte(&g_rom_settings.alarm_sound, (uint8_t)(atoi(args[1])));
539 .loc 1 196 0
540 0228 CE01 movw r24,r28
541 022a 8096 adiw r24,32
542 022c 0E94 0000 call atoi
543 .LVL61:
544 0230 682F mov r22,r24
545 0232 80E0 ldi r24,lo8(g_rom_settings+19)
546 0234 90E0 ldi r25,hi8(g_rom_settings+19)
547 0236 0E94 0000 call __eeupd_byte_m1284p
548 .LVL62:
549 023a 00C0 rjmp .L6
550 .L37:
198:command_handlers.c **** eeprom_update_block(args[1], &g_rom_settings.passwd, 32);
551 .loc 1 198 0
552 023c 40E2 ldi r20,lo8(32)
553 023e 50E0 ldi r21,0
554 0240 60E0 ldi r22,lo8(g_rom_settings+20)
555 0242 70E0 ldi r23,hi8(g_rom_settings+20)
556 0244 CE01 movw r24,r28
557 0246 8096 adiw r24,32
558 0248 0E94 0000 call __eeupd_block_m1284p
559 .LVL63:
560 024c 00C0 rjmp .L6
561 .cfi_endproc
562 .LFE9:
564 .section .rodata.str1.1
565 .LC19:
566 00cd 1B5B 3142 .string "\033[1B\033[2K\r"
566 1B5B 324B
566 0D00
567 .section .text.command_handle_help,"ax",@progbits
568 .global command_handle_help
570 command_handle_help:
571 .LFB12:
217:command_handlers.c **** void command_handle_help(char *cmd_output, char (*args)[CMD_MAX_ARGS_SIZE]) {
572 .loc 1 217 0
573 .cfi_startproc
574 .LVL64:
575 0000 0F93 push r16
576 .LCFI8:
577 .cfi_def_cfa_offset 3
578 .cfi_offset 16, -2
579 0002 1F93 push r17
580 .LCFI9:
581 .cfi_def_cfa_offset 4
582 .cfi_offset 17, -3
583 0004 CF93 push r28
584 .LCFI10:
585 .cfi_def_cfa_offset 5
586 .cfi_offset 28, -4
587 0006 DF93 push r29
588 .LCFI11:
589 .cfi_def_cfa_offset 6
590 .cfi_offset 29, -5
591 /* prologue: function */
592 /* frame size = 0 */
593 /* stack size = 4 */
594 .L__stack_usage = 4
595 0008 8C01 movw r16,r24
218:command_handlers.c **** strcpy_P(uart_buf, help_info);
596 .loc 1 218 0
597 000a 60E0 ldi r22,lo8(help_info)
598 000c 70E0 ldi r23,hi8(help_info)
599 .LVL65:
600 000e 80E0 ldi r24,lo8(uart_buf)
601 0010 90E0 ldi r25,hi8(uart_buf)
602 .LVL66:
603 0012 0E94 0000 call strcpy_P
604 .LVL67:
219:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
605 .loc 1 219 0
606 0016 C0E0 ldi r28,lo8(uart_buf)
607 0018 D0E0 ldi r29,hi8(uart_buf)
608 001a DE01 movw r26,r28
609 0:
610 001c 0D90 ld __tmp_reg__,X+
611 001e 0020 tst __tmp_reg__
612 0020 01F4 brne 0b
613 0022 1197 sbiw r26,1
614 0024 8AE0 ldi r24,lo8(10)
615 0026 E0E0 ldi r30,lo8(.LC19)
616 0028 F0E0 ldi r31,hi8(.LC19)
617 0:
618 002a 0190 ld r0,Z+
619 002c 0D92 st X+,r0
620 002e 8A95 dec r24
621 0030 01F4 brne 0b
220:command_handlers.c **** strcat_P(uart_buf, reset_info);
622 .loc 1 220 0
623 0032 60E0 ldi r22,lo8(reset_info)
624 0034 70E0 ldi r23,hi8(reset_info)
625 0036 CE01 movw r24,r28
626 0038 0E94 0000 call strcat_P
627 .LVL68:
221:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
628 .loc 1 221 0
629 003c DE01 movw r26,r28
630 0:
631 003e 0D90 ld __tmp_reg__,X+
632 0040 0020 tst __tmp_reg__
633 0042 01F4 brne 0b
634 0044 1197 sbiw r26,1
635 0046 8AE0 ldi r24,lo8(10)
636 0048 E0E0 ldi r30,lo8(.LC19)
637 004a F0E0 ldi r31,hi8(.LC19)
638 0:
639 004c 0190 ld r0,Z+
640 004e 0D92 st X+,r0
641 0050 8A95 dec r24
642 0052 01F4 brne 0b
222:command_handlers.c **** strcat_P(uart_buf, show_version_info);
643 .loc 1 222 0
644 0054 60E0 ldi r22,lo8(show_version_info)
645 0056 70E0 ldi r23,hi8(show_version_info)
646 0058 CE01 movw r24,r28
647 005a 0E94 0000 call strcat_P
648 .LVL69:
223:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
649 .loc 1 223 0
650 005e DE01 movw r26,r28
651 0:
652 0060 0D90 ld __tmp_reg__,X+
653 0062 0020 tst __tmp_reg__
654 0064 01F4 brne 0b
655 0066 1197 sbiw r26,1
656 0068 8AE0 ldi r24,lo8(10)
657 006a E0E0 ldi r30,lo8(.LC19)
658 006c F0E0 ldi r31,hi8(.LC19)
659 0:
660 006e 0190 ld r0,Z+
661 0070 0D92 st X+,r0
662 0072 8A95 dec r24
663 0074 01F4 brne 0b
224:command_handlers.c **** strcat_P(uart_buf, show_state_info);
664 .loc 1 224 0
665 0076 60E0 ldi r22,lo8(show_state_info)
666 0078 70E0 ldi r23,hi8(show_state_info)
667 007a CE01 movw r24,r28
668 007c 0E94 0000 call strcat_P
669 .LVL70:
225:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
670 .loc 1 225 0
671 0080 DE01 movw r26,r28
672 0:
673 0082 0D90 ld __tmp_reg__,X+
674 0084 0020 tst __tmp_reg__
675 0086 01F4 brne 0b
676 0088 1197 sbiw r26,1
677 008a 8AE0 ldi r24,lo8(10)
678 008c E0E0 ldi r30,lo8(.LC19)
679 008e F0E0 ldi r31,hi8(.LC19)
680 0:
681 0090 0190 ld r0,Z+
682 0092 0D92 st X+,r0
683 0094 8A95 dec r24
684 0096 01F4 brne 0b
226:command_handlers.c **** strcat_P(uart_buf, show_voltage_info);
685 .loc 1 226 0
686 0098 60E0 ldi r22,lo8(show_voltage_info)
687 009a 70E0 ldi r23,hi8(show_voltage_info)
688 009c CE01 movw r24,r28
689 009e 0E94 0000 call strcat_P
690 .LVL71:
227:command_handlers.c **** strcat(uart_buf, "\x1B[1B\x1B[2K\x0D");
691 .loc 1 227 0
692 00a2 DE01 movw r26,r28
693 0:
694 00a4 0D90 ld __tmp_reg__,X+
695 00a6 0020 tst __tmp_reg__
696 00a8 01F4 brne 0b
697 00aa 1197 sbiw r26,1
698 00ac 8AE0 ldi r24,lo8(10)
699 00ae E0E0 ldi r30,lo8(.LC19)