-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathi2c1.lst
1999 lines (1998 loc) · 72.6 KB
/
i2c1.lst
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 "i2c1.c"
9 .Ltext0:
10 .global I2C1MasterState
11 .bss
12 .align 2
15 I2C1MasterState:
16 0000 00000000 .space 4
17 .global I2C1Count
18 .align 2
21 I2C1Count:
22 0004 00000000 .space 4
23 .global WrIndex1
24 .align 2
27 WrIndex1:
28 0008 00000000 .space 4
29 .global lastI2c1Error
32 lastI2c1Error:
33 000c 00 .space 1
34 .text
35 .align 2
36 .global I2C1MasterHandler
38 I2C1MasterHandler:
39 .LFB2:
40 .file 1 "i2c1.c"
1:i2c1.c **** /*****************************************************************************
2:i2c1.c **** * i2c.c: I2C C file for Philips LPC214x Family Microprocessors
3:i2c1.c **** *
4:i2c1.c **** * Copyright(C) 2006, Philips Semiconductor
5:i2c1.c **** * All rights reserved.
6:i2c1.c **** *
7:i2c1.c **** * History
8:i2c1.c **** * 2005.10.01 ver 1.00 Prelimnary version, first Release
9:i2c1.c **** *
10:i2c1.c **** *****************************************************************************/
11:i2c1.c **** #include "LPC214x.h" /* LPC21xx definitions */
12:i2c1.c **** #include "type.h"
13:i2c1.c **** #include "irq.h"
14:i2c1.c **** #include "i2c1.h"
15:i2c1.c **** #include "main.h"
16:i2c1.c **** #include "LL_HL_comm.h"
17:i2c1.c **** #include "gpsmath.h"
18:i2c1.c **** #include "system.h"
19:i2c1.c **** #ifndef FALCON
20:i2c1.c ****
21:i2c1.c **** DWORD I2C1MasterState = I2C_IDLE;
22:i2c1.c ****
23:i2c1.c **** BYTE I2C1MasterBuffer[BUFSIZE];
24:i2c1.c **** DWORD I2C1Count = 0;
25:i2c1.c **** DWORD I2C1WriteLength;
26:i2c1.c ****
27:i2c1.c **** DWORD WrIndex1 = 0;
28:i2c1.c ****
29:i2c1.c **** unsigned char lastI2c1Error=I2C_ERROR_NONE;
30:i2c1.c ****
31:i2c1.c **** /*
32:i2c1.c **** From device to device, the I2C communication protocol may vary,
33:i2c1.c **** in the example below, the protocol uses repeated start to read data from or
34:i2c1.c **** write to the device:
35:i2c1.c **** For master read: the sequence is: STA,Addr(W),offset,RE-STA,Addr(w),data...STO
36:i2c1.c **** for master write: the sequence is: STA,Addr(W),length,RE-STA,Addr(r),data...STO
37:i2c1.c **** Thus, in state 8, the address is always WRITE. in state 10, the address could
38:i2c1.c **** be READ or WRITE depending on the I2CCmd.
39:i2c1.c **** */
40:i2c1.c ****
41:i2c1.c **** /*****************************************************************************
42:i2c1.c **** ** Function name: I2C0MasterHandler
43:i2c1.c **** **
44:i2c1.c **** ** Descriptions: I2C0 interrupt handler, deal with master mode
45:i2c1.c **** ** only.
46:i2c1.c **** **
47:i2c1.c **** ** parameters: None
48:i2c1.c **** ** Returned value: None
49:i2c1.c **** **
50:i2c1.c **** *****************************************************************************/
51:i2c1.c ****
52:i2c1.c **** void I2C1MasterHandler (void) __irq
53:i2c1.c **** {
41 orking.
42 @ args = 0, pretend = 0, frame = 4
43 @ frame_needed = 1, uses_anonymous_args = 0
44 mov ip, sp
45 0000 0DC0A0E1 .LCFI0:
46 stmfd sp!, {fp, ip, lr, pc}
47 0004 00D82DE9 .LCFI1:
48 sub fp, ip, #4
49 0008 04B04CE2 .LCFI2:
50 sub sp, sp, #4
51 000c 04D04DE2 .LCFI3:
52 .loc 1 57 0
54:i2c1.c **** BYTE StatValue;
55:i2c1.c ****
56:i2c1.c **** /* this handler deals with master read and master write only */
57:i2c1.c **** StatValue = I21STAT;
53 36870908
54 0010 4E32A0E3 add r3, r3, #376832
55 0014 173983E2 ldr r3, [r3, #0]
56 0018 003093E5 strb r3, [fp, #-13]
57 001c 0D304BE5 .loc 1 60 0
58:i2c1.c ****
59:i2c1.c **** IENABLE;
60:i2c1.c **** switch ( StatValue )
58 r3, [fp, #-13] @ zero_extendqisi2
59 0020 0D305BE5 sub r3, r3, #8
60 0024 083043E2 cmp r3, #40
61 0028 280053E3 ldrls pc, [pc, r3, asl #2]
62 002c 03F19F97 b .L2
63 0030 9E0000EA .p2align 2
64 .L8:
65 .word .L3
66 0034 D8000000 .word .L2
67 0038 B0020000 .word .L2
68 003c B0020000 .word .L2
69 0040 B0020000 .word .L2
70 0044 B0020000 .word .L2
71 0048 B0020000 .word .L2
72 004c B0020000 .word .L2
73 0050 B0020000 .word .L2
74 0054 B0020000 .word .L2
75 0058 B0020000 .word .L2
76 005c B0020000 .word .L2
77 0060 B0020000 .word .L2
78 0064 B0020000 .word .L2
79 0068 B0020000 .word .L2
80 006c B0020000 .word .L2
81 0070 B0020000 .word .L4
82 0074 10010000 .word .L2
83 0078 B0020000 .word .L2
84 007c B0020000 .word .L2
85 0080 B0020000 .word .L2
86 0084 B0020000 .word .L2
87 0088 B0020000 .word .L2
88 008c B0020000 .word .L2
89 0090 B0020000 .word .L5
90 0094 5C020000 .word .L2
91 0098 B0020000 .word .L2
92 009c B0020000 .word .L2
93 00a0 B0020000 .word .L2
94 00a4 B0020000 .word .L2
95 00a8 B0020000 .word .L2
96 00ac B0020000 .word .L2
97 00b0 B0020000 .word .L6
98 00b4 6C010000 .word .L2
99 00b8 B0020000 .word .L2
100 00bc B0020000 .word .L2
101 00c0 B0020000 .word .L2
102 00c4 B0020000 .word .L2
103 00c8 B0020000 .word .L2
104 00cc B0020000 .word .L2
105 00d0 B0020000 .word .L7
106 00d4 1C020000 .L3:
107 .loc 1 63 0
61:i2c1.c **** {
62:i2c1.c **** case 0x08: /* A Start condition is issued. */
63:i2c1.c **** I21DAT = I2C1MasterBuffer[0];
108 .L16
109 00d8 8E22A0E3 ldrb r3, [r3, #0] @ zero_extendqisi2
110 00dc 172982E2 str r3, [r2, #0]
111 00e0 F8319FE5 .loc 1 64 0
112 00e4 0030D3E5 mov r3, #-536870912
113 00e8 003082E5 add r3, r3, #376832
64:i2c1.c **** I21CONCLR = (I2CONCLR_SIC | I2CONCLR_STAC);
114 3, r3, #24
115 00ec 0E32A0E3 mov r2, #40
116 00f0 173983E2 str r2, [r3, #0]
117 00f4 183083E2 .loc 1 65 0
118 00f8 2820A0E3 ldr r2, .L16+4
119 00fc 002083E5 mov r3, #1
65:i2c1.c **** I2C1MasterState = I2C_STARTED;
120 3, [r2, #0]
121 0100 DC219FE5 .loc 1 66 0
122 0104 0130A0E3 b .L9
123 0108 003082E5 .L4:
66:i2c1.c **** break;
124 c 1 70 0
125 010c 6C0000EA ldr r3, .L16+4
126 ldr r3, [r3, #0]
67:i2c1.c ****
68:i2c1.c ****
69:i2c1.c **** case 0x18: /* Regardless, it's a ACK */
70:i2c1.c **** if ( I2C1MasterState == I2C_STARTED )
127 p r3, #1
128 0110 CC319FE5 bne .L10
129 0114 003093E5 .loc 1 72 0
130 0118 010053E3 mov r2, #-536870904
131 011c 0C00001A add r2, r2, #376832
71:i2c1.c **** {
72:i2c1.c **** I21DAT = I2C1MasterBuffer[1];
132 r3, .L16
133 0120 8E22A0E3 ldrb r3, [r3, #1] @ zero_extendqisi2
134 0124 172982E2 str r3, [r2, #0]
135 0128 B0319FE5 .loc 1 73 0
136 012c 0130D3E5 ldr r3, .L16+8
137 0130 003082E5 ldr r3, [r3, #0]
73:i2c1.c **** WrIndex1++;
138 2, r3, #1
139 0134 AC319FE5 ldr r3, .L16+8
140 0138 003093E5 str r2, [r3, #0]
141 013c 012083E2 .loc 1 74 0
142 0140 A0319FE5 ldr r2, .L16+4
143 0144 002083E5 mov r3, #4
74:i2c1.c **** I2C1MasterState = DATA_ACK;
144 3, [r2, #0]
145 0148 94219FE5 .L10:
146 014c 0430A0E3 .loc 1 76 0
147 0150 003082E5 mov r3, #-536870912
148 add r3, r3, #376832
75:i2c1.c **** }
76:i2c1.c **** I21CONCLR = I2CONCLR_SIC;
149 r3, r3, #24
150 0154 0E32A0E3 mov r2, #8
151 0158 173983E2 str r2, [r3, #0]
152 015c 183083E2 .loc 1 77 0
153 0160 0820A0E3 b .L9
154 0164 002083E5 .L6:
77:i2c1.c **** break;
155 1 80 0
156 0168 550000EA ldr r3, .L16+8
157 ldr r2, [r3, #0]
78:i2c1.c ****
79:i2c1.c **** case 0x28: /* Data byte has been transmitted, regardless ACK or NACK */
80:i2c1.c **** if ( WrIndex1 < I2C1WriteLength )
158 r r3, .L16+12
159 016c 74319FE5 ldr r3, [r3, #0]
160 0170 002093E5 cmp r2, r3
161 0174 70319FE5 bcs .L12
162 0178 003093E5 .loc 1 82 0
163 017c 030052E1 mov r2, #-536870904
164 0180 1000002A add r2, r2, #376832
81:i2c1.c **** {
82:i2c1.c **** I21DAT = I2C1MasterBuffer[1+WrIndex1]; /* this should be the last one */
165 , .L16+8
166 0184 8E22A0E3 ldr r3, [r3, #0]
167 0188 172982E2 add r1, r3, #1
168 018c 54319FE5 ldr r3, .L16
169 0190 003093E5 ldrb r3, [r3, r1] @ zero_extendqisi2
170 0194 011083E2 str r3, [r2, #0]
171 0198 40319FE5 .loc 1 83 0
172 019c 0130D3E7 ldr r3, .L16+8
173 01a0 003082E5 ldr r3, [r3, #0]
83:i2c1.c **** WrIndex1++;
174 r3, #1
175 01a4 3C319FE5 ldr r3, .L16+8
176 01a8 003093E5 str r2, [r3, #0]
177 01ac 012083E2 .loc 1 84 0
178 01b0 30319FE5 ldr r2, .L16+4
179 01b4 002083E5 mov r3, #4
84:i2c1.c **** I2C1MasterState = DATA_ACK;
180 3, [r2, #0]
181 01b8 24219FE5 b .L14
182 01bc 0430A0E3 .L12:
183 01c0 003082E5 .loc 1 89 0
184 01c4 0B0000EA ldr r2, .L16+4
185 mov r3, #7
85:i2c1.c ****
86:i2c1.c **** }
87:i2c1.c **** else
88:i2c1.c **** {
89:i2c1.c **** I2C1MasterState = DATA_WRITE_DONE;
186 3, [r2, #0]
187 01c8 14219FE5 .loc 1 91 0
188 01cc 0730A0E3 mov r3, #-536870912
189 01d0 003082E5 add r3, r3, #376832
90:i2c1.c **** //I2C Stop
91:i2c1.c **** I21CONSET = I2CONSET_STO; /* Set Stop flag */
190 r2, #16
191 01d4 0E32A0E3 str r2, [r3, #0]
192 01d8 173983E2 .loc 1 92 0
193 01dc 1020A0E3 mov r3, #-536870912
194 01e0 002083E5 add r3, r3, #376832
92:i2c1.c **** I21CONCLR = I2CONCLR_SIC; /* Clear SI flag */
195 r3, r3, #24
196 01e4 0E32A0E3 mov r2, #8
197 01e8 173983E2 str r2, [r3, #0]
198 01ec 183083E2 .L14:
199 01f0 0820A0E3 .loc 1 94 0
200 01f4 002083E5 mov r3, #-536870912
201 add r3, r3, #376832
93:i2c1.c **** }
94:i2c1.c **** I21CONCLR = I2CONCLR_SIC;
202 , r3, #24
203 01f8 0E32A0E3 mov r2, #8
204 01fc 173983E2 str r2, [r3, #0]
205 0200 183083E2 .loc 1 95 0
206 0204 0820A0E3 ldr r2, .L16+16
207 0208 002083E5 mov r3, #0
95:i2c1.c **** lastI2c1Error=I2C_ERROR_NONE;
208 r3, [r2, #0]
209 020c DC209FE5 .loc 1 97 0
210 0210 0030A0E3 b .L9
211 0214 0030C2E5 .L7:
96:i2c1.c ****
97:i2c1.c **** break;
212 c 1 100 0
213 0218 290000EA ldr r2, .L16+4
214 mov r3, #5
98:i2c1.c ****
99:i2c1.c **** case 0x30: //data has been transmited but NACK was received
100:i2c1.c **** I2C1MasterState = DATA_NACK;
215 r r3, [r2, #0]
216 021c C0209FE5 .loc 1 102 0
217 0220 0530A0E3 mov r3, #-536870912
218 0224 003082E5 add r3, r3, #376832
101:i2c1.c **** //I2C Stop
102:i2c1.c **** I21CONSET = I2CONSET_STO; /* Set Stop flag */
219 r2, #16
220 0228 0E32A0E3 str r2, [r3, #0]
221 022c 173983E2 .loc 1 103 0
222 0230 1020A0E3 mov r3, #-536870912
223 0234 002083E5 add r3, r3, #376832
103:i2c1.c **** I21CONCLR = I2CONCLR_SIC; /* Clear SI flag */
224 r3, r3, #24
225 0238 0E32A0E3 mov r2, #8
226 023c 173983E2 str r2, [r3, #0]
227 0240 183083E2 .loc 1 104 0
228 0244 0820A0E3 ldr r2, .L16+16
229 0248 002083E5 mov r3, #2
104:i2c1.c **** lastI2c1Error=I2C_ERROR_NACKAFTERWRITE;
230 r3, [r2, #0]
231 024c 9C209FE5 .loc 1 105 0
232 0250 0230A0E3 b .L9
233 0254 0030C2E5 .L5:
105:i2c1.c **** break;
234 c 1 108 0
235 0258 190000EA mov r3, #-536870912
236 add r3, r3, #376832
106:i2c1.c ****
107:i2c1.c **** case 0x20: //NACK received, receiver not found
108:i2c1.c **** I21CONCLR = I2CONCLR_SIC;
237 d r3, r3, #24
238 025c 0E32A0E3 mov r2, #8
239 0260 173983E2 str r2, [r3, #0]
240 0264 183083E2 .loc 1 109 0
241 0268 0820A0E3 ldr r2, .L16+4
242 026c 002083E5 mov r3, #5
109:i2c1.c **** I2C1MasterState = DATA_NACK;
243 3, [r2, #0]
244 0270 6C209FE5 .loc 1 111 0
245 0274 0530A0E3 mov r3, #-536870912
246 0278 003082E5 add r3, r3, #376832
110:i2c1.c **** //I2C Stop
111:i2c1.c **** I21CONSET = I2CONSET_STO; /* Set Stop flag */
247 r2, #16
248 027c 0E32A0E3 str r2, [r3, #0]
249 0280 173983E2 .loc 1 112 0
250 0284 1020A0E3 mov r3, #-536870912
251 0288 002083E5 add r3, r3, #376832
112:i2c1.c **** I21CONCLR = I2CONCLR_SIC; /* Clear SI flag */
252 r3, r3, #24
253 028c 0E32A0E3 mov r2, #8
254 0290 173983E2 str r2, [r3, #0]
255 0294 183083E2 .loc 1 113 0
256 0298 0820A0E3 ldr r2, .L16+16
257 029c 002083E5 mov r3, #1
113:i2c1.c **** lastI2c1Error=I2C_ERROR_NACKAFTERSTART;
258 r3, [r2, #0]
259 02a0 48209FE5 .loc 1 114 0
260 02a4 0130A0E3 b .L9
261 02a8 0030C2E5 .L2:
114:i2c1.c **** break;
262 c 1 119 0
263 02ac 040000EA mov r3, #-536870912
264 add r3, r3, #376832
115:i2c1.c ****
116:i2c1.c ****
117:i2c1.c ****
118:i2c1.c **** default:
119:i2c1.c **** I21CONCLR = I2CONCLR_SIC;
265 d r3, r3, #24
266 02b0 0E32A0E3 mov r2, #8
267 02b4 173983E2 str r2, [r3, #0]
268 02b8 183083E2 .L9:
269 02bc 0820A0E3 .loc 1 124 0
270 02c0 002083E5 mov r3, #0
271 sub r3, r3, #4048
120:i2c1.c **** break;
121:i2c1.c **** }
122:i2c1.c ****
123:i2c1.c **** IDISABLE;
124:i2c1.c **** VICVectAddr = 0; /* Acknowledge Interrupt */
272 , #0
273 02c4 0030A0E3 str r2, [r3, #0]
274 02c8 FD3E43E2 .loc 1 126 0
275 02cc 0020A0E3 sub sp, fp, #12
276 02d0 002083E5 ldmfd sp, {fp, sp, lr}
125:i2c1.c ****
126:i2c1.c **** }
277 r
278 02d4 0CD04BE2 .L17:
279 02d8 00689DE8 .align 2
280 02dc 1EFF2FE1 .L16:
281 .word I2C1MasterBuffer
282 .word I2C1MasterState
283 .word WrIndex1
284 02e0 00000000 .word I2C1WriteLength
285 02e4 00000000 .word lastI2c1Error
286 02e8 00000000 .LFE2:
288 02f0 00000000 .bss
289 ceCnt.1589:
290 .space 1
291 mincCnt.1588:
292 .space 1
293 000d 00 mfsCnt.1587:
294 .space 1
295 000e 00 .align 1
296 cnt.1586:
297 000f 00 .space 2
298 .text
299 .align 2
300 0010 0000 .global fireFlyLedHandler
302 fireFlyLedHandler:
303 .LFB3:
304 .loc 1 129 0
305 @ Function supports interworking.
306 @ args = 0, pretend = 0, frame = 12
127:i2c1.c ****
128:i2c1.c **** void fireFlyLedHandler(void) //called with 100Hz
129:i2c1.c **** {
307 ymous_args = 0
308 mov ip, sp
309 .LCFI4:
310 stmfd sp!, {fp, ip, lr, pc}
311 02f4 0DC0A0E1 .LCFI5:
312 sub fp, ip, #4
313 02f8 00D82DE9 .LCFI6:
314 sub sp, sp, #12
315 02fc 04B04CE2 .LCFI7:
316 .loc 1 137 0
317 0300 0CD04DE2 mov r3, #0
318 strh r3, [fp, #-18] @ movhi
130:i2c1.c **** unsigned char r,g,b;
131:i2c1.c **** unsigned short errorFlags;
132:i2c1.c **** static unsigned short cnt=0;
133:i2c1.c **** static unsigned char mfsCnt=0;
134:i2c1.c **** static unsigned char mincCnt=0;
135:i2c1.c **** static unsigned char ceCnt=0;
136:i2c1.c ****
137:i2c1.c **** errorFlags=0;
319 0
320 0304 0030A0E3 ldr r3, .L149
321 0308 B2314BE1 ldrh r3, [r3, #82]
138:i2c1.c ****
139:i2c1.c ****
140:i2c1.c **** if (LL_1khz_attitude_data.flightMode&FM_CALIBRATION_ERROR_GYROS)
322 v r3, r3, asl #16
323 030c F43A9FE5 mov r3, r3, lsr #16
324 0310 B235D3E1 and r3, r3, #512
325 0314 0338A0E1 cmp r3, #0
326 0318 2338A0E1 beq .L19
327 031c 023C03E2 .loc 1 142 0
328 0320 000053E3 ldrh r3, [fp, #-18] @ movhi
329 0324 0200000A orr r3, r3, #2
141:i2c1.c **** {
142:i2c1.c **** errorFlags|=0x02;
330 , [fp, #-18] @ movhi
331 0328 B2315BE1 .L19:
332 032c 023083E3 .loc 1 145 0
333 0330 B2314BE1 ldr r3, .L149
334 ldrh r3, [r3, #82]
143:i2c1.c **** }
144:i2c1.c ****
145:i2c1.c **** if (LL_1khz_attitude_data.flightMode&FM_CALIBRATION_ERROR_ACC)
335 r3, r3, asl #16
336 0334 CC3A9FE5 mov r3, r3, lsr #16
337 0338 B235D3E1 and r3, r3, #1024
338 033c 0338A0E1 cmp r3, #0
339 0340 2338A0E1 beq .L21
340 0344 013B03E2 .loc 1 147 0
341 0348 000053E3 ldrh r3, [fp, #-18] @ movhi
342 034c 0200000A orr r3, r3, #4
146:i2c1.c **** {
147:i2c1.c **** errorFlags|=0x04;
343 , [fp, #-18] @ movhi
344 0350 B2315BE1 .L21:
345 0354 043083E3 .loc 1 150 0
346 0358 B2314BE1 ldr r3, .L149
347 ldrh r3, [r3, #82]
148:i2c1.c **** }
149:i2c1.c ****
150:i2c1.c **** if ((LL_1khz_attitude_data.flightMode&FM_COMPASS_FAILURE) && (ceCnt<5))
348 r3, r3, asl #16
349 035c A43A9FE5 mov r3, r3, lsr #16
350 0360 B235D3E1 and r3, r3, #16
351 0364 0338A0E1 cmp r3, #0
352 0368 2338A0E1 beq .L23
353 036c 103003E2 ldr r3, .L149+4
354 0370 000053E3 ldrb r3, [r3, #0] @ zero_extendqisi2
355 0374 0600000A cmp r3, #4
356 0378 8C3A9FE5 bhi .L23
357 037c 0030D3E5 .loc 1 152 0
358 0380 040053E3 ldrh r3, [fp, #-18] @ movhi
359 0384 0200008A orr r3, r3, #8
151:i2c1.c **** {
152:i2c1.c **** errorFlags|=0x08;
360 p, #-18] @ movhi
361 0388 B2315BE1 .L23:
362 038c 083083E3 .loc 1 155 0
363 0390 B2314BE1 ldr r3, .L149
364 ldrh r3, [r3, #82]
153:i2c1.c **** }
154:i2c1.c ****
155:i2c1.c **** if ((LL_1khz_attitude_data.flightMode&FM_MAG_INCLINATION_ERROR) && (mincCnt<5) && ((LL_1khz_attitu
365 r3, r3, asl #16
366 0394 6C3A9FE5 mov r3, r3, asr #16
367 0398 B235D3E1 cmp r3, #0
368 039c 0338A0E1 bge .L26
369 03a0 4338A0E1 ldr r3, .L149+8
370 03a4 000053E3 ldrb r3, [r3, #0] @ zero_extendqisi2
371 03a8 0D0000AA cmp r3, #4
372 03ac 5C3A9FE5 bhi .L26
373 03b0 0030D3E5 ldr r3, .L149
374 03b4 040053E3 ldrh r3, [r3, #82]
375 03b8 0900008A mov r3, r3, asl #16
376 03bc 443A9FE5 mov r3, r3, lsr #16
377 03c0 B235D3E1 and r3, r3, #16
378 03c4 0338A0E1 cmp r3, #0
379 03c8 2338A0E1 bne .L26
380 03cc 103003E2 .loc 1 157 0
381 03d0 000053E3 ldrh r3, [fp, #-18] @ movhi
382 03d4 0200001A orr r3, r3, #16
156:i2c1.c **** {
157:i2c1.c **** errorFlags|=0x10;
383 8] @ movhi
384 03d8 B2315BE1 .L26:
385 03dc 103083E3 .loc 1 160 0
386 03e0 B2314BE1 ldr r3, .L149
387 ldrh r3, [r3, #82]
158:i2c1.c **** }
159:i2c1.c ****
160:i2c1.c **** if ((LL_1khz_attitude_data.flightMode&FM_MAG_FIELD_STRENGTH_ERROR) && (mfsCnt<5) && ((LL_1khz_atti
388 r3, r3, asl #16
389 03e4 1C3A9FE5 mov r3, r3, lsr #16
390 03e8 B235D3E1 and r3, r3, #16384
391 03ec 0338A0E1 cmp r3, #0
392 03f0 2338A0E1 beq .L30
393 03f4 013903E2 ldr r3, .L149+12
394 03f8 000053E3 ldrb r3, [r3, #0] @ zero_extendqisi2
395 03fc 0D00000A cmp r3, #4
396 0400 0C3A9FE5 bhi .L30
397 0404 0030D3E5 ldr r3, .L149
398 0408 040053E3 ldrh r3, [r3, #82]
399 040c 0900008A mov r3, r3, asl #16
400 0410 F0399FE5 mov r3, r3, lsr #16
401 0414 B235D3E1 and r3, r3, #16
402 0418 0338A0E1 cmp r3, #0
403 041c 2338A0E1 bne .L30
404 0420 103003E2 .loc 1 162 0
405 0424 000053E3 ldrh r3, [fp, #-18] @ movhi
406 0428 0200001A orr r3, r3, #32
161:i2c1.c **** {
162:i2c1.c **** errorFlags|=0x20;
407 ] @ movhi
408 042c B2315BE1 .L30:
409 0430 203083E3 .loc 1 165 0
410 0434 B2314BE1 ldr r3, .L149+16
411 ldrh r3, [r3, #0]
163:i2c1.c **** }
164:i2c1.c ****
165:i2c1.c **** cnt++;
412 r3, r3, #1
413 0438 D8399FE5 mov r3, r3, asl #16
414 043c B030D3E1 mov r2, r3, lsr #16
415 0440 013083E2 ldr r3, .L149+16
416 0444 0338A0E1 strh r2, [r3, #0] @ movhi
417 0448 2328A0E1 .loc 1 166 0
418 044c C4399FE5 ldr r3, .L149+16
419 0450 B020C3E1 ldrh r3, [r3, #0]
166:i2c1.c **** if (cnt==200)
420 #200
421 0454 BC399FE5 bne .L34
422 0458 B030D3E1 .loc 1 167 0
423 045c C80053E3 ldr r3, .L149+16
424 0460 0200001A mov r2, #0
167:i2c1.c **** cnt=0;
425 r2, [r3, #0] @ movhi
426 0464 AC399FE5 .L34:
427 0468 0020A0E3 .loc 1 168 0
428 046c B020C3E1 ldr r3, .L149+20
429 ldrb r3, [r3, #0]
168:i2c1.c **** if(!SYSTEM_initialized)
430 r3, r3, #255
431 0470 A4399FE5 cmp r3, #0
432 0474 0030D3E5 bne .L36
433 0478 FF3003E2 .loc 1 170 0
434 047c 000053E3 ldrh r3, [fp, #-18] @ movhi
435 0480 0900001A orr r3, r3, #1
169:i2c1.c **** {
170:i2c1.c **** errorFlags|=0x01;
436 r3, [fp, #-18] @ movhi
437 0484 B2315BE1 .loc 1 171 0
438 0488 013083E3 mov r3, #0
439 048c B2314BE1 strb r3, [fp, #-21]
171:i2c1.c **** r=0;
440 c 1 172 0
441 0490 0030A0E3 mov r3, #0
442 0494 15304BE5 strb r3, [fp, #-20]
172:i2c1.c **** g=0;
443 oc 1 173 0
444 0498 0030A0E3 mvn r3, #0
445 049c 14304BE5 strb r3, [fp, #-19]
173:i2c1.c **** b=255;
446 .L38
447 04a0 0030E0E3 .L36:
448 04a4 13304BE5 .loc 1 175 0
449 04a8 800000EA ldr r3, .L149+24
450 ldr r3, [r3, #40]
174:i2c1.c **** }
175:i2c1.c **** else if (((GPS_Data.status&0xFF)==3) && (HL_Status.battery_voltage_1>11000))
451 r3, r3, #255
452 04ac 6C399FE5 cmp r3, #3
453 04b0 283093E5 bne .L39
454 04b4 FF3003E2 ldr r3, .L149+28
455 04b8 030053E3 ldrh r3, [r3, #0]
456 04bc 0E00001A mov r3, r3, asl #16
457 04c0 5C399FE5 mov r2, r3, asr #16
458 04c4 B030D3E1 mov r3, #10944
459 04c8 0338A0E1 add r3, r3, #56
460 04cc 4328A0E1 cmp r2, r3
461 04d0 AB3DA0E3 ble .L39
462 04d4 383083E2 .loc 1 177 0
463 04d8 030052E1 mov r3, #0
464 04dc 060000DA strb r3, [fp, #-21]
176:i2c1.c **** {
177:i2c1.c **** r=0;
465 mvn r3, #0
466 04e0 0030A0E3 strb r3, [fp, #-20]
467 04e4 15304BE5 .loc 1 179 0
178:i2c1.c **** g=255;
468 v r3, #0
469 04e8 0030E0E3 strb r3, [fp, #-19]
470 04ec 14304BE5 .loc 1 175 0
179:i2c1.c **** b=0;
471 .L38
472 04f0 0030A0E3 .L39:
473 04f4 13304BE5 .loc 1 180 0
474 ldr r3, .L149+28
475 04f8 6C0000EA ldrh r3, [r3, #0]
476 mov r3, r3, asl #16
180:i2c1.c **** }else if (HL_Status.battery_voltage_1<11000)
477 2, r3, asr #16
478 04fc 20399FE5 mov r3, #10944
479 0500 B030D3E1 add r3, r3, #55
480 0504 0338A0E1 cmp r2, r3
481 0508 4328A0E1 bgt .L42
482 050c AB3DA0E3 .LBB2:
483 0510 373083E2 .loc 1 182 0
484 0514 030052E1 ldr r3, .L149+28
485 0518 590000CA ldrh r3, [r3, #0]
486 mov r3, r3, asl #16
181:i2c1.c **** {
182:i2c1.c **** unsigned int dim=11000-HL_Status.battery_voltage_1;
487 3, asr #16
488 051c 00399FE5 rsb r3, r3, #10944
489 0520 B030D3E1 add r3, r3, #56
490 0524 0338A0E1 str r3, [fp, #-16]
491 0528 4338A0E1 .loc 1 184 0
492 052c AB3D63E2 ldr r3, [fp, #-16]
493 0530 383083E2 cmp r3, #1000
494 0534 10300BE5 bls .L44
183:i2c1.c ****
184:i2c1.c **** if (dim>1000)
495 185 0
496 0538 10301BE5 mov r3, #1000
497 053c FA0F53E3 str r3, [fp, #-16]
498 0540 0100009A .L44:
185:i2c1.c **** dim=1000;
499 c 1 188 0
500 0544 FA3FA0E3 ldr r3, .L149+24
501 0548 10300BE5 ldr r3, [r3, #40]
502 and r3, r3, #255
186:i2c1.c ****
187:i2c1.c ****
188:i2c1.c **** if ((GPS_Data.status&0xFF)!=3)
503 r3, #3
504 054c CC389FE5 beq .L46
505 0550 283093E5 .loc 1 190 0
506 0554 FF3003E2 ldr r2, [fp, #-16]
507 0558 030053E3 ldr r3, .L149+32
508 055c 1800000A umull r1, r3, r2, r3
189:i2c1.c **** {
190:i2c1.c **** dim/=6;
509 3, r3, lsr #2
510 0560 10201BE5 str r3, [fp, #-16]
511 0564 BC389FE5 .loc 1 191 0
512 0568 921383E0 ldr r3, [fp, #-16]
513 056c 2331A0E1 add r3, r3, #10
514 0570 10300BE5 str r3, [fp, #-16]
191:i2c1.c **** dim+=10;
515 1 192 0
516 0574 10301BE5 ldr r3, [fp, #-16]
517 0578 0A3083E2 cmp r3, #165
518 057c 10300BE5 bls .L48
192:i2c1.c **** if (dim>165)
519 c 1 193 0
520 0580 10301BE5 mov r3, #165
521 0584 A50053E3 str r3, [fp, #-16]
522 0588 0100009A .L48:
193:i2c1.c **** dim=165;
523 c 1 194 0
524 058c A530A0E3 mvn r3, #0
525 0590 10300BE5 strb r3, [fp, #-21]
526 .loc 1 195 0
194:i2c1.c **** r=255;
527 r3, [fp, #-16]
528 0594 0030E0E3 and r3, r3, #255
529 0598 15304BE5 rsb r3, r3, #-16777216
195:i2c1.c **** g=165-dim;
530 d r3, r3, #16711680
531 059c 10301BE5 add r3, r3, #65280
532 05a0 FF3003E2 add r3, r3, #165
533 05a4 FF3463E2 strb r3, [fp, #-20]
534 05a8 FF3883E2 .loc 1 196 0
535 05ac FF3C83E2 mov r3, #0
536 05b0 A53083E2 strb r3, [fp, #-19]
537 05b4 14304BE5 b .L50
196:i2c1.c **** b=0;
538 loc 1 199 0
539 05b8 0030A0E3 ldr r3, [fp, #-16]
540 05bc 13304BE5 mov r3, r3, lsr #2
541 05c0 120000EA str r3, [fp, #-16]
542 .loc 1 200 0
197:i2c1.c **** }else
198:i2c1.c **** {
199:i2c1.c **** dim/=4;
543 r3, [fp, #-16]
544 05c4 10301BE5 add r3, r3, #5
545 05c8 2331A0E1 str r3, [fp, #-16]
546 05cc 10300BE5 .loc 1 201 0
200:i2c1.c **** dim+=5;
547 r3, [fp, #-16]
548 05d0 10301BE5 cmp r3, #255
549 05d4 053083E2 bls .L51
550 05d8 10300BE5 .loc 1 202 0
201:i2c1.c **** if (dim>255)
551 r3, #255
552 05dc 10301BE5 str r3, [fp, #-16]
553 05e0 FF0053E3 .L51:
554 05e4 0100009A .loc 1 203 0
202:i2c1.c **** dim=255;
555 r3, [fp, #-16]
556 05e8 FF30A0E3 strb r3, [fp, #-21]
557 05ec 10300BE5 .loc 1 204 0
558 ldr r3, [fp, #-16]
203:i2c1.c **** r=dim;
559 r3, r3, #255
560 05f0 10301BE5 mvn r3, r3
561 05f4 15304BE5 strb r3, [fp, #-20]
204:i2c1.c **** g=255-dim;
562 oc 1 205 0
563 05f8 10301BE5 mov r3, #0
564 05fc FF3003E2 strb r3, [fp, #-19]
565 0600 0330E0E1 .L50:
566 0604 14304BE5 .loc 1 207 0
205:i2c1.c **** b=0;
567 r3, .L149+28
568 0608 0030A0E3 ldrh r3, [r3, #0]
569 060c 13304BE5 mov r3, r3, asl #16
570 mov r2, r3, asr #16
206:i2c1.c **** }
207:i2c1.c **** if(HL_Status.battery_voltage_1<10300) //blink LED @ very low voltage
571 r3, #10240
572 0610 0C389FE5 add r3, r3, #59
573 0614 B030D3E1 cmp r2, r3
574 0618 0338A0E1 bgt .L38
575 061c 4328A0E1 .loc 1 209 0
576 0620 0A3BA0E3 ldr r3, .L149+16
577 0624 3B3083E2 ldrh r1, [r3, #0]
578 0628 030052E1 ldr r3, .L149+36
579 062c 1F0000CA umull r2, r3, r1, r3
208:i2c1.c **** {
209:i2c1.c **** if((cnt%20)<10) {r=0;g=0;b=0;};
580 r3, lsr #4
581 0630 E0379FE5 mov r3, r2
582 0634 B010D3E1 mov r3, r3, asl #2
583 0638 EC379FE5 add r3, r3, r2
584 063c 912383E0 mov r3, r3, asl #2
585 0640 2322A0E1 rsb r3, r3, r1
586 0644 0230A0E1 mov r3, r3, asl #16
587 0648 0331A0E1 mov r3, r3, lsr #16
588 064c 023083E0 cmp r3, #9
589 0650 0331A0E1 bhi .L38
590 0654 013063E0 mov r3, #0
591 0658 0338A0E1 strb r3, [fp, #-21]
592 065c 2338A0E1 mov r3, #0
593 0660 090053E3 strb r3, [fp, #-20]
594 0664 1100008A mov r3, #0
595 0668 0030A0E3 strb r3, [fp, #-19]
596 066c 15304BE5 b .L38
597 0670 0030A0E3 .L42:
598 0674 14304BE5 .LBE2:
599 0678 0030A0E3 .loc 1 211 0
600 067c 13304BE5 ldr r3, .L149+24
601 0680 0A0000EA ldr r3, [r3, #40]
602 and r3, r3, #255
603 cmp r3, #3
210:i2c1.c **** }
211:i2c1.c **** }else if ((GPS_Data.status&0xFF)!=3)
604 mvn r3, #0
605 0684 94379FE5 strb r3, [fp, #-21]
606 0688 283093E5 .loc 1 214 0
607 068c FF3003E2 mvn r3, #90
608 0690 030053E3 strb r3, [fp, #-20]
609 0694 0500000A .loc 1 215 0
212:i2c1.c **** {
213:i2c1.c **** r=255;
610 3, #0
611 0698 0030E0E3 strb r3, [fp, #-19]
612 069c 15304BE5 .L38:
214:i2c1.c **** g=165;
613 oc 1 218 0
614 06a0 5A30E0E3 ldr r3, .L149+16
615 06a4 14304BE5 ldrh r3, [r3, #0]
215:i2c1.c **** b=0;
616 p r3, #100
617 06a8 0030A0E3 bhi .L57
618 06ac 13304BE5 ldrh r3, [fp, #-18]
619 cmp r3, #0
216:i2c1.c **** }
217:i2c1.c ****
218:i2c1.c **** if ((cnt<=100) && (errorFlags))
620 .L57
621 06b0 60379FE5 .loc 1 220 0
622 06b4 B030D3E1 mov r3, #0
623 06b8 640053E3 strb r3, [fp, #-19]
624 06bc 0800008A ldrb r3, [fp, #-19]
625 06c0 B2315BE1 strb r3, [fp, #-20]
626 06c4 000053E3 ldrb r3, [fp, #-20]
627 06c8 0500000A strb r3, [fp, #-21]
219:i2c1.c **** {
220:i2c1.c **** r=g=b=0;
628 loc 1 223 0
629 06cc 0030A0E3 ldr r3, .L149+16
630 06d0 13304BE5 ldrh r3, [r3, #0]
631 06d4 13305BE5 cmp r3, #100
632 06d8 14304BE5 bls .L60
633 06dc 14305BE5 ldr r3, .L149+16
634 06e0 15304BE5 ldrh r3, [r3, #0]
635 cmp r3, #199
221:i2c1.c **** }
222:i2c1.c ****
223:i2c1.c **** if ((cnt>100) && (cnt<200) && (errorFlags)) //always signal errors for 1 second.
636 0
637 06e4 2C379FE5 ldrh r3, [fp, #-18]
638 06e8 B030D3E1 cmp r3, #0
639 06ec 640053E3 beq .L60
640 06f0 BA01009A .loc 1 226 0
641 06f4 1C379FE5 ldrh r3, [fp, #-18]
642 06f8 B030D3E1 and r3, r3, #2
643 06fc C70053E3 cmp r3, #0
644 0700 B601008A beq .L64
645 0704 B2315BE1 .loc 1 228 0
646 0708 000053E3 ldr r3, .L149+16
647 070c B301000A ldrh r3, [r3, #0]
224:i2c1.c **** {
225:i2c1.c **** //overwrite rgb with error signaling
226:i2c1.c **** if (errorFlags & 0x02) //gyros
648 4
649 0710 B2315BE1 bhi .L66
650 0714 023003E2 .loc 1 229 0
651 0718 000053E3 mov r3, #0
652 071c 2700000A strb r3, [fp, #-21]
227:i2c1.c **** {
228:i2c1.c **** if (cnt < 125) {
653 1 230 0
654 0720 F0369FE5 mov r3, #0
655 0724 B030D3E1 strb r3, [fp, #-20]
656 0728 7C0053E3 .loc 1 231 0
657 072c 0600008A mov r3, #0
229:i2c1.c **** r = 0;
658 r3, [fp, #-19]
659 0730 0030A0E3 b .L60
660 0734 15304BE5 .L66:
230:i2c1.c **** g = 0;
661 oc 1 232 0
662 0738 0030A0E3 ldr r3, .L149+16
663 073c 14304BE5 ldrh r3, [r3, #0]
231:i2c1.c **** b = 0;
664 p r3, #149
665 0740 0030A0E3 bhi .L69
666 0744 13304BE5 .loc 1 233 0
667 0748 A40100EA mvn r3, #0
668 strb r3, [fp, #-21]
232:i2c1.c **** } else if (cnt < 150) {
669 1 234 0
670 074c C4369FE5 mov r3, #0
671 0750 B030D3E1 strb r3, [fp, #-20]
672 0754 950053E3 .loc 1 235 0
673 0758 0600008A mov r3, #0
233:i2c1.c **** r = 255;
674 r3, [fp, #-19]
675 075c 0030E0E3 b .L60
676 0760 15304BE5 .L69:
234:i2c1.c **** g = 0;
677 oc 1 237 0
678 0764 0030A0E3 ldr r3, .L149+16
679 0768 14304BE5 ldrh r3, [r3, #0]
235:i2c1.c **** b = 0;
680 p r3, #174
681 076c 0030A0E3 bhi .L71
682 0770 13304BE5 .loc 1 238 0
683 0774 990100EA mov r3, #0
684 strb r3, [fp, #-21]
236:i2c1.c ****
237:i2c1.c **** } else if (cnt < 175) {
685 1 239 0
686 0778 98369FE5 mov r3, #0
687 077c B030D3E1 strb r3, [fp, #-20]
688 0780 AE0053E3 .loc 1 240 0
689 0784 0600008A mov r3, #0
238:i2c1.c **** r = 0;
690 r3, [fp, #-19]
691 0788 0030A0E3 b .L60
692 078c 15304BE5 .L71:
239:i2c1.c **** g = 0;
693 oc 1 242 0
694 0790 0030A0E3 mvn r3, #0
695 0794 14304BE5 strb r3, [fp, #-21]
240:i2c1.c **** b = 0;
696 oc 1 243 0
697 0798 0030A0E3 mov r3, #0
698 079c 13304BE5 strb r3, [fp, #-20]
699 07a0 8E0100EA .loc 1 244 0
700 mov r3, #0
241:i2c1.c **** } else {
242:i2c1.c **** r = 255;
701 r3, [fp, #-19]
702 07a4 0030E0E3 b .L60
703 07a8 15304BE5 .L64:
243:i2c1.c **** g = 0;
704 oc 1 246 0
705 07ac 0030A0E3 ldrh r3, [fp, #-18]
706 07b0 14304BE5 and r3, r3, #4
244:i2c1.c **** b = 0;
707 p r3, #0
708 07b4 0030A0E3 beq .L73
709 07b8 13304BE5 .loc 1 248 0
710 07bc 870100EA ldr r3, .L149+16
711 ldrh r3, [r3, #0]
245:i2c1.c **** }
246:i2c1.c **** } else if (errorFlags & 0x04) {
712 r3, #124
713 07c0 B2315BE1 bhi .L75
714 07c4 043003E2 .loc 1 249 0
715 07c8 000053E3 mvn r3, #0
716 07cc 3100000A strb r3, [fp, #-21]
247:i2c1.c **** //blink 3x
248:i2c1.c **** if (cnt < 125) {
717 1 250 0
718 07d0 40369FE5 mov r3, #0
719 07d4 B030D3E1 strb r3, [fp, #-20]
720 07d8 7C0053E3 .loc 1 251 0
721 07dc 0500008A mov r3, #0
249:i2c1.c **** r = 255;
722 r3, [fp, #-19]
723 07e0 0030E0E3 .L75:
724 07e4 15304BE5 .loc 1 253 0
250:i2c1.c **** g = 0;
725 r r3, .L149+16
726 07e8 0030A0E3 ldrh r3, [r3, #0]
727 07ec 14304BE5 cmp r3, #139
251:i2c1.c **** b = 0;
728 i .L77
729 07f0 0030A0E3 .loc 1 254 0
730 07f4 13304BE5 mov r3, #0
731 strb r3, [fp, #-21]
252:i2c1.c **** }
253:i2c1.c **** if (cnt < 140) {
732 c 1 255 0
733 07f8 18369FE5 mov r3, #0
734 07fc B030D3E1 strb r3, [fp, #-20]
735 0800 8B0053E3 .loc 1 256 0
736 0804 0600008A mov r3, #0
254:i2c1.c **** r = 0;
737 r3, [fp, #-19]
738 0808 0030A0E3 b .L60
739 080c 15304BE5 .L77:
255:i2c1.c **** g = 0;
740 oc 1 258 0
741 0810 0030A0E3 ldr r3, .L149+16
742 0814 14304BE5 ldrh r3, [r3, #0]
256:i2c1.c **** b = 0;
743 p r3, #174
744 0818 0030A0E3 bhi .L80
745 081c 13304BE5 .loc 1 259 0
746 0820 6E0100EA mvn r3, #0
747 strb r3, [fp, #-21]
257:i2c1.c ****
258:i2c1.c **** } else if (cnt < 175) {
748 1 260 0
749 0824 EC359FE5 mov r3, #0
750 0828 B030D3E1 strb r3, [fp, #-20]
751 082c AE0053E3 .loc 1 261 0
752 0830 0600008A mov r3, #0
259:i2c1.c **** r = 255;
753 r3, [fp, #-19]
754 0834 0030E0E3 b .L60
755 0838 15304BE5 .L80:
260:i2c1.c **** g = 0;
756 oc 1 262 0
757 083c 0030A0E3 ldr r3, .L149+16
758 0840 14304BE5 ldrh r3, [r3, #0]