../build/bt6702/stm32bt6702/stm32bt6702.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 00000188 08020000 08020000 00008000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .hw_rev 00000010 080201f0 080201f0 000081f0 2**0 CONTENTS, ALLOC, LOAD, DATA 2 .text 000250cc 08020200 08020200 00008200 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 3 .ARM 00000008 080452cc 080452cc 0002d2cc 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .init_array 00000004 080452d4 080452d4 0002d2d4 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .fini_array 00000004 080452d8 080452d8 0002d2d8 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .data 00000ac4 20000000 080452dc 00030000 2**2 CONTENTS, ALLOC, LOAD, DATA 7 .fill 0003a25c 08045da0 08045da0 00035da0 2**0 CONTENTS, ALLOC, LOAD, DATA 8 .crc 00000004 0807fffc 0807fffc 0006fffc 2**2 CONTENTS, ALLOC, LOAD, DATA 9 .bss 000136ec 20000ac4 08045da0 00070ac4 2**2 ALLOC 10 ._user_heap_stack 00000200 200141b0 0805948c 00070ac4 2**0 ALLOC 11 .memory_b1_text 0000f000 10000000 10000000 00070000 2**0 ALLOC 12 .ARM.attributes 0000002f 00000000 00000000 00070000 2**0 CONTENTS, READONLY 13 .debug_info 00050efc 00000000 00000000 0007002f 2**0 CONTENTS, READONLY, DEBUGGING 14 .debug_abbrev 0000cd1f 00000000 00000000 000c0f2b 2**0 CONTENTS, READONLY, DEBUGGING 15 .debug_loc 000263bd 00000000 00000000 000cdc4a 2**0 CONTENTS, READONLY, DEBUGGING 16 .debug_aranges 00003168 00000000 00000000 000f4008 2**3 CONTENTS, READONLY, DEBUGGING 17 .debug_ranges 00003a68 00000000 00000000 000f7170 2**3 CONTENTS, READONLY, DEBUGGING 18 .debug_macro 000214c9 00000000 00000000 000fabd8 2**0 CONTENTS, READONLY, DEBUGGING 19 .debug_line 0002718a 00000000 00000000 0011c0a1 2**0 CONTENTS, READONLY, DEBUGGING 20 .debug_str 000821ec 00000000 00000000 0014322b 2**0 CONTENTS, READONLY, DEBUGGING 21 .comment 00000030 00000000 00000000 001c5417 2**0 CONTENTS, READONLY 22 .debug_frame 00008534 00000000 00000000 001c5448 2**2 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 08020200 : 8020200: b508 push {r3, lr} 8020202: f640 20c4 movw r0, #2756 ; 0xac4 8020206: 4b07 ldr r3, [pc, #28] ; (8020224 ) 8020208: f2c2 0000 movt r0, #8192 ; 0x2000 802020c: 1a1b subs r3, r3, r0 802020e: 2b06 cmp r3, #6 8020210: d800 bhi.n 8020214 8020212: bd08 pop {r3, pc} 8020214: f240 0300 movw r3, #0 8020218: f2c0 0300 movt r3, #0 802021c: 2b00 cmp r3, #0 802021e: d0f8 beq.n 8020212 8020220: 4798 blx r3 8020222: e7f6 b.n 8020212 8020224: 20000ac7 .word 0x20000ac7 08020228 : 8020228: b508 push {r3, lr} 802022a: f640 20c4 movw r0, #2756 ; 0xac4 802022e: f640 23c4 movw r3, #2756 ; 0xac4 8020232: f2c2 0000 movt r0, #8192 ; 0x2000 8020236: f2c2 0300 movt r3, #8192 ; 0x2000 802023a: 1a1b subs r3, r3, r0 802023c: 109b asrs r3, r3, #2 802023e: eb03 73d3 add.w r3, r3, r3, lsr #31 8020242: 1059 asrs r1, r3, #1 8020244: d100 bne.n 8020248 8020246: bd08 pop {r3, pc} 8020248: f240 0200 movw r2, #0 802024c: f2c0 0200 movt r2, #0 8020250: 2a00 cmp r2, #0 8020252: d0f8 beq.n 8020246 8020254: 4790 blx r2 8020256: e7f6 b.n 8020246 08020258 <__do_global_dtors_aux>: 8020258: b510 push {r4, lr} 802025a: f640 24c4 movw r4, #2756 ; 0xac4 802025e: f2c2 0400 movt r4, #8192 ; 0x2000 8020262: 7823 ldrb r3, [r4, #0] 8020264: b973 cbnz r3, 8020284 <__do_global_dtors_aux+0x2c> 8020266: f7ff ffcb bl 8020200 802026a: f240 0300 movw r3, #0 802026e: f2c0 0300 movt r3, #0 8020272: b12b cbz r3, 8020280 <__do_global_dtors_aux+0x28> 8020274: f245 20b4 movw r0, #21172 ; 0x52b4 8020278: f6c0 0004 movt r0, #2052 ; 0x804 802027c: f3af 8000 nop.w 8020280: 2301 movs r3, #1 8020282: 7023 strb r3, [r4, #0] 8020284: bd10 pop {r4, pc} 8020286: bf00 nop 08020288 : 8020288: b508 push {r3, lr} 802028a: f240 0300 movw r3, #0 802028e: f2c0 0300 movt r3, #0 8020292: b14b cbz r3, 80202a8 8020294: f245 20b4 movw r0, #21172 ; 0x52b4 8020298: f640 21c8 movw r1, #2760 ; 0xac8 802029c: f6c0 0004 movt r0, #2052 ; 0x804 80202a0: f2c2 0100 movt r1, #8192 ; 0x2000 80202a4: f3af 8000 nop.w 80202a8: f640 20c4 movw r0, #2756 ; 0xac4 80202ac: f2c2 0000 movt r0, #8192 ; 0x2000 80202b0: 6803 ldr r3, [r0, #0] 80202b2: b12b cbz r3, 80202c0 80202b4: f240 0300 movw r3, #0 80202b8: f2c0 0300 movt r3, #0 80202bc: b103 cbz r3, 80202c0 80202be: 4798 blx r3 80202c0: e8bd 4008 ldmia.w sp!, {r3, lr} 80202c4: f7ff bfb0 b.w 8020228 080202c8 <__aeabi_drsub>: 80202c8: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000 80202cc: e002 b.n 80202d4 <__adddf3> 80202ce: bf00 nop 080202d0 <__aeabi_dsub>: 80202d0: f083 4300 eor.w r3, r3, #2147483648 ; 0x80000000 080202d4 <__adddf3>: 80202d4: b530 push {r4, r5, lr} 80202d6: ea4f 0441 mov.w r4, r1, lsl #1 80202da: ea4f 0543 mov.w r5, r3, lsl #1 80202de: ea94 0f05 teq r4, r5 80202e2: bf08 it eq 80202e4: ea90 0f02 teqeq r0, r2 80202e8: bf1f itttt ne 80202ea: ea54 0c00 orrsne.w ip, r4, r0 80202ee: ea55 0c02 orrsne.w ip, r5, r2 80202f2: ea7f 5c64 mvnsne.w ip, r4, asr #21 80202f6: ea7f 5c65 mvnsne.w ip, r5, asr #21 80202fa: f000 80e2 beq.w 80204c2 <__adddf3+0x1ee> 80202fe: ea4f 5454 mov.w r4, r4, lsr #21 8020302: ebd4 5555 rsbs r5, r4, r5, lsr #21 8020306: bfb8 it lt 8020308: 426d neglt r5, r5 802030a: dd0c ble.n 8020326 <__adddf3+0x52> 802030c: 442c add r4, r5 802030e: ea80 0202 eor.w r2, r0, r2 8020312: ea81 0303 eor.w r3, r1, r3 8020316: ea82 0000 eor.w r0, r2, r0 802031a: ea83 0101 eor.w r1, r3, r1 802031e: ea80 0202 eor.w r2, r0, r2 8020322: ea81 0303 eor.w r3, r1, r3 8020326: 2d36 cmp r5, #54 ; 0x36 8020328: bf88 it hi 802032a: bd30 pophi {r4, r5, pc} 802032c: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 8020330: ea4f 3101 mov.w r1, r1, lsl #12 8020334: f44f 1c80 mov.w ip, #1048576 ; 0x100000 8020338: ea4c 3111 orr.w r1, ip, r1, lsr #12 802033c: d002 beq.n 8020344 <__adddf3+0x70> 802033e: 4240 negs r0, r0 8020340: eb61 0141 sbc.w r1, r1, r1, lsl #1 8020344: f013 4f00 tst.w r3, #2147483648 ; 0x80000000 8020348: ea4f 3303 mov.w r3, r3, lsl #12 802034c: ea4c 3313 orr.w r3, ip, r3, lsr #12 8020350: d002 beq.n 8020358 <__adddf3+0x84> 8020352: 4252 negs r2, r2 8020354: eb63 0343 sbc.w r3, r3, r3, lsl #1 8020358: ea94 0f05 teq r4, r5 802035c: f000 80a7 beq.w 80204ae <__adddf3+0x1da> 8020360: f1a4 0401 sub.w r4, r4, #1 8020364: f1d5 0e20 rsbs lr, r5, #32 8020368: db0d blt.n 8020386 <__adddf3+0xb2> 802036a: fa02 fc0e lsl.w ip, r2, lr 802036e: fa22 f205 lsr.w r2, r2, r5 8020372: 1880 adds r0, r0, r2 8020374: f141 0100 adc.w r1, r1, #0 8020378: fa03 f20e lsl.w r2, r3, lr 802037c: 1880 adds r0, r0, r2 802037e: fa43 f305 asr.w r3, r3, r5 8020382: 4159 adcs r1, r3 8020384: e00e b.n 80203a4 <__adddf3+0xd0> 8020386: f1a5 0520 sub.w r5, r5, #32 802038a: f10e 0e20 add.w lr, lr, #32 802038e: 2a01 cmp r2, #1 8020390: fa03 fc0e lsl.w ip, r3, lr 8020394: bf28 it cs 8020396: f04c 0c02 orrcs.w ip, ip, #2 802039a: fa43 f305 asr.w r3, r3, r5 802039e: 18c0 adds r0, r0, r3 80203a0: eb51 71e3 adcs.w r1, r1, r3, asr #31 80203a4: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 80203a8: d507 bpl.n 80203ba <__adddf3+0xe6> 80203aa: f04f 0e00 mov.w lr, #0 80203ae: f1dc 0c00 rsbs ip, ip, #0 80203b2: eb7e 0000 sbcs.w r0, lr, r0 80203b6: eb6e 0101 sbc.w r1, lr, r1 80203ba: f5b1 1f80 cmp.w r1, #1048576 ; 0x100000 80203be: d31b bcc.n 80203f8 <__adddf3+0x124> 80203c0: f5b1 1f00 cmp.w r1, #2097152 ; 0x200000 80203c4: d30c bcc.n 80203e0 <__adddf3+0x10c> 80203c6: 0849 lsrs r1, r1, #1 80203c8: ea5f 0030 movs.w r0, r0, rrx 80203cc: ea4f 0c3c mov.w ip, ip, rrx 80203d0: f104 0401 add.w r4, r4, #1 80203d4: ea4f 5244 mov.w r2, r4, lsl #21 80203d8: f512 0f80 cmn.w r2, #4194304 ; 0x400000 80203dc: f080 809a bcs.w 8020514 <__adddf3+0x240> 80203e0: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000 80203e4: bf08 it eq 80203e6: ea5f 0c50 movseq.w ip, r0, lsr #1 80203ea: f150 0000 adcs.w r0, r0, #0 80203ee: eb41 5104 adc.w r1, r1, r4, lsl #20 80203f2: ea41 0105 orr.w r1, r1, r5 80203f6: bd30 pop {r4, r5, pc} 80203f8: ea5f 0c4c movs.w ip, ip, lsl #1 80203fc: 4140 adcs r0, r0 80203fe: eb41 0101 adc.w r1, r1, r1 8020402: f411 1f80 tst.w r1, #1048576 ; 0x100000 8020406: f1a4 0401 sub.w r4, r4, #1 802040a: d1e9 bne.n 80203e0 <__adddf3+0x10c> 802040c: f091 0f00 teq r1, #0 8020410: bf04 itt eq 8020412: 4601 moveq r1, r0 8020414: 2000 moveq r0, #0 8020416: fab1 f381 clz r3, r1 802041a: bf08 it eq 802041c: 3320 addeq r3, #32 802041e: f1a3 030b sub.w r3, r3, #11 8020422: f1b3 0220 subs.w r2, r3, #32 8020426: da0c bge.n 8020442 <__adddf3+0x16e> 8020428: 320c adds r2, #12 802042a: dd08 ble.n 802043e <__adddf3+0x16a> 802042c: f102 0c14 add.w ip, r2, #20 8020430: f1c2 020c rsb r2, r2, #12 8020434: fa01 f00c lsl.w r0, r1, ip 8020438: fa21 f102 lsr.w r1, r1, r2 802043c: e00c b.n 8020458 <__adddf3+0x184> 802043e: f102 0214 add.w r2, r2, #20 8020442: bfd8 it le 8020444: f1c2 0c20 rsble ip, r2, #32 8020448: fa01 f102 lsl.w r1, r1, r2 802044c: fa20 fc0c lsr.w ip, r0, ip 8020450: bfdc itt le 8020452: ea41 010c orrle.w r1, r1, ip 8020456: 4090 lslle r0, r2 8020458: 1ae4 subs r4, r4, r3 802045a: bfa2 ittt ge 802045c: eb01 5104 addge.w r1, r1, r4, lsl #20 8020460: 4329 orrge r1, r5 8020462: bd30 popge {r4, r5, pc} 8020464: ea6f 0404 mvn.w r4, r4 8020468: 3c1f subs r4, #31 802046a: da1c bge.n 80204a6 <__adddf3+0x1d2> 802046c: 340c adds r4, #12 802046e: dc0e bgt.n 802048e <__adddf3+0x1ba> 8020470: f104 0414 add.w r4, r4, #20 8020474: f1c4 0220 rsb r2, r4, #32 8020478: fa20 f004 lsr.w r0, r0, r4 802047c: fa01 f302 lsl.w r3, r1, r2 8020480: ea40 0003 orr.w r0, r0, r3 8020484: fa21 f304 lsr.w r3, r1, r4 8020488: ea45 0103 orr.w r1, r5, r3 802048c: bd30 pop {r4, r5, pc} 802048e: f1c4 040c rsb r4, r4, #12 8020492: f1c4 0220 rsb r2, r4, #32 8020496: fa20 f002 lsr.w r0, r0, r2 802049a: fa01 f304 lsl.w r3, r1, r4 802049e: ea40 0003 orr.w r0, r0, r3 80204a2: 4629 mov r1, r5 80204a4: bd30 pop {r4, r5, pc} 80204a6: fa21 f004 lsr.w r0, r1, r4 80204aa: 4629 mov r1, r5 80204ac: bd30 pop {r4, r5, pc} 80204ae: f094 0f00 teq r4, #0 80204b2: f483 1380 eor.w r3, r3, #1048576 ; 0x100000 80204b6: bf06 itte eq 80204b8: f481 1180 eoreq.w r1, r1, #1048576 ; 0x100000 80204bc: 3401 addeq r4, #1 80204be: 3d01 subne r5, #1 80204c0: e74e b.n 8020360 <__adddf3+0x8c> 80204c2: ea7f 5c64 mvns.w ip, r4, asr #21 80204c6: bf18 it ne 80204c8: ea7f 5c65 mvnsne.w ip, r5, asr #21 80204cc: d029 beq.n 8020522 <__adddf3+0x24e> 80204ce: ea94 0f05 teq r4, r5 80204d2: bf08 it eq 80204d4: ea90 0f02 teqeq r0, r2 80204d8: d005 beq.n 80204e6 <__adddf3+0x212> 80204da: ea54 0c00 orrs.w ip, r4, r0 80204de: bf04 itt eq 80204e0: 4619 moveq r1, r3 80204e2: 4610 moveq r0, r2 80204e4: bd30 pop {r4, r5, pc} 80204e6: ea91 0f03 teq r1, r3 80204ea: bf1e ittt ne 80204ec: 2100 movne r1, #0 80204ee: 2000 movne r0, #0 80204f0: bd30 popne {r4, r5, pc} 80204f2: ea5f 5c54 movs.w ip, r4, lsr #21 80204f6: d105 bne.n 8020504 <__adddf3+0x230> 80204f8: 0040 lsls r0, r0, #1 80204fa: 4149 adcs r1, r1 80204fc: bf28 it cs 80204fe: f041 4100 orrcs.w r1, r1, #2147483648 ; 0x80000000 8020502: bd30 pop {r4, r5, pc} 8020504: f514 0480 adds.w r4, r4, #4194304 ; 0x400000 8020508: bf3c itt cc 802050a: f501 1180 addcc.w r1, r1, #1048576 ; 0x100000 802050e: bd30 popcc {r4, r5, pc} 8020510: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 8020514: f045 41fe orr.w r1, r5, #2130706432 ; 0x7f000000 8020518: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000 802051c: f04f 0000 mov.w r0, #0 8020520: bd30 pop {r4, r5, pc} 8020522: ea7f 5c64 mvns.w ip, r4, asr #21 8020526: bf1a itte ne 8020528: 4619 movne r1, r3 802052a: 4610 movne r0, r2 802052c: ea7f 5c65 mvnseq.w ip, r5, asr #21 8020530: bf1c itt ne 8020532: 460b movne r3, r1 8020534: 4602 movne r2, r0 8020536: ea50 3401 orrs.w r4, r0, r1, lsl #12 802053a: bf06 itte eq 802053c: ea52 3503 orrseq.w r5, r2, r3, lsl #12 8020540: ea91 0f03 teqeq r1, r3 8020544: f441 2100 orrne.w r1, r1, #524288 ; 0x80000 8020548: bd30 pop {r4, r5, pc} 802054a: bf00 nop 0802054c <__aeabi_ui2d>: 802054c: f090 0f00 teq r0, #0 8020550: bf04 itt eq 8020552: 2100 moveq r1, #0 8020554: 4770 bxeq lr 8020556: b530 push {r4, r5, lr} 8020558: f44f 6480 mov.w r4, #1024 ; 0x400 802055c: f104 0432 add.w r4, r4, #50 ; 0x32 8020560: f04f 0500 mov.w r5, #0 8020564: f04f 0100 mov.w r1, #0 8020568: e750 b.n 802040c <__adddf3+0x138> 802056a: bf00 nop 0802056c <__aeabi_i2d>: 802056c: f090 0f00 teq r0, #0 8020570: bf04 itt eq 8020572: 2100 moveq r1, #0 8020574: 4770 bxeq lr 8020576: b530 push {r4, r5, lr} 8020578: f44f 6480 mov.w r4, #1024 ; 0x400 802057c: f104 0432 add.w r4, r4, #50 ; 0x32 8020580: f010 4500 ands.w r5, r0, #2147483648 ; 0x80000000 8020584: bf48 it mi 8020586: 4240 negmi r0, r0 8020588: f04f 0100 mov.w r1, #0 802058c: e73e b.n 802040c <__adddf3+0x138> 802058e: bf00 nop 08020590 <__aeabi_f2d>: 8020590: 0042 lsls r2, r0, #1 8020592: ea4f 01e2 mov.w r1, r2, asr #3 8020596: ea4f 0131 mov.w r1, r1, rrx 802059a: ea4f 7002 mov.w r0, r2, lsl #28 802059e: bf1f itttt ne 80205a0: f012 437f andsne.w r3, r2, #4278190080 ; 0xff000000 80205a4: f093 4f7f teqne r3, #4278190080 ; 0xff000000 80205a8: f081 5160 eorne.w r1, r1, #939524096 ; 0x38000000 80205ac: 4770 bxne lr 80205ae: f092 0f00 teq r2, #0 80205b2: bf14 ite ne 80205b4: f093 4f7f teqne r3, #4278190080 ; 0xff000000 80205b8: 4770 bxeq lr 80205ba: b530 push {r4, r5, lr} 80205bc: f44f 7460 mov.w r4, #896 ; 0x380 80205c0: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 80205c4: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 80205c8: e720 b.n 802040c <__adddf3+0x138> 80205ca: bf00 nop 080205cc <__aeabi_ul2d>: 80205cc: ea50 0201 orrs.w r2, r0, r1 80205d0: bf08 it eq 80205d2: 4770 bxeq lr 80205d4: b530 push {r4, r5, lr} 80205d6: f04f 0500 mov.w r5, #0 80205da: e00a b.n 80205f2 <__aeabi_l2d+0x16> 080205dc <__aeabi_l2d>: 80205dc: ea50 0201 orrs.w r2, r0, r1 80205e0: bf08 it eq 80205e2: 4770 bxeq lr 80205e4: b530 push {r4, r5, lr} 80205e6: f011 4500 ands.w r5, r1, #2147483648 ; 0x80000000 80205ea: d502 bpl.n 80205f2 <__aeabi_l2d+0x16> 80205ec: 4240 negs r0, r0 80205ee: eb61 0141 sbc.w r1, r1, r1, lsl #1 80205f2: f44f 6480 mov.w r4, #1024 ; 0x400 80205f6: f104 0432 add.w r4, r4, #50 ; 0x32 80205fa: ea5f 5c91 movs.w ip, r1, lsr #22 80205fe: f43f aedc beq.w 80203ba <__adddf3+0xe6> 8020602: f04f 0203 mov.w r2, #3 8020606: ea5f 0cdc movs.w ip, ip, lsr #3 802060a: bf18 it ne 802060c: 3203 addne r2, #3 802060e: ea5f 0cdc movs.w ip, ip, lsr #3 8020612: bf18 it ne 8020614: 3203 addne r2, #3 8020616: eb02 02dc add.w r2, r2, ip, lsr #3 802061a: f1c2 0320 rsb r3, r2, #32 802061e: fa00 fc03 lsl.w ip, r0, r3 8020622: fa20 f002 lsr.w r0, r0, r2 8020626: fa01 fe03 lsl.w lr, r1, r3 802062a: ea40 000e orr.w r0, r0, lr 802062e: fa21 f102 lsr.w r1, r1, r2 8020632: 4414 add r4, r2 8020634: e6c1 b.n 80203ba <__adddf3+0xe6> 8020636: bf00 nop 08020638 <__aeabi_dmul>: 8020638: b570 push {r4, r5, r6, lr} 802063a: f04f 0cff mov.w ip, #255 ; 0xff 802063e: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700 8020642: ea1c 5411 ands.w r4, ip, r1, lsr #20 8020646: bf1d ittte ne 8020648: ea1c 5513 andsne.w r5, ip, r3, lsr #20 802064c: ea94 0f0c teqne r4, ip 8020650: ea95 0f0c teqne r5, ip 8020654: f000 f8de bleq 8020814 <__aeabi_dmul+0x1dc> 8020658: 442c add r4, r5 802065a: ea81 0603 eor.w r6, r1, r3 802065e: ea21 514c bic.w r1, r1, ip, lsl #21 8020662: ea23 534c bic.w r3, r3, ip, lsl #21 8020666: ea50 3501 orrs.w r5, r0, r1, lsl #12 802066a: bf18 it ne 802066c: ea52 3503 orrsne.w r5, r2, r3, lsl #12 8020670: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020674: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 8020678: d038 beq.n 80206ec <__aeabi_dmul+0xb4> 802067a: fba0 ce02 umull ip, lr, r0, r2 802067e: f04f 0500 mov.w r5, #0 8020682: fbe1 e502 umlal lr, r5, r1, r2 8020686: f006 4200 and.w r2, r6, #2147483648 ; 0x80000000 802068a: fbe0 e503 umlal lr, r5, r0, r3 802068e: f04f 0600 mov.w r6, #0 8020692: fbe1 5603 umlal r5, r6, r1, r3 8020696: f09c 0f00 teq ip, #0 802069a: bf18 it ne 802069c: f04e 0e01 orrne.w lr, lr, #1 80206a0: f1a4 04ff sub.w r4, r4, #255 ; 0xff 80206a4: f5b6 7f00 cmp.w r6, #512 ; 0x200 80206a8: f564 7440 sbc.w r4, r4, #768 ; 0x300 80206ac: d204 bcs.n 80206b8 <__aeabi_dmul+0x80> 80206ae: ea5f 0e4e movs.w lr, lr, lsl #1 80206b2: 416d adcs r5, r5 80206b4: eb46 0606 adc.w r6, r6, r6 80206b8: ea42 21c6 orr.w r1, r2, r6, lsl #11 80206bc: ea41 5155 orr.w r1, r1, r5, lsr #21 80206c0: ea4f 20c5 mov.w r0, r5, lsl #11 80206c4: ea40 505e orr.w r0, r0, lr, lsr #21 80206c8: ea4f 2ece mov.w lr, lr, lsl #11 80206cc: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd 80206d0: bf88 it hi 80206d2: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700 80206d6: d81e bhi.n 8020716 <__aeabi_dmul+0xde> 80206d8: f1be 4f00 cmp.w lr, #2147483648 ; 0x80000000 80206dc: bf08 it eq 80206de: ea5f 0e50 movseq.w lr, r0, lsr #1 80206e2: f150 0000 adcs.w r0, r0, #0 80206e6: eb41 5104 adc.w r1, r1, r4, lsl #20 80206ea: bd70 pop {r4, r5, r6, pc} 80206ec: f006 4600 and.w r6, r6, #2147483648 ; 0x80000000 80206f0: ea46 0101 orr.w r1, r6, r1 80206f4: ea40 0002 orr.w r0, r0, r2 80206f8: ea81 0103 eor.w r1, r1, r3 80206fc: ebb4 045c subs.w r4, r4, ip, lsr #1 8020700: bfc2 ittt gt 8020702: ebd4 050c rsbsgt r5, r4, ip 8020706: ea41 5104 orrgt.w r1, r1, r4, lsl #20 802070a: bd70 popgt {r4, r5, r6, pc} 802070c: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020710: f04f 0e00 mov.w lr, #0 8020714: 3c01 subs r4, #1 8020716: f300 80ab bgt.w 8020870 <__aeabi_dmul+0x238> 802071a: f114 0f36 cmn.w r4, #54 ; 0x36 802071e: bfde ittt le 8020720: 2000 movle r0, #0 8020722: f001 4100 andle.w r1, r1, #2147483648 ; 0x80000000 8020726: bd70 pople {r4, r5, r6, pc} 8020728: f1c4 0400 rsb r4, r4, #0 802072c: 3c20 subs r4, #32 802072e: da35 bge.n 802079c <__aeabi_dmul+0x164> 8020730: 340c adds r4, #12 8020732: dc1b bgt.n 802076c <__aeabi_dmul+0x134> 8020734: f104 0414 add.w r4, r4, #20 8020738: f1c4 0520 rsb r5, r4, #32 802073c: fa00 f305 lsl.w r3, r0, r5 8020740: fa20 f004 lsr.w r0, r0, r4 8020744: fa01 f205 lsl.w r2, r1, r5 8020748: ea40 0002 orr.w r0, r0, r2 802074c: f001 4200 and.w r2, r1, #2147483648 ; 0x80000000 8020750: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 8020754: eb10 70d3 adds.w r0, r0, r3, lsr #31 8020758: fa21 f604 lsr.w r6, r1, r4 802075c: eb42 0106 adc.w r1, r2, r6 8020760: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 8020764: bf08 it eq 8020766: ea20 70d3 biceq.w r0, r0, r3, lsr #31 802076a: bd70 pop {r4, r5, r6, pc} 802076c: f1c4 040c rsb r4, r4, #12 8020770: f1c4 0520 rsb r5, r4, #32 8020774: fa00 f304 lsl.w r3, r0, r4 8020778: fa20 f005 lsr.w r0, r0, r5 802077c: fa01 f204 lsl.w r2, r1, r4 8020780: ea40 0002 orr.w r0, r0, r2 8020784: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 8020788: eb10 70d3 adds.w r0, r0, r3, lsr #31 802078c: f141 0100 adc.w r1, r1, #0 8020790: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 8020794: bf08 it eq 8020796: ea20 70d3 biceq.w r0, r0, r3, lsr #31 802079a: bd70 pop {r4, r5, r6, pc} 802079c: f1c4 0520 rsb r5, r4, #32 80207a0: fa00 f205 lsl.w r2, r0, r5 80207a4: ea4e 0e02 orr.w lr, lr, r2 80207a8: fa20 f304 lsr.w r3, r0, r4 80207ac: fa01 f205 lsl.w r2, r1, r5 80207b0: ea43 0302 orr.w r3, r3, r2 80207b4: fa21 f004 lsr.w r0, r1, r4 80207b8: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 80207bc: fa21 f204 lsr.w r2, r1, r4 80207c0: ea20 0002 bic.w r0, r0, r2 80207c4: eb00 70d3 add.w r0, r0, r3, lsr #31 80207c8: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 80207cc: bf08 it eq 80207ce: ea20 70d3 biceq.w r0, r0, r3, lsr #31 80207d2: bd70 pop {r4, r5, r6, pc} 80207d4: f094 0f00 teq r4, #0 80207d8: d10f bne.n 80207fa <__aeabi_dmul+0x1c2> 80207da: f001 4600 and.w r6, r1, #2147483648 ; 0x80000000 80207de: 0040 lsls r0, r0, #1 80207e0: eb41 0101 adc.w r1, r1, r1 80207e4: f411 1f80 tst.w r1, #1048576 ; 0x100000 80207e8: bf08 it eq 80207ea: 3c01 subeq r4, #1 80207ec: d0f7 beq.n 80207de <__aeabi_dmul+0x1a6> 80207ee: ea41 0106 orr.w r1, r1, r6 80207f2: f095 0f00 teq r5, #0 80207f6: bf18 it ne 80207f8: 4770 bxne lr 80207fa: f003 4600 and.w r6, r3, #2147483648 ; 0x80000000 80207fe: 0052 lsls r2, r2, #1 8020800: eb43 0303 adc.w r3, r3, r3 8020804: f413 1f80 tst.w r3, #1048576 ; 0x100000 8020808: bf08 it eq 802080a: 3d01 subeq r5, #1 802080c: d0f7 beq.n 80207fe <__aeabi_dmul+0x1c6> 802080e: ea43 0306 orr.w r3, r3, r6 8020812: 4770 bx lr 8020814: ea94 0f0c teq r4, ip 8020818: ea0c 5513 and.w r5, ip, r3, lsr #20 802081c: bf18 it ne 802081e: ea95 0f0c teqne r5, ip 8020822: d00c beq.n 802083e <__aeabi_dmul+0x206> 8020824: ea50 0641 orrs.w r6, r0, r1, lsl #1 8020828: bf18 it ne 802082a: ea52 0643 orrsne.w r6, r2, r3, lsl #1 802082e: d1d1 bne.n 80207d4 <__aeabi_dmul+0x19c> 8020830: ea81 0103 eor.w r1, r1, r3 8020834: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 8020838: f04f 0000 mov.w r0, #0 802083c: bd70 pop {r4, r5, r6, pc} 802083e: ea50 0641 orrs.w r6, r0, r1, lsl #1 8020842: bf06 itte eq 8020844: 4610 moveq r0, r2 8020846: 4619 moveq r1, r3 8020848: ea52 0643 orrsne.w r6, r2, r3, lsl #1 802084c: d019 beq.n 8020882 <__aeabi_dmul+0x24a> 802084e: ea94 0f0c teq r4, ip 8020852: d102 bne.n 802085a <__aeabi_dmul+0x222> 8020854: ea50 3601 orrs.w r6, r0, r1, lsl #12 8020858: d113 bne.n 8020882 <__aeabi_dmul+0x24a> 802085a: ea95 0f0c teq r5, ip 802085e: d105 bne.n 802086c <__aeabi_dmul+0x234> 8020860: ea52 3603 orrs.w r6, r2, r3, lsl #12 8020864: bf1c itt ne 8020866: 4610 movne r0, r2 8020868: 4619 movne r1, r3 802086a: d10a bne.n 8020882 <__aeabi_dmul+0x24a> 802086c: ea81 0103 eor.w r1, r1, r3 8020870: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 8020874: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000 8020878: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000 802087c: f04f 0000 mov.w r0, #0 8020880: bd70 pop {r4, r5, r6, pc} 8020882: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000 8020886: f441 0178 orr.w r1, r1, #16252928 ; 0xf80000 802088a: bd70 pop {r4, r5, r6, pc} 0802088c <__aeabi_ddiv>: 802088c: b570 push {r4, r5, r6, lr} 802088e: f04f 0cff mov.w ip, #255 ; 0xff 8020892: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700 8020896: ea1c 5411 ands.w r4, ip, r1, lsr #20 802089a: bf1d ittte ne 802089c: ea1c 5513 andsne.w r5, ip, r3, lsr #20 80208a0: ea94 0f0c teqne r4, ip 80208a4: ea95 0f0c teqne r5, ip 80208a8: f000 f8a7 bleq 80209fa <__aeabi_ddiv+0x16e> 80208ac: eba4 0405 sub.w r4, r4, r5 80208b0: ea81 0e03 eor.w lr, r1, r3 80208b4: ea52 3503 orrs.w r5, r2, r3, lsl #12 80208b8: ea4f 3101 mov.w r1, r1, lsl #12 80208bc: f000 8088 beq.w 80209d0 <__aeabi_ddiv+0x144> 80208c0: ea4f 3303 mov.w r3, r3, lsl #12 80208c4: f04f 5580 mov.w r5, #268435456 ; 0x10000000 80208c8: ea45 1313 orr.w r3, r5, r3, lsr #4 80208cc: ea43 6312 orr.w r3, r3, r2, lsr #24 80208d0: ea4f 2202 mov.w r2, r2, lsl #8 80208d4: ea45 1511 orr.w r5, r5, r1, lsr #4 80208d8: ea45 6510 orr.w r5, r5, r0, lsr #24 80208dc: ea4f 2600 mov.w r6, r0, lsl #8 80208e0: f00e 4100 and.w r1, lr, #2147483648 ; 0x80000000 80208e4: 429d cmp r5, r3 80208e6: bf08 it eq 80208e8: 4296 cmpeq r6, r2 80208ea: f144 04fd adc.w r4, r4, #253 ; 0xfd 80208ee: f504 7440 add.w r4, r4, #768 ; 0x300 80208f2: d202 bcs.n 80208fa <__aeabi_ddiv+0x6e> 80208f4: 085b lsrs r3, r3, #1 80208f6: ea4f 0232 mov.w r2, r2, rrx 80208fa: 1ab6 subs r6, r6, r2 80208fc: eb65 0503 sbc.w r5, r5, r3 8020900: 085b lsrs r3, r3, #1 8020902: ea4f 0232 mov.w r2, r2, rrx 8020906: f44f 1080 mov.w r0, #1048576 ; 0x100000 802090a: f44f 2c00 mov.w ip, #524288 ; 0x80000 802090e: ebb6 0e02 subs.w lr, r6, r2 8020912: eb75 0e03 sbcs.w lr, r5, r3 8020916: bf22 ittt cs 8020918: 1ab6 subcs r6, r6, r2 802091a: 4675 movcs r5, lr 802091c: ea40 000c orrcs.w r0, r0, ip 8020920: 085b lsrs r3, r3, #1 8020922: ea4f 0232 mov.w r2, r2, rrx 8020926: ebb6 0e02 subs.w lr, r6, r2 802092a: eb75 0e03 sbcs.w lr, r5, r3 802092e: bf22 ittt cs 8020930: 1ab6 subcs r6, r6, r2 8020932: 4675 movcs r5, lr 8020934: ea40 005c orrcs.w r0, r0, ip, lsr #1 8020938: 085b lsrs r3, r3, #1 802093a: ea4f 0232 mov.w r2, r2, rrx 802093e: ebb6 0e02 subs.w lr, r6, r2 8020942: eb75 0e03 sbcs.w lr, r5, r3 8020946: bf22 ittt cs 8020948: 1ab6 subcs r6, r6, r2 802094a: 4675 movcs r5, lr 802094c: ea40 009c orrcs.w r0, r0, ip, lsr #2 8020950: 085b lsrs r3, r3, #1 8020952: ea4f 0232 mov.w r2, r2, rrx 8020956: ebb6 0e02 subs.w lr, r6, r2 802095a: eb75 0e03 sbcs.w lr, r5, r3 802095e: bf22 ittt cs 8020960: 1ab6 subcs r6, r6, r2 8020962: 4675 movcs r5, lr 8020964: ea40 00dc orrcs.w r0, r0, ip, lsr #3 8020968: ea55 0e06 orrs.w lr, r5, r6 802096c: d018 beq.n 80209a0 <__aeabi_ddiv+0x114> 802096e: ea4f 1505 mov.w r5, r5, lsl #4 8020972: ea45 7516 orr.w r5, r5, r6, lsr #28 8020976: ea4f 1606 mov.w r6, r6, lsl #4 802097a: ea4f 03c3 mov.w r3, r3, lsl #3 802097e: ea43 7352 orr.w r3, r3, r2, lsr #29 8020982: ea4f 02c2 mov.w r2, r2, lsl #3 8020986: ea5f 1c1c movs.w ip, ip, lsr #4 802098a: d1c0 bne.n 802090e <__aeabi_ddiv+0x82> 802098c: f411 1f80 tst.w r1, #1048576 ; 0x100000 8020990: d10b bne.n 80209aa <__aeabi_ddiv+0x11e> 8020992: ea41 0100 orr.w r1, r1, r0 8020996: f04f 0000 mov.w r0, #0 802099a: f04f 4c00 mov.w ip, #2147483648 ; 0x80000000 802099e: e7b6 b.n 802090e <__aeabi_ddiv+0x82> 80209a0: f411 1f80 tst.w r1, #1048576 ; 0x100000 80209a4: bf04 itt eq 80209a6: 4301 orreq r1, r0 80209a8: 2000 moveq r0, #0 80209aa: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd 80209ae: bf88 it hi 80209b0: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700 80209b4: f63f aeaf bhi.w 8020716 <__aeabi_dmul+0xde> 80209b8: ebb5 0c03 subs.w ip, r5, r3 80209bc: bf04 itt eq 80209be: ebb6 0c02 subseq.w ip, r6, r2 80209c2: ea5f 0c50 movseq.w ip, r0, lsr #1 80209c6: f150 0000 adcs.w r0, r0, #0 80209ca: eb41 5104 adc.w r1, r1, r4, lsl #20 80209ce: bd70 pop {r4, r5, r6, pc} 80209d0: f00e 4e00 and.w lr, lr, #2147483648 ; 0x80000000 80209d4: ea4e 3111 orr.w r1, lr, r1, lsr #12 80209d8: eb14 045c adds.w r4, r4, ip, lsr #1 80209dc: bfc2 ittt gt 80209de: ebd4 050c rsbsgt r5, r4, ip 80209e2: ea41 5104 orrgt.w r1, r1, r4, lsl #20 80209e6: bd70 popgt {r4, r5, r6, pc} 80209e8: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 80209ec: f04f 0e00 mov.w lr, #0 80209f0: 3c01 subs r4, #1 80209f2: e690 b.n 8020716 <__aeabi_dmul+0xde> 80209f4: ea45 0e06 orr.w lr, r5, r6 80209f8: e68d b.n 8020716 <__aeabi_dmul+0xde> 80209fa: ea0c 5513 and.w r5, ip, r3, lsr #20 80209fe: ea94 0f0c teq r4, ip 8020a02: bf08 it eq 8020a04: ea95 0f0c teqeq r5, ip 8020a08: f43f af3b beq.w 8020882 <__aeabi_dmul+0x24a> 8020a0c: ea94 0f0c teq r4, ip 8020a10: d10a bne.n 8020a28 <__aeabi_ddiv+0x19c> 8020a12: ea50 3401 orrs.w r4, r0, r1, lsl #12 8020a16: f47f af34 bne.w 8020882 <__aeabi_dmul+0x24a> 8020a1a: ea95 0f0c teq r5, ip 8020a1e: f47f af25 bne.w 802086c <__aeabi_dmul+0x234> 8020a22: 4610 mov r0, r2 8020a24: 4619 mov r1, r3 8020a26: e72c b.n 8020882 <__aeabi_dmul+0x24a> 8020a28: ea95 0f0c teq r5, ip 8020a2c: d106 bne.n 8020a3c <__aeabi_ddiv+0x1b0> 8020a2e: ea52 3503 orrs.w r5, r2, r3, lsl #12 8020a32: f43f aefd beq.w 8020830 <__aeabi_dmul+0x1f8> 8020a36: 4610 mov r0, r2 8020a38: 4619 mov r1, r3 8020a3a: e722 b.n 8020882 <__aeabi_dmul+0x24a> 8020a3c: ea50 0641 orrs.w r6, r0, r1, lsl #1 8020a40: bf18 it ne 8020a42: ea52 0643 orrsne.w r6, r2, r3, lsl #1 8020a46: f47f aec5 bne.w 80207d4 <__aeabi_dmul+0x19c> 8020a4a: ea50 0441 orrs.w r4, r0, r1, lsl #1 8020a4e: f47f af0d bne.w 802086c <__aeabi_dmul+0x234> 8020a52: ea52 0543 orrs.w r5, r2, r3, lsl #1 8020a56: f47f aeeb bne.w 8020830 <__aeabi_dmul+0x1f8> 8020a5a: e712 b.n 8020882 <__aeabi_dmul+0x24a> 08020a5c <__gedf2>: 8020a5c: f04f 3cff mov.w ip, #4294967295 8020a60: e006 b.n 8020a70 <__cmpdf2+0x4> 8020a62: bf00 nop 08020a64 <__ledf2>: 8020a64: f04f 0c01 mov.w ip, #1 8020a68: e002 b.n 8020a70 <__cmpdf2+0x4> 8020a6a: bf00 nop 08020a6c <__cmpdf2>: 8020a6c: f04f 0c01 mov.w ip, #1 8020a70: f84d cd04 str.w ip, [sp, #-4]! 8020a74: ea4f 0c41 mov.w ip, r1, lsl #1 8020a78: ea7f 5c6c mvns.w ip, ip, asr #21 8020a7c: ea4f 0c43 mov.w ip, r3, lsl #1 8020a80: bf18 it ne 8020a82: ea7f 5c6c mvnsne.w ip, ip, asr #21 8020a86: d01b beq.n 8020ac0 <__cmpdf2+0x54> 8020a88: b001 add sp, #4 8020a8a: ea50 0c41 orrs.w ip, r0, r1, lsl #1 8020a8e: bf0c ite eq 8020a90: ea52 0c43 orrseq.w ip, r2, r3, lsl #1 8020a94: ea91 0f03 teqne r1, r3 8020a98: bf02 ittt eq 8020a9a: ea90 0f02 teqeq r0, r2 8020a9e: 2000 moveq r0, #0 8020aa0: 4770 bxeq lr 8020aa2: f110 0f00 cmn.w r0, #0 8020aa6: ea91 0f03 teq r1, r3 8020aaa: bf58 it pl 8020aac: 4299 cmppl r1, r3 8020aae: bf08 it eq 8020ab0: 4290 cmpeq r0, r2 8020ab2: bf2c ite cs 8020ab4: 17d8 asrcs r0, r3, #31 8020ab6: ea6f 70e3 mvncc.w r0, r3, asr #31 8020aba: f040 0001 orr.w r0, r0, #1 8020abe: 4770 bx lr 8020ac0: ea4f 0c41 mov.w ip, r1, lsl #1 8020ac4: ea7f 5c6c mvns.w ip, ip, asr #21 8020ac8: d102 bne.n 8020ad0 <__cmpdf2+0x64> 8020aca: ea50 3c01 orrs.w ip, r0, r1, lsl #12 8020ace: d107 bne.n 8020ae0 <__cmpdf2+0x74> 8020ad0: ea4f 0c43 mov.w ip, r3, lsl #1 8020ad4: ea7f 5c6c mvns.w ip, ip, asr #21 8020ad8: d1d6 bne.n 8020a88 <__cmpdf2+0x1c> 8020ada: ea52 3c03 orrs.w ip, r2, r3, lsl #12 8020ade: d0d3 beq.n 8020a88 <__cmpdf2+0x1c> 8020ae0: f85d 0b04 ldr.w r0, [sp], #4 8020ae4: 4770 bx lr 8020ae6: bf00 nop 08020ae8 <__aeabi_cdrcmple>: 8020ae8: 4684 mov ip, r0 8020aea: 4610 mov r0, r2 8020aec: 4662 mov r2, ip 8020aee: 468c mov ip, r1 8020af0: 4619 mov r1, r3 8020af2: 4663 mov r3, ip 8020af4: e000 b.n 8020af8 <__aeabi_cdcmpeq> 8020af6: bf00 nop 08020af8 <__aeabi_cdcmpeq>: 8020af8: b501 push {r0, lr} 8020afa: f7ff ffb7 bl 8020a6c <__cmpdf2> 8020afe: 2800 cmp r0, #0 8020b00: bf48 it mi 8020b02: f110 0f00 cmnmi.w r0, #0 8020b06: bd01 pop {r0, pc} 08020b08 <__aeabi_dcmpeq>: 8020b08: f84d ed08 str.w lr, [sp, #-8]! 8020b0c: f7ff fff4 bl 8020af8 <__aeabi_cdcmpeq> 8020b10: bf0c ite eq 8020b12: 2001 moveq r0, #1 8020b14: 2000 movne r0, #0 8020b16: f85d fb08 ldr.w pc, [sp], #8 8020b1a: bf00 nop 08020b1c <__aeabi_dcmplt>: 8020b1c: f84d ed08 str.w lr, [sp, #-8]! 8020b20: f7ff ffea bl 8020af8 <__aeabi_cdcmpeq> 8020b24: bf34 ite cc 8020b26: 2001 movcc r0, #1 8020b28: 2000 movcs r0, #0 8020b2a: f85d fb08 ldr.w pc, [sp], #8 8020b2e: bf00 nop 08020b30 <__aeabi_dcmple>: 8020b30: f84d ed08 str.w lr, [sp, #-8]! 8020b34: f7ff ffe0 bl 8020af8 <__aeabi_cdcmpeq> 8020b38: bf94 ite ls 8020b3a: 2001 movls r0, #1 8020b3c: 2000 movhi r0, #0 8020b3e: f85d fb08 ldr.w pc, [sp], #8 8020b42: bf00 nop 08020b44 <__aeabi_dcmpge>: 8020b44: f84d ed08 str.w lr, [sp, #-8]! 8020b48: f7ff ffce bl 8020ae8 <__aeabi_cdrcmple> 8020b4c: bf94 ite ls 8020b4e: 2001 movls r0, #1 8020b50: 2000 movhi r0, #0 8020b52: f85d fb08 ldr.w pc, [sp], #8 8020b56: bf00 nop 08020b58 <__aeabi_dcmpgt>: 8020b58: f84d ed08 str.w lr, [sp, #-8]! 8020b5c: f7ff ffc4 bl 8020ae8 <__aeabi_cdrcmple> 8020b60: bf34 ite cc 8020b62: 2001 movcc r0, #1 8020b64: 2000 movcs r0, #0 8020b66: f85d fb08 ldr.w pc, [sp], #8 8020b6a: bf00 nop 08020b6c <__aeabi_d2iz>: 8020b6c: ea4f 0241 mov.w r2, r1, lsl #1 8020b70: f512 1200 adds.w r2, r2, #2097152 ; 0x200000 8020b74: d215 bcs.n 8020ba2 <__aeabi_d2iz+0x36> 8020b76: d511 bpl.n 8020b9c <__aeabi_d2iz+0x30> 8020b78: f46f 7378 mvn.w r3, #992 ; 0x3e0 8020b7c: ebb3 5262 subs.w r2, r3, r2, asr #21 8020b80: d912 bls.n 8020ba8 <__aeabi_d2iz+0x3c> 8020b82: ea4f 23c1 mov.w r3, r1, lsl #11 8020b86: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 8020b8a: ea43 5350 orr.w r3, r3, r0, lsr #21 8020b8e: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 8020b92: fa23 f002 lsr.w r0, r3, r2 8020b96: bf18 it ne 8020b98: 4240 negne r0, r0 8020b9a: 4770 bx lr 8020b9c: f04f 0000 mov.w r0, #0 8020ba0: 4770 bx lr 8020ba2: ea50 3001 orrs.w r0, r0, r1, lsl #12 8020ba6: d105 bne.n 8020bb4 <__aeabi_d2iz+0x48> 8020ba8: f011 4000 ands.w r0, r1, #2147483648 ; 0x80000000 8020bac: bf08 it eq 8020bae: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000 8020bb2: 4770 bx lr 8020bb4: f04f 0000 mov.w r0, #0 8020bb8: 4770 bx lr 8020bba: bf00 nop 08020bbc <__aeabi_d2uiz>: 8020bbc: 004a lsls r2, r1, #1 8020bbe: d211 bcs.n 8020be4 <__aeabi_d2uiz+0x28> 8020bc0: f512 1200 adds.w r2, r2, #2097152 ; 0x200000 8020bc4: d211 bcs.n 8020bea <__aeabi_d2uiz+0x2e> 8020bc6: d50d bpl.n 8020be4 <__aeabi_d2uiz+0x28> 8020bc8: f46f 7378 mvn.w r3, #992 ; 0x3e0 8020bcc: ebb3 5262 subs.w r2, r3, r2, asr #21 8020bd0: d40e bmi.n 8020bf0 <__aeabi_d2uiz+0x34> 8020bd2: ea4f 23c1 mov.w r3, r1, lsl #11 8020bd6: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 8020bda: ea43 5350 orr.w r3, r3, r0, lsr #21 8020bde: fa23 f002 lsr.w r0, r3, r2 8020be2: 4770 bx lr 8020be4: f04f 0000 mov.w r0, #0 8020be8: 4770 bx lr 8020bea: ea50 3001 orrs.w r0, r0, r1, lsl #12 8020bee: d102 bne.n 8020bf6 <__aeabi_d2uiz+0x3a> 8020bf0: f04f 30ff mov.w r0, #4294967295 8020bf4: 4770 bx lr 8020bf6: f04f 0000 mov.w r0, #0 8020bfa: 4770 bx lr 08020bfc <__aeabi_d2f>: 8020bfc: ea4f 0241 mov.w r2, r1, lsl #1 8020c00: f1b2 43e0 subs.w r3, r2, #1879048192 ; 0x70000000 8020c04: bf24 itt cs 8020c06: f5b3 1c00 subscs.w ip, r3, #2097152 ; 0x200000 8020c0a: f1dc 5cfe rsbscs ip, ip, #532676608 ; 0x1fc00000 8020c0e: d90d bls.n 8020c2c <__aeabi_d2f+0x30> 8020c10: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000 8020c14: ea4f 02c0 mov.w r2, r0, lsl #3 8020c18: ea4c 7050 orr.w r0, ip, r0, lsr #29 8020c1c: f1b2 4f00 cmp.w r2, #2147483648 ; 0x80000000 8020c20: eb40 0083 adc.w r0, r0, r3, lsl #2 8020c24: bf08 it eq 8020c26: f020 0001 biceq.w r0, r0, #1 8020c2a: 4770 bx lr 8020c2c: f011 4f80 tst.w r1, #1073741824 ; 0x40000000 8020c30: d121 bne.n 8020c76 <__aeabi_d2f+0x7a> 8020c32: f113 7238 adds.w r2, r3, #48234496 ; 0x2e00000 8020c36: bfbc itt lt 8020c38: f001 4000 andlt.w r0, r1, #2147483648 ; 0x80000000 8020c3c: 4770 bxlt lr 8020c3e: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020c42: ea4f 5252 mov.w r2, r2, lsr #21 8020c46: f1c2 0218 rsb r2, r2, #24 8020c4a: f1c2 0c20 rsb ip, r2, #32 8020c4e: fa10 f30c lsls.w r3, r0, ip 8020c52: fa20 f002 lsr.w r0, r0, r2 8020c56: bf18 it ne 8020c58: f040 0001 orrne.w r0, r0, #1 8020c5c: ea4f 23c1 mov.w r3, r1, lsl #11 8020c60: ea4f 23d3 mov.w r3, r3, lsr #11 8020c64: fa03 fc0c lsl.w ip, r3, ip 8020c68: ea40 000c orr.w r0, r0, ip 8020c6c: fa23 f302 lsr.w r3, r3, r2 8020c70: ea4f 0343 mov.w r3, r3, lsl #1 8020c74: e7cc b.n 8020c10 <__aeabi_d2f+0x14> 8020c76: ea7f 5362 mvns.w r3, r2, asr #21 8020c7a: d107 bne.n 8020c8c <__aeabi_d2f+0x90> 8020c7c: ea50 3301 orrs.w r3, r0, r1, lsl #12 8020c80: bf1e ittt ne 8020c82: f04f 40fe movne.w r0, #2130706432 ; 0x7f000000 8020c86: f440 0040 orrne.w r0, r0, #12582912 ; 0xc00000 8020c8a: 4770 bxne lr 8020c8c: f001 4000 and.w r0, r1, #2147483648 ; 0x80000000 8020c90: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000 8020c94: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020c98: 4770 bx lr 8020c9a: bf00 nop 08020c9c <__aeabi_frsub>: 8020c9c: f080 4000 eor.w r0, r0, #2147483648 ; 0x80000000 8020ca0: e002 b.n 8020ca8 <__addsf3> 8020ca2: bf00 nop 08020ca4 <__aeabi_fsub>: 8020ca4: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000 08020ca8 <__addsf3>: 8020ca8: 0042 lsls r2, r0, #1 8020caa: bf1f itttt ne 8020cac: ea5f 0341 movsne.w r3, r1, lsl #1 8020cb0: ea92 0f03 teqne r2, r3 8020cb4: ea7f 6c22 mvnsne.w ip, r2, asr #24 8020cb8: ea7f 6c23 mvnsne.w ip, r3, asr #24 8020cbc: d06a beq.n 8020d94 <__addsf3+0xec> 8020cbe: ea4f 6212 mov.w r2, r2, lsr #24 8020cc2: ebd2 6313 rsbs r3, r2, r3, lsr #24 8020cc6: bfc1 itttt gt 8020cc8: 18d2 addgt r2, r2, r3 8020cca: 4041 eorgt r1, r0 8020ccc: 4048 eorgt r0, r1 8020cce: 4041 eorgt r1, r0 8020cd0: bfb8 it lt 8020cd2: 425b neglt r3, r3 8020cd4: 2b19 cmp r3, #25 8020cd6: bf88 it hi 8020cd8: 4770 bxhi lr 8020cda: f010 4f00 tst.w r0, #2147483648 ; 0x80000000 8020cde: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020ce2: f020 407f bic.w r0, r0, #4278190080 ; 0xff000000 8020ce6: bf18 it ne 8020ce8: 4240 negne r0, r0 8020cea: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 8020cee: f441 0100 orr.w r1, r1, #8388608 ; 0x800000 8020cf2: f021 417f bic.w r1, r1, #4278190080 ; 0xff000000 8020cf6: bf18 it ne 8020cf8: 4249 negne r1, r1 8020cfa: ea92 0f03 teq r2, r3 8020cfe: d03f beq.n 8020d80 <__addsf3+0xd8> 8020d00: f1a2 0201 sub.w r2, r2, #1 8020d04: fa41 fc03 asr.w ip, r1, r3 8020d08: eb10 000c adds.w r0, r0, ip 8020d0c: f1c3 0320 rsb r3, r3, #32 8020d10: fa01 f103 lsl.w r1, r1, r3 8020d14: f000 4300 and.w r3, r0, #2147483648 ; 0x80000000 8020d18: d502 bpl.n 8020d20 <__addsf3+0x78> 8020d1a: 4249 negs r1, r1 8020d1c: eb60 0040 sbc.w r0, r0, r0, lsl #1 8020d20: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 8020d24: d313 bcc.n 8020d4e <__addsf3+0xa6> 8020d26: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 8020d2a: d306 bcc.n 8020d3a <__addsf3+0x92> 8020d2c: 0840 lsrs r0, r0, #1 8020d2e: ea4f 0131 mov.w r1, r1, rrx 8020d32: f102 0201 add.w r2, r2, #1 8020d36: 2afe cmp r2, #254 ; 0xfe 8020d38: d251 bcs.n 8020dde <__addsf3+0x136> 8020d3a: f1b1 4f00 cmp.w r1, #2147483648 ; 0x80000000 8020d3e: eb40 50c2 adc.w r0, r0, r2, lsl #23 8020d42: bf08 it eq 8020d44: f020 0001 biceq.w r0, r0, #1 8020d48: ea40 0003 orr.w r0, r0, r3 8020d4c: 4770 bx lr 8020d4e: 0049 lsls r1, r1, #1 8020d50: eb40 0000 adc.w r0, r0, r0 8020d54: f410 0f00 tst.w r0, #8388608 ; 0x800000 8020d58: f1a2 0201 sub.w r2, r2, #1 8020d5c: d1ed bne.n 8020d3a <__addsf3+0x92> 8020d5e: fab0 fc80 clz ip, r0 8020d62: f1ac 0c08 sub.w ip, ip, #8 8020d66: ebb2 020c subs.w r2, r2, ip 8020d6a: fa00 f00c lsl.w r0, r0, ip 8020d6e: bfaa itet ge 8020d70: eb00 50c2 addge.w r0, r0, r2, lsl #23 8020d74: 4252 neglt r2, r2 8020d76: 4318 orrge r0, r3 8020d78: bfbc itt lt 8020d7a: 40d0 lsrlt r0, r2 8020d7c: 4318 orrlt r0, r3 8020d7e: 4770 bx lr 8020d80: f092 0f00 teq r2, #0 8020d84: f481 0100 eor.w r1, r1, #8388608 ; 0x800000 8020d88: bf06 itte eq 8020d8a: f480 0000 eoreq.w r0, r0, #8388608 ; 0x800000 8020d8e: 3201 addeq r2, #1 8020d90: 3b01 subne r3, #1 8020d92: e7b5 b.n 8020d00 <__addsf3+0x58> 8020d94: ea4f 0341 mov.w r3, r1, lsl #1 8020d98: ea7f 6c22 mvns.w ip, r2, asr #24 8020d9c: bf18 it ne 8020d9e: ea7f 6c23 mvnsne.w ip, r3, asr #24 8020da2: d021 beq.n 8020de8 <__addsf3+0x140> 8020da4: ea92 0f03 teq r2, r3 8020da8: d004 beq.n 8020db4 <__addsf3+0x10c> 8020daa: f092 0f00 teq r2, #0 8020dae: bf08 it eq 8020db0: 4608 moveq r0, r1 8020db2: 4770 bx lr 8020db4: ea90 0f01 teq r0, r1 8020db8: bf1c itt ne 8020dba: 2000 movne r0, #0 8020dbc: 4770 bxne lr 8020dbe: f012 4f7f tst.w r2, #4278190080 ; 0xff000000 8020dc2: d104 bne.n 8020dce <__addsf3+0x126> 8020dc4: 0040 lsls r0, r0, #1 8020dc6: bf28 it cs 8020dc8: f040 4000 orrcs.w r0, r0, #2147483648 ; 0x80000000 8020dcc: 4770 bx lr 8020dce: f112 7200 adds.w r2, r2, #33554432 ; 0x2000000 8020dd2: bf3c itt cc 8020dd4: f500 0000 addcc.w r0, r0, #8388608 ; 0x800000 8020dd8: 4770 bxcc lr 8020dda: f000 4300 and.w r3, r0, #2147483648 ; 0x80000000 8020dde: f043 40fe orr.w r0, r3, #2130706432 ; 0x7f000000 8020de2: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020de6: 4770 bx lr 8020de8: ea7f 6222 mvns.w r2, r2, asr #24 8020dec: bf16 itet ne 8020dee: 4608 movne r0, r1 8020df0: ea7f 6323 mvnseq.w r3, r3, asr #24 8020df4: 4601 movne r1, r0 8020df6: 0242 lsls r2, r0, #9 8020df8: bf06 itte eq 8020dfa: ea5f 2341 movseq.w r3, r1, lsl #9 8020dfe: ea90 0f01 teqeq r0, r1 8020e02: f440 0080 orrne.w r0, r0, #4194304 ; 0x400000 8020e06: 4770 bx lr 08020e08 <__aeabi_ui2f>: 8020e08: f04f 0300 mov.w r3, #0 8020e0c: e004 b.n 8020e18 <__aeabi_i2f+0x8> 8020e0e: bf00 nop 08020e10 <__aeabi_i2f>: 8020e10: f010 4300 ands.w r3, r0, #2147483648 ; 0x80000000 8020e14: bf48 it mi 8020e16: 4240 negmi r0, r0 8020e18: ea5f 0c00 movs.w ip, r0 8020e1c: bf08 it eq 8020e1e: 4770 bxeq lr 8020e20: f043 4396 orr.w r3, r3, #1258291200 ; 0x4b000000 8020e24: 4601 mov r1, r0 8020e26: f04f 0000 mov.w r0, #0 8020e2a: e01c b.n 8020e66 <__aeabi_l2f+0x2a> 08020e2c <__aeabi_ul2f>: 8020e2c: ea50 0201 orrs.w r2, r0, r1 8020e30: bf08 it eq 8020e32: 4770 bxeq lr 8020e34: f04f 0300 mov.w r3, #0 8020e38: e00a b.n 8020e50 <__aeabi_l2f+0x14> 8020e3a: bf00 nop 08020e3c <__aeabi_l2f>: 8020e3c: ea50 0201 orrs.w r2, r0, r1 8020e40: bf08 it eq 8020e42: 4770 bxeq lr 8020e44: f011 4300 ands.w r3, r1, #2147483648 ; 0x80000000 8020e48: d502 bpl.n 8020e50 <__aeabi_l2f+0x14> 8020e4a: 4240 negs r0, r0 8020e4c: eb61 0141 sbc.w r1, r1, r1, lsl #1 8020e50: ea5f 0c01 movs.w ip, r1 8020e54: bf02 ittt eq 8020e56: 4684 moveq ip, r0 8020e58: 4601 moveq r1, r0 8020e5a: 2000 moveq r0, #0 8020e5c: f043 43b6 orr.w r3, r3, #1526726656 ; 0x5b000000 8020e60: bf08 it eq 8020e62: f1a3 5380 subeq.w r3, r3, #268435456 ; 0x10000000 8020e66: f5a3 0300 sub.w r3, r3, #8388608 ; 0x800000 8020e6a: fabc f28c clz r2, ip 8020e6e: 3a08 subs r2, #8 8020e70: eba3 53c2 sub.w r3, r3, r2, lsl #23 8020e74: db10 blt.n 8020e98 <__aeabi_l2f+0x5c> 8020e76: fa01 fc02 lsl.w ip, r1, r2 8020e7a: 4463 add r3, ip 8020e7c: fa00 fc02 lsl.w ip, r0, r2 8020e80: f1c2 0220 rsb r2, r2, #32 8020e84: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000 8020e88: fa20 f202 lsr.w r2, r0, r2 8020e8c: eb43 0002 adc.w r0, r3, r2 8020e90: bf08 it eq 8020e92: f020 0001 biceq.w r0, r0, #1 8020e96: 4770 bx lr 8020e98: f102 0220 add.w r2, r2, #32 8020e9c: fa01 fc02 lsl.w ip, r1, r2 8020ea0: f1c2 0220 rsb r2, r2, #32 8020ea4: ea50 004c orrs.w r0, r0, ip, lsl #1 8020ea8: fa21 f202 lsr.w r2, r1, r2 8020eac: eb43 0002 adc.w r0, r3, r2 8020eb0: bf08 it eq 8020eb2: ea20 70dc biceq.w r0, r0, ip, lsr #31 8020eb6: 4770 bx lr 08020eb8 <__aeabi_fmul>: 8020eb8: f04f 0cff mov.w ip, #255 ; 0xff 8020ebc: ea1c 52d0 ands.w r2, ip, r0, lsr #23 8020ec0: bf1e ittt ne 8020ec2: ea1c 53d1 andsne.w r3, ip, r1, lsr #23 8020ec6: ea92 0f0c teqne r2, ip 8020eca: ea93 0f0c teqne r3, ip 8020ece: d06f beq.n 8020fb0 <__aeabi_fmul+0xf8> 8020ed0: 441a add r2, r3 8020ed2: ea80 0c01 eor.w ip, r0, r1 8020ed6: 0240 lsls r0, r0, #9 8020ed8: bf18 it ne 8020eda: ea5f 2141 movsne.w r1, r1, lsl #9 8020ede: d01e beq.n 8020f1e <__aeabi_fmul+0x66> 8020ee0: f04f 6300 mov.w r3, #134217728 ; 0x8000000 8020ee4: ea43 1050 orr.w r0, r3, r0, lsr #5 8020ee8: ea43 1151 orr.w r1, r3, r1, lsr #5 8020eec: fba0 3101 umull r3, r1, r0, r1 8020ef0: f00c 4000 and.w r0, ip, #2147483648 ; 0x80000000 8020ef4: f5b1 0f00 cmp.w r1, #8388608 ; 0x800000 8020ef8: bf3e ittt cc 8020efa: 0049 lslcc r1, r1, #1 8020efc: ea41 71d3 orrcc.w r1, r1, r3, lsr #31 8020f00: 005b lslcc r3, r3, #1 8020f02: ea40 0001 orr.w r0, r0, r1 8020f06: f162 027f sbc.w r2, r2, #127 ; 0x7f 8020f0a: 2afd cmp r2, #253 ; 0xfd 8020f0c: d81d bhi.n 8020f4a <__aeabi_fmul+0x92> 8020f0e: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 8020f12: eb40 50c2 adc.w r0, r0, r2, lsl #23 8020f16: bf08 it eq 8020f18: f020 0001 biceq.w r0, r0, #1 8020f1c: 4770 bx lr 8020f1e: f090 0f00 teq r0, #0 8020f22: f00c 4c00 and.w ip, ip, #2147483648 ; 0x80000000 8020f26: bf08 it eq 8020f28: 0249 lsleq r1, r1, #9 8020f2a: ea4c 2050 orr.w r0, ip, r0, lsr #9 8020f2e: ea40 2051 orr.w r0, r0, r1, lsr #9 8020f32: 3a7f subs r2, #127 ; 0x7f 8020f34: bfc2 ittt gt 8020f36: f1d2 03ff rsbsgt r3, r2, #255 ; 0xff 8020f3a: ea40 50c2 orrgt.w r0, r0, r2, lsl #23 8020f3e: 4770 bxgt lr 8020f40: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020f44: f04f 0300 mov.w r3, #0 8020f48: 3a01 subs r2, #1 8020f4a: dc5d bgt.n 8021008 <__aeabi_fmul+0x150> 8020f4c: f112 0f19 cmn.w r2, #25 8020f50: bfdc itt le 8020f52: f000 4000 andle.w r0, r0, #2147483648 ; 0x80000000 8020f56: 4770 bxle lr 8020f58: f1c2 0200 rsb r2, r2, #0 8020f5c: 0041 lsls r1, r0, #1 8020f5e: fa21 f102 lsr.w r1, r1, r2 8020f62: f1c2 0220 rsb r2, r2, #32 8020f66: fa00 fc02 lsl.w ip, r0, r2 8020f6a: ea5f 0031 movs.w r0, r1, rrx 8020f6e: f140 0000 adc.w r0, r0, #0 8020f72: ea53 034c orrs.w r3, r3, ip, lsl #1 8020f76: bf08 it eq 8020f78: ea20 70dc biceq.w r0, r0, ip, lsr #31 8020f7c: 4770 bx lr 8020f7e: f092 0f00 teq r2, #0 8020f82: f000 4c00 and.w ip, r0, #2147483648 ; 0x80000000 8020f86: bf02 ittt eq 8020f88: 0040 lsleq r0, r0, #1 8020f8a: f410 0f00 tsteq.w r0, #8388608 ; 0x800000 8020f8e: 3a01 subeq r2, #1 8020f90: d0f9 beq.n 8020f86 <__aeabi_fmul+0xce> 8020f92: ea40 000c orr.w r0, r0, ip 8020f96: f093 0f00 teq r3, #0 8020f9a: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000 8020f9e: bf02 ittt eq 8020fa0: 0049 lsleq r1, r1, #1 8020fa2: f411 0f00 tsteq.w r1, #8388608 ; 0x800000 8020fa6: 3b01 subeq r3, #1 8020fa8: d0f9 beq.n 8020f9e <__aeabi_fmul+0xe6> 8020faa: ea41 010c orr.w r1, r1, ip 8020fae: e78f b.n 8020ed0 <__aeabi_fmul+0x18> 8020fb0: ea0c 53d1 and.w r3, ip, r1, lsr #23 8020fb4: ea92 0f0c teq r2, ip 8020fb8: bf18 it ne 8020fba: ea93 0f0c teqne r3, ip 8020fbe: d00a beq.n 8020fd6 <__aeabi_fmul+0x11e> 8020fc0: f030 4c00 bics.w ip, r0, #2147483648 ; 0x80000000 8020fc4: bf18 it ne 8020fc6: f031 4c00 bicsne.w ip, r1, #2147483648 ; 0x80000000 8020fca: d1d8 bne.n 8020f7e <__aeabi_fmul+0xc6> 8020fcc: ea80 0001 eor.w r0, r0, r1 8020fd0: f000 4000 and.w r0, r0, #2147483648 ; 0x80000000 8020fd4: 4770 bx lr 8020fd6: f090 0f00 teq r0, #0 8020fda: bf17 itett ne 8020fdc: f090 4f00 teqne r0, #2147483648 ; 0x80000000 8020fe0: 4608 moveq r0, r1 8020fe2: f091 0f00 teqne r1, #0 8020fe6: f091 4f00 teqne r1, #2147483648 ; 0x80000000 8020fea: d014 beq.n 8021016 <__aeabi_fmul+0x15e> 8020fec: ea92 0f0c teq r2, ip 8020ff0: d101 bne.n 8020ff6 <__aeabi_fmul+0x13e> 8020ff2: 0242 lsls r2, r0, #9 8020ff4: d10f bne.n 8021016 <__aeabi_fmul+0x15e> 8020ff6: ea93 0f0c teq r3, ip 8020ffa: d103 bne.n 8021004 <__aeabi_fmul+0x14c> 8020ffc: 024b lsls r3, r1, #9 8020ffe: bf18 it ne 8021000: 4608 movne r0, r1 8021002: d108 bne.n 8021016 <__aeabi_fmul+0x15e> 8021004: ea80 0001 eor.w r0, r0, r1 8021008: f000 4000 and.w r0, r0, #2147483648 ; 0x80000000 802100c: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000 8021010: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8021014: 4770 bx lr 8021016: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000 802101a: f440 0040 orr.w r0, r0, #12582912 ; 0xc00000 802101e: 4770 bx lr 08021020 <__aeabi_fdiv>: 8021020: f04f 0cff mov.w ip, #255 ; 0xff 8021024: ea1c 52d0 ands.w r2, ip, r0, lsr #23 8021028: bf1e ittt ne 802102a: ea1c 53d1 andsne.w r3, ip, r1, lsr #23 802102e: ea92 0f0c teqne r2, ip 8021032: ea93 0f0c teqne r3, ip 8021036: d069 beq.n 802110c <__aeabi_fdiv+0xec> 8021038: eba2 0203 sub.w r2, r2, r3 802103c: ea80 0c01 eor.w ip, r0, r1 8021040: 0249 lsls r1, r1, #9 8021042: ea4f 2040 mov.w r0, r0, lsl #9 8021046: d037 beq.n 80210b8 <__aeabi_fdiv+0x98> 8021048: f04f 5380 mov.w r3, #268435456 ; 0x10000000 802104c: ea43 1111 orr.w r1, r3, r1, lsr #4 8021050: ea43 1310 orr.w r3, r3, r0, lsr #4 8021054: f00c 4000 and.w r0, ip, #2147483648 ; 0x80000000 8021058: 428b cmp r3, r1 802105a: bf38 it cc 802105c: 005b lslcc r3, r3, #1 802105e: f142 027d adc.w r2, r2, #125 ; 0x7d 8021062: f44f 0c00 mov.w ip, #8388608 ; 0x800000 8021066: 428b cmp r3, r1 8021068: bf24 itt cs 802106a: 1a5b subcs r3, r3, r1 802106c: ea40 000c orrcs.w r0, r0, ip 8021070: ebb3 0f51 cmp.w r3, r1, lsr #1 8021074: bf24 itt cs 8021076: eba3 0351 subcs.w r3, r3, r1, lsr #1 802107a: ea40 005c orrcs.w r0, r0, ip, lsr #1 802107e: ebb3 0f91 cmp.w r3, r1, lsr #2 8021082: bf24 itt cs 8021084: eba3 0391 subcs.w r3, r3, r1, lsr #2 8021088: ea40 009c orrcs.w r0, r0, ip, lsr #2 802108c: ebb3 0fd1 cmp.w r3, r1, lsr #3 8021090: bf24 itt cs 8021092: eba3 03d1 subcs.w r3, r3, r1, lsr #3 8021096: ea40 00dc orrcs.w r0, r0, ip, lsr #3 802109a: 011b lsls r3, r3, #4 802109c: bf18 it ne 802109e: ea5f 1c1c movsne.w ip, ip, lsr #4 80210a2: d1e0 bne.n 8021066 <__aeabi_fdiv+0x46> 80210a4: 2afd cmp r2, #253 ; 0xfd 80210a6: f63f af50 bhi.w 8020f4a <__aeabi_fmul+0x92> 80210aa: 428b cmp r3, r1 80210ac: eb40 50c2 adc.w r0, r0, r2, lsl #23 80210b0: bf08 it eq 80210b2: f020 0001 biceq.w r0, r0, #1 80210b6: 4770 bx lr 80210b8: f00c 4c00 and.w ip, ip, #2147483648 ; 0x80000000 80210bc: ea4c 2050 orr.w r0, ip, r0, lsr #9 80210c0: 327f adds r2, #127 ; 0x7f 80210c2: bfc2 ittt gt 80210c4: f1d2 03ff rsbsgt r3, r2, #255 ; 0xff 80210c8: ea40 50c2 orrgt.w r0, r0, r2, lsl #23 80210cc: 4770 bxgt lr 80210ce: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 80210d2: f04f 0300 mov.w r3, #0 80210d6: 3a01 subs r2, #1 80210d8: e737 b.n 8020f4a <__aeabi_fmul+0x92> 80210da: f092 0f00 teq r2, #0 80210de: f000 4c00 and.w ip, r0, #2147483648 ; 0x80000000 80210e2: bf02 ittt eq 80210e4: 0040 lsleq r0, r0, #1 80210e6: f410 0f00 tsteq.w r0, #8388608 ; 0x800000 80210ea: 3a01 subeq r2, #1 80210ec: d0f9 beq.n 80210e2 <__aeabi_fdiv+0xc2> 80210ee: ea40 000c orr.w r0, r0, ip 80210f2: f093 0f00 teq r3, #0 80210f6: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000 80210fa: bf02 ittt eq 80210fc: 0049 lsleq r1, r1, #1 80210fe: f411 0f00 tsteq.w r1, #8388608 ; 0x800000 8021102: 3b01 subeq r3, #1 8021104: d0f9 beq.n 80210fa <__aeabi_fdiv+0xda> 8021106: ea41 010c orr.w r1, r1, ip 802110a: e795 b.n 8021038 <__aeabi_fdiv+0x18> 802110c: ea0c 53d1 and.w r3, ip, r1, lsr #23 8021110: ea92 0f0c teq r2, ip 8021114: d108 bne.n 8021128 <__aeabi_fdiv+0x108> 8021116: 0242 lsls r2, r0, #9 8021118: f47f af7d bne.w 8021016 <__aeabi_fmul+0x15e> 802111c: ea93 0f0c teq r3, ip 8021120: f47f af70 bne.w 8021004 <__aeabi_fmul+0x14c> 8021124: 4608 mov r0, r1 8021126: e776 b.n 8021016 <__aeabi_fmul+0x15e> 8021128: ea93 0f0c teq r3, ip 802112c: d104 bne.n 8021138 <__aeabi_fdiv+0x118> 802112e: 024b lsls r3, r1, #9 8021130: f43f af4c beq.w 8020fcc <__aeabi_fmul+0x114> 8021134: 4608 mov r0, r1 8021136: e76e b.n 8021016 <__aeabi_fmul+0x15e> 8021138: f030 4c00 bics.w ip, r0, #2147483648 ; 0x80000000 802113c: bf18 it ne 802113e: f031 4c00 bicsne.w ip, r1, #2147483648 ; 0x80000000 8021142: d1ca bne.n 80210da <__aeabi_fdiv+0xba> 8021144: f030 4200 bics.w r2, r0, #2147483648 ; 0x80000000 8021148: f47f af5c bne.w 8021004 <__aeabi_fmul+0x14c> 802114c: f031 4300 bics.w r3, r1, #2147483648 ; 0x80000000 8021150: f47f af3c bne.w 8020fcc <__aeabi_fmul+0x114> 8021154: e75f b.n 8021016 <__aeabi_fmul+0x15e> 8021156: bf00 nop 08021158 <__gesf2>: 8021158: f04f 3cff mov.w ip, #4294967295 802115c: e006 b.n 802116c <__cmpsf2+0x4> 802115e: bf00 nop 08021160 <__lesf2>: 8021160: f04f 0c01 mov.w ip, #1 8021164: e002 b.n 802116c <__cmpsf2+0x4> 8021166: bf00 nop 08021168 <__cmpsf2>: 8021168: f04f 0c01 mov.w ip, #1 802116c: f84d cd04 str.w ip, [sp, #-4]! 8021170: ea4f 0240 mov.w r2, r0, lsl #1 8021174: ea4f 0341 mov.w r3, r1, lsl #1 8021178: ea7f 6c22 mvns.w ip, r2, asr #24 802117c: bf18 it ne 802117e: ea7f 6c23 mvnsne.w ip, r3, asr #24 8021182: d011 beq.n 80211a8 <__cmpsf2+0x40> 8021184: b001 add sp, #4 8021186: ea52 0c53 orrs.w ip, r2, r3, lsr #1 802118a: bf18 it ne 802118c: ea90 0f01 teqne r0, r1 8021190: bf58 it pl 8021192: ebb2 0003 subspl.w r0, r2, r3 8021196: bf88 it hi 8021198: 17c8 asrhi r0, r1, #31 802119a: bf38 it cc 802119c: ea6f 70e1 mvncc.w r0, r1, asr #31 80211a0: bf18 it ne 80211a2: f040 0001 orrne.w r0, r0, #1 80211a6: 4770 bx lr 80211a8: ea7f 6c22 mvns.w ip, r2, asr #24 80211ac: d102 bne.n 80211b4 <__cmpsf2+0x4c> 80211ae: ea5f 2c40 movs.w ip, r0, lsl #9 80211b2: d105 bne.n 80211c0 <__cmpsf2+0x58> 80211b4: ea7f 6c23 mvns.w ip, r3, asr #24 80211b8: d1e4 bne.n 8021184 <__cmpsf2+0x1c> 80211ba: ea5f 2c41 movs.w ip, r1, lsl #9 80211be: d0e1 beq.n 8021184 <__cmpsf2+0x1c> 80211c0: f85d 0b04 ldr.w r0, [sp], #4 80211c4: 4770 bx lr 80211c6: bf00 nop 080211c8 <__aeabi_cfrcmple>: 80211c8: 4684 mov ip, r0 80211ca: 4608 mov r0, r1 80211cc: 4661 mov r1, ip 80211ce: e7ff b.n 80211d0 <__aeabi_cfcmpeq> 080211d0 <__aeabi_cfcmpeq>: 80211d0: b50f push {r0, r1, r2, r3, lr} 80211d2: f7ff ffc9 bl 8021168 <__cmpsf2> 80211d6: 2800 cmp r0, #0 80211d8: bf48 it mi 80211da: f110 0f00 cmnmi.w r0, #0 80211de: bd0f pop {r0, r1, r2, r3, pc} 080211e0 <__aeabi_fcmpeq>: 80211e0: f84d ed08 str.w lr, [sp, #-8]! 80211e4: f7ff fff4 bl 80211d0 <__aeabi_cfcmpeq> 80211e8: bf0c ite eq 80211ea: 2001 moveq r0, #1 80211ec: 2000 movne r0, #0 80211ee: f85d fb08 ldr.w pc, [sp], #8 80211f2: bf00 nop 080211f4 <__aeabi_fcmplt>: 80211f4: f84d ed08 str.w lr, [sp, #-8]! 80211f8: f7ff ffea bl 80211d0 <__aeabi_cfcmpeq> 80211fc: bf34 ite cc 80211fe: 2001 movcc r0, #1 8021200: 2000 movcs r0, #0 8021202: f85d fb08 ldr.w pc, [sp], #8 8021206: bf00 nop 08021208 <__aeabi_fcmple>: 8021208: f84d ed08 str.w lr, [sp, #-8]! 802120c: f7ff ffe0 bl 80211d0 <__aeabi_cfcmpeq> 8021210: bf94 ite ls 8021212: 2001 movls r0, #1 8021214: 2000 movhi r0, #0 8021216: f85d fb08 ldr.w pc, [sp], #8 802121a: bf00 nop 0802121c <__aeabi_fcmpge>: 802121c: f84d ed08 str.w lr, [sp, #-8]! 8021220: f7ff ffd2 bl 80211c8 <__aeabi_cfrcmple> 8021224: bf94 ite ls 8021226: 2001 movls r0, #1 8021228: 2000 movhi r0, #0 802122a: f85d fb08 ldr.w pc, [sp], #8 802122e: bf00 nop 08021230 <__aeabi_fcmpgt>: 8021230: f84d ed08 str.w lr, [sp, #-8]! 8021234: f7ff ffc8 bl 80211c8 <__aeabi_cfrcmple> 8021238: bf34 ite cc 802123a: 2001 movcc r0, #1 802123c: 2000 movcs r0, #0 802123e: f85d fb08 ldr.w pc, [sp], #8 8021242: bf00 nop 08021244 <__aeabi_uldivmod>: 8021244: b94b cbnz r3, 802125a <__aeabi_uldivmod+0x16> 8021246: b942 cbnz r2, 802125a <__aeabi_uldivmod+0x16> 8021248: 2900 cmp r1, #0 802124a: bf08 it eq 802124c: 2800 cmpeq r0, #0 802124e: d002 beq.n 8021256 <__aeabi_uldivmod+0x12> 8021250: f04f 31ff mov.w r1, #4294967295 8021254: 4608 mov r0, r1 8021256: f000 b83b b.w 80212d0 <__aeabi_idiv0> 802125a: b082 sub sp, #8 802125c: 46ec mov ip, sp 802125e: e92d 5000 stmdb sp!, {ip, lr} 8021262: f000 f81d bl 80212a0 <__gnu_uldivmod_helper> 8021266: f8dd e004 ldr.w lr, [sp, #4] 802126a: b002 add sp, #8 802126c: bc0c pop {r2, r3} 802126e: 4770 bx lr 08021270 <__gnu_ldivmod_helper>: 8021270: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8021274: 4690 mov r8, r2 8021276: 4699 mov r9, r3 8021278: 4606 mov r6, r0 802127a: 460f mov r7, r1 802127c: f000 f82a bl 80212d4 <__divdi3> 8021280: 9b08 ldr r3, [sp, #32] 8021282: fba8 4500 umull r4, r5, r8, r0 8021286: fb08 f801 mul.w r8, r8, r1 802128a: fb00 8209 mla r2, r0, r9, r8 802128e: 1955 adds r5, r2, r5 8021290: 1b34 subs r4, r6, r4 8021292: eb67 0505 sbc.w r5, r7, r5 8021296: e9c3 4500 strd r4, r5, [r3] 802129a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802129e: bf00 nop 080212a0 <__gnu_uldivmod_helper>: 80212a0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80212a4: 4690 mov r8, r2 80212a6: 4606 mov r6, r0 80212a8: 460f mov r7, r1 80212aa: 461d mov r5, r3 80212ac: f000 f9c8 bl 8021640 <__udivdi3> 80212b0: fb00 f305 mul.w r3, r0, r5 80212b4: fba0 4508 umull r4, r5, r0, r8 80212b8: fb08 3801 mla r8, r8, r1, r3 80212bc: 9b06 ldr r3, [sp, #24] 80212be: 4445 add r5, r8 80212c0: 1b34 subs r4, r6, r4 80212c2: eb67 0505 sbc.w r5, r7, r5 80212c6: e9c3 4500 strd r4, r5, [r3] 80212ca: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80212ce: bf00 nop 080212d0 <__aeabi_idiv0>: 80212d0: 4770 bx lr 80212d2: bf00 nop 080212d4 <__divdi3>: 80212d4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80212d8: 2500 movs r5, #0 80212da: 2900 cmp r1, #0 80212dc: b085 sub sp, #20 80212de: 461c mov r4, r3 80212e0: f2c0 8149 blt.w 8021576 <__divdi3+0x2a2> 80212e4: 2c00 cmp r4, #0 80212e6: f2c0 8141 blt.w 802156c <__divdi3+0x298> 80212ea: 468c mov ip, r1 80212ec: 460f mov r7, r1 80212ee: 4682 mov sl, r0 80212f0: 4691 mov r9, r2 80212f2: 4614 mov r4, r2 80212f4: 4606 mov r6, r0 80212f6: 4619 mov r1, r3 80212f8: 2b00 cmp r3, #0 80212fa: d14b bne.n 8021394 <__divdi3+0xc0> 80212fc: 4562 cmp r2, ip 80212fe: d959 bls.n 80213b4 <__divdi3+0xe0> 8021300: fab2 f382 clz r3, r2 8021304: b143 cbz r3, 8021318 <__divdi3+0x44> 8021306: f1c3 0220 rsb r2, r3, #32 802130a: fa0c f703 lsl.w r7, ip, r3 802130e: fa20 f202 lsr.w r2, r0, r2 8021312: 409c lsls r4, r3 8021314: 4317 orrs r7, r2 8021316: 409e lsls r6, r3 8021318: ea4f 4814 mov.w r8, r4, lsr #16 802131c: 4638 mov r0, r7 802131e: 4641 mov r1, r8 8021320: fa1f f984 uxth.w r9, r4 8021324: f000 fb18 bl 8021958 <__aeabi_uidiv> 8021328: 4641 mov r1, r8 802132a: 4682 mov sl, r0 802132c: 4638 mov r0, r7 802132e: f000 fc41 bl 8021bb4 <__aeabi_uidivmod> 8021332: 0c33 lsrs r3, r6, #16 8021334: fb09 f00a mul.w r0, r9, sl 8021338: ea43 4101 orr.w r1, r3, r1, lsl #16 802133c: 4288 cmp r0, r1 802133e: d90a bls.n 8021356 <__divdi3+0x82> 8021340: 1909 adds r1, r1, r4 8021342: f10a 32ff add.w r2, sl, #4294967295 8021346: d205 bcs.n 8021354 <__divdi3+0x80> 8021348: 4288 cmp r0, r1 802134a: bf84 itt hi 802134c: f1aa 0a02 subhi.w sl, sl, #2 8021350: 1909 addhi r1, r1, r4 8021352: d800 bhi.n 8021356 <__divdi3+0x82> 8021354: 4692 mov sl, r2 8021356: ebc0 0b01 rsb fp, r0, r1 802135a: 4641 mov r1, r8 802135c: 4658 mov r0, fp 802135e: b2b6 uxth r6, r6 8021360: f000 fafa bl 8021958 <__aeabi_uidiv> 8021364: 4641 mov r1, r8 8021366: 4607 mov r7, r0 8021368: 4658 mov r0, fp 802136a: f000 fc23 bl 8021bb4 <__aeabi_uidivmod> 802136e: fb09 f907 mul.w r9, r9, r7 8021372: ea46 4101 orr.w r1, r6, r1, lsl #16 8021376: 4589 cmp r9, r1 8021378: d907 bls.n 802138a <__divdi3+0xb6> 802137a: 1e7b subs r3, r7, #1 802137c: 190c adds r4, r1, r4 802137e: f080 8157 bcs.w 8021630 <__divdi3+0x35c> 8021382: 3f02 subs r7, #2 8021384: 45a1 cmp r9, r4 8021386: f240 8153 bls.w 8021630 <__divdi3+0x35c> 802138a: ea47 400a orr.w r0, r7, sl, lsl #16 802138e: f04f 0800 mov.w r8, #0 8021392: e004 b.n 802139e <__divdi3+0xca> 8021394: 4563 cmp r3, ip 8021396: d958 bls.n 802144a <__divdi3+0x176> 8021398: f04f 0800 mov.w r8, #0 802139c: 4640 mov r0, r8 802139e: 4602 mov r2, r0 80213a0: 4643 mov r3, r8 80213a2: b115 cbz r5, 80213aa <__divdi3+0xd6> 80213a4: 4252 negs r2, r2 80213a6: eb63 0343 sbc.w r3, r3, r3, lsl #1 80213aa: 4610 mov r0, r2 80213ac: 4619 mov r1, r3 80213ae: b005 add sp, #20 80213b0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80213b4: b922 cbnz r2, 80213c0 <__divdi3+0xec> 80213b6: 2001 movs r0, #1 80213b8: 4611 mov r1, r2 80213ba: f000 facd bl 8021958 <__aeabi_uidiv> 80213be: 4604 mov r4, r0 80213c0: fab4 f384 clz r3, r4 80213c4: 2b00 cmp r3, #0 80213c6: f040 80dc bne.w 8021582 <__divdi3+0x2ae> 80213ca: 1b3f subs r7, r7, r4 80213cc: ea4f 4914 mov.w r9, r4, lsr #16 80213d0: fa1f fa84 uxth.w sl, r4 80213d4: f04f 0801 mov.w r8, #1 80213d8: 4649 mov r1, r9 80213da: 4638 mov r0, r7 80213dc: f000 fabc bl 8021958 <__aeabi_uidiv> 80213e0: 4649 mov r1, r9 80213e2: 4683 mov fp, r0 80213e4: 4638 mov r0, r7 80213e6: f000 fbe5 bl 8021bb4 <__aeabi_uidivmod> 80213ea: 0c33 lsrs r3, r6, #16 80213ec: fb0a f00b mul.w r0, sl, fp 80213f0: ea43 4101 orr.w r1, r3, r1, lsl #16 80213f4: 4288 cmp r0, r1 80213f6: d90b bls.n 8021410 <__divdi3+0x13c> 80213f8: 1909 adds r1, r1, r4 80213fa: f10b 33ff add.w r3, fp, #4294967295 80213fe: f080 8115 bcs.w 802162c <__divdi3+0x358> 8021402: 4288 cmp r0, r1 8021404: bf84 itt hi 8021406: f1ab 0b02 subhi.w fp, fp, #2 802140a: 1909 addhi r1, r1, r4 802140c: f240 810e bls.w 802162c <__divdi3+0x358> 8021410: 1a0b subs r3, r1, r0 8021412: 4649 mov r1, r9 8021414: 4618 mov r0, r3 8021416: 9301 str r3, [sp, #4] 8021418: f000 fa9e bl 8021958 <__aeabi_uidiv> 802141c: 9b01 ldr r3, [sp, #4] 802141e: 4649 mov r1, r9 8021420: b2b6 uxth r6, r6 8021422: 4607 mov r7, r0 8021424: 4618 mov r0, r3 8021426: f000 fbc5 bl 8021bb4 <__aeabi_uidivmod> 802142a: fb0a fa07 mul.w sl, sl, r7 802142e: ea46 4101 orr.w r1, r6, r1, lsl #16 8021432: 458a cmp sl, r1 8021434: d906 bls.n 8021444 <__divdi3+0x170> 8021436: 1e7b subs r3, r7, #1 8021438: 190c adds r4, r1, r4 802143a: d202 bcs.n 8021442 <__divdi3+0x16e> 802143c: 3f02 subs r7, #2 802143e: 45a2 cmp sl, r4 8021440: d800 bhi.n 8021444 <__divdi3+0x170> 8021442: 461f mov r7, r3 8021444: ea47 400b orr.w r0, r7, fp, lsl #16 8021448: e7a9 b.n 802139e <__divdi3+0xca> 802144a: fab3 f483 clz r4, r3 802144e: 2c00 cmp r4, #0 8021450: f000 80e4 beq.w 802161c <__divdi3+0x348> 8021454: f1c4 0320 rsb r3, r4, #32 8021458: fa01 f104 lsl.w r1, r1, r4 802145c: fa22 fa03 lsr.w sl, r2, r3 8021460: fa2c fb03 lsr.w fp, ip, r3 8021464: ea4a 0a01 orr.w sl, sl, r1 8021468: fa20 f803 lsr.w r8, r0, r3 802146c: fa0c fc04 lsl.w ip, ip, r4 8021470: 4658 mov r0, fp 8021472: ea4f 471a mov.w r7, sl, lsr #16 8021476: ea48 080c orr.w r8, r8, ip 802147a: 4639 mov r1, r7 802147c: fa02 f904 lsl.w r9, r2, r4 8021480: f8cd 900c str.w r9, [sp, #12] 8021484: f000 fa68 bl 8021958 <__aeabi_uidiv> 8021488: 4639 mov r1, r7 802148a: 4681 mov r9, r0 802148c: 4658 mov r0, fp 802148e: f000 fb91 bl 8021bb4 <__aeabi_uidivmod> 8021492: fa1f fc8a uxth.w ip, sl 8021496: ea4f 4318 mov.w r3, r8, lsr #16 802149a: fb0c f009 mul.w r0, ip, r9 802149e: ea43 4301 orr.w r3, r3, r1, lsl #16 80214a2: 4298 cmp r0, r3 80214a4: d90c bls.n 80214c0 <__divdi3+0x1ec> 80214a6: eb13 030a adds.w r3, r3, sl 80214aa: f109 31ff add.w r1, r9, #4294967295 80214ae: f080 80c3 bcs.w 8021638 <__divdi3+0x364> 80214b2: 4298 cmp r0, r3 80214b4: bf84 itt hi 80214b6: f1a9 0902 subhi.w r9, r9, #2 80214ba: 4453 addhi r3, sl 80214bc: f240 80bc bls.w 8021638 <__divdi3+0x364> 80214c0: 1a1b subs r3, r3, r0 80214c2: 4639 mov r1, r7 80214c4: 4618 mov r0, r3 80214c6: f8cd c008 str.w ip, [sp, #8] 80214ca: 9301 str r3, [sp, #4] 80214cc: f000 fa44 bl 8021958 <__aeabi_uidiv> 80214d0: 9b01 ldr r3, [sp, #4] 80214d2: 4639 mov r1, r7 80214d4: fa1f f888 uxth.w r8, r8 80214d8: 4683 mov fp, r0 80214da: 4618 mov r0, r3 80214dc: f000 fb6a bl 8021bb4 <__aeabi_uidivmod> 80214e0: f8dd c008 ldr.w ip, [sp, #8] 80214e4: fb0c f30b mul.w r3, ip, fp 80214e8: ea48 4101 orr.w r1, r8, r1, lsl #16 80214ec: 428b cmp r3, r1 80214ee: d90c bls.n 802150a <__divdi3+0x236> 80214f0: eb11 010a adds.w r1, r1, sl 80214f4: f10b 30ff add.w r0, fp, #4294967295 80214f8: f080 809c bcs.w 8021634 <__divdi3+0x360> 80214fc: 428b cmp r3, r1 80214fe: bf84 itt hi 8021500: f1ab 0b02 subhi.w fp, fp, #2 8021504: 4451 addhi r1, sl 8021506: f240 8095 bls.w 8021634 <__divdi3+0x360> 802150a: 9f03 ldr r7, [sp, #12] 802150c: ea4b 4009 orr.w r0, fp, r9, lsl #16 8021510: 1ac9 subs r1, r1, r3 8021512: fa1f fc80 uxth.w ip, r0 8021516: b2ba uxth r2, r7 8021518: ea4f 4917 mov.w r9, r7, lsr #16 802151c: 0c07 lsrs r7, r0, #16 802151e: fb02 f80c mul.w r8, r2, ip 8021522: fb02 f207 mul.w r2, r2, r7 8021526: fb09 230c mla r3, r9, ip, r2 802152a: fb09 f907 mul.w r9, r9, r7 802152e: eb03 4318 add.w r3, r3, r8, lsr #16 8021532: 429a cmp r2, r3 8021534: bf88 it hi 8021536: f509 3980 addhi.w r9, r9, #65536 ; 0x10000 802153a: eb09 4913 add.w r9, r9, r3, lsr #16 802153e: 4549 cmp r1, r9 8021540: d310 bcc.n 8021564 <__divdi3+0x290> 8021542: fa1f f888 uxth.w r8, r8 8021546: bf14 ite ne 8021548: 2200 movne r2, #0 802154a: 2201 moveq r2, #1 802154c: fa06 f404 lsl.w r4, r6, r4 8021550: eb08 4303 add.w r3, r8, r3, lsl #16 8021554: 429c cmp r4, r3 8021556: bf2c ite cs 8021558: 2300 movcs r3, #0 802155a: f002 0301 andcc.w r3, r2, #1 802155e: 2b00 cmp r3, #0 8021560: f43f af15 beq.w 802138e <__divdi3+0xba> 8021564: 3801 subs r0, #1 8021566: f04f 0800 mov.w r8, #0 802156a: e718 b.n 802139e <__divdi3+0xca> 802156c: 4252 negs r2, r2 802156e: eb63 0343 sbc.w r3, r3, r3, lsl #1 8021572: 43ed mvns r5, r5 8021574: e6b9 b.n 80212ea <__divdi3+0x16> 8021576: 4240 negs r0, r0 8021578: eb61 0141 sbc.w r1, r1, r1, lsl #1 802157c: f04f 35ff mov.w r5, #4294967295 8021580: e6b0 b.n 80212e4 <__divdi3+0x10> 8021582: 409c lsls r4, r3 8021584: f1c3 0b20 rsb fp, r3, #32 8021588: fa27 f80b lsr.w r8, r7, fp 802158c: fa07 f703 lsl.w r7, r7, r3 8021590: ea4f 4914 mov.w r9, r4, lsr #16 8021594: 4640 mov r0, r8 8021596: 4649 mov r1, r9 8021598: fa26 fb0b lsr.w fp, r6, fp 802159c: 409e lsls r6, r3 802159e: f000 f9db bl 8021958 <__aeabi_uidiv> 80215a2: 4649 mov r1, r9 80215a4: fa1f fa84 uxth.w sl, r4 80215a8: ea4b 0b07 orr.w fp, fp, r7 80215ac: 4603 mov r3, r0 80215ae: 4640 mov r0, r8 80215b0: 9301 str r3, [sp, #4] 80215b2: f000 faff bl 8021bb4 <__aeabi_uidivmod> 80215b6: 9b01 ldr r3, [sp, #4] 80215b8: ea4f 421b mov.w r2, fp, lsr #16 80215bc: fb0a f003 mul.w r0, sl, r3 80215c0: ea42 4101 orr.w r1, r2, r1, lsl #16 80215c4: 4288 cmp r0, r1 80215c6: d906 bls.n 80215d6 <__divdi3+0x302> 80215c8: 1e5a subs r2, r3, #1 80215ca: 1909 adds r1, r1, r4 80215cc: d236 bcs.n 802163c <__divdi3+0x368> 80215ce: 4288 cmp r0, r1 80215d0: d934 bls.n 802163c <__divdi3+0x368> 80215d2: 3b02 subs r3, #2 80215d4: 1909 adds r1, r1, r4 80215d6: 1a0f subs r7, r1, r0 80215d8: 4649 mov r1, r9 80215da: 4638 mov r0, r7 80215dc: 9301 str r3, [sp, #4] 80215de: f000 f9bb bl 8021958 <__aeabi_uidiv> 80215e2: 4649 mov r1, r9 80215e4: fa1f fb8b uxth.w fp, fp 80215e8: 4680 mov r8, r0 80215ea: 4638 mov r0, r7 80215ec: f000 fae2 bl 8021bb4 <__aeabi_uidivmod> 80215f0: 9b01 ldr r3, [sp, #4] 80215f2: fb0a f708 mul.w r7, sl, r8 80215f6: ea4b 4101 orr.w r1, fp, r1, lsl #16 80215fa: 428f cmp r7, r1 80215fc: d90a bls.n 8021614 <__divdi3+0x340> 80215fe: 1909 adds r1, r1, r4 8021600: f108 32ff add.w r2, r8, #4294967295 8021604: d205 bcs.n 8021612 <__divdi3+0x33e> 8021606: 428f cmp r7, r1 8021608: bf84 itt hi 802160a: f1a8 0802 subhi.w r8, r8, #2 802160e: 1909 addhi r1, r1, r4 8021610: d800 bhi.n 8021614 <__divdi3+0x340> 8021612: 4690 mov r8, r2 8021614: 1bcf subs r7, r1, r7 8021616: ea48 4803 orr.w r8, r8, r3, lsl #16 802161a: e6dd b.n 80213d8 <__divdi3+0x104> 802161c: 2001 movs r0, #1 802161e: 4563 cmp r3, ip 8021620: bf28 it cs 8021622: 4552 cmpcs r2, sl 8021624: 46a0 mov r8, r4 8021626: f67f aeba bls.w 802139e <__divdi3+0xca> 802162a: e6b5 b.n 8021398 <__divdi3+0xc4> 802162c: 469b mov fp, r3 802162e: e6ef b.n 8021410 <__divdi3+0x13c> 8021630: 461f mov r7, r3 8021632: e6aa b.n 802138a <__divdi3+0xb6> 8021634: 4683 mov fp, r0 8021636: e768 b.n 802150a <__divdi3+0x236> 8021638: 4689 mov r9, r1 802163a: e741 b.n 80214c0 <__divdi3+0x1ec> 802163c: 4613 mov r3, r2 802163e: e7ca b.n 80215d6 <__divdi3+0x302> 08021640 <__udivdi3>: 8021640: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8021644: 4606 mov r6, r0 8021646: b083 sub sp, #12 8021648: 460d mov r5, r1 802164a: 4614 mov r4, r2 802164c: 4607 mov r7, r0 802164e: 4688 mov r8, r1 8021650: 2b00 cmp r3, #0 8021652: d14a bne.n 80216ea <__udivdi3+0xaa> 8021654: 428a cmp r2, r1 8021656: d955 bls.n 8021704 <__udivdi3+0xc4> 8021658: fab2 f382 clz r3, r2 802165c: b14b cbz r3, 8021672 <__udivdi3+0x32> 802165e: f1c3 0220 rsb r2, r3, #32 8021662: fa01 f803 lsl.w r8, r1, r3 8021666: fa20 f202 lsr.w r2, r0, r2 802166a: 409c lsls r4, r3 802166c: ea42 0808 orr.w r8, r2, r8 8021670: 409f lsls r7, r3 8021672: 0c25 lsrs r5, r4, #16 8021674: 4640 mov r0, r8 8021676: 4629 mov r1, r5 8021678: fa1f fa84 uxth.w sl, r4 802167c: f000 f96c bl 8021958 <__aeabi_uidiv> 8021680: 4629 mov r1, r5 8021682: 4681 mov r9, r0 8021684: 4640 mov r0, r8 8021686: f000 fa95 bl 8021bb4 <__aeabi_uidivmod> 802168a: 0c3b lsrs r3, r7, #16 802168c: fb0a f009 mul.w r0, sl, r9 8021690: ea43 4101 orr.w r1, r3, r1, lsl #16 8021694: 4288 cmp r0, r1 8021696: d90a bls.n 80216ae <__udivdi3+0x6e> 8021698: 1909 adds r1, r1, r4 802169a: f109 32ff add.w r2, r9, #4294967295 802169e: d205 bcs.n 80216ac <__udivdi3+0x6c> 80216a0: 4288 cmp r0, r1 80216a2: bf84 itt hi 80216a4: f1a9 0902 subhi.w r9, r9, #2 80216a8: 1909 addhi r1, r1, r4 80216aa: d800 bhi.n 80216ae <__udivdi3+0x6e> 80216ac: 4691 mov r9, r2 80216ae: ebc0 0801 rsb r8, r0, r1 80216b2: 4629 mov r1, r5 80216b4: 4640 mov r0, r8 80216b6: b2bf uxth r7, r7 80216b8: f000 f94e bl 8021958 <__aeabi_uidiv> 80216bc: 4629 mov r1, r5 80216be: 4606 mov r6, r0 80216c0: 4640 mov r0, r8 80216c2: f000 fa77 bl 8021bb4 <__aeabi_uidivmod> 80216c6: fb0a fa06 mul.w sl, sl, r6 80216ca: ea47 4101 orr.w r1, r7, r1, lsl #16 80216ce: 458a cmp sl, r1 80216d0: d907 bls.n 80216e2 <__udivdi3+0xa2> 80216d2: 1e73 subs r3, r6, #1 80216d4: 190c adds r4, r1, r4 80216d6: f080 8122 bcs.w 802191e <__udivdi3+0x2de> 80216da: 3e02 subs r6, #2 80216dc: 45a2 cmp sl, r4 80216de: f240 811e bls.w 802191e <__udivdi3+0x2de> 80216e2: ea46 4009 orr.w r0, r6, r9, lsl #16 80216e6: 2600 movs r6, #0 80216e8: e058 b.n 802179c <__udivdi3+0x15c> 80216ea: 428b cmp r3, r1 80216ec: d854 bhi.n 8021798 <__udivdi3+0x158> 80216ee: fab3 f483 clz r4, r3 80216f2: 2c00 cmp r4, #0 80216f4: d156 bne.n 80217a4 <__udivdi3+0x164> 80216f6: 428b cmp r3, r1 80216f8: bf28 it cs 80216fa: 4282 cmpcs r2, r0 80216fc: d84c bhi.n 8021798 <__udivdi3+0x158> 80216fe: 4626 mov r6, r4 8021700: 2001 movs r0, #1 8021702: e04b b.n 802179c <__udivdi3+0x15c> 8021704: b922 cbnz r2, 8021710 <__udivdi3+0xd0> 8021706: 2001 movs r0, #1 8021708: 4611 mov r1, r2 802170a: f000 f925 bl 8021958 <__aeabi_uidiv> 802170e: 4604 mov r4, r0 8021710: fab4 f384 clz r3, r4 8021714: 2b00 cmp r3, #0 8021716: f040 80b9 bne.w 802188c <__udivdi3+0x24c> 802171a: 1b2d subs r5, r5, r4 802171c: ea4f 4814 mov.w r8, r4, lsr #16 8021720: fa1f fa84 uxth.w sl, r4 8021724: 2601 movs r6, #1 8021726: 4641 mov r1, r8 8021728: 4628 mov r0, r5 802172a: f000 f915 bl 8021958 <__aeabi_uidiv> 802172e: 4641 mov r1, r8 8021730: 4681 mov r9, r0 8021732: 4628 mov r0, r5 8021734: f000 fa3e bl 8021bb4 <__aeabi_uidivmod> 8021738: 0c3b lsrs r3, r7, #16 802173a: fb0a f009 mul.w r0, sl, r9 802173e: ea43 4101 orr.w r1, r3, r1, lsl #16 8021742: 4288 cmp r0, r1 8021744: d90b bls.n 802175e <__udivdi3+0x11e> 8021746: 1909 adds r1, r1, r4 8021748: f109 33ff add.w r3, r9, #4294967295 802174c: f080 80e9 bcs.w 8021922 <__udivdi3+0x2e2> 8021750: 4288 cmp r0, r1 8021752: bf84 itt hi 8021754: f1a9 0902 subhi.w r9, r9, #2 8021758: 1909 addhi r1, r1, r4 802175a: f240 80e2 bls.w 8021922 <__udivdi3+0x2e2> 802175e: ebc0 0b01 rsb fp, r0, r1 8021762: 4641 mov r1, r8 8021764: 4658 mov r0, fp 8021766: b2bf uxth r7, r7 8021768: f000 f8f6 bl 8021958 <__aeabi_uidiv> 802176c: 4641 mov r1, r8 802176e: 4605 mov r5, r0 8021770: 4658 mov r0, fp 8021772: f000 fa1f bl 8021bb4 <__aeabi_uidivmod> 8021776: fb0a fa05 mul.w sl, sl, r5 802177a: ea47 4101 orr.w r1, r7, r1, lsl #16 802177e: 458a cmp sl, r1 8021780: d907 bls.n 8021792 <__udivdi3+0x152> 8021782: 1e6b subs r3, r5, #1 8021784: 190c adds r4, r1, r4 8021786: f080 80ce bcs.w 8021926 <__udivdi3+0x2e6> 802178a: 3d02 subs r5, #2 802178c: 45a2 cmp sl, r4 802178e: f240 80ca bls.w 8021926 <__udivdi3+0x2e6> 8021792: ea45 4009 orr.w r0, r5, r9, lsl #16 8021796: e001 b.n 802179c <__udivdi3+0x15c> 8021798: 2600 movs r6, #0 802179a: 4630 mov r0, r6 802179c: 4631 mov r1, r6 802179e: b003 add sp, #12 80217a0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80217a4: f1c4 0120 rsb r1, r4, #32 80217a8: fa03 f304 lsl.w r3, r3, r4 80217ac: fa22 f801 lsr.w r8, r2, r1 80217b0: fa25 f701 lsr.w r7, r5, r1 80217b4: ea48 0803 orr.w r8, r8, r3 80217b8: fa20 f101 lsr.w r1, r0, r1 80217bc: fa05 f504 lsl.w r5, r5, r4 80217c0: 4638 mov r0, r7 80217c2: ea4f 4918 mov.w r9, r8, lsr #16 80217c6: 430d orrs r5, r1 80217c8: 4649 mov r1, r9 80217ca: fa02 f204 lsl.w r2, r2, r4 80217ce: 9201 str r2, [sp, #4] 80217d0: f000 f8c2 bl 8021958 <__aeabi_uidiv> 80217d4: 4649 mov r1, r9 80217d6: 4682 mov sl, r0 80217d8: 4638 mov r0, r7 80217da: f000 f9eb bl 8021bb4 <__aeabi_uidivmod> 80217de: fa1f f288 uxth.w r2, r8 80217e2: 0c2f lsrs r7, r5, #16 80217e4: fb02 f00a mul.w r0, r2, sl 80217e8: ea47 4701 orr.w r7, r7, r1, lsl #16 80217ec: 42b8 cmp r0, r7 80217ee: d906 bls.n 80217fe <__udivdi3+0x1be> 80217f0: eb17 0708 adds.w r7, r7, r8 80217f4: f10a 31ff add.w r1, sl, #4294967295 80217f8: f0c0 809f bcc.w 802193a <__udivdi3+0x2fa> 80217fc: 468a mov sl, r1 80217fe: 1a3f subs r7, r7, r0 8021800: 4649 mov r1, r9 8021802: 4638 mov r0, r7 8021804: 9200 str r2, [sp, #0] 8021806: f000 f8a7 bl 8021958 <__aeabi_uidiv> 802180a: 4649 mov r1, r9 802180c: b2ad uxth r5, r5 802180e: 4683 mov fp, r0 8021810: 4638 mov r0, r7 8021812: f000 f9cf bl 8021bb4 <__aeabi_uidivmod> 8021816: 9a00 ldr r2, [sp, #0] 8021818: fb02 f70b mul.w r7, r2, fp 802181c: ea45 4101 orr.w r1, r5, r1, lsl #16 8021820: 428f cmp r7, r1 8021822: d905 bls.n 8021830 <__udivdi3+0x1f0> 8021824: eb11 0108 adds.w r1, r1, r8 8021828: f10b 32ff add.w r2, fp, #4294967295 802182c: d37d bcc.n 802192a <__udivdi3+0x2ea> 802182e: 4693 mov fp, r2 8021830: 9b01 ldr r3, [sp, #4] 8021832: ea4b 400a orr.w r0, fp, sl, lsl #16 8021836: 1bc9 subs r1, r1, r7 8021838: ea4f 4c10 mov.w ip, r0, lsr #16 802183c: b29d uxth r5, r3 802183e: ea4f 4a13 mov.w sl, r3, lsr #16 8021842: b283 uxth r3, r0 8021844: fb05 f203 mul.w r2, r5, r3 8021848: fb05 f50c mul.w r5, r5, ip 802184c: fb0a 5303 mla r3, sl, r3, r5 8021850: fb0a fa0c mul.w sl, sl, ip 8021854: eb03 4312 add.w r3, r3, r2, lsr #16 8021858: 429d cmp r5, r3 802185a: bf88 it hi 802185c: f50a 3a80 addhi.w sl, sl, #65536 ; 0x10000 8021860: eb0a 4a13 add.w sl, sl, r3, lsr #16 8021864: 4551 cmp r1, sl 8021866: d30e bcc.n 8021886 <__udivdi3+0x246> 8021868: b292 uxth r2, r2 802186a: bf14 ite ne 802186c: 2100 movne r1, #0 802186e: 2101 moveq r1, #1 8021870: fa06 f604 lsl.w r6, r6, r4 8021874: eb02 4303 add.w r3, r2, r3, lsl #16 8021878: 429e cmp r6, r3 802187a: bf2c ite cs 802187c: 2600 movcs r6, #0 802187e: f001 0601 andcc.w r6, r1, #1 8021882: 2e00 cmp r6, #0 8021884: d08a beq.n 802179c <__udivdi3+0x15c> 8021886: 3801 subs r0, #1 8021888: 2600 movs r6, #0 802188a: e787 b.n 802179c <__udivdi3+0x15c> 802188c: 409c lsls r4, r3 802188e: f1c3 0220 rsb r2, r3, #32 8021892: fa25 fa02 lsr.w sl, r5, r2 8021896: fa26 f902 lsr.w r9, r6, r2 802189a: ea4f 4814 mov.w r8, r4, lsr #16 802189e: 4650 mov r0, sl 80218a0: 4641 mov r1, r8 80218a2: fa05 f503 lsl.w r5, r5, r3 80218a6: fa06 f703 lsl.w r7, r6, r3 80218aa: f000 f855 bl 8021958 <__aeabi_uidiv> 80218ae: 4641 mov r1, r8 80218b0: ea49 0905 orr.w r9, r9, r5 80218b4: 4683 mov fp, r0 80218b6: 4650 mov r0, sl 80218b8: f000 f97c bl 8021bb4 <__aeabi_uidivmod> 80218bc: fa1f fa84 uxth.w sl, r4 80218c0: ea4f 4319 mov.w r3, r9, lsr #16 80218c4: fb0a f00b mul.w r0, sl, fp 80218c8: ea43 4101 orr.w r1, r3, r1, lsl #16 80218cc: 4288 cmp r0, r1 80218ce: d909 bls.n 80218e4 <__udivdi3+0x2a4> 80218d0: 1909 adds r1, r1, r4 80218d2: f10b 33ff add.w r3, fp, #4294967295 80218d6: d238 bcs.n 802194a <__udivdi3+0x30a> 80218d8: 4288 cmp r0, r1 80218da: bf84 itt hi 80218dc: f1ab 0b02 subhi.w fp, fp, #2 80218e0: 1909 addhi r1, r1, r4 80218e2: d932 bls.n 802194a <__udivdi3+0x30a> 80218e4: 1a0d subs r5, r1, r0 80218e6: 4641 mov r1, r8 80218e8: 4628 mov r0, r5 80218ea: fa1f f989 uxth.w r9, r9 80218ee: f000 f833 bl 8021958 <__aeabi_uidiv> 80218f2: 4641 mov r1, r8 80218f4: 4606 mov r6, r0 80218f6: 4628 mov r0, r5 80218f8: f000 f95c bl 8021bb4 <__aeabi_uidivmod> 80218fc: fb0a f506 mul.w r5, sl, r6 8021900: ea49 4101 orr.w r1, r9, r1, lsl #16 8021904: 428d cmp r5, r1 8021906: d906 bls.n 8021916 <__udivdi3+0x2d6> 8021908: 1e73 subs r3, r6, #1 802190a: 1909 adds r1, r1, r4 802190c: d21f bcs.n 802194e <__udivdi3+0x30e> 802190e: 428d cmp r5, r1 8021910: d91d bls.n 802194e <__udivdi3+0x30e> 8021912: 3e02 subs r6, #2 8021914: 1909 adds r1, r1, r4 8021916: 1b4d subs r5, r1, r5 8021918: ea46 460b orr.w r6, r6, fp, lsl #16 802191c: e703 b.n 8021726 <__udivdi3+0xe6> 802191e: 461e mov r6, r3 8021920: e6df b.n 80216e2 <__udivdi3+0xa2> 8021922: 4699 mov r9, r3 8021924: e71b b.n 802175e <__udivdi3+0x11e> 8021926: 461d mov r5, r3 8021928: e733 b.n 8021792 <__udivdi3+0x152> 802192a: 428f cmp r7, r1 802192c: bf84 itt hi 802192e: f1ab 0b02 subhi.w fp, fp, #2 8021932: 4441 addhi r1, r8 8021934: f63f af7c bhi.w 8021830 <__udivdi3+0x1f0> 8021938: e779 b.n 802182e <__udivdi3+0x1ee> 802193a: 42b8 cmp r0, r7 802193c: bf84 itt hi 802193e: f1aa 0a02 subhi.w sl, sl, #2 8021942: 4447 addhi r7, r8 8021944: f63f af5b bhi.w 80217fe <__udivdi3+0x1be> 8021948: e758 b.n 80217fc <__udivdi3+0x1bc> 802194a: 469b mov fp, r3 802194c: e7ca b.n 80218e4 <__udivdi3+0x2a4> 802194e: 461e mov r6, r3 8021950: e7e1 b.n 8021916 <__udivdi3+0x2d6> 8021952: bf00 nop 8021954: 0000 movs r0, r0 8021956: 0000 movs r0, r0 08021958 <__aeabi_uidiv>: 8021958: 1e4a subs r2, r1, #1 802195a: bf08 it eq 802195c: 4770 bxeq lr 802195e: f0c0 8124 bcc.w 8021baa <__aeabi_uidiv+0x252> 8021962: 4288 cmp r0, r1 8021964: f240 8116 bls.w 8021b94 <__aeabi_uidiv+0x23c> 8021968: 4211 tst r1, r2 802196a: f000 8117 beq.w 8021b9c <__aeabi_uidiv+0x244> 802196e: fab0 f380 clz r3, r0 8021972: fab1 f281 clz r2, r1 8021976: eba2 0303 sub.w r3, r2, r3 802197a: f1c3 031f rsb r3, r3, #31 802197e: a204 add r2, pc, #16 ; (adr r2, 8021990 <__aeabi_uidiv+0x38>) 8021980: eb02 1303 add.w r3, r2, r3, lsl #4 8021984: f04f 0200 mov.w r2, #0 8021988: 469f mov pc, r3 802198a: bf00 nop 802198c: f3af 8000 nop.w 8021990: ebb0 7fc1 cmp.w r0, r1, lsl #31 8021994: bf00 nop 8021996: eb42 0202 adc.w r2, r2, r2 802199a: bf28 it cs 802199c: eba0 70c1 subcs.w r0, r0, r1, lsl #31 80219a0: ebb0 7f81 cmp.w r0, r1, lsl #30 80219a4: bf00 nop 80219a6: eb42 0202 adc.w r2, r2, r2 80219aa: bf28 it cs 80219ac: eba0 7081 subcs.w r0, r0, r1, lsl #30 80219b0: ebb0 7f41 cmp.w r0, r1, lsl #29 80219b4: bf00 nop 80219b6: eb42 0202 adc.w r2, r2, r2 80219ba: bf28 it cs 80219bc: eba0 7041 subcs.w r0, r0, r1, lsl #29 80219c0: ebb0 7f01 cmp.w r0, r1, lsl #28 80219c4: bf00 nop 80219c6: eb42 0202 adc.w r2, r2, r2 80219ca: bf28 it cs 80219cc: eba0 7001 subcs.w r0, r0, r1, lsl #28 80219d0: ebb0 6fc1 cmp.w r0, r1, lsl #27 80219d4: bf00 nop 80219d6: eb42 0202 adc.w r2, r2, r2 80219da: bf28 it cs 80219dc: eba0 60c1 subcs.w r0, r0, r1, lsl #27 80219e0: ebb0 6f81 cmp.w r0, r1, lsl #26 80219e4: bf00 nop 80219e6: eb42 0202 adc.w r2, r2, r2 80219ea: bf28 it cs 80219ec: eba0 6081 subcs.w r0, r0, r1, lsl #26 80219f0: ebb0 6f41 cmp.w r0, r1, lsl #25 80219f4: bf00 nop 80219f6: eb42 0202 adc.w r2, r2, r2 80219fa: bf28 it cs 80219fc: eba0 6041 subcs.w r0, r0, r1, lsl #25 8021a00: ebb0 6f01 cmp.w r0, r1, lsl #24 8021a04: bf00 nop 8021a06: eb42 0202 adc.w r2, r2, r2 8021a0a: bf28 it cs 8021a0c: eba0 6001 subcs.w r0, r0, r1, lsl #24 8021a10: ebb0 5fc1 cmp.w r0, r1, lsl #23 8021a14: bf00 nop 8021a16: eb42 0202 adc.w r2, r2, r2 8021a1a: bf28 it cs 8021a1c: eba0 50c1 subcs.w r0, r0, r1, lsl #23 8021a20: ebb0 5f81 cmp.w r0, r1, lsl #22 8021a24: bf00 nop 8021a26: eb42 0202 adc.w r2, r2, r2 8021a2a: bf28 it cs 8021a2c: eba0 5081 subcs.w r0, r0, r1, lsl #22 8021a30: ebb0 5f41 cmp.w r0, r1, lsl #21 8021a34: bf00 nop 8021a36: eb42 0202 adc.w r2, r2, r2 8021a3a: bf28 it cs 8021a3c: eba0 5041 subcs.w r0, r0, r1, lsl #21 8021a40: ebb0 5f01 cmp.w r0, r1, lsl #20 8021a44: bf00 nop 8021a46: eb42 0202 adc.w r2, r2, r2 8021a4a: bf28 it cs 8021a4c: eba0 5001 subcs.w r0, r0, r1, lsl #20 8021a50: ebb0 4fc1 cmp.w r0, r1, lsl #19 8021a54: bf00 nop 8021a56: eb42 0202 adc.w r2, r2, r2 8021a5a: bf28 it cs 8021a5c: eba0 40c1 subcs.w r0, r0, r1, lsl #19 8021a60: ebb0 4f81 cmp.w r0, r1, lsl #18 8021a64: bf00 nop 8021a66: eb42 0202 adc.w r2, r2, r2 8021a6a: bf28 it cs 8021a6c: eba0 4081 subcs.w r0, r0, r1, lsl #18 8021a70: ebb0 4f41 cmp.w r0, r1, lsl #17 8021a74: bf00 nop 8021a76: eb42 0202 adc.w r2, r2, r2 8021a7a: bf28 it cs 8021a7c: eba0 4041 subcs.w r0, r0, r1, lsl #17 8021a80: ebb0 4f01 cmp.w r0, r1, lsl #16 8021a84: bf00 nop 8021a86: eb42 0202 adc.w r2, r2, r2 8021a8a: bf28 it cs 8021a8c: eba0 4001 subcs.w r0, r0, r1, lsl #16 8021a90: ebb0 3fc1 cmp.w r0, r1, lsl #15 8021a94: bf00 nop 8021a96: eb42 0202 adc.w r2, r2, r2 8021a9a: bf28 it cs 8021a9c: eba0 30c1 subcs.w r0, r0, r1, lsl #15 8021aa0: ebb0 3f81 cmp.w r0, r1, lsl #14 8021aa4: bf00 nop 8021aa6: eb42 0202 adc.w r2, r2, r2 8021aaa: bf28 it cs 8021aac: eba0 3081 subcs.w r0, r0, r1, lsl #14 8021ab0: ebb0 3f41 cmp.w r0, r1, lsl #13 8021ab4: bf00 nop 8021ab6: eb42 0202 adc.w r2, r2, r2 8021aba: bf28 it cs 8021abc: eba0 3041 subcs.w r0, r0, r1, lsl #13 8021ac0: ebb0 3f01 cmp.w r0, r1, lsl #12 8021ac4: bf00 nop 8021ac6: eb42 0202 adc.w r2, r2, r2 8021aca: bf28 it cs 8021acc: eba0 3001 subcs.w r0, r0, r1, lsl #12 8021ad0: ebb0 2fc1 cmp.w r0, r1, lsl #11 8021ad4: bf00 nop 8021ad6: eb42 0202 adc.w r2, r2, r2 8021ada: bf28 it cs 8021adc: eba0 20c1 subcs.w r0, r0, r1, lsl #11 8021ae0: ebb0 2f81 cmp.w r0, r1, lsl #10 8021ae4: bf00 nop 8021ae6: eb42 0202 adc.w r2, r2, r2 8021aea: bf28 it cs 8021aec: eba0 2081 subcs.w r0, r0, r1, lsl #10 8021af0: ebb0 2f41 cmp.w r0, r1, lsl #9 8021af4: bf00 nop 8021af6: eb42 0202 adc.w r2, r2, r2 8021afa: bf28 it cs 8021afc: eba0 2041 subcs.w r0, r0, r1, lsl #9 8021b00: ebb0 2f01 cmp.w r0, r1, lsl #8 8021b04: bf00 nop 8021b06: eb42 0202 adc.w r2, r2, r2 8021b0a: bf28 it cs 8021b0c: eba0 2001 subcs.w r0, r0, r1, lsl #8 8021b10: ebb0 1fc1 cmp.w r0, r1, lsl #7 8021b14: bf00 nop 8021b16: eb42 0202 adc.w r2, r2, r2 8021b1a: bf28 it cs 8021b1c: eba0 10c1 subcs.w r0, r0, r1, lsl #7 8021b20: ebb0 1f81 cmp.w r0, r1, lsl #6 8021b24: bf00 nop 8021b26: eb42 0202 adc.w r2, r2, r2 8021b2a: bf28 it cs 8021b2c: eba0 1081 subcs.w r0, r0, r1, lsl #6 8021b30: ebb0 1f41 cmp.w r0, r1, lsl #5 8021b34: bf00 nop 8021b36: eb42 0202 adc.w r2, r2, r2 8021b3a: bf28 it cs 8021b3c: eba0 1041 subcs.w r0, r0, r1, lsl #5 8021b40: ebb0 1f01 cmp.w r0, r1, lsl #4 8021b44: bf00 nop 8021b46: eb42 0202 adc.w r2, r2, r2 8021b4a: bf28 it cs 8021b4c: eba0 1001 subcs.w r0, r0, r1, lsl #4 8021b50: ebb0 0fc1 cmp.w r0, r1, lsl #3 8021b54: bf00 nop 8021b56: eb42 0202 adc.w r2, r2, r2 8021b5a: bf28 it cs 8021b5c: eba0 00c1 subcs.w r0, r0, r1, lsl #3 8021b60: ebb0 0f81 cmp.w r0, r1, lsl #2 8021b64: bf00 nop 8021b66: eb42 0202 adc.w r2, r2, r2 8021b6a: bf28 it cs 8021b6c: eba0 0081 subcs.w r0, r0, r1, lsl #2 8021b70: ebb0 0f41 cmp.w r0, r1, lsl #1 8021b74: bf00 nop 8021b76: eb42 0202 adc.w r2, r2, r2 8021b7a: bf28 it cs 8021b7c: eba0 0041 subcs.w r0, r0, r1, lsl #1 8021b80: ebb0 0f01 cmp.w r0, r1 8021b84: bf00 nop 8021b86: eb42 0202 adc.w r2, r2, r2 8021b8a: bf28 it cs 8021b8c: eba0 0001 subcs.w r0, r0, r1 8021b90: 4610 mov r0, r2 8021b92: 4770 bx lr 8021b94: bf0c ite eq 8021b96: 2001 moveq r0, #1 8021b98: 2000 movne r0, #0 8021b9a: 4770 bx lr 8021b9c: fab1 f281 clz r2, r1 8021ba0: f1c2 021f rsb r2, r2, #31 8021ba4: fa20 f002 lsr.w r0, r0, r2 8021ba8: 4770 bx lr 8021baa: b108 cbz r0, 8021bb0 <__aeabi_uidiv+0x258> 8021bac: f04f 30ff mov.w r0, #4294967295 8021bb0: f7ff bb8e b.w 80212d0 <__aeabi_idiv0> 08021bb4 <__aeabi_uidivmod>: 8021bb4: 2900 cmp r1, #0 8021bb6: d0f8 beq.n 8021baa <__aeabi_uidiv+0x252> 8021bb8: e92d 4003 stmdb sp!, {r0, r1, lr} 8021bbc: f7ff fecc bl 8021958 <__aeabi_uidiv> 8021bc0: e8bd 4006 ldmia.w sp!, {r1, r2, lr} 8021bc4: fb02 f300 mul.w r3, r2, r0 8021bc8: eba1 0103 sub.w r1, r1, r3 8021bcc: 4770 bx lr 8021bce: bf00 nop 08021bd0 : 8021bd0: 2100 movs r1, #0 8021bd2: f001 bde7 b.w 80237a4 8021bd6: bf00 nop 08021bd8 : 8021bd8: 2100 movs r1, #0 8021bda: 220a movs r2, #10 8021bdc: f001 bee2 b.w 80239a4 08021be0 <_atoi_r>: 8021be0: 2200 movs r2, #0 8021be2: 230a movs r3, #10 8021be4: f001 be3c b.w 8023860 <_strtol_r> 08021be8 <__libc_init_array>: 8021be8: b570 push {r4, r5, r6, lr} 8021bea: f245 26d4 movw r6, #21204 ; 0x52d4 8021bee: f245 25d4 movw r5, #21204 ; 0x52d4 8021bf2: f6c0 0604 movt r6, #2052 ; 0x804 8021bf6: f6c0 0504 movt r5, #2052 ; 0x804 8021bfa: 1b76 subs r6, r6, r5 8021bfc: 10b6 asrs r6, r6, #2 8021bfe: d007 beq.n 8021c10 <__libc_init_array+0x28> 8021c00: 3d04 subs r5, #4 8021c02: 2400 movs r4, #0 8021c04: f855 3f04 ldr.w r3, [r5, #4]! 8021c08: 3401 adds r4, #1 8021c0a: 4798 blx r3 8021c0c: 42a6 cmp r6, r4 8021c0e: d1f9 bne.n 8021c04 <__libc_init_array+0x1c> 8021c10: f245 26d8 movw r6, #21208 ; 0x52d8 8021c14: f245 25d4 movw r5, #21204 ; 0x52d4 8021c18: f6c0 0604 movt r6, #2052 ; 0x804 8021c1c: f6c0 0504 movt r5, #2052 ; 0x804 8021c20: 1b76 subs r6, r6, r5 8021c22: f023 fb47 bl 80452b4 <_init> 8021c26: 10b6 asrs r6, r6, #2 8021c28: d008 beq.n 8021c3c <__libc_init_array+0x54> 8021c2a: 3d04 subs r5, #4 8021c2c: 2400 movs r4, #0 8021c2e: f855 3f04 ldr.w r3, [r5, #4]! 8021c32: 3401 adds r4, #1 8021c34: 4798 blx r3 8021c36: 42a6 cmp r6, r4 8021c38: d1f9 bne.n 8021c2e <__libc_init_array+0x46> 8021c3a: bd70 pop {r4, r5, r6, pc} 8021c3c: bd70 pop {r4, r5, r6, pc} 8021c3e: bf00 nop 08021c40 : 8021c40: 2a03 cmp r2, #3 8021c42: b470 push {r4, r5, r6} 8021c44: d922 bls.n 8021c8c 8021c46: ea41 0300 orr.w r3, r1, r0 8021c4a: 079b lsls r3, r3, #30 8021c4c: d013 beq.n 8021c76 8021c4e: 7805 ldrb r5, [r0, #0] 8021c50: 3a01 subs r2, #1 8021c52: 780c ldrb r4, [r1, #0] 8021c54: 2300 movs r3, #0 8021c56: 42a5 cmp r5, r4 8021c58: d006 beq.n 8021c68 8021c5a: e01b b.n 8021c94 8021c5c: f810 5f01 ldrb.w r5, [r0, #1]! 8021c60: f811 4f01 ldrb.w r4, [r1, #1]! 8021c64: 42a5 cmp r5, r4 8021c66: d115 bne.n 8021c94 8021c68: 4293 cmp r3, r2 8021c6a: f103 0301 add.w r3, r3, #1 8021c6e: d1f5 bne.n 8021c5c 8021c70: 2000 movs r0, #0 8021c72: bc70 pop {r4, r5, r6} 8021c74: 4770 bx lr 8021c76: 460c mov r4, r1 8021c78: 4603 mov r3, r0 8021c7a: 3104 adds r1, #4 8021c7c: 3004 adds r0, #4 8021c7e: 681e ldr r6, [r3, #0] 8021c80: 6825 ldr r5, [r4, #0] 8021c82: 42ae cmp r6, r5 8021c84: d108 bne.n 8021c98 8021c86: 3a04 subs r2, #4 8021c88: 2a03 cmp r2, #3 8021c8a: d8f4 bhi.n 8021c76 8021c8c: 2a00 cmp r2, #0 8021c8e: d1de bne.n 8021c4e 8021c90: 4610 mov r0, r2 8021c92: e7ee b.n 8021c72 8021c94: 1b28 subs r0, r5, r4 8021c96: e7ec b.n 8021c72 8021c98: 4621 mov r1, r4 8021c9a: 4618 mov r0, r3 8021c9c: 2a00 cmp r2, #0 8021c9e: d1d6 bne.n 8021c4e 8021ca0: e7f6 b.n 8021c90 8021ca2: bf00 nop 08021ca4 : 8021ca4: 2a03 cmp r2, #3 8021ca6: e92d 0ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 8021caa: d809 bhi.n 8021cc0 8021cac: b12a cbz r2, 8021cba 8021cae: 2300 movs r3, #0 8021cb0: 5ccc ldrb r4, [r1, r3] 8021cb2: 54c4 strb r4, [r0, r3] 8021cb4: 3301 adds r3, #1 8021cb6: 4293 cmp r3, r2 8021cb8: d1fa bne.n 8021cb0 8021cba: e8bd 0ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 8021cbe: 4770 bx lr 8021cc0: 0783 lsls r3, r0, #30 8021cc2: 4402 add r2, r0 8021cc4: d00e beq.n 8021ce4 8021cc6: 1c44 adds r4, r0, #1 8021cc8: 1c4d adds r5, r1, #1 8021cca: f815 7c01 ldrb.w r7, [r5, #-1] 8021cce: f004 0603 and.w r6, r4, #3 8021cd2: 4623 mov r3, r4 8021cd4: 3401 adds r4, #1 8021cd6: 4629 mov r1, r5 8021cd8: 3501 adds r5, #1 8021cda: f804 7c02 strb.w r7, [r4, #-2] 8021cde: 2e00 cmp r6, #0 8021ce0: d1f3 bne.n 8021cca 8021ce2: e000 b.n 8021ce6 8021ce4: 4603 mov r3, r0 8021ce6: f011 0403 ands.w r4, r1, #3 8021cea: d06d beq.n 8021dc8 8021cec: 1ad7 subs r7, r2, r3 8021cee: 1b0d subs r5, r1, r4 8021cf0: 2f03 cmp r7, #3 8021cf2: 682e ldr r6, [r5, #0] 8021cf4: dd19 ble.n 8021d2a 8021cf6: f1c4 0c04 rsb ip, r4, #4 8021cfa: ea4f 08c4 mov.w r8, r4, lsl #3 8021cfe: 1d1c adds r4, r3, #4 8021d00: ea4f 0ccc mov.w ip, ip, lsl #3 8021d04: f855 7f04 ldr.w r7, [r5, #4]! 8021d08: ebc4 0902 rsb r9, r4, r2 8021d0c: 4623 mov r3, r4 8021d0e: 3104 adds r1, #4 8021d10: 3404 adds r4, #4 8021d12: f1b9 0f03 cmp.w r9, #3 8021d16: fa26 fa08 lsr.w sl, r6, r8 8021d1a: fa07 fb0c lsl.w fp, r7, ip 8021d1e: 463e mov r6, r7 8021d20: ea4b 070a orr.w r7, fp, sl 8021d24: f844 7c08 str.w r7, [r4, #-8] 8021d28: dcec bgt.n 8021d04 8021d2a: 429a cmp r2, r3 8021d2c: d9c5 bls.n 8021cba 8021d2e: 3301 adds r3, #1 8021d30: 3101 adds r1, #1 8021d32: 3201 adds r2, #1 8021d34: f811 4c01 ldrb.w r4, [r1, #-1] 8021d38: 3301 adds r3, #1 8021d3a: 3101 adds r1, #1 8021d3c: 4293 cmp r3, r2 8021d3e: f803 4c02 strb.w r4, [r3, #-2] 8021d42: d1f7 bne.n 8021d34 8021d44: e7b9 b.n 8021cba 8021d46: 680c ldr r4, [r1, #0] 8021d48: 3340 adds r3, #64 ; 0x40 8021d4a: 3140 adds r1, #64 ; 0x40 8021d4c: f843 4c40 str.w r4, [r3, #-64] 8021d50: f851 4c3c ldr.w r4, [r1, #-60] 8021d54: f843 4c3c str.w r4, [r3, #-60] 8021d58: f851 4c38 ldr.w r4, [r1, #-56] 8021d5c: f843 4c38 str.w r4, [r3, #-56] 8021d60: f851 4c34 ldr.w r4, [r1, #-52] 8021d64: f843 4c34 str.w r4, [r3, #-52] 8021d68: f851 4c30 ldr.w r4, [r1, #-48] 8021d6c: f843 4c30 str.w r4, [r3, #-48] 8021d70: f851 4c2c ldr.w r4, [r1, #-44] 8021d74: f843 4c2c str.w r4, [r3, #-44] 8021d78: f851 4c28 ldr.w r4, [r1, #-40] 8021d7c: f843 4c28 str.w r4, [r3, #-40] 8021d80: f851 4c24 ldr.w r4, [r1, #-36] 8021d84: f843 4c24 str.w r4, [r3, #-36] 8021d88: f851 4c20 ldr.w r4, [r1, #-32] 8021d8c: f843 4c20 str.w r4, [r3, #-32] 8021d90: f851 4c1c ldr.w r4, [r1, #-28] 8021d94: f843 4c1c str.w r4, [r3, #-28] 8021d98: f851 4c18 ldr.w r4, [r1, #-24] 8021d9c: f843 4c18 str.w r4, [r3, #-24] 8021da0: f851 4c14 ldr.w r4, [r1, #-20] 8021da4: f843 4c14 str.w r4, [r3, #-20] 8021da8: f851 4c10 ldr.w r4, [r1, #-16] 8021dac: f843 4c10 str.w r4, [r3, #-16] 8021db0: f851 4c0c ldr.w r4, [r1, #-12] 8021db4: f843 4c0c str.w r4, [r3, #-12] 8021db8: f851 4c08 ldr.w r4, [r1, #-8] 8021dbc: f843 4c08 str.w r4, [r3, #-8] 8021dc0: f851 4c04 ldr.w r4, [r1, #-4] 8021dc4: f843 4c04 str.w r4, [r3, #-4] 8021dc8: 1ad4 subs r4, r2, r3 8021dca: 2c3f cmp r4, #63 ; 0x3f 8021dcc: dcbb bgt.n 8021d46 8021dce: e011 b.n 8021df4 8021dd0: 680c ldr r4, [r1, #0] 8021dd2: 3310 adds r3, #16 8021dd4: 3110 adds r1, #16 8021dd6: f843 4c10 str.w r4, [r3, #-16] 8021dda: f851 4c0c ldr.w r4, [r1, #-12] 8021dde: f843 4c0c str.w r4, [r3, #-12] 8021de2: f851 4c08 ldr.w r4, [r1, #-8] 8021de6: f843 4c08 str.w r4, [r3, #-8] 8021dea: f851 4c04 ldr.w r4, [r1, #-4] 8021dee: f843 4c04 str.w r4, [r3, #-4] 8021df2: 1ad4 subs r4, r2, r3 8021df4: 2c0f cmp r4, #15 8021df6: dceb bgt.n 8021dd0 8021df8: 2c03 cmp r4, #3 8021dfa: dd96 ble.n 8021d2a 8021dfc: 1d1c adds r4, r3, #4 8021dfe: 1d0d adds r5, r1, #4 8021e00: f855 7c04 ldr.w r7, [r5, #-4] 8021e04: 1b16 subs r6, r2, r4 8021e06: 4623 mov r3, r4 8021e08: 4629 mov r1, r5 8021e0a: 3404 adds r4, #4 8021e0c: 3504 adds r5, #4 8021e0e: 2e03 cmp r6, #3 8021e10: f844 7c08 str.w r7, [r4, #-8] 8021e14: dcf4 bgt.n 8021e00 8021e16: e788 b.n 8021d2a 08021e18 : 8021e18: 2a03 cmp r2, #3 8021e1a: b2c9 uxtb r1, r1 8021e1c: b470 push {r4, r5, r6} 8021e1e: d808 bhi.n 8021e32 8021e20: b12a cbz r2, 8021e2e 8021e22: 4603 mov r3, r0 8021e24: 1812 adds r2, r2, r0 8021e26: f803 1b01 strb.w r1, [r3], #1 8021e2a: 4293 cmp r3, r2 8021e2c: d1fb bne.n 8021e26 8021e2e: bc70 pop {r4, r5, r6} 8021e30: 4770 bx lr 8021e32: 0783 lsls r3, r0, #30 8021e34: 4402 add r2, r0 8021e36: d009 beq.n 8021e4c 8021e38: 1c44 adds r4, r0, #1 8021e3a: f004 0503 and.w r5, r4, #3 8021e3e: 4623 mov r3, r4 8021e40: f804 1c01 strb.w r1, [r4, #-1] 8021e44: 3401 adds r4, #1 8021e46: 2d00 cmp r5, #0 8021e48: d1f7 bne.n 8021e3a 8021e4a: e000 b.n 8021e4e 8021e4c: 4603 mov r3, r0 8021e4e: 1ad5 subs r5, r2, r3 8021e50: eb01 2401 add.w r4, r1, r1, lsl #8 8021e54: 2d3f cmp r5, #63 ; 0x3f 8021e56: eb04 4404 add.w r4, r4, r4, lsl #16 8021e5a: dd2c ble.n 8021eb6 8021e5c: 601c str r4, [r3, #0] 8021e5e: 3340 adds r3, #64 ; 0x40 8021e60: 1ad5 subs r5, r2, r3 8021e62: f843 4c3c str.w r4, [r3, #-60] 8021e66: 2d3f cmp r5, #63 ; 0x3f 8021e68: f843 4c38 str.w r4, [r3, #-56] 8021e6c: f843 4c34 str.w r4, [r3, #-52] 8021e70: f843 4c30 str.w r4, [r3, #-48] 8021e74: f843 4c2c str.w r4, [r3, #-44] 8021e78: f843 4c28 str.w r4, [r3, #-40] 8021e7c: f843 4c24 str.w r4, [r3, #-36] 8021e80: f843 4c20 str.w r4, [r3, #-32] 8021e84: f843 4c1c str.w r4, [r3, #-28] 8021e88: f843 4c18 str.w r4, [r3, #-24] 8021e8c: f843 4c14 str.w r4, [r3, #-20] 8021e90: f843 4c10 str.w r4, [r3, #-16] 8021e94: f843 4c0c str.w r4, [r3, #-12] 8021e98: f843 4c08 str.w r4, [r3, #-8] 8021e9c: f843 4c04 str.w r4, [r3, #-4] 8021ea0: dcdc bgt.n 8021e5c 8021ea2: e008 b.n 8021eb6 8021ea4: 601c str r4, [r3, #0] 8021ea6: 3310 adds r3, #16 8021ea8: 1ad5 subs r5, r2, r3 8021eaa: f843 4c0c str.w r4, [r3, #-12] 8021eae: f843 4c08 str.w r4, [r3, #-8] 8021eb2: f843 4c04 str.w r4, [r3, #-4] 8021eb6: 2d0f cmp r5, #15 8021eb8: dcf4 bgt.n 8021ea4 8021eba: 2d03 cmp r5, #3 8021ebc: dd08 ble.n 8021ed0 8021ebe: 1d1d adds r5, r3, #4 8021ec0: 1b56 subs r6, r2, r5 8021ec2: f845 4c04 str.w r4, [r5, #-4] 8021ec6: 2e03 cmp r6, #3 8021ec8: 462b mov r3, r5 8021eca: f105 0504 add.w r5, r5, #4 8021ece: dcf7 bgt.n 8021ec0 8021ed0: 429a cmp r2, r3 8021ed2: d9ac bls.n 8021e2e 8021ed4: 3301 adds r3, #1 8021ed6: 3201 adds r2, #1 8021ed8: f803 1c01 strb.w r1, [r3, #-1] 8021edc: 3301 adds r3, #1 8021ede: 4293 cmp r3, r2 8021ee0: d1fa bne.n 8021ed8 8021ee2: e7a4 b.n 8021e2e 08021ee4 : 8021ee4: 0783 lsls r3, r0, #30 8021ee6: b570 push {r4, r5, r6, lr} 8021ee8: 4606 mov r6, r0 8021eea: d114 bne.n 8021f16 8021eec: 6803 ldr r3, [r0, #0] 8021eee: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021ef2: ea22 0303 bic.w r3, r2, r3 8021ef6: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8021efa: d10c bne.n 8021f16 8021efc: 1d03 adds r3, r0, #4 8021efe: 461a mov r2, r3 8021f00: f853 4b04 ldr.w r4, [r3], #4 8021f04: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8021f08: ea25 0404 bic.w r4, r5, r4 8021f0c: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8021f10: d0f5 beq.n 8021efe 8021f12: 4610 mov r0, r2 8021f14: e000 b.n 8021f18 8021f16: 4630 mov r0, r6 8021f18: 7803 ldrb r3, [r0, #0] 8021f1a: b12b cbz r3, 8021f28 8021f1c: 1c43 adds r3, r0, #1 8021f1e: 4618 mov r0, r3 8021f20: 3301 adds r3, #1 8021f22: 7804 ldrb r4, [r0, #0] 8021f24: 2c00 cmp r4, #0 8021f26: d1fa bne.n 8021f1e 8021f28: f000 f8f0 bl 802210c 8021f2c: 4630 mov r0, r6 8021f2e: bd70 pop {r4, r5, r6, pc} 08021f30 : 8021f30: ea80 0201 eor.w r2, r0, r1 8021f34: f012 0f03 tst.w r2, #3 8021f38: f040 803a bne.w 8021fb0 8021f3c: f010 0203 ands.w r2, r0, #3 8021f40: f020 0003 bic.w r0, r0, #3 8021f44: f021 0103 bic.w r1, r1, #3 8021f48: f850 cb04 ldr.w ip, [r0], #4 8021f4c: bf08 it eq 8021f4e: f851 3b04 ldreq.w r3, [r1], #4 8021f52: d00d beq.n 8021f70 8021f54: f082 0203 eor.w r2, r2, #3 8021f58: ea4f 02c2 mov.w r2, r2, lsl #3 8021f5c: f06f 437f mvn.w r3, #4278190080 ; 0xff000000 8021f60: fa23 f202 lsr.w r2, r3, r2 8021f64: f851 3b04 ldr.w r3, [r1], #4 8021f68: ea4c 0c02 orr.w ip, ip, r2 8021f6c: ea43 0302 orr.w r3, r3, r2 8021f70: f1ac 3201 sub.w r2, ip, #16843009 ; 0x1010101 8021f74: 459c cmp ip, r3 8021f76: bf01 itttt eq 8021f78: ea22 020c biceq.w r2, r2, ip 8021f7c: f012 3f80 tsteq.w r2, #2155905152 ; 0x80808080 8021f80: f850 cb04 ldreq.w ip, [r0], #4 8021f84: f851 3b04 ldreq.w r3, [r1], #4 8021f88: d0f2 beq.n 8021f70 8021f8a: ea4f 600c mov.w r0, ip, lsl #24 8021f8e: ea4f 2c1c mov.w ip, ip, lsr #8 8021f92: 2801 cmp r0, #1 8021f94: bf28 it cs 8021f96: ebb0 6f03 cmpcs.w r0, r3, lsl #24 8021f9a: bf08 it eq 8021f9c: 0a1b lsreq r3, r3, #8 8021f9e: d0f4 beq.n 8021f8a 8021fa0: f003 03ff and.w r3, r3, #255 ; 0xff 8021fa4: ea4f 6010 mov.w r0, r0, lsr #24 8021fa8: eba0 0003 sub.w r0, r0, r3 8021fac: 4770 bx lr 8021fae: bf00 nop 08021fb0 : 8021fb0: f010 0f03 tst.w r0, #3 8021fb4: d00a beq.n 8021fcc 8021fb6: f810 2b01 ldrb.w r2, [r0], #1 8021fba: f811 3b01 ldrb.w r3, [r1], #1 8021fbe: 2a01 cmp r2, #1 8021fc0: bf28 it cs 8021fc2: 429a cmpcs r2, r3 8021fc4: d0f4 beq.n 8021fb0 8021fc6: eba2 0003 sub.w r0, r2, r3 8021fca: 4770 bx lr 8021fcc: f84d 5d04 str.w r5, [sp, #-4]! 8021fd0: f84d 4d04 str.w r4, [sp, #-4]! 8021fd4: f04f 0201 mov.w r2, #1 8021fd8: ea42 2202 orr.w r2, r2, r2, lsl #8 8021fdc: ea42 4202 orr.w r2, r2, r2, lsl #16 8021fe0: f001 0c03 and.w ip, r1, #3 8021fe4: f021 0103 bic.w r1, r1, #3 8021fe8: f850 4b04 ldr.w r4, [r0], #4 8021fec: f851 5b04 ldr.w r5, [r1], #4 8021ff0: f1bc 0f02 cmp.w ip, #2 8021ff4: d026 beq.n 8022044 8021ff6: d84b bhi.n 8022090 8021ff8: f024 4c7f bic.w ip, r4, #4278190080 ; 0xff000000 8021ffc: ebbc 2f15 cmp.w ip, r5, lsr #8 8022000: eba4 0302 sub.w r3, r4, r2 8022004: ea23 0304 bic.w r3, r3, r4 8022008: d10d bne.n 8022026 802200a: ea13 13c2 ands.w r3, r3, r2, lsl #7 802200e: bf08 it eq 8022010: f851 5b04 ldreq.w r5, [r1], #4 8022014: d10a bne.n 802202c 8022016: ea8c 0c04 eor.w ip, ip, r4 802201a: ebbc 6f05 cmp.w ip, r5, lsl #24 802201e: d10c bne.n 802203a 8022020: f850 4b04 ldr.w r4, [r0], #4 8022024: e7e8 b.n 8021ff8 8022026: ea4f 2515 mov.w r5, r5, lsr #8 802202a: e05c b.n 80220e6 802202c: f033 437f bics.w r3, r3, #4278190080 ; 0xff000000 8022030: d152 bne.n 80220d8 8022032: 780d ldrb r5, [r1, #0] 8022034: ea4f 6c14 mov.w ip, r4, lsr #24 8022038: e055 b.n 80220e6 802203a: ea4f 6c14 mov.w ip, r4, lsr #24 802203e: f005 05ff and.w r5, r5, #255 ; 0xff 8022042: e050 b.n 80220e6 8022044: ea4f 4c04 mov.w ip, r4, lsl #16 8022048: eba4 0302 sub.w r3, r4, r2 802204c: ea4f 4c1c mov.w ip, ip, lsr #16 8022050: ea23 0304 bic.w r3, r3, r4 8022054: ebbc 4f15 cmp.w ip, r5, lsr #16 8022058: d117 bne.n 802208a 802205a: ea13 13c2 ands.w r3, r3, r2, lsl #7 802205e: bf08 it eq 8022060: f851 5b04 ldreq.w r5, [r1], #4 8022064: d107 bne.n 8022076 8022066: ea8c 0c04 eor.w ip, ip, r4 802206a: ebbc 4f05 cmp.w ip, r5, lsl #16 802206e: d108 bne.n 8022082 8022070: f850 4b04 ldr.w r4, [r0], #4 8022074: e7e6 b.n 8022044 8022076: 041b lsls r3, r3, #16 8022078: d12e bne.n 80220d8 802207a: 880d ldrh r5, [r1, #0] 802207c: ea4f 4c14 mov.w ip, r4, lsr #16 8022080: e031 b.n 80220e6 8022082: ea4f 4505 mov.w r5, r5, lsl #16 8022086: ea4f 4c14 mov.w ip, r4, lsr #16 802208a: ea4f 4515 mov.w r5, r5, lsr #16 802208e: e02a b.n 80220e6 8022090: f004 0cff and.w ip, r4, #255 ; 0xff 8022094: ebbc 6f15 cmp.w ip, r5, lsr #24 8022098: eba4 0302 sub.w r3, r4, r2 802209c: ea23 0304 bic.w r3, r3, r4 80220a0: d10d bne.n 80220be 80220a2: ea13 13c2 ands.w r3, r3, r2, lsl #7 80220a6: bf08 it eq 80220a8: f851 5b04 ldreq.w r5, [r1], #4 80220ac: d10a bne.n 80220c4 80220ae: ea8c 0c04 eor.w ip, ip, r4 80220b2: ebbc 2f05 cmp.w ip, r5, lsl #8 80220b6: d10a bne.n 80220ce 80220b8: f850 4b04 ldr.w r4, [r0], #4 80220bc: e7e8 b.n 8022090 80220be: ea4f 6515 mov.w r5, r5, lsr #24 80220c2: e010 b.n 80220e6 80220c4: f014 0fff tst.w r4, #255 ; 0xff 80220c8: d006 beq.n 80220d8 80220ca: f851 5b04 ldr.w r5, [r1], #4 80220ce: ea4f 2c14 mov.w ip, r4, lsr #8 80220d2: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 80220d6: e006 b.n 80220e6 80220d8: f04f 0000 mov.w r0, #0 80220dc: f85d 4b04 ldr.w r4, [sp], #4 80220e0: f85d 5b04 ldr.w r5, [sp], #4 80220e4: 4770 bx lr 80220e6: f00c 02ff and.w r2, ip, #255 ; 0xff 80220ea: f005 00ff and.w r0, r5, #255 ; 0xff 80220ee: 2801 cmp r0, #1 80220f0: bf28 it cs 80220f2: 4290 cmpcs r0, r2 80220f4: bf04 itt eq 80220f6: ea4f 2c1c moveq.w ip, ip, lsr #8 80220fa: 0a2d lsreq r5, r5, #8 80220fc: d0f3 beq.n 80220e6 80220fe: eba2 0000 sub.w r0, r2, r0 8022102: f85d 4b04 ldr.w r4, [sp], #4 8022106: f85d 5b04 ldr.w r5, [sp], #4 802210a: 4770 bx lr 0802210c : 802210c: ea80 0201 eor.w r2, r0, r1 8022110: 4684 mov ip, r0 8022112: f012 0f03 tst.w r2, #3 8022116: d14f bne.n 80221b8 8022118: f011 0f03 tst.w r1, #3 802211c: d132 bne.n 8022184 802211e: f84d 4d04 str.w r4, [sp, #-4]! 8022122: f011 0f04 tst.w r1, #4 8022126: f851 3b04 ldr.w r3, [r1], #4 802212a: d00b beq.n 8022144 802212c: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8022130: 439a bics r2, r3 8022132: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8022136: bf04 itt eq 8022138: f84c 3b04 streq.w r3, [ip], #4 802213c: f851 3b04 ldreq.w r3, [r1], #4 8022140: d116 bne.n 8022170 8022142: bf00 nop 8022144: f851 4b04 ldr.w r4, [r1], #4 8022148: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 802214c: 439a bics r2, r3 802214e: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8022152: f1a4 3201 sub.w r2, r4, #16843009 ; 0x1010101 8022156: d10b bne.n 8022170 8022158: f84c 3b04 str.w r3, [ip], #4 802215c: 43a2 bics r2, r4 802215e: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8022162: bf04 itt eq 8022164: f851 3b04 ldreq.w r3, [r1], #4 8022168: f84c 4b04 streq.w r4, [ip], #4 802216c: d0ea beq.n 8022144 802216e: 4623 mov r3, r4 8022170: f80c 3b01 strb.w r3, [ip], #1 8022174: f013 0fff tst.w r3, #255 ; 0xff 8022178: ea4f 2333 mov.w r3, r3, ror #8 802217c: d1f8 bne.n 8022170 802217e: f85d 4b04 ldr.w r4, [sp], #4 8022182: 4770 bx lr 8022184: f011 0f01 tst.w r1, #1 8022188: d006 beq.n 8022198 802218a: f811 2b01 ldrb.w r2, [r1], #1 802218e: f80c 2b01 strb.w r2, [ip], #1 8022192: 2a00 cmp r2, #0 8022194: bf08 it eq 8022196: 4770 bxeq lr 8022198: f011 0f02 tst.w r1, #2 802219c: d0bf beq.n 802211e 802219e: f831 2b02 ldrh.w r2, [r1], #2 80221a2: f012 0fff tst.w r2, #255 ; 0xff 80221a6: bf16 itet ne 80221a8: f82c 2b02 strhne.w r2, [ip], #2 80221ac: f88c 2000 strbeq.w r2, [ip] 80221b0: f412 4f7f tstne.w r2, #65280 ; 0xff00 80221b4: d1b3 bne.n 802211e 80221b6: 4770 bx lr 80221b8: f811 2b01 ldrb.w r2, [r1], #1 80221bc: f80c 2b01 strb.w r2, [ip], #1 80221c0: 2a00 cmp r2, #0 80221c2: d1f9 bne.n 80221b8 80221c4: 4770 bx lr 80221c6: bf00 nop 080221c8 : 80221c8: f020 0103 bic.w r1, r0, #3 80221cc: f010 0003 ands.w r0, r0, #3 80221d0: f1c0 0000 rsb r0, r0, #0 80221d4: f851 3b04 ldr.w r3, [r1], #4 80221d8: f100 0c04 add.w ip, r0, #4 80221dc: ea4f 0ccc mov.w ip, ip, lsl #3 80221e0: f06f 0200 mvn.w r2, #0 80221e4: bf1c itt ne 80221e6: fa22 f20c lsrne.w r2, r2, ip 80221ea: 4313 orrne r3, r2 80221ec: f04f 0c01 mov.w ip, #1 80221f0: ea4c 2c0c orr.w ip, ip, ip, lsl #8 80221f4: ea4c 4c0c orr.w ip, ip, ip, lsl #16 80221f8: eba3 020c sub.w r2, r3, ip 80221fc: ea22 0203 bic.w r2, r2, r3 8022200: ea12 12cc ands.w r2, r2, ip, lsl #7 8022204: bf04 itt eq 8022206: f851 3b04 ldreq.w r3, [r1], #4 802220a: 3004 addeq r0, #4 802220c: d0f4 beq.n 80221f8 802220e: f013 0fff tst.w r3, #255 ; 0xff 8022212: bf1f itttt ne 8022214: 3001 addne r0, #1 8022216: f413 4f7f tstne.w r3, #65280 ; 0xff00 802221a: 3001 addne r0, #1 802221c: f413 0f7f tstne.w r3, #16711680 ; 0xff0000 8022220: bf18 it ne 8022222: 3001 addne r0, #1 8022224: 4770 bx lr 8022226: bf00 nop 08022228 : 8022228: 0783 lsls r3, r0, #30 802222a: b470 push {r4, r5, r6} 802222c: d113 bne.n 8022256 802222e: 6803 ldr r3, [r0, #0] 8022230: f1a3 3401 sub.w r4, r3, #16843009 ; 0x1010101 8022234: ea24 0303 bic.w r3, r4, r3 8022238: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802223c: d10b bne.n 8022256 802223e: 1d03 adds r3, r0, #4 8022240: 461d mov r5, r3 8022242: f853 4b04 ldr.w r4, [r3], #4 8022246: f1a4 3601 sub.w r6, r4, #16843009 ; 0x1010101 802224a: ea26 0404 bic.w r4, r6, r4 802224e: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8022252: d0f5 beq.n 8022240 8022254: e000 b.n 8022258 8022256: 4605 mov r5, r0 8022258: 782b ldrb r3, [r5, #0] 802225a: b12b cbz r3, 8022268 802225c: 1c6b adds r3, r5, #1 802225e: 461d mov r5, r3 8022260: 3301 adds r3, #1 8022262: 782c ldrb r4, [r5, #0] 8022264: 2c00 cmp r4, #0 8022266: d1fa bne.n 802225e 8022268: 3901 subs r1, #1 802226a: 3d01 subs r5, #1 802226c: 1e53 subs r3, r2, #1 802226e: b15a cbz r2, 8022288 8022270: f811 4f01 ldrb.w r4, [r1, #1]! 8022274: 461a mov r2, r3 8022276: f805 4f01 strb.w r4, [r5, #1]! 802227a: b12c cbz r4, 8022288 802227c: 2b00 cmp r3, #0 802227e: d1f5 bne.n 802226c 8022280: 706b strb r3, [r5, #1] 8022282: 1e53 subs r3, r2, #1 8022284: 2a00 cmp r2, #0 8022286: d1f3 bne.n 8022270 8022288: bc70 pop {r4, r5, r6} 802228a: 4770 bx lr 0802228c : 802228c: b470 push {r4, r5, r6} 802228e: 2a00 cmp r2, #0 8022290: d045 beq.n 802231e 8022292: ea41 0300 orr.w r3, r1, r0 8022296: f013 0303 ands.w r3, r3, #3 802229a: d129 bne.n 80222f0 802229c: 2a03 cmp r2, #3 802229e: d927 bls.n 80222f0 80222a0: 6805 ldr r5, [r0, #0] 80222a2: 680c ldr r4, [r1, #0] 80222a4: 42a5 cmp r5, r4 80222a6: d123 bne.n 80222f0 80222a8: 1f14 subs r4, r2, #4 80222aa: d03a beq.n 8022322 80222ac: f1a5 3201 sub.w r2, r5, #16843009 ; 0x1010101 80222b0: ea22 0505 bic.w r5, r2, r5 80222b4: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 80222b8: d00d beq.n 80222d6 80222ba: e03a b.n 8022332 80222bc: 685b ldr r3, [r3, #4] 80222be: 686a ldr r2, [r5, #4] 80222c0: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 80222c4: 4293 cmp r3, r2 80222c6: ea25 0503 bic.w r5, r5, r3 80222ca: d12e bne.n 802232a 80222cc: 3c04 subs r4, #4 80222ce: d028 beq.n 8022322 80222d0: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 80222d4: d127 bne.n 8022326 80222d6: 460d mov r5, r1 80222d8: 4603 mov r3, r0 80222da: 3104 adds r1, #4 80222dc: 3004 adds r0, #4 80222de: 2c03 cmp r4, #3 80222e0: d8ec bhi.n 80222bc 80222e2: 1e66 subs r6, r4, #1 80222e4: b92c cbnz r4, 80222f2 80222e6: 791c ldrb r4, [r3, #4] 80222e8: 792a ldrb r2, [r5, #4] 80222ea: 1aa0 subs r0, r4, r2 80222ec: bc70 pop {r4, r5, r6} 80222ee: 4770 bx lr 80222f0: 1e56 subs r6, r2, #1 80222f2: 7804 ldrb r4, [r0, #0] 80222f4: 780a ldrb r2, [r1, #0] 80222f6: 4294 cmp r4, r2 80222f8: d1f7 bne.n 80222ea 80222fa: b1c6 cbz r6, 802232e 80222fc: b18c cbz r4, 8022322 80222fe: 3601 adds r6, #1 8022300: 1c8b adds r3, r1, #2 8022302: 1989 adds r1, r1, r6 8022304: e004 b.n 8022310 8022306: 428b cmp r3, r1 8022308: f103 0301 add.w r3, r3, #1 802230c: d00b beq.n 8022326 802230e: b144 cbz r4, 8022322 8022310: f813 2c01 ldrb.w r2, [r3, #-1] 8022314: f810 4f01 ldrb.w r4, [r0, #1]! 8022318: 4294 cmp r4, r2 802231a: d0f4 beq.n 8022306 802231c: e7e5 b.n 80222ea 802231e: 4610 mov r0, r2 8022320: e7e4 b.n 80222ec 8022322: 4620 mov r0, r4 8022324: e7e2 b.n 80222ec 8022326: 2000 movs r0, #0 8022328: e7e0 b.n 80222ec 802232a: 1e66 subs r6, r4, #1 802232c: e7e1 b.n 80222f2 802232e: 4630 mov r0, r6 8022330: e7dc b.n 80222ec 8022332: 4618 mov r0, r3 8022334: e7da b.n 80222ec 8022336: bf00 nop 08022338 : 8022338: ea41 0300 orr.w r3, r1, r0 802233c: f013 0f03 tst.w r3, #3 8022340: 4603 mov r3, r0 8022342: b470 push {r4, r5, r6} 8022344: d025 beq.n 8022392 8022346: b1aa cbz r2, 8022374 8022348: 780c ldrb r4, [r1, #0] 802234a: 3a01 subs r2, #1 802234c: f803 4b01 strb.w r4, [r3], #1 8022350: b14c cbz r4, 8022366 8022352: 461c mov r4, r3 8022354: b172 cbz r2, 8022374 8022356: f811 5f01 ldrb.w r5, [r1, #1]! 802235a: 3a01 subs r2, #1 802235c: f804 5b01 strb.w r5, [r4], #1 8022360: 4623 mov r3, r4 8022362: 2d00 cmp r5, #0 8022364: d1f6 bne.n 8022354 8022366: b12a cbz r2, 8022374 8022368: 189a adds r2, r3, r2 802236a: 2100 movs r1, #0 802236c: f803 1b01 strb.w r1, [r3], #1 8022370: 4293 cmp r3, r2 8022372: d1fb bne.n 802236c 8022374: bc70 pop {r4, r5, r6} 8022376: 4770 bx lr 8022378: 460e mov r6, r1 802237a: f851 4b04 ldr.w r4, [r1], #4 802237e: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8022382: ea25 0504 bic.w r5, r5, r4 8022386: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 802238a: d105 bne.n 8022398 802238c: 3a04 subs r2, #4 802238e: f843 4b04 str.w r4, [r3], #4 8022392: 2a03 cmp r2, #3 8022394: d8f0 bhi.n 8022378 8022396: e7d6 b.n 8022346 8022398: 4631 mov r1, r6 802239a: e7d4 b.n 8022346 0802239c : 802239c: b4f0 push {r4, r5, r6, r7} 802239e: 7804 ldrb r4, [r0, #0] 80223a0: 2c00 cmp r4, #0 80223a2: d021 beq.n 80223e8 80223a4: 780f ldrb r7, [r1, #0] 80223a6: 4606 mov r6, r0 80223a8: 4630 mov r0, r6 80223aa: b1af cbz r7, 80223d8 80223ac: 42a7 cmp r7, r4 80223ae: d019 beq.n 80223e4 80223b0: 1c4b adds r3, r1, #1 80223b2: e001 b.n 80223b8 80223b4: 4294 cmp r4, r2 80223b6: d009 beq.n 80223cc 80223b8: 461d mov r5, r3 80223ba: f813 2b01 ldrb.w r2, [r3], #1 80223be: 2a00 cmp r2, #0 80223c0: d1f8 bne.n 80223b4 80223c2: 7844 ldrb r4, [r0, #1] 80223c4: 3601 adds r6, #1 80223c6: 2c00 cmp r4, #0 80223c8: d1ee bne.n 80223a8 80223ca: 782a ldrb r2, [r5, #0] 80223cc: 2a00 cmp r2, #0 80223ce: bf14 ite ne 80223d0: 4630 movne r0, r6 80223d2: 2000 moveq r0, #0 80223d4: bcf0 pop {r4, r5, r6, r7} 80223d6: 4770 bx lr 80223d8: 7844 ldrb r4, [r0, #1] 80223da: 460d mov r5, r1 80223dc: 3601 adds r6, #1 80223de: 2c00 cmp r4, #0 80223e0: d1e2 bne.n 80223a8 80223e2: e7f2 b.n 80223ca 80223e4: 463a mov r2, r7 80223e6: e7f1 b.n 80223cc 80223e8: 4620 mov r0, r4 80223ea: e7f3 b.n 80223d4 080223ec : 80223ec: e92d 07f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl} 80223f0: 2701 movs r7, #1 80223f2: 463c mov r4, r7 80223f4: 2500 movs r5, #0 80223f6: f04f 36ff mov.w r6, #4294967295 80223fa: 1963 adds r3, r4, r5 80223fc: eb00 0c06 add.w ip, r0, r6 8022400: 428b cmp r3, r1 8022402: d20d bcs.n 8022420 8022404: f81c c004 ldrb.w ip, [ip, r4] 8022408: f810 8003 ldrb.w r8, [r0, r3] 802240c: 45e0 cmp r8, ip 802240e: d22e bcs.n 802246e 8022410: 2401 movs r4, #1 8022412: 461d mov r5, r3 8022414: 1b9f subs r7, r3, r6 8022416: 1963 adds r3, r4, r5 8022418: 428b cmp r3, r1 802241a: eb00 0c06 add.w ip, r0, r6 802241e: d3f1 bcc.n 8022404 8022420: f04f 0a01 mov.w sl, #1 8022424: 2500 movs r5, #0 8022426: 4654 mov r4, sl 8022428: f04f 3cff mov.w ip, #4294967295 802242c: 6017 str r7, [r2, #0] 802242e: 1963 adds r3, r4, r5 8022430: eb00 080c add.w r8, r0, ip 8022434: 4299 cmp r1, r3 8022436: d90e bls.n 8022456 8022438: f818 8004 ldrb.w r8, [r8, r4] 802243c: f810 9003 ldrb.w r9, [r0, r3] 8022440: 45c1 cmp r9, r8 8022442: d91a bls.n 802247a 8022444: 2401 movs r4, #1 8022446: 461d mov r5, r3 8022448: ebcc 0a03 rsb sl, ip, r3 802244c: 1963 adds r3, r4, r5 802244e: 4299 cmp r1, r3 8022450: eb00 080c add.w r8, r0, ip 8022454: d8f0 bhi.n 8022438 8022456: f10c 0001 add.w r0, ip, #1 802245a: 3601 adds r6, #1 802245c: 42b0 cmp r0, r6 802245e: bf3c itt cc 8022460: 46ba movcc sl, r7 8022462: 4630 movcc r0, r6 8022464: f8c2 a000 str.w sl, [r2] 8022468: e8bd 07f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl} 802246c: 4770 bx lr 802246e: d00b beq.n 8022488 8022470: 2701 movs r7, #1 8022472: 462e mov r6, r5 8022474: 463c mov r4, r7 8022476: 19ed adds r5, r5, r7 8022478: e7bf b.n 80223fa 802247a: d009 beq.n 8022490 802247c: f04f 0a01 mov.w sl, #1 8022480: 46ac mov ip, r5 8022482: 4654 mov r4, sl 8022484: 4455 add r5, sl 8022486: e7d2 b.n 802242e 8022488: 42bc cmp r4, r7 802248a: d005 beq.n 8022498 802248c: 3401 adds r4, #1 802248e: e7b4 b.n 80223fa 8022490: 4554 cmp r4, sl 8022492: d005 beq.n 80224a0 8022494: 3401 adds r4, #1 8022496: e7ca b.n 802242e 8022498: 4627 mov r7, r4 802249a: 461d mov r5, r3 802249c: 2401 movs r4, #1 802249e: e7ac b.n 80223fa 80224a0: 46a2 mov sl, r4 80224a2: 461d mov r5, r3 80224a4: 2401 movs r4, #1 80224a6: e7c2 b.n 802242e 080224a8 : 80224a8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80224ac: f2ad 4d24 subw sp, sp, #1060 ; 0x424 80224b0: 4616 mov r6, r2 80224b2: 4680 mov r8, r0 80224b4: 460c mov r4, r1 80224b6: 4610 mov r0, r2 80224b8: 4619 mov r1, r3 80224ba: aa07 add r2, sp, #28 80224bc: 461d mov r5, r3 80224be: f7ff ff95 bl 80223ec 80224c2: ab07 add r3, sp, #28 80224c4: f20d 421c addw r2, sp, #1052 ; 0x41c 80224c8: 9003 str r0, [sp, #12] 80224ca: f843 5f04 str.w r5, [r3, #4]! 80224ce: 4293 cmp r3, r2 80224d0: d1fb bne.n 80224ca 80224d2: 1e6f subs r7, r5, #1 80224d4: 2300 movs r3, #0 80224d6: a808 add r0, sp, #32 80224d8: b135 cbz r5, 80224e8 80224da: 5cf2 ldrb r2, [r6, r3] 80224dc: 1af9 subs r1, r7, r3 80224de: 3301 adds r3, #1 80224e0: 42ab cmp r3, r5 80224e2: f840 1022 str.w r1, [r0, r2, lsl #2] 80224e6: d1f8 bne.n 80224da 80224e8: 9907 ldr r1, [sp, #28] 80224ea: 4630 mov r0, r6 80224ec: 9a03 ldr r2, [sp, #12] 80224ee: 1871 adds r1, r6, r1 80224f0: f7ff fba6 bl 8021c40 80224f4: 2800 cmp r0, #0 80224f6: d17f bne.n 80225f8 80224f8: f8dd c00c ldr.w ip, [sp, #12] 80224fc: 4622 mov r2, r4 80224fe: 4682 mov sl, r0 8022500: 1e6f subs r7, r5, #1 8022502: f10c 3cff add.w ip, ip, #4294967295 8022506: f8cd c008 str.w ip, [sp, #8] 802250a: 44b4 add ip, r6 802250c: f8cd c014 str.w ip, [sp, #20] 8022510: f8dd c00c ldr.w ip, [sp, #12] 8022514: 4604 mov r4, r0 8022516: 9501 str r5, [sp, #4] 8022518: f1cc 0c01 rsb ip, ip, #1 802251c: f8cd c010 str.w ip, [sp, #16] 8022520: e009 b.n 8022536 8022522: b134 cbz r4, 8022532 8022524: 9a07 ldr r2, [sp, #28] 8022526: 4293 cmp r3, r2 8022528: bf3e ittt cc 802252a: 4604 movcc r4, r0 802252c: 9901 ldrcc r1, [sp, #4] 802252e: ebc2 0301 rsbcc r3, r2, r1 8022532: 449a add sl, r3 8022534: 462a mov r2, r5 8022536: 9b01 ldr r3, [sp, #4] 8022538: eb08 0002 add.w r0, r8, r2 802253c: 2100 movs r1, #0 802253e: eb0a 0503 add.w r5, sl, r3 8022542: 1aaa subs r2, r5, r2 8022544: f002 fa90 bl 8024a68 8022548: 2800 cmp r0, #0 802254a: d14f bne.n 80225ec 802254c: 2d00 cmp r5, #0 802254e: d04d beq.n 80225ec 8022550: eb08 0305 add.w r3, r8, r5 8022554: a908 add r1, sp, #32 8022556: f813 3c01 ldrb.w r3, [r3, #-1] 802255a: f851 3023 ldr.w r3, [r1, r3, lsl #2] 802255e: 2b00 cmp r3, #0 8022560: d1df bne.n 8022522 8022562: 9a03 ldr r2, [sp, #12] 8022564: 4294 cmp r4, r2 8022566: bf28 it cs 8022568: 4622 movcs r2, r4 802256a: 42ba cmp r2, r7 802256c: d211 bcs.n 8022592 802256e: eb08 030a add.w r3, r8, sl 8022572: f816 c002 ldrb.w ip, [r6, r2] 8022576: 18b1 adds r1, r6, r2 8022578: 5c98 ldrb r0, [r3, r2] 802257a: 4584 cmp ip, r0 802257c: d006 beq.n 802258c 802257e: e02f b.n 80225e0 8022580: f811 0f01 ldrb.w r0, [r1, #1]! 8022584: f813 c002 ldrb.w ip, [r3, r2] 8022588: 4584 cmp ip, r0 802258a: d129 bne.n 80225e0 802258c: 3201 adds r2, #1 802258e: 42ba cmp r2, r7 8022590: d3f6 bcc.n 8022580 8022592: 9b03 ldr r3, [sp, #12] 8022594: 9802 ldr r0, [sp, #8] 8022596: 429c cmp r4, r3 8022598: bf28 it cs 802259a: 4618 movcs r0, r3 802259c: d218 bcs.n 80225d0 802259e: f8dd c008 ldr.w ip, [sp, #8] 80225a2: eb08 030a add.w r3, r8, sl 80225a6: f816 100c ldrb.w r1, [r6, ip] 80225aa: f813 200c ldrb.w r2, [r3, ip] 80225ae: 4291 cmp r1, r2 80225b0: f040 8085 bne.w 80226be 80225b4: 9a05 ldr r2, [sp, #20] 80225b6: eb06 0b04 add.w fp, r6, r4 80225ba: e006 b.n 80225ca 80225bc: f813 c001 ldrb.w ip, [r3, r1] 80225c0: f812 9d01 ldrb.w r9, [r2, #-1]! 80225c4: 45e1 cmp r9, ip 80225c6: d103 bne.n 80225d0 80225c8: 4608 mov r0, r1 80225ca: 1e41 subs r1, r0, #1 80225cc: 455a cmp r2, fp 80225ce: d1f5 bne.n 80225bc 80225d0: 3401 adds r4, #1 80225d2: 4284 cmp r4, r0 80225d4: d875 bhi.n 80226c2 80225d6: 9c07 ldr r4, [sp, #28] 80225d8: 9b01 ldr r3, [sp, #4] 80225da: 44a2 add sl, r4 80225dc: 1b1c subs r4, r3, r4 80225de: e7a9 b.n 8022534 80225e0: f8dd c010 ldr.w ip, [sp, #16] 80225e4: 2400 movs r4, #0 80225e6: 44e2 add sl, ip 80225e8: 4492 add sl, r2 80225ea: e7a3 b.n 8022534 80225ec: 2000 movs r0, #0 80225ee: b009 add sp, #36 ; 0x24 80225f0: f50d 6d80 add.w sp, sp, #1024 ; 0x400 80225f4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80225f8: f8dd c00c ldr.w ip, [sp, #12] 80225fc: f04f 0a00 mov.w sl, #0 8022600: f8dd b00c ldr.w fp, [sp, #12] 8022604: f10d 0920 add.w r9, sp, #32 8022608: ebcc 0305 rsb r3, ip, r5 802260c: 1e6f subs r7, r5, #1 802260e: 4563 cmp r3, ip 8022610: bf38 it cc 8022612: 4663 movcc r3, ip 8022614: 4622 mov r2, r4 8022616: 3301 adds r3, #1 8022618: 9307 str r3, [sp, #28] 802261a: f10c 33ff add.w r3, ip, #4294967295 802261e: 9301 str r3, [sp, #4] 8022620: 9b03 ldr r3, [sp, #12] 8022622: 44b4 add ip, r6 8022624: f8cd c008 str.w ip, [sp, #8] 8022628: f1c3 0301 rsb r3, r3, #1 802262c: 9304 str r3, [sp, #16] 802262e: eb0a 0405 add.w r4, sl, r5 8022632: eb08 0002 add.w r0, r8, r2 8022636: 2100 movs r1, #0 8022638: 1aa2 subs r2, r4, r2 802263a: f002 fa15 bl 8024a68 802263e: 2800 cmp r0, #0 8022640: d1d4 bne.n 80225ec 8022642: 2c00 cmp r4, #0 8022644: d0d2 beq.n 80225ec 8022646: eb08 0304 add.w r3, r8, r4 802264a: f813 3c01 ldrb.w r3, [r3, #-1] 802264e: f859 3023 ldr.w r3, [r9, r3, lsl #2] 8022652: bb63 cbnz r3, 80226ae 8022654: 45bb cmp fp, r7 8022656: eb08 000a add.w r0, r8, sl 802265a: d215 bcs.n 8022688 802265c: f8dd c008 ldr.w ip, [sp, #8] 8022660: f810 300b ldrb.w r3, [r0, fp] 8022664: f89c 2000 ldrb.w r2, [ip] 8022668: 429a cmp r2, r3 802266a: bf18 it ne 802266c: 465b movne r3, fp 802266e: d121 bne.n 80226b4 8022670: 9a02 ldr r2, [sp, #8] 8022672: 465b mov r3, fp 8022674: e005 b.n 8022682 8022676: f812 1f01 ldrb.w r1, [r2, #1]! 802267a: f810 c003 ldrb.w ip, [r0, r3] 802267e: 458c cmp ip, r1 8022680: d118 bne.n 80226b4 8022682: 3301 adds r3, #1 8022684: 42bb cmp r3, r7 8022686: d3f6 bcc.n 8022676 8022688: 9b01 ldr r3, [sp, #4] 802268a: 1c5a adds r2, r3, #1 802268c: d0af beq.n 80225ee 802268e: f8dd c004 ldr.w ip, [sp, #4] 8022692: f816 100c ldrb.w r1, [r6, ip] 8022696: f810 200c ldrb.w r2, [r0, ip] 802269a: 4291 cmp r1, r2 802269c: d106 bne.n 80226ac 802269e: f113 33ff adds.w r3, r3, #4294967295 80226a2: d3a4 bcc.n 80225ee 80226a4: 5cf1 ldrb r1, [r6, r3] 80226a6: 5cc2 ldrb r2, [r0, r3] 80226a8: 4291 cmp r1, r2 80226aa: d0f8 beq.n 802269e 80226ac: 9b07 ldr r3, [sp, #28] 80226ae: 449a add sl, r3 80226b0: 4622 mov r2, r4 80226b2: e7bc b.n 802262e 80226b4: f8dd c010 ldr.w ip, [sp, #16] 80226b8: 44e2 add sl, ip 80226ba: 449a add sl, r3 80226bc: e7f8 b.n 80226b0 80226be: 9803 ldr r0, [sp, #12] 80226c0: e786 b.n 80225d0 80226c2: eb08 000a add.w r0, r8, sl 80226c6: e792 b.n 80225ee 080226c8 : 80226c8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80226cc: 4680 mov r8, r0 80226ce: 7803 ldrb r3, [r0, #0] 80226d0: b087 sub sp, #28 80226d2: 460e mov r6, r1 80226d4: 2b00 cmp r3, #0 80226d6: f000 80f7 beq.w 80228c8 80226da: 780a ldrb r2, [r1, #0] 80226dc: b19a cbz r2, 8022706 80226de: 4684 mov ip, r0 80226e0: 3101 adds r1, #1 80226e2: 2701 movs r7, #1 80226e4: e002 b.n 80226ec 80226e6: f811 2b01 ldrb.w r2, [r1], #1 80226ea: b15a cbz r2, 8022704 80226ec: 4293 cmp r3, r2 80226ee: bf14 ite ne 80226f0: 2700 movne r7, #0 80226f2: f007 0701 andeq.w r7, r7, #1 80226f6: f81c 3f01 ldrb.w r3, [ip, #1]! 80226fa: 460d mov r5, r1 80226fc: 2b00 cmp r3, #0 80226fe: d1f2 bne.n 80226e6 8022700: 782b ldrb r3, [r5, #0] 8022702: bb03 cbnz r3, 8022746 8022704: b11f cbz r7, 802270e 8022706: 4640 mov r0, r8 8022708: b007 add sp, #28 802270a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802270e: f108 0001 add.w r0, r8, #1 8022712: 7831 ldrb r1, [r6, #0] 8022714: f002 fe92 bl 802543c 8022718: 1bad subs r5, r5, r6 802271a: 2d01 cmp r5, #1 802271c: bf18 it ne 802271e: 2800 cmpne r0, #0 8022720: 4607 mov r7, r0 8022722: bf08 it eq 8022724: 4680 moveq r8, r0 8022726: d0ee beq.n 8022706 8022728: 44a8 add r8, r5 802272a: 4540 cmp r0, r8 802272c: bf94 ite ls 802272e: ebc0 0408 rsbls r4, r0, r8 8022732: 2401 movhi r4, #1 8022734: 2d1f cmp r5, #31 8022736: d909 bls.n 802274c 8022738: 4621 mov r1, r4 802273a: 4632 mov r2, r6 802273c: 462b mov r3, r5 802273e: f7ff feb3 bl 80224a8 8022742: 4680 mov r8, r0 8022744: e7df b.n 8022706 8022746: f04f 0800 mov.w r8, #0 802274a: e7dc b.n 8022706 802274c: 4629 mov r1, r5 802274e: aa05 add r2, sp, #20 8022750: 4630 mov r0, r6 8022752: f7ff fe4b bl 80223ec 8022756: 9905 ldr r1, [sp, #20] 8022758: 1871 adds r1, r6, r1 802275a: 9001 str r0, [sp, #4] 802275c: 4630 mov r0, r6 802275e: 9a01 ldr r2, [sp, #4] 8022760: f7ff fa6e bl 8021c40 8022764: 2800 cmp r0, #0 8022766: d152 bne.n 802280e 8022768: 9b01 ldr r3, [sp, #4] 802276a: 4683 mov fp, r0 802276c: 4680 mov r8, r0 802276e: 3b01 subs r3, #1 8022770: 9300 str r3, [sp, #0] 8022772: 18f3 adds r3, r6, r3 8022774: 9303 str r3, [sp, #12] 8022776: 9b01 ldr r3, [sp, #4] 8022778: f1c3 0301 rsb r3, r3, #1 802277c: 9302 str r3, [sp, #8] 802277e: 4622 mov r2, r4 8022780: eb08 0405 add.w r4, r8, r5 8022784: 18b8 adds r0, r7, r2 8022786: 2100 movs r1, #0 8022788: 1aa2 subs r2, r4, r2 802278a: f002 f96d bl 8024a68 802278e: 2800 cmp r0, #0 8022790: d1d9 bne.n 8022746 8022792: 2c00 cmp r4, #0 8022794: d0d7 beq.n 8022746 8022796: 9b01 ldr r3, [sp, #4] 8022798: 459b cmp fp, r3 802279a: bf28 it cs 802279c: 465b movcs r3, fp 802279e: 429d cmp r5, r3 80227a0: d913 bls.n 80227ca 80227a2: 18f9 adds r1, r7, r3 80227a4: 5cf0 ldrb r0, [r6, r3] 80227a6: 18f2 adds r2, r6, r3 80227a8: f811 1008 ldrb.w r1, [r1, r8] 80227ac: 4288 cmp r0, r1 80227ae: f040 8085 bne.w 80228bc 80227b2: eb07 0c08 add.w ip, r7, r8 80227b6: e005 b.n 80227c4 80227b8: f812 1f01 ldrb.w r1, [r2, #1]! 80227bc: f81c 0003 ldrb.w r0, [ip, r3] 80227c0: 4288 cmp r0, r1 80227c2: d17b bne.n 80228bc 80227c4: 3301 adds r3, #1 80227c6: 429d cmp r5, r3 80227c8: d8f6 bhi.n 80227b8 80227ca: e89d 000a ldmia.w sp, {r1, r3} 80227ce: 455b cmp r3, fp 80227d0: d97d bls.n 80228ce 80227d2: eb07 0908 add.w r9, r7, r8 80227d6: 5c72 ldrb r2, [r6, r1] 80227d8: f819 3001 ldrb.w r3, [r9, r1] 80227dc: 429a cmp r2, r3 80227de: d176 bne.n 80228ce 80227e0: 9b03 ldr r3, [sp, #12] 80227e2: eb06 0a0b add.w sl, r6, fp 80227e6: e006 b.n 80227f6 80227e8: f819 0002 ldrb.w r0, [r9, r2] 80227ec: f813 cd01 ldrb.w ip, [r3, #-1]! 80227f0: 4584 cmp ip, r0 80227f2: d103 bne.n 80227fc 80227f4: 4611 mov r1, r2 80227f6: 1e4a subs r2, r1, #1 80227f8: 4553 cmp r3, sl 80227fa: d1f5 bne.n 80227e8 80227fc: f10b 0b01 add.w fp, fp, #1 8022800: 458b cmp fp, r1 8022802: d866 bhi.n 80228d2 8022804: 9b05 ldr r3, [sp, #20] 8022806: 4498 add r8, r3 8022808: ebc3 0b05 rsb fp, r3, r5 802280c: e7b7 b.n 802277e 802280e: 9801 ldr r0, [sp, #4] 8022810: f04f 0b00 mov.w fp, #0 8022814: 4622 mov r2, r4 8022816: 1a2b subs r3, r5, r0 8022818: eb06 0900 add.w r9, r6, r0 802281c: f100 38ff add.w r8, r0, #4294967295 8022820: 4682 mov sl, r0 8022822: 4283 cmp r3, r0 8022824: bf38 it cc 8022826: 4603 movcc r3, r0 8022828: 1839 adds r1, r7, r0 802282a: 3301 adds r3, #1 802282c: 9100 str r1, [sp, #0] 802282e: 9305 str r3, [sp, #20] 8022830: f1c0 0301 rsb r3, r0, #1 8022834: 9302 str r3, [sp, #8] 8022836: eb0b 0405 add.w r4, fp, r5 802283a: 18b8 adds r0, r7, r2 802283c: 2100 movs r1, #0 802283e: 1aa2 subs r2, r4, r2 8022840: f002 f912 bl 8024a68 8022844: 2800 cmp r0, #0 8022846: f47f af7e bne.w 8022746 802284a: 2c00 cmp r4, #0 802284c: f43f af7b beq.w 8022746 8022850: 4555 cmp r5, sl 8022852: bf98 it ls 8022854: eb07 000b addls.w r0, r7, fp 8022858: d914 bls.n 8022884 802285a: 9800 ldr r0, [sp, #0] 802285c: f899 2000 ldrb.w r2, [r9] 8022860: f810 300b ldrb.w r3, [r0, fp] 8022864: 429a cmp r2, r3 8022866: d124 bne.n 80228b2 8022868: 464a mov r2, r9 802286a: 4653 mov r3, sl 802286c: eb07 000b add.w r0, r7, fp 8022870: e005 b.n 802287e 8022872: f812 1f01 ldrb.w r1, [r2, #1]! 8022876: f810 c003 ldrb.w ip, [r0, r3] 802287a: 458c cmp ip, r1 802287c: d11a bne.n 80228b4 802287e: 3301 adds r3, #1 8022880: 429d cmp r5, r3 8022882: d8f6 bhi.n 8022872 8022884: f1b8 3fff cmp.w r8, #4294967295 8022888: 4643 mov r3, r8 802288a: f43f af5a beq.w 8022742 802288e: f816 1008 ldrb.w r1, [r6, r8] 8022892: f810 2008 ldrb.w r2, [r0, r8] 8022896: 4291 cmp r1, r2 8022898: d107 bne.n 80228aa 802289a: f113 33ff adds.w r3, r3, #4294967295 802289e: f4ff af50 bcc.w 8022742 80228a2: 5cf1 ldrb r1, [r6, r3] 80228a4: 5cc2 ldrb r2, [r0, r3] 80228a6: 4291 cmp r1, r2 80228a8: d0f7 beq.n 802289a 80228aa: 9b05 ldr r3, [sp, #20] 80228ac: 449b add fp, r3 80228ae: 4622 mov r2, r4 80228b0: e7c1 b.n 8022836 80228b2: 4653 mov r3, sl 80228b4: 9a02 ldr r2, [sp, #8] 80228b6: 4493 add fp, r2 80228b8: 449b add fp, r3 80228ba: e7f8 b.n 80228ae 80228bc: 9902 ldr r1, [sp, #8] 80228be: f04f 0b00 mov.w fp, #0 80228c2: 4488 add r8, r1 80228c4: 4498 add r8, r3 80228c6: e75a b.n 802277e 80228c8: 460d mov r5, r1 80228ca: 2701 movs r7, #1 80228cc: e718 b.n 8022700 80228ce: 9901 ldr r1, [sp, #4] 80228d0: e794 b.n 80227fc 80228d2: 44b8 add r8, r7 80228d4: e717 b.n 8022706 80228d6: bf00 nop 080228d8 <_strtod_r>: 80228d8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80228dc: b09d sub sp, #116 ; 0x74 80228de: 468c mov ip, r1 80228e0: 4683 mov fp, r0 80228e2: 9210 str r2, [sp, #64] ; 0x40 80228e4: 4662 mov r2, ip 80228e6: 2000 movs r0, #0 80228e8: 2100 movs r1, #0 80228ea: f8cd c05c str.w ip, [sp, #92] ; 0x5c 80228ee: e9cd 0106 strd r0, r1, [sp, #24] 80228f2: 4611 mov r1, r2 80228f4: f812 3b01 ldrb.w r3, [r2], #1 80228f8: 2b2d cmp r3, #45 ; 0x2d 80228fa: f200 8147 bhi.w 8022b8c <_strtod_r+0x2b4> 80228fe: e8df f013 tbh [pc, r3, lsl #1] 8022902: 0131 .short 0x0131 8022904: 01450145 .word 0x01450145 8022908: 01450145 .word 0x01450145 802290c: 01450145 .word 0x01450145 8022910: 01450145 .word 0x01450145 8022914: 01640164 .word 0x01640164 8022918: 01640164 .word 0x01640164 802291c: 01450164 .word 0x01450164 8022920: 01450145 .word 0x01450145 8022924: 01450145 .word 0x01450145 8022928: 01450145 .word 0x01450145 802292c: 01450145 .word 0x01450145 8022930: 01450145 .word 0x01450145 8022934: 01450145 .word 0x01450145 8022938: 01450145 .word 0x01450145 802293c: 01450145 .word 0x01450145 8022940: 01640145 .word 0x01640145 8022944: 01450145 .word 0x01450145 8022948: 01450145 .word 0x01450145 802294c: 01450145 .word 0x01450145 8022950: 01450145 .word 0x01450145 8022954: 01450145 .word 0x01450145 8022958: 0145012e .word 0x0145012e 802295c: 002e .short 0x002e 802295e: 2501 movs r5, #1 8022960: 9512 str r5, [sp, #72] ; 0x48 8022962: 1c4e adds r6, r1, #1 8022964: 9617 str r6, [sp, #92] ; 0x5c 8022966: 784b ldrb r3, [r1, #1] 8022968: 4699 mov r9, r3 802296a: 469a mov sl, r3 802296c: 2b00 cmp r3, #0 802296e: f000 80fc beq.w 8022b6a <_strtod_r+0x292> 8022972: 2b30 cmp r3, #48 ; 0x30 8022974: bf18 it ne 8022976: f04f 0900 movne.w r9, #0 802297a: f000 8110 beq.w 8022b9e <_strtod_r+0x2c6> 802297e: 2b2f cmp r3, #47 ; 0x2f 8022980: 461d mov r5, r3 8022982: f04f 0a00 mov.w sl, #0 8022986: f340 84f9 ble.w 802337c <_strtod_r+0xaa4> 802298a: 2b39 cmp r3, #57 ; 0x39 802298c: f300 84f6 bgt.w 802337c <_strtod_r+0xaa4> 8022990: 1c72 adds r2, r6, #1 8022992: 4657 mov r7, sl 8022994: 4654 mov r4, sl 8022996: e001 b.n 802299c <_strtod_r+0xc4> 8022998: 2b39 cmp r3, #57 ; 0x39 802299a: dc18 bgt.n 80229ce <_strtod_r+0xf6> 802299c: eb07 0187 add.w r1, r7, r7, lsl #2 80229a0: 2c08 cmp r4, #8 80229a2: eb03 0141 add.w r1, r3, r1, lsl #1 80229a6: bfd8 it le 80229a8: f1a1 0730 suble.w r7, r1, #48 ; 0x30 80229ac: dd07 ble.n 80229be <_strtod_r+0xe6> 80229ae: eb0a 018a add.w r1, sl, sl, lsl #2 80229b2: 2c0f cmp r4, #15 80229b4: eb03 0341 add.w r3, r3, r1, lsl #1 80229b8: bfd8 it le 80229ba: f1a3 0a30 suble.w sl, r3, #48 ; 0x30 80229be: 9217 str r2, [sp, #92] ; 0x5c 80229c0: 4690 mov r8, r2 80229c2: f812 3b01 ldrb.w r3, [r2], #1 80229c6: 3401 adds r4, #1 80229c8: 2b2f cmp r3, #47 ; 0x2f 80229ca: 461d mov r5, r3 80229cc: dce4 bgt.n 8022998 <_strtod_r+0xc0> 80229ce: 4658 mov r0, fp 80229d0: f8cd c010 str.w ip, [sp, #16] 80229d4: f001 fd5a bl 802448c <_localeconv_r> 80229d8: 6801 ldr r1, [r0, #0] 80229da: 4658 mov r0, fp 80229dc: 9105 str r1, [sp, #20] 80229de: f001 fd55 bl 802448c <_localeconv_r> 80229e2: 6800 ldr r0, [r0, #0] 80229e4: f7ff fbf0 bl 80221c8 80229e8: 9905 ldr r1, [sp, #20] 80229ea: 4602 mov r2, r0 80229ec: 4640 mov r0, r8 80229ee: f7ff fc4d bl 802228c 80229f2: f8dd c010 ldr.w ip, [sp, #16] 80229f6: 4680 mov r8, r0 80229f8: 2800 cmp r0, #0 80229fa: f000 8142 beq.w 8022c82 <_strtod_r+0x3aa> 80229fe: 2000 movs r0, #0 8022a00: 46a0 mov r8, r4 8022a02: 4601 mov r1, r0 8022a04: 9009 str r0, [sp, #36] ; 0x24 8022a06: f025 0320 bic.w r3, r5, #32 8022a0a: 2b45 cmp r3, #69 ; 0x45 8022a0c: f040 80df bne.w 8022bce <_strtod_r+0x2f6> 8022a10: ea48 0300 orr.w r3, r8, r0 8022a14: ea53 0309 orrs.w r3, r3, r9 8022a18: f000 811d beq.w 8022c56 <_strtod_r+0x37e> 8022a1c: f8dd c05c ldr.w ip, [sp, #92] ; 0x5c 8022a20: f10c 0301 add.w r3, ip, #1 8022a24: 9317 str r3, [sp, #92] ; 0x5c 8022a26: f89c 5001 ldrb.w r5, [ip, #1] 8022a2a: 2d2b cmp r5, #43 ; 0x2b 8022a2c: f000 84ab beq.w 8023386 <_strtod_r+0xaae> 8022a30: 2d2d cmp r5, #45 ; 0x2d 8022a32: f000 833d beq.w 80230b0 <_strtod_r+0x7d8> 8022a36: 2200 movs r2, #0 8022a38: 920a str r2, [sp, #40] ; 0x28 8022a3a: f1a5 0330 sub.w r3, r5, #48 ; 0x30 8022a3e: 2b09 cmp r3, #9 8022a40: f200 842c bhi.w 802329c <_strtod_r+0x9c4> 8022a44: 2d30 cmp r5, #48 ; 0x30 8022a46: d106 bne.n 8022a56 <_strtod_r+0x17e> 8022a48: 9b17 ldr r3, [sp, #92] ; 0x5c 8022a4a: 3301 adds r3, #1 8022a4c: 9317 str r3, [sp, #92] ; 0x5c 8022a4e: f813 5b01 ldrb.w r5, [r3], #1 8022a52: 2d30 cmp r5, #48 ; 0x30 8022a54: d0fa beq.n 8022a4c <_strtod_r+0x174> 8022a56: f1a5 0331 sub.w r3, r5, #49 ; 0x31 8022a5a: 2b08 cmp r3, #8 8022a5c: f200 80b7 bhi.w 8022bce <_strtod_r+0x2f6> 8022a60: 9a17 ldr r2, [sp, #92] ; 0x5c 8022a62: 3d30 subs r5, #48 ; 0x30 8022a64: 950d str r5, [sp, #52] ; 0x34 8022a66: 1c53 adds r3, r2, #1 8022a68: 9317 str r3, [sp, #92] ; 0x5c 8022a6a: 7855 ldrb r5, [r2, #1] 8022a6c: 920b str r2, [sp, #44] ; 0x2c 8022a6e: 2d2f cmp r5, #47 ; 0x2f 8022a70: dd16 ble.n 8022aa0 <_strtod_r+0x1c8> 8022a72: 2d39 cmp r5, #57 ; 0x39 8022a74: dc14 bgt.n 8022aa0 <_strtod_r+0x1c8> 8022a76: 1c93 adds r3, r2, #2 8022a78: 910c str r1, [sp, #48] ; 0x30 8022a7a: 9a0d ldr r2, [sp, #52] ; 0x34 8022a7c: e001 b.n 8022a82 <_strtod_r+0x1aa> 8022a7e: 2d39 cmp r5, #57 ; 0x39 8022a80: dc0b bgt.n 8022a9a <_strtod_r+0x1c2> 8022a82: 9317 str r3, [sp, #92] ; 0x5c 8022a84: 4619 mov r1, r3 8022a86: eb02 0282 add.w r2, r2, r2, lsl #2 8022a8a: 3301 adds r3, #1 8022a8c: eb05 0242 add.w r2, r5, r2, lsl #1 8022a90: f813 5c01 ldrb.w r5, [r3, #-1] 8022a94: 3a30 subs r2, #48 ; 0x30 8022a96: 2d2f cmp r5, #47 ; 0x2f 8022a98: dcf1 bgt.n 8022a7e <_strtod_r+0x1a6> 8022a9a: 460b mov r3, r1 8022a9c: 990c ldr r1, [sp, #48] ; 0x30 8022a9e: 920d str r2, [sp, #52] ; 0x34 8022aa0: 9a0b ldr r2, [sp, #44] ; 0x2c 8022aa2: 1a9b subs r3, r3, r2 8022aa4: 2b08 cmp r3, #8 8022aa6: bfc8 it gt 8022aa8: f644 621f movwgt r2, #19999 ; 0x4e1f 8022aac: dc05 bgt.n 8022aba <_strtod_r+0x1e2> 8022aae: 9a0d ldr r2, [sp, #52] ; 0x34 8022ab0: f644 631f movw r3, #19999 ; 0x4e1f 8022ab4: 429a cmp r2, r3 8022ab6: bfa8 it ge 8022ab8: 461a movge r2, r3 8022aba: 9b0a ldr r3, [sp, #40] ; 0x28 8022abc: b103 cbz r3, 8022ac0 <_strtod_r+0x1e8> 8022abe: 4252 negs r2, r2 8022ac0: f1b8 0f00 cmp.w r8, #0 8022ac4: f000 8088 beq.w 8022bd8 <_strtod_r+0x300> 8022ac8: 9d09 ldr r5, [sp, #36] ; 0x24 8022aca: 4638 mov r0, r7 8022acc: 2c00 cmp r4, #0 8022ace: bf08 it eq 8022ad0: 4644 moveq r4, r8 8022ad2: 940a str r4, [sp, #40] ; 0x28 8022ad4: 1b52 subs r2, r2, r5 8022ad6: 9209 str r2, [sp, #36] ; 0x24 8022ad8: f7fd fd38 bl 802054c <__aeabi_ui2d> 8022adc: f1b8 0f10 cmp.w r8, #16 8022ae0: bfb4 ite lt 8022ae2: 46c1 movlt r9, r8 8022ae4: f04f 0910 movge.w r9, #16 8022ae8: f1b9 0f09 cmp.w r9, #9 8022aec: 4602 mov r2, r0 8022aee: 460b mov r3, r1 8022af0: e9cd 2306 strd r2, r3, [sp, #24] 8022af4: dd16 ble.n 8022b24 <_strtod_r+0x24c> 8022af6: f648 63e8 movw r3, #36584 ; 0x8ee8 8022afa: f6c0 0303 movt r3, #2051 ; 0x803 8022afe: eb03 03c9 add.w r3, r3, r9, lsl #3 8022b02: e953 2312 ldrd r2, r3, [r3, #-72] ; 0x48 8022b06: f7fd fd97 bl 8020638 <__aeabi_dmul> 8022b0a: 4604 mov r4, r0 8022b0c: 4650 mov r0, sl 8022b0e: 460d mov r5, r1 8022b10: f7fd fd1c bl 802054c <__aeabi_ui2d> 8022b14: 4602 mov r2, r0 8022b16: 460b mov r3, r1 8022b18: 4620 mov r0, r4 8022b1a: 4629 mov r1, r5 8022b1c: f7fd fbda bl 80202d4 <__adddf3> 8022b20: e9cd 0106 strd r0, r1, [sp, #24] 8022b24: f1b8 0f0f cmp.w r8, #15 8022b28: f300 80f2 bgt.w 8022d10 <_strtod_r+0x438> 8022b2c: 9c09 ldr r4, [sp, #36] ; 0x24 8022b2e: 2c00 cmp r4, #0 8022b30: f000 80a2 beq.w 8022c78 <_strtod_r+0x3a0> 8022b34: f340 8591 ble.w 802365a <_strtod_r+0xd82> 8022b38: 9d09 ldr r5, [sp, #36] ; 0x24 8022b3a: 2d16 cmp r5, #22 8022b3c: f300 8545 bgt.w 80235ca <_strtod_r+0xcf2> 8022b40: f648 61e8 movw r1, #36584 ; 0x8ee8 8022b44: e9dd 2306 ldrd r2, r3, [sp, #24] 8022b48: f6c0 0103 movt r1, #2051 ; 0x803 8022b4c: eb01 01c5 add.w r1, r1, r5, lsl #3 8022b50: e9d1 0100 ldrd r0, r1, [r1] 8022b54: f7fd fd70 bl 8020638 <__aeabi_dmul> 8022b58: 4681 mov r9, r0 8022b5a: 468a mov sl, r1 8022b5c: e009 b.n 8022b72 <_strtod_r+0x29a> 8022b5e: 2400 movs r4, #0 8022b60: 9412 str r4, [sp, #72] ; 0x48 8022b62: e6fe b.n 8022962 <_strtod_r+0x8a> 8022b64: f04f 0900 mov.w r9, #0 8022b68: 46ca mov sl, r9 8022b6a: 2400 movs r4, #0 8022b6c: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8022b70: 9412 str r4, [sp, #72] ; 0x48 8022b72: 9c10 ldr r4, [sp, #64] ; 0x40 8022b74: b10c cbz r4, 8022b7a <_strtod_r+0x2a2> 8022b76: 9b17 ldr r3, [sp, #92] ; 0x5c 8022b78: 6023 str r3, [r4, #0] 8022b7a: 9d12 ldr r5, [sp, #72] ; 0x48 8022b7c: b10d cbz r5, 8022b82 <_strtod_r+0x2aa> 8022b7e: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 8022b82: 4648 mov r0, r9 8022b84: 4651 mov r1, sl 8022b86: b01d add sp, #116 ; 0x74 8022b88: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8022b8c: 2500 movs r5, #0 8022b8e: 2b30 cmp r3, #48 ; 0x30 8022b90: 460e mov r6, r1 8022b92: 9512 str r5, [sp, #72] ; 0x48 8022b94: bf18 it ne 8022b96: f04f 0900 movne.w r9, #0 8022b9a: f47f aef0 bne.w 802297e <_strtod_r+0xa6> 8022b9e: 7873 ldrb r3, [r6, #1] 8022ba0: 2b58 cmp r3, #88 ; 0x58 8022ba2: f000 8383 beq.w 80232ac <_strtod_r+0x9d4> 8022ba6: 1c72 adds r2, r6, #1 8022ba8: 2b78 cmp r3, #120 ; 0x78 8022baa: f000 837f beq.w 80232ac <_strtod_r+0x9d4> 8022bae: 4616 mov r6, r2 8022bb0: 9217 str r2, [sp, #92] ; 0x5c 8022bb2: f812 3b01 ldrb.w r3, [r2], #1 8022bb6: 2b30 cmp r3, #48 ; 0x30 8022bb8: d0f9 beq.n 8022bae <_strtod_r+0x2d6> 8022bba: f04f 0901 mov.w r9, #1 8022bbe: 2b00 cmp r3, #0 8022bc0: f47f aedd bne.w 802297e <_strtod_r+0xa6> 8022bc4: 4699 mov r9, r3 8022bc6: 469a mov sl, r3 8022bc8: e7d3 b.n 8022b72 <_strtod_r+0x29a> 8022bca: 9217 str r2, [sp, #92] ; 0x5c 8022bcc: e691 b.n 80228f2 <_strtod_r+0x1a> 8022bce: 2200 movs r2, #0 8022bd0: f1b8 0f00 cmp.w r8, #0 8022bd4: f47f af78 bne.w 8022ac8 <_strtod_r+0x1f0> 8022bd8: ea50 0009 orrs.w r0, r0, r9 8022bdc: d14c bne.n 8022c78 <_strtod_r+0x3a0> 8022bde: 2900 cmp r1, #0 8022be0: d139 bne.n 8022c56 <_strtod_r+0x37e> 8022be2: 3d49 subs r5, #73 ; 0x49 8022be4: 2d25 cmp r5, #37 ; 0x25 8022be6: d836 bhi.n 8022c56 <_strtod_r+0x37e> 8022be8: e8df f015 tbh [pc, r5, lsl #1] 8022bec: 0035026a .word 0x0035026a 8022bf0: 00350035 .word 0x00350035 8022bf4: 00260035 .word 0x00260035 8022bf8: 00350035 .word 0x00350035 8022bfc: 00350035 .word 0x00350035 8022c00: 00350035 .word 0x00350035 8022c04: 00350035 .word 0x00350035 8022c08: 00350035 .word 0x00350035 8022c0c: 00350035 .word 0x00350035 8022c10: 00350035 .word 0x00350035 8022c14: 00350035 .word 0x00350035 8022c18: 00350035 .word 0x00350035 8022c1c: 00350035 .word 0x00350035 8022c20: 00350035 .word 0x00350035 8022c24: 00350035 .word 0x00350035 8022c28: 00350035 .word 0x00350035 8022c2c: 0035026a .word 0x0035026a 8022c30: 00350035 .word 0x00350035 8022c34: 00260035 .word 0x00260035 8022c38: 4853 ldr r0, [pc, #332] ; (8022d88 <_strtod_r+0x4b0>) 8022c3a: 9a17 ldr r2, [sp, #92] ; 0x5c 8022c3c: f810 1f01 ldrb.w r1, [r0, #1]! 8022c40: 4613 mov r3, r2 8022c42: b169 cbz r1, 8022c60 <_strtod_r+0x388> 8022c44: 785b ldrb r3, [r3, #1] 8022c46: 3201 adds r2, #1 8022c48: 2b40 cmp r3, #64 ; 0x40 8022c4a: dd02 ble.n 8022c52 <_strtod_r+0x37a> 8022c4c: 2b5a cmp r3, #90 ; 0x5a 8022c4e: bfd8 it le 8022c50: 3320 addle r3, #32 8022c52: 428b cmp r3, r1 8022c54: d0f2 beq.n 8022c3c <_strtod_r+0x364> 8022c56: f8dd 9018 ldr.w r9, [sp, #24] 8022c5a: f8dd a01c ldr.w sl, [sp, #28] 8022c5e: e784 b.n 8022b6a <_strtod_r+0x292> 8022c60: 1c53 adds r3, r2, #1 8022c62: 9317 str r3, [sp, #92] ; 0x5c 8022c64: 7853 ldrb r3, [r2, #1] 8022c66: 2b28 cmp r3, #40 ; 0x28 8022c68: f000 8575 beq.w 8023756 <_strtod_r+0xe7e> 8022c6c: 2300 movs r3, #0 8022c6e: 9306 str r3, [sp, #24] 8022c70: 461c mov r4, r3 8022c72: f6cf 74f8 movt r4, #65528 ; 0xfff8 8022c76: 9407 str r4, [sp, #28] 8022c78: f8dd 9018 ldr.w r9, [sp, #24] 8022c7c: f8dd a01c ldr.w sl, [sp, #28] 8022c80: e777 b.n 8022b72 <_strtod_r+0x29a> 8022c82: 4658 mov r0, fp 8022c84: 9d17 ldr r5, [sp, #92] ; 0x5c 8022c86: f001 fc01 bl 802448c <_localeconv_r> 8022c8a: 6800 ldr r0, [r0, #0] 8022c8c: f7ff fa9c bl 80221c8 8022c90: f8dd c010 ldr.w ip, [sp, #16] 8022c94: 182b adds r3, r5, r0 8022c96: 9317 str r3, [sp, #92] ; 0x5c 8022c98: 5c2d ldrb r5, [r5, r0] 8022c9a: 2c00 cmp r4, #0 8022c9c: f040 819b bne.w 8022fd6 <_strtod_r+0x6fe> 8022ca0: 2d30 cmp r5, #48 ; 0x30 8022ca2: 4620 mov r0, r4 8022ca4: d105 bne.n 8022cb2 <_strtod_r+0x3da> 8022ca6: 3301 adds r3, #1 8022ca8: 9317 str r3, [sp, #92] ; 0x5c 8022caa: 3001 adds r0, #1 8022cac: 781d ldrb r5, [r3, #0] 8022cae: 2d30 cmp r5, #48 ; 0x30 8022cb0: d0f9 beq.n 8022ca6 <_strtod_r+0x3ce> 8022cb2: f1a5 0331 sub.w r3, r5, #49 ; 0x31 8022cb6: 2b08 cmp r3, #8 8022cb8: f200 819a bhi.w 8022ff0 <_strtod_r+0x718> 8022cbc: 9e17 ldr r6, [sp, #92] ; 0x5c 8022cbe: f04f 0800 mov.w r8, #0 8022cc2: 9009 str r0, [sp, #36] ; 0x24 8022cc4: f1a5 0130 sub.w r1, r5, #48 ; 0x30 8022cc8: 2001 movs r0, #1 8022cca: 960a str r6, [sp, #40] ; 0x28 8022ccc: 2900 cmp r1, #0 8022cce: f000 836c beq.w 80233aa <_strtod_r+0xad2> 8022cd2: 9a09 ldr r2, [sp, #36] ; 0x24 8022cd4: 2801 cmp r0, #1 8022cd6: 4402 add r2, r0 8022cd8: 9209 str r2, [sp, #36] ; 0x24 8022cda: f000 8532 beq.w 8023742 <_strtod_r+0xe6a> 8022cde: eb08 0200 add.w r2, r8, r0 8022ce2: 4643 mov r3, r8 8022ce4: 3a01 subs r2, #1 8022ce6: f8cd 802c str.w r8, [sp, #44] ; 0x2c 8022cea: 4690 mov r8, r2 8022cec: e003 b.n 8022cf6 <_strtod_r+0x41e> 8022cee: 006f lsls r7, r5, #1 8022cf0: 4543 cmp r3, r8 8022cf2: f000 834b beq.w 802338c <_strtod_r+0xab4> 8022cf6: 3301 adds r3, #1 8022cf8: eb07 0587 add.w r5, r7, r7, lsl #2 8022cfc: 1e5a subs r2, r3, #1 8022cfe: 2a08 cmp r2, #8 8022d00: ddf5 ble.n 8022cee <_strtod_r+0x416> 8022d02: eb0a 028a add.w r2, sl, sl, lsl #2 8022d06: 2b10 cmp r3, #16 8022d08: bfd8 it le 8022d0a: ea4f 0a42 movle.w sl, r2, lsl #1 8022d0e: e7ef b.n 8022cf0 <_strtod_r+0x418> 8022d10: 9d09 ldr r5, [sp, #36] ; 0x24 8022d12: ebc9 0908 rsb r9, r9, r8 8022d16: eb05 0409 add.w r4, r5, r9 8022d1a: 2c00 cmp r4, #0 8022d1c: f340 83de ble.w 80234dc <_strtod_r+0xc04> 8022d20: f014 000f ands.w r0, r4, #15 8022d24: d00d beq.n 8022d42 <_strtod_r+0x46a> 8022d26: f648 61e8 movw r1, #36584 ; 0x8ee8 8022d2a: e9dd 2306 ldrd r2, r3, [sp, #24] 8022d2e: f6c0 0103 movt r1, #2051 ; 0x803 8022d32: eb01 01c0 add.w r1, r1, r0, lsl #3 8022d36: e9d1 0100 ldrd r0, r1, [r1] 8022d3a: f7fd fc7d bl 8020638 <__aeabi_dmul> 8022d3e: e9cd 0106 strd r0, r1, [sp, #24] 8022d42: f034 040f bics.w r4, r4, #15 8022d46: f040 815f bne.w 8023008 <_strtod_r+0x730> 8022d4a: f8dd 9018 ldr.w r9, [sp, #24] 8022d4e: f8dd a01c ldr.w sl, [sp, #28] 8022d52: 940b str r4, [sp, #44] ; 0x2c 8022d54: 9700 str r7, [sp, #0] 8022d56: 4658 mov r0, fp 8022d58: 4631 mov r1, r6 8022d5a: 9a0a ldr r2, [sp, #40] ; 0x28 8022d5c: 4643 mov r3, r8 8022d5e: f001 ff67 bl 8024c30 <__s2b> 8022d62: 9d09 ldr r5, [sp, #36] ; 0x24 8022d64: 2d00 cmp r5, #0 8022d66: 9011 str r0, [sp, #68] ; 0x44 8022d68: f2c0 8472 blt.w 8023650 <_strtod_r+0xd78> 8022d6c: 2400 movs r4, #0 8022d6e: 940d str r4, [sp, #52] ; 0x34 8022d70: 9d09 ldr r5, [sp, #36] ; 0x24 8022d72: 9c11 ldr r4, [sp, #68] ; 0x44 8022d74: ea25 75e5 bic.w r5, r5, r5, asr #31 8022d78: f8cd 9024 str.w r9, [sp, #36] ; 0x24 8022d7c: 340c adds r4, #12 8022d7e: 950e str r5, [sp, #56] ; 0x38 8022d80: 9413 str r4, [sp, #76] ; 0x4c 8022d82: f8cd a028 str.w sl, [sp, #40] ; 0x28 8022d86: e073 b.n 8022e70 <_strtod_r+0x598> 8022d88: 0804527f .word 0x0804527f 8022d8c: 9b0f ldr r3, [sp, #60] ; 0x3c 8022d8e: 2b00 cmp r3, #0 8022d90: f000 81a8 beq.w 80230e4 <_strtod_r+0x80c> 8022d94: f04f 0900 mov.w r9, #0 8022d98: 2500 movs r5, #0 8022d9a: f8dd c01c ldr.w ip, [sp, #28] 8022d9e: 2400 movs r4, #0 8022da0: f6c3 75f0 movt r5, #16368 ; 0x3ff0 8022da4: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8022da8: f8cd 8030 str.w r8, [sp, #48] ; 0x30 8022dac: f04f 0800 mov.w r8, #0 8022db0: 4643 mov r3, r8 8022db2: f6c7 78f0 movt r8, #32752 ; 0x7ff0 8022db6: f6c7 73e0 movt r3, #32736 ; 0x7fe0 8022dba: ea0c 0808 and.w r8, ip, r8 8022dbe: 4598 cmp r8, r3 8022dc0: f000 81c5 beq.w 802314e <_strtod_r+0x876> 8022dc4: 9a0b ldr r2, [sp, #44] ; 0x2c 8022dc6: f1b8 6fd4 cmp.w r8, #111149056 ; 0x6a00000 8022dca: bf8c ite hi 8022dcc: 2300 movhi r3, #0 8022dce: 2301 movls r3, #1 8022dd0: 2a00 cmp r2, #0 8022dd2: bf08 it eq 8022dd4: 2300 moveq r3, #0 8022dd6: b1eb cbz r3, 8022e14 <_strtod_r+0x53c> 8022dd8: 980c ldr r0, [sp, #48] ; 0x30 8022dda: 4649 mov r1, r9 8022ddc: a388 add r3, pc, #544 ; (adr r3, 8023000 <_strtod_r+0x728>) 8022dde: e9d3 2300 ldrd r2, r3, [r3] 8022de2: f7fd fea5 bl 8020b30 <__aeabi_dcmple> 8022de6: b188 cbz r0, 8022e0c <_strtod_r+0x534> 8022de8: 980c ldr r0, [sp, #48] ; 0x30 8022dea: 4649 mov r1, r9 8022dec: f7fd fee6 bl 8020bbc <__aeabi_d2uiz> 8022df0: 2800 cmp r0, #0 8022df2: f000 8246 beq.w 8023282 <_strtod_r+0x9aa> 8022df6: f7fd fba9 bl 802054c <__aeabi_ui2d> 8022dfa: 4689 mov r9, r1 8022dfc: 900c str r0, [sp, #48] ; 0x30 8022dfe: 9c0f ldr r4, [sp, #60] ; 0x3c 8022e00: f109 4300 add.w r3, r9, #2147483648 ; 0x80000000 8022e04: b104 cbz r4, 8022e08 <_strtod_r+0x530> 8022e06: 464b mov r3, r9 8022e08: 9c0c ldr r4, [sp, #48] ; 0x30 8022e0a: 461d mov r5, r3 8022e0c: f105 63d6 add.w r3, r5, #112197632 ; 0x6b00000 8022e10: ebc8 0503 rsb r5, r8, r3 8022e14: 9809 ldr r0, [sp, #36] ; 0x24 8022e16: 990a ldr r1, [sp, #40] ; 0x28 8022e18: f002 f98a bl 8025130 <__ulp> 8022e1c: 4602 mov r2, r0 8022e1e: 460b mov r3, r1 8022e20: 4620 mov r0, r4 8022e22: 4629 mov r1, r5 8022e24: f7fd fc08 bl 8020638 <__aeabi_dmul> 8022e28: 4602 mov r2, r0 8022e2a: 460b mov r3, r1 8022e2c: 9809 ldr r0, [sp, #36] ; 0x24 8022e2e: 990a ldr r1, [sp, #40] ; 0x28 8022e30: f7fd fa50 bl 80202d4 <__adddf3> 8022e34: e9cd 0106 strd r0, r1, [sp, #24] 8022e38: 9c07 ldr r4, [sp, #28] 8022e3a: 9009 str r0, [sp, #36] ; 0x24 8022e3c: 910a str r1, [sp, #40] ; 0x28 8022e3e: 9d0b ldr r5, [sp, #44] ; 0x2c 8022e40: b935 cbnz r5, 8022e50 <_strtod_r+0x578> 8022e42: 2300 movs r3, #0 8022e44: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022e48: 4023 ands r3, r4 8022e4a: 4598 cmp r8, r3 8022e4c: f000 81bc beq.w 80231c8 <_strtod_r+0x8f0> 8022e50: 4658 mov r0, fp 8022e52: 9918 ldr r1, [sp, #96] ; 0x60 8022e54: f001 fe8c bl 8024b70 <_Bfree> 8022e58: 4658 mov r0, fp 8022e5a: 4651 mov r1, sl 8022e5c: f001 fe88 bl 8024b70 <_Bfree> 8022e60: 4658 mov r0, fp 8022e62: 4639 mov r1, r7 8022e64: f001 fe84 bl 8024b70 <_Bfree> 8022e68: 4658 mov r0, fp 8022e6a: 4631 mov r1, r6 8022e6c: f001 fe80 bl 8024b70 <_Bfree> 8022e70: 9c11 ldr r4, [sp, #68] ; 0x44 8022e72: 4658 mov r0, fp 8022e74: ad16 add r5, sp, #88 ; 0x58 8022e76: 6861 ldr r1, [r4, #4] 8022e78: f001 fe44 bl 8024b04 <_Balloc> 8022e7c: 6923 ldr r3, [r4, #16] 8022e7e: 9913 ldr r1, [sp, #76] ; 0x4c 8022e80: 1c9a adds r2, r3, #2 8022e82: 0092 lsls r2, r2, #2 8022e84: 4682 mov sl, r0 8022e86: 300c adds r0, #12 8022e88: f7fe ff0c bl 8021ca4 8022e8c: 9a09 ldr r2, [sp, #36] ; 0x24 8022e8e: 9b0a ldr r3, [sp, #40] ; 0x28 8022e90: a819 add r0, sp, #100 ; 0x64 8022e92: 9500 str r5, [sp, #0] 8022e94: 9001 str r0, [sp, #4] 8022e96: 4658 mov r0, fp 8022e98: f002 f9c4 bl 8025224 <__d2b> 8022e9c: 2101 movs r1, #1 8022e9e: 9018 str r0, [sp, #96] ; 0x60 8022ea0: 4658 mov r0, fp 8022ea2: f001 ff5d bl 8024d60 <__i2b> 8022ea6: 9a16 ldr r2, [sp, #88] ; 0x58 8022ea8: 9b19 ldr r3, [sp, #100] ; 0x64 8022eaa: f46f 717f mvn.w r1, #1020 ; 0x3fc 8022eae: 2a00 cmp r2, #0 8022eb0: bfaa itet ge 8022eb2: 9d0d ldrge r5, [sp, #52] ; 0x34 8022eb4: 9c0e ldrlt r4, [sp, #56] ; 0x38 8022eb6: 18ac addge r4, r5, r2 8022eb8: 9d0b ldr r5, [sp, #44] ; 0x2c 8022eba: 4607 mov r7, r0 8022ebc: bfb8 it lt 8022ebe: ebc2 0004 rsblt r0, r2, r4 8022ec2: ebc5 0202 rsb r2, r5, r2 8022ec6: bfb8 it lt 8022ec8: 9c0d ldrlt r4, [sp, #52] ; 0x34 8022eca: eb02 0503 add.w r5, r2, r3 8022ece: bfa8 it ge 8022ed0: 980e ldrge r0, [sp, #56] ; 0x38 8022ed2: 428d cmp r5, r1 8022ed4: 990d ldr r1, [sp, #52] ; 0x34 8022ed6: bfb4 ite lt 8022ed8: f202 4333 addwlt r3, r2, #1075 ; 0x433 8022edc: f1c3 0336 rsbge r3, r3, #54 ; 0x36 8022ee0: 18e6 adds r6, r4, r3 8022ee2: 18c3 adds r3, r0, r3 8022ee4: 980b ldr r0, [sp, #44] ; 0x2c 8022ee6: 181d adds r5, r3, r0 8022ee8: 42a6 cmp r6, r4 8022eea: bfb4 ite lt 8022eec: 4633 movlt r3, r6 8022eee: 4623 movge r3, r4 8022ef0: 42ab cmp r3, r5 8022ef2: bfa8 it ge 8022ef4: 462b movge r3, r5 8022ef6: 2b00 cmp r3, #0 8022ef8: bfc2 ittt gt 8022efa: ebc3 0606 rsbgt r6, r3, r6 8022efe: ebc3 0505 rsbgt r5, r3, r5 8022f02: ebc3 0404 rsbgt r4, r3, r4 8022f06: b189 cbz r1, 8022f2c <_strtod_r+0x654> 8022f08: 460a mov r2, r1 8022f0a: 4658 mov r0, fp 8022f0c: 4639 mov r1, r7 8022f0e: f001 ffcf bl 8024eb0 <__pow5mult> 8022f12: 9a18 ldr r2, [sp, #96] ; 0x60 8022f14: 4607 mov r7, r0 8022f16: 4658 mov r0, fp 8022f18: 4639 mov r1, r7 8022f1a: f001 ff2b bl 8024d74 <__multiply> 8022f1e: 9918 ldr r1, [sp, #96] ; 0x60 8022f20: 4680 mov r8, r0 8022f22: 4658 mov r0, fp 8022f24: f001 fe24 bl 8024b70 <_Bfree> 8022f28: f8cd 8060 str.w r8, [sp, #96] ; 0x60 8022f2c: 2e00 cmp r6, #0 8022f2e: dd05 ble.n 8022f3c <_strtod_r+0x664> 8022f30: 4658 mov r0, fp 8022f32: 9918 ldr r1, [sp, #96] ; 0x60 8022f34: 4632 mov r2, r6 8022f36: f002 f80d bl 8024f54 <__lshift> 8022f3a: 9018 str r0, [sp, #96] ; 0x60 8022f3c: 9a0e ldr r2, [sp, #56] ; 0x38 8022f3e: b122 cbz r2, 8022f4a <_strtod_r+0x672> 8022f40: 4651 mov r1, sl 8022f42: 4658 mov r0, fp 8022f44: f001 ffb4 bl 8024eb0 <__pow5mult> 8022f48: 4682 mov sl, r0 8022f4a: 2d00 cmp r5, #0 8022f4c: dd05 ble.n 8022f5a <_strtod_r+0x682> 8022f4e: 4651 mov r1, sl 8022f50: 4658 mov r0, fp 8022f52: 462a mov r2, r5 8022f54: f001 fffe bl 8024f54 <__lshift> 8022f58: 4682 mov sl, r0 8022f5a: 2c00 cmp r4, #0 8022f5c: dd05 ble.n 8022f6a <_strtod_r+0x692> 8022f5e: 4639 mov r1, r7 8022f60: 4658 mov r0, fp 8022f62: 4622 mov r2, r4 8022f64: f001 fff6 bl 8024f54 <__lshift> 8022f68: 4607 mov r7, r0 8022f6a: 9918 ldr r1, [sp, #96] ; 0x60 8022f6c: 4652 mov r2, sl 8022f6e: 4658 mov r0, fp 8022f70: f04f 0800 mov.w r8, #0 8022f74: f002 f866 bl 8025044 <__mdiff> 8022f78: 4639 mov r1, r7 8022f7a: 68c4 ldr r4, [r0, #12] 8022f7c: 4606 mov r6, r0 8022f7e: f8c0 800c str.w r8, [r0, #12] 8022f82: 940f str r4, [sp, #60] ; 0x3c 8022f84: f002 f840 bl 8025008 <__mcmp> 8022f88: 4540 cmp r0, r8 8022f8a: f2c0 8213 blt.w 80233b4 <_strtod_r+0xadc> 8022f8e: f000 8261 beq.w 8023454 <_strtod_r+0xb7c> 8022f92: 4630 mov r0, r6 8022f94: 4639 mov r1, r7 8022f96: f002 f9a3 bl 80252e0 <__ratio> 8022f9a: 2200 movs r2, #0 8022f9c: f04f 4380 mov.w r3, #1073741824 ; 0x40000000 8022fa0: 4604 mov r4, r0 8022fa2: 460d mov r5, r1 8022fa4: f7fd fdc4 bl 8020b30 <__aeabi_dcmple> 8022fa8: 2800 cmp r0, #0 8022faa: f47f aeef bne.w 8022d8c <_strtod_r+0x4b4> 8022fae: 2300 movs r3, #0 8022fb0: 4620 mov r0, r4 8022fb2: f6c3 73e0 movt r3, #16352 ; 0x3fe0 8022fb6: 4629 mov r1, r5 8022fb8: 2200 movs r2, #0 8022fba: f7fd fb3d bl 8020638 <__aeabi_dmul> 8022fbe: 9c0f ldr r4, [sp, #60] ; 0x3c 8022fc0: 900c str r0, [sp, #48] ; 0x30 8022fc2: 4689 mov r9, r1 8022fc4: f101 4300 add.w r3, r1, #2147483648 ; 0x80000000 8022fc8: b104 cbz r4, 8022fcc <_strtod_r+0x6f4> 8022fca: 460b mov r3, r1 8022fcc: 9c0c ldr r4, [sp, #48] ; 0x30 8022fce: 461d mov r5, r3 8022fd0: f8dd c01c ldr.w ip, [sp, #28] 8022fd4: e6ea b.n 8022dac <_strtod_r+0x4d4> 8022fd6: 4640 mov r0, r8 8022fd8: 46a0 mov r8, r4 8022fda: 9009 str r0, [sp, #36] ; 0x24 8022fdc: f1a5 0130 sub.w r1, r5, #48 ; 0x30 8022fe0: 2909 cmp r1, #9 8022fe2: d803 bhi.n 8022fec <_strtod_r+0x714> 8022fe4: 9a17 ldr r2, [sp, #92] ; 0x5c 8022fe6: 3001 adds r0, #1 8022fe8: 920a str r2, [sp, #40] ; 0x28 8022fea: e66f b.n 8022ccc <_strtod_r+0x3f4> 8022fec: 2101 movs r1, #1 8022fee: e50a b.n 8022a06 <_strtod_r+0x12e> 8022ff0: f04f 0800 mov.w r8, #0 8022ff4: 2101 movs r1, #1 8022ff6: f8cd 8024 str.w r8, [sp, #36] ; 0x24 8022ffa: e504 b.n 8022a06 <_strtod_r+0x12e> 8022ffc: f3af 8000 nop.w 8023000: ffc00000 .word 0xffc00000 8023004: 41dfffff .word 0x41dfffff 8023008: f5b4 7f9a cmp.w r4, #308 ; 0x134 802300c: f300 8258 bgt.w 80234c0 <_strtod_r+0xbe8> 8023010: 1124 asrs r4, r4, #4 8023012: f648 7ad8 movw sl, #36824 ; 0x8fd8 8023016: 2c01 cmp r4, #1 8023018: f340 8398 ble.w 802374c <_strtod_r+0xe74> 802301c: f6c0 0a03 movt sl, #2051 ; 0x803 8023020: e9dd 2306 ldrd r2, r3, [sp, #24] 8023024: f04f 0900 mov.w r9, #0 8023028: 4655 mov r5, sl 802302a: f014 0f01 tst.w r4, #1 802302e: 4610 mov r0, r2 8023030: 4619 mov r1, r3 8023032: ea4f 0464 mov.w r4, r4, asr #1 8023036: f109 0901 add.w r9, r9, #1 802303a: d005 beq.n 8023048 <_strtod_r+0x770> 802303c: e9d5 2300 ldrd r2, r3, [r5] 8023040: f7fd fafa bl 8020638 <__aeabi_dmul> 8023044: 4602 mov r2, r0 8023046: 460b mov r3, r1 8023048: 3508 adds r5, #8 802304a: 2c01 cmp r4, #1 802304c: dced bgt.n 802302a <_strtod_r+0x752> 802304e: 4610 mov r0, r2 8023050: 4619 mov r1, r3 8023052: e9cd 0106 strd r0, r1, [sp, #24] 8023056: 9907 ldr r1, [sp, #28] 8023058: eb0a 09c9 add.w r9, sl, r9, lsl #3 802305c: f1a1 7154 sub.w r1, r1, #55574528 ; 0x3500000 8023060: 9107 str r1, [sp, #28] 8023062: e9dd 2306 ldrd r2, r3, [sp, #24] 8023066: e9d9 0100 ldrd r0, r1, [r9] 802306a: f7fd fae5 bl 8020638 <__aeabi_dmul> 802306e: 2300 movs r3, #0 8023070: 2200 movs r2, #0 8023072: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8023076: f6c7 42a0 movt r2, #31904 ; 0x7ca0 802307a: e9cd 0106 strd r0, r1, [sp, #24] 802307e: 9907 ldr r1, [sp, #28] 8023080: 400b ands r3, r1 8023082: 4293 cmp r3, r2 8023084: f200 821c bhi.w 80234c0 <_strtod_r+0xbe8> 8023088: 2200 movs r2, #0 802308a: f6c7 4290 movt r2, #31888 ; 0x7c90 802308e: 4293 cmp r3, r2 8023090: f240 8305 bls.w 802369e <_strtod_r+0xdc6> 8023094: f64f 72ff movw r2, #65535 ; 0xffff 8023098: f04f 30ff mov.w r0, #4294967295 802309c: 4615 mov r5, r2 802309e: 2400 movs r4, #0 80230a0: f6c7 75ef movt r5, #32751 ; 0x7fef 80230a4: 940b str r4, [sp, #44] ; 0x2c 80230a6: 9507 str r5, [sp, #28] 80230a8: 4681 mov r9, r0 80230aa: 9006 str r0, [sp, #24] 80230ac: 46aa mov sl, r5 80230ae: e651 b.n 8022d54 <_strtod_r+0x47c> 80230b0: 2301 movs r3, #1 80230b2: 930a str r3, [sp, #40] ; 0x28 80230b4: f10c 0302 add.w r3, ip, #2 80230b8: 9317 str r3, [sp, #92] ; 0x5c 80230ba: f89c 5002 ldrb.w r5, [ip, #2] 80230be: e4bc b.n 8022a3a <_strtod_r+0x162> 80230c0: 48ab ldr r0, [pc, #684] ; (8023370 <_strtod_r+0xa98>) 80230c2: 9a17 ldr r2, [sp, #92] ; 0x5c 80230c4: f810 1f01 ldrb.w r1, [r0, #1]! 80230c8: 4613 mov r3, r2 80230ca: 2900 cmp r1, #0 80230cc: f000 8311 beq.w 80236f2 <_strtod_r+0xe1a> 80230d0: 785b ldrb r3, [r3, #1] 80230d2: 3201 adds r2, #1 80230d4: 2b40 cmp r3, #64 ; 0x40 80230d6: dd02 ble.n 80230de <_strtod_r+0x806> 80230d8: 2b5a cmp r3, #90 ; 0x5a 80230da: bfd8 it le 80230dc: 3320 addle r3, #32 80230de: 428b cmp r3, r1 80230e0: d0f0 beq.n 80230c4 <_strtod_r+0x7ec> 80230e2: e5b8 b.n 8022c56 <_strtod_r+0x37e> 80230e4: 9b06 ldr r3, [sp, #24] 80230e6: f8dd c01c ldr.w ip, [sp, #28] 80230ea: 2b00 cmp r3, #0 80230ec: f040 80a6 bne.w 802323c <_strtod_r+0x964> 80230f0: f3cc 0313 ubfx r3, ip, #0, #20 80230f4: bb03 cbnz r3, 8023138 <_strtod_r+0x860> 80230f6: 2300 movs r3, #0 80230f8: 4620 mov r0, r4 80230fa: 4629 mov r1, r5 80230fc: 2200 movs r2, #0 80230fe: f6c3 73f0 movt r3, #16368 ; 0x3ff0 8023102: f8cd c010 str.w ip, [sp, #16] 8023106: f7fd fd09 bl 8020b1c <__aeabi_dcmplt> 802310a: f8dd c010 ldr.w ip, [sp, #16] 802310e: 2800 cmp r0, #0 8023110: f040 8246 bne.w 80235a0 <_strtod_r+0xcc8> 8023114: 2300 movs r3, #0 8023116: 2200 movs r2, #0 8023118: f6c3 73e0 movt r3, #16352 ; 0x3fe0 802311c: 4620 mov r0, r4 802311e: 4629 mov r1, r5 8023120: f7fd fa8a bl 8020638 <__aeabi_dmul> 8023124: f8dd c010 ldr.w ip, [sp, #16] 8023128: 4689 mov r9, r1 802312a: 4602 mov r2, r0 802312c: f101 4300 add.w r3, r1, #2147483648 ; 0x80000000 8023130: 900c str r0, [sp, #48] ; 0x30 8023132: 4614 mov r4, r2 8023134: 461d mov r5, r3 8023136: e639 b.n 8022dac <_strtod_r+0x4d4> 8023138: f04f 0900 mov.w r9, #0 802313c: 2500 movs r5, #0 802313e: f8cd 9030 str.w r9, [sp, #48] ; 0x30 8023142: 2400 movs r4, #0 8023144: f6cb 75f0 movt r5, #49136 ; 0xbff0 8023148: f6c3 79f0 movt r9, #16368 ; 0x3ff0 802314c: e62e b.n 8022dac <_strtod_r+0x4d4> 802314e: f1ac 7c54 sub.w ip, ip, #55574528 ; 0x3500000 8023152: 9a09 ldr r2, [sp, #36] ; 0x24 8023154: f8cd c01c str.w ip, [sp, #28] 8023158: 9b0a ldr r3, [sp, #40] ; 0x28 802315a: e9dd 0106 ldrd r0, r1, [sp, #24] 802315e: e9cd 4502 strd r4, r5, [sp, #8] 8023162: 4614 mov r4, r2 8023164: 461d mov r5, r3 8023166: e9cd 4514 strd r4, r5, [sp, #80] ; 0x50 802316a: f001 ffe1 bl 8025130 <__ulp> 802316e: 4602 mov r2, r0 8023170: 460b mov r3, r1 8023172: e9dd 0102 ldrd r0, r1, [sp, #8] 8023176: f7fd fa5f bl 8020638 <__aeabi_dmul> 802317a: 4602 mov r2, r0 802317c: 460b mov r3, r1 802317e: e9dd 0106 ldrd r0, r1, [sp, #24] 8023182: f7fd f8a7 bl 80202d4 <__adddf3> 8023186: 2300 movs r3, #0 8023188: f6c7 73f0 movt r3, #32752 ; 0x7ff0 802318c: f64f 72ff movw r2, #65535 ; 0xffff 8023190: f6c7 429f movt r2, #31903 ; 0x7c9f 8023194: e9cd 0106 strd r0, r1, [sp, #24] 8023198: 9c07 ldr r4, [sp, #28] 802319a: 4023 ands r3, r4 802319c: 4293 cmp r3, r2 802319e: d976 bls.n 802328e <_strtod_r+0x9b6> 80231a0: f64f 73ff movw r3, #65535 ; 0xffff 80231a4: 9d15 ldr r5, [sp, #84] ; 0x54 80231a6: f6c7 73ef movt r3, #32751 ; 0x7fef 80231aa: 429d cmp r5, r3 80231ac: f000 8177 beq.w 802349e <_strtod_r+0xbc6> 80231b0: f64f 71ff movw r1, #65535 ; 0xffff 80231b4: f04f 33ff mov.w r3, #4294967295 80231b8: 460a mov r2, r1 80231ba: 9306 str r3, [sp, #24] 80231bc: f6c7 72ef movt r2, #32751 ; 0x7fef 80231c0: 9309 str r3, [sp, #36] ; 0x24 80231c2: 9207 str r2, [sp, #28] 80231c4: 920a str r2, [sp, #40] ; 0x28 80231c6: e643 b.n 8022e50 <_strtod_r+0x578> 80231c8: 4649 mov r1, r9 80231ca: 980c ldr r0, [sp, #48] ; 0x30 80231cc: f7fd fcce bl 8020b6c <__aeabi_d2iz> 80231d0: f7fd f9cc bl 802056c <__aeabi_i2d> 80231d4: 4602 mov r2, r0 80231d6: 460b mov r3, r1 80231d8: 980c ldr r0, [sp, #48] ; 0x30 80231da: 4649 mov r1, r9 80231dc: f7fd f878 bl 80202d0 <__aeabi_dsub> 80231e0: 9d0f ldr r5, [sp, #60] ; 0x3c 80231e2: 4680 mov r8, r0 80231e4: 4689 mov r9, r1 80231e6: 2d00 cmp r5, #0 80231e8: d137 bne.n 802325a <_strtod_r+0x982> 80231ea: 9a06 ldr r2, [sp, #24] 80231ec: 2a00 cmp r2, #0 80231ee: d134 bne.n 802325a <_strtod_r+0x982> 80231f0: f3c4 0413 ubfx r4, r4, #0, #20 80231f4: 2c00 cmp r4, #0 80231f6: d130 bne.n 802325a <_strtod_r+0x982> 80231f8: a357 add r3, pc, #348 ; (adr r3, 8023358 <_strtod_r+0xa80>) 80231fa: e9d3 2300 ldrd r2, r3, [r3] 80231fe: f7fd fc8d bl 8020b1c <__aeabi_dcmplt> 8023202: 2800 cmp r0, #0 8023204: f43f ae24 beq.w 8022e50 <_strtod_r+0x578> 8023208: 4654 mov r4, sl 802320a: f8dd 9024 ldr.w r9, [sp, #36] ; 0x24 802320e: f8dd a028 ldr.w sl, [sp, #40] ; 0x28 8023212: 4658 mov r0, fp 8023214: 9918 ldr r1, [sp, #96] ; 0x60 8023216: f001 fcab bl 8024b70 <_Bfree> 802321a: 4658 mov r0, fp 802321c: 4621 mov r1, r4 802321e: f001 fca7 bl 8024b70 <_Bfree> 8023222: 4658 mov r0, fp 8023224: 4639 mov r1, r7 8023226: f001 fca3 bl 8024b70 <_Bfree> 802322a: 4658 mov r0, fp 802322c: 9911 ldr r1, [sp, #68] ; 0x44 802322e: f001 fc9f bl 8024b70 <_Bfree> 8023232: 4658 mov r0, fp 8023234: 4631 mov r1, r6 8023236: f001 fc9b bl 8024b70 <_Bfree> 802323a: e49a b.n 8022b72 <_strtod_r+0x29a> 802323c: 2b01 cmp r3, #1 802323e: f47f af7b bne.w 8023138 <_strtod_r+0x860> 8023242: 4661 mov r1, ip 8023244: 2900 cmp r1, #0 8023246: f47f af77 bne.w 8023138 <_strtod_r+0x860> 802324a: 4654 mov r4, sl 802324c: f04f 0900 mov.w r9, #0 8023250: 46ca mov sl, r9 8023252: 2322 movs r3, #34 ; 0x22 8023254: f8cb 3000 str.w r3, [fp] 8023258: e7db b.n 8023212 <_strtod_r+0x93a> 802325a: 4640 mov r0, r8 802325c: 4649 mov r1, r9 802325e: a340 add r3, pc, #256 ; (adr r3, 8023360 <_strtod_r+0xa88>) 8023260: e9d3 2300 ldrd r2, r3, [r3] 8023264: f7fd fc5a bl 8020b1c <__aeabi_dcmplt> 8023268: 2800 cmp r0, #0 802326a: d1cd bne.n 8023208 <_strtod_r+0x930> 802326c: 4640 mov r0, r8 802326e: 4649 mov r1, r9 8023270: a33d add r3, pc, #244 ; (adr r3, 8023368 <_strtod_r+0xa90>) 8023272: e9d3 2300 ldrd r2, r3, [r3] 8023276: f7fd fc6f bl 8020b58 <__aeabi_dcmpgt> 802327a: 2800 cmp r0, #0 802327c: f43f ade8 beq.w 8022e50 <_strtod_r+0x578> 8023280: e7c2 b.n 8023208 <_strtod_r+0x930> 8023282: f04f 0900 mov.w r9, #0 8023286: 900c str r0, [sp, #48] ; 0x30 8023288: f6c3 79f0 movt r9, #16368 ; 0x3ff0 802328c: e5b7 b.n 8022dfe <_strtod_r+0x526> 802328e: 9906 ldr r1, [sp, #24] 8023290: f104 7454 add.w r4, r4, #55574528 ; 0x3500000 8023294: 9407 str r4, [sp, #28] 8023296: 940a str r4, [sp, #40] ; 0x28 8023298: 9109 str r1, [sp, #36] ; 0x24 802329a: e5d0 b.n 8022e3e <_strtod_r+0x566> 802329c: f8cd c05c str.w ip, [sp, #92] ; 0x5c 80232a0: 2200 movs r2, #0 80232a2: f1b8 0f00 cmp.w r8, #0 80232a6: f47f ac0f bne.w 8022ac8 <_strtod_r+0x1f0> 80232aa: e495 b.n 8022bd8 <_strtod_r+0x300> 80232ac: 9d12 ldr r5, [sp, #72] ; 0x48 80232ae: f240 0404 movw r4, #4 80232b2: f2c2 0400 movt r4, #8192 ; 0x2000 80232b6: ab18 add r3, sp, #96 ; 0x60 80232b8: 4658 mov r0, fp 80232ba: e88d 0028 stmia.w sp, {r3, r5} 80232be: a917 add r1, sp, #92 ; 0x5c 80232c0: 4622 mov r2, r4 80232c2: ab19 add r3, sp, #100 ; 0x64 80232c4: f000 fd1c bl 8023d00 <__gethex> 80232c8: f010 0707 ands.w r7, r0, #7 80232cc: 4605 mov r5, r0 80232ce: bf04 itt eq 80232d0: 46b9 moveq r9, r7 80232d2: 46ca moveq sl, r9 80232d4: f43f ac4d beq.w 8022b72 <_strtod_r+0x29a> 80232d8: 2f06 cmp r7, #6 80232da: f000 816f beq.w 80235bc <_strtod_r+0xce4> 80232de: 9a18 ldr r2, [sp, #96] ; 0x60 80232e0: b13a cbz r2, 80232f2 <_strtod_r+0xa1a> 80232e2: 6821 ldr r1, [r4, #0] 80232e4: a81a add r0, sp, #104 ; 0x68 80232e6: f002 f845 bl 8025374 <__copybits> 80232ea: 4658 mov r0, fp 80232ec: 9918 ldr r1, [sp, #96] ; 0x60 80232ee: f001 fc3f bl 8024b70 <_Bfree> 80232f2: 9b19 ldr r3, [sp, #100] ; 0x64 80232f4: 2f06 cmp r7, #6 80232f6: d80b bhi.n 8023310 <_strtod_r+0xa38> 80232f8: e8df f007 tbb [pc, r7] 80232fc: 141b203c .word 0x141b203c 8023300: 2004 .short 0x2004 8023302: 3c .byte 0x3c 8023303: 00 .byte 0x00 8023304: f06f 4400 mvn.w r4, #2147483648 ; 0x80000000 8023308: f04f 30ff mov.w r0, #4294967295 802330c: 9407 str r4, [sp, #28] 802330e: 9006 str r0, [sp, #24] 8023310: 072b lsls r3, r5, #28 8023312: f57f acb1 bpl.w 8022c78 <_strtod_r+0x3a0> 8023316: 9907 ldr r1, [sp, #28] 8023318: f8dd 9018 ldr.w r9, [sp, #24] 802331c: f041 4300 orr.w r3, r1, #2147483648 ; 0x80000000 8023320: 469a mov sl, r3 8023322: e426 b.n 8022b72 <_strtod_r+0x29a> 8023324: 2100 movs r1, #0 8023326: 9106 str r1, [sp, #24] 8023328: 460a mov r2, r1 802332a: f6c7 72f0 movt r2, #32752 ; 0x7ff0 802332e: 9207 str r2, [sp, #28] 8023330: e7ee b.n 8023310 <_strtod_r+0xa38> 8023332: 9b1a ldr r3, [sp, #104] ; 0x68 8023334: 9c1b ldr r4, [sp, #108] ; 0x6c 8023336: 9306 str r3, [sp, #24] 8023338: 9407 str r4, [sp, #28] 802333a: e7e9 b.n 8023310 <_strtod_r+0xa38> 802333c: 981a ldr r0, [sp, #104] ; 0x68 802333e: f203 4333 addw r3, r3, #1075 ; 0x433 8023342: 9a1b ldr r2, [sp, #108] ; 0x6c 8023344: f422 1280 bic.w r2, r2, #1048576 ; 0x100000 8023348: 9006 str r0, [sp, #24] 802334a: ea42 5203 orr.w r2, r2, r3, lsl #20 802334e: 9207 str r2, [sp, #28] 8023350: e7de b.n 8023310 <_strtod_r+0xa38> 8023352: bf00 nop 8023354: f3af 8000 nop.w 8023358: 94a03595 .word 0x94a03595 802335c: 3fcfffff .word 0x3fcfffff 8023360: 94a03595 .word 0x94a03595 8023364: 3fdfffff .word 0x3fdfffff 8023368: 35afe535 .word 0x35afe535 802336c: 3fe00000 .word 0x3fe00000 8023370: 08045273 .word 0x08045273 8023374: 2100 movs r1, #0 8023376: 9107 str r1, [sp, #28] 8023378: 9106 str r1, [sp, #24] 802337a: e7c9 b.n 8023310 <_strtod_r+0xa38> 802337c: 46b0 mov r8, r6 802337e: 4657 mov r7, sl 8023380: 4654 mov r4, sl 8023382: f7ff bb24 b.w 80229ce <_strtod_r+0xf6> 8023386: 2300 movs r3, #0 8023388: 930a str r3, [sp, #40] ; 0x28 802338a: e693 b.n 80230b4 <_strtod_r+0x7dc> 802338c: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 8023390: eb08 0300 add.w r3, r8, r0 8023394: 3b01 subs r3, #1 8023396: 2b08 cmp r3, #8 8023398: f103 0801 add.w r8, r3, #1 802339c: f300 8172 bgt.w 8023684 <_strtod_r+0xdac> 80233a0: eb07 0787 add.w r7, r7, r7, lsl #2 80233a4: 2000 movs r0, #0 80233a6: eb01 0747 add.w r7, r1, r7, lsl #1 80233aa: 9d0a ldr r5, [sp, #40] ; 0x28 80233ac: 1c6b adds r3, r5, #1 80233ae: 9317 str r3, [sp, #92] ; 0x5c 80233b0: 786d ldrb r5, [r5, #1] 80233b2: e613 b.n 8022fdc <_strtod_r+0x704> 80233b4: 9d0f ldr r5, [sp, #60] ; 0x3c 80233b6: 4654 mov r4, sl 80233b8: bb7d cbnz r5, 802341a <_strtod_r+0xb42> 80233ba: 9806 ldr r0, [sp, #24] 80233bc: bb68 cbnz r0, 802341a <_strtod_r+0xb42> 80233be: 9a07 ldr r2, [sp, #28] 80233c0: f3c2 0313 ubfx r3, r2, #0, #20 80233c4: bb4b cbnz r3, 802341a <_strtod_r+0xb42> 80233c6: 4643 mov r3, r8 80233c8: f6c7 73f0 movt r3, #32752 ; 0x7ff0 80233cc: 4013 ands r3, r2 80233ce: f1b3 6fd6 cmp.w r3, #112197632 ; 0x6b00000 80233d2: d922 bls.n 802341a <_strtod_r+0xb42> 80233d4: 6973 ldr r3, [r6, #20] 80233d6: b913 cbnz r3, 80233de <_strtod_r+0xb06> 80233d8: 6933 ldr r3, [r6, #16] 80233da: 2b01 cmp r3, #1 80233dc: dd1d ble.n 802341a <_strtod_r+0xb42> 80233de: 4631 mov r1, r6 80233e0: 2201 movs r2, #1 80233e2: 4658 mov r0, fp 80233e4: f001 fdb6 bl 8024f54 <__lshift> 80233e8: 4639 mov r1, r7 80233ea: 4606 mov r6, r0 80233ec: f001 fe0c bl 8025008 <__mcmp> 80233f0: 2800 cmp r0, #0 80233f2: dd12 ble.n 802341a <_strtod_r+0xb42> 80233f4: 9d0b ldr r5, [sp, #44] ; 0x2c 80233f6: 2d00 cmp r5, #0 80233f8: f040 8195 bne.w 8023726 <_strtod_r+0xe4e> 80233fc: 9807 ldr r0, [sp, #28] 80233fe: f020 4300 bic.w r3, r0, #2147483648 ; 0x80000000 8023402: 0d1b lsrs r3, r3, #20 8023404: 051b lsls r3, r3, #20 8023406: f5a3 1380 sub.w r3, r3, #1048576 ; 0x100000 802340a: f04f 32ff mov.w r2, #4294967295 802340e: 9206 str r2, [sp, #24] 8023410: ea6f 5313 mvn.w r3, r3, lsr #20 8023414: ea6f 5303 mvn.w r3, r3, lsl #20 8023418: 9307 str r3, [sp, #28] 802341a: 9d0b ldr r5, [sp, #44] ; 0x2c 802341c: 2d00 cmp r5, #0 802341e: f000 80c8 beq.w 80235b2 <_strtod_r+0xcda> 8023422: 2200 movs r2, #0 8023424: 2300 movs r3, #0 8023426: f6c3 1250 movt r2, #14672 ; 0x3950 802342a: 9314 str r3, [sp, #80] ; 0x50 802342c: 9215 str r2, [sp, #84] ; 0x54 802342e: e9dd 0106 ldrd r0, r1, [sp, #24] 8023432: e9dd 2314 ldrd r2, r3, [sp, #80] ; 0x50 8023436: f7fd f8ff bl 8020638 <__aeabi_dmul> 802343a: e9cd 0106 strd r0, r1, [sp, #24] 802343e: 468a mov sl, r1 8023440: 9907 ldr r1, [sp, #28] 8023442: 4681 mov r9, r0 8023444: 2900 cmp r1, #0 8023446: f47f aee4 bne.w 8023212 <_strtod_r+0x93a> 802344a: 9a06 ldr r2, [sp, #24] 802344c: 2a00 cmp r2, #0 802344e: f47f aee0 bne.w 8023212 <_strtod_r+0x93a> 8023452: e6fe b.n 8023252 <_strtod_r+0x97a> 8023454: 9d0f ldr r5, [sp, #60] ; 0x3c 8023456: 4654 mov r4, sl 8023458: f8dd 9024 ldr.w r9, [sp, #36] ; 0x24 802345c: f8dd a028 ldr.w sl, [sp, #40] ; 0x28 8023460: 2d00 cmp r5, #0 8023462: f000 80d3 beq.w 802360c <_strtod_r+0xd34> 8023466: 9b07 ldr r3, [sp, #28] 8023468: f64f 72ff movw r2, #65535 ; 0xffff 802346c: f2c0 020f movt r2, #15 8023470: f023 417f bic.w r1, r3, #4278190080 ; 0xff000000 8023474: f421 0170 bic.w r1, r1, #15728640 ; 0xf00000 8023478: 4291 cmp r1, r2 802347a: 9906 ldr r1, [sp, #24] 802347c: f000 8119 beq.w 80236b2 <_strtod_r+0xdda> 8023480: 07cb lsls r3, r1, #31 8023482: d5ca bpl.n 802341a <_strtod_r+0xb42> 8023484: 4648 mov r0, r9 8023486: 4651 mov r1, sl 8023488: f001 fe52 bl 8025130 <__ulp> 802348c: 4602 mov r2, r0 802348e: 460b mov r3, r1 8023490: 4648 mov r0, r9 8023492: 4651 mov r1, sl 8023494: f7fc ff1e bl 80202d4 <__adddf3> 8023498: e9cd 0106 strd r0, r1, [sp, #24] 802349c: e7bd b.n 802341a <_strtod_r+0xb42> 802349e: 9814 ldr r0, [sp, #80] ; 0x50 80234a0: 3001 adds r0, #1 80234a2: f47f ae85 bne.w 80231b0 <_strtod_r+0x8d8> 80234a6: 2000 movs r0, #0 80234a8: 4654 mov r4, sl 80234aa: 4601 mov r1, r0 80234ac: 2322 movs r3, #34 ; 0x22 80234ae: f6c7 71f0 movt r1, #32752 ; 0x7ff0 80234b2: f8cb 3000 str.w r3, [fp] 80234b6: 9107 str r1, [sp, #28] 80234b8: 4681 mov r9, r0 80234ba: 9006 str r0, [sp, #24] 80234bc: 468a mov sl, r1 80234be: e6a8 b.n 8023212 <_strtod_r+0x93a> 80234c0: 2300 movs r3, #0 80234c2: 2500 movs r5, #0 80234c4: 461c mov r4, r3 80234c6: 9506 str r5, [sp, #24] 80234c8: f6c7 74f0 movt r4, #32752 ; 0x7ff0 80234cc: 2322 movs r3, #34 ; 0x22 80234ce: 9407 str r4, [sp, #28] 80234d0: 46a9 mov r9, r5 80234d2: f8cb 3000 str.w r3, [fp] 80234d6: 46a2 mov sl, r4 80234d8: f7ff bb4b b.w 8022b72 <_strtod_r+0x29a> 80234dc: f43f ac35 beq.w 8022d4a <_strtod_r+0x472> 80234e0: 4264 negs r4, r4 80234e2: f014 020f ands.w r2, r4, #15 80234e6: d00d beq.n 8023504 <_strtod_r+0xc2c> 80234e8: f648 63e8 movw r3, #36584 ; 0x8ee8 80234ec: e9dd 0106 ldrd r0, r1, [sp, #24] 80234f0: f6c0 0303 movt r3, #2051 ; 0x803 80234f4: eb03 03c2 add.w r3, r3, r2, lsl #3 80234f8: e9d3 2300 ldrd r2, r3, [r3] 80234fc: f7fd f9c6 bl 802088c <__aeabi_ddiv> 8023500: e9cd 0106 strd r0, r1, [sp, #24] 8023504: 1124 asrs r4, r4, #4 8023506: f43f ac20 beq.w 8022d4a <_strtod_r+0x472> 802350a: 2c1f cmp r4, #31 802350c: dc40 bgt.n 8023590 <_strtod_r+0xcb8> 802350e: f014 0f10 tst.w r4, #16 8023512: bf14 ite ne 8023514: 256a movne r5, #106 ; 0x6a 8023516: 2500 moveq r5, #0 8023518: 2c00 cmp r4, #0 802351a: 950b str r5, [sp, #44] ; 0x2c 802351c: dd17 ble.n 802354e <_strtod_r+0xc76> 802351e: f648 65b0 movw r5, #36528 ; 0x8eb0 8023522: e9dd 2306 ldrd r2, r3, [sp, #24] 8023526: f6c0 0503 movt r5, #2051 ; 0x803 802352a: f014 0f01 tst.w r4, #1 802352e: 4610 mov r0, r2 8023530: 4619 mov r1, r3 8023532: d005 beq.n 8023540 <_strtod_r+0xc68> 8023534: e9d5 2300 ldrd r2, r3, [r5] 8023538: f7fd f87e bl 8020638 <__aeabi_dmul> 802353c: 4602 mov r2, r0 802353e: 460b mov r3, r1 8023540: 3508 adds r5, #8 8023542: 1064 asrs r4, r4, #1 8023544: d1f1 bne.n 802352a <_strtod_r+0xc52> 8023546: 4610 mov r0, r2 8023548: 4619 mov r1, r3 802354a: e9cd 0106 strd r0, r1, [sp, #24] 802354e: 9c0b ldr r4, [sp, #44] ; 0x2c 8023550: b18c cbz r4, 8023576 <_strtod_r+0xc9e> 8023552: 9a07 ldr r2, [sp, #28] 8023554: f3c2 530a ubfx r3, r2, #20, #11 8023558: f1c3 036b rsb r3, r3, #107 ; 0x6b 802355c: 2b00 cmp r3, #0 802355e: dd0a ble.n 8023576 <_strtod_r+0xc9e> 8023560: 2b1f cmp r3, #31 8023562: f340 810a ble.w 802377a <_strtod_r+0xea2> 8023566: 2100 movs r1, #0 8023568: 2b34 cmp r3, #52 ; 0x34 802356a: 9106 str r1, [sp, #24] 802356c: f340 810d ble.w 802378a <_strtod_r+0xeb2> 8023570: f04f 725c mov.w r2, #57671680 ; 0x3700000 8023574: 9207 str r2, [sp, #28] 8023576: 9d06 ldr r5, [sp, #24] 8023578: 2200 movs r2, #0 802357a: 9c07 ldr r4, [sp, #28] 802357c: 2300 movs r3, #0 802357e: 4628 mov r0, r5 8023580: 46a9 mov r9, r5 8023582: 4621 mov r1, r4 8023584: 46a2 mov sl, r4 8023586: f7fd fabf bl 8020b08 <__aeabi_dcmpeq> 802358a: 2800 cmp r0, #0 802358c: f43f abe2 beq.w 8022d54 <_strtod_r+0x47c> 8023590: f04f 0900 mov.w r9, #0 8023594: 2322 movs r3, #34 ; 0x22 8023596: 46ca mov sl, r9 8023598: f8cb 3000 str.w r3, [fp] 802359c: f7ff bae9 b.w 8022b72 <_strtod_r+0x29a> 80235a0: 9a0f ldr r2, [sp, #60] ; 0x3c 80235a2: 2300 movs r3, #0 80235a4: 4699 mov r9, r3 80235a6: f6cb 73e0 movt r3, #49120 ; 0xbfe0 80235aa: f6c3 79e0 movt r9, #16352 ; 0x3fe0 80235ae: 920c str r2, [sp, #48] ; 0x30 80235b0: e5bf b.n 8023132 <_strtod_r+0x85a> 80235b2: f8dd 9018 ldr.w r9, [sp, #24] 80235b6: f8dd a01c ldr.w sl, [sp, #28] 80235ba: e62a b.n 8023212 <_strtod_r+0x93a> 80235bc: f04f 0900 mov.w r9, #0 80235c0: 3601 adds r6, #1 80235c2: 46ca mov sl, r9 80235c4: 9617 str r6, [sp, #92] ; 0x5c 80235c6: f7ff bad4 b.w 8022b72 <_strtod_r+0x29a> 80235ca: 9c09 ldr r4, [sp, #36] ; 0x24 80235cc: f1c8 0325 rsb r3, r8, #37 ; 0x25 80235d0: 429c cmp r4, r3 80235d2: f73f ab9d bgt.w 8022d10 <_strtod_r+0x438> 80235d6: f1c8 080f rsb r8, r8, #15 80235da: f648 64e8 movw r4, #36584 ; 0x8ee8 80235de: f6c0 0403 movt r4, #2051 ; 0x803 80235e2: e9dd 2306 ldrd r2, r3, [sp, #24] 80235e6: eb04 01c8 add.w r1, r4, r8, lsl #3 80235ea: e9d1 0100 ldrd r0, r1, [r1] 80235ee: f7fd f823 bl 8020638 <__aeabi_dmul> 80235f2: 9d09 ldr r5, [sp, #36] ; 0x24 80235f4: ebc8 0805 rsb r8, r8, r5 80235f8: eb04 04c8 add.w r4, r4, r8, lsl #3 80235fc: e9d4 2300 ldrd r2, r3, [r4] 8023600: f7fd f81a bl 8020638 <__aeabi_dmul> 8023604: 4681 mov r9, r0 8023606: 468a mov sl, r1 8023608: f7ff bab3 b.w 8022b72 <_strtod_r+0x29a> 802360c: 9907 ldr r1, [sp, #28] 802360e: f3c1 0313 ubfx r3, r1, #0, #20 8023612: 2b00 cmp r3, #0 8023614: d141 bne.n 802369a <_strtod_r+0xdc2> 8023616: 9b06 ldr r3, [sp, #24] 8023618: 2b00 cmp r3, #0 802361a: f43f aeeb beq.w 80233f4 <_strtod_r+0xb1c> 802361e: 07da lsls r2, r3, #31 8023620: f57f aefb bpl.w 802341a <_strtod_r+0xb42> 8023624: 4648 mov r0, r9 8023626: 4651 mov r1, sl 8023628: f001 fd82 bl 8025130 <__ulp> 802362c: 4602 mov r2, r0 802362e: 460b mov r3, r1 8023630: 4648 mov r0, r9 8023632: 4651 mov r1, sl 8023634: f7fc fe4c bl 80202d0 <__aeabi_dsub> 8023638: 4602 mov r2, r0 802363a: 460b mov r3, r1 802363c: e9cd 2306 strd r2, r3, [sp, #24] 8023640: 2200 movs r2, #0 8023642: 2300 movs r3, #0 8023644: f7fd fa60 bl 8020b08 <__aeabi_dcmpeq> 8023648: 2800 cmp r0, #0 802364a: f47f adff bne.w 802324c <_strtod_r+0x974> 802364e: e6e4 b.n 802341a <_strtod_r+0xb42> 8023650: 9d09 ldr r5, [sp, #36] ; 0x24 8023652: 426d negs r5, r5 8023654: 950d str r5, [sp, #52] ; 0x34 8023656: f7ff bb8b b.w 8022d70 <_strtod_r+0x498> 802365a: 9c09 ldr r4, [sp, #36] ; 0x24 802365c: f114 0f16 cmn.w r4, #22 8023660: f6ff ab56 blt.w 8022d10 <_strtod_r+0x438> 8023664: f648 63e8 movw r3, #36584 ; 0x8ee8 8023668: e9dd 0106 ldrd r0, r1, [sp, #24] 802366c: f6c0 0303 movt r3, #2051 ; 0x803 8023670: eba3 03c4 sub.w r3, r3, r4, lsl #3 8023674: e9d3 2300 ldrd r2, r3, [r3] 8023678: f7fd f908 bl 802088c <__aeabi_ddiv> 802367c: 4681 mov r9, r0 802367e: 468a mov sl, r1 8023680: f7ff ba77 b.w 8022b72 <_strtod_r+0x29a> 8023684: 2000 movs r0, #0 8023686: f1b8 0f10 cmp.w r8, #16 802368a: f73f ae8e bgt.w 80233aa <_strtod_r+0xad2> 802368e: eb0a 0a8a add.w sl, sl, sl, lsl #2 8023692: 2000 movs r0, #0 8023694: eb01 0a4a add.w sl, r1, sl, lsl #1 8023698: e687 b.n 80233aa <_strtod_r+0xad2> 802369a: 9b06 ldr r3, [sp, #24] 802369c: e7bf b.n 802361e <_strtod_r+0xd46> 802369e: f101 7154 add.w r1, r1, #55574528 ; 0x3500000 80236a2: 2400 movs r4, #0 80236a4: 9107 str r1, [sp, #28] 80236a6: 468a mov sl, r1 80236a8: 940b str r4, [sp, #44] ; 0x2c 80236aa: f8dd 9018 ldr.w r9, [sp, #24] 80236ae: f7ff bb51 b.w 8022d54 <_strtod_r+0x47c> 80236b2: 9d0b ldr r5, [sp, #44] ; 0x2c 80236b4: b1d5 cbz r5, 80236ec <_strtod_r+0xe14> 80236b6: 2200 movs r2, #0 80236b8: f6c7 72f0 movt r2, #32752 ; 0x7ff0 80236bc: 401a ands r2, r3 80236be: f1b2 6fd4 cmp.w r2, #111149056 ; 0x6a00000 80236c2: d813 bhi.n 80236ec <_strtod_r+0xe14> 80236c4: 0d12 lsrs r2, r2, #20 80236c6: f04f 30ff mov.w r0, #4294967295 80236ca: f1c2 026b rsb r2, r2, #107 ; 0x6b 80236ce: fa00 f202 lsl.w r2, r0, r2 80236d2: 4291 cmp r1, r2 80236d4: f47f aed4 bne.w 8023480 <_strtod_r+0xba8> 80236d8: 2200 movs r2, #0 80236da: 2000 movs r0, #0 80236dc: f6c7 72f0 movt r2, #32752 ; 0x7ff0 80236e0: 9006 str r0, [sp, #24] 80236e2: 401a ands r2, r3 80236e4: f502 1280 add.w r2, r2, #1048576 ; 0x100000 80236e8: 9207 str r2, [sp, #28] 80236ea: e696 b.n 802341a <_strtod_r+0xb42> 80236ec: f04f 32ff mov.w r2, #4294967295 80236f0: e7ef b.n 80236d2 <_strtod_r+0xdfa> 80236f2: 4c2a ldr r4, [pc, #168] ; (802379c <_strtod_r+0xec4>) 80236f4: 4611 mov r1, r2 80236f6: 9217 str r2, [sp, #92] ; 0x5c 80236f8: f814 0f01 ldrb.w r0, [r4, #1]! 80236fc: 460b mov r3, r1 80236fe: b310 cbz r0, 8023746 <_strtod_r+0xe6e> 8023700: 785b ldrb r3, [r3, #1] 8023702: 3101 adds r1, #1 8023704: 2b40 cmp r3, #64 ; 0x40 8023706: dd02 ble.n 802370e <_strtod_r+0xe36> 8023708: 2b5a cmp r3, #90 ; 0x5a 802370a: bfd8 it le 802370c: 3320 addle r3, #32 802370e: 4283 cmp r3, r0 8023710: d0f2 beq.n 80236f8 <_strtod_r+0xe20> 8023712: 3201 adds r2, #1 8023714: 9217 str r2, [sp, #92] ; 0x5c 8023716: 2500 movs r5, #0 8023718: 9506 str r5, [sp, #24] 802371a: 4628 mov r0, r5 802371c: f6c7 70f0 movt r0, #32752 ; 0x7ff0 8023720: 9007 str r0, [sp, #28] 8023722: f7ff baa9 b.w 8022c78 <_strtod_r+0x3a0> 8023726: 9907 ldr r1, [sp, #28] 8023728: f021 4300 bic.w r3, r1, #2147483648 ; 0x80000000 802372c: 0d1b lsrs r3, r3, #20 802372e: 051b lsls r3, r3, #20 8023730: f1b3 6fd6 cmp.w r3, #112197632 ; 0x6b00000 8023734: f63f ae67 bhi.w 8023406 <_strtod_r+0xb2e> 8023738: f1b3 7f5c cmp.w r3, #57671680 ; 0x3700000 802373c: f63f ae71 bhi.w 8023422 <_strtod_r+0xb4a> 8023740: e584 b.n 802324c <_strtod_r+0x974> 8023742: 4643 mov r3, r8 8023744: e627 b.n 8023396 <_strtod_r+0xabe> 8023746: 3101 adds r1, #1 8023748: 9117 str r1, [sp, #92] ; 0x5c 802374a: e7e4 b.n 8023716 <_strtod_r+0xe3e> 802374c: f04f 0900 mov.w r9, #0 8023750: f6c0 0a03 movt sl, #2051 ; 0x803 8023754: e47f b.n 8023056 <_strtod_r+0x77e> 8023756: a817 add r0, sp, #92 ; 0x5c 8023758: 4911 ldr r1, [pc, #68] ; (80237a0 <_strtod_r+0xec8>) 802375a: aa1a add r2, sp, #104 ; 0x68 802375c: f000 fd7e bl 802425c <__hexnan> 8023760: 2805 cmp r0, #5 8023762: f47f aa83 bne.w 8022c6c <_strtod_r+0x394> 8023766: 9b1b ldr r3, [sp, #108] ; 0x6c 8023768: 9a1a ldr r2, [sp, #104] ; 0x68 802376a: f043 43ff orr.w r3, r3, #2139095040 ; 0x7f800000 802376e: f443 03e0 orr.w r3, r3, #7340032 ; 0x700000 8023772: 9307 str r3, [sp, #28] 8023774: 9206 str r2, [sp, #24] 8023776: f7ff ba7f b.w 8022c78 <_strtod_r+0x3a0> 802377a: f04f 32ff mov.w r2, #4294967295 802377e: 9c06 ldr r4, [sp, #24] 8023780: fa02 f303 lsl.w r3, r2, r3 8023784: 401c ands r4, r3 8023786: 9406 str r4, [sp, #24] 8023788: e6f5 b.n 8023576 <_strtod_r+0xc9e> 802378a: f04f 31ff mov.w r1, #4294967295 802378e: 3b20 subs r3, #32 8023790: fa01 f303 lsl.w r3, r1, r3 8023794: 4013 ands r3, r2 8023796: 9307 str r3, [sp, #28] 8023798: e6ed b.n 8023576 <_strtod_r+0xc9e> 802379a: bf00 nop 802379c: 08045277 .word 0x08045277 80237a0: 20000018 .word 0x20000018 080237a4 : 80237a4: f240 032c movw r3, #44 ; 0x2c 80237a8: 460a mov r2, r1 80237aa: f2c2 0300 movt r3, #8192 ; 0x2000 80237ae: 4601 mov r1, r0 80237b0: 6818 ldr r0, [r3, #0] 80237b2: f7ff b891 b.w 80228d8 <_strtod_r> 80237b6: bf00 nop 080237b8 : 80237b8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 80237bc: f240 062c movw r6, #44 ; 0x2c 80237c0: f2c2 0600 movt r6, #8192 ; 0x2000 80237c4: 460a mov r2, r1 80237c6: 4601 mov r1, r0 80237c8: f04f 0801 mov.w r8, #1 80237cc: 6830 ldr r0, [r6, #0] 80237ce: f7ff f883 bl 80228d8 <_strtod_r> 80237d2: 460d mov r5, r1 80237d4: 4604 mov r4, r0 80237d6: f7fd fa11 bl 8020bfc <__aeabi_d2f> 80237da: 2100 movs r1, #0 80237dc: 4607 mov r7, r0 80237de: f7fd fcff bl 80211e0 <__aeabi_fcmpeq> 80237e2: b908 cbnz r0, 80237e8 80237e4: f04f 0800 mov.w r8, #0 80237e8: 4620 mov r0, r4 80237ea: 4629 mov r1, r5 80237ec: 2200 movs r2, #0 80237ee: 2300 movs r3, #0 80237f0: f04f 0901 mov.w r9, #1 80237f4: f7fd f988 bl 8020b08 <__aeabi_dcmpeq> 80237f8: b108 cbz r0, 80237fe 80237fa: f04f 0900 mov.w r9, #0 80237fe: ea08 0809 and.w r8, r8, r9 8023802: f018 0fff tst.w r8, #255 ; 0xff 8023806: d116 bne.n 8023836 8023808: f64f 71ff movw r1, #65535 ; 0xffff 802380c: 4638 mov r0, r7 802380e: f6c7 717f movt r1, #32639 ; 0x7f7f 8023812: f7fd fd0d bl 8021230 <__aeabi_fcmpgt> 8023816: b9a0 cbnz r0, 8023842 8023818: 4638 mov r0, r7 802381a: f46f 0100 mvn.w r1, #8388608 ; 0x800000 802381e: f7fd fce9 bl 80211f4 <__aeabi_fcmplt> 8023822: b158 cbz r0, 802383c 8023824: 4620 mov r0, r4 8023826: 4629 mov r1, r5 8023828: f04f 32ff mov.w r2, #4294967295 802382c: f46f 1380 mvn.w r3, #1048576 ; 0x100000 8023830: f7fd f974 bl 8020b1c <__aeabi_dcmplt> 8023834: b910 cbnz r0, 802383c 8023836: 6833 ldr r3, [r6, #0] 8023838: 2222 movs r2, #34 ; 0x22 802383a: 601a str r2, [r3, #0] 802383c: 4638 mov r0, r7 802383e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8023842: f64f 73ff movw r3, #65535 ; 0xffff 8023846: 4620 mov r0, r4 8023848: 4629 mov r1, r5 802384a: f04f 32ff mov.w r2, #4294967295 802384e: f6c7 73ef movt r3, #32751 ; 0x7fef 8023852: f7fd f981 bl 8020b58 <__aeabi_dcmpgt> 8023856: 2800 cmp r0, #0 8023858: d0ed beq.n 8023836 802385a: e7dd b.n 8023818 802385c: f3af 8000 nop.w 08023860 <_strtol_r>: 8023860: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8023864: f240 0400 movw r4, #0 8023868: f2c2 0400 movt r4, #8192 ; 0x2000 802386c: b085 sub sp, #20 802386e: 4699 mov r9, r3 8023870: 460b mov r3, r1 8023872: f8d4 8000 ldr.w r8, [r4] 8023876: 9102 str r1, [sp, #8] 8023878: 9003 str r0, [sp, #12] 802387a: 461c mov r4, r3 802387c: f814 5b01 ldrb.w r5, [r4], #1 8023880: eb08 0105 add.w r1, r8, r5 8023884: 4623 mov r3, r4 8023886: 7849 ldrb r1, [r1, #1] 8023888: f001 0108 and.w r1, r1, #8 802388c: b2c9 uxtb r1, r1 802388e: 2900 cmp r1, #0 8023890: d1f3 bne.n 802387a <_strtol_r+0x1a> 8023892: 2d2d cmp r5, #45 ; 0x2d 8023894: d07b beq.n 802398e <_strtol_r+0x12e> 8023896: 2d2b cmp r5, #43 ; 0x2b 8023898: bf05 ittet eq 802389a: 4624 moveq r4, r4 802389c: 460b moveq r3, r1 802389e: 460b movne r3, r1 80238a0: f814 5b01 ldrbeq.w r5, [r4], #1 80238a4: f039 0110 bics.w r1, r9, #16 80238a8: d112 bne.n 80238d0 <_strtol_r+0x70> 80238aa: f1d9 0001 rsbs r0, r9, #1 80238ae: bf38 it cc 80238b0: 2000 movcc r0, #0 80238b2: 2d30 cmp r5, #48 ; 0x30 80238b4: d004 beq.n 80238c0 <_strtol_r+0x60> 80238b6: b158 cbz r0, 80238d0 <_strtol_r+0x70> 80238b8: f04f 090a mov.w r9, #10 80238bc: 46cb mov fp, r9 80238be: e008 b.n 80238d2 <_strtol_r+0x72> 80238c0: 7821 ldrb r1, [r4, #0] 80238c2: f001 01df and.w r1, r1, #223 ; 0xdf 80238c6: 2958 cmp r1, #88 ; 0x58 80238c8: d065 beq.n 8023996 <_strtol_r+0x136> 80238ca: b108 cbz r0, 80238d0 <_strtol_r+0x70> 80238cc: f04f 0908 mov.w r9, #8 80238d0: 46cb mov fp, r9 80238d2: 2b00 cmp r3, #0 80238d4: 4659 mov r1, fp 80238d6: bf0c ite eq 80238d8: f06f 4600 mvneq.w r6, #2147483648 ; 0x80000000 80238dc: f04f 4600 movne.w r6, #2147483648 ; 0x80000000 80238e0: e88d 000c stmia.w sp, {r2, r3} 80238e4: 4630 mov r0, r6 80238e6: 2700 movs r7, #0 80238e8: f7fe f964 bl 8021bb4 <__aeabi_uidivmod> 80238ec: 4630 mov r0, r6 80238ee: 468a mov sl, r1 80238f0: 4659 mov r1, fp 80238f2: f7fe f831 bl 8021958 <__aeabi_uidiv> 80238f6: 46bc mov ip, r7 80238f8: e89d 000c ldmia.w sp, {r2, r3} 80238fc: e016 b.n 802392c <_strtol_r+0xcc> 80238fe: 3d30 subs r5, #48 ; 0x30 8023900: 45a9 cmp r9, r5 8023902: dd25 ble.n 8023950 <_strtol_r+0xf0> 8023904: 4584 cmp ip, r0 8023906: bf94 ite ls 8023908: 2100 movls r1, #0 802390a: 2101 movhi r1, #1 802390c: ea51 77d7 orrs.w r7, r1, r7, lsr #31 8023910: d129 bne.n 8023966 <_strtol_r+0x106> 8023912: 4555 cmp r5, sl 8023914: bfd4 ite le 8023916: 2100 movle r1, #0 8023918: 2101 movgt r1, #1 802391a: 4584 cmp ip, r0 802391c: bf18 it ne 802391e: 2100 movne r1, #0 8023920: bb09 cbnz r1, 8023966 <_strtol_r+0x106> 8023922: fb0b 5c0c mla ip, fp, ip, r5 8023926: 2701 movs r7, #1 8023928: f814 5b01 ldrb.w r5, [r4], #1 802392c: eb08 0105 add.w r1, r8, r5 8023930: 7849 ldrb r1, [r1, #1] 8023932: f001 0604 and.w r6, r1, #4 8023936: b2f6 uxtb r6, r6 8023938: 2e00 cmp r6, #0 802393a: d1e0 bne.n 80238fe <_strtol_r+0x9e> 802393c: f011 0103 ands.w r1, r1, #3 8023940: d006 beq.n 8023950 <_strtol_r+0xf0> 8023942: 2901 cmp r1, #1 8023944: bf14 ite ne 8023946: 2157 movne r1, #87 ; 0x57 8023948: 2137 moveq r1, #55 ; 0x37 802394a: 1a6d subs r5, r5, r1 802394c: 45a9 cmp r9, r5 802394e: dcd9 bgt.n 8023904 <_strtol_r+0xa4> 8023950: 1c79 adds r1, r7, #1 8023952: d00b beq.n 802396c <_strtol_r+0x10c> 8023954: b9c3 cbnz r3, 8023988 <_strtol_r+0x128> 8023956: 4660 mov r0, ip 8023958: b112 cbz r2, 8023960 <_strtol_r+0x100> 802395a: b997 cbnz r7, 8023982 <_strtol_r+0x122> 802395c: 9b02 ldr r3, [sp, #8] 802395e: 6013 str r3, [r2, #0] 8023960: b005 add sp, #20 8023962: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8023966: f04f 37ff mov.w r7, #4294967295 802396a: e7dd b.n 8023928 <_strtol_r+0xc8> 802396c: 9903 ldr r1, [sp, #12] 802396e: 2b00 cmp r3, #0 8023970: bf0c ite eq 8023972: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000 8023976: f04f 4000 movne.w r0, #2147483648 ; 0x80000000 802397a: 2322 movs r3, #34 ; 0x22 802397c: 600b str r3, [r1, #0] 802397e: 2a00 cmp r2, #0 8023980: d0ee beq.n 8023960 <_strtol_r+0x100> 8023982: 3c01 subs r4, #1 8023984: 9402 str r4, [sp, #8] 8023986: e7e9 b.n 802395c <_strtol_r+0xfc> 8023988: f1cc 0c00 rsb ip, ip, #0 802398c: e7e3 b.n 8023956 <_strtol_r+0xf6> 802398e: f814 5b01 ldrb.w r5, [r4], #1 8023992: 2301 movs r3, #1 8023994: e786 b.n 80238a4 <_strtol_r+0x44> 8023996: f04f 0910 mov.w r9, #16 802399a: 7865 ldrb r5, [r4, #1] 802399c: 46cb mov fp, r9 802399e: 3402 adds r4, #2 80239a0: e797 b.n 80238d2 <_strtol_r+0x72> 80239a2: bf00 nop 080239a4 : 80239a4: b430 push {r4, r5} 80239a6: f240 042c movw r4, #44 ; 0x2c 80239aa: f2c2 0400 movt r4, #8192 ; 0x2000 80239ae: 460d mov r5, r1 80239b0: 4613 mov r3, r2 80239b2: 4601 mov r1, r0 80239b4: 462a mov r2, r5 80239b6: 6820 ldr r0, [r4, #0] 80239b8: bc30 pop {r4, r5} 80239ba: f7ff bf51 b.w 8023860 <_strtol_r> 80239be: bf00 nop 080239c0 <_malloc_trim_r>: 80239c0: b5f8 push {r3, r4, r5, r6, r7, lr} 80239c2: f240 149c movw r4, #412 ; 0x19c 80239c6: f2c2 0400 movt r4, #8192 ; 0x2000 80239ca: 460f mov r7, r1 80239cc: 4605 mov r5, r0 80239ce: f001 f895 bl 8024afc <__malloc_lock> 80239d2: 68a3 ldr r3, [r4, #8] 80239d4: 685e ldr r6, [r3, #4] 80239d6: f026 0603 bic.w r6, r6, #3 80239da: f606 73ef addw r3, r6, #4079 ; 0xfef 80239de: 1bdf subs r7, r3, r7 80239e0: 0b3f lsrs r7, r7, #12 80239e2: 3f01 subs r7, #1 80239e4: 033f lsls r7, r7, #12 80239e6: f5b7 5f80 cmp.w r7, #4096 ; 0x1000 80239ea: db07 blt.n 80239fc <_malloc_trim_r+0x3c> 80239ec: 2100 movs r1, #0 80239ee: 4628 mov r0, r5 80239f0: f001 fd10 bl 8025414 <_sbrk_r> 80239f4: 68a3 ldr r3, [r4, #8] 80239f6: 199b adds r3, r3, r6 80239f8: 4298 cmp r0, r3 80239fa: d004 beq.n 8023a06 <_malloc_trim_r+0x46> 80239fc: 4628 mov r0, r5 80239fe: f001 f87f bl 8024b00 <__malloc_unlock> 8023a02: 2000 movs r0, #0 8023a04: bdf8 pop {r3, r4, r5, r6, r7, pc} 8023a06: 4279 negs r1, r7 8023a08: 4628 mov r0, r5 8023a0a: f001 fd03 bl 8025414 <_sbrk_r> 8023a0e: 3001 adds r0, #1 8023a10: d010 beq.n 8023a34 <_malloc_trim_r+0x74> 8023a12: f640 23e4 movw r3, #2788 ; 0xae4 8023a16: 68a1 ldr r1, [r4, #8] 8023a18: f2c2 0300 movt r3, #8192 ; 0x2000 8023a1c: 1bf6 subs r6, r6, r7 8023a1e: 4628 mov r0, r5 8023a20: f046 0601 orr.w r6, r6, #1 8023a24: 681a ldr r2, [r3, #0] 8023a26: 604e str r6, [r1, #4] 8023a28: 1bd7 subs r7, r2, r7 8023a2a: 601f str r7, [r3, #0] 8023a2c: f001 f868 bl 8024b00 <__malloc_unlock> 8023a30: 2001 movs r0, #1 8023a32: bdf8 pop {r3, r4, r5, r6, r7, pc} 8023a34: 2100 movs r1, #0 8023a36: 4628 mov r0, r5 8023a38: f001 fcec bl 8025414 <_sbrk_r> 8023a3c: 68a3 ldr r3, [r4, #8] 8023a3e: 1ac2 subs r2, r0, r3 8023a40: 2a0f cmp r2, #15 8023a42: dddb ble.n 80239fc <_malloc_trim_r+0x3c> 8023a44: f240 54a4 movw r4, #1444 ; 0x5a4 8023a48: f640 21e4 movw r1, #2788 ; 0xae4 8023a4c: f2c2 0400 movt r4, #8192 ; 0x2000 8023a50: f2c2 0100 movt r1, #8192 ; 0x2000 8023a54: f042 0201 orr.w r2, r2, #1 8023a58: 605a str r2, [r3, #4] 8023a5a: 6823 ldr r3, [r4, #0] 8023a5c: 1ac0 subs r0, r0, r3 8023a5e: 6008 str r0, [r1, #0] 8023a60: e7cc b.n 80239fc <_malloc_trim_r+0x3c> 8023a62: bf00 nop 08023a64 <_free_r>: 8023a64: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8023a68: 460e mov r6, r1 8023a6a: 4680 mov r8, r0 8023a6c: 2900 cmp r1, #0 8023a6e: d05c beq.n 8023b2a <_free_r+0xc6> 8023a70: f001 f844 bl 8024afc <__malloc_lock> 8023a74: f240 159c movw r5, #412 ; 0x19c 8023a78: f856 1c04 ldr.w r1, [r6, #-4] 8023a7c: f2c2 0500 movt r5, #8192 ; 0x2000 8023a80: f1a6 0408 sub.w r4, r6, #8 8023a84: f021 0301 bic.w r3, r1, #1 8023a88: 68af ldr r7, [r5, #8] 8023a8a: 18e2 adds r2, r4, r3 8023a8c: 4297 cmp r7, r2 8023a8e: 6850 ldr r0, [r2, #4] 8023a90: f020 0003 bic.w r0, r0, #3 8023a94: d067 beq.n 8023b66 <_free_r+0x102> 8023a96: f011 0101 ands.w r1, r1, #1 8023a9a: 6050 str r0, [r2, #4] 8023a9c: d035 beq.n 8023b0a <_free_r+0xa6> 8023a9e: 2100 movs r1, #0 8023aa0: 1816 adds r6, r2, r0 8023aa2: 6876 ldr r6, [r6, #4] 8023aa4: f016 0f01 tst.w r6, #1 8023aa8: d106 bne.n 8023ab8 <_free_r+0x54> 8023aaa: 181b adds r3, r3, r0 8023aac: 6890 ldr r0, [r2, #8] 8023aae: 2900 cmp r1, #0 8023ab0: d04d beq.n 8023b4e <_free_r+0xea> 8023ab2: 68d2 ldr r2, [r2, #12] 8023ab4: 60c2 str r2, [r0, #12] 8023ab6: 6090 str r0, [r2, #8] 8023ab8: f043 0201 orr.w r2, r3, #1 8023abc: 50e3 str r3, [r4, r3] 8023abe: 6062 str r2, [r4, #4] 8023ac0: b9f1 cbnz r1, 8023b00 <_free_r+0x9c> 8023ac2: f5b3 7f00 cmp.w r3, #512 ; 0x200 8023ac6: d332 bcc.n 8023b2e <_free_r+0xca> 8023ac8: 0a5a lsrs r2, r3, #9 8023aca: 2a04 cmp r2, #4 8023acc: d86c bhi.n 8023ba8 <_free_r+0x144> 8023ace: 0998 lsrs r0, r3, #6 8023ad0: 3038 adds r0, #56 ; 0x38 8023ad2: 0041 lsls r1, r0, #1 8023ad4: eb05 0581 add.w r5, r5, r1, lsl #2 8023ad8: f240 119c movw r1, #412 ; 0x19c 8023adc: f2c2 0100 movt r1, #8192 ; 0x2000 8023ae0: 68aa ldr r2, [r5, #8] 8023ae2: 42aa cmp r2, r5 8023ae4: d06b beq.n 8023bbe <_free_r+0x15a> 8023ae6: 6851 ldr r1, [r2, #4] 8023ae8: f021 0103 bic.w r1, r1, #3 8023aec: 428b cmp r3, r1 8023aee: d202 bcs.n 8023af6 <_free_r+0x92> 8023af0: 6892 ldr r2, [r2, #8] 8023af2: 4295 cmp r5, r2 8023af4: d1f7 bne.n 8023ae6 <_free_r+0x82> 8023af6: 68d3 ldr r3, [r2, #12] 8023af8: 60e3 str r3, [r4, #12] 8023afa: 60a2 str r2, [r4, #8] 8023afc: 60d4 str r4, [r2, #12] 8023afe: 609c str r4, [r3, #8] 8023b00: 4640 mov r0, r8 8023b02: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 8023b06: f000 bffb b.w 8024b00 <__malloc_unlock> 8023b0a: f856 6c08 ldr.w r6, [r6, #-8] 8023b0e: f105 0c08 add.w ip, r5, #8 8023b12: 1ba4 subs r4, r4, r6 8023b14: 199b adds r3, r3, r6 8023b16: 68a6 ldr r6, [r4, #8] 8023b18: 4566 cmp r6, ip 8023b1a: d043 beq.n 8023ba4 <_free_r+0x140> 8023b1c: f8d4 c00c ldr.w ip, [r4, #12] 8023b20: f8c6 c00c str.w ip, [r6, #12] 8023b24: f8cc 6008 str.w r6, [ip, #8] 8023b28: e7ba b.n 8023aa0 <_free_r+0x3c> 8023b2a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8023b2e: 08db lsrs r3, r3, #3 8023b30: 2101 movs r1, #1 8023b32: 6868 ldr r0, [r5, #4] 8023b34: eb05 02c3 add.w r2, r5, r3, lsl #3 8023b38: 109b asrs r3, r3, #2 8023b3a: fa01 f303 lsl.w r3, r1, r3 8023b3e: 60e2 str r2, [r4, #12] 8023b40: 6891 ldr r1, [r2, #8] 8023b42: 4318 orrs r0, r3 8023b44: 6068 str r0, [r5, #4] 8023b46: 60a1 str r1, [r4, #8] 8023b48: 60cc str r4, [r1, #12] 8023b4a: 6094 str r4, [r2, #8] 8023b4c: e7d8 b.n 8023b00 <_free_r+0x9c> 8023b4e: 4e29 ldr r6, [pc, #164] ; (8023bf4 <_free_r+0x190>) 8023b50: 42b0 cmp r0, r6 8023b52: d1ae bne.n 8023ab2 <_free_r+0x4e> 8023b54: 616c str r4, [r5, #20] 8023b56: f043 0201 orr.w r2, r3, #1 8023b5a: 612c str r4, [r5, #16] 8023b5c: 60e0 str r0, [r4, #12] 8023b5e: 60a0 str r0, [r4, #8] 8023b60: 6062 str r2, [r4, #4] 8023b62: 50e3 str r3, [r4, r3] 8023b64: e7cc b.n 8023b00 <_free_r+0x9c> 8023b66: 18c0 adds r0, r0, r3 8023b68: 07cb lsls r3, r1, #31 8023b6a: d407 bmi.n 8023b7c <_free_r+0x118> 8023b6c: f856 3c08 ldr.w r3, [r6, #-8] 8023b70: 1ae4 subs r4, r4, r3 8023b72: 18c0 adds r0, r0, r3 8023b74: 68a2 ldr r2, [r4, #8] 8023b76: 68e3 ldr r3, [r4, #12] 8023b78: 60d3 str r3, [r2, #12] 8023b7a: 609a str r2, [r3, #8] 8023b7c: f240 52a8 movw r2, #1448 ; 0x5a8 8023b80: f040 0301 orr.w r3, r0, #1 8023b84: f2c2 0200 movt r2, #8192 ; 0x2000 8023b88: 6063 str r3, [r4, #4] 8023b8a: 60ac str r4, [r5, #8] 8023b8c: 6813 ldr r3, [r2, #0] 8023b8e: 4298 cmp r0, r3 8023b90: d3b6 bcc.n 8023b00 <_free_r+0x9c> 8023b92: f640 23e0 movw r3, #2784 ; 0xae0 8023b96: 4640 mov r0, r8 8023b98: f2c2 0300 movt r3, #8192 ; 0x2000 8023b9c: 6819 ldr r1, [r3, #0] 8023b9e: f7ff ff0f bl 80239c0 <_malloc_trim_r> 8023ba2: e7ad b.n 8023b00 <_free_r+0x9c> 8023ba4: 2101 movs r1, #1 8023ba6: e77b b.n 8023aa0 <_free_r+0x3c> 8023ba8: f102 005b add.w r0, r2, #91 ; 0x5b 8023bac: 0041 lsls r1, r0, #1 8023bae: 2a14 cmp r2, #20 8023bb0: d990 bls.n 8023ad4 <_free_r+0x70> 8023bb2: 2a54 cmp r2, #84 ; 0x54 8023bb4: d80c bhi.n 8023bd0 <_free_r+0x16c> 8023bb6: 0b18 lsrs r0, r3, #12 8023bb8: 306e adds r0, #110 ; 0x6e 8023bba: 0041 lsls r1, r0, #1 8023bbc: e78a b.n 8023ad4 <_free_r+0x70> 8023bbe: 2601 movs r6, #1 8023bc0: 684d ldr r5, [r1, #4] 8023bc2: 1080 asrs r0, r0, #2 8023bc4: 4613 mov r3, r2 8023bc6: fa06 f000 lsl.w r0, r6, r0 8023bca: 4305 orrs r5, r0 8023bcc: 604d str r5, [r1, #4] 8023bce: e793 b.n 8023af8 <_free_r+0x94> 8023bd0: f5b2 7faa cmp.w r2, #340 ; 0x154 8023bd4: d803 bhi.n 8023bde <_free_r+0x17a> 8023bd6: 0bd8 lsrs r0, r3, #15 8023bd8: 3077 adds r0, #119 ; 0x77 8023bda: 0041 lsls r1, r0, #1 8023bdc: e77a b.n 8023ad4 <_free_r+0x70> 8023bde: f240 5154 movw r1, #1364 ; 0x554 8023be2: 428a cmp r2, r1 8023be4: d803 bhi.n 8023bee <_free_r+0x18a> 8023be6: 0c98 lsrs r0, r3, #18 8023be8: 307c adds r0, #124 ; 0x7c 8023bea: 0041 lsls r1, r0, #1 8023bec: e772 b.n 8023ad4 <_free_r+0x70> 8023bee: 21fc movs r1, #252 ; 0xfc 8023bf0: 207e movs r0, #126 ; 0x7e 8023bf2: e76f b.n 8023ad4 <_free_r+0x70> 8023bf4: 200001a4 .word 0x200001a4 08023bf8 : 8023bf8: 6902 ldr r2, [r0, #16] 8023bfa: 114b asrs r3, r1, #5 8023bfc: e92d 01f0 stmdb sp!, {r4, r5, r6, r7, r8} 8023c00: 4293 cmp r3, r2 8023c02: f100 0714 add.w r7, r0, #20 8023c06: da2d bge.n 8023c64 8023c08: 3304 adds r3, #4 8023c0a: eb00 0282 add.w r2, r0, r2, lsl #2 8023c0e: 3214 adds r2, #20 8023c10: f011 011f ands.w r1, r1, #31 8023c14: eb00 0383 add.w r3, r0, r3, lsl #2 8023c18: f103 0c04 add.w ip, r3, #4 8023c1c: d029 beq.n 8023c72 8023c1e: 685c ldr r4, [r3, #4] 8023c20: f10c 0304 add.w r3, ip, #4 8023c24: 429a cmp r2, r3 8023c26: f1c1 0820 rsb r8, r1, #32 8023c2a: fa24 f401 lsr.w r4, r4, r1 8023c2e: d938 bls.n 8023ca2 8023c30: 463d mov r5, r7 8023c32: 681e ldr r6, [r3, #0] 8023c34: fa06 f608 lsl.w r6, r6, r8 8023c38: 4334 orrs r4, r6 8023c3a: f845 4b04 str.w r4, [r5], #4 8023c3e: f853 4b04 ldr.w r4, [r3], #4 8023c42: 429a cmp r2, r3 8023c44: fa24 f401 lsr.w r4, r4, r1 8023c48: d8f3 bhi.n 8023c32 8023c4a: ebcc 0302 rsb r3, ip, r2 8023c4e: 3b05 subs r3, #5 8023c50: f023 0303 bic.w r3, r3, #3 8023c54: 18c3 adds r3, r0, r3 8023c56: 3318 adds r3, #24 8023c58: 601c str r4, [r3, #0] 8023c5a: b1e4 cbz r4, 8023c96 8023c5c: 3304 adds r3, #4 8023c5e: 1bdf subs r7, r3, r7 8023c60: 10bf asrs r7, r7, #2 8023c62: e01a b.n 8023c9a 8023c64: 2300 movs r3, #0 8023c66: 6103 str r3, [r0, #16] 8023c68: 2300 movs r3, #0 8023c6a: 6143 str r3, [r0, #20] 8023c6c: e8bd 01f0 ldmia.w sp!, {r4, r5, r6, r7, r8} 8023c70: 4770 bx lr 8023c72: 4562 cmp r2, ip 8023c74: bf84 itt hi 8023c76: 4663 movhi r3, ip 8023c78: 4639 movhi r1, r7 8023c7a: d9f3 bls.n 8023c64 8023c7c: f853 4b04 ldr.w r4, [r3], #4 8023c80: 429a cmp r2, r3 8023c82: f841 4b04 str.w r4, [r1], #4 8023c86: d8f9 bhi.n 8023c7c 8023c88: ea6f 030c mvn.w r3, ip 8023c8c: 189b adds r3, r3, r2 8023c8e: f023 0303 bic.w r3, r3, #3 8023c92: 18c3 adds r3, r0, r3 8023c94: 3318 adds r3, #24 8023c96: 1bdf subs r7, r3, r7 8023c98: 10bf asrs r7, r7, #2 8023c9a: 6107 str r7, [r0, #16] 8023c9c: 2f00 cmp r7, #0 8023c9e: d1e5 bne.n 8023c6c 8023ca0: e7e2 b.n 8023c68 8023ca2: 463b mov r3, r7 8023ca4: e7d8 b.n 8023c58 8023ca6: bf00 nop 08023ca8 <__hexdig_init>: 8023ca8: f245 2094 movw r0, #21140 ; 0x5294 8023cac: f244 03b0 movw r3, #16560 ; 0x40b0 8023cb0: f6c0 0004 movt r0, #2052 ; 0x804 8023cb4: 2110 movs r1, #16 8023cb6: 2230 movs r2, #48 ; 0x30 8023cb8: f2c2 0301 movt r3, #8193 ; 0x2001 8023cbc: 5499 strb r1, [r3, r2] 8023cbe: 3101 adds r1, #1 8023cc0: f810 2f01 ldrb.w r2, [r0, #1]! 8023cc4: b2c9 uxtb r1, r1 8023cc6: 2a00 cmp r2, #0 8023cc8: d1f8 bne.n 8023cbc <__hexdig_init+0x14> 8023cca: f245 208c movw r0, #21132 ; 0x528c 8023cce: 211a movs r1, #26 8023cd0: f6c0 0004 movt r0, #2052 ; 0x804 8023cd4: 2261 movs r2, #97 ; 0x61 8023cd6: 5499 strb r1, [r3, r2] 8023cd8: 3101 adds r1, #1 8023cda: f810 2f01 ldrb.w r2, [r0, #1]! 8023cde: b2c9 uxtb r1, r1 8023ce0: 2a00 cmp r2, #0 8023ce2: d1f8 bne.n 8023cd6 <__hexdig_init+0x2e> 8023ce4: f245 2084 movw r0, #21124 ; 0x5284 8023ce8: 211a movs r1, #26 8023cea: f6c0 0004 movt r0, #2052 ; 0x804 8023cee: 2241 movs r2, #65 ; 0x41 8023cf0: 5499 strb r1, [r3, r2] 8023cf2: 3101 adds r1, #1 8023cf4: f810 2f01 ldrb.w r2, [r0, #1]! 8023cf8: b2c9 uxtb r1, r1 8023cfa: 2a00 cmp r2, #0 8023cfc: d1f8 bne.n 8023cf0 <__hexdig_init+0x48> 8023cfe: 4770 bx lr 08023d00 <__gethex>: 8023d00: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8023d04: b08b sub sp, #44 ; 0x2c 8023d06: 4688 mov r8, r1 8023d08: f244 06b0 movw r6, #16560 ; 0x40b0 8023d0c: 9206 str r2, [sp, #24] 8023d0e: f2c2 0601 movt r6, #8193 ; 0x2001 8023d12: 9309 str r3, [sp, #36] ; 0x24 8023d14: 9007 str r0, [sp, #28] 8023d16: f000 fbb9 bl 802448c <_localeconv_r> 8023d1a: 6800 ldr r0, [r0, #0] 8023d1c: 9002 str r0, [sp, #8] 8023d1e: f7fe fa53 bl 80221c8 8023d22: 9b02 ldr r3, [sp, #8] 8023d24: 181a adds r2, r3, r0 8023d26: f896 3030 ldrb.w r3, [r6, #48] ; 0x30 8023d2a: 9003 str r0, [sp, #12] 8023d2c: f812 ac01 ldrb.w sl, [r2, #-1] 8023d30: 2b00 cmp r3, #0 8023d32: f000 810e beq.w 8023f52 <__gethex+0x252> 8023d36: f8d8 3000 ldr.w r3, [r8] 8023d3a: 1c9d adds r5, r3, #2 8023d3c: 789a ldrb r2, [r3, #2] 8023d3e: 2a30 cmp r2, #48 ; 0x30 8023d40: f040 8200 bne.w 8024144 <__gethex+0x444> 8023d44: 3303 adds r3, #3 8023d46: 2700 movs r7, #0 8023d48: 461d mov r5, r3 8023d4a: f813 2b01 ldrb.w r2, [r3], #1 8023d4e: 3701 adds r7, #1 8023d50: 2a30 cmp r2, #48 ; 0x30 8023d52: d0f9 beq.n 8023d48 <__gethex+0x48> 8023d54: f816 b002 ldrb.w fp, [r6, r2] 8023d58: f244 09b0 movw r9, #16560 ; 0x40b0 8023d5c: f2c2 0901 movt r9, #8193 ; 0x2001 8023d60: f1bb 0f00 cmp.w fp, #0 8023d64: f000 80f8 beq.w 8023f58 <__gethex+0x258> 8023d68: 782b ldrb r3, [r5, #0] 8023d6a: f04f 0b00 mov.w fp, #0 8023d6e: f819 4003 ldrb.w r4, [r9, r3] 8023d72: 2c00 cmp r4, #0 8023d74: f000 8200 beq.w 8024178 <__gethex+0x478> 8023d78: 1c6a adds r2, r5, #1 8023d7a: 4614 mov r4, r2 8023d7c: 3201 adds r2, #1 8023d7e: 7823 ldrb r3, [r4, #0] 8023d80: 5cf3 ldrb r3, [r6, r3] 8023d82: 2b00 cmp r3, #0 8023d84: d1f9 bne.n 8023d7a <__gethex+0x7a> 8023d86: 4699 mov r9, r3 8023d88: 4620 mov r0, r4 8023d8a: 9902 ldr r1, [sp, #8] 8023d8c: 9a03 ldr r2, [sp, #12] 8023d8e: f7fe fa7d bl 802228c 8023d92: b1e8 cbz r0, 8023dd0 <__gethex+0xd0> 8023d94: 7823 ldrb r3, [r4, #0] 8023d96: f1bb 0f00 cmp.w fp, #0 8023d9a: f000 81c1 beq.w 8024120 <__gethex+0x420> 8023d9e: ebc4 0b0b rsb fp, r4, fp 8023da2: ea4f 028b mov.w r2, fp, lsl #2 8023da6: 9205 str r2, [sp, #20] 8023da8: 2b50 cmp r3, #80 ; 0x50 8023daa: f000 809b beq.w 8023ee4 <__gethex+0x1e4> 8023dae: 2b70 cmp r3, #112 ; 0x70 8023db0: f000 8098 beq.w 8023ee4 <__gethex+0x1e4> 8023db4: 4622 mov r2, r4 8023db6: f8c8 2000 str.w r2, [r8] 8023dba: f1b9 0f00 cmp.w r9, #0 8023dbe: d00d beq.n 8023ddc <__gethex+0xdc> 8023dc0: 2f00 cmp r7, #0 8023dc2: bf0c ite eq 8023dc4: 2706 moveq r7, #6 8023dc6: 2700 movne r7, #0 8023dc8: 4638 mov r0, r7 8023dca: b00b add sp, #44 ; 0x2c 8023dcc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8023dd0: f1bb 0f00 cmp.w fp, #0 8023dd4: f000 81be beq.w 8024154 <__gethex+0x454> 8023dd8: 7823 ldrb r3, [r4, #0] 8023dda: e7e0 b.n 8023d9e <__gethex+0x9e> 8023ddc: 1b63 subs r3, r4, r5 8023dde: 4649 mov r1, r9 8023de0: 3b01 subs r3, #1 8023de2: 2b07 cmp r3, #7 8023de4: dd03 ble.n 8023dee <__gethex+0xee> 8023de6: 105b asrs r3, r3, #1 8023de8: 3101 adds r1, #1 8023dea: 2b07 cmp r3, #7 8023dec: dcfb bgt.n 8023de6 <__gethex+0xe6> 8023dee: 9807 ldr r0, [sp, #28] 8023df0: f000 fe88 bl 8024b04 <_Balloc> 8023df4: 42a5 cmp r5, r4 8023df6: f100 0314 add.w r3, r0, #20 8023dfa: 9004 str r0, [sp, #16] 8023dfc: 9308 str r3, [sp, #32] 8023dfe: f080 81db bcs.w 80241b8 <__gethex+0x4b8> 8023e02: 469b mov fp, r3 8023e04: 9b03 ldr r3, [sp, #12] 8023e06: f04f 0800 mov.w r8, #0 8023e0a: 4647 mov r7, r8 8023e0c: f1c3 0c01 rsb ip, r3, #1 8023e10: e00f b.n 8023e32 <__gethex+0x132> 8023e12: 2f20 cmp r7, #32 8023e14: d05f beq.n 8023ed6 <__gethex+0x1d6> 8023e16: 463a mov r2, r7 8023e18: 3704 adds r7, #4 8023e1a: f814 3c01 ldrb.w r3, [r4, #-1] 8023e1e: 464c mov r4, r9 8023e20: 42a5 cmp r5, r4 8023e22: 5cf3 ldrb r3, [r6, r3] 8023e24: f003 030f and.w r3, r3, #15 8023e28: fa03 f302 lsl.w r3, r3, r2 8023e2c: ea48 0803 orr.w r8, r8, r3 8023e30: d219 bcs.n 8023e66 <__gethex+0x166> 8023e32: f814 3c01 ldrb.w r3, [r4, #-1] 8023e36: f104 39ff add.w r9, r4, #4294967295 8023e3a: 4553 cmp r3, sl 8023e3c: d1e9 bne.n 8023e12 <__gethex+0x112> 8023e3e: eb09 030c add.w r3, r9, ip 8023e42: 429d cmp r5, r3 8023e44: d8e5 bhi.n 8023e12 <__gethex+0x112> 8023e46: 4618 mov r0, r3 8023e48: 9902 ldr r1, [sp, #8] 8023e4a: 9a03 ldr r2, [sp, #12] 8023e4c: 9301 str r3, [sp, #4] 8023e4e: f8cd c000 str.w ip, [sp] 8023e52: f7fe fa1b bl 802228c 8023e56: 9b01 ldr r3, [sp, #4] 8023e58: f8dd c000 ldr.w ip, [sp] 8023e5c: 2800 cmp r0, #0 8023e5e: d1d8 bne.n 8023e12 <__gethex+0x112> 8023e60: 461c mov r4, r3 8023e62: 42a5 cmp r5, r4 8023e64: d3e5 bcc.n 8023e32 <__gethex+0x132> 8023e66: 9b08 ldr r3, [sp, #32] 8023e68: 4640 mov r0, r8 8023e6a: f84b 8b04 str.w r8, [fp], #4 8023e6e: 9904 ldr r1, [sp, #16] 8023e70: ebc3 0b0b rsb fp, r3, fp 8023e74: ea4f 03ab mov.w r3, fp, asr #2 8023e78: 610b str r3, [r1, #16] 8023e7a: 015d lsls r5, r3, #5 8023e7c: f000 ff24 bl 8024cc8 <__hi0bits> 8023e80: 9a06 ldr r2, [sp, #24] 8023e82: 6814 ldr r4, [r2, #0] 8023e84: 1a28 subs r0, r5, r0 8023e86: 42a0 cmp r0, r4 8023e88: f300 8125 bgt.w 80240d6 <__gethex+0x3d6> 8023e8c: f2c0 814b blt.w 8024126 <__gethex+0x426> 8023e90: 2500 movs r5, #0 8023e92: 9806 ldr r0, [sp, #24] 8023e94: 9905 ldr r1, [sp, #20] 8023e96: 6883 ldr r3, [r0, #8] 8023e98: 4299 cmp r1, r3 8023e9a: f300 80f6 bgt.w 802408a <__gethex+0x38a> 8023e9e: 9806 ldr r0, [sp, #24] 8023ea0: 9905 ldr r1, [sp, #20] 8023ea2: 6843 ldr r3, [r0, #4] 8023ea4: 4299 cmp r1, r3 8023ea6: f280 8100 bge.w 80240aa <__gethex+0x3aa> 8023eaa: 1a5e subs r6, r3, r1 8023eac: 42b4 cmp r4, r6 8023eae: dc76 bgt.n 8023f9e <__gethex+0x29e> 8023eb0: 68c2 ldr r2, [r0, #12] 8023eb2: 2a02 cmp r2, #2 8023eb4: f000 816f beq.w 8024196 <__gethex+0x496> 8023eb8: 2a03 cmp r2, #3 8023eba: f000 8198 beq.w 80241ee <__gethex+0x4ee> 8023ebe: 2a01 cmp r2, #1 8023ec0: f000 8186 beq.w 80241d0 <__gethex+0x4d0> 8023ec4: 9807 ldr r0, [sp, #28] 8023ec6: 2750 movs r7, #80 ; 0x50 8023ec8: 9904 ldr r1, [sp, #16] 8023eca: f000 fe51 bl 8024b70 <_Bfree> 8023ece: 9814 ldr r0, [sp, #80] ; 0x50 8023ed0: 2300 movs r3, #0 8023ed2: 6003 str r3, [r0, #0] 8023ed4: e778 b.n 8023dc8 <__gethex+0xc8> 8023ed6: f84b 8b04 str.w r8, [fp], #4 8023eda: f04f 0800 mov.w r8, #0 8023ede: 2704 movs r7, #4 8023ee0: 4642 mov r2, r8 8023ee2: e79a b.n 8023e1a <__gethex+0x11a> 8023ee4: 7863 ldrb r3, [r4, #1] 8023ee6: 2b2b cmp r3, #43 ; 0x2b 8023ee8: f000 80f2 beq.w 80240d0 <__gethex+0x3d0> 8023eec: 2b2d cmp r3, #45 ; 0x2d 8023eee: f000 80ea beq.w 80240c6 <__gethex+0x3c6> 8023ef2: 1c60 adds r0, r4, #1 8023ef4: f04f 0b00 mov.w fp, #0 8023ef8: 5cf1 ldrb r1, [r6, r3] 8023efa: f244 03b0 movw r3, #16560 ; 0x40b0 8023efe: f2c2 0301 movt r3, #8193 ; 0x2001 8023f02: 2900 cmp r1, #0 8023f04: f43f af56 beq.w 8023db4 <__gethex+0xb4> 8023f08: 2919 cmp r1, #25 8023f0a: f73f af53 bgt.w 8023db4 <__gethex+0xb4> 8023f0e: f890 c001 ldrb.w ip, [r0, #1] 8023f12: 3910 subs r1, #16 8023f14: 1c42 adds r2, r0, #1 8023f16: f813 300c ldrb.w r3, [r3, ip] 8023f1a: b193 cbz r3, 8023f42 <__gethex+0x242> 8023f1c: 2b19 cmp r3, #25 8023f1e: dc10 bgt.n 8023f42 <__gethex+0x242> 8023f20: 3002 adds r0, #2 8023f22: e001 b.n 8023f28 <__gethex+0x228> 8023f24: 2b19 cmp r3, #25 8023f26: dc0c bgt.n 8023f42 <__gethex+0x242> 8023f28: 4602 mov r2, r0 8023f2a: eb01 0181 add.w r1, r1, r1, lsl #2 8023f2e: 3001 adds r0, #1 8023f30: f892 c000 ldrb.w ip, [r2] 8023f34: eb03 0141 add.w r1, r3, r1, lsl #1 8023f38: 3910 subs r1, #16 8023f3a: f816 300c ldrb.w r3, [r6, ip] 8023f3e: 2b00 cmp r3, #0 8023f40: d1f0 bne.n 8023f24 <__gethex+0x224> 8023f42: f1bb 0f00 cmp.w fp, #0 8023f46: d000 beq.n 8023f4a <__gethex+0x24a> 8023f48: 4249 negs r1, r1 8023f4a: 9b05 ldr r3, [sp, #20] 8023f4c: 185b adds r3, r3, r1 8023f4e: 9305 str r3, [sp, #20] 8023f50: e731 b.n 8023db6 <__gethex+0xb6> 8023f52: f7ff fea9 bl 8023ca8 <__hexdig_init> 8023f56: e6ee b.n 8023d36 <__gethex+0x36> 8023f58: 4628 mov r0, r5 8023f5a: 9902 ldr r1, [sp, #8] 8023f5c: 9a03 ldr r2, [sp, #12] 8023f5e: f7fe f995 bl 802228c 8023f62: 2800 cmp r0, #0 8023f64: f040 809a bne.w 802409c <__gethex+0x39c> 8023f68: 9803 ldr r0, [sp, #12] 8023f6a: 182c adds r4, r5, r0 8023f6c: 5c2b ldrb r3, [r5, r0] 8023f6e: f819 2003 ldrb.w r2, [r9, r3] 8023f72: 2a00 cmp r2, #0 8023f74: f000 80e8 beq.w 8024148 <__gethex+0x448> 8023f78: 2b30 cmp r3, #48 ; 0x30 8023f7a: f040 8108 bne.w 802418e <__gethex+0x48e> 8023f7e: 1c63 adds r3, r4, #1 8023f80: 461d mov r5, r3 8023f82: f813 2b01 ldrb.w r2, [r3], #1 8023f86: 2a30 cmp r2, #48 ; 0x30 8023f88: d0fa beq.n 8023f80 <__gethex+0x280> 8023f8a: 5cb3 ldrb r3, [r6, r2] 8023f8c: 2b00 cmp r3, #0 8023f8e: f040 80ff bne.w 8024190 <__gethex+0x490> 8023f92: f04f 0901 mov.w r9, #1 8023f96: 46a3 mov fp, r4 8023f98: 464f mov r7, r9 8023f9a: 462c mov r4, r5 8023f9c: e6f4 b.n 8023d88 <__gethex+0x88> 8023f9e: 1e77 subs r7, r6, #1 8023fa0: 2d00 cmp r5, #0 8023fa2: f040 80e7 bne.w 8024174 <__gethex+0x474> 8023fa6: 2f00 cmp r7, #0 8023fa8: dd04 ble.n 8023fb4 <__gethex+0x2b4> 8023faa: 9804 ldr r0, [sp, #16] 8023fac: 4639 mov r1, r7 8023fae: f001 fa05 bl 80253bc <__any_on> 8023fb2: 4605 mov r5, r0 8023fb4: 9908 ldr r1, [sp, #32] 8023fb6: 117b asrs r3, r7, #5 8023fb8: 2201 movs r2, #1 8023fba: f007 071f and.w r7, r7, #31 8023fbe: 9804 ldr r0, [sp, #16] 8023fc0: 1ba4 subs r4, r4, r6 8023fc2: f851 3023 ldr.w r3, [r1, r3, lsl #2] 8023fc6: fa02 f207 lsl.w r2, r2, r7 8023fca: 4631 mov r1, r6 8023fcc: 421a tst r2, r3 8023fce: bf18 it ne 8023fd0: f045 0502 orrne.w r5, r5, #2 8023fd4: f7ff fe10 bl 8023bf8 8023fd8: 9b06 ldr r3, [sp, #24] 8023fda: 2702 movs r7, #2 8023fdc: 685b ldr r3, [r3, #4] 8023fde: 9305 str r3, [sp, #20] 8023fe0: 2d00 cmp r5, #0 8023fe2: d069 beq.n 80240b8 <__gethex+0x3b8> 8023fe4: 9806 ldr r0, [sp, #24] 8023fe6: 68c3 ldr r3, [r0, #12] 8023fe8: 2b02 cmp r3, #2 8023fea: f000 80ea beq.w 80241c2 <__gethex+0x4c2> 8023fee: 2b03 cmp r3, #3 8023ff0: d05d beq.n 80240ae <__gethex+0x3ae> 8023ff2: 2b01 cmp r3, #1 8023ff4: d15e bne.n 80240b4 <__gethex+0x3b4> 8023ff6: 07aa lsls r2, r5, #30 8023ff8: d55c bpl.n 80240b4 <__gethex+0x3b4> 8023ffa: 9908 ldr r1, [sp, #32] 8023ffc: 680b ldr r3, [r1, #0] 8023ffe: 432b orrs r3, r5 8024000: 07db lsls r3, r3, #31 8024002: d557 bpl.n 80240b4 <__gethex+0x3b4> 8024004: 9b04 ldr r3, [sp, #16] 8024006: 2600 movs r6, #0 8024008: 9904 ldr r1, [sp, #16] 802400a: 691d ldr r5, [r3, #16] 802400c: 9b08 ldr r3, [sp, #32] 802400e: eb01 0085 add.w r0, r1, r5, lsl #2 8024012: 3014 adds r0, #20 8024014: 4619 mov r1, r3 8024016: f853 2b04 ldr.w r2, [r3], #4 802401a: f1b2 3fff cmp.w r2, #4294967295 802401e: f040 80eb bne.w 80241f8 <__gethex+0x4f8> 8024022: 4298 cmp r0, r3 8024024: f843 6c04 str.w r6, [r3, #-4] 8024028: d8f4 bhi.n 8024014 <__gethex+0x314> 802402a: 9a04 ldr r2, [sp, #16] 802402c: 6893 ldr r3, [r2, #8] 802402e: 429d cmp r5, r3 8024030: bfb8 it lt 8024032: 462b movlt r3, r5 8024034: f280 80f9 bge.w 802422a <__gethex+0x52a> 8024038: 9904 ldr r1, [sp, #16] 802403a: eb01 0283 add.w r2, r1, r3, lsl #2 802403e: 3301 adds r3, #1 8024040: 610b str r3, [r1, #16] 8024042: 2301 movs r3, #1 8024044: 6153 str r3, [r2, #20] 8024046: 2f02 cmp r7, #2 8024048: f000 80d9 beq.w 80241fe <__gethex+0x4fe> 802404c: 9904 ldr r1, [sp, #16] 802404e: 690b ldr r3, [r1, #16] 8024050: 429d cmp r5, r3 8024052: db0e blt.n 8024072 <__gethex+0x372> 8024054: f014 041f ands.w r4, r4, #31 8024058: f000 80ac beq.w 80241b4 <__gethex+0x4b4> 802405c: 9b04 ldr r3, [sp, #16] 802405e: eb03 0585 add.w r5, r3, r5, lsl #2 8024062: 6928 ldr r0, [r5, #16] 8024064: f000 fe30 bl 8024cc8 <__hi0bits> 8024068: f1c4 0320 rsb r3, r4, #32 802406c: 4298 cmp r0, r3 802406e: f280 80a1 bge.w 80241b4 <__gethex+0x4b4> 8024072: 9804 ldr r0, [sp, #16] 8024074: 2101 movs r1, #1 8024076: f7ff fdbf bl 8023bf8 802407a: 9a06 ldr r2, [sp, #24] 802407c: 9805 ldr r0, [sp, #20] 802407e: 6893 ldr r3, [r2, #8] 8024080: 3001 adds r0, #1 8024082: 9005 str r0, [sp, #20] 8024084: 4298 cmp r0, r3 8024086: f340 8095 ble.w 80241b4 <__gethex+0x4b4> 802408a: 9807 ldr r0, [sp, #28] 802408c: 27a3 movs r7, #163 ; 0xa3 802408e: 9904 ldr r1, [sp, #16] 8024090: f000 fd6e bl 8024b70 <_Bfree> 8024094: 9a14 ldr r2, [sp, #80] ; 0x50 8024096: 2300 movs r3, #0 8024098: 6013 str r3, [r2, #0] 802409a: e695 b.n 8023dc8 <__gethex+0xc8> 802409c: 782b ldrb r3, [r5, #0] 802409e: 462c mov r4, r5 80240a0: f8cd b014 str.w fp, [sp, #20] 80240a4: f04f 0901 mov.w r9, #1 80240a8: e67e b.n 8023da8 <__gethex+0xa8> 80240aa: 2701 movs r7, #1 80240ac: e798 b.n 8023fe0 <__gethex+0x2e0> 80240ae: 9b15 ldr r3, [sp, #84] ; 0x54 80240b0: 2b00 cmp r3, #0 80240b2: d1a7 bne.n 8024004 <__gethex+0x304> 80240b4: f047 0710 orr.w r7, r7, #16 80240b8: 9b04 ldr r3, [sp, #16] 80240ba: 9814 ldr r0, [sp, #80] ; 0x50 80240bc: 6003 str r3, [r0, #0] 80240be: 9b05 ldr r3, [sp, #20] 80240c0: 9809 ldr r0, [sp, #36] ; 0x24 80240c2: 6003 str r3, [r0, #0] 80240c4: e680 b.n 8023dc8 <__gethex+0xc8> 80240c6: f04f 0b01 mov.w fp, #1 80240ca: 78a3 ldrb r3, [r4, #2] 80240cc: 1ca0 adds r0, r4, #2 80240ce: e713 b.n 8023ef8 <__gethex+0x1f8> 80240d0: f04f 0b00 mov.w fp, #0 80240d4: e7f9 b.n 80240ca <__gethex+0x3ca> 80240d6: 1b06 subs r6, r0, r4 80240d8: 9804 ldr r0, [sp, #16] 80240da: 4631 mov r1, r6 80240dc: f001 f96e bl 80253bc <__any_on> 80240e0: 4605 mov r5, r0 80240e2: b1a8 cbz r0, 8024110 <__gethex+0x410> 80240e4: 1e73 subs r3, r6, #1 80240e6: 9804 ldr r0, [sp, #16] 80240e8: 2501 movs r5, #1 80240ea: f003 011f and.w r1, r3, #31 80240ee: 115a asrs r2, r3, #5 80240f0: fa05 f101 lsl.w r1, r5, r1 80240f4: eb00 0282 add.w r2, r0, r2, lsl #2 80240f8: 6952 ldr r2, [r2, #20] 80240fa: 4211 tst r1, r2 80240fc: d008 beq.n 8024110 <__gethex+0x410> 80240fe: 42ab cmp r3, r5 8024100: dd05 ble.n 802410e <__gethex+0x40e> 8024102: 9804 ldr r0, [sp, #16] 8024104: 1eb1 subs r1, r6, #2 8024106: f001 f959 bl 80253bc <__any_on> 802410a: 2503 movs r5, #3 802410c: b900 cbnz r0, 8024110 <__gethex+0x410> 802410e: 2502 movs r5, #2 8024110: 9804 ldr r0, [sp, #16] 8024112: 4631 mov r1, r6 8024114: f7ff fd70 bl 8023bf8 8024118: 9b05 ldr r3, [sp, #20] 802411a: 199b adds r3, r3, r6 802411c: 9305 str r3, [sp, #20] 802411e: e6b8 b.n 8023e92 <__gethex+0x192> 8024120: f8cd b014 str.w fp, [sp, #20] 8024124: e640 b.n 8023da8 <__gethex+0xa8> 8024126: 1a25 subs r5, r4, r0 8024128: 9904 ldr r1, [sp, #16] 802412a: 462a mov r2, r5 802412c: 9807 ldr r0, [sp, #28] 802412e: f000 ff11 bl 8024f54 <__lshift> 8024132: 9b05 ldr r3, [sp, #20] 8024134: 1b5b subs r3, r3, r5 8024136: 2500 movs r5, #0 8024138: 9305 str r3, [sp, #20] 802413a: 9004 str r0, [sp, #16] 802413c: f100 0314 add.w r3, r0, #20 8024140: 9308 str r3, [sp, #32] 8024142: e6a6 b.n 8023e92 <__gethex+0x192> 8024144: 2700 movs r7, #0 8024146: e605 b.n 8023d54 <__gethex+0x54> 8024148: 9205 str r2, [sp, #20] 802414a: f04f 0901 mov.w r9, #1 802414e: e62b b.n 8023da8 <__gethex+0xa8> 8024150: 462c mov r4, r5 8024152: 4681 mov r9, r0 8024154: 9903 ldr r1, [sp, #12] 8024156: eb04 0b01 add.w fp, r4, r1 802415a: 5c63 ldrb r3, [r4, r1] 802415c: 5cf2 ldrb r2, [r6, r3] 802415e: 2a00 cmp r2, #0 8024160: d07a beq.n 8024258 <__gethex+0x558> 8024162: f10b 0201 add.w r2, fp, #1 8024166: 4614 mov r4, r2 8024168: f812 3b01 ldrb.w r3, [r2], #1 802416c: 5cf1 ldrb r1, [r6, r3] 802416e: 2900 cmp r1, #0 8024170: d1f9 bne.n 8024166 <__gethex+0x466> 8024172: e614 b.n 8023d9e <__gethex+0x9e> 8024174: 2501 movs r5, #1 8024176: e71d b.n 8023fb4 <__gethex+0x2b4> 8024178: 4628 mov r0, r5 802417a: 9902 ldr r1, [sp, #8] 802417c: 9a03 ldr r2, [sp, #12] 802417e: f7fe f885 bl 802228c 8024182: 2800 cmp r0, #0 8024184: d0e4 beq.n 8024150 <__gethex+0x450> 8024186: 46a1 mov r9, r4 8024188: 462c mov r4, r5 802418a: 46cb mov fp, r9 802418c: e602 b.n 8023d94 <__gethex+0x94> 802418e: 4625 mov r5, r4 8024190: 46a3 mov fp, r4 8024192: 2701 movs r7, #1 8024194: e5f0 b.n 8023d78 <__gethex+0x78> 8024196: 9815 ldr r0, [sp, #84] ; 0x54 8024198: 2800 cmp r0, #0 802419a: f47f ae93 bne.w 8023ec4 <__gethex+0x1c4> 802419e: 9a09 ldr r2, [sp, #36] ; 0x24 80241a0: 2762 movs r7, #98 ; 0x62 80241a2: 9804 ldr r0, [sp, #16] 80241a4: 9908 ldr r1, [sp, #32] 80241a6: 6013 str r3, [r2, #0] 80241a8: 2301 movs r3, #1 80241aa: 9a14 ldr r2, [sp, #80] ; 0x50 80241ac: 6103 str r3, [r0, #16] 80241ae: 600b str r3, [r1, #0] 80241b0: 6010 str r0, [r2, #0] 80241b2: e609 b.n 8023dc8 <__gethex+0xc8> 80241b4: 2721 movs r7, #33 ; 0x21 80241b6: e77f b.n 80240b8 <__gethex+0x3b8> 80241b8: f8dd b020 ldr.w fp, [sp, #32] 80241bc: f04f 0800 mov.w r8, #0 80241c0: e651 b.n 8023e66 <__gethex+0x166> 80241c2: 9a15 ldr r2, [sp, #84] ; 0x54 80241c4: f1c2 0301 rsb r3, r2, #1 80241c8: 2b00 cmp r3, #0 80241ca: f43f af73 beq.w 80240b4 <__gethex+0x3b4> 80241ce: e719 b.n 8024004 <__gethex+0x304> 80241d0: 42a6 cmp r6, r4 80241d2: f47f ae77 bne.w 8023ec4 <__gethex+0x1c4> 80241d6: 2c01 cmp r4, #1 80241d8: dde1 ble.n 802419e <__gethex+0x49e> 80241da: 9804 ldr r0, [sp, #16] 80241dc: 1e61 subs r1, r4, #1 80241de: f001 f8ed bl 80253bc <__any_on> 80241e2: 2800 cmp r0, #0 80241e4: f43f ae6e beq.w 8023ec4 <__gethex+0x1c4> 80241e8: 9a06 ldr r2, [sp, #24] 80241ea: 6853 ldr r3, [r2, #4] 80241ec: e7d7 b.n 802419e <__gethex+0x49e> 80241ee: 9915 ldr r1, [sp, #84] ; 0x54 80241f0: 2900 cmp r1, #0 80241f2: f43f ae67 beq.w 8023ec4 <__gethex+0x1c4> 80241f6: e7d2 b.n 802419e <__gethex+0x49e> 80241f8: 3201 adds r2, #1 80241fa: 600a str r2, [r1, #0] 80241fc: e723 b.n 8024046 <__gethex+0x346> 80241fe: 9a06 ldr r2, [sp, #24] 8024200: 2722 movs r7, #34 ; 0x22 8024202: 6813 ldr r3, [r2, #0] 8024204: 3b01 subs r3, #1 8024206: 42a3 cmp r3, r4 8024208: f47f af56 bne.w 80240b8 <__gethex+0x3b8> 802420c: 1163 asrs r3, r4, #5 802420e: 9804 ldr r0, [sp, #16] 8024210: 2201 movs r2, #1 8024212: f004 041f and.w r4, r4, #31 8024216: eb00 0383 add.w r3, r0, r3, lsl #2 802421a: fa02 f204 lsl.w r2, r2, r4 802421e: 695b ldr r3, [r3, #20] 8024220: 421a tst r2, r3 8024222: bf14 ite ne 8024224: 2721 movne r7, #33 ; 0x21 8024226: 2722 moveq r7, #34 ; 0x22 8024228: e746 b.n 80240b8 <__gethex+0x3b8> 802422a: 6851 ldr r1, [r2, #4] 802422c: 9807 ldr r0, [sp, #28] 802422e: 3101 adds r1, #1 8024230: f000 fc68 bl 8024b04 <_Balloc> 8024234: 4606 mov r6, r0 8024236: 9804 ldr r0, [sp, #16] 8024238: f100 010c add.w r1, r0, #12 802423c: 6903 ldr r3, [r0, #16] 802423e: f106 000c add.w r0, r6, #12 8024242: 1c9a adds r2, r3, #2 8024244: 0092 lsls r2, r2, #2 8024246: f7fd fd2d bl 8021ca4 802424a: 9904 ldr r1, [sp, #16] 802424c: 9807 ldr r0, [sp, #28] 802424e: 9604 str r6, [sp, #16] 8024250: f000 fc8e bl 8024b70 <_Bfree> 8024254: 6933 ldr r3, [r6, #16] 8024256: e6ef b.n 8024038 <__gethex+0x338> 8024258: 465c mov r4, fp 802425a: e5a0 b.n 8023d9e <__gethex+0x9e> 0802425c <__hexnan>: 802425c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024260: f244 08b0 movw r8, #16560 ; 0x40b0 8024264: f2c2 0801 movt r8, #8193 ; 0x2001 8024268: b085 sub sp, #20 802426a: 460c mov r4, r1 802426c: 4692 mov sl, r2 802426e: f898 3030 ldrb.w r3, [r8, #48] ; 0x30 8024272: 9002 str r0, [sp, #8] 8024274: 2b00 cmp r3, #0 8024276: f000 80ad beq.w 80243d4 <__hexnan+0x178> 802427a: 6823 ldr r3, [r4, #0] 802427c: 115a asrs r2, r3, #5 802427e: f013 031f ands.w r3, r3, #31 8024282: 9303 str r3, [sp, #12] 8024284: eb0a 0282 add.w r2, sl, r2, lsl #2 8024288: 9200 str r2, [sp, #0] 802428a: d001 beq.n 8024290 <__hexnan+0x34> 802428c: 3204 adds r2, #4 802428e: 9200 str r2, [sp, #0] 8024290: 9a00 ldr r2, [sp, #0] 8024292: 2300 movs r3, #0 8024294: 4699 mov r9, r3 8024296: 9900 ldr r1, [sp, #0] 8024298: 46cb mov fp, r9 802429a: 464e mov r6, r9 802429c: f842 3c04 str.w r3, [r2, #-4] 80242a0: 3904 subs r1, #4 80242a2: 9b02 ldr r3, [sp, #8] 80242a4: 9101 str r1, [sp, #4] 80242a6: f8dd c004 ldr.w ip, [sp, #4] 80242aa: 6819 ldr r1, [r3, #0] 80242ac: 4664 mov r4, ip 80242ae: 784b ldrb r3, [r1, #1] 80242b0: 2b00 cmp r3, #0 80242b2: d033 beq.n 802431c <__hexnan+0xc0> 80242b4: f818 2003 ldrb.w r2, [r8, r3] 80242b8: 2a00 cmp r2, #0 80242ba: d16f bne.n 802439c <__hexnan+0x140> 80242bc: 2b20 cmp r3, #32 80242be: f200 8083 bhi.w 80243c8 <__hexnan+0x16c> 80242c2: 455e cmp r6, fp 80242c4: dd26 ble.n 8024314 <__hexnan+0xb8> 80242c6: f1b9 0f07 cmp.w r9, #7 80242ca: bfcc ite gt 80242cc: 2300 movgt r3, #0 80242ce: 2301 movle r3, #1 80242d0: 4564 cmp r4, ip 80242d2: bf28 it cs 80242d4: 2300 movcs r3, #0 80242d6: b193 cbz r3, 80242fe <__hexnan+0xa2> 80242d8: f1c9 0908 rsb r9, r9, #8 80242dc: 6822 ldr r2, [r4, #0] 80242de: 4623 mov r3, r4 80242e0: ea4f 0989 mov.w r9, r9, lsl #2 80242e4: f1c9 0720 rsb r7, r9, #32 80242e8: 6858 ldr r0, [r3, #4] 80242ea: fa00 f507 lsl.w r5, r0, r7 80242ee: 4315 orrs r5, r2 80242f0: fa20 f209 lsr.w r2, r0, r9 80242f4: 601d str r5, [r3, #0] 80242f6: f843 2f04 str.w r2, [r3, #4]! 80242fa: 459c cmp ip, r3 80242fc: d8f4 bhi.n 80242e8 <__hexnan+0x8c> 80242fe: 4554 cmp r4, sl 8024300: bf98 it ls 8024302: f04f 0908 movls.w r9, #8 8024306: d905 bls.n 8024314 <__hexnan+0xb8> 8024308: 2200 movs r2, #0 802430a: 3c04 subs r4, #4 802430c: 6022 str r2, [r4, #0] 802430e: 46b3 mov fp, r6 8024310: 46a4 mov ip, r4 8024312: 4691 mov r9, r2 8024314: 3101 adds r1, #1 8024316: 784b ldrb r3, [r1, #1] 8024318: 2b00 cmp r3, #0 802431a: d1cb bne.n 80242b4 <__hexnan+0x58> 802431c: 2e00 cmp r6, #0 802431e: d055 beq.n 80243cc <__hexnan+0x170> 8024320: f1b9 0f07 cmp.w r9, #7 8024324: bfcc ite gt 8024326: 2300 movgt r3, #0 8024328: 2301 movle r3, #1 802432a: 4564 cmp r4, ip 802432c: bf28 it cs 802432e: 2300 movcs r3, #0 8024330: b193 cbz r3, 8024358 <__hexnan+0xfc> 8024332: f1c9 0908 rsb r9, r9, #8 8024336: 6822 ldr r2, [r4, #0] 8024338: 4623 mov r3, r4 802433a: ea4f 0989 mov.w r9, r9, lsl #2 802433e: f1c9 0520 rsb r5, r9, #32 8024342: 6859 ldr r1, [r3, #4] 8024344: fa01 f005 lsl.w r0, r1, r5 8024348: 4310 orrs r0, r2 802434a: fa21 f209 lsr.w r2, r1, r9 802434e: 6018 str r0, [r3, #0] 8024350: f843 2f04 str.w r2, [r3, #4]! 8024354: 4563 cmp r3, ip 8024356: d3f4 bcc.n 8024342 <__hexnan+0xe6> 8024358: 45a2 cmp sl, r4 802435a: d23e bcs.n 80243da <__hexnan+0x17e> 802435c: 9801 ldr r0, [sp, #4] 802435e: 4652 mov r2, sl 8024360: f854 1b04 ldr.w r1, [r4], #4 8024364: 4613 mov r3, r2 8024366: 42a0 cmp r0, r4 8024368: f843 1b04 str.w r1, [r3], #4 802436c: 461a mov r2, r3 802436e: d2f7 bcs.n 8024360 <__hexnan+0x104> 8024370: 9901 ldr r1, [sp, #4] 8024372: 2200 movs r2, #0 8024374: f843 2b04 str.w r2, [r3], #4 8024378: 4299 cmp r1, r3 802437a: d2fb bcs.n 8024374 <__hexnan+0x118> 802437c: 9900 ldr r1, [sp, #0] 802437e: f851 3c04 ldr.w r3, [r1, #-4] 8024382: b94b cbnz r3, 8024398 <__hexnan+0x13c> 8024384: 9b01 ldr r3, [sp, #4] 8024386: 459a cmp sl, r3 8024388: d102 bne.n 8024390 <__hexnan+0x134> 802438a: e038 b.n 80243fe <__hexnan+0x1a2> 802438c: 459a cmp sl, r3 802438e: d037 beq.n 8024400 <__hexnan+0x1a4> 8024390: f853 2d04 ldr.w r2, [r3, #-4]! 8024394: 2a00 cmp r2, #0 8024396: d0f9 beq.n 802438c <__hexnan+0x130> 8024398: 2005 movs r0, #5 802439a: e018 b.n 80243ce <__hexnan+0x172> 802439c: f109 0901 add.w r9, r9, #1 80243a0: 3601 adds r6, #1 80243a2: f1b9 0f08 cmp.w r9, #8 80243a6: dc07 bgt.n 80243b8 <__hexnan+0x15c> 80243a8: 6823 ldr r3, [r4, #0] 80243aa: 011b lsls r3, r3, #4 80243ac: f002 020f and.w r2, r2, #15 80243b0: 3101 adds r1, #1 80243b2: 431a orrs r2, r3 80243b4: 6022 str r2, [r4, #0] 80243b6: e7ae b.n 8024316 <__hexnan+0xba> 80243b8: 4554 cmp r4, sl 80243ba: d9ab bls.n 8024314 <__hexnan+0xb8> 80243bc: 2300 movs r3, #0 80243be: 3c04 subs r4, #4 80243c0: 6023 str r3, [r4, #0] 80243c2: f04f 0901 mov.w r9, #1 80243c6: e7f1 b.n 80243ac <__hexnan+0x150> 80243c8: 2b29 cmp r3, #41 ; 0x29 80243ca: d01d beq.n 8024408 <__hexnan+0x1ac> 80243cc: 2004 movs r0, #4 80243ce: b005 add sp, #20 80243d0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80243d4: f7ff fc68 bl 8023ca8 <__hexdig_init> 80243d8: e74f b.n 802427a <__hexnan+0x1e> 80243da: 9a03 ldr r2, [sp, #12] 80243dc: 2a00 cmp r2, #0 80243de: d0cd beq.n 802437c <__hexnan+0x120> 80243e0: 9a00 ldr r2, [sp, #0] 80243e2: 9903 ldr r1, [sp, #12] 80243e4: f852 3c04 ldr.w r3, [r2, #-4] 80243e8: f1c1 0220 rsb r2, r1, #32 80243ec: f04f 31ff mov.w r1, #4294967295 80243f0: fa21 f202 lsr.w r2, r1, r2 80243f4: 4013 ands r3, r2 80243f6: 9a00 ldr r2, [sp, #0] 80243f8: f842 3c04 str.w r3, [r2, #-4] 80243fc: e7c1 b.n 8024382 <__hexnan+0x126> 80243fe: 4653 mov r3, sl 8024400: 2201 movs r2, #1 8024402: 2005 movs r0, #5 8024404: 601a str r2, [r3, #0] 8024406: e7e2 b.n 80243ce <__hexnan+0x172> 8024408: 9b02 ldr r3, [sp, #8] 802440a: 3102 adds r1, #2 802440c: 6019 str r1, [r3, #0] 802440e: 2e00 cmp r6, #0 8024410: d186 bne.n 8024320 <__hexnan+0xc4> 8024412: e7db b.n 80243cc <__hexnan+0x170> 08024414 <_setlocale_r>: 8024414: b510 push {r4, lr} 8024416: 4614 mov r4, r2 8024418: b13a cbz r2, 802442a <_setlocale_r+0x16> 802441a: f245 21a4 movw r1, #21156 ; 0x52a4 802441e: 4610 mov r0, r2 8024420: f6c0 0104 movt r1, #2052 ; 0x804 8024424: f7fd fd84 bl 8021f30 8024428: b920 cbnz r0, 8024434 <_setlocale_r+0x20> 802442a: f245 20a0 movw r0, #21152 ; 0x52a0 802442e: f6c0 0004 movt r0, #2052 ; 0x804 8024432: bd10 pop {r4, pc} 8024434: f245 21a0 movw r1, #21152 ; 0x52a0 8024438: 4620 mov r0, r4 802443a: f6c0 0104 movt r1, #2052 ; 0x804 802443e: f7fd fd77 bl 8021f30 8024442: 2800 cmp r0, #0 8024444: d0f1 beq.n 802442a <_setlocale_r+0x16> 8024446: f245 21ac movw r1, #21164 ; 0x52ac 802444a: 4620 mov r0, r4 802444c: f6c0 0104 movt r1, #2052 ; 0x804 8024450: f7fd fd6e bl 8021f30 8024454: f245 23a0 movw r3, #21152 ; 0x52a0 8024458: f6c0 0304 movt r3, #2052 ; 0x804 802445c: 2800 cmp r0, #0 802445e: bf0c ite eq 8024460: 4618 moveq r0, r3 8024462: 2000 movne r0, #0 8024464: bd10 pop {r4, pc} 8024466: bf00 nop 08024468 <__locale_charset>: 8024468: f240 1020 movw r0, #288 ; 0x120 802446c: f2c2 0000 movt r0, #8192 ; 0x2000 8024470: 4770 bx lr 8024472: bf00 nop 08024474 <__locale_mb_cur_max>: 8024474: f240 1320 movw r3, #288 ; 0x120 8024478: f2c2 0300 movt r3, #8192 ; 0x2000 802447c: 6a18 ldr r0, [r3, #32] 802447e: 4770 bx lr 08024480 <__locale_msgcharset>: 8024480: 4800 ldr r0, [pc, #0] ; (8024484 <__locale_msgcharset+0x4>) 8024482: 4770 bx lr 8024484: 20000144 .word 0x20000144 08024488 <__locale_cjk_lang>: 8024488: 2000 movs r0, #0 802448a: 4770 bx lr 0802448c <_localeconv_r>: 802448c: 4800 ldr r0, [pc, #0] ; (8024490 <_localeconv_r+0x4>) 802448e: 4770 bx lr 8024490: 20000164 .word 0x20000164 08024494 : 8024494: f240 032c movw r3, #44 ; 0x2c 8024498: 460a mov r2, r1 802449a: f2c2 0300 movt r3, #8192 ; 0x2000 802449e: 4601 mov r1, r0 80244a0: 6818 ldr r0, [r3, #0] 80244a2: f7ff bfb7 b.w 8024414 <_setlocale_r> 80244a6: bf00 nop 080244a8 : 80244a8: 4800 ldr r0, [pc, #0] ; (80244ac ) 80244aa: 4770 bx lr 80244ac: 20000164 .word 0x20000164 080244b0 : 80244b0: f240 032c movw r3, #44 ; 0x2c 80244b4: 4601 mov r1, r0 80244b6: f2c2 0300 movt r3, #8192 ; 0x2000 80244ba: 6818 ldr r0, [r3, #0] 80244bc: f000 b808 b.w 80244d0 <_malloc_r> 080244c0 : 80244c0: f240 032c movw r3, #44 ; 0x2c 80244c4: 4601 mov r1, r0 80244c6: f2c2 0300 movt r3, #8192 ; 0x2000 80244ca: 6818 ldr r0, [r3, #0] 80244cc: f7ff baca b.w 8023a64 <_free_r> 080244d0 <_malloc_r>: 80244d0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80244d4: f101 040b add.w r4, r1, #11 80244d8: 2c16 cmp r4, #22 80244da: b083 sub sp, #12 80244dc: 4607 mov r7, r0 80244de: d930 bls.n 8024542 <_malloc_r+0x72> 80244e0: f024 0407 bic.w r4, r4, #7 80244e4: 0fe3 lsrs r3, r4, #31 80244e6: 428c cmp r4, r1 80244e8: bf2c ite cs 80244ea: 4619 movcs r1, r3 80244ec: f043 0101 orrcc.w r1, r3, #1 80244f0: 2900 cmp r1, #0 80244f2: d12f bne.n 8024554 <_malloc_r+0x84> 80244f4: 4638 mov r0, r7 80244f6: f000 fb01 bl 8024afc <__malloc_lock> 80244fa: f5b4 7ffc cmp.w r4, #504 ; 0x1f8 80244fe: d22e bcs.n 802455e <_malloc_r+0x8e> 8024500: ea4f 0cd4 mov.w ip, r4, lsr #3 8024504: f240 169c movw r6, #412 ; 0x19c 8024508: f2c2 0600 movt r6, #8192 ; 0x2000 802450c: eb06 02cc add.w r2, r6, ip, lsl #3 8024510: 68d3 ldr r3, [r2, #12] 8024512: 4293 cmp r3, r2 8024514: f000 8211 beq.w 802493a <_malloc_r+0x46a> 8024518: 6859 ldr r1, [r3, #4] 802451a: f103 0808 add.w r8, r3, #8 802451e: 68da ldr r2, [r3, #12] 8024520: 4638 mov r0, r7 8024522: f021 0403 bic.w r4, r1, #3 8024526: 6899 ldr r1, [r3, #8] 8024528: 191b adds r3, r3, r4 802452a: 685c ldr r4, [r3, #4] 802452c: 60ca str r2, [r1, #12] 802452e: f044 0401 orr.w r4, r4, #1 8024532: 6091 str r1, [r2, #8] 8024534: 605c str r4, [r3, #4] 8024536: f000 fae3 bl 8024b00 <__malloc_unlock> 802453a: 4640 mov r0, r8 802453c: b003 add sp, #12 802453e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024542: 2300 movs r3, #0 8024544: 2410 movs r4, #16 8024546: 428c cmp r4, r1 8024548: bf2c ite cs 802454a: 4619 movcs r1, r3 802454c: f043 0101 orrcc.w r1, r3, #1 8024550: 2900 cmp r1, #0 8024552: d0cf beq.n 80244f4 <_malloc_r+0x24> 8024554: 230c movs r3, #12 8024556: f04f 0800 mov.w r8, #0 802455a: 603b str r3, [r7, #0] 802455c: e7ed b.n 802453a <_malloc_r+0x6a> 802455e: ea5f 2c54 movs.w ip, r4, lsr #9 8024562: bf04 itt eq 8024564: ea4f 0cd4 moveq.w ip, r4, lsr #3 8024568: ea4f 054c moveq.w r5, ip, lsl #1 802456c: f040 808f bne.w 802468e <_malloc_r+0x1be> 8024570: f240 169c movw r6, #412 ; 0x19c 8024574: f2c2 0600 movt r6, #8192 ; 0x2000 8024578: eb06 0585 add.w r5, r6, r5, lsl #2 802457c: 68eb ldr r3, [r5, #12] 802457e: 429d cmp r5, r3 8024580: d106 bne.n 8024590 <_malloc_r+0xc0> 8024582: e00d b.n 80245a0 <_malloc_r+0xd0> 8024584: 2a00 cmp r2, #0 8024586: f280 8155 bge.w 8024834 <_malloc_r+0x364> 802458a: 68db ldr r3, [r3, #12] 802458c: 429d cmp r5, r3 802458e: d007 beq.n 80245a0 <_malloc_r+0xd0> 8024590: 6859 ldr r1, [r3, #4] 8024592: f021 0103 bic.w r1, r1, #3 8024596: 1b0a subs r2, r1, r4 8024598: 2a0f cmp r2, #15 802459a: ddf3 ble.n 8024584 <_malloc_r+0xb4> 802459c: f10c 3cff add.w ip, ip, #4294967295 80245a0: f10c 0c01 add.w ip, ip, #1 80245a4: f240 129c movw r2, #412 ; 0x19c 80245a8: 6933 ldr r3, [r6, #16] 80245aa: f2c2 0200 movt r2, #8192 ; 0x2000 80245ae: f102 0e08 add.w lr, r2, #8 80245b2: 4573 cmp r3, lr 80245b4: bf08 it eq 80245b6: f8d2 9004 ldreq.w r9, [r2, #4] 80245ba: d022 beq.n 8024602 <_malloc_r+0x132> 80245bc: 6858 ldr r0, [r3, #4] 80245be: f020 0003 bic.w r0, r0, #3 80245c2: 1b01 subs r1, r0, r4 80245c4: 290f cmp r1, #15 80245c6: f300 8184 bgt.w 80248d2 <_malloc_r+0x402> 80245ca: 2900 cmp r1, #0 80245cc: f8c2 e014 str.w lr, [r2, #20] 80245d0: f8c2 e010 str.w lr, [r2, #16] 80245d4: da66 bge.n 80246a4 <_malloc_r+0x1d4> 80245d6: f5b0 7f00 cmp.w r0, #512 ; 0x200 80245da: f080 814e bcs.w 802487a <_malloc_r+0x3aa> 80245de: 08c1 lsrs r1, r0, #3 80245e0: f04f 0801 mov.w r8, #1 80245e4: eb02 00c1 add.w r0, r2, r1, lsl #3 80245e8: 1089 asrs r1, r1, #2 80245ea: fa08 f801 lsl.w r8, r8, r1 80245ee: 6851 ldr r1, [r2, #4] 80245f0: 6885 ldr r5, [r0, #8] 80245f2: 60d8 str r0, [r3, #12] 80245f4: ea48 0901 orr.w r9, r8, r1 80245f8: f8c2 9004 str.w r9, [r2, #4] 80245fc: 609d str r5, [r3, #8] 80245fe: 60eb str r3, [r5, #12] 8024600: 6083 str r3, [r0, #8] 8024602: 2201 movs r2, #1 8024604: ea4f 03ac mov.w r3, ip, asr #2 8024608: fa02 f303 lsl.w r3, r2, r3 802460c: 454b cmp r3, r9 802460e: d854 bhi.n 80246ba <_malloc_r+0x1ea> 8024610: ea19 0f03 tst.w r9, r3 8024614: d10d bne.n 8024632 <_malloc_r+0x162> 8024616: 4093 lsls r3, r2 8024618: f02c 0c03 bic.w ip, ip, #3 802461c: ea19 0f03 tst.w r9, r3 8024620: f10c 0c04 add.w ip, ip, #4 8024624: d105 bne.n 8024632 <_malloc_r+0x162> 8024626: 005b lsls r3, r3, #1 8024628: f10c 0c04 add.w ip, ip, #4 802462c: ea19 0f03 tst.w r9, r3 8024630: d0f9 beq.n 8024626 <_malloc_r+0x156> 8024632: eb06 09cc add.w r9, r6, ip, lsl #3 8024636: 46e0 mov r8, ip 8024638: 4648 mov r0, r9 802463a: 68c2 ldr r2, [r0, #12] 802463c: 4290 cmp r0, r2 802463e: d107 bne.n 8024650 <_malloc_r+0x180> 8024640: e15b b.n 80248fa <_malloc_r+0x42a> 8024642: 2900 cmp r1, #0 8024644: f280 8183 bge.w 802494e <_malloc_r+0x47e> 8024648: 68d2 ldr r2, [r2, #12] 802464a: 4290 cmp r0, r2 802464c: f000 8155 beq.w 80248fa <_malloc_r+0x42a> 8024650: 6855 ldr r5, [r2, #4] 8024652: f025 0503 bic.w r5, r5, #3 8024656: 1b29 subs r1, r5, r4 8024658: 290f cmp r1, #15 802465a: ddf2 ble.n 8024642 <_malloc_r+0x172> 802465c: 4690 mov r8, r2 802465e: 1913 adds r3, r2, r4 8024660: 68d5 ldr r5, [r2, #12] 8024662: f044 0001 orr.w r0, r4, #1 8024666: f858 4f08 ldr.w r4, [r8, #8]! 802466a: f041 0c01 orr.w ip, r1, #1 802466e: 6050 str r0, [r2, #4] 8024670: 4638 mov r0, r7 8024672: f8c3 c004 str.w ip, [r3, #4] 8024676: 60e5 str r5, [r4, #12] 8024678: 60ac str r4, [r5, #8] 802467a: 6173 str r3, [r6, #20] 802467c: 6133 str r3, [r6, #16] 802467e: f8c3 e00c str.w lr, [r3, #12] 8024682: f8c3 e008 str.w lr, [r3, #8] 8024686: 5059 str r1, [r3, r1] 8024688: f000 fa3a bl 8024b00 <__malloc_unlock> 802468c: e755 b.n 802453a <_malloc_r+0x6a> 802468e: f1bc 0f04 cmp.w ip, #4 8024692: f200 80de bhi.w 8024852 <_malloc_r+0x382> 8024696: ea4f 1c94 mov.w ip, r4, lsr #6 802469a: f10c 0c38 add.w ip, ip, #56 ; 0x38 802469e: ea4f 054c mov.w r5, ip, lsl #1 80246a2: e765 b.n 8024570 <_malloc_r+0xa0> 80246a4: 181a adds r2, r3, r0 80246a6: f103 0808 add.w r8, r3, #8 80246aa: 4638 mov r0, r7 80246ac: 6853 ldr r3, [r2, #4] 80246ae: f043 0301 orr.w r3, r3, #1 80246b2: 6053 str r3, [r2, #4] 80246b4: f000 fa24 bl 8024b00 <__malloc_unlock> 80246b8: e73f b.n 802453a <_malloc_r+0x6a> 80246ba: 68b5 ldr r5, [r6, #8] 80246bc: 686b ldr r3, [r5, #4] 80246be: f023 0a03 bic.w sl, r3, #3 80246c2: 4554 cmp r4, sl 80246c4: d804 bhi.n 80246d0 <_malloc_r+0x200> 80246c6: ebc4 030a rsb r3, r4, sl 80246ca: 2b0f cmp r3, #15 80246cc: f300 80a4 bgt.w 8024818 <_malloc_r+0x348> 80246d0: f640 29e0 movw r9, #2784 ; 0xae0 80246d4: f8d6 1408 ldr.w r1, [r6, #1032] ; 0x408 80246d8: f2c2 0900 movt r9, #8192 ; 0x2000 80246dc: eb05 020a add.w r2, r5, sl 80246e0: 3101 adds r1, #1 80246e2: f8d9 3000 ldr.w r3, [r9] 80246e6: 4423 add r3, r4 80246e8: bf08 it eq 80246ea: f103 0b10 addeq.w fp, r3, #16 80246ee: d006 beq.n 80246fe <_malloc_r+0x22e> 80246f0: f503 5380 add.w r3, r3, #4096 ; 0x1000 80246f4: 330f adds r3, #15 80246f6: f423 637f bic.w r3, r3, #4080 ; 0xff0 80246fa: f023 0b0f bic.w fp, r3, #15 80246fe: 4638 mov r0, r7 8024700: 4659 mov r1, fp 8024702: 9201 str r2, [sp, #4] 8024704: f000 fe86 bl 8025414 <_sbrk_r> 8024708: 9a01 ldr r2, [sp, #4] 802470a: 1c41 adds r1, r0, #1 802470c: 4680 mov r8, r0 802470e: f000 8168 beq.w 80249e2 <_malloc_r+0x512> 8024712: 4282 cmp r2, r0 8024714: f200 8131 bhi.w 802497a <_malloc_r+0x4aa> 8024718: f8d9 3004 ldr.w r3, [r9, #4] 802471c: 4542 cmp r2, r8 802471e: 445b add r3, fp 8024720: f8c9 3004 str.w r3, [r9, #4] 8024724: f000 8166 beq.w 80249f4 <_malloc_r+0x524> 8024728: f8d6 1408 ldr.w r1, [r6, #1032] ; 0x408 802472c: f240 109c movw r0, #412 ; 0x19c 8024730: f2c2 0000 movt r0, #8192 ; 0x2000 8024734: 3101 adds r1, #1 8024736: bf17 itett ne 8024738: ebc2 0208 rsbne r2, r2, r8 802473c: f8c0 8408 streq.w r8, [r0, #1032] ; 0x408 8024740: 189b addne r3, r3, r2 8024742: f8c9 3004 strne.w r3, [r9, #4] 8024746: f018 0307 ands.w r3, r8, #7 802474a: 4638 mov r0, r7 802474c: bf1f itttt ne 802474e: f1c3 0208 rsbne r2, r3, #8 8024752: f5c3 5380 rsbne r3, r3, #4096 ; 0x1000 8024756: 4490 addne r8, r2 8024758: f103 0208 addne.w r2, r3, #8 802475c: eb08 030b add.w r3, r8, fp 8024760: bf08 it eq 8024762: f44f 5280 moveq.w r2, #4096 ; 0x1000 8024766: 051b lsls r3, r3, #20 8024768: 0d1b lsrs r3, r3, #20 802476a: ebc3 0b02 rsb fp, r3, r2 802476e: 4659 mov r1, fp 8024770: f000 fe50 bl 8025414 <_sbrk_r> 8024774: 1c43 adds r3, r0, #1 8024776: f000 8149 beq.w 8024a0c <_malloc_r+0x53c> 802477a: ebc8 0100 rsb r1, r8, r0 802477e: 4459 add r1, fp 8024780: f041 0101 orr.w r1, r1, #1 8024784: f8d9 3004 ldr.w r3, [r9, #4] 8024788: 42b5 cmp r5, r6 802478a: f640 22e0 movw r2, #2784 ; 0xae0 802478e: f8c6 8008 str.w r8, [r6, #8] 8024792: 445b add r3, fp 8024794: f2c2 0200 movt r2, #8192 ; 0x2000 8024798: f8c8 1004 str.w r1, [r8, #4] 802479c: f8c9 3004 str.w r3, [r9, #4] 80247a0: d018 beq.n 80247d4 <_malloc_r+0x304> 80247a2: f1ba 0f0f cmp.w sl, #15 80247a6: f240 810b bls.w 80249c0 <_malloc_r+0x4f0> 80247aa: f1aa 000c sub.w r0, sl, #12 80247ae: 6869 ldr r1, [r5, #4] 80247b0: f020 0007 bic.w r0, r0, #7 80247b4: f04f 0c05 mov.w ip, #5 80247b8: eb05 0e00 add.w lr, r5, r0 80247bc: 280f cmp r0, #15 80247be: f001 0101 and.w r1, r1, #1 80247c2: ea40 0101 orr.w r1, r0, r1 80247c6: 6069 str r1, [r5, #4] 80247c8: f8ce c004 str.w ip, [lr, #4] 80247cc: f8ce c008 str.w ip, [lr, #8] 80247d0: f200 8120 bhi.w 8024a14 <_malloc_r+0x544> 80247d4: f640 22e0 movw r2, #2784 ; 0xae0 80247d8: f8d9 102c ldr.w r1, [r9, #44] ; 0x2c 80247dc: f2c2 0200 movt r2, #8192 ; 0x2000 80247e0: 68b5 ldr r5, [r6, #8] 80247e2: 428b cmp r3, r1 80247e4: f8d9 1030 ldr.w r1, [r9, #48] ; 0x30 80247e8: bf88 it hi 80247ea: 62d3 strhi r3, [r2, #44] ; 0x2c 80247ec: f640 22e0 movw r2, #2784 ; 0xae0 80247f0: f2c2 0200 movt r2, #8192 ; 0x2000 80247f4: 428b cmp r3, r1 80247f6: bf88 it hi 80247f8: 6313 strhi r3, [r2, #48] ; 0x30 80247fa: 686a ldr r2, [r5, #4] 80247fc: f022 0203 bic.w r2, r2, #3 8024800: 4294 cmp r4, r2 8024802: ebc4 0302 rsb r3, r4, r2 8024806: d801 bhi.n 802480c <_malloc_r+0x33c> 8024808: 2b0f cmp r3, #15 802480a: dc05 bgt.n 8024818 <_malloc_r+0x348> 802480c: 4638 mov r0, r7 802480e: f04f 0800 mov.w r8, #0 8024812: f000 f975 bl 8024b00 <__malloc_unlock> 8024816: e690 b.n 802453a <_malloc_r+0x6a> 8024818: 192a adds r2, r5, r4 802481a: f043 0301 orr.w r3, r3, #1 802481e: f044 0401 orr.w r4, r4, #1 8024822: 4638 mov r0, r7 8024824: 606c str r4, [r5, #4] 8024826: f105 0808 add.w r8, r5, #8 802482a: 6053 str r3, [r2, #4] 802482c: 60b2 str r2, [r6, #8] 802482e: f000 f967 bl 8024b00 <__malloc_unlock> 8024832: e682 b.n 802453a <_malloc_r+0x6a> 8024834: 1859 adds r1, r3, r1 8024836: 68da ldr r2, [r3, #12] 8024838: 689c ldr r4, [r3, #8] 802483a: 4638 mov r0, r7 802483c: 684d ldr r5, [r1, #4] 802483e: f103 0808 add.w r8, r3, #8 8024842: f045 0501 orr.w r5, r5, #1 8024846: 60e2 str r2, [r4, #12] 8024848: 6094 str r4, [r2, #8] 802484a: 604d str r5, [r1, #4] 802484c: f000 f958 bl 8024b00 <__malloc_unlock> 8024850: e673 b.n 802453a <_malloc_r+0x6a> 8024852: f1bc 0f14 cmp.w ip, #20 8024856: bf9c itt ls 8024858: f10c 0c5b addls.w ip, ip, #91 ; 0x5b 802485c: ea4f 054c movls.w r5, ip, lsl #1 8024860: f67f ae86 bls.w 8024570 <_malloc_r+0xa0> 8024864: f1bc 0f54 cmp.w ip, #84 ; 0x54 8024868: f200 8093 bhi.w 8024992 <_malloc_r+0x4c2> 802486c: ea4f 3c14 mov.w ip, r4, lsr #12 8024870: f10c 0c6e add.w ip, ip, #110 ; 0x6e 8024874: ea4f 054c mov.w r5, ip, lsl #1 8024878: e67a b.n 8024570 <_malloc_r+0xa0> 802487a: 0a42 lsrs r2, r0, #9 802487c: 2a04 cmp r2, #4 802487e: d975 bls.n 802496c <_malloc_r+0x49c> 8024880: 2a14 cmp r2, #20 8024882: bf9c itt ls 8024884: f102 095b addls.w r9, r2, #91 ; 0x5b 8024888: ea4f 0549 movls.w r5, r9, lsl #1 802488c: d908 bls.n 80248a0 <_malloc_r+0x3d0> 802488e: 2a54 cmp r2, #84 ; 0x54 8024890: f200 80c9 bhi.w 8024a26 <_malloc_r+0x556> 8024894: ea4f 3910 mov.w r9, r0, lsr #12 8024898: f109 096e add.w r9, r9, #110 ; 0x6e 802489c: ea4f 0549 mov.w r5, r9, lsl #1 80248a0: eb06 0585 add.w r5, r6, r5, lsl #2 80248a4: f240 189c movw r8, #412 ; 0x19c 80248a8: f2c2 0800 movt r8, #8192 ; 0x2000 80248ac: 68aa ldr r2, [r5, #8] 80248ae: 42aa cmp r2, r5 80248b0: d079 beq.n 80249a6 <_malloc_r+0x4d6> 80248b2: 6851 ldr r1, [r2, #4] 80248b4: f021 0103 bic.w r1, r1, #3 80248b8: 4288 cmp r0, r1 80248ba: d202 bcs.n 80248c2 <_malloc_r+0x3f2> 80248bc: 6892 ldr r2, [r2, #8] 80248be: 4295 cmp r5, r2 80248c0: d1f7 bne.n 80248b2 <_malloc_r+0x3e2> 80248c2: 68d0 ldr r0, [r2, #12] 80248c4: f8d6 9004 ldr.w r9, [r6, #4] 80248c8: 60d8 str r0, [r3, #12] 80248ca: 609a str r2, [r3, #8] 80248cc: 60d3 str r3, [r2, #12] 80248ce: 6083 str r3, [r0, #8] 80248d0: e697 b.n 8024602 <_malloc_r+0x132> 80248d2: 191d adds r5, r3, r4 80248d4: f041 0601 orr.w r6, r1, #1 80248d8: 6155 str r5, [r2, #20] 80248da: f044 0401 orr.w r4, r4, #1 80248de: 6115 str r5, [r2, #16] 80248e0: 4638 mov r0, r7 80248e2: 605c str r4, [r3, #4] 80248e4: f103 0808 add.w r8, r3, #8 80248e8: f8c5 e00c str.w lr, [r5, #12] 80248ec: f8c5 e008 str.w lr, [r5, #8] 80248f0: 606e str r6, [r5, #4] 80248f2: 5069 str r1, [r5, r1] 80248f4: f000 f904 bl 8024b00 <__malloc_unlock> 80248f8: e61f b.n 802453a <_malloc_r+0x6a> 80248fa: f108 0801 add.w r8, r8, #1 80248fe: 3008 adds r0, #8 8024900: f018 0f03 tst.w r8, #3 8024904: f47f ae99 bne.w 802463a <_malloc_r+0x16a> 8024908: 464a mov r2, r9 802490a: f01c 0f03 tst.w ip, #3 802490e: f1a2 0108 sub.w r1, r2, #8 8024912: f10c 3cff add.w ip, ip, #4294967295 8024916: f000 809e beq.w 8024a56 <_malloc_r+0x586> 802491a: 6812 ldr r2, [r2, #0] 802491c: 428a cmp r2, r1 802491e: d0f4 beq.n 802490a <_malloc_r+0x43a> 8024920: 6872 ldr r2, [r6, #4] 8024922: 005b lsls r3, r3, #1 8024924: 4293 cmp r3, r2 8024926: f63f aec8 bhi.w 80246ba <_malloc_r+0x1ea> 802492a: 2b00 cmp r3, #0 802492c: f43f aec5 beq.w 80246ba <_malloc_r+0x1ea> 8024930: 421a tst r2, r3 8024932: f000 8095 beq.w 8024a60 <_malloc_r+0x590> 8024936: 46c4 mov ip, r8 8024938: e67b b.n 8024632 <_malloc_r+0x162> 802493a: f103 0208 add.w r2, r3, #8 802493e: 695b ldr r3, [r3, #20] 8024940: 429a cmp r2, r3 8024942: bf08 it eq 8024944: f10c 0c02 addeq.w ip, ip, #2 8024948: f43f ae2c beq.w 80245a4 <_malloc_r+0xd4> 802494c: e5e4 b.n 8024518 <_malloc_r+0x48> 802494e: 4690 mov r8, r2 8024950: 1955 adds r5, r2, r5 8024952: 68d3 ldr r3, [r2, #12] 8024954: 4638 mov r0, r7 8024956: f858 2f08 ldr.w r2, [r8, #8]! 802495a: 6869 ldr r1, [r5, #4] 802495c: 60d3 str r3, [r2, #12] 802495e: f041 0101 orr.w r1, r1, #1 8024962: 609a str r2, [r3, #8] 8024964: 6069 str r1, [r5, #4] 8024966: f000 f8cb bl 8024b00 <__malloc_unlock> 802496a: e5e6 b.n 802453a <_malloc_r+0x6a> 802496c: ea4f 1990 mov.w r9, r0, lsr #6 8024970: f109 0938 add.w r9, r9, #56 ; 0x38 8024974: ea4f 0549 mov.w r5, r9, lsl #1 8024978: e792 b.n 80248a0 <_malloc_r+0x3d0> 802497a: 42b5 cmp r5, r6 802497c: f240 139c movw r3, #412 ; 0x19c 8024980: f2c2 0300 movt r3, #8192 ; 0x2000 8024984: f43f aec8 beq.w 8024718 <_malloc_r+0x248> 8024988: 689d ldr r5, [r3, #8] 802498a: 686a ldr r2, [r5, #4] 802498c: f022 0203 bic.w r2, r2, #3 8024990: e736 b.n 8024800 <_malloc_r+0x330> 8024992: f5bc 7faa cmp.w ip, #340 ; 0x154 8024996: d819 bhi.n 80249cc <_malloc_r+0x4fc> 8024998: ea4f 3cd4 mov.w ip, r4, lsr #15 802499c: f10c 0c77 add.w ip, ip, #119 ; 0x77 80249a0: ea4f 054c mov.w r5, ip, lsl #1 80249a4: e5e4 b.n 8024570 <_malloc_r+0xa0> 80249a6: 2501 movs r5, #1 80249a8: f8d8 1004 ldr.w r1, [r8, #4] 80249ac: ea4f 09a9 mov.w r9, r9, asr #2 80249b0: 4610 mov r0, r2 80249b2: fa05 f509 lsl.w r5, r5, r9 80249b6: ea45 0901 orr.w r9, r5, r1 80249ba: f8c8 9004 str.w r9, [r8, #4] 80249be: e783 b.n 80248c8 <_malloc_r+0x3f8> 80249c0: 2301 movs r3, #1 80249c2: 4645 mov r5, r8 80249c4: f8c8 3004 str.w r3, [r8, #4] 80249c8: 2200 movs r2, #0 80249ca: e719 b.n 8024800 <_malloc_r+0x330> 80249cc: f240 5354 movw r3, #1364 ; 0x554 80249d0: 459c cmp ip, r3 80249d2: d80b bhi.n 80249ec <_malloc_r+0x51c> 80249d4: ea4f 4c94 mov.w ip, r4, lsr #18 80249d8: f10c 0c7c add.w ip, ip, #124 ; 0x7c 80249dc: ea4f 054c mov.w r5, ip, lsl #1 80249e0: e5c6 b.n 8024570 <_malloc_r+0xa0> 80249e2: 68b5 ldr r5, [r6, #8] 80249e4: 686a ldr r2, [r5, #4] 80249e6: f022 0203 bic.w r2, r2, #3 80249ea: e709 b.n 8024800 <_malloc_r+0x330> 80249ec: 25fc movs r5, #252 ; 0xfc 80249ee: f04f 0c7e mov.w ip, #126 ; 0x7e 80249f2: e5bd b.n 8024570 <_malloc_r+0xa0> 80249f4: 0511 lsls r1, r2, #20 80249f6: 0d09 lsrs r1, r1, #20 80249f8: 2900 cmp r1, #0 80249fa: f47f ae95 bne.w 8024728 <_malloc_r+0x258> 80249fe: 68b2 ldr r2, [r6, #8] 8024a00: eb0b 010a add.w r1, fp, sl 8024a04: f041 0101 orr.w r1, r1, #1 8024a08: 6051 str r1, [r2, #4] 8024a0a: e6e3 b.n 80247d4 <_malloc_r+0x304> 8024a0c: 2101 movs r1, #1 8024a0e: f04f 0b00 mov.w fp, #0 8024a12: e6b7 b.n 8024784 <_malloc_r+0x2b4> 8024a14: 4638 mov r0, r7 8024a16: f105 0108 add.w r1, r5, #8 8024a1a: 9201 str r2, [sp, #4] 8024a1c: f7ff f822 bl 8023a64 <_free_r> 8024a20: 9a01 ldr r2, [sp, #4] 8024a22: 6853 ldr r3, [r2, #4] 8024a24: e6d6 b.n 80247d4 <_malloc_r+0x304> 8024a26: f5b2 7faa cmp.w r2, #340 ; 0x154 8024a2a: d806 bhi.n 8024a3a <_malloc_r+0x56a> 8024a2c: ea4f 39d0 mov.w r9, r0, lsr #15 8024a30: f109 0977 add.w r9, r9, #119 ; 0x77 8024a34: ea4f 0549 mov.w r5, r9, lsl #1 8024a38: e732 b.n 80248a0 <_malloc_r+0x3d0> 8024a3a: f240 5154 movw r1, #1364 ; 0x554 8024a3e: 25fc movs r5, #252 ; 0xfc 8024a40: 428a cmp r2, r1 8024a42: f04f 097e mov.w r9, #126 ; 0x7e 8024a46: bf9e ittt ls 8024a48: ea4f 4990 movls.w r9, r0, lsr #18 8024a4c: f109 097c addls.w r9, r9, #124 ; 0x7c 8024a50: ea4f 0549 movls.w r5, r9, lsl #1 8024a54: e724 b.n 80248a0 <_malloc_r+0x3d0> 8024a56: 6872 ldr r2, [r6, #4] 8024a58: ea22 0203 bic.w r2, r2, r3 8024a5c: 6072 str r2, [r6, #4] 8024a5e: e760 b.n 8024922 <_malloc_r+0x452> 8024a60: 005b lsls r3, r3, #1 8024a62: f108 0804 add.w r8, r8, #4 8024a66: e763 b.n 8024930 <_malloc_r+0x460> 08024a68 : 8024a68: 0783 lsls r3, r0, #30 8024a6a: b2c9 uxtb r1, r1 8024a6c: b470 push {r4, r5, r6} 8024a6e: d040 beq.n 8024af2 8024a70: 1e54 subs r4, r2, #1 8024a72: 2a00 cmp r2, #0 8024a74: d03f beq.n 8024af6 8024a76: 7803 ldrb r3, [r0, #0] 8024a78: 428b cmp r3, r1 8024a7a: d021 beq.n 8024ac0 8024a7c: 1c43 adds r3, r0, #1 8024a7e: e004 b.n 8024a8a 8024a80: b304 cbz r4, 8024ac4 8024a82: 7802 ldrb r2, [r0, #0] 8024a84: 3c01 subs r4, #1 8024a86: 428a cmp r2, r1 8024a88: d01a beq.n 8024ac0 8024a8a: f013 0f03 tst.w r3, #3 8024a8e: 4618 mov r0, r3 8024a90: f103 0301 add.w r3, r3, #1 8024a94: d1f4 bne.n 8024a80 8024a96: 2c03 cmp r4, #3 8024a98: d816 bhi.n 8024ac8 8024a9a: 1e65 subs r5, r4, #1 8024a9c: b194 cbz r4, 8024ac4 8024a9e: 7803 ldrb r3, [r0, #0] 8024aa0: 428b cmp r3, r1 8024aa2: d00d beq.n 8024ac0 8024aa4: 1c42 adds r2, r0, #1 8024aa6: 2300 movs r3, #0 8024aa8: e002 b.n 8024ab0 8024aaa: 7804 ldrb r4, [r0, #0] 8024aac: 428c cmp r4, r1 8024aae: d007 beq.n 8024ac0 8024ab0: 429d cmp r5, r3 8024ab2: 4610 mov r0, r2 8024ab4: f103 0301 add.w r3, r3, #1 8024ab8: f102 0201 add.w r2, r2, #1 8024abc: d1f5 bne.n 8024aaa 8024abe: 2000 movs r0, #0 8024ac0: bc70 pop {r4, r5, r6} 8024ac2: 4770 bx lr 8024ac4: 4620 mov r0, r4 8024ac6: e7fb b.n 8024ac0 8024ac8: ea41 2601 orr.w r6, r1, r1, lsl #8 8024acc: ea46 4606 orr.w r6, r6, r6, lsl #16 8024ad0: 4602 mov r2, r0 8024ad2: 3004 adds r0, #4 8024ad4: 6813 ldr r3, [r2, #0] 8024ad6: 4073 eors r3, r6 8024ad8: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 8024adc: ea25 0303 bic.w r3, r5, r3 8024ae0: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8024ae4: d103 bne.n 8024aee 8024ae6: 3c04 subs r4, #4 8024ae8: 2c03 cmp r4, #3 8024aea: d8f1 bhi.n 8024ad0 8024aec: e7d5 b.n 8024a9a 8024aee: 4610 mov r0, r2 8024af0: e7d3 b.n 8024a9a 8024af2: 4614 mov r4, r2 8024af4: e7cf b.n 8024a96 8024af6: 4610 mov r0, r2 8024af8: e7e2 b.n 8024ac0 8024afa: bf00 nop 08024afc <__malloc_lock>: 8024afc: 4770 bx lr 8024afe: bf00 nop 08024b00 <__malloc_unlock>: 8024b00: 4770 bx lr 8024b02: bf00 nop 08024b04 <_Balloc>: 8024b04: b570 push {r4, r5, r6, lr} 8024b06: 4606 mov r6, r0 8024b08: 6a44 ldr r4, [r0, #36] ; 0x24 8024b0a: 460d mov r5, r1 8024b0c: b15c cbz r4, 8024b26 <_Balloc+0x22> 8024b0e: 68e2 ldr r2, [r4, #12] 8024b10: b19a cbz r2, 8024b3a <_Balloc+0x36> 8024b12: f852 0025 ldr.w r0, [r2, r5, lsl #2] 8024b16: b1e0 cbz r0, 8024b52 <_Balloc+0x4e> 8024b18: 6801 ldr r1, [r0, #0] 8024b1a: f842 1025 str.w r1, [r2, r5, lsl #2] 8024b1e: 2200 movs r2, #0 8024b20: 6102 str r2, [r0, #16] 8024b22: 60c2 str r2, [r0, #12] 8024b24: bd70 pop {r4, r5, r6, pc} 8024b26: 2010 movs r0, #16 8024b28: f7ff fcc2 bl 80244b0 8024b2c: 2300 movs r3, #0 8024b2e: 4604 mov r4, r0 8024b30: 6270 str r0, [r6, #36] ; 0x24 8024b32: 6043 str r3, [r0, #4] 8024b34: 6083 str r3, [r0, #8] 8024b36: 6003 str r3, [r0, #0] 8024b38: 60c3 str r3, [r0, #12] 8024b3a: 2221 movs r2, #33 ; 0x21 8024b3c: 4630 mov r0, r6 8024b3e: 2104 movs r1, #4 8024b40: f000 fcfc bl 802553c <_calloc_r> 8024b44: 6a73 ldr r3, [r6, #36] ; 0x24 8024b46: 60e0 str r0, [r4, #12] 8024b48: 68da ldr r2, [r3, #12] 8024b4a: 2a00 cmp r2, #0 8024b4c: d1e1 bne.n 8024b12 <_Balloc+0xe> 8024b4e: 2000 movs r0, #0 8024b50: bd70 pop {r4, r5, r6, pc} 8024b52: 2301 movs r3, #1 8024b54: 4630 mov r0, r6 8024b56: 4619 mov r1, r3 8024b58: fa03 f405 lsl.w r4, r3, r5 8024b5c: 1d62 adds r2, r4, #5 8024b5e: 0092 lsls r2, r2, #2 8024b60: f000 fcec bl 802553c <_calloc_r> 8024b64: 2800 cmp r0, #0 8024b66: d0f2 beq.n 8024b4e <_Balloc+0x4a> 8024b68: 6045 str r5, [r0, #4] 8024b6a: 6084 str r4, [r0, #8] 8024b6c: e7d7 b.n 8024b1e <_Balloc+0x1a> 8024b6e: bf00 nop 08024b70 <_Bfree>: 8024b70: b530 push {r4, r5, lr} 8024b72: 4604 mov r4, r0 8024b74: 6a45 ldr r5, [r0, #36] ; 0x24 8024b76: b083 sub sp, #12 8024b78: b155 cbz r5, 8024b90 <_Bfree+0x20> 8024b7a: b139 cbz r1, 8024b8c <_Bfree+0x1c> 8024b7c: 6a63 ldr r3, [r4, #36] ; 0x24 8024b7e: 684a ldr r2, [r1, #4] 8024b80: 68db ldr r3, [r3, #12] 8024b82: f853 0022 ldr.w r0, [r3, r2, lsl #2] 8024b86: 6008 str r0, [r1, #0] 8024b88: f843 1022 str.w r1, [r3, r2, lsl #2] 8024b8c: b003 add sp, #12 8024b8e: bd30 pop {r4, r5, pc} 8024b90: 2010 movs r0, #16 8024b92: 9101 str r1, [sp, #4] 8024b94: f7ff fc8c bl 80244b0 8024b98: 9901 ldr r1, [sp, #4] 8024b9a: 6260 str r0, [r4, #36] ; 0x24 8024b9c: 6045 str r5, [r0, #4] 8024b9e: 6085 str r5, [r0, #8] 8024ba0: 6005 str r5, [r0, #0] 8024ba2: 60c5 str r5, [r0, #12] 8024ba4: e7e9 b.n 8024b7a <_Bfree+0xa> 8024ba6: bf00 nop 08024ba8 <__multadd>: 8024ba8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8024bac: 4688 mov r8, r1 8024bae: f8d1 a010 ldr.w sl, [r1, #16] 8024bb2: b082 sub sp, #8 8024bb4: 4681 mov r9, r0 8024bb6: f101 0514 add.w r5, r1, #20 8024bba: 2400 movs r4, #0 8024bbc: 682f ldr r7, [r5, #0] 8024bbe: 3401 adds r4, #1 8024bc0: b2be uxth r6, r7 8024bc2: 0c3f lsrs r7, r7, #16 8024bc4: fb02 3606 mla r6, r2, r6, r3 8024bc8: fb02 f307 mul.w r3, r2, r7 8024bcc: eb03 4316 add.w r3, r3, r6, lsr #16 8024bd0: b2b6 uxth r6, r6 8024bd2: eb06 4603 add.w r6, r6, r3, lsl #16 8024bd6: 0c1b lsrs r3, r3, #16 8024bd8: 45a2 cmp sl, r4 8024bda: f845 6b04 str.w r6, [r5], #4 8024bde: dced bgt.n 8024bbc <__multadd+0x14> 8024be0: b153 cbz r3, 8024bf8 <__multadd+0x50> 8024be2: f8d8 2008 ldr.w r2, [r8, #8] 8024be6: 4592 cmp sl, r2 8024be8: da0a bge.n 8024c00 <__multadd+0x58> 8024bea: eb08 028a add.w r2, r8, sl, lsl #2 8024bee: f10a 0101 add.w r1, sl, #1 8024bf2: f8c8 1010 str.w r1, [r8, #16] 8024bf6: 6153 str r3, [r2, #20] 8024bf8: 4640 mov r0, r8 8024bfa: b002 add sp, #8 8024bfc: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8024c00: f8d8 1004 ldr.w r1, [r8, #4] 8024c04: 4648 mov r0, r9 8024c06: 9301 str r3, [sp, #4] 8024c08: 3101 adds r1, #1 8024c0a: f7ff ff7b bl 8024b04 <_Balloc> 8024c0e: f8d8 2010 ldr.w r2, [r8, #16] 8024c12: f108 010c add.w r1, r8, #12 8024c16: 3202 adds r2, #2 8024c18: 0092 lsls r2, r2, #2 8024c1a: 4604 mov r4, r0 8024c1c: 300c adds r0, #12 8024c1e: f7fd f841 bl 8021ca4 8024c22: 4641 mov r1, r8 8024c24: 4648 mov r0, r9 8024c26: 46a0 mov r8, r4 8024c28: f7ff ffa2 bl 8024b70 <_Bfree> 8024c2c: 9b01 ldr r3, [sp, #4] 8024c2e: e7dc b.n 8024bea <__multadd+0x42> 08024c30 <__s2b>: 8024c30: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8024c34: f648 6539 movw r5, #36409 ; 0x8e39 8024c38: 461f mov r7, r3 8024c3a: f6c3 05e3 movt r5, #14563 ; 0x38e3 8024c3e: 3308 adds r3, #8 8024c40: 4606 mov r6, r0 8024c42: 460c mov r4, r1 8024c44: 4690 mov r8, r2 8024c46: fb85 1003 smull r1, r0, r5, r3 8024c4a: 17db asrs r3, r3, #31 8024c4c: ebc3 0060 rsb r0, r3, r0, asr #1 8024c50: 2801 cmp r0, #1 8024c52: dd37 ble.n 8024cc4 <__s2b+0x94> 8024c54: 2501 movs r5, #1 8024c56: 2100 movs r1, #0 8024c58: 006d lsls r5, r5, #1 8024c5a: 3101 adds r1, #1 8024c5c: 42a8 cmp r0, r5 8024c5e: dcfb bgt.n 8024c58 <__s2b+0x28> 8024c60: 4630 mov r0, r6 8024c62: f7ff ff4f bl 8024b04 <_Balloc> 8024c66: 9b08 ldr r3, [sp, #32] 8024c68: 6143 str r3, [r0, #20] 8024c6a: 2301 movs r3, #1 8024c6c: f1b8 0f09 cmp.w r8, #9 8024c70: 4601 mov r1, r0 8024c72: 6103 str r3, [r0, #16] 8024c74: dd22 ble.n 8024cbc <__s2b+0x8c> 8024c76: f104 0909 add.w r9, r4, #9 8024c7a: 4444 add r4, r8 8024c7c: 464d mov r5, r9 8024c7e: f815 3b01 ldrb.w r3, [r5], #1 8024c82: 220a movs r2, #10 8024c84: 4630 mov r0, r6 8024c86: 3b30 subs r3, #48 ; 0x30 8024c88: f7ff ff8e bl 8024ba8 <__multadd> 8024c8c: 42a5 cmp r5, r4 8024c8e: 4601 mov r1, r0 8024c90: d1f5 bne.n 8024c7e <__s2b+0x4e> 8024c92: eb09 0408 add.w r4, r9, r8 8024c96: 3c08 subs r4, #8 8024c98: 4547 cmp r7, r8 8024c9a: dd0c ble.n 8024cb6 <__s2b+0x86> 8024c9c: ebc8 0707 rsb r7, r8, r7 8024ca0: 19e7 adds r7, r4, r7 8024ca2: f814 3b01 ldrb.w r3, [r4], #1 8024ca6: 220a movs r2, #10 8024ca8: 4630 mov r0, r6 8024caa: 3b30 subs r3, #48 ; 0x30 8024cac: f7ff ff7c bl 8024ba8 <__multadd> 8024cb0: 42bc cmp r4, r7 8024cb2: 4601 mov r1, r0 8024cb4: d1f5 bne.n 8024ca2 <__s2b+0x72> 8024cb6: 4608 mov r0, r1 8024cb8: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8024cbc: 340a adds r4, #10 8024cbe: f04f 0809 mov.w r8, #9 8024cc2: e7e9 b.n 8024c98 <__s2b+0x68> 8024cc4: 2100 movs r1, #0 8024cc6: e7cb b.n 8024c60 <__s2b+0x30> 08024cc8 <__hi0bits>: 8024cc8: 4603 mov r3, r0 8024cca: 2000 movs r0, #0 8024ccc: 0c1a lsrs r2, r3, #16 8024cce: d101 bne.n 8024cd4 <__hi0bits+0xc> 8024cd0: 041b lsls r3, r3, #16 8024cd2: 2010 movs r0, #16 8024cd4: f013 4f7f tst.w r3, #4278190080 ; 0xff000000 8024cd8: d101 bne.n 8024cde <__hi0bits+0x16> 8024cda: 3008 adds r0, #8 8024cdc: 021b lsls r3, r3, #8 8024cde: f013 4f70 tst.w r3, #4026531840 ; 0xf0000000 8024ce2: d101 bne.n 8024ce8 <__hi0bits+0x20> 8024ce4: 3004 adds r0, #4 8024ce6: 011b lsls r3, r3, #4 8024ce8: f013 4f40 tst.w r3, #3221225472 ; 0xc0000000 8024cec: d101 bne.n 8024cf2 <__hi0bits+0x2a> 8024cee: 3002 adds r0, #2 8024cf0: 009b lsls r3, r3, #2 8024cf2: 2b00 cmp r3, #0 8024cf4: db02 blt.n 8024cfc <__hi0bits+0x34> 8024cf6: 005b lsls r3, r3, #1 8024cf8: d401 bmi.n 8024cfe <__hi0bits+0x36> 8024cfa: 2020 movs r0, #32 8024cfc: 4770 bx lr 8024cfe: 3001 adds r0, #1 8024d00: 4770 bx lr 8024d02: bf00 nop 08024d04 <__lo0bits>: 8024d04: 6803 ldr r3, [r0, #0] 8024d06: 4602 mov r2, r0 8024d08: f013 0007 ands.w r0, r3, #7 8024d0c: d007 beq.n 8024d1e <__lo0bits+0x1a> 8024d0e: 07d9 lsls r1, r3, #31 8024d10: d41f bmi.n 8024d52 <__lo0bits+0x4e> 8024d12: 0798 lsls r0, r3, #30 8024d14: d41f bmi.n 8024d56 <__lo0bits+0x52> 8024d16: 089b lsrs r3, r3, #2 8024d18: 2002 movs r0, #2 8024d1a: 6013 str r3, [r2, #0] 8024d1c: 4770 bx lr 8024d1e: b299 uxth r1, r3 8024d20: b909 cbnz r1, 8024d26 <__lo0bits+0x22> 8024d22: 0c1b lsrs r3, r3, #16 8024d24: 2010 movs r0, #16 8024d26: f013 0fff tst.w r3, #255 ; 0xff 8024d2a: d101 bne.n 8024d30 <__lo0bits+0x2c> 8024d2c: 3008 adds r0, #8 8024d2e: 0a1b lsrs r3, r3, #8 8024d30: 0719 lsls r1, r3, #28 8024d32: d101 bne.n 8024d38 <__lo0bits+0x34> 8024d34: 3004 adds r0, #4 8024d36: 091b lsrs r3, r3, #4 8024d38: 0799 lsls r1, r3, #30 8024d3a: d101 bne.n 8024d40 <__lo0bits+0x3c> 8024d3c: 3002 adds r0, #2 8024d3e: 089b lsrs r3, r3, #2 8024d40: 07d9 lsls r1, r3, #31 8024d42: d404 bmi.n 8024d4e <__lo0bits+0x4a> 8024d44: 085b lsrs r3, r3, #1 8024d46: d101 bne.n 8024d4c <__lo0bits+0x48> 8024d48: 2020 movs r0, #32 8024d4a: 4770 bx lr 8024d4c: 3001 adds r0, #1 8024d4e: 6013 str r3, [r2, #0] 8024d50: 4770 bx lr 8024d52: 2000 movs r0, #0 8024d54: 4770 bx lr 8024d56: 085b lsrs r3, r3, #1 8024d58: 2001 movs r0, #1 8024d5a: 6013 str r3, [r2, #0] 8024d5c: 4770 bx lr 8024d5e: bf00 nop 08024d60 <__i2b>: 8024d60: b510 push {r4, lr} 8024d62: 460c mov r4, r1 8024d64: 2101 movs r1, #1 8024d66: f7ff fecd bl 8024b04 <_Balloc> 8024d6a: 2201 movs r2, #1 8024d6c: 6144 str r4, [r0, #20] 8024d6e: 6102 str r2, [r0, #16] 8024d70: bd10 pop {r4, pc} 8024d72: bf00 nop 08024d74 <__multiply>: 8024d74: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024d78: 460c mov r4, r1 8024d7a: 690e ldr r6, [r1, #16] 8024d7c: b085 sub sp, #20 8024d7e: 6915 ldr r5, [r2, #16] 8024d80: 4617 mov r7, r2 8024d82: 42ae cmp r6, r5 8024d84: da04 bge.n 8024d90 <__multiply+0x1c> 8024d86: 4632 mov r2, r6 8024d88: 463c mov r4, r7 8024d8a: 462e mov r6, r5 8024d8c: 460f mov r7, r1 8024d8e: 4615 mov r5, r2 8024d90: 68a3 ldr r3, [r4, #8] 8024d92: eb06 0805 add.w r8, r6, r5 8024d96: 6861 ldr r1, [r4, #4] 8024d98: 4598 cmp r8, r3 8024d9a: bfc8 it gt 8024d9c: 3101 addgt r1, #1 8024d9e: f7ff feb1 bl 8024b04 <_Balloc> 8024da2: eb00 0988 add.w r9, r0, r8, lsl #2 8024da6: f100 0314 add.w r3, r0, #20 8024daa: f109 0914 add.w r9, r9, #20 8024dae: 9001 str r0, [sp, #4] 8024db0: 2000 movs r0, #0 8024db2: 454b cmp r3, r9 8024db4: d203 bcs.n 8024dbe <__multiply+0x4a> 8024db6: f843 0b04 str.w r0, [r3], #4 8024dba: 4599 cmp r9, r3 8024dbc: d8fb bhi.n 8024db6 <__multiply+0x42> 8024dbe: eb07 0585 add.w r5, r7, r5, lsl #2 8024dc2: eb04 0686 add.w r6, r4, r6, lsl #2 8024dc6: 3714 adds r7, #20 8024dc8: 3514 adds r5, #20 8024dca: 3414 adds r4, #20 8024dcc: 3614 adds r6, #20 8024dce: 42af cmp r7, r5 8024dd0: d257 bcs.n 8024e82 <__multiply+0x10e> 8024dd2: 9a01 ldr r2, [sp, #4] 8024dd4: f8cd 9008 str.w r9, [sp, #8] 8024dd8: 46a9 mov r9, r5 8024dda: f8cd 800c str.w r8, [sp, #12] 8024dde: f102 0c18 add.w ip, r2, #24 8024de2: 46a0 mov r8, r4 8024de4: f857 4b04 ldr.w r4, [r7], #4 8024de8: b2a0 uxth r0, r4 8024dea: b1f0 cbz r0, 8024e2a <__multiply+0xb6> 8024dec: 4642 mov r2, r8 8024dee: f1ac 0304 sub.w r3, ip, #4 8024df2: 2400 movs r4, #0 8024df4: f852 1b04 ldr.w r1, [r2], #4 8024df8: 681d ldr r5, [r3, #0] 8024dfa: fa1f fa81 uxth.w sl, r1 8024dfe: 0c09 lsrs r1, r1, #16 8024e00: fa1f fb85 uxth.w fp, r5 8024e04: 0c2d lsrs r5, r5, #16 8024e06: fb00 ba0a mla sl, r0, sl, fp 8024e0a: fb00 5101 mla r1, r0, r1, r5 8024e0e: 4454 add r4, sl 8024e10: eb01 4114 add.w r1, r1, r4, lsr #16 8024e14: b2a4 uxth r4, r4 8024e16: ea44 4501 orr.w r5, r4, r1, lsl #16 8024e1a: 0c0c lsrs r4, r1, #16 8024e1c: 4296 cmp r6, r2 8024e1e: f843 5b04 str.w r5, [r3], #4 8024e22: d8e7 bhi.n 8024df4 <__multiply+0x80> 8024e24: 601c str r4, [r3, #0] 8024e26: f857 4c04 ldr.w r4, [r7, #-4] 8024e2a: 0c24 lsrs r4, r4, #16 8024e2c: d021 beq.n 8024e72 <__multiply+0xfe> 8024e2e: f85c 1c04 ldr.w r1, [ip, #-4] 8024e32: 4642 mov r2, r8 8024e34: 4663 mov r3, ip 8024e36: 2500 movs r5, #0 8024e38: 4608 mov r0, r1 8024e3a: f8b2 a000 ldrh.w sl, [r2] 8024e3e: 0c00 lsrs r0, r0, #16 8024e40: b289 uxth r1, r1 8024e42: 469b mov fp, r3 8024e44: fb04 000a mla r0, r4, sl, r0 8024e48: 1945 adds r5, r0, r5 8024e4a: ea41 4105 orr.w r1, r1, r5, lsl #16 8024e4e: f843 1c04 str.w r1, [r3, #-4] 8024e52: f853 0b04 ldr.w r0, [r3], #4 8024e56: f852 1b04 ldr.w r1, [r2], #4 8024e5a: fa1f fa80 uxth.w sl, r0 8024e5e: 0c09 lsrs r1, r1, #16 8024e60: fb04 a101 mla r1, r4, r1, sl 8024e64: eb01 4115 add.w r1, r1, r5, lsr #16 8024e68: 0c0d lsrs r5, r1, #16 8024e6a: 4296 cmp r6, r2 8024e6c: d8e5 bhi.n 8024e3a <__multiply+0xc6> 8024e6e: f8cb 1000 str.w r1, [fp] 8024e72: 45b9 cmp r9, r7 8024e74: f10c 0c04 add.w ip, ip, #4 8024e78: d8b4 bhi.n 8024de4 <__multiply+0x70> 8024e7a: f8dd 9008 ldr.w r9, [sp, #8] 8024e7e: f8dd 800c ldr.w r8, [sp, #12] 8024e82: f1b8 0f00 cmp.w r8, #0 8024e86: dd0b ble.n 8024ea0 <__multiply+0x12c> 8024e88: f859 3c04 ldr.w r3, [r9, #-4] 8024e8c: f1a9 0904 sub.w r9, r9, #4 8024e90: b11b cbz r3, 8024e9a <__multiply+0x126> 8024e92: e005 b.n 8024ea0 <__multiply+0x12c> 8024e94: f859 3d04 ldr.w r3, [r9, #-4]! 8024e98: b913 cbnz r3, 8024ea0 <__multiply+0x12c> 8024e9a: f1b8 0801 subs.w r8, r8, #1 8024e9e: d1f9 bne.n 8024e94 <__multiply+0x120> 8024ea0: 9b01 ldr r3, [sp, #4] 8024ea2: 4618 mov r0, r3 8024ea4: f8c3 8010 str.w r8, [r3, #16] 8024ea8: b005 add sp, #20 8024eaa: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024eae: bf00 nop 08024eb0 <__pow5mult>: 8024eb0: f012 0303 ands.w r3, r2, #3 8024eb4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8024eb8: 4614 mov r4, r2 8024eba: 4680 mov r8, r0 8024ebc: 460f mov r7, r1 8024ebe: d128 bne.n 8024f12 <__pow5mult+0x62> 8024ec0: 10a4 asrs r4, r4, #2 8024ec2: d01a beq.n 8024efa <__pow5mult+0x4a> 8024ec4: f8d8 5024 ldr.w r5, [r8, #36] ; 0x24 8024ec8: 2d00 cmp r5, #0 8024eca: d02e beq.n 8024f2a <__pow5mult+0x7a> 8024ecc: 68ae ldr r6, [r5, #8] 8024ece: b92e cbnz r6, 8024edc <__pow5mult+0x2c> 8024ed0: e036 b.n 8024f40 <__pow5mult+0x90> 8024ed2: 1064 asrs r4, r4, #1 8024ed4: d011 beq.n 8024efa <__pow5mult+0x4a> 8024ed6: 6835 ldr r5, [r6, #0] 8024ed8: b195 cbz r5, 8024f00 <__pow5mult+0x50> 8024eda: 462e mov r6, r5 8024edc: 07e0 lsls r0, r4, #31 8024ede: d5f8 bpl.n 8024ed2 <__pow5mult+0x22> 8024ee0: 4639 mov r1, r7 8024ee2: 4632 mov r2, r6 8024ee4: 4640 mov r0, r8 8024ee6: f7ff ff45 bl 8024d74 <__multiply> 8024eea: 4639 mov r1, r7 8024eec: 4605 mov r5, r0 8024eee: 4640 mov r0, r8 8024ef0: f7ff fe3e bl 8024b70 <_Bfree> 8024ef4: 1064 asrs r4, r4, #1 8024ef6: 462f mov r7, r5 8024ef8: d1ed bne.n 8024ed6 <__pow5mult+0x26> 8024efa: 4638 mov r0, r7 8024efc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8024f00: 4631 mov r1, r6 8024f02: 4632 mov r2, r6 8024f04: 4640 mov r0, r8 8024f06: f7ff ff35 bl 8024d74 <__multiply> 8024f0a: 6030 str r0, [r6, #0] 8024f0c: 4606 mov r6, r0 8024f0e: 6005 str r5, [r0, #0] 8024f10: e7e4 b.n 8024edc <__pow5mult+0x2c> 8024f12: f648 62d8 movw r2, #36568 ; 0x8ed8 8024f16: 1e5d subs r5, r3, #1 8024f18: f6c0 0203 movt r2, #2051 ; 0x803 8024f1c: 2300 movs r3, #0 8024f1e: f852 2025 ldr.w r2, [r2, r5, lsl #2] 8024f22: f7ff fe41 bl 8024ba8 <__multadd> 8024f26: 4607 mov r7, r0 8024f28: e7ca b.n 8024ec0 <__pow5mult+0x10> 8024f2a: 2010 movs r0, #16 8024f2c: f7ff fac0 bl 80244b0 8024f30: 2300 movs r3, #0 8024f32: 4605 mov r5, r0 8024f34: f8c8 0024 str.w r0, [r8, #36] ; 0x24 8024f38: 6043 str r3, [r0, #4] 8024f3a: 6083 str r3, [r0, #8] 8024f3c: 6003 str r3, [r0, #0] 8024f3e: 60c3 str r3, [r0, #12] 8024f40: 4640 mov r0, r8 8024f42: f240 2171 movw r1, #625 ; 0x271 8024f46: f7ff ff0b bl 8024d60 <__i2b> 8024f4a: 2300 movs r3, #0 8024f4c: 60a8 str r0, [r5, #8] 8024f4e: 4606 mov r6, r0 8024f50: 6003 str r3, [r0, #0] 8024f52: e7c3 b.n 8024edc <__pow5mult+0x2c> 08024f54 <__lshift>: 8024f54: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024f58: 4693 mov fp, r2 8024f5a: 690a ldr r2, [r1, #16] 8024f5c: 460f mov r7, r1 8024f5e: ea4f 156b mov.w r5, fp, asr #5 8024f62: 688b ldr r3, [r1, #8] 8024f64: eb05 0a02 add.w sl, r5, r2 8024f68: 4681 mov r9, r0 8024f6a: f10a 0601 add.w r6, sl, #1 8024f6e: 6849 ldr r1, [r1, #4] 8024f70: 429e cmp r6, r3 8024f72: dd03 ble.n 8024f7c <__lshift+0x28> 8024f74: 005b lsls r3, r3, #1 8024f76: 3101 adds r1, #1 8024f78: 429e cmp r6, r3 8024f7a: dcfb bgt.n 8024f74 <__lshift+0x20> 8024f7c: 4648 mov r0, r9 8024f7e: f7ff fdc1 bl 8024b04 <_Balloc> 8024f82: 2d00 cmp r5, #0 8024f84: 4680 mov r8, r0 8024f86: f100 0414 add.w r4, r0, #20 8024f8a: dd0a ble.n 8024fa2 <__lshift+0x4e> 8024f8c: 2300 movs r3, #0 8024f8e: 461a mov r2, r3 8024f90: 3301 adds r3, #1 8024f92: f844 2b04 str.w r2, [r4], #4 8024f96: 42ab cmp r3, r5 8024f98: d1fa bne.n 8024f90 <__lshift+0x3c> 8024f9a: eb08 0383 add.w r3, r8, r3, lsl #2 8024f9e: f103 0414 add.w r4, r3, #20 8024fa2: 6938 ldr r0, [r7, #16] 8024fa4: f107 0514 add.w r5, r7, #20 8024fa8: eb07 0080 add.w r0, r7, r0, lsl #2 8024fac: 3014 adds r0, #20 8024fae: f01b 0b1f ands.w fp, fp, #31 8024fb2: d01c beq.n 8024fee <__lshift+0x9a> 8024fb4: f1cb 0320 rsb r3, fp, #32 8024fb8: 2200 movs r2, #0 8024fba: 6829 ldr r1, [r5, #0] 8024fbc: fa01 f10b lsl.w r1, r1, fp 8024fc0: 430a orrs r2, r1 8024fc2: f844 2b04 str.w r2, [r4], #4 8024fc6: f855 2b04 ldr.w r2, [r5], #4 8024fca: 42a8 cmp r0, r5 8024fcc: fa22 f203 lsr.w r2, r2, r3 8024fd0: d8f3 bhi.n 8024fba <__lshift+0x66> 8024fd2: 6022 str r2, [r4, #0] 8024fd4: b10a cbz r2, 8024fda <__lshift+0x86> 8024fd6: f10a 0602 add.w r6, sl, #2 8024fda: 4648 mov r0, r9 8024fdc: 3e01 subs r6, #1 8024fde: 4639 mov r1, r7 8024fe0: f8c8 6010 str.w r6, [r8, #16] 8024fe4: f7ff fdc4 bl 8024b70 <_Bfree> 8024fe8: 4640 mov r0, r8 8024fea: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024fee: f855 3b04 ldr.w r3, [r5], #4 8024ff2: 42a8 cmp r0, r5 8024ff4: f844 3b04 str.w r3, [r4], #4 8024ff8: d9ef bls.n 8024fda <__lshift+0x86> 8024ffa: f855 3b04 ldr.w r3, [r5], #4 8024ffe: 42a8 cmp r0, r5 8025000: f844 3b04 str.w r3, [r4], #4 8025004: d8f3 bhi.n 8024fee <__lshift+0x9a> 8025006: e7e8 b.n 8024fda <__lshift+0x86> 08025008 <__mcmp>: 8025008: 4603 mov r3, r0 802500a: 690a ldr r2, [r1, #16] 802500c: 6900 ldr r0, [r0, #16] 802500e: b430 push {r4, r5} 8025010: 1a80 subs r0, r0, r2 8025012: d10f bne.n 8025034 <__mcmp+0x2c> 8025014: 3204 adds r2, #4 8025016: f103 0514 add.w r5, r3, #20 802501a: 0092 lsls r2, r2, #2 802501c: 189b adds r3, r3, r2 802501e: 1889 adds r1, r1, r2 8025020: 3304 adds r3, #4 8025022: 3104 adds r1, #4 8025024: f853 2d04 ldr.w r2, [r3, #-4]! 8025028: f851 4d04 ldr.w r4, [r1, #-4]! 802502c: 42a2 cmp r2, r4 802502e: d103 bne.n 8025038 <__mcmp+0x30> 8025030: 429d cmp r5, r3 8025032: d3f7 bcc.n 8025024 <__mcmp+0x1c> 8025034: bc30 pop {r4, r5} 8025036: 4770 bx lr 8025038: 4294 cmp r4, r2 802503a: bf94 ite ls 802503c: 2001 movls r0, #1 802503e: f04f 30ff movhi.w r0, #4294967295 8025042: e7f7 b.n 8025034 <__mcmp+0x2c> 08025044 <__mdiff>: 8025044: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8025048: 468b mov fp, r1 802504a: 4604 mov r4, r0 802504c: 4611 mov r1, r2 802504e: 4658 mov r0, fp 8025050: 4691 mov r9, r2 8025052: f7ff ffd9 bl 8025008 <__mcmp> 8025056: 1e05 subs r5, r0, #0 8025058: d061 beq.n 802511e <__mdiff+0xda> 802505a: bfbc itt lt 802505c: 465b movlt r3, fp 802505e: 46cb movlt fp, r9 8025060: 4620 mov r0, r4 8025062: bfb8 it lt 8025064: 4699 movlt r9, r3 8025066: f8db 1004 ldr.w r1, [fp, #4] 802506a: bfac ite ge 802506c: f04f 0800 movge.w r8, #0 8025070: f04f 0801 movlt.w r8, #1 8025074: f7ff fd46 bl 8024b04 <_Balloc> 8025078: f8db 7010 ldr.w r7, [fp, #16] 802507c: f109 0514 add.w r5, r9, #20 8025080: f8d9 3010 ldr.w r3, [r9, #16] 8025084: f10b 0614 add.w r6, fp, #20 8025088: 2400 movs r4, #0 802508a: eb0b 0c87 add.w ip, fp, r7, lsl #2 802508e: eb09 0983 add.w r9, r9, r3, lsl #2 8025092: f10c 0c14 add.w ip, ip, #20 8025096: f109 0914 add.w r9, r9, #20 802509a: f100 0a14 add.w sl, r0, #20 802509e: f8c0 800c str.w r8, [r0, #12] 80250a2: f856 8b04 ldr.w r8, [r6], #4 80250a6: 4653 mov r3, sl 80250a8: f855 ab04 ldr.w sl, [r5], #4 80250ac: 4632 mov r2, r6 80250ae: fa1f f188 uxth.w r1, r8 80250b2: 1909 adds r1, r1, r4 80250b4: fa1f fb8a uxth.w fp, sl 80250b8: ebcb 0101 rsb r1, fp, r1 80250bc: ea4f 441a mov.w r4, sl, lsr #16 80250c0: ebc4 4418 rsb r4, r4, r8, lsr #16 80250c4: eb04 4421 add.w r4, r4, r1, asr #16 80250c8: b289 uxth r1, r1 80250ca: ea41 4104 orr.w r1, r1, r4, lsl #16 80250ce: 1424 asrs r4, r4, #16 80250d0: 45a9 cmp r9, r5 80250d2: f843 1b04 str.w r1, [r3], #4 80250d6: 469a mov sl, r3 80250d8: d8e3 bhi.n 80250a2 <__mdiff+0x5e> 80250da: 45b4 cmp ip, r6 80250dc: 4698 mov r8, r3 80250de: d914 bls.n 802510a <__mdiff+0xc6> 80250e0: f852 5b04 ldr.w r5, [r2], #4 80250e4: b2a9 uxth r1, r5 80250e6: 0c2d lsrs r5, r5, #16 80250e8: 190c adds r4, r1, r4 80250ea: eb05 4524 add.w r5, r5, r4, asr #16 80250ee: b2a4 uxth r4, r4 80250f0: ea44 4105 orr.w r1, r4, r5, lsl #16 80250f4: 142c asrs r4, r5, #16 80250f6: 4594 cmp ip, r2 80250f8: f843 1b04 str.w r1, [r3], #4 80250fc: d8f0 bhi.n 80250e0 <__mdiff+0x9c> 80250fe: 43f3 mvns r3, r6 8025100: 4463 add r3, ip 8025102: f023 0303 bic.w r3, r3, #3 8025106: 3304 adds r3, #4 8025108: 4443 add r3, r8 802510a: 3b04 subs r3, #4 802510c: b921 cbnz r1, 8025118 <__mdiff+0xd4> 802510e: f853 2d04 ldr.w r2, [r3, #-4]! 8025112: 3f01 subs r7, #1 8025114: 2a00 cmp r2, #0 8025116: d0fa beq.n 802510e <__mdiff+0xca> 8025118: 6107 str r7, [r0, #16] 802511a: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802511e: 4620 mov r0, r4 8025120: 4629 mov r1, r5 8025122: f7ff fcef bl 8024b04 <_Balloc> 8025126: 2301 movs r3, #1 8025128: 6145 str r5, [r0, #20] 802512a: 6103 str r3, [r0, #16] 802512c: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08025130 <__ulp>: 8025130: 2300 movs r3, #0 8025132: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8025136: 400b ands r3, r1 8025138: f1a3 7350 sub.w r3, r3, #54525952 ; 0x3400000 802513c: 2b00 cmp r3, #0 802513e: dd02 ble.n 8025146 <__ulp+0x16> 8025140: 4619 mov r1, r3 8025142: 2000 movs r0, #0 8025144: 4770 bx lr 8025146: 425b negs r3, r3 8025148: 2100 movs r1, #0 802514a: 151b asrs r3, r3, #20 802514c: 2b13 cmp r3, #19 802514e: dd0b ble.n 8025168 <__ulp+0x38> 8025150: 2b32 cmp r3, #50 ; 0x32 8025152: dd02 ble.n 802515a <__ulp+0x2a> 8025154: 2301 movs r3, #1 8025156: 4618 mov r0, r3 8025158: 4770 bx lr 802515a: 2201 movs r2, #1 802515c: f1c3 0333 rsb r3, r3, #51 ; 0x33 8025160: fa02 f303 lsl.w r3, r2, r3 8025164: 4618 mov r0, r3 8025166: 4770 bx lr 8025168: f44f 2200 mov.w r2, #524288 ; 0x80000 802516c: 2000 movs r0, #0 802516e: fa42 f103 asr.w r1, r2, r3 8025172: 4770 bx lr 08025174 <__b2d>: 8025174: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8025178: f100 0814 add.w r8, r0, #20 802517c: 6906 ldr r6, [r0, #16] 802517e: 4689 mov r9, r1 8025180: 3604 adds r6, #4 8025182: eb00 0686 add.w r6, r0, r6, lsl #2 8025186: 4634 mov r4, r6 8025188: 4637 mov r7, r6 802518a: f854 5b04 ldr.w r5, [r4], #4 802518e: 4628 mov r0, r5 8025190: f7ff fd9a bl 8024cc8 <__hi0bits> 8025194: 280a cmp r0, #10 8025196: f1c0 0320 rsb r3, r0, #32 802519a: f8c9 3000 str.w r3, [r9] 802519e: dc18 bgt.n 80251d2 <__b2d+0x5e> 80251a0: 45b0 cmp r8, r6 80251a2: f1c0 010b rsb r1, r0, #11 80251a6: fa25 f701 lsr.w r7, r5, r1 80251aa: bf38 it cc 80251ac: f854 4c08 ldrcc.w r4, [r4, #-8] 80251b0: f047 577f orr.w r7, r7, #1069547520 ; 0x3fc00000 80251b4: f447 1340 orr.w r3, r7, #3145728 ; 0x300000 80251b8: bf34 ite cc 80251ba: fa24 f101 lsrcc.w r1, r4, r1 80251be: 2100 movcs r1, #0 80251c0: 3015 adds r0, #21 80251c2: fa05 f500 lsl.w r5, r5, r0 80251c6: ea41 0205 orr.w r2, r1, r5 80251ca: 4610 mov r0, r2 80251cc: 4619 mov r1, r3 80251ce: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80251d2: 2100 movs r1, #0 80251d4: 45b0 cmp r8, r6 80251d6: d202 bcs.n 80251de <__b2d+0x6a> 80251d8: f854 1c08 ldr.w r1, [r4, #-8] 80251dc: 1f37 subs r7, r6, #4 80251de: f1b0 040b subs.w r4, r0, #11 80251e2: d018 beq.n 8025216 <__b2d+0xa2> 80251e4: fa05 f504 lsl.w r5, r5, r4 80251e8: f1c0 002b rsb r0, r0, #43 ; 0x2b 80251ec: 4547 cmp r7, r8 80251ee: f045 557f orr.w r5, r5, #1069547520 ; 0x3fc00000 80251f2: fa21 f600 lsr.w r6, r1, r0 80251f6: f445 1540 orr.w r5, r5, #3145728 ; 0x300000 80251fa: ea45 0306 orr.w r3, r5, r6 80251fe: bf88 it hi 8025200: f857 5c04 ldrhi.w r5, [r7, #-4] 8025204: fa01 f104 lsl.w r1, r1, r4 8025208: bf8c ite hi 802520a: fa25 f000 lsrhi.w r0, r5, r0 802520e: 2000 movls r0, #0 8025210: ea40 0201 orr.w r2, r0, r1 8025214: e7d9 b.n 80251ca <__b2d+0x56> 8025216: f045 557f orr.w r5, r5, #1069547520 ; 0x3fc00000 802521a: 460a mov r2, r1 802521c: f445 1340 orr.w r3, r5, #3145728 ; 0x300000 8025220: e7d3 b.n 80251ca <__b2d+0x56> 8025222: bf00 nop 08025224 <__d2b>: 8025224: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8025228: b083 sub sp, #12 802522a: 2101 movs r1, #1 802522c: 461d mov r5, r3 802522e: 4614 mov r4, r2 8025230: 9f0a ldr r7, [sp, #40] ; 0x28 8025232: f7ff fc67 bl 8024b04 <_Balloc> 8025236: f3c5 560a ubfx r6, r5, #20, #11 802523a: f025 437f bic.w r3, r5, #4278190080 ; 0xff000000 802523e: 46a9 mov r9, r5 8025240: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000 8025244: 4680 mov r8, r0 8025246: b10e cbz r6, 802524c <__d2b+0x28> 8025248: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 802524c: 9301 str r3, [sp, #4] 802524e: 2c00 cmp r4, #0 8025250: d024 beq.n 802529c <__d2b+0x78> 8025252: a802 add r0, sp, #8 8025254: f840 4d08 str.w r4, [r0, #-8]! 8025258: 4668 mov r0, sp 802525a: f7ff fd53 bl 8024d04 <__lo0bits> 802525e: 9b01 ldr r3, [sp, #4] 8025260: 2800 cmp r0, #0 8025262: d131 bne.n 80252c8 <__d2b+0xa4> 8025264: 9a00 ldr r2, [sp, #0] 8025266: f8c8 2014 str.w r2, [r8, #20] 802526a: 2b00 cmp r3, #0 802526c: bf0c ite eq 802526e: 2401 moveq r4, #1 8025270: 2402 movne r4, #2 8025272: f8c8 3018 str.w r3, [r8, #24] 8025276: f8c8 4010 str.w r4, [r8, #16] 802527a: b9e6 cbnz r6, 80252b6 <__d2b+0x92> 802527c: eb08 0384 add.w r3, r8, r4, lsl #2 8025280: f2a0 4032 subw r0, r0, #1074 ; 0x432 8025284: 6038 str r0, [r7, #0] 8025286: 6918 ldr r0, [r3, #16] 8025288: f7ff fd1e bl 8024cc8 <__hi0bits> 802528c: 9b0b ldr r3, [sp, #44] ; 0x2c 802528e: ebc0 1044 rsb r0, r0, r4, lsl #5 8025292: 6018 str r0, [r3, #0] 8025294: 4640 mov r0, r8 8025296: b003 add sp, #12 8025298: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802529c: a801 add r0, sp, #4 802529e: f7ff fd31 bl 8024d04 <__lo0bits> 80252a2: 2301 movs r3, #1 80252a4: 461c mov r4, r3 80252a6: f8c8 3010 str.w r3, [r8, #16] 80252aa: 9b01 ldr r3, [sp, #4] 80252ac: f8c8 3014 str.w r3, [r8, #20] 80252b0: 3020 adds r0, #32 80252b2: 2e00 cmp r6, #0 80252b4: d0e2 beq.n 802527c <__d2b+0x58> 80252b6: 9a0b ldr r2, [sp, #44] ; 0x2c 80252b8: f2a6 4933 subw r9, r6, #1075 ; 0x433 80252bc: f1c0 0335 rsb r3, r0, #53 ; 0x35 80252c0: 4448 add r0, r9 80252c2: 6038 str r0, [r7, #0] 80252c4: 6013 str r3, [r2, #0] 80252c6: e7e5 b.n 8025294 <__d2b+0x70> 80252c8: f1c0 0120 rsb r1, r0, #32 80252cc: 9a00 ldr r2, [sp, #0] 80252ce: fa03 f101 lsl.w r1, r3, r1 80252d2: fa23 f300 lsr.w r3, r3, r0 80252d6: 430a orrs r2, r1 80252d8: 9301 str r3, [sp, #4] 80252da: f8c8 2014 str.w r2, [r8, #20] 80252de: e7c4 b.n 802526a <__d2b+0x46> 080252e0 <__ratio>: 80252e0: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 80252e4: b083 sub sp, #12 80252e6: 4688 mov r8, r1 80252e8: 4669 mov r1, sp 80252ea: 4606 mov r6, r0 80252ec: f7ff ff42 bl 8025174 <__b2d> 80252f0: 460d mov r5, r1 80252f2: 4604 mov r4, r0 80252f4: a901 add r1, sp, #4 80252f6: 4640 mov r0, r8 80252f8: f7ff ff3c bl 8025174 <__b2d> 80252fc: 462f mov r7, r5 80252fe: 460b mov r3, r1 8025300: 4602 mov r2, r0 8025302: f8d8 1010 ldr.w r1, [r8, #16] 8025306: 4699 mov r9, r3 8025308: 6930 ldr r0, [r6, #16] 802530a: 4626 mov r6, r4 802530c: 4690 mov r8, r2 802530e: ebc1 0e00 rsb lr, r1, r0 8025312: e89d 0003 ldmia.w sp, {r0, r1} 8025316: 1a40 subs r0, r0, r1 8025318: eb00 114e add.w r1, r0, lr, lsl #5 802531c: 2900 cmp r1, #0 802531e: bfc9 itett gt 8025320: eb05 5701 addgt.w r7, r5, r1, lsl #20 8025324: eba3 5901 suble.w r9, r3, r1, lsl #20 8025328: 4624 movgt r4, r4 802532a: 463d movgt r5, r7 802532c: bfdc itt le 802532e: 4612 movle r2, r2 8025330: 464b movle r3, r9 8025332: 4620 mov r0, r4 8025334: 4629 mov r1, r5 8025336: f7fb faa9 bl 802088c <__aeabi_ddiv> 802533a: b003 add sp, #12 802533c: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 08025340 <_mprec_log10>: 8025340: 2817 cmp r0, #23 8025342: b510 push {r4, lr} 8025344: 4604 mov r4, r0 8025346: dd0c ble.n 8025362 <_mprec_log10+0x22> 8025348: 2100 movs r1, #0 802534a: 2000 movs r0, #0 802534c: f6c3 71f0 movt r1, #16368 ; 0x3ff0 8025350: 2300 movs r3, #0 8025352: 2200 movs r2, #0 8025354: f2c4 0324 movt r3, #16420 ; 0x4024 8025358: f7fb f96e bl 8020638 <__aeabi_dmul> 802535c: 3c01 subs r4, #1 802535e: d1f7 bne.n 8025350 <_mprec_log10+0x10> 8025360: bd10 pop {r4, pc} 8025362: f648 63d8 movw r3, #36568 ; 0x8ed8 8025366: f6c0 0303 movt r3, #2051 ; 0x803 802536a: eb03 03c0 add.w r3, r3, r0, lsl #3 802536e: e9d3 0104 ldrd r0, r1, [r3, #16] 8025372: bd10 pop {r4, pc} 08025374 <__copybits>: 8025374: b470 push {r4, r5, r6} 8025376: 3901 subs r1, #1 8025378: 6915 ldr r5, [r2, #16] 802537a: f102 0314 add.w r3, r2, #20 802537e: 114e asrs r6, r1, #5 8025380: 3601 adds r6, #1 8025382: eb02 0585 add.w r5, r2, r5, lsl #2 8025386: 3514 adds r5, #20 8025388: eb00 0686 add.w r6, r0, r6, lsl #2 802538c: 42ab cmp r3, r5 802538e: d20c bcs.n 80253aa <__copybits+0x36> 8025390: 4601 mov r1, r0 8025392: f853 4b04 ldr.w r4, [r3], #4 8025396: 429d cmp r5, r3 8025398: f841 4b04 str.w r4, [r1], #4 802539c: d8f9 bhi.n 8025392 <__copybits+0x1e> 802539e: 1aab subs r3, r5, r2 80253a0: 3b15 subs r3, #21 80253a2: f023 0303 bic.w r3, r3, #3 80253a6: 3304 adds r3, #4 80253a8: 18c0 adds r0, r0, r3 80253aa: 4286 cmp r6, r0 80253ac: d904 bls.n 80253b8 <__copybits+0x44> 80253ae: 2300 movs r3, #0 80253b0: f840 3b04 str.w r3, [r0], #4 80253b4: 4286 cmp r6, r0 80253b6: d8fb bhi.n 80253b0 <__copybits+0x3c> 80253b8: bc70 pop {r4, r5, r6} 80253ba: 4770 bx lr 080253bc <__any_on>: 80253bc: b430 push {r4, r5} 80253be: 114b asrs r3, r1, #5 80253c0: 6904 ldr r4, [r0, #16] 80253c2: f100 0214 add.w r2, r0, #20 80253c6: 429c cmp r4, r3 80253c8: bfb8 it lt 80253ca: 4623 movlt r3, r4 80253cc: db00 blt.n 80253d0 <__any_on+0x14> 80253ce: dc11 bgt.n 80253f4 <__any_on+0x38> 80253d0: 3304 adds r3, #4 80253d2: eb00 0083 add.w r0, r0, r3, lsl #2 80253d6: 1d03 adds r3, r0, #4 80253d8: 429a cmp r2, r3 80253da: d218 bcs.n 802540e <__any_on+0x52> 80253dc: f853 3c04 ldr.w r3, [r3, #-4] 80253e0: b92b cbnz r3, 80253ee <__any_on+0x32> 80253e2: 4282 cmp r2, r0 80253e4: d213 bcs.n 802540e <__any_on+0x52> 80253e6: f850 3d04 ldr.w r3, [r0, #-4]! 80253ea: 2b00 cmp r3, #0 80253ec: d0f9 beq.n 80253e2 <__any_on+0x26> 80253ee: 2001 movs r0, #1 80253f0: bc30 pop {r4, r5} 80253f2: 4770 bx lr 80253f4: f011 011f ands.w r1, r1, #31 80253f8: d0ea beq.n 80253d0 <__any_on+0x14> 80253fa: eb00 0483 add.w r4, r0, r3, lsl #2 80253fe: 6964 ldr r4, [r4, #20] 8025400: fa24 f501 lsr.w r5, r4, r1 8025404: fa05 f101 lsl.w r1, r5, r1 8025408: 42a1 cmp r1, r4 802540a: d1f0 bne.n 80253ee <__any_on+0x32> 802540c: e7e0 b.n 80253d0 <__any_on+0x14> 802540e: 2000 movs r0, #0 8025410: e7ee b.n 80253f0 <__any_on+0x34> 8025412: bf00 nop 08025414 <_sbrk_r>: 8025414: b538 push {r3, r4, r5, lr} 8025416: f244 04ac movw r4, #16556 ; 0x40ac 802541a: f2c2 0401 movt r4, #8193 ; 0x2001 802541e: 4605 mov r5, r0 8025420: 4608 mov r0, r1 8025422: 2300 movs r3, #0 8025424: 6023 str r3, [r4, #0] 8025426: f013 fc71 bl 8038d0c <_sbrk> 802542a: 1c43 adds r3, r0, #1 802542c: d000 beq.n 8025430 <_sbrk_r+0x1c> 802542e: bd38 pop {r3, r4, r5, pc} 8025430: 6823 ldr r3, [r4, #0] 8025432: 2b00 cmp r3, #0 8025434: d0fb beq.n 802542e <_sbrk_r+0x1a> 8025436: 602b str r3, [r5, #0] 8025438: bd38 pop {r3, r4, r5, pc} 802543a: bf00 nop 0802543c : 802543c: b2c9 uxtb r1, r1 802543e: b4f0 push {r4, r5, r6, r7} 8025440: 2900 cmp r1, #0 8025442: d04b beq.n 80254dc 8025444: 0783 lsls r3, r0, #30 8025446: d00f beq.n 8025468 8025448: 7803 ldrb r3, [r0, #0] 802544a: 2b00 cmp r3, #0 802544c: d073 beq.n 8025536 802544e: 4299 cmp r1, r3 8025450: d042 beq.n 80254d8 8025452: 1c43 adds r3, r0, #1 8025454: e005 b.n 8025462 8025456: f813 2b01 ldrb.w r2, [r3], #1 802545a: 2a00 cmp r2, #0 802545c: d03b beq.n 80254d6 802545e: 4291 cmp r1, r2 8025460: d03a beq.n 80254d8 8025462: 079a lsls r2, r3, #30 8025464: 4618 mov r0, r3 8025466: d1f6 bne.n 8025456 8025468: 6803 ldr r3, [r0, #0] 802546a: ea41 2701 orr.w r7, r1, r1, lsl #8 802546e: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8025472: ea47 4707 orr.w r7, r7, r7, lsl #16 8025476: ea22 0203 bic.w r2, r2, r3 802547a: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 802547e: d11c bne.n 80254ba 8025480: 407b eors r3, r7 8025482: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8025486: ea22 0303 bic.w r3, r2, r3 802548a: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802548e: d114 bne.n 80254ba 8025490: 1d02 adds r2, r0, #4 8025492: e002 b.n 802549a 8025494: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8025498: d10f bne.n 80254ba 802549a: 4610 mov r0, r2 802549c: f852 3b04 ldr.w r3, [r2], #4 80254a0: f1a3 3601 sub.w r6, r3, #16843009 ; 0x1010101 80254a4: ea87 0403 eor.w r4, r7, r3 80254a8: ea26 0303 bic.w r3, r6, r3 80254ac: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 80254b0: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 80254b4: ea25 0404 bic.w r4, r5, r4 80254b8: d0ec beq.n 8025494 80254ba: 7803 ldrb r3, [r0, #0] 80254bc: 2b00 cmp r3, #0 80254be: d03a beq.n 8025536 80254c0: 4299 cmp r1, r3 80254c2: d009 beq.n 80254d8 80254c4: 1c43 adds r3, r0, #1 80254c6: e001 b.n 80254cc 80254c8: 4291 cmp r1, r2 80254ca: d005 beq.n 80254d8 80254cc: 4618 mov r0, r3 80254ce: f813 2b01 ldrb.w r2, [r3], #1 80254d2: 2a00 cmp r2, #0 80254d4: d1f8 bne.n 80254c8 80254d6: 4610 mov r0, r2 80254d8: bcf0 pop {r4, r5, r6, r7} 80254da: 4770 bx lr 80254dc: 0781 lsls r1, r0, #30 80254de: d00d beq.n 80254fc 80254e0: 7803 ldrb r3, [r0, #0] 80254e2: 2b00 cmp r3, #0 80254e4: d0f8 beq.n 80254d8 80254e6: 1c43 adds r3, r0, #1 80254e8: e002 b.n 80254f0 80254ea: 7802 ldrb r2, [r0, #0] 80254ec: 2a00 cmp r2, #0 80254ee: d0f3 beq.n 80254d8 80254f0: f013 0f03 tst.w r3, #3 80254f4: 4618 mov r0, r3 80254f6: f103 0301 add.w r3, r3, #1 80254fa: d1f6 bne.n 80254ea 80254fc: 6803 ldr r3, [r0, #0] 80254fe: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8025502: ea22 0303 bic.w r3, r2, r3 8025506: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802550a: d10a bne.n 8025522 802550c: 1d02 adds r2, r0, #4 802550e: 4610 mov r0, r2 8025510: f852 1b04 ldr.w r1, [r2], #4 8025514: f1a1 3401 sub.w r4, r1, #16843009 ; 0x1010101 8025518: ea24 0101 bic.w r1, r4, r1 802551c: f011 3f80 tst.w r1, #2155905152 ; 0x80808080 8025520: d0f5 beq.n 802550e 8025522: 7803 ldrb r3, [r0, #0] 8025524: 2b00 cmp r3, #0 8025526: d0d7 beq.n 80254d8 8025528: 1c43 adds r3, r0, #1 802552a: 4618 mov r0, r3 802552c: 3301 adds r3, #1 802552e: 7802 ldrb r2, [r0, #0] 8025530: 2a00 cmp r2, #0 8025532: d1fa bne.n 802552a 8025534: e7d0 b.n 80254d8 8025536: 4618 mov r0, r3 8025538: e7ce b.n 80254d8 802553a: bf00 nop 0802553c <_calloc_r>: 802553c: b510 push {r4, lr} 802553e: fb01 f102 mul.w r1, r1, r2 8025542: f7fe ffc5 bl 80244d0 <_malloc_r> 8025546: 4604 mov r4, r0 8025548: b170 cbz r0, 8025568 <_calloc_r+0x2c> 802554a: f850 2c04 ldr.w r2, [r0, #-4] 802554e: f022 0203 bic.w r2, r2, #3 8025552: 3a04 subs r2, #4 8025554: 2a24 cmp r2, #36 ; 0x24 8025556: d81c bhi.n 8025592 <_calloc_r+0x56> 8025558: 2a13 cmp r2, #19 802555a: bf98 it ls 802555c: 4603 movls r3, r0 802555e: d805 bhi.n 802556c <_calloc_r+0x30> 8025560: 2200 movs r2, #0 8025562: 601a str r2, [r3, #0] 8025564: 605a str r2, [r3, #4] 8025566: 609a str r2, [r3, #8] 8025568: 4620 mov r0, r4 802556a: bd10 pop {r4, pc} 802556c: 2100 movs r1, #0 802556e: 2a1b cmp r2, #27 8025570: 6001 str r1, [r0, #0] 8025572: bf98 it ls 8025574: f100 0308 addls.w r3, r0, #8 8025578: 6041 str r1, [r0, #4] 802557a: d9f1 bls.n 8025560 <_calloc_r+0x24> 802557c: 2a24 cmp r2, #36 ; 0x24 802557e: 6081 str r1, [r0, #8] 8025580: 60c1 str r1, [r0, #12] 8025582: bf11 iteee ne 8025584: f100 0310 addne.w r3, r0, #16 8025588: 6101 streq r1, [r0, #16] 802558a: f100 0318 addeq.w r3, r0, #24 802558e: 6141 streq r1, [r0, #20] 8025590: e7e6 b.n 8025560 <_calloc_r+0x24> 8025592: 2100 movs r1, #0 8025594: f7fc fc40 bl 8021e18 8025598: 4620 mov r0, r4 802559a: bd10 pop {r4, pc} 0802559c : 802559c: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 80255a0: 4770 bx lr 80255a2: bf00 nop 080255a4 : { /* Check the parameters */ assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup)); /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */ SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup; 80255a4: f040 60bf orr.w r0, r0, #100139008 ; 0x5f80000 80255a8: 4b02 ldr r3, [pc, #8] ; (80255b4 ) 80255aa: f440 3000 orr.w r0, r0, #131072 ; 0x20000 80255ae: 60d8 str r0, [r3, #12] 80255b0: 4770 bx lr 80255b2: bf00 nop 80255b4: e000ed00 .word 0xe000ed00 080255b8 : /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority)); assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority)); if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) 80255b8: 78c3 ldrb r3, [r0, #3] 80255ba: b30b cbz r3, 8025600 { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 80255bc: 4b16 ldr r3, [pc, #88] ; (8025618 ) tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80255be: 7841 ldrb r1, [r0, #1] assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority)); if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 80255c0: 68db ldr r3, [r3, #12] 80255c2: 43db mvns r3, r3 80255c4: f3c3 2302 ubfx r3, r3, #8, #3 tmppre = (0x4 - tmppriority); 80255c8: f1c3 0204 rsb r2, r3, #4 tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80255cc: b2d2 uxtb r2, r2 80255ce: fa01 f202 lsl.w r2, r1, r2 if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; 80255d2: 210f movs r1, #15 80255d4: fa41 f303 asr.w r3, r1, r3 tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 80255d8: 7881 ldrb r1, [r0, #2] /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80255da: b2d2 uxtb r2, r2 tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 80255dc: 400b ands r3, r1 80255de: 431a orrs r2, r3 tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 80255e0: 7803 ldrb r3, [r0, #0] 80255e2: f103 4360 add.w r3, r3, #3758096384 ; 0xe0000000 80255e6: f503 4361 add.w r3, r3, #57600 ; 0xe100 tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); tmppriority = tmppriority << 0x04; 80255ea: 0112 lsls r2, r2, #4 NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 80255ec: f883 2300 strb.w r2, [r3, #768] ; 0x300 /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80255f0: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80255f2: 2201 movs r2, #1 tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80255f4: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80255f6: f003 031f and.w r3, r3, #31 80255fa: fa02 f303 lsl.w r3, r2, r3 80255fe: e007 b.n 8025610 } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 8025600: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 8025602: 2201 movs r2, #1 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 8025604: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 8025606: f003 031f and.w r3, r3, #31 802560a: fa02 f303 lsl.w r3, r2, r3 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 802560e: 3120 adds r1, #32 8025610: 4a02 ldr r2, [pc, #8] ; (802561c ) 8025612: f842 3021 str.w r3, [r2, r1, lsl #2] 8025616: 4770 bx lr 8025618: e000ed00 .word 0xe000ed00 802561c: e000e100 .word 0xe000e100 08025620 : { /* Check the parameters */ assert_param(IS_NVIC_VECTTAB(NVIC_VectTab)); assert_param(IS_NVIC_OFFSET(Offset)); SCB->VTOR = NVIC_VectTab | (Offset & (uint32_t)0x1FFFFF80); 8025620: f021 4160 bic.w r1, r1, #3758096384 ; 0xe0000000 8025624: f021 017f bic.w r1, r1, #127 ; 0x7f 8025628: 4b01 ldr r3, [pc, #4] ; (8025630 ) 802562a: 4308 orrs r0, r1 802562c: 6098 str r0, [r3, #8] 802562e: 4770 bx lr 8025630: e000ed00 .word 0xe000ed00 08025634 : * @retval None */ void CRC_ResetDR(void) { /* Reset CRC generator */ CRC->CR = CRC_CR_RESET; 8025634: 4b01 ldr r3, [pc, #4] ; (802563c ) 8025636: 2201 movs r2, #1 8025638: 609a str r2, [r3, #8] 802563a: 4770 bx lr 802563c: 40023000 .word 0x40023000 08025640 : * @param pBuffer: pointer to the buffer containing the data to be computed * @param BufferLength: length of the buffer to be computed * @retval 32-bit CRC */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { 8025640: b510 push {r4, lr} uint32_t index = 0; for(index = 0; index < BufferLength; index++) 8025642: 2300 movs r3, #0 8025644: 4c05 ldr r4, [pc, #20] ; (802565c ) 8025646: e003 b.n 8025650 { CRC->DR = pBuffer[index]; 8025648: f850 2023 ldr.w r2, [r0, r3, lsl #2] */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { uint32_t index = 0; for(index = 0; index < BufferLength; index++) 802564c: 3301 adds r3, #1 { CRC->DR = pBuffer[index]; 802564e: 6022 str r2, [r4, #0] */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { uint32_t index = 0; for(index = 0; index < BufferLength; index++) 8025650: 428b cmp r3, r1 8025652: d1f9 bne.n 8025648 { CRC->DR = pBuffer[index]; } return (CRC->DR); 8025654: 4b01 ldr r3, [pc, #4] ; (802565c ) 8025656: 6818 ldr r0, [r3, #0] } 8025658: bd10 pop {r4, pc} 802565a: bf00 nop 802565c: 40023000 .word 0x40023000 08025660 : * @param None * @retval None */ void FLASH_Unlock(void) { if((FLASH->CR & FLASH_CR_LOCK) != RESET) 8025660: 4b04 ldr r3, [pc, #16] ; (8025674 ) 8025662: 691a ldr r2, [r3, #16] 8025664: 2a00 cmp r2, #0 8025666: da04 bge.n 8025672 { /* Authorize the FLASH Registers access */ FLASH->KEYR = FLASH_KEY1; 8025668: 4a03 ldr r2, [pc, #12] ; (8025678 ) 802566a: 605a str r2, [r3, #4] FLASH->KEYR = FLASH_KEY2; 802566c: f102 3288 add.w r2, r2, #2290649224 ; 0x88888888 8025670: 605a str r2, [r3, #4] 8025672: 4770 bx lr 8025674: 40023c00 .word 0x40023c00 8025678: 45670123 .word 0x45670123 0802567c : * @retval None */ void FLASH_Lock(void) { /* Set the LOCK Bit to lock the FLASH Registers access */ FLASH->CR |= FLASH_CR_LOCK; 802567c: 4b02 ldr r3, [pc, #8] ; (8025688 ) 802567e: 691a ldr r2, [r3, #16] 8025680: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 8025684: 611a str r2, [r3, #16] 8025686: 4770 bx lr 8025688: 40023c00 .word 0x40023c00 0802568c : { /* Check the parameters */ assert_param(IS_FLASH_CLEAR_FLAG(FLASH_FLAG)); /* Clear the flags */ FLASH->SR = FLASH_FLAG; 802568c: 4b01 ldr r3, [pc, #4] ; (8025694 ) 802568e: 60d8 str r0, [r3, #12] 8025690: 4770 bx lr 8025692: bf00 nop 8025694: 40023c00 .word 0x40023c00 08025698 : */ FLASH_Status FLASH_GetStatus(void) { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) 8025698: 4b0b ldr r3, [pc, #44] ; (80256c8 ) 802569a: 68da ldr r2, [r3, #12] 802569c: 03d0 lsls r0, r2, #15 802569e: d40d bmi.n 80256bc { flashstatus = FLASH_BUSY; } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) 80256a0: 68da ldr r2, [r3, #12] 80256a2: 06d1 lsls r1, r2, #27 80256a4: d40c bmi.n 80256c0 { flashstatus = FLASH_ERROR_WRP; } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) 80256a6: 68da ldr r2, [r3, #12] 80256a8: f012 0fef tst.w r2, #239 ; 0xef 80256ac: d10a bne.n 80256c4 { flashstatus = FLASH_ERROR_PROGRAM; } else { if((FLASH->SR & FLASH_FLAG_OPERR) != (uint32_t)0x00) 80256ae: 68db ldr r3, [r3, #12] 80256b0: f013 0f02 tst.w r3, #2 { flashstatus = FLASH_ERROR_OPERATION; 80256b4: bf0c ite eq 80256b6: 2008 moveq r0, #8 80256b8: 2007 movne r0, #7 80256ba: 4770 bx lr { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) { flashstatus = FLASH_BUSY; 80256bc: 2001 movs r0, #1 80256be: 4770 bx lr } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_WRP; 80256c0: 2005 movs r0, #5 80256c2: 4770 bx lr } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_PROGRAM; 80256c4: 2006 movs r0, #6 } } } /* Return the FLASH Status */ return flashstatus; } 80256c6: 4770 bx lr 80256c8: 40023c00 .word 0x40023c00 080256cc : * @param None * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_WaitForLastOperation(void) { 80256cc: b507 push {r0, r1, r2, lr} __IO FLASH_Status status = FLASH_COMPLETE; 80256ce: 2308 movs r3, #8 80256d0: f88d 3007 strb.w r3, [sp, #7] /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. Even if the FLASH operation fails, the BUSY flag will be reset and an error flag will be set */ while(status == FLASH_BUSY) { status = FLASH_GetStatus(); 80256d4: f7ff ffe0 bl 8025698 80256d8: f88d 0007 strb.w r0, [sp, #7] status = FLASH_GetStatus(); /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. Even if the FLASH operation fails, the BUSY flag will be reset and an error flag will be set */ while(status == FLASH_BUSY) 80256dc: f89d 3007 ldrb.w r3, [sp, #7] 80256e0: 2b01 cmp r3, #1 80256e2: d0f7 beq.n 80256d4 { status = FLASH_GetStatus(); } /* Return the operation status */ return status; 80256e4: f89d 0007 ldrb.w r0, [sp, #7] } 80256e8: bd0e pop {r1, r2, r3, pc} 80256ea: 0000 movs r0, r0 080256ec : * @param Data: specifies the data to be programmed. * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_ProgramByte(uint32_t Address, uint8_t Data) { 80256ec: b570 push {r4, r5, r6, lr} 80256ee: 4605 mov r5, r0 80256f0: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80256f2: f7ff ffeb bl 80256cc if(status == FLASH_COMPLETE) 80256f6: 2808 cmp r0, #8 80256f8: d111 bne.n 802571e { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 80256fa: 4c09 ldr r4, [pc, #36] ; (8025720 ) 80256fc: 6923 ldr r3, [r4, #16] 80256fe: f423 7340 bic.w r3, r3, #768 ; 0x300 8025702: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_BYTE; 8025704: 6923 ldr r3, [r4, #16] 8025706: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 8025708: 6923 ldr r3, [r4, #16] 802570a: f043 0301 orr.w r3, r3, #1 802570e: 6123 str r3, [r4, #16] *(__IO uint8_t*)Address = Data; 8025710: 702e strb r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025712: f7ff ffdb bl 80256cc /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 8025716: 6923 ldr r3, [r4, #16] 8025718: f023 0301 bic.w r3, r3, #1 802571c: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 802571e: bd70 pop {r4, r5, r6, pc} 8025720: 40023c00 .word 0x40023c00 08025724 : * @param Data: specifies the data to be programmed. * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data) { 8025724: b570 push {r4, r5, r6, lr} 8025726: 4605 mov r5, r0 8025728: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802572a: f7ff ffcf bl 80256cc if(status == FLASH_COMPLETE) 802572e: 2808 cmp r0, #8 8025730: d113 bne.n 802575a { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 8025732: 4c0a ldr r4, [pc, #40] ; (802575c ) 8025734: 6923 ldr r3, [r4, #16] 8025736: f423 7340 bic.w r3, r3, #768 ; 0x300 802573a: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_WORD; 802573c: 6923 ldr r3, [r4, #16] 802573e: f443 7300 orr.w r3, r3, #512 ; 0x200 8025742: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 8025744: 6923 ldr r3, [r4, #16] 8025746: f043 0301 orr.w r3, r3, #1 802574a: 6123 str r3, [r4, #16] *(__IO uint32_t*)Address = Data; 802574c: 602e str r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802574e: f7ff ffbd bl 80256cc /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 8025752: 6923 ldr r3, [r4, #16] 8025754: f023 0301 bic.w r3, r3, #1 8025758: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 802575a: bd70 pop {r4, r5, r6, pc} 802575c: 40023c00 .word 0x40023c00 08025760 : * * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_EraseSector(uint32_t FLASH_Sector, uint8_t VoltageRange) { 8025760: b570 push {r4, r5, r6, lr} 8025762: 4606 mov r6, r0 /* Check the parameters */ assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) 8025764: b141 cbz r1, 8025778 { tmp_psize = FLASH_PSIZE_BYTE; } else if(VoltageRange == VoltageRange_2) 8025766: 2901 cmp r1, #1 8025768: d008 beq.n 802577c { tmp_psize = FLASH_PSIZE_HALF_WORD; } else if(VoltageRange == VoltageRange_3) { tmp_psize = FLASH_PSIZE_WORD; 802576a: 2902 cmp r1, #2 802576c: bf14 ite ne 802576e: f44f 7540 movne.w r5, #768 ; 0x300 8025772: f44f 7500 moveq.w r5, #512 ; 0x200 8025776: e003 b.n 8025780 assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) { tmp_psize = FLASH_PSIZE_BYTE; 8025778: 460d mov r5, r1 802577a: e001 b.n 8025780 } else if(VoltageRange == VoltageRange_2) { tmp_psize = FLASH_PSIZE_HALF_WORD; 802577c: f44f 7580 mov.w r5, #256 ; 0x100 else { tmp_psize = FLASH_PSIZE_DOUBLE_WORD; } /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025780: f7ff ffa4 bl 80256cc if(status == FLASH_COMPLETE) 8025784: 2808 cmp r0, #8 8025786: d11e bne.n 80257c6 { /* if the previous operation is completed, proceed to erase the sector */ FLASH->CR &= CR_PSIZE_MASK; 8025788: 4c0f ldr r4, [pc, #60] ; (80257c8 ) 802578a: 6923 ldr r3, [r4, #16] 802578c: f423 7340 bic.w r3, r3, #768 ; 0x300 8025790: 6123 str r3, [r4, #16] FLASH->CR |= tmp_psize; 8025792: 6921 ldr r1, [r4, #16] 8025794: 430d orrs r5, r1 8025796: 6125 str r5, [r4, #16] FLASH->CR &= SECTOR_MASK; 8025798: 6923 ldr r3, [r4, #16] 802579a: f023 03f8 bic.w r3, r3, #248 ; 0xf8 802579e: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_SER | FLASH_Sector; 80257a0: 6923 ldr r3, [r4, #16] 80257a2: f043 0302 orr.w r3, r3, #2 80257a6: 431e orrs r6, r3 80257a8: 6126 str r6, [r4, #16] FLASH->CR |= FLASH_CR_STRT; 80257aa: 6923 ldr r3, [r4, #16] 80257ac: f443 3380 orr.w r3, r3, #65536 ; 0x10000 80257b0: 6123 str r3, [r4, #16] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80257b2: f7ff ff8b bl 80256cc /* if the erase operation is completed, disable the SER Bit */ FLASH->CR &= (~FLASH_CR_SER); 80257b6: 6923 ldr r3, [r4, #16] 80257b8: f023 0302 bic.w r3, r3, #2 80257bc: 6123 str r3, [r4, #16] FLASH->CR &= SECTOR_MASK; 80257be: 6923 ldr r3, [r4, #16] 80257c0: f023 03f8 bic.w r3, r3, #248 ; 0xf8 80257c4: 6123 str r3, [r4, #16] } /* Return the Erase Status */ return status; } 80257c6: bd70 pop {r4, r5, r6, pc} 80257c8: 40023c00 .word 0x40023c00 080257cc : * @note By default, The GPIO pins are configured in input floating mode (except JTAG pins). * @param GPIOx: where x can be (A..I) to select the GPIO peripheral. * @retval None */ void GPIO_DeInit(GPIO_TypeDef* GPIOx) { 80257cc: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); if (GPIOx == GPIOA) 80257ce: 4b2c ldr r3, [pc, #176] ; (8025880 ) 80257d0: 4298 cmp r0, r3 80257d2: d105 bne.n 80257e0 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, ENABLE); 80257d4: 2001 movs r0, #1 80257d6: 4601 mov r1, r0 80257d8: f000 f974 bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, DISABLE); 80257dc: 2001 movs r0, #1 80257de: e048 b.n 8025872 } else if (GPIOx == GPIOB) 80257e0: 4b28 ldr r3, [pc, #160] ; (8025884 ) 80257e2: 4298 cmp r0, r3 80257e4: d105 bne.n 80257f2 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, ENABLE); 80257e6: 2002 movs r0, #2 80257e8: 2101 movs r1, #1 80257ea: f000 f96b bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, DISABLE); 80257ee: 2002 movs r0, #2 80257f0: e03f b.n 8025872 } else if (GPIOx == GPIOC) 80257f2: 4b25 ldr r3, [pc, #148] ; (8025888 ) 80257f4: 4298 cmp r0, r3 80257f6: d105 bne.n 8025804 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, ENABLE); 80257f8: 2004 movs r0, #4 80257fa: 2101 movs r1, #1 80257fc: f000 f962 bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, DISABLE); 8025800: 2004 movs r0, #4 8025802: e036 b.n 8025872 } else if (GPIOx == GPIOD) 8025804: 4b21 ldr r3, [pc, #132] ; (802588c ) 8025806: 4298 cmp r0, r3 8025808: d105 bne.n 8025816 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, ENABLE); 802580a: 2008 movs r0, #8 802580c: 2101 movs r1, #1 802580e: f000 f959 bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, DISABLE); 8025812: 2008 movs r0, #8 8025814: e02d b.n 8025872 } else if (GPIOx == GPIOE) 8025816: 4b1e ldr r3, [pc, #120] ; (8025890 ) 8025818: 4298 cmp r0, r3 802581a: d105 bne.n 8025828 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, ENABLE); 802581c: 2010 movs r0, #16 802581e: 2101 movs r1, #1 8025820: f000 f950 bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, DISABLE); 8025824: 2010 movs r0, #16 8025826: e024 b.n 8025872 } else if (GPIOx == GPIOF) 8025828: 4b1a ldr r3, [pc, #104] ; (8025894 ) 802582a: 4298 cmp r0, r3 802582c: d105 bne.n 802583a { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, ENABLE); 802582e: 2020 movs r0, #32 8025830: 2101 movs r1, #1 8025832: f000 f947 bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, DISABLE); 8025836: 2020 movs r0, #32 8025838: e01b b.n 8025872 } else if (GPIOx == GPIOG) 802583a: 4b17 ldr r3, [pc, #92] ; (8025898 ) 802583c: 4298 cmp r0, r3 802583e: d105 bne.n 802584c { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, ENABLE); 8025840: 2040 movs r0, #64 ; 0x40 8025842: 2101 movs r1, #1 8025844: f000 f93e bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, DISABLE); 8025848: 2040 movs r0, #64 ; 0x40 802584a: e012 b.n 8025872 } else if (GPIOx == GPIOH) 802584c: 4b13 ldr r3, [pc, #76] ; (802589c ) 802584e: 4298 cmp r0, r3 8025850: d105 bne.n 802585e { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, ENABLE); 8025852: 2080 movs r0, #128 ; 0x80 8025854: 2101 movs r1, #1 8025856: f000 f935 bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, DISABLE); 802585a: 2080 movs r0, #128 ; 0x80 802585c: e009 b.n 8025872 } else { if (GPIOx == GPIOI) 802585e: 4b10 ldr r3, [pc, #64] ; (80258a0 ) 8025860: 4298 cmp r0, r3 8025862: d10b bne.n 802587c { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); 8025864: f44f 7080 mov.w r0, #256 ; 0x100 8025868: 2101 movs r1, #1 802586a: f000 f92b bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 802586e: f44f 7080 mov.w r0, #256 ; 0x100 8025872: 2100 movs r1, #0 } } } 8025874: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (GPIOx == GPIOI) { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 8025878: f000 b924 b.w 8025ac4 802587c: bd08 pop {r3, pc} 802587e: bf00 nop 8025880: 40020000 .word 0x40020000 8025884: 40020400 .word 0x40020400 8025888: 40020800 .word 0x40020800 802588c: 40020c00 .word 0x40020c00 8025890: 40021000 .word 0x40021000 8025894: 40021400 .word 0x40021400 8025898: 40021800 .word 0x40021800 802589c: 40021c00 .word 0x40021c00 80258a0: 40022000 .word 0x40022000 080258a4 : * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) { 80258a4: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) { pos = ((uint32_t)0x01) << pinpos; /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; 80258a8: 680f ldr r7, [r1, #0] assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode)); assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd)); /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) 80258aa: 2300 movs r3, #0 { pos = ((uint32_t)0x01) << pinpos; 80258ac: f04f 0c01 mov.w ip, #1 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); 80258b0: f04f 0803 mov.w r8, #3 /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) { pos = ((uint32_t)0x01) << pinpos; 80258b4: fa0c f203 lsl.w r2, ip, r3 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; 80258b8: ea02 0507 and.w r5, r2, r7 if (currentpin == pos) 80258bc: 4295 cmp r5, r2 80258be: d131 bne.n 8025924 * @param GPIOx: where x can be (A..I) to select the GPIO peripheral. * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) 80258c0: 005a lsls r2, r3, #1 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); 80258c2: 6806 ldr r6, [r0, #0] 80258c4: fa08 f402 lsl.w r4, r8, r2 80258c8: 43e4 mvns r4, r4 80258ca: 4026 ands r6, r4 80258cc: 6006 str r6, [r0, #0] GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80258ce: 790e ldrb r6, [r1, #4] 80258d0: f8d0 9000 ldr.w r9, [r0] 80258d4: fa06 fa02 lsl.w sl, r6, r2 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80258d8: 3e01 subs r6, #1 currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80258da: ea4a 0909 orr.w r9, sl, r9 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80258de: 2e01 cmp r6, #1 currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80258e0: f8c0 9000 str.w r9, [r0] if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80258e4: d815 bhi.n 8025912 { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); 80258e6: 6886 ldr r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 80258e8: f891 9005 ldrb.w r9, [r1, #5] { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); 80258ec: 4026 ands r6, r4 80258ee: 6086 str r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 80258f0: 6886 ldr r6, [r0, #8] 80258f2: fa09 f902 lsl.w r9, r9, r2 80258f6: ea49 0606 orr.w r6, r9, r6 80258fa: 6086 str r6, [r0, #8] /* Check Output mode parameters */ assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType)); /* Output mode configuration*/ GPIOx->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos)) ; 80258fc: 6846 ldr r6, [r0, #4] 80258fe: ea26 0505 bic.w r5, r6, r5 8025902: 6045 str r5, [r0, #4] GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); 8025904: 798d ldrb r5, [r1, #6] 8025906: 6846 ldr r6, [r0, #4] 8025908: fa05 f503 lsl.w r5, r5, r3 temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; } 802590c: b2ad uxth r5, r5 /* Check Output mode parameters */ assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType)); /* Output mode configuration*/ GPIOx->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos)) ; GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); 802590e: 4335 orrs r5, r6 8025910: 6045 str r5, [r0, #4] } /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); 8025912: 68c5 ldr r5, [r0, #12] 8025914: 402c ands r4, r5 8025916: 60c4 str r4, [r0, #12] GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); 8025918: 79cd ldrb r5, [r1, #7] 802591a: 68c4 ldr r4, [r0, #12] 802591c: fa05 f202 lsl.w r2, r5, r2 8025920: 4322 orrs r2, r4 8025922: 60c2 str r2, [r0, #12] assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode)); assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd)); /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) 8025924: 3301 adds r3, #1 8025926: 2b10 cmp r3, #16 8025928: d1c4 bne.n 80258b4 /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); } } } 802592a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802592e : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRL = GPIO_Pin; 802592e: 8301 strh r1, [r0, #24] 8025930: 4770 bx lr 08025932 : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRH = GPIO_Pin; 8025932: 8341 strh r1, [r0, #26] 8025934: 4770 bx lr 08025936 : /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8025936: f001 0307 and.w r3, r1, #7 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 802593a: 08c9 lsrs r1, r1, #3 802593c: 3108 adds r1, #8 * @arg GPIO_AF_DCMI: Connect DCMI pins to AF13 * @arg GPIO_AF_EVENTOUT: Connect EVENTOUT pins to AF15 * @retval None */ void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF) { 802593e: b530 push {r4, r5, lr} /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8025940: 009b lsls r3, r3, #2 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8025942: f850 5021 ldr.w r5, [r0, r1, lsl #2] 8025946: 240f movs r4, #15 8025948: fa04 f403 lsl.w r4, r4, r3 802594c: ea25 0404 bic.w r4, r5, r4 8025950: f840 4021 str.w r4, [r0, r1, lsl #2] temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; 8025954: f850 4021 ldr.w r4, [r0, r1, lsl #2] /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8025958: fa02 f203 lsl.w r2, r2, r3 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; 802595c: 4314 orrs r4, r2 GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; 802595e: f840 4021 str.w r4, [r0, r1, lsl #2] 8025962: bd30 pop {r4, r5, pc} 08025964 : void PWR_BackupAccessCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CR_DBP_BB = (uint32_t)NewState; 8025964: 4b01 ldr r3, [pc, #4] ; (802596c ) 8025966: 6018 str r0, [r3, #0] 8025968: 4770 bx lr 802596a: bf00 nop 802596c: 420e0020 .word 0x420e0020 08025970 : /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_LSE)); /* Reset LSEON and LSEBYP bits before configuring the LSE ------------------*/ /* Reset LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8025970: 4b06 ldr r3, [pc, #24] ; (802598c ) 8025972: 2200 movs r2, #0 /* Reset LSEBYP bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */ switch (RCC_LSE) 8025974: 2801 cmp r0, #1 /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_LSE)); /* Reset LSEON and LSEBYP bits before configuring the LSE ------------------*/ /* Reset LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8025976: 701a strb r2, [r3, #0] /* Reset LSEBYP bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8025978: 701a strb r2, [r3, #0] /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */ switch (RCC_LSE) 802597a: d002 beq.n 8025982 802597c: 2804 cmp r0, #4 802597e: d104 bne.n 802598a 8025980: e001 b.n 8025986 { case RCC_LSE_ON: /* Set LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_ON; 8025982: 7018 strb r0, [r3, #0] break; 8025984: 4770 bx lr case RCC_LSE_Bypass: /* Set LSEBYP and LSEON bits */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_Bypass | RCC_LSE_ON; 8025986: 2205 movs r2, #5 8025988: 701a strb r2, [r3, #0] 802598a: 4770 bx lr 802598c: 40023870 .word 0x40023870 08025990 : void RCC_LSICmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CSR_LSION_BB = (uint32_t)NewState; 8025990: 4b01 ldr r3, [pc, #4] ; (8025998 ) 8025992: 6018 str r0, [r3, #0] 8025994: 4770 bx lr 8025996: bf00 nop 8025998: 42470e80 .word 0x42470e80 0802599c : void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { uint32_t tmp = 0, presc = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; 802599c: 4b1e ldr r3, [pc, #120] ; (8025a18 ) 802599e: 689a ldr r2, [r3, #8] 80259a0: f002 020c and.w r2, r2, #12 switch (tmp) 80259a4: 2a04 cmp r2, #4 * configuration based on this function will be incorrect. * * @retval None */ void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { 80259a6: b510 push {r4, lr} uint32_t tmp = 0, presc = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; switch (tmp) 80259a8: d003 beq.n 80259b2 80259aa: 2a08 cmp r2, #8 80259ac: d003 beq.n 80259b6 80259ae: 4b1b ldr r3, [pc, #108] ; (8025a1c ) 80259b0: e018 b.n 80259e4 { case 0x00: /* HSI used as system clock source */ RCC_Clocks->SYSCLK_Frequency = HSI_VALUE; break; case 0x04: /* HSE used as system clock source */ RCC_Clocks->SYSCLK_Frequency = HSE_VALUE; 80259b2: 4b1b ldr r3, [pc, #108] ; (8025a20 ) 80259b4: e016 b.n 80259e4 case 0x08: /* PLL used as system clock source */ /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN SYSCLK = PLL_VCO / PLLP */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; 80259b6: 6859 ldr r1, [r3, #4] pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; 80259b8: 685a ldr r2, [r3, #4] if (pllsource != 0) 80259ba: f411 0f80 tst.w r1, #4194304 ; 0x400000 { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80259be: 6859 ldr r1, [r3, #4] 80259c0: bf14 ite ne 80259c2: 4b17 ldrne r3, [pc, #92] ; (8025a20 ) } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80259c4: 4b15 ldreq r3, [pc, #84] ; (8025a1c ) /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN SYSCLK = PLL_VCO / PLLP */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; 80259c6: f002 023f and.w r2, r2, #63 ; 0x3f pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80259ca: fbb3 f3f2 udiv r3, r3, r2 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80259ce: 4a12 ldr r2, [pc, #72] ; (8025a18 ) 80259d0: 6852 ldr r2, [r2, #4] 80259d2: f3c2 4201 ubfx r2, r2, #16, #2 pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; if (pllsource != 0) { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80259d6: f3c1 1188 ubfx r1, r1, #6, #9 { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80259da: 3201 adds r2, #1 pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80259dc: 434b muls r3, r1 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80259de: 0052 lsls r2, r2, #1 RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; 80259e0: fbb3 f3f2 udiv r3, r3, r2 break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 80259e4: 490c ldr r1, [pc, #48] ; (8025a18 ) /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; 80259e6: 6003 str r3, [r0, #0] break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 80259e8: 688b ldr r3, [r1, #8] tmp = tmp >> 4; presc = APBAHBPrescTable[tmp]; 80259ea: 4a0e ldr r2, [pc, #56] ; (8025a24 ) } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; tmp = tmp >> 4; 80259ec: f3c3 1303 ubfx r3, r3, #4, #4 presc = APBAHBPrescTable[tmp]; 80259f0: 5cd4 ldrb r4, [r2, r3] /* HCLK clock frequency */ RCC_Clocks->HCLK_Frequency = RCC_Clocks->SYSCLK_Frequency >> presc; 80259f2: 6803 ldr r3, [r0, #0] 80259f4: fa23 f304 lsr.w r3, r3, r4 80259f8: 6043 str r3, [r0, #4] /* Get PCLK1 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE1; 80259fa: 688c ldr r4, [r1, #8] tmp = tmp >> 10; 80259fc: f3c4 2482 ubfx r4, r4, #10, #3 presc = APBAHBPrescTable[tmp]; 8025a00: 5d14 ldrb r4, [r2, r4] /* PCLK1 clock frequency */ RCC_Clocks->PCLK1_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 8025a02: fa23 f404 lsr.w r4, r3, r4 8025a06: 6084 str r4, [r0, #8] /* Get PCLK2 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE2; 8025a08: 6889 ldr r1, [r1, #8] tmp = tmp >> 13; 8025a0a: f3c1 3142 ubfx r1, r1, #13, #3 presc = APBAHBPrescTable[tmp]; 8025a0e: 5c52 ldrb r2, [r2, r1] /* PCLK2 clock frequency */ RCC_Clocks->PCLK2_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 8025a10: fa23 f302 lsr.w r3, r3, r2 8025a14: 60c3 str r3, [r0, #12] 8025a16: bd10 pop {r4, pc} 8025a18: 40023800 .word 0x40023800 8025a1c: 00f42400 .word 0x00f42400 8025a20: 017d7840 .word 0x017d7840 8025a24: 200005ac .word 0x200005ac 08025a28 : uint32_t tmpreg = 0; /* Check the parameters */ assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource)); if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300) 8025a28: f400 7340 and.w r3, r0, #768 ; 0x300 8025a2c: f5b3 7f40 cmp.w r3, #768 ; 0x300 8025a30: 4b08 ldr r3, [pc, #32] ; (8025a54 ) 8025a32: d108 bne.n 8025a46 { /* If HSE is selected as RTC clock source, configure HSE division factor for RTC clock */ tmpreg = RCC->CFGR; 8025a34: 6899 ldr r1, [r3, #8] /* Clear RTCPRE[4:0] bits */ tmpreg &= ~RCC_CFGR_RTCPRE; /* Configure HSE division factor for RTC clock */ tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF); 8025a36: f020 4270 bic.w r2, r0, #4026531840 ; 0xf0000000 if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300) { /* If HSE is selected as RTC clock source, configure HSE division factor for RTC clock */ tmpreg = RCC->CFGR; /* Clear RTCPRE[4:0] bits */ tmpreg &= ~RCC_CFGR_RTCPRE; 8025a3a: f421 11f8 bic.w r1, r1, #2031616 ; 0x1f0000 /* Configure HSE division factor for RTC clock */ tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF); 8025a3e: f422 7240 bic.w r2, r2, #768 ; 0x300 8025a42: 430a orrs r2, r1 /* Store the new value */ RCC->CFGR = tmpreg; 8025a44: 609a str r2, [r3, #8] } /* Select the RTC clock source */ RCC->BDCR |= (RCC_RTCCLKSource & 0x00000FFF); 8025a46: 6f1a ldr r2, [r3, #112] ; 0x70 8025a48: 0500 lsls r0, r0, #20 8025a4a: ea42 5010 orr.w r0, r2, r0, lsr #20 8025a4e: 6718 str r0, [r3, #112] ; 0x70 8025a50: 4770 bx lr 8025a52: bf00 nop 8025a54: 40023800 .word 0x40023800 08025a58 : void RCC_RTCCLKCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) BDCR_RTCEN_BB = (uint32_t)NewState; 8025a58: 4b01 ldr r3, [pc, #4] ; (8025a60 ) 8025a5a: 6018 str r0, [r3, #0] 8025a5c: 4770 bx lr 8025a5e: bf00 nop 8025a60: 42470e3c .word 0x42470e3c 08025a64 : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState) { 8025a64: 4b04 ldr r3, [pc, #16] ; (8025a78 ) assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1ENR |= RCC_AHB1Periph; 8025a66: 6b1a ldr r2, [r3, #48] ; 0x30 { /* Check the parameters */ assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025a68: b109 cbz r1, 8025a6e { RCC->AHB1ENR |= RCC_AHB1Periph; 8025a6a: 4310 orrs r0, r2 8025a6c: e001 b.n 8025a72 } else { RCC->AHB1ENR &= ~RCC_AHB1Periph; 8025a6e: ea22 0000 bic.w r0, r2, r0 8025a72: 6318 str r0, [r3, #48] ; 0x30 8025a74: 4770 bx lr 8025a76: bf00 nop 8025a78: 40023800 .word 0x40023800 08025a7c : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB2PeriphClockCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState) { 8025a7c: 4b04 ldr r3, [pc, #16] ; (8025a90 ) assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB2ENR |= RCC_AHB2Periph; 8025a7e: 6b5a ldr r2, [r3, #52] ; 0x34 { /* Check the parameters */ assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025a80: b109 cbz r1, 8025a86 { RCC->AHB2ENR |= RCC_AHB2Periph; 8025a82: 4310 orrs r0, r2 8025a84: e001 b.n 8025a8a } else { RCC->AHB2ENR &= ~RCC_AHB2Periph; 8025a86: ea22 0000 bic.w r0, r2, r0 8025a8a: 6358 str r0, [r3, #52] ; 0x34 8025a8c: 4770 bx lr 8025a8e: bf00 nop 8025a90: 40023800 .word 0x40023800 08025a94 : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { 8025a94: 4b04 ldr r3, [pc, #16] ; (8025aa8 ) assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1ENR |= RCC_APB1Periph; 8025a96: 6c1a ldr r2, [r3, #64] ; 0x40 { /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025a98: b109 cbz r1, 8025a9e { RCC->APB1ENR |= RCC_APB1Periph; 8025a9a: 4310 orrs r0, r2 8025a9c: e001 b.n 8025aa2 } else { RCC->APB1ENR &= ~RCC_APB1Periph; 8025a9e: ea22 0000 bic.w r0, r2, r0 8025aa2: 6418 str r0, [r3, #64] ; 0x40 8025aa4: 4770 bx lr 8025aa6: bf00 nop 8025aa8: 40023800 .word 0x40023800 08025aac : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { 8025aac: 4b04 ldr r3, [pc, #16] ; (8025ac0 ) assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB2ENR |= RCC_APB2Periph; 8025aae: 6c5a ldr r2, [r3, #68] ; 0x44 { /* Check the parameters */ assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025ab0: b109 cbz r1, 8025ab6 { RCC->APB2ENR |= RCC_APB2Periph; 8025ab2: 4310 orrs r0, r2 8025ab4: e001 b.n 8025aba } else { RCC->APB2ENR &= ~RCC_APB2Periph; 8025ab6: ea22 0000 bic.w r0, r2, r0 8025aba: 6458 str r0, [r3, #68] ; 0x44 8025abc: 4770 bx lr 8025abe: bf00 nop 8025ac0: 40023800 .word 0x40023800 08025ac4 : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB1PeriphResetCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState) { 8025ac4: 4b04 ldr r3, [pc, #16] ; (8025ad8 ) assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1RSTR |= RCC_AHB1Periph; 8025ac6: 691a ldr r2, [r3, #16] { /* Check the parameters */ assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025ac8: b109 cbz r1, 8025ace { RCC->AHB1RSTR |= RCC_AHB1Periph; 8025aca: 4310 orrs r0, r2 8025acc: e001 b.n 8025ad2 } else { RCC->AHB1RSTR &= ~RCC_AHB1Periph; 8025ace: ea22 0000 bic.w r0, r2, r0 8025ad2: 6118 str r0, [r3, #16] 8025ad4: 4770 bx lr 8025ad6: bf00 nop 8025ad8: 40023800 .word 0x40023800 08025adc : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { 8025adc: 4b04 ldr r3, [pc, #16] ; (8025af0 ) /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1RSTR |= RCC_APB1Periph; 8025ade: 6a1a ldr r2, [r3, #32] void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025ae0: b109 cbz r1, 8025ae6 { RCC->APB1RSTR |= RCC_APB1Periph; 8025ae2: 4310 orrs r0, r2 8025ae4: e001 b.n 8025aea } else { RCC->APB1RSTR &= ~RCC_APB1Periph; 8025ae6: ea22 0000 bic.w r0, r2, r0 8025aea: 6218 str r0, [r3, #32] 8025aec: 4770 bx lr 8025aee: bf00 nop 8025af0: 40023800 .word 0x40023800 08025af4 : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { 8025af4: 4b04 ldr r3, [pc, #16] ; (8025b08 ) /* Check the parameters */ assert_param(IS_RCC_APB2_RESET_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB2RSTR |= RCC_APB2Periph; 8025af6: 6a5a ldr r2, [r3, #36] ; 0x24 void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { /* Check the parameters */ assert_param(IS_RCC_APB2_RESET_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025af8: b109 cbz r1, 8025afe { RCC->APB2RSTR |= RCC_APB2Periph; 8025afa: 4310 orrs r0, r2 8025afc: e001 b.n 8025b02 } else { RCC->APB2RSTR &= ~RCC_APB2Periph; 8025afe: ea22 0000 bic.w r0, r2, r0 8025b02: 6258 str r0, [r3, #36] ; 0x24 8025b04: 4770 bx lr 8025b06: bf00 nop 8025b08: 40023800 .word 0x40023800 08025b0c : /* Check the parameters */ assert_param(IS_RCC_FLAG(RCC_FLAG)); /* Get the RCC register index */ tmp = RCC_FLAG >> 5; 8025b0c: 0943 lsrs r3, r0, #5 if (tmp == 1) /* The flag to check is in CR register */ 8025b0e: 2b01 cmp r3, #1 8025b10: 4a07 ldr r2, [pc, #28] ; (8025b30 ) 8025b12: d101 bne.n 8025b18 { statusreg = RCC->CR; 8025b14: 6813 ldr r3, [r2, #0] 8025b16: e003 b.n 8025b20 } else if (tmp == 2) /* The flag to check is in BDCR register */ 8025b18: 2b02 cmp r3, #2 { statusreg = RCC->BDCR; 8025b1a: bf0c ite eq 8025b1c: 6f13 ldreq r3, [r2, #112] ; 0x70 } else /* The flag to check is in CSR register */ { statusreg = RCC->CSR; 8025b1e: 6f53 ldrne r3, [r2, #116] ; 0x74 } /* Get the flag position */ tmp = RCC_FLAG & FLAG_MASK; if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET) 8025b20: f000 001f and.w r0, r0, #31 8025b24: fa23 f000 lsr.w r0, r3, r0 { bitstatus = RESET; } /* Return the flag status */ return bitstatus; } 8025b28: f000 0001 and.w r0, r0, #1 8025b2c: 4770 bx lr 8025b2e: bf00 nop 8025b30: 40023800 .word 0x40023800 08025b34 : * @param NewState: new state of the RNG peripheral. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RNG_Cmd(FunctionalState NewState) { 8025b34: 4b04 ldr r3, [pc, #16] ; (8025b48 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the RNG */ RNG->CR |= RNG_CR_RNGEN; 8025b36: 681a ldr r2, [r3, #0] void RNG_Cmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025b38: b110 cbz r0, 8025b40 { /* Enable the RNG */ RNG->CR |= RNG_CR_RNGEN; 8025b3a: f042 0204 orr.w r2, r2, #4 8025b3e: e001 b.n 8025b44 } else { /* Disable the RNG */ RNG->CR &= ~RNG_CR_RNGEN; 8025b40: f022 0204 bic.w r2, r2, #4 8025b44: 601a str r2, [r3, #0] 8025b46: 4770 bx lr 8025b48: 50060800 .word 0x50060800 08025b4c : * @retval 32-bit random number. */ uint32_t RNG_GetRandomNumber(void) { /* Return the 32 bit random number from the DR register */ return RNG->DR; 8025b4c: 4b01 ldr r3, [pc, #4] ; (8025b54 ) 8025b4e: 6898 ldr r0, [r3, #8] } 8025b50: 4770 bx lr 8025b52: bf00 nop 8025b54: 50060800 .word 0x50060800 08025b58 : * @param Value: Byte to be converted. * @retval Converted byte */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; 8025b58: 2300 movs r3, #0 while (Value >= 10) 8025b5a: e003 b.n 8025b64 { bcdhigh++; 8025b5c: 3301 adds r3, #1 Value -= 10; 8025b5e: 380a subs r0, #10 { uint8_t bcdhigh = 0; while (Value >= 10) { bcdhigh++; 8025b60: b2db uxtb r3, r3 Value -= 10; 8025b62: b2c0 uxtb r0, r0 */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; while (Value >= 10) 8025b64: 2809 cmp r0, #9 8025b66: d8f9 bhi.n 8025b5c { bcdhigh++; Value -= 10; } return ((uint8_t)(bcdhigh << 4) | Value); 8025b68: ea40 1003 orr.w r0, r0, r3, lsl #4 } 8025b6c: b2c0 uxtb r0, r0 8025b6e: 4770 bx lr 08025b70 : * @retval Converted word */ static uint8_t RTC_Bcd2ToByte(uint8_t Value) { uint8_t tmp = 0; tmp = ((uint8_t)(Value & (uint8_t)0xF0) >> (uint8_t)0x4) * 10; 8025b70: 0902 lsrs r2, r0, #4 return (tmp + (Value & (uint8_t)0x0F)); 8025b72: f000 030f and.w r3, r0, #15 8025b76: 200a movs r0, #10 8025b78: fb00 3002 mla r0, r0, r2, r3 } 8025b7c: b2c0 uxtb r0, r0 8025b7e: 4770 bx lr 08025b80 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC is in Init mode * - ERROR: RTC is not in Init mode */ ErrorStatus RTC_EnterInitMode(void) { 8025b80: b082 sub sp, #8 __IO uint32_t initcounter = 0x00; 8025b82: 2300 movs r3, #0 8025b84: 9301 str r3, [sp, #4] ErrorStatus status = ERROR; uint32_t initstatus = 0x00; /* Check if the Initialization mode is set */ if ((RTC->ISR & RTC_ISR_INITF) == (uint32_t)RESET) 8025b86: 4b0d ldr r3, [pc, #52] ; (8025bbc ) 8025b88: 68da ldr r2, [r3, #12] 8025b8a: 0650 lsls r0, r2, #25 8025b8c: d413 bmi.n 8025bb6 { /* Set the Initialization mode */ RTC->ISR = (uint32_t)RTC_INIT_MASK; 8025b8e: f04f 32ff mov.w r2, #4294967295 8025b92: 60da str r2, [r3, #12] /* Wait till RTC is in INIT state and if Time out is reached exit */ do { initstatus = RTC->ISR & RTC_ISR_INITF; 8025b94: 68da ldr r2, [r3, #12] initcounter++; 8025b96: 9901 ldr r1, [sp, #4] 8025b98: 3101 adds r1, #1 8025b9a: 9101 str r1, [sp, #4] } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 8025b9c: 9901 ldr r1, [sp, #4] 8025b9e: f5b1 3f80 cmp.w r1, #65536 ; 0x10000 RTC->ISR = (uint32_t)RTC_INIT_MASK; /* Wait till RTC is in INIT state and if Time out is reached exit */ do { initstatus = RTC->ISR & RTC_ISR_INITF; 8025ba2: f002 0240 and.w r2, r2, #64 ; 0x40 initcounter++; } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 8025ba6: d001 beq.n 8025bac 8025ba8: 2a00 cmp r2, #0 8025baa: d0f3 beq.n 8025b94 if ((RTC->ISR & RTC_ISR_INITF) != RESET) 8025bac: 4b03 ldr r3, [pc, #12] ; (8025bbc ) 8025bae: 68d8 ldr r0, [r3, #12] { status = SUCCESS; 8025bb0: f3c0 1080 ubfx r0, r0, #6, #1 8025bb4: e000 b.n 8025bb8 status = ERROR; } } else { status = SUCCESS; 8025bb6: 2001 movs r0, #1 } return (status); } 8025bb8: b002 add sp, #8 8025bba: 4770 bx lr 8025bbc: 40002800 .word 0x40002800 08025bc0 : * @retval None */ void RTC_ExitInitMode(void) { /* Exit Initialization mode */ RTC->ISR &= (uint32_t)~RTC_ISR_INIT; 8025bc0: 4b02 ldr r3, [pc, #8] ; (8025bcc ) 8025bc2: 68da ldr r2, [r3, #12] 8025bc4: f022 0280 bic.w r2, r2, #128 ; 0x80 8025bc8: 60da str r2, [r3, #12] 8025bca: 4770 bx lr 8025bcc: 40002800 .word 0x40002800 08025bd0 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) { 8025bd0: b538 push {r3, r4, r5, lr} assert_param(IS_RTC_HOUR_FORMAT(RTC_InitStruct->RTC_HourFormat)); assert_param(IS_RTC_ASYNCH_PREDIV(RTC_InitStruct->RTC_AsynchPrediv)); assert_param(IS_RTC_SYNCH_PREDIV(RTC_InitStruct->RTC_SynchPrediv)); /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8025bd2: 4c0f ldr r4, [pc, #60] ; (8025c10 ) 8025bd4: 23ca movs r3, #202 ; 0xca 8025bd6: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025bd8: 2353 movs r3, #83 ; 0x53 8025bda: 6263 str r3, [r4, #36] ; 0x24 * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) { 8025bdc: 4605 mov r5, r0 /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025bde: f7ff ffcf bl 8025b80 8025be2: b188 cbz r0, 8025c08 status = ERROR; } else { /* Clear RTC CR FMT Bit */ RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); 8025be4: 68a3 ldr r3, [r4, #8] 8025be6: f023 0340 bic.w r3, r3, #64 ; 0x40 8025bea: 60a3 str r3, [r4, #8] /* Set RTC_CR register */ RTC->CR |= ((uint32_t)(RTC_InitStruct->RTC_HourFormat)); 8025bec: 68a2 ldr r2, [r4, #8] 8025bee: 682b ldr r3, [r5, #0] 8025bf0: 4313 orrs r3, r2 8025bf2: 60a3 str r3, [r4, #8] /* Configure the RTC PRER */ RTC->PRER = (uint32_t)(RTC_InitStruct->RTC_SynchPrediv); 8025bf4: 68ab ldr r3, [r5, #8] 8025bf6: 6123 str r3, [r4, #16] RTC->PRER |= (uint32_t)(RTC_InitStruct->RTC_AsynchPrediv << 16); 8025bf8: 6923 ldr r3, [r4, #16] 8025bfa: 686a ldr r2, [r5, #4] 8025bfc: ea43 4302 orr.w r3, r3, r2, lsl #16 8025c00: 6123 str r3, [r4, #16] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025c02: f7ff ffdd bl 8025bc0 status = SUCCESS; 8025c06: 2001 movs r0, #1 } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025c08: 4b01 ldr r3, [pc, #4] ; (8025c10 ) 8025c0a: 22ff movs r2, #255 ; 0xff 8025c0c: 625a str r2, [r3, #36] ; 0x24 return status; } 8025c0e: bd38 pop {r3, r4, r5, pc} 8025c10: 40002800 .word 0x40002800 08025c14 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are synchronised * - ERROR: RTC registers are not synchronised */ ErrorStatus RTC_WaitForSynchro(void) { 8025c14: b082 sub sp, #8 __IO uint32_t synchrocounter = 0; 8025c16: 2300 movs r3, #0 8025c18: 9301 str r3, [sp, #4] ErrorStatus status = ERROR; uint32_t synchrostatus = 0x00; /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8025c1a: 4b0e ldr r3, [pc, #56] ; (8025c54 ) 8025c1c: 22ca movs r2, #202 ; 0xca 8025c1e: 625a str r2, [r3, #36] ; 0x24 RTC->WPR = 0x53; 8025c20: 2253 movs r2, #83 ; 0x53 8025c22: 625a str r2, [r3, #36] ; 0x24 /* Clear RSF flag */ RTC->ISR &= (uint32_t)RTC_RSF_MASK; 8025c24: 68da ldr r2, [r3, #12] 8025c26: f022 02a0 bic.w r2, r2, #160 ; 0xa0 8025c2a: 60da str r2, [r3, #12] /* Wait the registers to be synchronised */ do { synchrostatus = RTC->ISR & RTC_ISR_RSF; 8025c2c: 68d9 ldr r1, [r3, #12] synchrocounter++; 8025c2e: 9a01 ldr r2, [sp, #4] 8025c30: 3201 adds r2, #1 8025c32: 9201 str r2, [sp, #4] } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 8025c34: 9a01 ldr r2, [sp, #4] 8025c36: f5b2 3f00 cmp.w r2, #131072 ; 0x20000 RTC->ISR &= (uint32_t)RTC_RSF_MASK; /* Wait the registers to be synchronised */ do { synchrostatus = RTC->ISR & RTC_ISR_RSF; 8025c3a: f001 0120 and.w r1, r1, #32 8025c3e: 4a05 ldr r2, [pc, #20] ; (8025c54 ) synchrocounter++; } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 8025c40: d001 beq.n 8025c46 8025c42: 2900 cmp r1, #0 8025c44: d0f2 beq.n 8025c2c if ((RTC->ISR & RTC_ISR_RSF) != RESET) 8025c46: 68d0 ldr r0, [r2, #12] { status = ERROR; } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025c48: 23ff movs r3, #255 ; 0xff 8025c4a: 6253 str r3, [r2, #36] ; 0x24 return (status); } 8025c4c: f3c0 1040 ubfx r0, r0, #5, #1 8025c50: b002 add sp, #8 8025c52: 4770 bx lr 8025c54: 40002800 .word 0x40002800 08025c58 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC Time register is configured * - ERROR: RTC Time register is not configured */ ErrorStatus RTC_SetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 8025c58: b5f8 push {r3, r4, r5, r6, r7, lr} 8025c5a: 4b24 ldr r3, [pc, #144] ; (8025cec ) 8025c5c: 460c mov r4, r1 /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if (RTC_Format == RTC_Format_BIN) { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8025c5e: 689b ldr r3, [r3, #8] ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if (RTC_Format == RTC_Format_BIN) 8025c60: b920 cbnz r0, 8025c6c { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8025c62: f013 0340 ands.w r3, r3, #64 ; 0x40 8025c66: d12e bne.n 8025cc6 assert_param(IS_RTC_HOUR12(RTC_TimeStruct->RTC_Hours)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 8025c68: 70cb strb r3, [r1, #3] 8025c6a: e02c b.n 8025cc6 assert_param(IS_RTC_MINUTES(RTC_TimeStruct->RTC_Minutes)); assert_param(IS_RTC_SECONDS(RTC_TimeStruct->RTC_Seconds)); } else { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8025c6c: f013 0340 ands.w r3, r3, #64 ; 0x40 8025c70: d11e bne.n 8025cb0 assert_param(IS_RTC_HOUR12(tmpreg)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 8025c72: 70cb strb r3, [r1, #3] 8025c74: e01c b.n 8025cb0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds)) | \ (((uint32_t)RTC_TimeStruct->RTC_H12) << 16)); } /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8025c76: 4c1d ldr r4, [pc, #116] ; (8025cec ) 8025c78: 23ca movs r3, #202 ; 0xca 8025c7a: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025c7c: 2353 movs r3, #83 ; 0x53 8025c7e: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025c80: f7ff ff7e bl 8025b80 8025c84: b180 cbz r0, 8025ca8 status = ERROR; } else { /* Set the RTC_TR register */ RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); 8025c86: f005 357f and.w r5, r5, #2139062143 ; 0x7f7f7f7f 8025c8a: f025 45fe bic.w r5, r5, #2130706432 ; 0x7f000000 8025c8e: 6025 str r5, [r4, #0] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025c90: f7ff ff96 bl 8025bc0 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 8025c94: 68a3 ldr r3, [r4, #8] 8025c96: 0699 lsls r1, r3, #26 8025c98: d405 bmi.n 8025ca6 { if (RTC_WaitForSynchro() == ERROR) 8025c9a: f7ff ffbb bl 8025c14 RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8025c9e: 3000 adds r0, #0 8025ca0: bf18 it ne 8025ca2: 2001 movne r0, #1 8025ca4: e000 b.n 8025ca8 status = SUCCESS; } } else { status = SUCCESS; 8025ca6: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025ca8: 4b10 ldr r3, [pc, #64] ; (8025cec ) 8025caa: 22ff movs r2, #255 ; 0xff 8025cac: 625a str r2, [r3, #36] ; 0x24 8025cae: bdf8 pop {r3, r4, r5, r6, r7, pc} /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025cb0: 7865 ldrb r5, [r4, #1] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025cb2: 7823 ldrb r3, [r4, #0] ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025cb4: 022d lsls r5, r5, #8 } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025cb6: ea45 4503 orr.w r5, r5, r3, lsl #16 ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ 8025cba: 78a3 ldrb r3, [r4, #2] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025cbc: 431d orrs r5, r3 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); 8025cbe: 78e3 ldrb r3, [r4, #3] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025cc0: ea45 4503 orr.w r5, r5, r3, lsl #16 8025cc4: e7d7 b.n 8025c76 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025cc6: 7820 ldrb r0, [r4, #0] 8025cc8: f7ff ff46 bl 8025b58 8025ccc: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025cce: 7860 ldrb r0, [r4, #1] 8025cd0: f7ff ff42 bl 8025b58 8025cd4: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds)) | \ 8025cd6: 78a0 ldrb r0, [r4, #2] 8025cd8: f7ff ff3e bl 8025b58 (((uint32_t)RTC_TimeStruct->RTC_H12) << 16)); 8025cdc: 78e5 ldrb r5, [r4, #3] ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025cde: ea40 4005 orr.w r0, r0, r5, lsl #16 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025ce2: ea40 4507 orr.w r5, r0, r7, lsl #16 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 8025ce6: ea45 2506 orr.w r5, r5, r6, lsl #8 8025cea: e7c4 b.n 8025c76 8025cec: 40002800 .word 0x40002800 08025cf0 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); 8025cf0: 4b0f ldr r3, [pc, #60] ; (8025d30 ) 8025cf2: 681b ldr r3, [r3, #0] * @param RTC_TimeStruct: pointer to a RTC_TimeTypeDef structure that will * contain the returned current time configuration. * @retval None */ void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 8025cf4: b570 push {r4, r5, r6, lr} /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_TimeStruct->RTC_Hours = (uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16); 8025cf6: f3c3 4205 ubfx r2, r3, #16, #6 RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 8025cfa: f3c3 2606 ubfx r6, r3, #8, #7 RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 8025cfe: f003 057f and.w r5, r3, #127 ; 0x7f RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 8025d02: f403 0380 and.w r3, r3, #4194304 ; 0x400000 8025d06: 0c1b lsrs r3, r3, #16 * @param RTC_TimeStruct: pointer to a RTC_TimeTypeDef structure that will * contain the returned current time configuration. * @retval None */ void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 8025d08: 460c mov r4, r1 /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_TimeStruct->RTC_Hours = (uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16); 8025d0a: 700a strb r2, [r1, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 8025d0c: 704e strb r6, [r1, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 8025d0e: 708d strb r5, [r1, #2] RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 8025d10: 70cb strb r3, [r1, #3] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 8025d12: b958 cbnz r0, 8025d2c { /* Convert the structure parameters to Binary format */ RTC_TimeStruct->RTC_Hours = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Hours); 8025d14: 4610 mov r0, r2 8025d16: f7ff ff2b bl 8025b70 8025d1a: 7020 strb r0, [r4, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Minutes); 8025d1c: 4630 mov r0, r6 8025d1e: f7ff ff27 bl 8025b70 8025d22: 7060 strb r0, [r4, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Seconds); 8025d24: 4628 mov r0, r5 8025d26: f7ff ff23 bl 8025b70 8025d2a: 70a0 strb r0, [r4, #2] 8025d2c: bd70 pop {r4, r5, r6, pc} 8025d2e: bf00 nop 8025d30: 40002800 .word 0x40002800 08025d34 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC Date register is configured * - ERROR: RTC Date register is not configured */ ErrorStatus RTC_SetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8025d34: b5f8 push {r3, r4, r5, r6, r7, lr} 8025d36: 460c mov r4, r1 8025d38: 784b ldrb r3, [r1, #1] ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if ((RTC_Format == RTC_Format_BIN) && ((RTC_DateStruct->RTC_Month & 0x10) == 0x10)) 8025d3a: 2800 cmp r0, #0 8025d3c: d138 bne.n 8025db0 8025d3e: f003 0210 and.w r2, r3, #16 8025d42: b2d2 uxtb r2, r2 8025d44: b30a cbz r2, 8025d8a { RTC_DateStruct->RTC_Month = (RTC_DateStruct->RTC_Month & (uint32_t)~(0x10)) + 0x0A; 8025d46: f023 0310 bic.w r3, r3, #16 8025d4a: 330a adds r3, #10 8025d4c: 704b strb r3, [r1, #1] 8025d4e: e01c b.n 8025d8a ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Date)) | \ ((uint32_t)RTC_DateStruct->RTC_WeekDay << 13)); } /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8025d50: 4c1c ldr r4, [pc, #112] ; (8025dc4 ) 8025d52: 23ca movs r3, #202 ; 0xca 8025d54: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025d56: 2353 movs r3, #83 ; 0x53 8025d58: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025d5a: f7ff ff11 bl 8025b80 8025d5e: b180 cbz r0, 8025d82 status = ERROR; } else { /* Set the RTC_DR register */ RTC->DR = (uint32_t)(tmpreg & RTC_DR_RESERVED_MASK); 8025d60: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 8025d64: f025 05c0 bic.w r5, r5, #192 ; 0xc0 8025d68: 6065 str r5, [r4, #4] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025d6a: f7ff ff29 bl 8025bc0 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 8025d6e: 68a3 ldr r3, [r4, #8] 8025d70: 0698 lsls r0, r3, #26 8025d72: d405 bmi.n 8025d80 { if (RTC_WaitForSynchro() == ERROR) 8025d74: f7ff ff4e bl 8025c14 RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8025d78: 3000 adds r0, #0 8025d7a: bf18 it ne 8025d7c: 2001 movne r0, #1 8025d7e: e000 b.n 8025d82 status = SUCCESS; } } else { status = SUCCESS; 8025d80: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025d82: 4b10 ldr r3, [pc, #64] ; (8025dc4 ) 8025d84: 22ff movs r2, #255 ; 0xff 8025d86: 625a str r2, [r3, #36] ; 0x24 8025d88: bdf8 pop {r3, r4, r5, r6, r7, pc} ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8025d8a: 78e0 ldrb r0, [r4, #3] 8025d8c: f7ff fee4 bl 8025b58 8025d90: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8025d92: 7860 ldrb r0, [r4, #1] 8025d94: f7ff fee0 bl 8025b58 8025d98: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Date)) | \ 8025d9a: 78a0 ldrb r0, [r4, #2] 8025d9c: f7ff fedc bl 8025b58 ((uint32_t)RTC_DateStruct->RTC_WeekDay << 13)); 8025da0: 7825 ldrb r5, [r4, #0] ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8025da2: ea40 3045 orr.w r0, r0, r5, lsl #13 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8025da6: ea40 4507 orr.w r5, r0, r7, lsl #16 ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8025daa: ea45 2506 orr.w r5, r5, r6, lsl #8 8025dae: e7cf b.n 8025d50 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8025db0: 78cd ldrb r5, [r1, #3] (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ ((uint32_t)RTC_DateStruct->RTC_Date) | \ 8025db2: 788a ldrb r2, [r1, #2] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ 8025db4: 021b lsls r3, r3, #8 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8025db6: ea43 4505 orr.w r5, r3, r5, lsl #16 (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); 8025dba: 780b ldrb r3, [r1, #0] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ 8025dbc: 4315 orrs r5, r2 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8025dbe: ea45 3543 orr.w r5, r5, r3, lsl #13 8025dc2: e7c5 b.n 8025d50 8025dc4: 40002800 .word 0x40002800 08025dc8 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); 8025dc8: 4b0e ldr r3, [pc, #56] ; (8025e04 ) 8025dca: 685b ldr r3, [r3, #4] * @param RTC_DateStruct: pointer to a RTC_DateTypeDef structure that will * contain the returned current date configuration. * @retval None */ void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8025dcc: b570 push {r4, r5, r6, lr} /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_DateStruct->RTC_Year = (uint8_t)((tmpreg & (RTC_DR_YT | RTC_DR_YU)) >> 16); 8025dce: f3c3 4207 ubfx r2, r3, #16, #8 RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8025dd2: f3c3 2604 ubfx r6, r3, #8, #5 RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8025dd6: f003 053f and.w r5, r3, #63 ; 0x3f RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8025dda: f3c3 3342 ubfx r3, r3, #13, #3 * @param RTC_DateStruct: pointer to a RTC_DateTypeDef structure that will * contain the returned current date configuration. * @retval None */ void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8025dde: 460c mov r4, r1 /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_DateStruct->RTC_Year = (uint8_t)((tmpreg & (RTC_DR_YT | RTC_DR_YU)) >> 16); 8025de0: 70ca strb r2, [r1, #3] RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8025de2: 704e strb r6, [r1, #1] RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8025de4: 708d strb r5, [r1, #2] RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8025de6: 700b strb r3, [r1, #0] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 8025de8: b958 cbnz r0, 8025e02 { /* Convert the structure parameters to Binary format */ RTC_DateStruct->RTC_Year = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Year); 8025dea: 4610 mov r0, r2 8025dec: f7ff fec0 bl 8025b70 8025df0: 70e0 strb r0, [r4, #3] RTC_DateStruct->RTC_Month = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Month); 8025df2: 4630 mov r0, r6 8025df4: f7ff febc bl 8025b70 8025df8: 7060 strb r0, [r4, #1] RTC_DateStruct->RTC_Date = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Date); 8025dfa: 4628 mov r0, r5 8025dfc: f7ff feb8 bl 8025b70 8025e00: 70a0 strb r0, [r4, #2] 8025e02: bd70 pop {r4, r5, r6, pc} 8025e04: 40002800 .word 0x40002800 08025e08 : * specify the register. * @param Data: Data to be written in the specified RTC Backup data register. * @retval None */ void RTC_WriteBackupRegister(uint32_t RTC_BKP_DR, uint32_t Data) { 8025e08: b082 sub sp, #8 __IO uint32_t tmp = 0; 8025e0a: 2300 movs r3, #0 8025e0c: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8025e0e: 4b05 ldr r3, [pc, #20] ; (8025e24 ) 8025e10: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8025e12: 9b01 ldr r3, [sp, #4] 8025e14: eb03 0080 add.w r0, r3, r0, lsl #2 8025e18: 9001 str r0, [sp, #4] /* Write the specified register */ *(__IO uint32_t *)tmp = (uint32_t)Data; 8025e1a: 9b01 ldr r3, [sp, #4] 8025e1c: 6019 str r1, [r3, #0] } 8025e1e: b002 add sp, #8 8025e20: 4770 bx lr 8025e22: bf00 nop 8025e24: 40002850 .word 0x40002850 08025e28 : * This parameter can be: RTC_BKP_DRx where x can be from 0 to 19 to * specify the register. * @retval None */ uint32_t RTC_ReadBackupRegister(uint32_t RTC_BKP_DR) { 8025e28: b082 sub sp, #8 __IO uint32_t tmp = 0; 8025e2a: 2300 movs r3, #0 8025e2c: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8025e2e: 4b05 ldr r3, [pc, #20] ; (8025e44 ) 8025e30: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8025e32: 9b01 ldr r3, [sp, #4] 8025e34: eb03 0080 add.w r0, r3, r0, lsl #2 8025e38: 9001 str r0, [sp, #4] /* Read the specified register */ return (*(__IO uint32_t *)tmp); 8025e3a: 9b01 ldr r3, [sp, #4] 8025e3c: 6818 ldr r0, [r3, #0] } 8025e3e: b002 add sp, #8 8025e40: 4770 bx lr 8025e42: bf00 nop 8025e44: 40002850 .word 0x40002850 08025e48 : /* Check the parameters */ assert_param(IS_RTC_GET_IT(RTC_IT)); /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); 8025e48: 4b0a ldr r3, [pc, #40] ; (8025e74 ) 8025e4a: 6c1a ldr r2, [r3, #64] ; 0x40 * @arg RTC_IT_ALRA: Alarm A interrupt * @arg RTC_IT_TAMP1: Tamper 1 event interrupt * @retval The new state of RTC_IT (SET or RESET). */ ITStatus RTC_GetITStatus(uint32_t RTC_IT) { 8025e4c: b510 push {r4, lr} /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); 8025e4e: 689c ldr r4, [r3, #8] /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); 8025e50: 68d9 ldr r1, [r3, #12] /* Check the parameters */ assert_param(IS_RTC_GET_IT(RTC_IT)); /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); 8025e52: f002 0204 and.w r2, r2, #4 /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); 8025e56: ea02 32d0 and.w r2, r2, r0, lsr #15 8025e5a: ea00 0304 and.w r3, r0, r4 /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); /* Get the status of the Interrupt */ if ((enablestatus != (uint32_t)RESET) && ((tmpreg & 0x0000FFFF) != (uint32_t)RESET)) 8025e5e: 4313 orrs r3, r2 8025e60: d006 beq.n 8025e70 /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); 8025e62: b28b uxth r3, r1 /* Get the status of the Interrupt */ if ((enablestatus != (uint32_t)RESET) && ((tmpreg & 0x0000FFFF) != (uint32_t)RESET)) 8025e64: ea13 1310 ands.w r3, r3, r0, lsr #4 { bitstatus = SET; 8025e68: bf0c ite eq 8025e6a: 2000 moveq r0, #0 8025e6c: 2001 movne r0, #1 8025e6e: bd10 pop {r4, pc} } else { bitstatus = RESET; 8025e70: 4618 mov r0, r3 } return bitstatus; } 8025e72: bd10 pop {r4, pc} 8025e74: 40002800 .word 0x40002800 08025e78 : /* Get the RTC_ISR Interrupt pending bits mask */ tmpreg = (uint32_t)(RTC_IT >> 4); /* Clear the interrupt pending bits in the RTC_ISR register */ RTC->ISR = (uint32_t)((uint32_t)(~((tmpreg | RTC_ISR_INIT)& 0x0000FFFF) | (uint32_t)(RTC->ISR & RTC_ISR_INIT))); 8025e78: 4b05 ldr r3, [pc, #20] ; (8025e90 ) 8025e7a: 68da ldr r2, [r3, #12] 8025e7c: f3c0 100f ubfx r0, r0, #4, #16 8025e80: f040 0080 orr.w r0, r0, #128 ; 0x80 8025e84: f002 0280 and.w r2, r2, #128 ; 0x80 8025e88: ea62 0200 orn r2, r2, r0 8025e8c: 60da str r2, [r3, #12] 8025e8e: 4770 bx lr 8025e90: 40002800 .word 0x40002800 08025e94 : */ void SYSCFG_ETH_MediaInterfaceConfig(uint32_t SYSCFG_ETH_MediaInterface) { assert_param(IS_SYSCFG_ETH_MEDIA_INTERFACE(SYSCFG_ETH_MediaInterface)); /* Configure MII_RMII selection bit */ *(__IO uint32_t *) PMC_MII_RMII_SEL_BB = SYSCFG_ETH_MediaInterface; 8025e94: 4b01 ldr r3, [pc, #4] ; (8025e9c ) 8025e96: 6018 str r0, [r3, #0] 8025e98: 4770 bx lr 8025e9a: bf00 nop 8025e9c: 422700dc .word 0x422700dc 08025ea0 : assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; if((TIMx == TIM1) || (TIMx == TIM8)|| 8025ea0: 4a1c ldr r2, [pc, #112] ; (8025f14 ) /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; 8025ea2: 8803 ldrh r3, [r0, #0] if((TIMx == TIM1) || (TIMx == TIM8)|| 8025ea4: 4290 cmp r0, r2 /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; 8025ea6: b29b uxth r3, r3 if((TIMx == TIM1) || (TIMx == TIM8)|| 8025ea8: d012 beq.n 8025ed0 8025eaa: f502 6280 add.w r2, r2, #1024 ; 0x400 8025eae: 4290 cmp r0, r2 8025eb0: d00e beq.n 8025ed0 8025eb2: f1b0 4f80 cmp.w r0, #1073741824 ; 0x40000000 8025eb6: d00b beq.n 8025ed0 (TIMx == TIM2) || (TIMx == TIM3)|| 8025eb8: f5a2 3280 sub.w r2, r2, #65536 ; 0x10000 8025ebc: 4290 cmp r0, r2 8025ebe: d007 beq.n 8025ed0 8025ec0: f502 6280 add.w r2, r2, #1024 ; 0x400 8025ec4: 4290 cmp r0, r2 8025ec6: d003 beq.n 8025ed0 (TIMx == TIM4) || (TIMx == TIM5)) 8025ec8: f502 6280 add.w r2, r2, #1024 ; 0x400 8025ecc: 4290 cmp r0, r2 8025ece: d103 bne.n 8025ed8 { /* Select the Counter Mode */ tmpcr1 &= (uint16_t)(~(TIM_CR1_DIR | TIM_CR1_CMS)); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; 8025ed0: 884a ldrh r2, [r1, #2] if((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM2) || (TIMx == TIM3)|| (TIMx == TIM4) || (TIMx == TIM5)) { /* Select the Counter Mode */ tmpcr1 &= (uint16_t)(~(TIM_CR1_DIR | TIM_CR1_CMS)); 8025ed2: f023 0370 bic.w r3, r3, #112 ; 0x70 tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; 8025ed6: 4313 orrs r3, r2 } if((TIMx != TIM6) && (TIMx != TIM7)) 8025ed8: 4a0f ldr r2, [pc, #60] ; (8025f18 ) 8025eda: 4290 cmp r0, r2 8025edc: d008 beq.n 8025ef0 8025ede: f502 6280 add.w r2, r2, #1024 ; 0x400 8025ee2: 4290 cmp r0, r2 8025ee4: d004 beq.n 8025ef0 { /* Set the clock division */ tmpcr1 &= (uint16_t)(~TIM_CR1_CKD); 8025ee6: f423 7340 bic.w r3, r3, #768 ; 0x300 tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; 8025eea: 890a ldrh r2, [r1, #8] } if((TIMx != TIM6) && (TIMx != TIM7)) { /* Set the clock division */ tmpcr1 &= (uint16_t)(~TIM_CR1_CKD); 8025eec: b29b uxth r3, r3 tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; 8025eee: 4313 orrs r3, r2 } TIMx->CR1 = tmpcr1; 8025ef0: 8003 strh r3, [r0, #0] /* Set the Autoreload value */ TIMx->ARR = TIM_TimeBaseInitStruct->TIM_Period ; 8025ef2: 684b ldr r3, [r1, #4] 8025ef4: 62c3 str r3, [r0, #44] ; 0x2c /* Set the Prescaler value */ TIMx->PSC = TIM_TimeBaseInitStruct->TIM_Prescaler; 8025ef6: 880b ldrh r3, [r1, #0] 8025ef8: 8503 strh r3, [r0, #40] ; 0x28 if ((TIMx == TIM1) || (TIMx == TIM8)) 8025efa: 4b06 ldr r3, [pc, #24] ; (8025f14 ) 8025efc: 4298 cmp r0, r3 8025efe: d003 beq.n 8025f08 8025f00: f503 6380 add.w r3, r3, #1024 ; 0x400 8025f04: 4298 cmp r0, r3 8025f06: d101 bne.n 8025f0c { /* Set the Repetition Counter value */ TIMx->RCR = TIM_TimeBaseInitStruct->TIM_RepetitionCounter; 8025f08: 7a8b ldrb r3, [r1, #10] 8025f0a: 8603 strh r3, [r0, #48] ; 0x30 } /* Generate an update event to reload the Prescaler and the repetition counter(only for TIM1 and TIM8) value immediatly */ TIMx->EGR = TIM_PSCReloadMode_Immediate; 8025f0c: 2301 movs r3, #1 8025f0e: 8283 strh r3, [r0, #20] 8025f10: 4770 bx lr 8025f12: bf00 nop 8025f14: 40010000 .word 0x40010000 8025f18: 40001000 .word 0x40001000 08025f1c : assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the TIM Counter */ TIMx->CR1 |= TIM_CR1_CEN; 8025f1c: 8803 ldrh r3, [r0, #0] { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025f1e: b119 cbz r1, 8025f28 { /* Enable the TIM Counter */ TIMx->CR1 |= TIM_CR1_CEN; 8025f20: b29b uxth r3, r3 8025f22: f043 0301 orr.w r3, r3, #1 8025f26: e003 b.n 8025f30 } else { /* Disable the TIM Counter */ TIMx->CR1 &= (uint16_t)~TIM_CR1_CEN; 8025f28: f023 0301 bic.w r3, r3, #1 8025f2c: 041b lsls r3, r3, #16 8025f2e: 0c1b lsrs r3, r3, #16 8025f30: 8003 strh r3, [r0, #0] 8025f32: 4770 bx lr 08025f34 : assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the Interrupt sources */ TIMx->DIER |= TIM_IT; 8025f34: 8983 ldrh r3, [r0, #12] 8025f36: b29b uxth r3, r3 /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_IT(TIM_IT)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025f38: b10a cbz r2, 8025f3e { /* Enable the Interrupt sources */ TIMx->DIER |= TIM_IT; 8025f3a: 4319 orrs r1, r3 8025f3c: e001 b.n 8025f42 } else { /* Disable the Interrupt sources */ TIMx->DIER &= (uint16_t)~TIM_IT; 8025f3e: ea23 0101 bic.w r1, r3, r1 8025f42: 8181 strh r1, [r0, #12] 8025f44: 4770 bx lr 08025f46 : { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); /* Clear the IT pending Bit */ TIMx->SR = (uint16_t)~TIM_IT; 8025f46: 43c9 mvns r1, r1 8025f48: 8201 strh r1, [r0, #16] 8025f4a: 4770 bx lr 08025f4c : * @param USARTx: where x can be 1, 2, 3, 4, 5 or 6 to select the USART or * UART peripheral. * @retval None */ void USART_DeInit(USART_TypeDef* USARTx) { 8025f4c: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); if (USARTx == USART1) 8025f4e: 4b23 ldr r3, [pc, #140] ; (8025fdc ) 8025f50: 4298 cmp r0, r3 8025f52: d105 bne.n 8025f60 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, ENABLE); 8025f54: 2010 movs r0, #16 8025f56: 2101 movs r1, #1 8025f58: f7ff fdcc bl 8025af4 RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, DISABLE); 8025f5c: 2010 movs r0, #16 8025f5e: e037 b.n 8025fd0 } else if (USARTx == USART2) 8025f60: 4b1f ldr r3, [pc, #124] ; (8025fe0 ) 8025f62: 4298 cmp r0, r3 8025f64: d107 bne.n 8025f76 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, ENABLE); 8025f66: f44f 3000 mov.w r0, #131072 ; 0x20000 8025f6a: 2101 movs r1, #1 8025f6c: f7ff fdb6 bl 8025adc RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE); 8025f70: f44f 3000 mov.w r0, #131072 ; 0x20000 8025f74: e009 b.n 8025f8a } else if (USARTx == USART3) 8025f76: 4b1b ldr r3, [pc, #108] ; (8025fe4 ) 8025f78: 4298 cmp r0, r3 8025f7a: d10b bne.n 8025f94 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE); 8025f7c: f44f 2080 mov.w r0, #262144 ; 0x40000 8025f80: 2101 movs r1, #1 8025f82: f7ff fdab bl 8025adc RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE); 8025f86: f44f 2080 mov.w r0, #262144 ; 0x40000 8025f8a: 2100 movs r1, #0 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); } } } 8025f8c: e8bd 4008 ldmia.w sp!, {r3, lr} RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE); } else if (USARTx == USART3) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE); 8025f90: f7ff bda4 b.w 8025adc } else if (USARTx == UART4) 8025f94: 4b14 ldr r3, [pc, #80] ; (8025fe8 ) 8025f96: 4298 cmp r0, r3 8025f98: d107 bne.n 8025faa { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, ENABLE); 8025f9a: f44f 2000 mov.w r0, #524288 ; 0x80000 8025f9e: 2101 movs r1, #1 8025fa0: f7ff fd9c bl 8025adc RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, DISABLE); 8025fa4: f44f 2000 mov.w r0, #524288 ; 0x80000 8025fa8: e7ef b.n 8025f8a } else if (USARTx == UART5) 8025faa: 4b10 ldr r3, [pc, #64] ; (8025fec ) 8025fac: 4298 cmp r0, r3 8025fae: d107 bne.n 8025fc0 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, ENABLE); 8025fb0: f44f 1080 mov.w r0, #1048576 ; 0x100000 8025fb4: 2101 movs r1, #1 8025fb6: f7ff fd91 bl 8025adc RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, DISABLE); 8025fba: f44f 1080 mov.w r0, #1048576 ; 0x100000 8025fbe: e7e4 b.n 8025f8a } else { if (USARTx == USART6) 8025fc0: 4b0b ldr r3, [pc, #44] ; (8025ff0 ) 8025fc2: 4298 cmp r0, r3 8025fc4: d109 bne.n 8025fda { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); 8025fc6: 2020 movs r0, #32 8025fc8: 2101 movs r1, #1 8025fca: f7ff fd93 bl 8025af4 RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8025fce: 2020 movs r0, #32 8025fd0: 2100 movs r1, #0 } } } 8025fd2: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (USARTx == USART6) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8025fd6: f7ff bd8d b.w 8025af4 8025fda: bd08 pop {r3, pc} 8025fdc: 40011000 .word 0x40011000 8025fe0: 40004400 .word 0x40004400 8025fe4: 40004800 .word 0x40004800 8025fe8: 40004c00 .word 0x40004c00 8025fec: 40005000 .word 0x40005000 8025ff0: 40011400 .word 0x40011400 08025ff4 : { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8025ff4: 8a03 ldrh r3, [r0, #16] /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; 8025ff6: 88ca ldrh r2, [r1, #6] { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8025ff8: b29b uxth r3, r3 /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); 8025ffa: f423 5340 bic.w r3, r3, #12288 ; 0x3000 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8025ffe: b530 push {r4, r5, lr} /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; /* Write to USART CR2 */ USARTx->CR2 = (uint16_t)tmpreg; 8026000: 4313 orrs r3, r2 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8026002: 460d mov r5, r1 /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; /* Write to USART CR2 */ USARTx->CR2 = (uint16_t)tmpreg; 8026004: 8203 strh r3, [r0, #16] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; 8026006: 8983 ldrh r3, [r0, #12] /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8026008: 8909 ldrh r1, [r1, #8] 802600a: 88aa ldrh r2, [r5, #4] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 802600c: f423 53b0 bic.w r3, r3, #5632 ; 0x1600 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8026010: 430a orrs r2, r1 8026012: 8969 ldrh r1, [r5, #10] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 8026014: f023 030c bic.w r3, r3, #12 8026018: 041b lsls r3, r3, #16 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 802601a: 430a orrs r2, r1 /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 802601c: 0c1b lsrs r3, r3, #16 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 802601e: b292 uxth r2, r2 USART_InitStruct->USART_Mode; /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; 8026020: 4313 orrs r3, r2 8026022: 8183 strh r3, [r0, #12] /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8026024: 8a83 ldrh r3, [r0, #20] /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; 8026026: 89aa ldrh r2, [r5, #12] /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8026028: b29b uxth r3, r3 /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); 802602a: f423 7340 bic.w r3, r3, #768 ; 0x300 /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; 802602e: 4313 orrs r3, r2 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8026030: b085 sub sp, #20 /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; 8026032: 8283 strh r3, [r0, #20] * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8026034: 4604 mov r4, r0 /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; /*---------------------------- USART BRR Configuration -----------------------*/ /* Configure the USART Baud Rate */ RCC_GetClocksFreq(&RCC_ClocksStatus); 8026036: 4668 mov r0, sp 8026038: f7ff fcb0 bl 802599c if ((USARTx == USART1) || (USARTx == USART6)) 802603c: 4b19 ldr r3, [pc, #100] ; (80260a4 ) 802603e: 429c cmp r4, r3 8026040: d003 beq.n 802604a 8026042: f503 6380 add.w r3, r3, #1024 ; 0x400 8026046: 429c cmp r4, r3 8026048: d101 bne.n 802604e { apbclock = RCC_ClocksStatus.PCLK2_Frequency; 802604a: 9b03 ldr r3, [sp, #12] 802604c: e000 b.n 8026050 } else { apbclock = RCC_ClocksStatus.PCLK1_Frequency; 802604e: 9b02 ldr r3, [sp, #8] } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8026050: 89a2 ldrh r2, [r4, #12] 8026052: b212 sxth r2, r2 8026054: 2a00 cmp r2, #0 8026056: f04f 0119 mov.w r1, #25 802605a: 682a ldr r2, [r5, #0] { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 802605c: fb01 f103 mul.w r1, r1, r3 { apbclock = RCC_ClocksStatus.PCLK1_Frequency; } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8026060: da01 bge.n 8026066 { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8026062: 0052 lsls r2, r2, #1 8026064: e000 b.n 8026068 } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { /* Integer part computing in case Oversampling mode is 16 Samples */ integerdivider = ((25 * apbclock) / (4 * (USART_InitStruct->USART_BaudRate))); 8026066: 0092 lsls r2, r2, #2 } tmpreg = (integerdivider / 100) << 4; 8026068: 2364 movs r3, #100 ; 0x64 integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { /* Integer part computing in case Oversampling mode is 16 Samples */ integerdivider = ((25 * apbclock) / (4 * (USART_InitStruct->USART_BaudRate))); 802606a: fbb1 f1f2 udiv r1, r1, r2 } tmpreg = (integerdivider / 100) << 4; 802606e: fbb1 f2f3 udiv r2, r1, r3 8026072: 0112 lsls r2, r2, #4 /* Determine the fractional part */ fractionaldivider = integerdivider - (100 * (tmpreg >> 4)); 8026074: 0910 lsrs r0, r2, #4 8026076: fb03 1110 mls r1, r3, r0, r1 /* Implement the fractional part in the register */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 802607a: 89a0 ldrh r0, [r4, #12] 802607c: b200 sxth r0, r0 802607e: 2800 cmp r0, #0 8026080: da06 bge.n 8026090 { tmpreg |= ((((fractionaldivider * 8) + 50) / 100)) & ((uint8_t)0x07); 8026082: 00c9 lsls r1, r1, #3 8026084: 3132 adds r1, #50 ; 0x32 8026086: fbb1 f3f3 udiv r3, r1, r3 802608a: f003 0307 and.w r3, r3, #7 802608e: e005 b.n 802609c } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { tmpreg |= ((((fractionaldivider * 16) + 50) / 100)) & ((uint8_t)0x0F); 8026090: 0109 lsls r1, r1, #4 8026092: 3132 adds r1, #50 ; 0x32 8026094: fbb1 f3f3 udiv r3, r1, r3 8026098: f003 030f and.w r3, r3, #15 802609c: 431a orrs r2, r3 } /* Write to USART BRR register */ USARTx->BRR = (uint16_t)tmpreg; 802609e: 8122 strh r2, [r4, #8] } 80260a0: b005 add sp, #20 80260a2: bd30 pop {r4, r5, pc} 80260a4: 40011000 .word 0x40011000 080260a8 : assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; 80260a8: 8983 ldrh r3, [r0, #12] { /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80260aa: b119 cbz r1, 80260b4 { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; 80260ac: b29b uxth r3, r3 80260ae: f443 5300 orr.w r3, r3, #8192 ; 0x2000 80260b2: e003 b.n 80260bc } else { /* Disable the selected USART by clearing the UE bit in the CR1 register */ USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_UE); 80260b4: f423 5300 bic.w r3, r3, #8192 ; 0x2000 80260b8: 041b lsls r3, r3, #16 80260ba: 0c1b lsrs r3, r3, #16 80260bc: 8183 strh r3, [r0, #12] 80260be: 4770 bx lr 080260c0 : } usartxbase = (uint32_t)USARTx; /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 80260c0: f3c1 1342 ubfx r3, r1, #5, #3 * @param NewState: new state of the specified USARTx interrupts. * This parameter can be: ENABLE or DISABLE. * @retval None */ void USART_ITConfig(USART_TypeDef* USARTx, uint16_t USART_IT, FunctionalState NewState) { 80260c4: b510 push {r4, lr} /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itpos = USART_IT & IT_MASK; itmask = (((uint32_t)0x01) << itpos); 80260c6: 2401 movs r4, #1 80260c8: f001 011f and.w r1, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 80260cc: 42a3 cmp r3, r4 /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itpos = USART_IT & IT_MASK; itmask = (((uint32_t)0x01) << itpos); 80260ce: fa04 f101 lsl.w r1, r4, r1 if (usartreg == 0x01) /* The IT is in CR1 register */ 80260d2: d101 bne.n 80260d8 { usartxbase += 0x0C; 80260d4: 300c adds r0, #12 80260d6: e004 b.n 80260e2 } else if (usartreg == 0x02) /* The IT is in CR2 register */ 80260d8: 2b02 cmp r3, #2 80260da: d101 bne.n 80260e0 { usartxbase += 0x10; 80260dc: 3010 adds r0, #16 80260de: e000 b.n 80260e2 } else /* The IT is in CR3 register */ { usartxbase += 0x14; 80260e0: 3014 adds r0, #20 } if (NewState != DISABLE) { *(__IO uint32_t*)usartxbase |= itmask; 80260e2: 6803 ldr r3, [r0, #0] } else /* The IT is in CR3 register */ { usartxbase += 0x14; } if (NewState != DISABLE) 80260e4: b10a cbz r2, 80260ea { *(__IO uint32_t*)usartxbase |= itmask; 80260e6: 4319 orrs r1, r3 80260e8: e001 b.n 80260ee } else { *(__IO uint32_t*)usartxbase &= ~itmask; 80260ea: ea23 0101 bic.w r1, r3, r1 80260ee: 6001 str r1, [r0, #0] 80260f0: bd10 pop {r4, pc} 080260f2 : * @arg USART_IT_FE: Framing Error interrupt * @arg USART_IT_PE: Parity Error interrupt * @retval The new state of USART_IT (SET or RESET). */ ITStatus USART_GetITStatus(USART_TypeDef* USARTx, uint16_t USART_IT) { 80260f2: b510 push {r4, lr} { assert_param(IS_USART_1236_PERIPH(USARTx)); } /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 80260f4: f3c1 1442 ubfx r4, r1, #5, #3 /* Get the interrupt position */ itmask = USART_IT & IT_MASK; itmask = (uint32_t)0x01 << itmask; 80260f8: 2201 movs r2, #1 80260fa: f001 031f and.w r3, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 80260fe: 2c01 cmp r4, #1 /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itmask = USART_IT & IT_MASK; itmask = (uint32_t)0x01 << itmask; 8026100: fa02 f203 lsl.w r2, r2, r3 if (usartreg == 0x01) /* The IT is in CR1 register */ 8026104: d101 bne.n 802610a { itmask &= USARTx->CR1; 8026106: 8983 ldrh r3, [r0, #12] 8026108: e003 b.n 8026112 } else if (usartreg == 0x02) /* The IT is in CR2 register */ 802610a: 2c02 cmp r4, #2 { itmask &= USARTx->CR2; 802610c: bf0c ite eq 802610e: 8a03 ldrheq r3, [r0, #16] } else /* The IT is in CR3 register */ { itmask &= USARTx->CR3; 8026110: 8a83 ldrhne r3, [r0, #20] 8026112: b29b uxth r3, r3 8026114: 4013 ands r3, r2 } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; bitpos &= USARTx->SR; 8026116: 8802 ldrh r2, [r0, #0] 8026118: b292 uxth r2, r2 if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 802611a: b143 cbz r3, 802612e { itmask &= USARTx->CR3; } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; 802611c: 2301 movs r3, #1 802611e: 0a09 lsrs r1, r1, #8 8026120: fa03 f101 lsl.w r1, r3, r1 bitpos &= USARTx->SR; if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 8026124: 4211 tst r1, r2 { bitstatus = SET; 8026126: bf0c ite eq 8026128: 2000 moveq r0, #0 802612a: 2001 movne r0, #1 802612c: bd10 pop {r4, pc} } else { bitstatus = RESET; 802612e: 4618 mov r0, r3 } return bitstatus; } 8026130: bd10 pop {r4, pc} 08026132 : { assert_param(IS_USART_1236_PERIPH(USARTx)); } bitpos = USART_IT >> 0x08; itmask = ((uint16_t)0x01 << (uint16_t)bitpos); 8026132: 0a09 lsrs r1, r1, #8 8026134: 2301 movs r3, #1 8026136: fa03 f301 lsl.w r3, r3, r1 USARTx->SR = (uint16_t)~itmask; 802613a: 43db mvns r3, r3 802613c: 8003 strh r3, [r0, #0] 802613e: 4770 bx lr 08026140 : SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */ #endif /* Reset the RCC clock configuration to the default reset state ------------*/ /* Set HSION bit */ RCC->CR |= (uint32_t)0x00000001; 8026140: 4b35 ldr r3, [pc, #212] ; (8026218 ) 8026142: 681a ldr r2, [r3, #0] 8026144: f042 0201 orr.w r2, r2, #1 8026148: 601a str r2, [r3, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 802614a: 2200 movs r2, #0 802614c: 609a str r2, [r3, #8] /* Reset HSEON, CSSON and PLLON bits */ RCC->CR &= (uint32_t)0xFEF6FFFF; 802614e: 6819 ldr r1, [r3, #0] 8026150: f021 7184 bic.w r1, r1, #17301504 ; 0x1080000 8026154: f421 3180 bic.w r1, r1, #65536 ; 0x10000 8026158: 6019 str r1, [r3, #0] /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; 802615a: 4930 ldr r1, [pc, #192] ; (802621c ) 802615c: 6059 str r1, [r3, #4] /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 802615e: 6819 ldr r1, [r3, #0] * SystemFrequency variable. * @param None * @retval None */ void SystemInit(void) { 8026160: b082 sub sp, #8 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 8026162: f421 2180 bic.w r1, r1, #262144 ; 0x40000 8026166: 6019 str r1, [r3, #0] /* Disable all interrupts */ RCC->CIR = 0x00000000; 8026168: 60da str r2, [r3, #12] static void SetSysClock(void) { /******************************************************************************/ /* PLL (clocked by HSE) used as System clock source */ /******************************************************************************/ __IO uint32_t StartUpCounter = 0, HSEStatus = 0; 802616a: 9200 str r2, [sp, #0] 802616c: 9201 str r2, [sp, #4] /* Enable HSE */ RCC->CR |= ((uint32_t)RCC_CR_HSEON); 802616e: 681a ldr r2, [r3, #0] 8026170: f442 3280 orr.w r2, r2, #65536 ; 0x10000 8026174: 601a str r2, [r3, #0] /* Wait till HSE is ready and if Time out is reached exit */ do { HSEStatus = RCC->CR & RCC_CR_HSERDY; 8026176: 681a ldr r2, [r3, #0] 8026178: f402 3200 and.w r2, r2, #131072 ; 0x20000 802617c: 9201 str r2, [sp, #4] StartUpCounter++; 802617e: 9a00 ldr r2, [sp, #0] 8026180: 3201 adds r2, #1 8026182: 9200 str r2, [sp, #0] } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); 8026184: 9a01 ldr r2, [sp, #4] 8026186: b91a cbnz r2, 8026190 8026188: 9a00 ldr r2, [sp, #0] 802618a: f5b2 6fa0 cmp.w r2, #1280 ; 0x500 802618e: d1f2 bne.n 8026176 if ((RCC->CR & RCC_CR_HSERDY) != RESET) 8026190: 4b21 ldr r3, [pc, #132] ; (8026218 ) 8026192: 681b ldr r3, [r3, #0] 8026194: f413 3300 ands.w r3, r3, #131072 ; 0x20000 { HSEStatus = (uint32_t)0x01; 8026198: bf18 it ne 802619a: 2301 movne r3, #1 } else { HSEStatus = (uint32_t)0x00; 802619c: 9301 str r3, [sp, #4] } if (HSEStatus == (uint32_t)0x01) 802619e: 9b01 ldr r3, [sp, #4] 80261a0: 2b01 cmp r3, #1 80261a2: d133 bne.n 802620c { /* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */ RCC->APB1ENR |= RCC_APB1ENR_PWREN; 80261a4: 4b1c ldr r3, [pc, #112] ; (8026218 ) 80261a6: 6c1a ldr r2, [r3, #64] ; 0x40 80261a8: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000 80261ac: 641a str r2, [r3, #64] ; 0x40 PWR->CR |= PWR_CR_VOS; 80261ae: 4a1c ldr r2, [pc, #112] ; (8026220 ) 80261b0: 6811 ldr r1, [r2, #0] 80261b2: f441 4180 orr.w r1, r1, #16384 ; 0x4000 80261b6: 6011 str r1, [r2, #0] /* HCLK = SYSCLK / 1*/ RCC->CFGR |= RCC_CFGR_HPRE_DIV1; 80261b8: 689a ldr r2, [r3, #8] 80261ba: 609a str r2, [r3, #8] /* PCLK2 = HCLK / 2*/ RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; 80261bc: 689a ldr r2, [r3, #8] 80261be: f442 4200 orr.w r2, r2, #32768 ; 0x8000 80261c2: 609a str r2, [r3, #8] /* PCLK1 = HCLK / 4*/ RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; 80261c4: 689a ldr r2, [r3, #8] 80261c6: f442 52a0 orr.w r2, r2, #5120 ; 0x1400 80261ca: 609a str r2, [r3, #8] /* Configure the main PLL */ RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | 80261cc: 4a15 ldr r2, [pc, #84] ; (8026224 ) 80261ce: 605a str r2, [r3, #4] (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); /* Enable the main PLL */ RCC->CR |= RCC_CR_PLLON; 80261d0: 681a ldr r2, [r3, #0] 80261d2: f042 7280 orr.w r2, r2, #16777216 ; 0x1000000 80261d6: 601a str r2, [r3, #0] /* Wait till the main PLL is ready */ while((RCC->CR & RCC_CR_PLLRDY) == 0) 80261d8: 6819 ldr r1, [r3, #0] 80261da: 4a0f ldr r2, [pc, #60] ; (8026218 ) 80261dc: 0189 lsls r1, r1, #6 80261de: d5fb bpl.n 80261d8 { } /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ FLASH->ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS; 80261e0: 4b11 ldr r3, [pc, #68] ; (8026228 ) 80261e2: f240 6105 movw r1, #1541 ; 0x605 80261e6: 6019 str r1, [r3, #0] /* Select the main PLL as system clock source */ RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); 80261e8: 6893 ldr r3, [r2, #8] 80261ea: f023 0303 bic.w r3, r3, #3 80261ee: 6093 str r3, [r2, #8] RCC->CFGR |= RCC_CFGR_SW_PLL; 80261f0: 6893 ldr r3, [r2, #8] 80261f2: f043 0302 orr.w r3, r3, #2 80261f6: 6093 str r3, [r2, #8] /* Wait till the main PLL is used as system clock source */ while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); 80261f8: 6891 ldr r1, [r2, #8] 80261fa: 4b07 ldr r3, [pc, #28] ; (8026218 ) 80261fc: f001 010c and.w r1, r1, #12 8026200: 2908 cmp r1, #8 8026202: d1f9 bne.n 80261f8 { } /* Добавил переход на внутренний генератор в случае отказа HSE */ RCC->CR|=RCC_CR_CSSON; 8026204: 681a ldr r2, [r3, #0] 8026206: f442 2200 orr.w r2, r2, #524288 ; 0x80000 802620a: 601a str r2, [r3, #0] /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ 802620c: 4b07 ldr r3, [pc, #28] ; (802622c ) 802620e: f04f 6200 mov.w r2, #134217728 ; 0x8000000 8026212: 609a str r2, [r3, #8] #endif } 8026214: b002 add sp, #8 8026216: 4770 bx lr 8026218: 40023800 .word 0x40023800 802621c: 24003010 .word 0x24003010 8026220: 40007000 .word 0x40007000 8026224: 07405419 .word 0x07405419 8026228: 40023c00 .word 0x40023c00 802622c: e000ed00 .word 0xe000ed00 08026230 : GPIO_TABLE(EXPAND_AS_DEFS) }; void gpio_hw_config_pin(GPIO_TypeDef *port, uint8_t pin, uint16_t conf) { uint8_t shift; shift = pin * 2; 8026230: 004b lsls r3, r1, #1 port->MODER &= ~(GPIO_MODER_MASK << shift); 8026232: b2db uxtb r3, r3 gpio_pindef_t gpio_pins[] = { GPIO_TABLE(EXPAND_AS_DEFS) }; void gpio_hw_config_pin(GPIO_TypeDef *port, uint8_t pin, uint16_t conf) { 8026234: b570 push {r4, r5, r6, lr} uint8_t shift; shift = pin * 2; port->MODER &= ~(GPIO_MODER_MASK << shift); 8026236: 2403 movs r4, #3 8026238: 6805 ldr r5, [r0, #0] 802623a: fa04 f403 lsl.w r4, r4, r3 802623e: 43e4 mvns r4, r4 8026240: 4025 ands r5, r4 8026242: 6005 str r5, [r0, #0] port->MODER |= (uint32_t)((conf >> GPIO_MODE_CFG_SHIFT) & GPIO_MODER_MASK) << shift; 8026244: 6806 ldr r6, [r0, #0] 8026246: f002 0503 and.w r5, r2, #3 802624a: fa05 f503 lsl.w r5, r5, r3 802624e: 4335 orrs r5, r6 8026250: 6005 str r5, [r0, #0] port->OTYPER &= ~(GPIO_TYPER_MASK << pin); 8026252: 6846 ldr r6, [r0, #4] 8026254: 2501 movs r5, #1 8026256: fa05 f501 lsl.w r5, r5, r1 802625a: ea26 0505 bic.w r5, r6, r5 802625e: 6045 str r5, [r0, #4] port->OTYPER |= (uint32_t)((conf >> GPIO_TYPE_CFG_SHIFT) & GPIO_TYPER_MASK) << pin; 8026260: 6845 ldr r5, [r0, #4] 8026262: f3c2 0680 ubfx r6, r2, #2, #1 8026266: fa06 f101 lsl.w r1, r6, r1 802626a: 4329 orrs r1, r5 802626c: 6041 str r1, [r0, #4] port->OSPEEDR &= ~(GPIO_SPEEDR_MASK << shift); 802626e: 6881 ldr r1, [r0, #8] 8026270: 4021 ands r1, r4 8026272: 6081 str r1, [r0, #8] port->OSPEEDR |= (uint32_t)((conf >> GPIO_SPEED_CFG_SHIFT) & GPIO_SPEEDR_MASK) << shift; 8026274: 6885 ldr r5, [r0, #8] 8026276: f3c2 1101 ubfx r1, r2, #4, #2 802627a: fa01 f103 lsl.w r1, r1, r3 802627e: 4329 orrs r1, r5 8026280: 6081 str r1, [r0, #8] port->PUPDR &= ~(GPIO_PUPDR_MASK << shift); 8026282: 68c1 ldr r1, [r0, #12] 8026284: 400c ands r4, r1 8026286: 60c4 str r4, [r0, #12] port->PUPDR |= (uint32_t)((conf >> GPIO_PUPD_CFG_SHIFT) & GPIO_PUPDR_MASK) << shift; 8026288: 68c1 ldr r1, [r0, #12] 802628a: f3c2 1281 ubfx r2, r2, #6, #2 802628e: fa02 f303 lsl.w r3, r2, r3 8026292: 430b orrs r3, r1 8026294: 60c3 str r3, [r0, #12] 8026296: bd70 pop {r4, r5, r6, pc} 08026298 : } void gpio_connect_af(gpio_t id, uint8_t af_n) { 8026298: b510 push {r4, lr} gpio_pindef_t *pin = &gpio_pins[id]; 802629a: 4b13 ldr r3, [pc, #76] ; (80262e8 ) 802629c: eb03 02c0 add.w r2, r3, r0, lsl #3 uint8_t shift; if (pin->pin < 8) { shift = pin->pin * 4; pin->port->AFR[0] &= ~((uint32_t)GPIO_AFR_MASK << shift); 80262a0: f853 3030 ldr.w r3, [r3, r0, lsl #3] } void gpio_connect_af(gpio_t id, uint8_t af_n) { gpio_pindef_t *pin = &gpio_pins[id]; uint8_t shift; if (pin->pin < 8) { 80262a4: 7912 ldrb r2, [r2, #4] 80262a6: 2a07 cmp r2, #7 80262a8: d80e bhi.n 80262c8 shift = pin->pin * 4; 80262aa: 0092 lsls r2, r2, #2 pin->port->AFR[0] &= ~((uint32_t)GPIO_AFR_MASK << shift); 80262ac: 6a1c ldr r4, [r3, #32] 80262ae: b2d2 uxtb r2, r2 80262b0: 200f movs r0, #15 80262b2: fa00 f002 lsl.w r0, r0, r2 80262b6: ea24 0000 bic.w r0, r4, r0 80262ba: 6218 str r0, [r3, #32] pin->port->AFR[0] |= af_n << shift; 80262bc: 6a18 ldr r0, [r3, #32] 80262be: fa01 f202 lsl.w r2, r1, r2 80262c2: 4302 orrs r2, r0 80262c4: 621a str r2, [r3, #32] 80262c6: bd10 pop {r4, pc} } else { shift = (pin->pin - 8) * 4; 80262c8: 3a08 subs r2, #8 80262ca: 0092 lsls r2, r2, #2 pin->port->AFR[1] &= ~((uint32_t)GPIO_AFR_MASK << shift); 80262cc: 6a5c ldr r4, [r3, #36] ; 0x24 80262ce: b2d2 uxtb r2, r2 80262d0: 200f movs r0, #15 80262d2: fa00 f002 lsl.w r0, r0, r2 80262d6: ea24 0000 bic.w r0, r4, r0 80262da: 6258 str r0, [r3, #36] ; 0x24 pin->port->AFR[1] |= af_n << shift; 80262dc: 6a58 ldr r0, [r3, #36] ; 0x24 80262de: fa01 f202 lsl.w r2, r1, r2 80262e2: 4302 orrs r2, r0 80262e4: 625a str r2, [r3, #36] ; 0x24 80262e6: bd10 pop {r4, pc} 80262e8: 200005c0 .word 0x200005c0 080262ec : } } } void gpio_set(gpio_t pin, bool value) { if (gpio_pins[pin].flags & GPIO_INV) 80262ec: 4b0e ldr r3, [pc, #56] ; (8026328 ) 80262ee: eb03 02c0 add.w r2, r3, r0, lsl #3 80262f2: 88d2 ldrh r2, [r2, #6] 80262f4: f002 0210 and.w r2, r2, #16 80262f8: b292 uxth r2, r2 80262fa: b10a cbz r2, 8026300 value = !value; 80262fc: f081 0101 eor.w r1, r1, #1 8026300: 00c2 lsls r2, r0, #3 if (value) 8026302: b141 cbz r1, 8026316 gpio_pins[pin].port->BSRRL = 1 << gpio_pins[pin].pin; 8026304: f853 1030 ldr.w r1, [r3, r0, lsl #3] 8026308: 189b adds r3, r3, r2 802630a: 2201 movs r2, #1 802630c: 791b ldrb r3, [r3, #4] 802630e: fa02 f303 lsl.w r3, r2, r3 8026312: 830b strh r3, [r1, #24] 8026314: 4770 bx lr else gpio_pins[pin].port->BSRRH = 1 << gpio_pins[pin].pin; 8026316: f853 1030 ldr.w r1, [r3, r0, lsl #3] 802631a: 189b adds r3, r3, r2 802631c: 2201 movs r2, #1 802631e: 791b ldrb r3, [r3, #4] 8026320: fa02 f303 lsl.w r3, r2, r3 8026324: 834b strh r3, [r1, #26] 8026326: 4770 bx lr 8026328: 200005c0 .word 0x200005c0 0802632c : } /* * TODO add analog flag and setup ADC pins in a proper way */ static void gpio_set_config(gpio_t id) { 802632c: b570 push {r4, r5, r6, lr} gpio_pindef_t *pin = &gpio_pins[id]; 802632e: 4e1e ldr r6, [pc, #120] ; (80263a8 ) 8026330: eb06 05c0 add.w r5, r6, r0, lsl #3 } /* * TODO add analog flag and setup ADC pins in a proper way */ static void gpio_set_config(gpio_t id) { 8026334: 4604 mov r4, r0 gpio_pindef_t *pin = &gpio_pins[id]; if (pin->flags & GPIO_AF) { 8026336: 88e9 ldrh r1, [r5, #6] 8026338: f401 7300 and.w r3, r1, #512 ; 0x200 802633c: b29b uxth r3, r3 802633e: b13b cbz r3, 8026350 uint8_t af_n = (uint8_t)(pin->flags >> _GPIO_AF_SHIFT); gpio_connect_af(id, af_n); 8026340: 0a89 lsrs r1, r1, #10 8026342: f7ff ffa9 bl 8026298 gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_AF_CFG | 8026346: f856 0034 ldr.w r0, [r6, r4, lsl #3] 802634a: 7929 ldrb r1, [r5, #4] 802634c: 2232 movs r2, #50 ; 0x32 802634e: e005 b.n 802635c GPIO_SPEED_HIGH_CFG); } else if (pin->flags & GPIO_IN) 8026350: 07cb lsls r3, r1, #31 8026352: d507 bpl.n 8026364 gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | 8026354: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8026358: 7929 ldrb r1, [r5, #4] 802635a: 2230 movs r2, #48 ; 0x30 ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } 802635c: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} gpio_connect_af(id, af_n); gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_AF_CFG | GPIO_SPEED_HIGH_CFG); } else if (pin->flags & GPIO_IN) gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | 8026360: f7ff bf66 b.w 8026230 GPIO_SPEED_HIGH_CFG); else if (pin->flags & GPIO_IN_PU) { 8026364: f001 0302 and.w r3, r1, #2 8026368: b29b uxth r3, r3 802636a: b123 cbz r3, 8026376 gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | GPIO_PU_CFG | 802636c: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8026370: 7929 ldrb r1, [r5, #4] 8026372: 2270 movs r2, #112 ; 0x70 8026374: e00d b.n 8026392 GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } else if (pin->flags & GPIO_OUT) { 8026376: f001 0304 and.w r3, r1, #4 802637a: b29b uxth r3, r3 802637c: b19b cbz r3, 80263a6 gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_OUT_CFG | 802637e: f001 0120 and.w r1, r1, #32 8026382: b28a uxth r2, r1 8026384: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8026388: 7929 ldrb r1, [r5, #4] 802638a: 2a00 cmp r2, #0 802638c: bf0c ite eq 802638e: 2231 moveq r2, #49 ; 0x31 8026390: 2235 movne r2, #53 ; 0x35 8026392: f7ff ff4d bl 8026230 ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); 8026396: 88e9 ldrh r1, [r5, #6] 8026398: 4620 mov r0, r4 802639a: f3c1 01c0 ubfx r1, r1, #3, #1 } } 802639e: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} else if (pin->flags & GPIO_OUT) { gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_OUT_CFG | ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); 80263a2: f7ff bfa3 b.w 80262ec 80263a6: bd70 pop {r4, r5, r6, pc} 80263a8: 200005c0 .word 0x200005c0 080263ac : } } void gpio_init(void) { 80263ac: b538 push {r3, r4, r5, lr} uint32_t i; GPIO_DeInit(GPIOA); 80263ae: 4812 ldr r0, [pc, #72] ; (80263f8 ) GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 80263b0: 4d12 ldr r5, [pc, #72] ; (80263fc ) uint32_t i; GPIO_DeInit(GPIOA); 80263b2: f7ff fa0b bl 80257cc GPIO_DeInit(GPIOB); 80263b6: 4812 ldr r0, [pc, #72] ; (8026400 ) 80263b8: f7ff fa08 bl 80257cc GPIO_DeInit(GPIOC); 80263bc: 4811 ldr r0, [pc, #68] ; (8026404 ) 80263be: f7ff fa05 bl 80257cc GPIO_DeInit(GPIOD); 80263c2: 4811 ldr r0, [pc, #68] ; (8026408 ) 80263c4: f7ff fa02 bl 80257cc GPIO_DeInit(GPIOE); 80263c8: 4810 ldr r0, [pc, #64] ; (802640c ) 80263ca: f7ff f9ff bl 80257cc // configure clocks RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | 80263ce: 4b10 ldr r3, [pc, #64] ; (8026410 ) 80263d0: 6b1a ldr r2, [r3, #48] ; 0x30 80263d2: f042 021f orr.w r2, r2, #31 80263d6: 631a str r2, [r3, #48] ; 0x30 RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { 80263d8: 2400 movs r4, #0 GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 80263da: eb05 03c4 add.w r3, r5, r4, lsl #3 RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { if (gpio_pins[i].flags & GPIO_NOINIT) 80263de: 88db ldrh r3, [r3, #6] 80263e0: f003 0380 and.w r3, r3, #128 ; 0x80 80263e4: b29b uxth r3, r3 80263e6: b913 cbnz r3, 80263ee continue; else { gpio_set_config(i); 80263e8: b2e0 uxtb r0, r4 80263ea: f7ff ff9f bl 802632c RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { 80263ee: 3401 adds r4, #1 80263f0: 2c13 cmp r4, #19 80263f2: d1f2 bne.n 80263da continue; else { gpio_set_config(i); } } } 80263f4: bd38 pop {r3, r4, r5, pc} 80263f6: bf00 nop 80263f8: 40020000 .word 0x40020000 80263fc: 200005c0 .word 0x200005c0 8026400: 40020400 .word 0x40020400 8026404: 40020800 .word 0x40020800 8026408: 40020c00 .word 0x40020c00 802640c: 40021000 .word 0x40021000 8026410: 40023800 .word 0x40023800 08026414 : gpio_pins[pin].port->BSRRH = 1 << gpio_pins[pin].pin; } void gpio_invert_output(gpio_t pin) { gpio_pins[pin].port->ODR ^= 1 << gpio_pins[pin].pin; 8026414: 4a06 ldr r2, [pc, #24] ; (8026430 ) 8026416: f852 3030 ldr.w r3, [r2, r0, lsl #3] 802641a: eb02 02c0 add.w r2, r2, r0, lsl #3 802641e: 6959 ldr r1, [r3, #20] 8026420: 7912 ldrb r2, [r2, #4] 8026422: 2001 movs r0, #1 8026424: fa00 f202 lsl.w r2, r0, r2 8026428: 404a eors r2, r1 802642a: 615a str r2, [r3, #20] 802642c: 4770 bx lr 802642e: bf00 nop 8026430: 200005c0 .word 0x200005c0 08026434 : } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 8026434: 490e ldr r1, [pc, #56] ; (8026470 ) 8026436: eb01 02c0 add.w r2, r1, r0, lsl #3 void gpio_invert_output(gpio_t pin) { gpio_pins[pin].port->ODR ^= 1 << gpio_pins[pin].pin; } bool gpio_get(gpio_t pin) { 802643a: b510 push {r4, lr} bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 802643c: 88d3 ldrh r3, [r2, #6] 802643e: f003 0480 and.w r4, r3, #128 ; 0x80 8026442: b2a4 uxth r4, r4 8026444: b994 cbnz r4, 802646c return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 8026446: f851 1030 ldr.w r1, [r1, r0, lsl #3] 802644a: 7912 ldrb r2, [r2, #4] 802644c: 6908 ldr r0, [r1, #16] 802644e: 2101 movs r1, #1 8026450: fa01 f102 lsl.w r1, r1, r2 8026454: 4001 ands r1, r0 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 8026456: f003 0310 and.w r3, r3, #16 bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 802645a: 40d1 lsrs r1, r2 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 802645c: b29b uxth r3, r3 bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 802645e: bf0c ite eq 8026460: 2000 moveq r0, #0 8026462: 2001 movne r0, #1 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 8026464: b11b cbz r3, 802646e 8026466: f080 0001 eor.w r0, r0, #1 802646a: bd10 pop {r4, pc} } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; 802646c: 2000 movs r0, #0 } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; } } 802646e: bd10 pop {r4, pc} 8026470: 200005c0 .word 0x200005c0 08026474 : #include "rng.h" #include "stm32f4xx.h" void RNG_Init(void) { 8026474: b508 push {r3, lr} RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG,ENABLE); 8026476: 2040 movs r0, #64 ; 0x40 8026478: 2101 movs r1, #1 802647a: f7ff faff bl 8025a7c RNG_Cmd(ENABLE); 802647e: 2001 movs r0, #1 } 8026480: e8bd 4008 ldmia.w sp!, {r3, lr} void RNG_Init(void) { RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG,ENABLE); RNG_Cmd(ENABLE); 8026484: f7ff bb56 b.w 8025b34 08026488 : } uint32_t GetRandomNumber(void) { return RNG_GetRandomNumber();; 8026488: f7ff bb60 b.w 8025b4c 0802648c : /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); } TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 802648c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { 8026490: 2901 cmp r1, #1 /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); } TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 8026492: 4603 mov r3, r0 8026494: 460e mov r6, r1 8026496: 79c0 ldrb r0, [r0, #7] TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { 8026498: d137 bne.n 802650a tmp.date = TM_RTC_BCD2BIN(data->date); tmp.month = TM_RTC_BCD2BIN(data->month); 802649a: 7a1c ldrb r4, [r3, #8] tmp.year = TM_RTC_BCD2BIN(data->year); 802649c: 7a5d ldrb r5, [r3, #9] tmp.hours = TM_RTC_BCD2BIN(data->hours); tmp.minutes = TM_RTC_BCD2BIN(data->minutes); tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 802649e: f893 8000 ldrb.w r8, [r3] TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { tmp.date = TM_RTC_BCD2BIN(data->date); 80264a2: 220a movs r2, #10 80264a4: 0901 lsrs r1, r0, #4 80264a6: f000 000f and.w r0, r0, #15 80264aa: fb02 0001 mla r0, r2, r1, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 80264ae: 0921 lsrs r1, r4, #4 80264b0: f004 040f and.w r4, r4, #15 80264b4: fb02 4101 mla r1, r2, r1, r4 tmp.year = TM_RTC_BCD2BIN(data->year); 80264b8: 092c lsrs r4, r5, #4 80264ba: f005 050f and.w r5, r5, #15 80264be: fb02 5404 mla r4, r2, r4, r5 tmp.hours = TM_RTC_BCD2BIN(data->hours); 80264c2: 795d ldrb r5, [r3, #5] 80264c4: ea4f 1c15 mov.w ip, r5, lsr #4 80264c8: f005 050f and.w r5, r5, #15 80264cc: fb02 5c0c mla ip, r2, ip, r5 tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 80264d0: 791d ldrb r5, [r3, #4] 80264d2: 092f lsrs r7, r5, #4 80264d4: f005 050f and.w r5, r5, #15 80264d8: fb02 5707 mla r7, r2, r7, r5 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 80264dc: ea4f 1518 mov.w r5, r8, lsr #4 80264e0: f008 080f and.w r8, r8, #15 80264e4: fb02 8505 mla r5, r2, r5, r8 tmp.day = TM_RTC_BCD2BIN(data->day); 80264e8: f893 8006 ldrb.w r8, [r3, #6] 80264ec: ea4f 1918 mov.w r9, r8, lsr #4 80264f0: f008 080f and.w r8, r8, #15 80264f4: fb02 8209 mla r2, r2, r9, r8 TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { tmp.date = TM_RTC_BCD2BIN(data->date); 80264f8: b2c0 uxtb r0, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 80264fa: b2c9 uxtb r1, r1 tmp.year = TM_RTC_BCD2BIN(data->year); 80264fc: b2e4 uxtb r4, r4 tmp.hours = TM_RTC_BCD2BIN(data->hours); 80264fe: fa5f fc8c uxtb.w ip, ip tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 8026502: b2ff uxtb r7, r7 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 8026504: b2ed uxtb r5, r5 tmp.day = TM_RTC_BCD2BIN(data->day); 8026506: b2d2 uxtb r2, r2 8026508: e006 b.n 8026518 } else { tmp.date = data->date; tmp.month = data->month; 802650a: 7a19 ldrb r1, [r3, #8] tmp.year = data->year; 802650c: 7a5c ldrb r4, [r3, #9] tmp.hours = data->hours; 802650e: f893 c005 ldrb.w ip, [r3, #5] tmp.minutes = data->minutes; 8026512: 791f ldrb r7, [r3, #4] tmp.seconds = data->seconds; 8026514: 781d ldrb r5, [r3, #0] tmp.day = data->day; 8026516: 799a ldrb r2, [r3, #6] } /* Check year and month */ if ( 8026518: 2c63 cmp r4, #99 ; 0x63 802651a: d86c bhi.n 80265f6 tmp.year > 99 || 802651c: 2900 cmp r1, #0 802651e: d06a beq.n 80265f6 tmp.month == 0 || 8026520: 290c cmp r1, #12 8026522: d868 bhi.n 80265f6 tmp.month > 12 || 8026524: 2800 cmp r0, #0 8026526: d066 beq.n 80265f6 tmp.date == 0 || tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 8026528: f014 0f03 tst.w r4, #3 802652c: d10a bne.n 8026544 802652e: f504 69fa add.w r9, r4, #2000 ; 0x7d0 8026532: f04f 0864 mov.w r8, #100 ; 0x64 8026536: fb99 faf8 sdiv sl, r9, r8 802653a: fb08 981a mls r8, r8, sl, r9 802653e: f1b8 0f00 cmp.w r8, #0 8026542: d10c bne.n 802655e 8026544: f504 64fa add.w r4, r4, #2000 ; 0x7d0 8026548: f44f 78c8 mov.w r8, #400 ; 0x190 802654c: fb94 f9f8 sdiv r9, r4, r8 8026550: fb08 4419 mls r4, r8, r9, r4 8026554: f1d4 0401 rsbs r4, r4, #1 8026558: bf38 it cc 802655a: 2400 movcc r4, #0 802655c: e000 b.n 8026560 802655e: 2401 movs r4, #1 8026560: f8df 80a8 ldr.w r8, [pc, #168] ; 802660c 8026564: f04f 090c mov.w r9, #12 8026568: fb09 8404 mla r4, r9, r4, r8 802656c: 1861 adds r1, r4, r1 /* Check year and month */ if ( tmp.year > 99 || tmp.month == 0 || tmp.month > 12 || tmp.date == 0 || 802656e: f811 1c01 ldrb.w r1, [r1, #-1] 8026572: 4281 cmp r1, r0 8026574: d33f bcc.n 80265f6 tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 8026576: f1bc 0f17 cmp.w ip, #23 802657a: d83c bhi.n 80265f6 tmp.hours > 23 || 802657c: 2f3b cmp r7, #59 ; 0x3b 802657e: d83a bhi.n 80265f6 tmp.minutes > 59 || 8026580: 2d3b cmp r5, #59 ; 0x3b 8026582: d838 bhi.n 80265f6 tmp.seconds > 59 || 8026584: 2a00 cmp r2, #0 8026586: d036 beq.n 80265f6 tmp.day == 0 || 8026588: 2a07 cmp r2, #7 802658a: d834 bhi.n 80265f6 /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 802658c: 795a ldrb r2, [r3, #5] 802658e: 4d1b ldr r5, [pc, #108] ; (80265fc ) RTC_TimeStruct.RTC_Minutes = data->minutes; RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 8026590: 4c1b ldr r4, [pc, #108] ; (8026600 ) /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 8026592: 702a strb r2, [r5, #0] RTC_TimeStruct.RTC_Minutes = data->minutes; 8026594: 791a ldrb r2, [r3, #4] RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 8026596: 481b ldr r0, [pc, #108] ; (8026604 ) return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; RTC_TimeStruct.RTC_Minutes = data->minutes; 8026598: 706a strb r2, [r5, #1] RTC_TimeStruct.RTC_Seconds = data->seconds; 802659a: 781a ldrb r2, [r3, #0] 802659c: 70aa strb r2, [r5, #2] /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 802659e: 79da ldrb r2, [r3, #7] 80265a0: 70a2 strb r2, [r4, #2] RTC_DateStruct.RTC_Month = data->month; 80265a2: 7a1a ldrb r2, [r3, #8] 80265a4: 7062 strb r2, [r4, #1] RTC_DateStruct.RTC_Year = data->year; 80265a6: 7a5a ldrb r2, [r3, #9] RTC_DateStruct.RTC_WeekDay = data->day; 80265a8: 799b ldrb r3, [r3, #6] RTC_TimeStruct.RTC_Minutes = data->minutes; RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; 80265aa: 70e2 strb r2, [r4, #3] RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; 80265ac: 221f movs r2, #31 RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80265ae: 2700 movs r7, #0 RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; 80265b0: 6042 str r2, [r0, #4] RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 80265b2: f502 7278 add.w r2, r2, #992 ; 0x3e0 RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; 80265b6: 7023 strb r3, [r4, #0] /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80265b8: 6007 str r7, [r0, #0] RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 80265ba: 6082 str r2, [r0, #8] RTC_Init(&RTC_InitStruct); 80265bc: f7ff fb08 bl 8025bd0 /* Set time */ if (format == TM_RTC_Format_BCD) { 80265c0: 2e01 cmp r6, #1 80265c2: d105 bne.n 80265d0 RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); 80265c4: 4630 mov r0, r6 80265c6: 4629 mov r1, r5 80265c8: f7ff fb46 bl 8025c58 RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); } /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); 80265cc: 4630 mov r0, r6 80265ce: e004 b.n 80265da /* Set time */ if (format == TM_RTC_Format_BCD) { RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); } else { RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); 80265d0: 4638 mov r0, r7 80265d2: 4629 mov r1, r5 80265d4: f7ff fb40 bl 8025c58 /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); } else { RTC_SetDate(RTC_Format_BIN, &RTC_DateStruct); 80265d8: 4638 mov r0, r7 80265da: 4621 mov r1, r4 80265dc: f7ff fbaa bl 8025d34 } if (TM_RTC_Status != RTC_STATUS_ZERO) { 80265e0: 4b09 ldr r3, [pc, #36] ; (8026608 ) 80265e2: 6818 ldr r0, [r3, #0] 80265e4: b140 cbz r0, 80265f8 /* Write backup registers */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); 80265e6: 2013 movs r0, #19 80265e8: f244 3121 movw r1, #17185 ; 0x4321 80265ec: f7ff fc0c bl 8025e08 } /* Return OK */ return TM_RTC_Result_Ok; 80265f0: 2000 movs r0, #0 80265f2: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} tmp.seconds > 59 || tmp.day == 0 || tmp.day > 7 ) { /* Invalid date */ return TM_RTC_Result_Error; 80265f6: 2001 movs r0, #1 RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); } /* Return OK */ return TM_RTC_Result_Ok; } 80265f8: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80265fc: 2000c860 .word 0x2000c860 8026600: 2000c870 .word 0x2000c870 8026604: 2000c864 .word 0x2000c864 8026608: 20000b14 .word 0x20000b14 802660c: 20000658 .word 0x20000658 08026610 : TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) { 8026610: b530 push {r4, r5, lr} TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026612: 2200 movs r2, #0 /* Return OK */ return TM_RTC_Result_Ok; } TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) { 8026614: b085 sub sp, #20 TM_RTC_t tmp; uint8_t i = 0; 8026616: 4613 mov r3, r2 /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026618: 250a movs r5, #10 TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802661a: e006 b.n 802662a tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802661c: fb05 1202 mla r2, r5, r2, r1 8026620: 3a30 subs r2, #48 ; 0x30 i++; 8026622: 3301 adds r3, #1 uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026624: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026628: b2db uxtb r3, r3 TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802662a: 5cc1 ldrb r1, [r0, r3] 802662c: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026630: 2c09 cmp r4, #9 8026632: d9f3 bls.n 802661c tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026634: 3301 adds r3, #1 8026636: f88d 2007 strb.w r2, [sp, #7] 802663a: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802663c: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802663e: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026640: e006 b.n 8026650 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026642: fb05 1202 mla r2, r5, r2, r1 8026646: 3a30 subs r2, #48 ; 0x30 i++; 8026648: 3301 adds r3, #1 i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802664a: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802664e: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026650: 5cc1 ldrb r1, [r0, r3] 8026652: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026656: 2c09 cmp r4, #9 8026658: d9f3 bls.n 8026642 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 802665a: 3301 adds r3, #1 802665c: f88d 2008 strb.w r2, [sp, #8] 8026660: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026662: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026664: 250a movs r5, #10 } i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026666: e006 b.n 8026676 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026668: fb05 1202 mla r2, r5, r2, r1 802666c: 3a30 subs r2, #48 ; 0x30 i++; 802666e: 3301 adds r3, #1 i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026670: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026674: b2db uxtb r3, r3 } i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026676: 5cc1 ldrb r1, [r0, r3] 8026678: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802667c: 2c09 cmp r4, #9 802667e: d9f3 bls.n 8026668 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026680: 3301 adds r3, #1 8026682: f88d 2009 strb.w r2, [sp, #9] 8026686: b2db uxtb r3, r3 /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026688: 2200 movs r2, #0 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802668a: 250a movs r5, #10 } i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802668c: e006 b.n 802669c tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802668e: fb05 1202 mla r2, r5, r2, r1 8026692: 3a30 subs r2, #48 ; 0x30 i++; 8026694: 3301 adds r3, #1 i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026696: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802669a: b2db uxtb r3, r3 } i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802669c: 5cc1 ldrb r1, [r0, r3] 802669e: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80266a2: 2c09 cmp r4, #9 80266a4: d9f3 bls.n 802668e tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80266a6: 3301 adds r3, #1 80266a8: f88d 2006 strb.w r2, [sp, #6] 80266ac: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80266ae: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80266b0: 250a movs r5, #10 } i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80266b2: e006 b.n 80266c2 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80266b4: fb05 1202 mla r2, r5, r2, r1 80266b8: 3a30 subs r2, #48 ; 0x30 i++; 80266ba: 3301 adds r3, #1 i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80266bc: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80266c0: b2db uxtb r3, r3 } i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80266c2: 5cc1 ldrb r1, [r0, r3] 80266c4: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80266c8: 2c09 cmp r4, #9 80266ca: d9f3 bls.n 80266b4 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80266cc: 3301 adds r3, #1 80266ce: f88d 2005 strb.w r2, [sp, #5] 80266d2: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80266d4: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80266d6: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80266d8: e006 b.n 80266e8 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80266da: fb05 1202 mla r2, r5, r2, r1 80266de: 3a30 subs r2, #48 ; 0x30 i++; 80266e0: 3301 adds r3, #1 i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80266e2: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80266e6: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80266e8: 5cc1 ldrb r1, [r0, r3] 80266ea: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80266ee: 2c09 cmp r4, #9 80266f0: d9f3 bls.n 80266da tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80266f2: 3301 adds r3, #1 80266f4: f88d 2004 strb.w r2, [sp, #4] 80266f8: b2db uxtb r3, r3 /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80266fa: 2200 movs r2, #0 tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80266fc: 250a movs r5, #10 } i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80266fe: e006 b.n 802670e tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026700: fb05 1202 mla r2, r5, r2, r1 8026704: 3a30 subs r2, #48 ; 0x30 i++; 8026706: 3301 adds r3, #1 i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026708: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802670c: b2db uxtb r3, r3 } i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802670e: 5cc1 ldrb r1, [r0, r3] 8026710: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026714: 2c09 cmp r4, #9 8026716: d9f3 bls.n 8026700 8026718: a804 add r0, sp, #16 i++; } i++; /* Return status from set date time function */ return TM_RTC_SetDateTime(&tmp, TM_RTC_Format_BIN); 802671a: 2100 movs r1, #0 802671c: f800 2d10 strb.w r2, [r0, #-16]! 8026720: 4668 mov r0, sp 8026722: f7ff feb3 bl 802648c } 8026726: b005 add sp, #20 8026728: bd30 pop {r4, r5, pc} 0802672a : uint16_t TM_RTC_GetDaysInYear(uint8_t year) { /* Return days in year */ return TM_RTC_DAYS_IN_YEAR(2000 + year); } void TM_RTC_Config(TM_RTC_ClockSource_t source) { 802672a: b508 push {r3, lr} if (source == TM_RTC_ClockSource_Internal) { 802672c: b950 cbnz r0, 8026744 /* Enable the LSI OSC */ RCC_LSICmd(ENABLE); 802672e: 2001 movs r0, #1 8026730: f7ff f92e bl 8025990 /* Wait till LSI is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET); 8026734: 2061 movs r0, #97 ; 0x61 8026736: f7ff f9e9 bl 8025b0c 802673a: 2800 cmp r0, #0 802673c: d0fa beq.n 8026734 /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI); 802673e: f44f 7000 mov.w r0, #512 ; 0x200 8026742: e00a b.n 802675a } else if (source == TM_RTC_ClockSource_External) { 8026744: 2801 cmp r0, #1 8026746: d10a bne.n 802675e /* Enable the LSE OSC */ RCC_LSEConfig(RCC_LSE_ON); 8026748: f7ff f912 bl 8025970 /* Wait till LSE is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET); 802674c: 2041 movs r0, #65 ; 0x41 802674e: f7ff f9dd bl 8025b0c 8026752: 2800 cmp r0, #0 8026754: d0fa beq.n 802674c /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); 8026756: f44f 7080 mov.w r0, #256 ; 0x100 802675a: f7ff f965 bl 8025a28 } /* Enable the RTC Clock */ RCC_RTCCLKCmd(ENABLE); 802675e: 2001 movs r0, #1 8026760: f7ff f97a bl 8025a58 /* Wait for register synchronization */ RTC_WaitForSynchro(); 8026764: f7ff fa56 bl 8025c14 /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 8026768: 2013 movs r0, #19 802676a: f241 2134 movw r1, #4660 ; 0x1234 } 802676e: e8bd 4008 ldmia.w sp!, {r3, lr} /* Wait for register synchronization */ RTC_WaitForSynchro(); /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 8026772: f7ff bb49 b.w 8025e08 8026776: 0000 movs r0, r0 08026778 : /* Enable wakeup command */ RTC_WakeUpCmd(ENABLE); } } uint32_t TM_RTC_GetUnixTimeStamp(TM_RTC_t* data) { 8026778: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} uint32_t days = 0, seconds = 0; uint16_t i; uint16_t year = (uint16_t) (data->year + 2000); 802677c: 7a42 ldrb r2, [r0, #9] 802677e: f240 73b2 movw r3, #1970 ; 0x7b2 8026782: f502 62fa add.w r2, r2, #2000 ; 0x7d0 8026786: 2100 movs r1, #0 if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); 8026788: f44f 75c8 mov.w r5, #400 ; 0x190 802678c: 2664 movs r6, #100 ; 0x64 802678e: 079c lsls r4, r3, #30 8026790: d108 bne.n 80267a4 8026792: fbb3 f4f6 udiv r4, r3, r6 8026796: fb06 3414 mls r4, r6, r4, r3 802679a: b2a4 uxth r4, r4 802679c: b114 cbz r4, 80267a4 802679e: f44f 74b7 mov.w r4, #366 ; 0x16e 80267a2: e008 b.n 80267b6 80267a4: fbb3 f4f5 udiv r4, r3, r5 80267a8: fb05 3414 mls r4, r5, r4, r3 80267ac: b2a4 uxth r4, r4 80267ae: 2c00 cmp r4, #0 80267b0: d0f5 beq.n 802679e 80267b2: f240 146d movw r4, #365 ; 0x16d /* Year is below offset year */ if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { 80267b6: 3301 adds r3, #1 80267b8: b29b uxth r3, r3 80267ba: 4293 cmp r3, r2 days += TM_RTC_DAYS_IN_YEAR(i); 80267bc: 4421 add r1, r4 /* Year is below offset year */ if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { 80267be: d3e6 bcc.n 802678e days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; 80267c0: 2364 movs r3, #100 ; 0x64 80267c2: fbb2 f7f3 udiv r7, r2, r3 80267c6: fb03 2317 mls r3, r3, r7, r2 80267ca: b29f uxth r7, r3 80267cc: f44f 73c8 mov.w r3, #400 ; 0x190 80267d0: fbb2 f4f3 udiv r4, r2, r3 80267d4: fb03 2414 mls r4, r3, r4, r2 80267d8: b2a4 uxth r4, r4 80267da: f1d4 0401 rsbs r4, r4, #1 80267de: bf38 it cc 80267e0: 2400 movcc r4, #0 /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { 80267e2: 7a06 ldrb r6, [r0, #8] days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; 80267e4: f8df c058 ldr.w ip, [pc, #88] ; 8026840 80267e8: 2300 movs r3, #0 80267ea: f002 0203 and.w r2, r2, #3 80267ee: f04f 080c mov.w r8, #12 80267f2: e00c b.n 802680e 80267f4: b922 cbnz r2, 8026800 80267f6: 2f00 cmp r7, #0 80267f8: bf0c ite eq 80267fa: 4625 moveq r5, r4 80267fc: 2501 movne r5, #1 80267fe: e000 b.n 8026802 8026800: 4625 mov r5, r4 8026802: fb08 3505 mla r5, r8, r5, r3 8026806: 3301 adds r3, #1 8026808: f81c 5005 ldrb.w r5, [ip, r5] 802680c: 1949 adds r1, r1, r5 /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { 802680e: 1c5d adds r5, r3, #1 8026810: b2ad uxth r5, r5 8026812: 42b5 cmp r5, r6 8026814: d3ee bcc.n 80267f4 days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; 8026816: 79c3 ldrb r3, [r0, #7] seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; 8026818: 7944 ldrb r4, [r0, #5] /* Days in current year */ for (i = 1; i < data->month; i++) { days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; 802681a: 3b01 subs r3, #1 802681c: 1859 adds r1, r3, r1 seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; 802681e: 7903 ldrb r3, [r0, #4] 8026820: 009a lsls r2, r3, #2 8026822: 019b lsls r3, r3, #6 8026824: 1a9a subs r2, r3, r2 days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; 8026826: f44f 6361 mov.w r3, #3600 ; 0xe10 802682a: fb03 2304 mla r3, r3, r4, r2 seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; seconds += data->seconds; 802682e: 7802 ldrb r2, [r0, #0] /* seconds = days * 86400; */ return seconds; } 8026830: 4802 ldr r0, [pc, #8] ; (802683c ) } /* Day starts with 1 */ days += data->date - 1; seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; 8026832: 189b adds r3, r3, r2 seconds += data->seconds; /* seconds = days * 86400; */ return seconds; } 8026834: fb00 3001 mla r0, r0, r1, r3 8026838: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802683c: 00015180 .word 0x00015180 8026840: 20000658 .word 0x20000658 08026844 : /* Return status from set date time function */ return TM_RTC_SetDateTime(&tmp, TM_RTC_Format_BIN); } void TM_RTC_GetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 8026844: b538 push {r3, r4, r5, lr} 8026846: 4604 mov r4, r0 uint32_t unix; /* Get time */ if (format == TM_RTC_Format_BIN) { 8026848: 460d mov r5, r1 802684a: b909 cbnz r1, 8026850 RTC_GetTime(RTC_Format_BIN, &RTC_TimeStruct); 802684c: 4608 mov r0, r1 802684e: e000 b.n 8026852 } else { RTC_GetTime(RTC_Format_BCD, &RTC_TimeStruct); 8026850: 2001 movs r0, #1 8026852: 4911 ldr r1, [pc, #68] ; (8026898 ) 8026854: f7ff fa4c bl 8025cf0 } /* Format hours */ data->hours = RTC_TimeStruct.RTC_Hours; 8026858: 4b0f ldr r3, [pc, #60] ; (8026898 ) 802685a: 781a ldrb r2, [r3, #0] 802685c: 7162 strb r2, [r4, #5] data->minutes = RTC_TimeStruct.RTC_Minutes; 802685e: 785a ldrb r2, [r3, #1] data->seconds = RTC_TimeStruct.RTC_Seconds; 8026860: 789b ldrb r3, [r3, #2] RTC_GetTime(RTC_Format_BCD, &RTC_TimeStruct); } /* Format hours */ data->hours = RTC_TimeStruct.RTC_Hours; data->minutes = RTC_TimeStruct.RTC_Minutes; 8026862: 7122 strb r2, [r4, #4] data->seconds = RTC_TimeStruct.RTC_Seconds; 8026864: 7023 strb r3, [r4, #0] /* Get subseconds */ data->subseconds = RTC->SSR; 8026866: 4b0d ldr r3, [pc, #52] ; (802689c ) 8026868: 6a9b ldr r3, [r3, #40] ; 0x28 802686a: 8063 strh r3, [r4, #2] /* Get date */ if (format == TM_RTC_Format_BIN) { 802686c: b90d cbnz r5, 8026872 RTC_GetDate(RTC_Format_BIN, &RTC_DateStruct); 802686e: 4628 mov r0, r5 8026870: e000 b.n 8026874 } else { RTC_GetDate(RTC_Format_BCD, &RTC_DateStruct); 8026872: 2001 movs r0, #1 8026874: 490a ldr r1, [pc, #40] ; (80268a0 ) 8026876: f7ff faa7 bl 8025dc8 } /* Format date */ data->year = RTC_DateStruct.RTC_Year; 802687a: 4b09 ldr r3, [pc, #36] ; (80268a0 ) 802687c: 78da ldrb r2, [r3, #3] 802687e: 7262 strb r2, [r4, #9] data->month = RTC_DateStruct.RTC_Month; 8026880: 785a ldrb r2, [r3, #1] 8026882: 7222 strb r2, [r4, #8] data->date = RTC_DateStruct.RTC_Date; 8026884: 789a ldrb r2, [r3, #2] data->day = RTC_DateStruct.RTC_WeekDay; 8026886: 781b ldrb r3, [r3, #0] } /* Format date */ data->year = RTC_DateStruct.RTC_Year; data->month = RTC_DateStruct.RTC_Month; data->date = RTC_DateStruct.RTC_Date; 8026888: 71e2 strb r2, [r4, #7] data->day = RTC_DateStruct.RTC_WeekDay; 802688a: 71a3 strb r3, [r4, #6] /* Calculate unix offset */ unix = TM_RTC_GetUnixTimeStamp(data); 802688c: 4620 mov r0, r4 802688e: f7ff ff73 bl 8026778 data->unix = unix; 8026892: 60e0 str r0, [r4, #12] 8026894: bd38 pop {r3, r4, r5, pc} 8026896: bf00 nop 8026898: 2000c860 .word 0x2000c860 802689c: 40002800 .word 0x40002800 80268a0: 2000c870 .word 0x2000c870 080268a4 : } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 80268a4: b5f0 push {r4, r5, r6, r7, lr} uint32_t status; uint8_t stat = 1; TM_RTC_t datatime; /* Enable PWR peripheral clock */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); 80268a6: 2101 movs r1, #1 } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 80268a8: b085 sub sp, #20 80268aa: 4605 mov r5, r0 uint32_t status; uint8_t stat = 1; TM_RTC_t datatime; /* Enable PWR peripheral clock */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); 80268ac: f04f 5080 mov.w r0, #268435456 ; 0x10000000 80268b0: f7ff f8f0 bl 8025a94 /* Allow access to BKP Domain */ PWR_BackupAccessCmd(ENABLE); 80268b4: 2001 movs r0, #1 80268b6: f7ff f855 bl 8025964 /* Get RTC status */ status = RTC_ReadBackupRegister(RTC_STATUS_REG); 80268ba: 2013 movs r0, #19 80268bc: f7ff fab4 bl 8025e28 if (status == RTC_STATUS_TIME_OK) 80268c0: f244 3321 movw r3, #17185 ; 0x4321 80268c4: 4298 cmp r0, r3 80268c6: 4e25 ldr r6, [pc, #148] ; (802695c ) 80268c8: d113 bne.n 80268f2 { TM_RTC_Status = RTC_STATUS_TIME_OK; 80268ca: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 80268cc: b915 cbnz r5, 80268d4 TM_RTC_Config(TM_RTC_ClockSource_Internal); 80268ce: 4628 mov r0, r5 80268d0: f7ff ff2b bl 802672a /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 80268d4: f7ff f99e bl 8025c14 /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 80268d8: f44f 4080 mov.w r0, #16384 ; 0x4000 80268dc: f7ff facc bl 8025e78 EXTI->PR = 0x00400000; 80268e0: 4b1f ldr r3, [pc, #124] ; (8026960 ) 80268e2: f44f 0280 mov.w r2, #4194304 ; 0x400000 80268e6: 615a str r2, [r3, #20] /* Get date and time */ TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); 80268e8: 4668 mov r0, sp 80268ea: 2100 movs r1, #0 80268ec: f7ff ffaa bl 8026844 80268f0: e02f b.n 8026952 } else if (status == RTC_STATUS_INIT_OK) 80268f2: f241 2734 movw r7, #4660 ; 0x1234 80268f6: 42b8 cmp r0, r7 80268f8: d10f bne.n 802691a { TM_RTC_Status = RTC_STATUS_INIT_OK; 80268fa: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 80268fc: b915 cbnz r5, 8026904 TM_RTC_Config(TM_RTC_ClockSource_Internal); 80268fe: 4628 mov r0, r5 8026900: f7ff ff13 bl 802672a /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 8026904: f7ff f986 bl 8025c14 /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 8026908: f44f 4080 mov.w r0, #16384 ; 0x4000 802690c: f7ff fab4 bl 8025e78 EXTI->PR = 0x00400000; 8026910: 4b13 ldr r3, [pc, #76] ; (8026960 ) 8026912: f44f 0280 mov.w r2, #4194304 ; 0x400000 8026916: 615a str r2, [r3, #20] 8026918: e01b b.n 8026952 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 802691a: 2400 movs r4, #0 /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 802691c: 4628 mov r0, r5 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 802691e: 6034 str r4, [r6, #0] /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 8026920: f7ff ff03 bl 802672a datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 8026924: a804 add r0, sp, #16 stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 8026926: 2301 movs r3, #1 datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 8026928: f800 4d10 strb.w r4, [r0, #-16]! /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 802692c: 4621 mov r1, r4 802692e: 4668 mov r0, sp stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 8026930: f88d 3007 strb.w r3, [sp, #7] datatime.day = 1; 8026934: f88d 3006 strb.w r3, [sp, #6] datatime.month = 1; 8026938: f88d 3008 strb.w r3, [sp, #8] datatime.year = 0; 802693c: f88d 4009 strb.w r4, [sp, #9] datatime.hours = 0; 8026940: f88d 4005 strb.w r4, [sp, #5] datatime.minutes = 0; 8026944: f88d 4004 strb.w r4, [sp, #4] datatime.seconds = 0; /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 8026948: f7ff fda0 bl 802648c /* Initialized OK */ TM_RTC_Status = RTC_STATUS_INIT_OK; 802694c: 6037 str r7, [r6, #0] } /* If first time initialized */ if (stat == RTC_STATUS_ZERO) return 0; 802694e: 4620 mov r0, r4 8026950: e001 b.n 8026956 return TM_RTC_Status; 8026952: 4b02 ldr r3, [pc, #8] ; (802695c ) 8026954: 6818 ldr r0, [r3, #0] } 8026956: b005 add sp, #20 8026958: bdf0 pop {r4, r5, r6, r7, pc} 802695a: bf00 nop 802695c: 20000b14 .word 0x20000b14 8026960: 40013c00 .word 0x40013c00 08026964 : uint16_t year; /* Store unix time to unix in struct */ data->unix = unix; /* Get seconds from unix */ data->seconds = unix % 60; 8026964: 233c movs r3, #60 ; 0x3c /* seconds = days * 86400; */ return seconds; } void TM_RTC_GetDateTimeFromUnix(TM_RTC_t* data, uint32_t unix) { 8026966: b5f0 push {r4, r5, r6, r7, lr} uint16_t year; /* Store unix time to unix in struct */ data->unix = unix; /* Get seconds from unix */ data->seconds = unix % 60; 8026968: fbb1 f4f3 udiv r4, r1, r3 /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 802696c: fbb4 f2f3 udiv r2, r4, r3 void TM_RTC_GetDateTimeFromUnix(TM_RTC_t* data, uint32_t unix) { uint16_t year; /* Store unix time to unix in struct */ data->unix = unix; 8026970: 60c1 str r1, [r0, #12] /* Get seconds from unix */ data->seconds = unix % 60; 8026972: fb03 1114 mls r1, r3, r4, r1 8026976: 7001 strb r1, [r0, #0] /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 8026978: fb03 4312 mls r3, r3, r2, r4 /* Go to hours */ unix /= 60; /* Get hours */ data->hours = unix % 24; 802697c: 2118 movs r1, #24 /* Get seconds from unix */ data->seconds = unix % 60; /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 802697e: 7103 strb r3, [r0, #4] /* Go to hours */ unix /= 60; /* Get hours */ data->hours = unix % 24; 8026980: fbb2 f3f1 udiv r3, r2, r1 8026984: fb01 2213 mls r2, r1, r3, r2 8026988: 7142 strb r2, [r0, #5] /* Go to days */ unix /= 24; /* Get week day */ /* Monday is day one */ data->day = (unix + 3) % 7 + 1; 802698a: 1cd9 adds r1, r3, #3 802698c: 2207 movs r2, #7 802698e: fbb1 f4f2 udiv r4, r1, r2 8026992: fb02 1214 mls r2, r2, r4, r1 8026996: 3201 adds r2, #1 8026998: 7182 strb r2, [r0, #6] /* Get year */ year = 1970; while (1) { if (TM_RTC_LEAP_YEAR(year)) { if (unix >= 366) { 802699a: f240 156d movw r5, #365 ; 0x16d /* Get week day */ /* Monday is day one */ data->day = (unix + 3) % 7 + 1; /* Get year */ year = 1970; 802699e: f240 72b2 movw r2, #1970 ; 0x7b2 while (1) { if (TM_RTC_LEAP_YEAR(year)) { 80269a2: f44f 71c8 mov.w r1, #400 ; 0x190 80269a6: 2464 movs r4, #100 ; 0x64 80269a8: f012 0603 ands.w r6, r2, #3 80269ac: d105 bne.n 80269ba 80269ae: fbb2 f7f4 udiv r7, r2, r4 80269b2: fb04 2717 mls r7, r4, r7, r2 80269b6: b2bf uxth r7, r7 80269b8: b92f cbnz r7, 80269c6 80269ba: fbb2 f7f1 udiv r7, r2, r1 80269be: fb01 2717 mls r7, r1, r7, r2 80269c2: b2bf uxth r7, r7 80269c4: b927 cbnz r7, 80269d0 if (unix >= 366) { 80269c6: 42ab cmp r3, r5 80269c8: d90b bls.n 80269e2 unix -= 366; 80269ca: f5a3 73b7 sub.w r3, r3, #366 ; 0x16e /* Get year */ year = 1970; while (1) { if (TM_RTC_LEAP_YEAR(year)) { if (unix >= 366) { 80269ce: e005 b.n 80269dc unix -= 366; } else { break; } } else if (unix >= 365) { 80269d0: f5b3 7fb6 cmp.w r3, #364 ; 0x16c 80269d4: d905 bls.n 80269e2 unix -= 365; 80269d6: f46f 76b6 mvn.w r6, #364 ; 0x16c 80269da: 199b adds r3, r3, r6 } else { break; } year++; 80269dc: 3201 adds r2, #1 80269de: b292 uxth r2, r2 } 80269e0: e7e2 b.n 80269a8 /* Get year in xx format */ data->year = (uint8_t) (year - 2000); 80269e2: f102 0130 add.w r1, r2, #48 ; 0x30 80269e6: 7241 strb r1, [r0, #9] /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 80269e8: 2100 movs r1, #0 80269ea: 7201 strb r1, [r0, #8] if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { 80269ec: 2164 movs r1, #100 ; 0x64 80269ee: fbb2 f7f1 udiv r7, r2, r1 80269f2: fb01 2117 mls r1, r1, r7, r2 80269f6: b28f uxth r7, r1 80269f8: f44f 71c8 mov.w r1, #400 ; 0x190 80269fc: fbb2 f4f1 udiv r4, r2, r1 8026a00: fb01 2214 mls r2, r1, r4, r2 8026a04: b292 uxth r2, r2 unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { 8026a06: 4c0c ldr r4, [pc, #48] ; (8026a38 ) year++; } /* Get year in xx format */ data->year = (uint8_t) (year - 2000); /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 8026a08: e012 b.n 8026a30 if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { 8026a0a: b906 cbnz r6, 8026a0e 8026a0c: b907 cbnz r7, 8026a10 8026a0e: b922 cbnz r2, 8026a1a 8026a10: 1865 adds r5, r4, r1 8026a12: 7b2d ldrb r5, [r5, #12] 8026a14: 42ab cmp r3, r5 8026a16: d300 bcc.n 8026a1a 8026a18: e007 b.n 8026a2a unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { 8026a1a: 5c65 ldrb r5, [r4, r1] 8026a1c: 42ab cmp r3, r5 8026a1e: d204 bcs.n 8026a2a break; } } /* Get month */ /* Month starts with 1 */ data->month++; 8026a20: 3101 adds r1, #1 /* Get date */ /* Date starts with 1 */ data->date = unix + 1; 8026a22: 3301 adds r3, #1 break; } } /* Get month */ /* Month starts with 1 */ data->month++; 8026a24: 7201 strb r1, [r0, #8] /* Get date */ /* Date starts with 1 */ data->date = unix + 1; 8026a26: 71c3 strb r3, [r0, #7] 8026a28: bdf0 pop {r4, r5, r6, r7, pc} year++; } /* Get year in xx format */ data->year = (uint8_t) (year - 2000); /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 8026a2a: 3101 adds r1, #1 if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { unix -= TM_RTC_Months[0][data->month]; 8026a2c: 1b5b subs r3, r3, r5 year++; } /* Get year in xx format */ data->year = (uint8_t) (year - 2000); /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 8026a2e: 7201 strb r1, [r0, #8] 8026a30: 7a01 ldrb r1, [r0, #8] 8026a32: 290b cmp r1, #11 8026a34: d9e9 bls.n 8026a0a 8026a36: e7f3 b.n 8026a20 8026a38: 20000658 .word 0x20000658 8026a3c: 00000000 .word 0x00000000 08026a40 : * @brief Кореектировака времени. * @param Часовой пояс * @retval */ void TM_RTC_Correction(float utc) { 8026a40: b510 push {r4, lr} 8026a42: b088 sub sp, #32 8026a44: 4604 mov r4, r0 TM_RTC_t newData; int utcSec; uint32_t unixTime; /* Получаем текущее время */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8026a46: 2100 movs r1, #0 8026a48: 4668 mov r0, sp 8026a4a: f7ff fefb bl 8026844 /* Рассчитываем поправку */ utcSec = (int)(3600.0*utc); 8026a4e: 4620 mov r0, r4 8026a50: f7f9 fd9e bl 8020590 <__aeabi_f2d> 8026a54: a308 add r3, pc, #32 ; (adr r3, 8026a78 ) 8026a56: e9d3 2300 ldrd r2, r3, [r3] 8026a5a: f7f9 fded bl 8020638 <__aeabi_dmul> 8026a5e: f7fa f885 bl 8020b6c <__aeabi_d2iz> unixTime = data.unix + utcSec; 8026a62: 9903 ldr r1, [sp, #12] 8026a64: 1841 adds r1, r0, r1 /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); 8026a66: a804 add r0, sp, #16 8026a68: f7ff ff7c bl 8026964 TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); 8026a6c: a804 add r0, sp, #16 8026a6e: 2100 movs r1, #0 8026a70: f7ff fd0c bl 802648c } 8026a74: b008 add sp, #32 8026a76: bd10 pop {r4, pc} 8026a78: 00000000 .word 0x00000000 8026a7c: 40ac2000 .word 0x40ac2000 08026a80 : return TM_RTC_Status; } void TM_RTC_SetDataTimeUnix(uint32_t unixTime) { 8026a80: b51f push {r0, r1, r2, r3, r4, lr} 8026a82: 4601 mov r1, r0 TM_RTC_t data; TM_RTC_GetDateTimeFromUnix(&data, unixTime); 8026a84: 4668 mov r0, sp 8026a86: f7ff ff6d bl 8026964 TM_RTC_SetDateTime(&data, TM_RTC_Format_BIN); 8026a8a: 4668 mov r0, sp 8026a8c: 2100 movs r1, #0 8026a8e: f7ff fcfd bl 802648c } 8026a92: b005 add sp, #20 8026a94: bd00 pop {pc} 08026a96 : /* Read data from backup register */ return *(uint32_t *)((&RTC->BKP0R) + 4 * location); } /* Callbacks */ __weak void TM_RTC_RequestHandler(void) { 8026a96: 4770 bx lr 08026a98 : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmAHandler(void) { 8026a98: 4770 bx lr 08026a9a : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmBHandler(void) { 8026a9a: 4770 bx lr 08026a9c : /* If user needs this function, then they should be defined separatelly in your project */ } /* Private RTC IRQ handlers */ void RTC_WKUP_IRQHandler(void) { 8026a9c: b508 push {r3, lr} /* Check for RTC interrupt */ if (RTC_GetITStatus(RTC_IT_WUT) != RESET) { 8026a9e: f44f 4080 mov.w r0, #16384 ; 0x4000 8026aa2: f7ff f9d1 bl 8025e48 8026aa6: b128 cbz r0, 8026ab4 /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 8026aa8: f44f 4080 mov.w r0, #16384 ; 0x4000 8026aac: f7ff f9e4 bl 8025e78 /* Call user function */ TM_RTC_RequestHandler(); 8026ab0: f7ff fff1 bl 8026a96 } /* Clear EXTI line 22 bit */ EXTI->PR = 0x00400000; 8026ab4: 4b02 ldr r3, [pc, #8] ; (8026ac0 ) 8026ab6: f44f 0280 mov.w r2, #4194304 ; 0x400000 8026aba: 615a str r2, [r3, #20] 8026abc: bd08 pop {r3, pc} 8026abe: bf00 nop 8026ac0: 40013c00 .word 0x40013c00 08026ac4 : } void RTC_Alarm_IRQHandler(void) { 8026ac4: b508 push {r3, lr} /* RTC Alarm A check */ if (RTC_GetITStatus(RTC_IT_ALRA) != RESET) { 8026ac6: f44f 5080 mov.w r0, #4096 ; 0x1000 8026aca: f7ff f9bd bl 8025e48 8026ace: b128 cbz r0, 8026adc /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRA); 8026ad0: f44f 5080 mov.w r0, #4096 ; 0x1000 8026ad4: f7ff f9d0 bl 8025e78 /* Call user function for Alarm A */ TM_RTC_AlarmAHandler(); 8026ad8: f7ff ffde bl 8026a98 } /* RTC Alarm B check */ if (RTC_GetITStatus(RTC_IT_ALRB) != RESET) { 8026adc: f44f 5000 mov.w r0, #8192 ; 0x2000 8026ae0: f7ff f9b2 bl 8025e48 8026ae4: b128 cbz r0, 8026af2 /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRB); 8026ae6: f44f 5000 mov.w r0, #8192 ; 0x2000 8026aea: f7ff f9c5 bl 8025e78 /* Call user function for Alarm B */ TM_RTC_AlarmBHandler(); 8026aee: f7ff ffd4 bl 8026a9a } /* Clear EXTI line 17 bit */ EXTI->PR = 0x00020000; 8026af2: 4b02 ldr r3, [pc, #8] ; (8026afc ) 8026af4: f44f 3200 mov.w r2, #131072 ; 0x20000 8026af8: 615a str r2, [r3, #20] 8026afa: bd08 pop {r3, pc} 8026afc: 40013c00 .word 0x40013c00 08026b00 : /** * @brief Установливает время срабатывания профилактики сульфатации */ void RTC_SetProfTime(char *str) { 8026b00: b530 push {r4, r5, lr} uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b02: 2200 movs r2, #0 /** * @brief Установливает время срабатывания профилактики сульфатации */ void RTC_SetProfTime(char *str) { 8026b04: b085 sub sp, #20 TM_RTC_t tmp; uint32_t unixTime; uint8_t i = 0; 8026b06: 4613 mov r3, r2 /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b08: 250a movs r5, #10 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b0a: e006 b.n 8026b1a tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b0c: fb05 1202 mla r2, r5, r2, r1 8026b10: 3a30 subs r2, #48 ; 0x30 i++; 8026b12: 3301 adds r3, #1 uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b14: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026b18: b2db uxtb r3, r3 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b1a: 5cc1 ldrb r1, [r0, r3] 8026b1c: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026b20: 2c09 cmp r4, #9 8026b22: d9f3 bls.n 8026b0c tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026b24: 3301 adds r3, #1 8026b26: f88d 2007 strb.w r2, [sp, #7] 8026b2a: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b2c: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b2e: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b30: e006 b.n 8026b40 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b32: fb05 1202 mla r2, r5, r2, r1 8026b36: 3a30 subs r2, #48 ; 0x30 i++; 8026b38: 3301 adds r3, #1 i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b3a: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026b3e: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b40: 5cc1 ldrb r1, [r0, r3] 8026b42: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026b46: 2c09 cmp r4, #9 8026b48: d9f3 bls.n 8026b32 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } //i++; i+=3; 8026b4a: 3303 adds r3, #3 8026b4c: f88d 2008 strb.w r2, [sp, #8] 8026b50: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b52: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b54: 250a movs r5, #10 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b56: e006 b.n 8026b66 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b58: fb05 1202 mla r2, r5, r2, r1 8026b5c: 3a30 subs r2, #48 ; 0x30 i++; 8026b5e: 3301 adds r3, #1 i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b60: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026b64: b2db uxtb r3, r3 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b66: 5cc1 ldrb r1, [r0, r3] 8026b68: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026b6c: 2c09 cmp r4, #9 8026b6e: d9f3 bls.n 8026b58 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; i++; 8026b70: 3302 adds r3, #2 8026b72: f88d 2009 strb.w r2, [sp, #9] 8026b76: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b78: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b7a: 250a movs r5, #10 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b7c: e006 b.n 8026b8c tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b7e: fb05 1202 mla r2, r5, r2, r1 8026b82: 3a30 subs r2, #48 ; 0x30 i++; 8026b84: 3301 adds r3, #1 i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026b86: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026b8a: b2db uxtb r3, r3 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b8c: 5cc1 ldrb r1, [r0, r3] 8026b8e: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026b92: 2c09 cmp r4, #9 8026b94: d9f3 bls.n 8026b7e tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026b96: 3301 adds r3, #1 8026b98: f88d 2005 strb.w r2, [sp, #5] 8026b9c: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026b9e: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026ba0: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026ba2: e006 b.n 8026bb2 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026ba4: fb05 1202 mla r2, r5, r2, r1 8026ba8: 3a30 subs r2, #48 ; 0x30 i++; 8026baa: 3301 adds r3, #1 i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026bac: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026bb0: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026bb2: 5cc1 ldrb r1, [r0, r3] 8026bb4: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026bb8: 2c09 cmp r4, #9 8026bba: d9f3 bls.n 8026ba4 i++; } i++; /* Get seconds */ tmp.seconds = 0; 8026bbc: 2300 movs r3, #0 8026bbe: f88d 3000 strb.w r3, [sp] /* Устанавливаем +1 для профилактики */ tmp.year += 1; 8026bc2: f89d 3009 ldrb.w r3, [sp, #9] 8026bc6: f88d 2004 strb.w r2, [sp, #4] 8026bca: 3301 adds r3, #1 unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 8026bcc: 4668 mov r0, sp /* Get seconds */ tmp.seconds = 0; /* Устанавливаем +1 для профилактики */ tmp.year += 1; 8026bce: f88d 3009 strb.w r3, [sp, #9] unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 8026bd2: f7ff fdd1 bl 8026778 if (location > 18) { return; } /* Write data to backup register */ *(uint32_t *)((&RTC->BKP0R) + 4 * location) = value; 8026bd6: 4b02 ldr r3, [pc, #8] ; (8026be0 ) 8026bd8: 6018 str r0, [r3, #0] /* Устанавливаем +1 для профилактики */ tmp.year += 1; unixTime = TM_RTC_GetUnixTimeStamp(&tmp); TM_RTC_WriteBackupRegister(RTC_BKP_DR0, unixTime); 8026bda: b005 add sp, #20 8026bdc: bd30 pop {r4, r5, pc} 8026bde: bf00 nop 8026be0: 40002850 .word 0x40002850 08026be4 : //static TN_MUTEX spi_mutex; static uint8_t spi_tx_rx(uint8_t byte) { while (!(SPI2->SR & SPI_SR_TXE)) {} 8026be4: 4907 ldr r1, [pc, #28] ; (8026c04 ) 8026be6: 890a ldrh r2, [r1, #8] 8026be8: 4b06 ldr r3, [pc, #24] ; (8026c04 ) 8026bea: f002 0202 and.w r2, r2, #2 8026bee: b292 uxth r2, r2 8026bf0: 2a00 cmp r2, #0 8026bf2: d0f8 beq.n 8026be6 SPI2->DR = byte; 8026bf4: 8198 strh r0, [r3, #12] while (!(SPI2->SR & SPI_SR_RXNE)) {} 8026bf6: 891a ldrh r2, [r3, #8] 8026bf8: 07d2 lsls r2, r2, #31 8026bfa: d5fc bpl.n 8026bf6 return SPI2->DR; 8026bfc: 4b01 ldr r3, [pc, #4] ; (8026c04 ) 8026bfe: 8998 ldrh r0, [r3, #12] } 8026c00: b2c0 uxtb r0, r0 8026c02: 4770 bx lr 8026c04: 40003800 .word 0x40003800 08026c08 : status = spi_tx_rx(0); } while (status & SR_WIP); SPI_FLASH_CS_H(); } static inline void send_addr(int addr) { 8026c08: b510 push {r4, lr} 8026c0a: 4604 mov r4, r0 spi_tx_rx((addr >> 16) & 0xFF); 8026c0c: f3c0 4007 ubfx r0, r0, #16, #8 8026c10: f7ff ffe8 bl 8026be4 spi_tx_rx((addr >> 8) & 0xFF); 8026c14: f3c4 2007 ubfx r0, r4, #8, #8 8026c18: f7ff ffe4 bl 8026be4 spi_tx_rx(addr & 0xFF); 8026c1c: b2e0 uxtb r0, r4 } 8026c1e: e8bd 4010 ldmia.w sp!, {r4, lr} } static inline void send_addr(int addr) { spi_tx_rx((addr >> 16) & 0xFF); spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); 8026c22: f7ff bfdf b.w 8026be4 08026c26 : } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { 8026c26: b570 push {r4, r5, r6, lr} 8026c28: 4605 mov r5, r0 8026c2a: 460c mov r4, r1 uint8_t* foo = (uint8_t *)buf; SPI_FLASH_CS_L(); 8026c2c: 2007 movs r0, #7 8026c2e: 2100 movs r1, #0 spi_tx_rx((addr >> 16) & 0xFF); spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { 8026c30: 4616 mov r6, r2 uint8_t* foo = (uint8_t *)buf; SPI_FLASH_CS_L(); 8026c32: f7ff fb5b bl 80262ec spi_tx_rx(CMD_RDSFDP); 8026c36: 205a movs r0, #90 ; 0x5a 8026c38: f7ff ffd4 bl 8026be4 send_addr(addr); 8026c3c: 4628 mov r0, r5 8026c3e: f7ff ffe3 bl 8026c08 spi_tx_rx(0); 8026c42: 2000 movs r0, #0 8026c44: f7ff ffce bl 8026be4 spi_tx_rx((addr >> 16) & 0xFF); spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { 8026c48: 19a6 adds r6, r4, r6 uint8_t* foo = (uint8_t *)buf; SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSFDP); send_addr(addr); spi_tx_rx(0); while (len--) 8026c4a: e004 b.n 8026c56 //*((uint8_t *)buf++) = spi_tx_rx(0); *(foo++) = spi_tx_rx(0); 8026c4c: 2000 movs r0, #0 8026c4e: f7ff ffc9 bl 8026be4 8026c52: f804 0b01 strb.w r0, [r4], #1 uint8_t* foo = (uint8_t *)buf; SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSFDP); send_addr(addr); spi_tx_rx(0); while (len--) 8026c56: 42b4 cmp r4, r6 8026c58: d1f8 bne.n 8026c4c //*((uint8_t *)buf++) = spi_tx_rx(0); *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 8026c5a: 2007 movs r0, #7 8026c5c: 2101 movs r1, #1 8026c5e: f7ff fb45 bl 80262ec return 0; } 8026c62: 2000 movs r0, #0 8026c64: bd70 pop {r4, r5, r6, pc} 08026c66 : spi_flash_desc_t spi_flash_desc; static inline void wait_write_enable(void) { uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 8026c66: 2007 movs r0, #7 #define SR_WEL (1 << 1) #define SR_SRWD (1 << 7) spi_flash_desc_t spi_flash_desc; static inline void wait_write_enable(void) { 8026c68: b508 push {r3, lr} uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 8026c6a: 2100 movs r1, #0 8026c6c: f7ff fb3e bl 80262ec spi_tx_rx(CMD_RDSR); 8026c70: 2005 movs r0, #5 8026c72: f7ff ffb7 bl 8026be4 do { status = spi_tx_rx(0); 8026c76: 2000 movs r0, #0 8026c78: f7ff ffb4 bl 8026be4 } while (!(status & SR_WEL)); 8026c7c: f000 0002 and.w r0, r0, #2 8026c80: b2c0 uxtb r0, r0 8026c82: 2800 cmp r0, #0 8026c84: d0f7 beq.n 8026c76 // spi_cs_up(); SPI_FLASH_CS_H(); 8026c86: 2007 movs r0, #7 8026c88: 2101 movs r1, #1 } 8026c8a: e8bd 4008 ldmia.w sp!, {r3, lr} spi_tx_rx(CMD_RDSR); do { status = spi_tx_rx(0); } while (!(status & SR_WEL)); // spi_cs_up(); SPI_FLASH_CS_H(); 8026c8e: f7ff bb2d b.w 80262ec 08026c92 : } static inline void wait_write_end(void) { uint8_t status; SPI_FLASH_CS_L(); 8026c92: 2007 movs r0, #7 } while (!(status & SR_WEL)); // spi_cs_up(); SPI_FLASH_CS_H(); } static inline void wait_write_end(void) { 8026c94: b508 push {r3, lr} uint8_t status; SPI_FLASH_CS_L(); 8026c96: 2100 movs r1, #0 8026c98: f7ff fb28 bl 80262ec spi_tx_rx(CMD_RDSR); 8026c9c: 2005 movs r0, #5 8026c9e: f7ff ffa1 bl 8026be4 do { status = spi_tx_rx(0); 8026ca2: 2000 movs r0, #0 8026ca4: f7ff ff9e bl 8026be4 } while (status & SR_WIP); 8026ca8: 07c1 lsls r1, r0, #31 8026caa: d4fa bmi.n 8026ca2 SPI_FLASH_CS_H(); 8026cac: 2007 movs r0, #7 8026cae: 2101 movs r1, #1 } 8026cb0: e8bd 4008 ldmia.w sp!, {r3, lr} SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSR); do { status = spi_tx_rx(0); } while (status & SR_WIP); SPI_FLASH_CS_H(); 8026cb4: f7ff bb1a b.w 80262ec 08026cb8 : *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 8026cb8: b570 push {r4, r5, r6, lr} 8026cba: 4605 mov r5, r0 8026cbc: 460c mov r4, r1 ssize_t ret = 0; // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; SPI_FLASH_CS_L(); 8026cbe: 2007 movs r0, #7 8026cc0: 2100 movs r1, #0 *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 8026cc2: 4616 mov r6, r2 ssize_t ret = 0; // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; SPI_FLASH_CS_L(); 8026cc4: f7ff fb12 bl 80262ec spi_tx_rx(CMD_READ); 8026cc8: 2003 movs r0, #3 8026cca: f7ff ff8b bl 8026be4 send_addr(addr); 8026cce: 4628 mov r0, r5 8026cd0: f7ff ff9a bl 8026c08 *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 8026cd4: 19a6 adds r6, r4, r6 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 8026cd6: e004 b.n 8026ce2 //*((uint8_t *)buf++) = spi_tx_rx(0); *(foo++) = spi_tx_rx(0); 8026cd8: 2000 movs r0, #0 8026cda: f7ff ff83 bl 8026be4 8026cde: f804 0b01 strb.w r0, [r4], #1 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 8026ce2: 42b4 cmp r4, r6 8026ce4: d1f8 bne.n 8026cd8 //*((uint8_t *)buf++) = spi_tx_rx(0); *(foo++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 8026ce6: 2007 movs r0, #7 8026ce8: 2101 movs r1, #1 8026cea: f7ff faff bl 80262ec // tn_mutex_unlock(&spi_mutex); return len; } 8026cee: f04f 30ff mov.w r0, #4294967295 8026cf2: bd70 pop {r4, r5, r6, pc} 08026cf4 : // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; // don't allow page wrapping ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) 8026cf4: b2c3 uxtb r3, r0 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 8026cf6: b570 push {r4, r5, r6, lr} 8026cf8: 4614 mov r4, r2 // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; // don't allow page wrapping ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) 8026cfa: 18d2 adds r2, r2, r3 8026cfc: 2aff cmp r2, #255 ; 0xff len = 0x100 - (addr & 0xFF); 8026cfe: bf88 it hi 8026d00: f5c3 7480 rsbhi r4, r3, #256 ; 0x100 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 8026d04: 4606 mov r6, r0 8026d06: 460d mov r5, r1 ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) len = 0x100 - (addr & 0xFF); ret = len; SPI_FLASH_CS_L(); 8026d08: 2007 movs r0, #7 8026d0a: 2100 movs r1, #0 8026d0c: f7ff faee bl 80262ec spi_tx_rx(CMD_WREN); 8026d10: 2006 movs r0, #6 8026d12: f7ff ff67 bl 8026be4 SPI_FLASH_CS_H(); 8026d16: 2007 movs r0, #7 8026d18: 2101 movs r1, #1 8026d1a: f7ff fae7 bl 80262ec wait_write_enable(); 8026d1e: f7ff ffa2 bl 8026c66 SPI_FLASH_CS_L(); 8026d22: 2100 movs r1, #0 8026d24: 2007 movs r0, #7 8026d26: f7ff fae1 bl 80262ec spi_tx_rx(CMD_PP); 8026d2a: 2002 movs r0, #2 8026d2c: f7ff ff5a bl 8026be4 send_addr(addr); 8026d30: 4630 mov r0, r6 8026d32: f7ff ff69 bl 8026c08 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 8026d36: 192e adds r6, r5, r4 wait_write_enable(); SPI_FLASH_CS_L(); spi_tx_rx(CMD_PP); send_addr(addr); while (len--) 8026d38: e003 b.n 8026d42 //spi_tx_rx(*((uint8_t *)buf++)); spi_tx_rx(*(foo++)); 8026d3a: f815 0b01 ldrb.w r0, [r5], #1 8026d3e: f7ff ff51 bl 8026be4 wait_write_enable(); SPI_FLASH_CS_L(); spi_tx_rx(CMD_PP); send_addr(addr); while (len--) 8026d42: 42b5 cmp r5, r6 8026d44: d1f9 bne.n 8026d3a //spi_tx_rx(*((uint8_t *)buf++)); spi_tx_rx(*(foo++)); SPI_FLASH_CS_H(); 8026d46: 2007 movs r0, #7 8026d48: 2101 movs r1, #1 8026d4a: f7ff facf bl 80262ec wait_write_end(); 8026d4e: f7ff ffa0 bl 8026c92 // tn_mutex_unlock(&spi_mutex); return ret; } 8026d52: b2a0 uxth r0, r4 8026d54: bd70 pop {r4, r5, r6, pc} 08026d56 : ssize_t spi_flash_write(int addr, const void *buf, size_t len, uint32_t timeout) { 8026d56: b5f8 push {r3, r4, r5, r6, r7, lr} 8026d58: 4607 mov r7, r0 8026d5a: 460e mov r6, r1 8026d5c: 4615 mov r5, r2 uint8_t* foo = (uint8_t *)buf; int ret = 0, offset = 0; 8026d5e: 2400 movs r4, #0 do { //ret = spi_flash_pp(addr + offset, buf + offset, len - offset, 0); ret = spi_flash_pp(addr + offset, foo + offset, len - offset, 0); 8026d60: 1938 adds r0, r7, r4 8026d62: 1931 adds r1, r6, r4 8026d64: 1b2a subs r2, r5, r4 8026d66: 2300 movs r3, #0 8026d68: f7ff ffc4 bl 8026cf4 offset += ret; 8026d6c: 1824 adds r4, r4, r0 } while (len - offset); 8026d6e: 42a5 cmp r5, r4 8026d70: d1f6 bne.n 8026d60 return 0; } 8026d72: 2000 movs r0, #0 8026d74: bdf8 pop {r3, r4, r5, r6, r7, pc} 08026d76 : wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 8026d76: b510 push {r4, lr} int ret = 0; // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; SPI_FLASH_CS_L(); 8026d78: 2100 movs r1, #0 wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 8026d7a: 4604 mov r4, r0 int ret = 0; // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; SPI_FLASH_CS_L(); 8026d7c: 2007 movs r0, #7 8026d7e: f7ff fab5 bl 80262ec spi_tx_rx(CMD_WREN); 8026d82: 2006 movs r0, #6 8026d84: f7ff ff2e bl 8026be4 SPI_FLASH_CS_H(); 8026d88: 2007 movs r0, #7 8026d8a: 2101 movs r1, #1 8026d8c: f7ff faae bl 80262ec wait_write_enable(); 8026d90: f7ff ff69 bl 8026c66 SPI_FLASH_CS_L(); 8026d94: 2100 movs r1, #0 8026d96: 2007 movs r0, #7 8026d98: f7ff faa8 bl 80262ec spi_tx_rx(CMD_SE); 8026d9c: 2020 movs r0, #32 8026d9e: f7ff ff21 bl 8026be4 send_addr(addr); 8026da2: 4620 mov r0, r4 8026da4: f7ff ff30 bl 8026c08 SPI_FLASH_CS_H(); 8026da8: 2007 movs r0, #7 8026daa: 2101 movs r1, #1 8026dac: f7ff fa9e bl 80262ec wait_write_end(); 8026db0: f7ff ff6f bl 8026c92 // tn_mutex_unlock(&spi_mutex); return 0; } 8026db4: 2000 movs r0, #0 8026db6: bd10 pop {r4, pc} 08026db8 : bool spi_flash_init(void) { 8026db8: b530 push {r4, r5, lr} uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 8026dba: 4b48 ldr r3, [pc, #288] ; (8026edc ) // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { uint32_t i, ptable, bitsize = 0; 8026dbc: 2400 movs r4, #0 // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { 8026dbe: b085 sub sp, #20 uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 8026dc0: 701c strb r4, [r3, #0] static void spi_init_(void) { // tn_mutex_create(&spi_mutex, TN_MUTEX_ATTR_INHERIT, 0); //tn_sem_create(&xact.ready, 0, 1); RCC->APB1ENR |= RCC_APB1ENR_SPI2EN; 8026dc2: 4b47 ldr r3, [pc, #284] ; (8026ee0 ) // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { uint32_t i, ptable, bitsize = 0; 8026dc4: 9402 str r4, [sp, #8] static void spi_init_(void) { // tn_mutex_create(&spi_mutex, TN_MUTEX_ATTR_INHERIT, 0); //tn_sem_create(&xact.ready, 0, 1); RCC->APB1ENR |= RCC_APB1ENR_SPI2EN; 8026dc6: 6c1a ldr r2, [r3, #64] ; 0x40 8026dc8: f442 4280 orr.w r2, r2, #16384 ; 0x4000 8026dcc: 641a str r2, [r3, #64] ; 0x40 RCC->APB1RSTR |= RCC_APB1RSTR_SPI2RST; 8026dce: 6a1a ldr r2, [r3, #32] 8026dd0: f442 4200 orr.w r2, r2, #32768 ; 0x8000 8026dd4: 621a str r2, [r3, #32] RCC->APB1RSTR &= ~RCC_APB1RSTR_SPI2RST; 8026dd6: 6a1a ldr r2, [r3, #32] 8026dd8: f422 4200 bic.w r2, r2, #32768 ; 0x8000 8026ddc: 621a str r2, [r3, #32] SPI2->CR1 &= ~SPI_CR1_SPE; 8026dde: f5a3 3300 sub.w r3, r3, #131072 ; 0x20000 spi_flash_desc.present = false; spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); 8026de2: ad03 add r5, sp, #12 RCC->APB1ENR |= RCC_APB1ENR_SPI2EN; RCC->APB1RSTR |= RCC_APB1RSTR_SPI2RST; RCC->APB1RSTR &= ~RCC_APB1RSTR_SPI2RST; SPI2->CR1 &= ~SPI_CR1_SPE; 8026de4: 881a ldrh r2, [r3, #0] 8026de6: f022 0240 bic.w r2, r2, #64 ; 0x40 8026dea: 0412 lsls r2, r2, #16 8026dec: 0c12 lsrs r2, r2, #16 8026dee: 801a strh r2, [r3, #0] //SPI2->CR1 = SPI_CR1_MSTR | SPI_CR1_BR_1 | SPI_CR1_SSM | SPI_CR1_SSI; SPI2->CR1 = SPI_CR1_MSTR | SPI_CR1_SSM | SPI_CR1_SSI; 8026df0: f44f 7241 mov.w r2, #772 ; 0x304 8026df4: 801a strh r2, [r3, #0] SPI2->CR2 = 0;//SPI_CR2_SSOE; 8026df6: 809c strh r4, [r3, #4] SPI2->CR1 |= SPI_CR1_SPE; 8026df8: 881a ldrh r2, [r3, #0] 8026dfa: b292 uxth r2, r2 8026dfc: f042 0240 orr.w r2, r2, #64 ; 0x40 8026e00: 801a strh r2, [r3, #0] spi_flash_desc.present = false; spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); 8026e02: 4620 mov r0, r4 8026e04: 2204 movs r2, #4 8026e06: 4629 mov r1, r5 8026e08: f7ff ff0d bl 8026c26 if (!(tmp[0] == 0x53 && tmp[1] == 0x46 && 8026e0c: f89d 300c ldrb.w r3, [sp, #12] 8026e10: 2b53 cmp r3, #83 ; 0x53 8026e12: d001 beq.n 8026e18 tmp[2] == 0x44 && tmp[3] == 0x50)) return 0; 8026e14: 2000 movs r0, #0 8026e16: e05e b.n 8026ed6 spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); if (!(tmp[0] == 0x53 && tmp[1] == 0x46 && 8026e18: f89d 300d ldrb.w r3, [sp, #13] 8026e1c: 2b46 cmp r3, #70 ; 0x46 8026e1e: d1f9 bne.n 8026e14 8026e20: f89d 300e ldrb.w r3, [sp, #14] 8026e24: 2b44 cmp r3, #68 ; 0x44 8026e26: d1f5 bne.n 8026e14 8026e28: f89d 300f ldrb.w r3, [sp, #15] 8026e2c: 2b50 cmp r3, #80 ; 0x50 8026e2e: d1f1 bne.n 8026e14 tmp[2] == 0x44 && tmp[3] == 0x50)) return 0; // get parameter headers count spi_flash_read_sfdp(0x06, tmp, 1); 8026e30: 2006 movs r0, #6 8026e32: 4629 mov r1, r5 8026e34: 2201 movs r2, #1 8026e36: f7ff fef6 bl 8026c26 // find first jedec pheader (with ID == 0) for (ptable = 0x08, i = 0; i <= tmp[0]; i++, ptable += 8) { 8026e3a: 2308 movs r3, #8 8026e3c: e01a b.n 8026e74 spi_flash_read_sfdp(ptable, tmp, 1); 8026e3e: 9801 ldr r0, [sp, #4] 8026e40: 4629 mov r1, r5 8026e42: 2201 movs r2, #1 8026e44: f7ff feef bl 8026c26 if (tmp[0] == 0) 8026e48: f89d 300c ldrb.w r3, [sp, #12] 8026e4c: b97b cbnz r3, 8026e6e break; } // read ptable pointer from pheader spi_flash_read_sfdp(ptable + 4, &ptable, 3); 8026e4e: a904 add r1, sp, #16 8026e50: 2203 movs r2, #3 8026e52: f851 0d0c ldr.w r0, [r1, #-12]! 8026e56: 3004 adds r0, #4 8026e58: f7ff fee5 bl 8026c26 // get flash density (size in bits) if (spi_flash_read_sfdp(ptable + 4, &bitsize, 4) < 0 || !bitsize) 8026e5c: 9801 ldr r0, [sp, #4] 8026e5e: 2204 movs r2, #4 8026e60: 3004 adds r0, #4 8026e62: a902 add r1, sp, #8 8026e64: f7ff fedf bl 8026c26 8026e68: 2800 cmp r0, #0 8026e6a: da09 bge.n 8026e80 8026e6c: e7d2 b.n 8026e14 // get parameter headers count spi_flash_read_sfdp(0x06, tmp, 1); // find first jedec pheader (with ID == 0) for (ptable = 0x08, i = 0; i <= tmp[0]; i++, ptable += 8) { 8026e6e: 9b01 ldr r3, [sp, #4] 8026e70: 3401 adds r4, #1 8026e72: 3308 adds r3, #8 8026e74: 9301 str r3, [sp, #4] 8026e76: f89d 300c ldrb.w r3, [sp, #12] 8026e7a: 429c cmp r4, r3 8026e7c: d9df bls.n 8026e3e 8026e7e: e7e6 b.n 8026e4e // read ptable pointer from pheader spi_flash_read_sfdp(ptable + 4, &ptable, 3); // get flash density (size in bits) if (spi_flash_read_sfdp(ptable + 4, &bitsize, 4) < 0 || !bitsize) 8026e80: 9b02 ldr r3, [sp, #8] 8026e82: 2b00 cmp r3, #0 8026e84: d0c6 beq.n 8026e14 8026e86: 2400 movs r4, #0 return 0; // find smallest available sector for (i = 0; i < 4; i++) { tmp[0] = 0; 8026e88: 4625 mov r5, r4 if (spi_flash_read_sfdp(ptable + 0x1C + i*2, &tmp, 2) >= 0 && 8026e8a: 9801 ldr r0, [sp, #4] if (spi_flash_read_sfdp(ptable + 4, &bitsize, 4) < 0 || !bitsize) return 0; // find smallest available sector for (i = 0; i < 4; i++) { tmp[0] = 0; 8026e8c: f88d 500c strb.w r5, [sp, #12] if (spi_flash_read_sfdp(ptable + 0x1C + i*2, &tmp, 2) >= 0 && 8026e90: 301c adds r0, #28 8026e92: 2202 movs r2, #2 8026e94: 1900 adds r0, r0, r4 8026e96: a903 add r1, sp, #12 8026e98: f7ff fec5 bl 8026c26 8026e9c: 2800 cmp r0, #0 8026e9e: db11 blt.n 8026ec4 tmp[0]) { 8026ea0: f89d 200c ldrb.w r2, [sp, #12] return 0; // find smallest available sector for (i = 0; i < 4; i++) { tmp[0] = 0; if (spi_flash_read_sfdp(ptable + 0x1C + i*2, &tmp, 2) >= 0 && 8026ea4: b172 cbz r2, 8026ec4 tmp[0]) { spi_flash_desc.sector_size = 1 << tmp[0]; 8026ea6: 4b0d ldr r3, [pc, #52] ; (8026edc ) 8026ea8: 2101 movs r1, #1 8026eaa: fa01 f102 lsl.w r1, r1, r2 8026eae: 6059 str r1, [r3, #4] spi_flash_desc.sector_erase_op = tmp[1]; 8026eb0: f89d 100d ldrb.w r1, [sp, #13] 8026eb4: 7219 strb r1, [r3, #8] spi_flash_desc.sector_count = (bitsize + 1) >> (3 + tmp[0]); 8026eb6: 9902 ldr r1, [sp, #8] 8026eb8: 3203 adds r2, #3 8026eba: 3101 adds r1, #1 8026ebc: fa21 f202 lsr.w r2, r1, r2 8026ec0: 815a strh r2, [r3, #10] break; 8026ec2: e002 b.n 8026eca 8026ec4: 3402 adds r4, #2 // get flash density (size in bits) if (spi_flash_read_sfdp(ptable + 4, &bitsize, 4) < 0 || !bitsize) return 0; // find smallest available sector for (i = 0; i < 4; i++) { 8026ec6: 2c08 cmp r4, #8 8026ec8: d1df bne.n 8026e8a spi_flash_desc.sector_erase_op = tmp[1]; spi_flash_desc.sector_count = (bitsize + 1) >> (3 + tmp[0]); break; } } if (!spi_flash_desc.sector_size) 8026eca: 4b04 ldr r3, [pc, #16] ; (8026edc ) 8026ecc: 685a ldr r2, [r3, #4] 8026ece: 2a00 cmp r2, #0 8026ed0: d0a0 beq.n 8026e14 return 0; spi_flash_desc.present = true; 8026ed2: 2001 movs r0, #1 8026ed4: 7018 strb r0, [r3, #0] return 1; } 8026ed6: b005 add sp, #20 8026ed8: bd30 pop {r4, r5, pc} 8026eda: bf00 nop 8026edc: 2000c890 .word 0x2000c890 8026ee0: 40023800 .word 0x40023800 08026ee4 : \param [in] SubPriority Subpriority value (starting from 0). \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). */ __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) { uint32_t PriorityGroupTmp = (PriorityGroup & 0x07); /* only values 0..7 are used */ 8026ee4: f000 0007 and.w r0, r0, #7 uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp; 8026ee8: f1c0 0307 rsb r3, r0, #7 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8026eec: 1d02 adds r2, r0, #4 { uint32_t PriorityGroupTmp = (PriorityGroup & 0x07); /* only values 0..7 are used */ uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp; 8026eee: 2b04 cmp r3, #4 8026ef0: bf28 it cs 8026ef2: 2304 movcs r3, #4 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8026ef4: 2a06 cmp r2, #6 8026ef6: d901 bls.n 8026efc 8026ef8: 3803 subs r0, #3 8026efa: e000 b.n 8026efe 8026efc: 2000 movs r0, #0 return ( ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) | 8026efe: 2201 movs r2, #1 8026f00: fa02 f303 lsl.w r3, r2, r3 8026f04: 3b01 subs r3, #1 8026f06: f003 0305 and.w r3, r3, #5 ((SubPriority & ((1 << (SubPriorityBits )) - 1))) ); } 8026f0a: fa03 f000 lsl.w r0, r3, r0 8026f0e: 4770 bx lr 08026f10 : uint32_t user_tx_fifo[USER_RBUF_SIZE]; SemaphoreHandle_t xSem_user_rx_buf; USART_InitTypeDef USART_InitStructure; void uart_hw_init(USART_TypeDef *uart, uint32_t baud, uint16_t wordlen, uint16_t parity, uint16_t stop) { 8026f10: b570 push {r4, r5, r6, lr} if (wordlen == 8) wordlen_tmp = USART_WordLength_8b; if (wordlen == 9) wordlen_tmp = USART_WordLength_9b; USART_InitStructure.USART_BaudRate = baud; 8026f12: 4d34 ldr r5, [pc, #208] ; (8026fe4 ) uint32_t user_tx_fifo[USER_RBUF_SIZE]; SemaphoreHandle_t xSem_user_rx_buf; USART_InitTypeDef USART_InitStructure; void uart_hw_init(USART_TypeDef *uart, uint32_t baud, uint16_t wordlen, uint16_t parity, uint16_t stop) { 8026f14: f8bd 6010 ldrh.w r6, [sp, #16] wordlen_tmp = USART_WordLength_9b; USART_InitStructure.USART_BaudRate = baud; USART_InitStructure.USART_WordLength = wordlen_tmp; USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; 8026f18: 812b strh r3, [r5, #8] void uart_hw_init(USART_TypeDef *uart, uint32_t baud, uint16_t wordlen, uint16_t parity, uint16_t stop) { uint16_t wordlen_tmp; if (wordlen == 8) wordlen_tmp = USART_WordLength_8b; if (wordlen == 9) 8026f1a: 2a09 cmp r2, #9 8026f1c: bf0c ite eq 8026f1e: f44f 5280 moveq.w r2, #4096 ; 0x1000 8026f22: 2200 movne r2, #0 USART_InitStructure.USART_BaudRate = baud; USART_InitStructure.USART_WordLength = wordlen_tmp; USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; 8026f24: 230c movs r3, #12 if (wordlen == 9) wordlen_tmp = USART_WordLength_9b; USART_InitStructure.USART_BaudRate = baud; USART_InitStructure.USART_WordLength = wordlen_tmp; USART_InitStructure.USART_StopBits = stop; 8026f26: 80ee strh r6, [r5, #6] USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8026f28: 2600 movs r6, #0 uint32_t user_tx_fifo[USER_RBUF_SIZE]; SemaphoreHandle_t xSem_user_rx_buf; USART_InitTypeDef USART_InitStructure; void uart_hw_init(USART_TypeDef *uart, uint32_t baud, uint16_t wordlen, uint16_t parity, uint16_t stop) { 8026f2a: 4604 mov r4, r0 USART_InitStructure.USART_BaudRate = baud; USART_InitStructure.USART_WordLength = wordlen_tmp; USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; 8026f2c: 816b strh r3, [r5, #10] if (wordlen == 8) wordlen_tmp = USART_WordLength_8b; if (wordlen == 9) wordlen_tmp = USART_WordLength_9b; USART_InitStructure.USART_BaudRate = baud; 8026f2e: 6029 str r1, [r5, #0] USART_InitStructure.USART_WordLength = wordlen_tmp; 8026f30: 80aa strh r2, [r5, #4] USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8026f32: 81ae strh r6, [r5, #12] USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_DeInit(uart); 8026f34: f7ff f80a bl 8025f4c if (uart == USART1) { 8026f38: 4b2b ldr r3, [pc, #172] ; (8026fe8 ) 8026f3a: 429c cmp r4, r3 8026f3c: d111 bne.n 8026f62 RCC->APB2ENR |= RCC_APB2Periph_USART1; 8026f3e: f503 3394 add.w r3, r3, #75776 ; 0x12800 8026f42: 6c5a ldr r2, [r3, #68] ; 0x44 8026f44: f042 0210 orr.w r2, r2, #16 8026f48: 645a str r2, [r3, #68] ; 0x44 \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). */ __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void) { return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos); /* read priority grouping field */ 8026f4a: 4b28 ldr r3, [pc, #160] ; (8026fec ) 8026f4c: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART1_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026f4e: f3c0 2002 ubfx r0, r0, #8, #3 8026f52: f7ff ffc7 bl 8026ee4 __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { if(IRQn < 0) { SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M System Interrupts */ else { NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */ 8026f56: 4b26 ldr r3, [pc, #152] ; (8026ff0 ) 8026f58: 0100 lsls r0, r0, #4 8026f5a: f883 0325 strb.w r0, [r3, #805] ; 0x325 \param [in] IRQn External interrupt number. Value cannot be negative. */ __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) { /* NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); enable interrupt */ NVIC->ISER[(uint32_t)((int32_t)IRQn) >> 5] = (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); /* enable interrupt */ 8026f5e: 2220 movs r2, #32 8026f60: e028 b.n 8026fb4 USART_Cmd(USART1, ENABLE); USART_ITConfig(USART1, USART_IT_RXNE, ENABLE); USART_ITConfig(USART1, USART_IT_TXE, DISABLE); } if (uart == USART2) { 8026f62: 4b24 ldr r3, [pc, #144] ; (8026ff4 ) 8026f64: 429c cmp r4, r3 8026f66: d111 bne.n 8026f8c RCC->APB1ENR |= RCC_APB1Periph_USART2; 8026f68: f503 33fa add.w r3, r3, #128000 ; 0x1f400 8026f6c: 6c1a ldr r2, [r3, #64] ; 0x40 8026f6e: f442 3200 orr.w r2, r2, #131072 ; 0x20000 8026f72: 641a str r2, [r3, #64] ; 0x40 \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). */ __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void) { return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos); /* read priority grouping field */ 8026f74: 4b1d ldr r3, [pc, #116] ; (8026fec ) 8026f76: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART2_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026f78: f3c0 2002 ubfx r0, r0, #8, #3 8026f7c: f7ff ffb2 bl 8026ee4 __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { if(IRQn < 0) { SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M System Interrupts */ else { NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */ 8026f80: 4b1b ldr r3, [pc, #108] ; (8026ff0 ) 8026f82: 0100 lsls r0, r0, #4 8026f84: f883 0326 strb.w r0, [r3, #806] ; 0x326 \param [in] IRQn External interrupt number. Value cannot be negative. */ __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) { /* NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); enable interrupt */ NVIC->ISER[(uint32_t)((int32_t)IRQn) >> 5] = (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); /* enable interrupt */ 8026f88: 2240 movs r2, #64 ; 0x40 8026f8a: e013 b.n 8026fb4 USART_Cmd(USART2, ENABLE); USART_ITConfig(USART2, USART_IT_RXNE, ENABLE); USART_ITConfig(USART2, USART_IT_TXE, DISABLE); } if (uart == USART3) { 8026f8c: 4b1a ldr r3, [pc, #104] ; (8026ff8 ) 8026f8e: 429c cmp r4, r3 8026f90: d127 bne.n 8026fe2 RCC->APB1ENR |= RCC_APB1Periph_USART3; 8026f92: f503 33f8 add.w r3, r3, #126976 ; 0x1f000 8026f96: 6c1a ldr r2, [r3, #64] ; 0x40 8026f98: f442 2280 orr.w r2, r2, #262144 ; 0x40000 8026f9c: 641a str r2, [r3, #64] ; 0x40 \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). */ __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void) { return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos); /* read priority grouping field */ 8026f9e: 4b13 ldr r3, [pc, #76] ; (8026fec ) 8026fa0: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026fa2: f3c0 2002 ubfx r0, r0, #8, #3 8026fa6: f7ff ff9d bl 8026ee4 __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { if(IRQn < 0) { SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M System Interrupts */ else { NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */ 8026faa: 4b11 ldr r3, [pc, #68] ; (8026ff0 ) 8026fac: 0100 lsls r0, r0, #4 8026fae: f883 0327 strb.w r0, [r3, #807] ; 0x327 \param [in] IRQn External interrupt number. Value cannot be negative. */ __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) { /* NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); enable interrupt */ NVIC->ISER[(uint32_t)((int32_t)IRQn) >> 5] = (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); /* enable interrupt */ 8026fb2: 2280 movs r2, #128 ; 0x80 8026fb4: 605a str r2, [r3, #4] NVIC_EnableIRQ(USART3_IRQn); USART_Init(USART3, &USART_InitStructure); 8026fb6: 4620 mov r0, r4 8026fb8: 4629 mov r1, r5 8026fba: f7ff f81b bl 8025ff4 USART_Cmd(USART3, ENABLE); 8026fbe: 4620 mov r0, r4 8026fc0: 2101 movs r1, #1 8026fc2: f7ff f871 bl 80260a8 USART_ITConfig(USART3, USART_IT_RXNE, ENABLE); 8026fc6: 4620 mov r0, r4 8026fc8: 2201 movs r2, #1 8026fca: f240 5125 movw r1, #1317 ; 0x525 8026fce: f7ff f877 bl 80260c0 USART_ITConfig(USART3, USART_IT_TXE, DISABLE); 8026fd2: 4620 mov r0, r4 8026fd4: f240 7127 movw r1, #1831 ; 0x727 8026fd8: 4632 mov r2, r6 } } 8026fda: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} NVIC_SetPriority(USART3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); NVIC_EnableIRQ(USART3_IRQn); USART_Init(USART3, &USART_InitStructure); USART_Cmd(USART3, ENABLE); USART_ITConfig(USART3, USART_IT_RXNE, ENABLE); USART_ITConfig(USART3, USART_IT_TXE, DISABLE); 8026fde: f7ff b86f b.w 80260c0 8026fe2: bd70 pop {r4, r5, r6, pc} 8026fe4: 2000d3ec .word 0x2000d3ec 8026fe8: 40011000 .word 0x40011000 8026fec: e000ed00 .word 0xe000ed00 8026ff0: e000e100 .word 0xe000e100 8026ff4: 40004400 .word 0x40004400 8026ff8: 40004800 .word 0x40004800 08026ffc : } } void InitUSART(void) { 8026ffc: b513 push {r0, r1, r4, lr} xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); 8026ffe: 2100 movs r1, #0 8027000: 2064 movs r0, #100 ; 0x64 8027002: f004 f85b bl 802b0bc 8027006: 4b1b ldr r3, [pc, #108] ; (8027074 ) rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 8027008: 491b ldr r1, [pc, #108] ; (8027078 ) USART_ITConfig(USART3, USART_IT_TXE, DISABLE); } } void InitUSART(void) { xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); 802700a: 6018 str r0, [r3, #0] rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 802700c: 2264 movs r2, #100 ; 0x64 802700e: 481b ldr r0, [pc, #108] ; (802707c ) rbuf32_init(&ups_rx_rbuf, ups_rx_fifo, UPS_RBUF_SIZE); uart_hw_init(UPS_USART, UPS_USART_BAUD, UPS_USART_WORD_LEN, UPS_USART_PARITY, UPS_USART_STOP_BIT); 8027010: 2400 movs r4, #0 } } void InitUSART(void) { xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 8027012: f002 fc4d bl 80298b0 rbuf32_init(&ups_rx_rbuf, ups_rx_fifo, UPS_RBUF_SIZE); 8027016: 2264 movs r2, #100 ; 0x64 8027018: 4819 ldr r0, [pc, #100] ; (8027080 ) 802701a: 491a ldr r1, [pc, #104] ; (8027084 ) 802701c: f002 fc48 bl 80298b0 uart_hw_init(UPS_USART, UPS_USART_BAUD, UPS_USART_WORD_LEN, UPS_USART_PARITY, UPS_USART_STOP_BIT); 8027020: 2208 movs r2, #8 8027022: 4623 mov r3, r4 8027024: 9400 str r4, [sp, #0] 8027026: 4818 ldr r0, [pc, #96] ; (8027088 ) 8027028: f44f 6116 mov.w r1, #2400 ; 0x960 802702c: f7ff ff70 bl 8026f10 xSem_user_rx_buf = xSemaphoreCreateCounting( USER_RBUF_SIZE, 0 ); 8027030: 4621 mov r1, r4 8027032: f44f 7080 mov.w r0, #256 ; 0x100 8027036: f004 f841 bl 802b0bc 802703a: 4b14 ldr r3, [pc, #80] ; (802708c ) rbuf32_init(&user_tx_rbuf, user_tx_fifo, USER_RBUF_SIZE); 802703c: 4914 ldr r1, [pc, #80] ; (8027090 ) xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); rbuf32_init(&ups_rx_rbuf, ups_rx_fifo, UPS_RBUF_SIZE); uart_hw_init(UPS_USART, UPS_USART_BAUD, UPS_USART_WORD_LEN, UPS_USART_PARITY, UPS_USART_STOP_BIT); xSem_user_rx_buf = xSemaphoreCreateCounting( USER_RBUF_SIZE, 0 ); 802703e: 6018 str r0, [r3, #0] rbuf32_init(&user_tx_rbuf, user_tx_fifo, USER_RBUF_SIZE); 8027040: f44f 7280 mov.w r2, #256 ; 0x100 8027044: 4813 ldr r0, [pc, #76] ; (8027094 ) 8027046: f002 fc33 bl 80298b0 rbuf32_init(&user_rx_rbuf, user_rx_fifo, USER_RBUF_SIZE); 802704a: 4813 ldr r0, [pc, #76] ; (8027098 ) 802704c: 4913 ldr r1, [pc, #76] ; (802709c ) 802704e: f44f 7280 mov.w r2, #256 ; 0x100 8027052: f002 fc2d bl 80298b0 uart_hw_init(USER_USART, USER_USART_BAUD, USER_USART_WORD_LEN, USER_USART_PARITY, USER_USART_STOP_BIT); 8027056: 9400 str r4, [sp, #0] 8027058: 4811 ldr r0, [pc, #68] ; (80270a0 ) 802705a: f44f 31e1 mov.w r1, #115200 ; 0x1c200 802705e: 2208 movs r2, #8 8027060: 4623 mov r3, r4 8027062: f7ff ff55 bl 8026f10 init_printf(NULL, putc_); 8027066: 490f ldr r1, [pc, #60] ; (80270a4 ) 8027068: 4620 mov r0, r4 } 802706a: b002 add sp, #8 802706c: e8bd 4010 ldmia.w sp!, {r4, lr} xSem_user_rx_buf = xSemaphoreCreateCounting( USER_RBUF_SIZE, 0 ); rbuf32_init(&user_tx_rbuf, user_tx_fifo, USER_RBUF_SIZE); rbuf32_init(&user_rx_rbuf, user_rx_fifo, USER_RBUF_SIZE); uart_hw_init(USER_USART, USER_USART_BAUD, USER_USART_WORD_LEN, USER_USART_PARITY, USER_USART_STOP_BIT); init_printf(NULL, putc_); 8027070: f000 bde4 b.w 8027c3c 8027074: 2000d40c .word 0x2000d40c 8027078: 2000c8bc .word 0x2000c8bc 802707c: 2000d3dc .word 0x2000d3dc 8027080: 2000c8ac .word 0x2000c8ac 8027084: 2000d24c .word 0x2000d24c 8027088: 40004400 .word 0x40004400 802708c: 2000d410 .word 0x2000d410 8027090: 2000ca4c .word 0x2000ca4c 8027094: 2000d3fc .word 0x2000d3fc 8027098: 2000c89c .word 0x2000c89c 802709c: 2000ce4c .word 0x2000ce4c 80270a0: 40011000 .word 0x40011000 80270a4: 08027139 .word 0x08027139 080270a8 : } int ups_send_block(void *data, uint8_t len) { int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; 80270a8: 4a0f ldr r2, [pc, #60] ; (80270e8 ) 80270aa: 8993 ldrh r3, [r2, #12] 80270ac: f023 0380 bic.w r3, r3, #128 ; 0x80 80270b0: 041b lsls r3, r3, #16 80270b2: 0c1b lsrs r3, r3, #16 rbuf32_put(&ups_tx_rbuf, (uint32_t)(byte)); } UPS_USART->CR1 |= USART_CR1_TXEIE; } int ups_send_block(void *data, uint8_t len) { 80270b4: b570 push {r4, r5, r6, lr} 80270b6: 4606 mov r6, r0 80270b8: 460d mov r5, r1 int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; 80270ba: 8193 strh r3, [r2, #12] } UPS_USART->CR1 |= USART_CR1_TXEIE; } int ups_send_block(void *data, uint8_t len) { int i = 0; 80270bc: 2400 movs r4, #0 uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; //DBG printf("STOP \r\n"); while (i < len) { 80270be: e008 b.n 80270d2 if (!rbuf_isfull(&ups_tx_rbuf)) { 80270c0: 480a ldr r0, [pc, #40] ; (80270ec ) 80270c2: f002 fbfb bl 80298bc 80270c6: b930 cbnz r0, 80270d6 s_temp = ((uint8_t *)data)[i++]; 80270c8: 5d31 ldrb r1, [r6, r4] rbuf32_put(&ups_tx_rbuf, s_temp); 80270ca: 4808 ldr r0, [pc, #32] ; (80270ec ) uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; //DBG printf("STOP \r\n"); while (i < len) { if (!rbuf_isfull(&ups_tx_rbuf)) { s_temp = ((uint8_t *)data)[i++]; 80270cc: 3401 adds r4, #1 rbuf32_put(&ups_tx_rbuf, s_temp); 80270ce: f002 fc16 bl 80298fe int ups_send_block(void *data, uint8_t len) { int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; //DBG printf("STOP \r\n"); while (i < len) { 80270d2: 42ac cmp r4, r5 80270d4: dbf4 blt.n 80270c0 rbuf32_put(&ups_tx_rbuf, s_temp); } else break; } UPS_USART->CR1 |= USART_CR1_TXEIE; 80270d6: 4b04 ldr r3, [pc, #16] ; (80270e8 ) 80270d8: 899a ldrh r2, [r3, #12] 80270da: b292 uxth r2, r2 80270dc: f042 0280 orr.w r2, r2, #128 ; 0x80 80270e0: 819a strh r2, [r3, #12] return i; } 80270e2: 4620 mov r0, r4 80270e4: bd70 pop {r4, r5, r6, pc} 80270e6: bf00 nop 80270e8: 40004400 .word 0x40004400 80270ec: 2000d3dc .word 0x2000d3dc 080270f0 : int ups_getchar(unsigned int timeout) { int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 80270f0: 4b09 ldr r3, [pc, #36] ; (8027118 ) } UPS_USART->CR1 |= USART_CR1_TXEIE; return i; } int ups_getchar(unsigned int timeout) { 80270f2: b507 push {r0, r1, r2, lr} int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 80270f4: 2100 movs r1, #0 } UPS_USART->CR1 |= USART_CR1_TXEIE; return i; } int ups_getchar(unsigned int timeout) { 80270f6: 4602 mov r2, r0 int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 80270f8: 6818 ldr r0, [r3, #0] 80270fa: 460b mov r3, r1 80270fc: f004 f934 bl 802b368 8027100: 9001 str r0, [sp, #4] if (res == pdFALSE) { 8027102: b128 cbz r0, 8027110 return -1; } rbuf32_get(&ups_rx_rbuf, (uint32_t*)&res); 8027104: 4805 ldr r0, [pc, #20] ; (802711c ) 8027106: a901 add r1, sp, #4 8027108: f002 fbe4 bl 80298d4 // DBG printf("STOP \r\n"); // DBG printf("wr: %d 0x%x\r\n", rs485_rx_rbuf.read_index,res); return res; 802710c: 9801 ldr r0, [sp, #4] 802710e: e001 b.n 8027114 int ups_getchar(unsigned int timeout) { int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); if (res == pdFALSE) { return -1; 8027110: f04f 30ff mov.w r0, #4294967295 } rbuf32_get(&ups_rx_rbuf, (uint32_t*)&res); // DBG printf("STOP \r\n"); // DBG printf("wr: %d 0x%x\r\n", rs485_rx_rbuf.read_index,res); return res; } 8027114: bd0e pop {r1, r2, r3, pc} 8027116: bf00 nop 8027118: 2000d40c .word 0x2000d40c 802711c: 2000c8ac .word 0x2000c8ac 08027120 : // DBG printf("wr: %d 0x%x\r\n", rs485_rx_rbuf.read_index,res); return res; } void putchar_(uint8_t c) { while (!(USER_USART->SR & USART_FLAG_TXE)); 8027120: 4a04 ldr r2, [pc, #16] ; (8027134 ) 8027122: 8813 ldrh r3, [r2, #0] 8027124: f003 0380 and.w r3, r3, #128 ; 0x80 8027128: b29b uxth r3, r3 802712a: 2b00 cmp r3, #0 802712c: d0f9 beq.n 8027122 USER_USART->DR = (uint16_t)c; 802712e: 4b01 ldr r3, [pc, #4] ; (8027134 ) 8027130: 8098 strh r0, [r3, #4] 8027132: 4770 bx lr 8027134: 40011000 .word 0x40011000 08027138 : } void putc_(void* p, char c) { (void)p; putchar_(c); 8027138: 4608 mov r0, r1 802713a: f7ff bff1 b.w 8027120 802713e: 0000 movs r0, r0 08027140 : } //inline void rs232_irq_handler(void) void service_rs232_irq_handler(void) { 8027140: b513 push {r0, r1, r4, lr} uint32_t c = 0; 8027142: 2300 movs r3, #0 8027144: 9301 str r3, [sp, #4] static BaseType_t xHigherPriorityTaskWoken = pdFALSE; if ((USER_USART->SR & USART_SR_ORE)) { 8027146: 4b26 ldr r3, [pc, #152] ; (80271e0 ) 8027148: 881a ldrh r2, [r3, #0] 802714a: f002 0208 and.w r2, r2, #8 802714e: b292 uxth r2, r2 8027150: b112 cbz r2, 8027158 c = (uint32_t)USER_USART->DR; 8027152: 889b ldrh r3, [r3, #4] 8027154: b29b uxth r3, r3 8027156: 9301 str r3, [sp, #4] //DBG printf("overrunRS485\r\n"); } if (USART_GetITStatus(USER_USART, USART_IT_TXE) != RESET) { 8027158: 4c21 ldr r4, [pc, #132] ; (80271e0 ) 802715a: f240 7127 movw r1, #1831 ; 0x727 802715e: 4620 mov r0, r4 8027160: f7fe ffc7 bl 80260f2 8027164: b1c0 cbz r0, 8027198 if(rbuf32_get(&user_tx_rbuf, &c)) { 8027166: 481f ldr r0, [pc, #124] ; (80271e4 ) 8027168: a901 add r1, sp, #4 802716a: f002 fbb3 bl 80298d4 802716e: b118 cbz r0, 8027178 USER_USART->DR = (uint16_t)c; 8027170: f8bd 3004 ldrh.w r3, [sp, #4] 8027174: 80a3 strh r3, [r4, #4] 8027176: e00a b.n 802718e //DBG printf("wr: %d 0x%x\r\n", rs485_tx_rbuf.read_index,c); } else { USER_USART->CR1 &= ~USART_CR1_TXEIE; 8027178: 89a3 ldrh r3, [r4, #12] 802717a: f023 0380 bic.w r3, r3, #128 ; 0x80 802717e: 041b lsls r3, r3, #16 8027180: 0c1b lsrs r3, r3, #16 8027182: 81a3 strh r3, [r4, #12] USER_USART->CR1 |= USART_CR1_RXNEIE; 8027184: 89a3 ldrh r3, [r4, #12] 8027186: b29b uxth r3, r3 8027188: f043 0320 orr.w r3, r3, #32 802718c: 81a3 strh r3, [r4, #12] } USART_ClearITPendingBit(USER_USART, USART_IT_TXE); 802718e: 4814 ldr r0, [pc, #80] ; (80271e0 ) 8027190: f240 7127 movw r1, #1831 ; 0x727 8027194: f7fe ffcd bl 8026132 } if(USART_GetITStatus(USER_USART, USART_IT_RXNE) != RESET) 8027198: 4c11 ldr r4, [pc, #68] ; (80271e0 ) 802719a: f240 5125 movw r1, #1317 ; 0x525 802719e: 4620 mov r0, r4 80271a0: f7fe ffa7 bl 80260f2 80271a4: b1d8 cbz r0, 80271de { c = (uint32_t)USER_USART->DR; 80271a6: 88a3 ldrh r3, [r4, #4] //DBG printf("read: %d 0x%x\r\n", rs485_rx_rbuf.write_index,c); if (!rbuf_isfull(&user_rx_rbuf)) 80271a8: 480f ldr r0, [pc, #60] ; (80271e8 ) } USART_ClearITPendingBit(USER_USART, USART_IT_TXE); } if(USART_GetITStatus(USER_USART, USART_IT_RXNE) != RESET) { c = (uint32_t)USER_USART->DR; 80271aa: b29b uxth r3, r3 80271ac: 9301 str r3, [sp, #4] //DBG printf("read: %d 0x%x\r\n", rs485_rx_rbuf.write_index,c); if (!rbuf_isfull(&user_rx_rbuf)) 80271ae: f002 fb85 bl 80298bc 80271b2: b918 cbnz r0, 80271bc rbuf32_put(&user_rx_rbuf, c); 80271b4: 480c ldr r0, [pc, #48] ; (80271e8 ) 80271b6: 9901 ldr r1, [sp, #4] 80271b8: f002 fba1 bl 80298fe USART_ClearITPendingBit(USER_USART, USART_IT_RXNE); 80271bc: 4808 ldr r0, [pc, #32] ; (80271e0 ) xSemaphoreGiveFromISR(xSem_user_rx_buf, &xHigherPriorityTaskWoken); 80271be: 4c0b ldr r4, [pc, #44] ; (80271ec ) { c = (uint32_t)USER_USART->DR; //DBG printf("read: %d 0x%x\r\n", rs485_rx_rbuf.write_index,c); if (!rbuf_isfull(&user_rx_rbuf)) rbuf32_put(&user_rx_rbuf, c); USART_ClearITPendingBit(USER_USART, USART_IT_RXNE); 80271c0: f240 5125 movw r1, #1317 ; 0x525 80271c4: f7fe ffb5 bl 8026132 xSemaphoreGiveFromISR(xSem_user_rx_buf, &xHigherPriorityTaskWoken); 80271c8: 4b09 ldr r3, [pc, #36] ; (80271f0 ) 80271ca: 4621 mov r1, r4 80271cc: 6818 ldr r0, [r3, #0] 80271ce: f004 f899 bl 802b304 portYIELD_FROM_ISR(xHigherPriorityTaskWoken); 80271d2: 6823 ldr r3, [r4, #0] 80271d4: b11b cbz r3, 80271de 80271d6: 4b07 ldr r3, [pc, #28] ; (80271f4 ) 80271d8: f04f 5280 mov.w r2, #268435456 ; 0x10000000 80271dc: 601a str r2, [r3, #0] } } 80271de: bd1c pop {r2, r3, r4, pc} 80271e0: 40011000 .word 0x40011000 80271e4: 2000d3fc .word 0x2000d3fc 80271e8: 2000c89c .word 0x2000c89c 80271ec: 20000b18 .word 0x20000b18 80271f0: 2000d410 .word 0x2000d410 80271f4: e000ed04 .word 0xe000ed04 080271f8 : //inline void rs232_irq_handler(void) void rs232_irq_handler(void) { 80271f8: b513 push {r0, r1, r4, lr} uint32_t c = 0; 80271fa: 2300 movs r3, #0 80271fc: 9301 str r3, [sp, #4] static BaseType_t xHigherPriorityTaskWoken = pdFALSE; if ((UPS_USART->SR & USART_SR_ORE)) { 80271fe: 4b26 ldr r3, [pc, #152] ; (8027298 ) 8027200: 881a ldrh r2, [r3, #0] 8027202: f002 0208 and.w r2, r2, #8 8027206: b292 uxth r2, r2 8027208: b112 cbz r2, 8027210 c = (uint32_t)UPS_USART->DR; 802720a: 889b ldrh r3, [r3, #4] 802720c: b29b uxth r3, r3 802720e: 9301 str r3, [sp, #4] //DBG printf("overrunRS485\r\n"); } if (USART_GetITStatus(UPS_USART, USART_IT_TXE) != RESET) { 8027210: 4c21 ldr r4, [pc, #132] ; (8027298 ) 8027212: f240 7127 movw r1, #1831 ; 0x727 8027216: 4620 mov r0, r4 8027218: f7fe ff6b bl 80260f2 802721c: b1c0 cbz r0, 8027250 if(rbuf32_get(&ups_tx_rbuf, &c)) { 802721e: 481f ldr r0, [pc, #124] ; (802729c ) 8027220: a901 add r1, sp, #4 8027222: f002 fb57 bl 80298d4 8027226: b118 cbz r0, 8027230 UPS_USART->DR = (uint16_t)c; 8027228: f8bd 3004 ldrh.w r3, [sp, #4] 802722c: 80a3 strh r3, [r4, #4] 802722e: e00a b.n 8027246 //DBG printf("wr: %d 0x%x\r\n", rs485_tx_rbuf.read_index,c); } else { UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8027230: 89a3 ldrh r3, [r4, #12] 8027232: f023 0380 bic.w r3, r3, #128 ; 0x80 8027236: 041b lsls r3, r3, #16 8027238: 0c1b lsrs r3, r3, #16 802723a: 81a3 strh r3, [r4, #12] UPS_USART->CR1 |= USART_CR1_RXNEIE; 802723c: 89a3 ldrh r3, [r4, #12] 802723e: b29b uxth r3, r3 8027240: f043 0320 orr.w r3, r3, #32 8027244: 81a3 strh r3, [r4, #12] } USART_ClearITPendingBit(UPS_USART, USART_IT_TXE); 8027246: 4814 ldr r0, [pc, #80] ; (8027298 ) 8027248: f240 7127 movw r1, #1831 ; 0x727 802724c: f7fe ff71 bl 8026132 } if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) 8027250: 4c11 ldr r4, [pc, #68] ; (8027298 ) 8027252: f240 5125 movw r1, #1317 ; 0x525 8027256: 4620 mov r0, r4 8027258: f7fe ff4b bl 80260f2 802725c: b1d8 cbz r0, 8027296 { c = (uint32_t)UPS_USART->DR; 802725e: 88a3 ldrh r3, [r4, #4] //DBG printf("read: %d 0x%x\r\n", rs485_rx_rbuf.write_index,c); if (!rbuf_isfull(&ups_rx_rbuf)) 8027260: 480f ldr r0, [pc, #60] ; (80272a0 ) } USART_ClearITPendingBit(UPS_USART, USART_IT_TXE); } if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) { c = (uint32_t)UPS_USART->DR; 8027262: b29b uxth r3, r3 8027264: 9301 str r3, [sp, #4] //DBG printf("read: %d 0x%x\r\n", rs485_rx_rbuf.write_index,c); if (!rbuf_isfull(&ups_rx_rbuf)) 8027266: f002 fb29 bl 80298bc 802726a: b918 cbnz r0, 8027274 rbuf32_put(&ups_rx_rbuf, c); 802726c: 480c ldr r0, [pc, #48] ; (80272a0 ) 802726e: 9901 ldr r1, [sp, #4] 8027270: f002 fb45 bl 80298fe USART_ClearITPendingBit(UPS_USART, USART_IT_RXNE); 8027274: 4808 ldr r0, [pc, #32] ; (8027298 ) xSemaphoreGiveFromISR(xSem_rx_buf, &xHigherPriorityTaskWoken); 8027276: 4c0b ldr r4, [pc, #44] ; (80272a4 ) { c = (uint32_t)UPS_USART->DR; //DBG printf("read: %d 0x%x\r\n", rs485_rx_rbuf.write_index,c); if (!rbuf_isfull(&ups_rx_rbuf)) rbuf32_put(&ups_rx_rbuf, c); USART_ClearITPendingBit(UPS_USART, USART_IT_RXNE); 8027278: f240 5125 movw r1, #1317 ; 0x525 802727c: f7fe ff59 bl 8026132 xSemaphoreGiveFromISR(xSem_rx_buf, &xHigherPriorityTaskWoken); 8027280: 4b09 ldr r3, [pc, #36] ; (80272a8 ) 8027282: 4621 mov r1, r4 8027284: 6818 ldr r0, [r3, #0] 8027286: f004 f83d bl 802b304 portYIELD_FROM_ISR(xHigherPriorityTaskWoken); 802728a: 6823 ldr r3, [r4, #0] 802728c: b11b cbz r3, 8027296 802728e: 4b07 ldr r3, [pc, #28] ; (80272ac ) 8027290: f04f 5280 mov.w r2, #268435456 ; 0x10000000 8027294: 601a str r2, [r3, #0] } } 8027296: bd1c pop {r2, r3, r4, pc} 8027298: 40004400 .word 0x40004400 802729c: 2000d3dc .word 0x2000d3dc 80272a0: 2000c8ac .word 0x2000c8ac 80272a4: 20000b1c .word 0x20000b1c 80272a8: 2000d40c .word 0x2000d40c 80272ac: e000ed04 .word 0xe000ed04 080272b0 : void USART1_IRQHandler(void) { service_rs232_irq_handler(); 80272b0: f7ff bf46 b.w 8027140 080272b4 : } void USART2_IRQHandler(void) { rs232_irq_handler(); 80272b4: f7ff bfa0 b.w 80271f8 080272b8 : } void USART3_IRQHandler(void) { 80272b8: 4770 bx lr 80272ba: 0000 movs r0, r0 080272bc : /** * @brief Задача инициализации. Запускает основные задачи девайса и умирает. * @retval */ void InitTask(void *params) { 80272bc: b51f push {r0, r1, r2, r3, r4, lr} // ----------------------------------------------------------------------------- // xTaskCreate(vTaskWdt, "WDT", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // ----------------------------------------------------------------------------- InitUSART(); 80272be: f7ff fe9d bl 8026ffc ups_megatec_init(); 80272c2: f002 fabb bl 802983c // ----------------------------------------------------------------------------- // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); //SETTINGS_SetDefaultDebug(); //SETTINGS_Save(); SETTINGS_Load(); 80272c6: f001 fd79 bl 8028dbc if(set_mode_jumper()){ 80272ca: f001 ffd9 bl 8029280 80272ce: b138 cbz r0, 80272e0 SETTINGS_SetServiceDef(); 80272d0: f001 fc36 bl 8028b40 SETTINGS_Save(); 80272d4: f001 fd1e bl 8028d14 log_event_data(LOG_PSW_CHANGE, "Сброс к заводскому"); 80272d8: 2003 movs r0, #3 80272da: 4937 ldr r1, [pc, #220] ; (80273b8 ) 80272dc: f002 ffc2 bl 802a264 // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); /* Простая мигалка для подтверждения живучести контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 80272e0: 2400 movs r4, #0 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); 80272e2: f001 ff29 bl 8029138 /* Простая мигалка для подтверждения живучести контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 80272e6: 2280 movs r2, #128 ; 0x80 80272e8: 4623 mov r3, r4 80272ea: 4934 ldr r1, [pc, #208] ; (80273bc ) 80272ec: 9400 str r4, [sp, #0] 80272ee: 9401 str r4, [sp, #4] 80272f0: 9402 str r4, [sp, #8] 80272f2: 9403 str r4, [sp, #12] 80272f4: 4832 ldr r0, [pc, #200] ; (80273c0 ) 80272f6: f004 f941 bl 802b57c #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef BUTTON_ENABLE BUTTON_Init(); 80272fa: f001 ff79 bl 80291f0 xTaskCreate(vTaskButtons, "Buttons", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 80272fe: 2280 movs r2, #128 ; 0x80 8027300: 4623 mov r3, r4 8027302: 4930 ldr r1, [pc, #192] ; (80273c4 ) 8027304: 9400 str r4, [sp, #0] 8027306: 9401 str r4, [sp, #4] 8027308: 9402 str r4, [sp, #8] 802730a: 9403 str r4, [sp, #12] 802730c: 482e ldr r0, [pc, #184] ; (80273c8 ) 802730e: f004 f935 bl 802b57c //xTaskCreate( d_inouts_task, "inouts_task", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // xTaskCreate( d_inouts_test, "d_inouts_test", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // ----------------------------------------------------------------------------- #ifdef RTC_ENABLE TM_RTC_Init(TM_RTC_ClockSource_External); // Так было 8027312: 2001 movs r0, #1 8027314: f7ff fac6 bl 80268a4 /* UDP for net settings */ //UDP_netsetting_init(); // ----------------------------------------------------------------------------- #ifdef UPS_ENABLE xTaskCreate(UPS_Monitor, "UPS_Monitor", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 8027318: 2280 movs r2, #128 ; 0x80 802731a: 4623 mov r3, r4 802731c: 492b ldr r1, [pc, #172] ; (80273cc ) 802731e: 9400 str r4, [sp, #0] 8027320: 9401 str r4, [sp, #4] 8027322: 9402 str r4, [sp, #8] 8027324: 9403 str r4, [sp, #12] 8027326: 482a ldr r0, [pc, #168] ; (80273d0 ) 8027328: f004 f928 bl 802b57c #endif // ----------------------------------------------------------------------------- /* Random number generator */ RNG_Init(); 802732c: f7ff f8a2 bl 8026474 // ----------------------------------------------------------------------------- #ifdef NET_ENABLE ETH_BSP_Config(); 8027330: f011 f83a bl 80383a8 LwIP_Init(); 8027334: f010 fa4a bl 80377cc #ifdef WEB_SERVER_ENABLE HTTP_Init(); 8027338: f005 f982 bl 802c640 #endif #ifdef SNMP_ENABLE SNMP_Init(); 802733c: f010 fdf6 bl 8037f2c xTaskCreate(SNMP_SysUpTimeTask, "snmpSysUpTime", configMINIMAL_STACK_SIZE, 8027340: 2280 movs r2, #128 ; 0x80 8027342: 4623 mov r3, r4 8027344: 9400 str r4, [sp, #0] 8027346: 9401 str r4, [sp, #4] 8027348: 9402 str r4, [sp, #8] 802734a: 9403 str r4, [sp, #12] 802734c: 4921 ldr r1, [pc, #132] ; (80273d4 ) 802734e: 4822 ldr r0, [pc, #136] ; (80273d8 ) 8027350: f004 f914 bl 802b57c NULL, tskIDLE_PRIORITY, NULL); xTaskCreate(snmp_trap_tread, "snmpTrapTest", 3*configMINIMAL_STACK_SIZE, 8027354: 4623 mov r3, r4 8027356: 4921 ldr r1, [pc, #132] ; (80273dc ) 8027358: 9400 str r4, [sp, #0] 802735a: f44f 72c0 mov.w r2, #384 ; 0x180 802735e: 9401 str r4, [sp, #4] 8027360: 9402 str r4, [sp, #8] 8027362: 9403 str r4, [sp, #12] 8027364: 481e ldr r0, [pc, #120] ; (80273e0 ) 8027366: f004 f909 bl 802b57c #endif #endif // ----------------------------------------------------------------------------- /* SNTP */ SNTP_Init(); 802736a: f010 fe7b bl 8038064 xTaskCreate(vTaskOnceSynchro, "sntpOnceSinhro", 2*configMINIMAL_STACK_SIZE, 802736e: 4b1d ldr r3, [pc, #116] ; (80273e4 ) 8027370: 9400 str r4, [sp, #0] 8027372: 9301 str r3, [sp, #4] 8027374: 9402 str r4, [sp, #8] 8027376: 4623 mov r3, r4 8027378: 9403 str r4, [sp, #12] 802737a: 491b ldr r1, [pc, #108] ; (80273e8 ) 802737c: 481b ldr r0, [pc, #108] ; (80273ec ) 802737e: f44f 7280 mov.w r2, #256 ; 0x100 8027382: f004 f8fb bl 802b57c NULL, tskIDLE_PRIORITY, &xHandleSntpOnceSinhro); xTaskCreate(vTaskPeriodicSynchro, "sntpPeriodicSinhro", 2*configMINIMAL_STACK_SIZE, 8027386: 491a ldr r1, [pc, #104] ; (80273f0 ) 8027388: 9400 str r4, [sp, #0] 802738a: f44f 7280 mov.w r2, #256 ; 0x100 802738e: 4623 mov r3, r4 8027390: 9401 str r4, [sp, #4] 8027392: 9402 str r4, [sp, #8] 8027394: 9403 str r4, [sp, #12] 8027396: 4817 ldr r0, [pc, #92] ; (80273f4 ) 8027398: f004 f8f0 bl 802b57c //TEST_IO(); /* Контроль успешной загрузки. Сброс флага bootry */ /* Сброс флага и сохранение нового значения во флеш памяти происходт после некоторой задержки для запуска всех задач */ vTaskDelay(4000); 802739c: f44f 607a mov.w r0, #4000 ; 0xfa0 80273a0: f004 fb86 bl 802bab0 SETTINGS_ResetBootTry(); 80273a4: f001 fd3e bl 8028e24 /* if (!dhcp) SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); 80273a8: 4620 mov r0, r4 80273aa: f004 f9bf bl 802b72c taskYIELD(); } 80273ae: b004 add sp, #16 80273b0: e8bd 4010 ldmia.w sp!, {r4, lr} SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); taskYIELD(); 80273b4: f004 bddc b.w 802bf70 80273b8: 08039000 .word 0x08039000 80273bc: 08039023 .word 0x08039023 80273c0: 0802915d .word 0x0802915d 80273c4: 0803902d .word 0x0803902d 80273c8: 0802926d .word 0x0802926d 80273cc: 08039035 .word 0x08039035 80273d0: 0802a019 .word 0x0802a019 80273d4: 08039041 .word 0x08039041 80273d8: 08037cc5 .word 0x08037cc5 80273dc: 0803904f .word 0x0803904f 80273e0: 08037e25 .word 0x08037e25 80273e4: 20000b20 .word 0x20000b20 80273e8: 0803905c .word 0x0803905c 80273ec: 08038131 .word 0x08038131 80273f0: 0803906b .word 0x0803906b 80273f4: 080380e9 .word 0x080380e9 080273f8
: void vApplicationTickHook(void) { } int main() { 80273f8: b51f push {r0, r1, r2, r3, r4, lr} TIM_Cmd(TIM13, DISABLE); 80273fa: 4c22 ldr r4, [pc, #136] ; (8027484 ) 80273fc: 2100 movs r1, #0 80273fe: 4620 mov r0, r4 8027400: f7fe fd8c bl 8025f1c TIM_ClearITPendingBit(TIM13, TIM_IT_Update); 8027404: 4620 mov r0, r4 8027406: 2101 movs r1, #1 8027408: f7fe fd9d bl 8025f46 This function disables IRQ interrupts by setting the I-bit in the CPSR. Can only be executed in Privileged modes. */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void) { __ASM volatile ("cpsid i" : : : "memory"); 802740c: b672 cpsid i __disable_irq(); NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x20000); 802740e: f04f 6000 mov.w r0, #134217728 ; 0x8000000 8027412: f44f 3100 mov.w r1, #131072 ; 0x20000 8027416: f7fe f903 bl 8025620 __STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) { uint32_t reg_value; uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07); /* only values 0..7 are used */ reg_value = SCB->AIRCR; /* read old register configuration */ 802741a: 4a1b ldr r2, [pc, #108] ; (8027488 ) 802741c: 68d1 ldr r1, [r2, #12] reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */ 802741e: f64f 03ff movw r3, #63743 ; 0xf8ff 8027422: 400b ands r3, r1 reg_value = (reg_value | 8027424: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 8027428: f443 3300 orr.w r3, r3, #131072 ; 0x20000 ((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) | (PriorityGroupTmp << 8)); /* Insert write key and priorty group */ SCB->AIRCR = reg_value; 802742c: 60d3 str r3, [r2, #12] NVIC_SetPriorityGrouping(0); NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); 802742e: f44f 7040 mov.w r0, #768 ; 0x300 8027432: f7fe f8b7 bl 80255a4 This function enables IRQ interrupts by clearing the I-bit in the CPSR. Can only be executed in Privileged modes. */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void) { __ASM volatile ("cpsie i" : : : "memory"); 8027436: b662 cpsie i __enable_irq(); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); 8027438: 2101 movs r1, #1 802743a: f44f 5080 mov.w r0, #4096 ; 0x1000 802743e: f7fe fb11 bl 8025a64 /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); 8027442: 2040 movs r0, #64 ; 0x40 8027444: f7fe f922 bl 802568c FLASH_ClearFlag(FLASH_FLAG_PGSERR); 8027448: 2080 movs r0, #128 ; 0x80 802744a: f7fe f91f bl 802568c log_init(false); //log_test(); //spi_flash_test(); // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 802744e: 2400 movs r4, #0 /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); FLASH_ClearFlag(FLASH_FLAG_PGSERR); gpio_init(); 8027450: f7fe ffac bl 80263ac WDG_Init(); 8027454: f001 fe26 bl 80290a4 spi_flash_init(); 8027458: f7ff fcae bl 8026db8 log_init(false); 802745c: 2000 movs r0, #0 802745e: f002 fe39 bl 802a0d4 //log_test(); //spi_flash_test(); // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 8027462: 490a ldr r1, [pc, #40] ; (802748c ) 8027464: 9400 str r4, [sp, #0] 8027466: f44f 727a mov.w r2, #1000 ; 0x3e8 802746a: 4623 mov r3, r4 802746c: 9401 str r4, [sp, #4] 802746e: 9402 str r4, [sp, #8] 8027470: 9403 str r4, [sp, #12] 8027472: 4807 ldr r0, [pc, #28] ; (8027490 ) 8027474: f004 f882 bl 802b57c vTaskStartScheduler(); 8027478: f004 f9b2 bl 802b7e0 /*while(1) { }*/ } 802747c: 4620 mov r0, r4 802747e: b004 add sp, #16 8027480: bd10 pop {r4, pc} 8027482: bf00 nop 8027484: 40001c00 .word 0x40001c00 8027488: e000ed00 .word 0xe000ed00 802748c: 0803907e .word 0x0803907e 8027490: 080272bd .word 0x080272bd 08027494 : * @brief This function handles NMI exception. * @param None * @retval None */ void NMI_Handler(void) { 8027494: 4770 bx lr 8027496: 0000 movs r0, r0 08027498 : } void HardFault_Output(uint32_t *sp) { 8027498: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} uint32_t r0 = sp[0]; uint32_t r1 = sp[1]; 802749c: e890 0808 ldmia.w r0, {r3, fp} uint32_t r2 = sp[2]; 80274a0: f8d0 a008 ldr.w sl, [r0, #8] uint32_t r3 = sp[3]; 80274a4: f8d0 900c ldr.w r9, [r0, #12] uint32_t r12 = sp[4]; 80274a8: f8d0 8010 ldr.w r8, [r0, #16] uint32_t lr = sp[5]; 80274ac: 6947 ldr r7, [r0, #20] uint32_t pc = sp[6]; 80274ae: 6986 ldr r6, [r0, #24] uint32_t psr = sp[7]; 80274b0: 69c5 ldr r5, [r0, #28] printf("HardFault:\n\r"); 80274b2: 9301 str r3, [sp, #4] void NMI_Handler(void) { } void HardFault_Output(uint32_t *sp) { 80274b4: 4604 mov r4, r0 uint32_t r12 = sp[4]; uint32_t lr = sp[5]; uint32_t pc = sp[6]; uint32_t psr = sp[7]; printf("HardFault:\n\r"); 80274b6: 4816 ldr r0, [pc, #88] ; (8027510 ) 80274b8: f000 fbca bl 8027c50 /* Print CFSR register */ /* Print CPU registers */ printf("\n\rRegisters:\n\r"); 80274bc: 4815 ldr r0, [pc, #84] ; (8027514 ) 80274be: f000 fbc7 bl 8027c50 printf("SP 0x%08lx\n\r", (uint32_t)sp); 80274c2: 4815 ldr r0, [pc, #84] ; (8027518 ) 80274c4: 4621 mov r1, r4 80274c6: f000 fbc3 bl 8027c50 printf("R0 0x%08lx\n\r", r0); 80274ca: 9b01 ldr r3, [sp, #4] 80274cc: 4813 ldr r0, [pc, #76] ; (802751c ) 80274ce: 4619 mov r1, r3 80274d0: f000 fbbe bl 8027c50 printf("R1 0x%08lx\n\r", r1); 80274d4: 4812 ldr r0, [pc, #72] ; (8027520 ) 80274d6: 4659 mov r1, fp 80274d8: f000 fbba bl 8027c50 printf("R2 0x%08lx\n\r", r2); 80274dc: 4811 ldr r0, [pc, #68] ; (8027524 ) 80274de: 4651 mov r1, sl 80274e0: f000 fbb6 bl 8027c50 printf("R3 0x%08lx\n\r", r3); 80274e4: 4810 ldr r0, [pc, #64] ; (8027528 ) 80274e6: 4649 mov r1, r9 80274e8: f000 fbb2 bl 8027c50 printf("R12 0x%08lx\n\r", r12); 80274ec: 480f ldr r0, [pc, #60] ; (802752c ) 80274ee: 4641 mov r1, r8 80274f0: f000 fbae bl 8027c50 printf("LR 0x%08lx\n\r", lr); 80274f4: 480e ldr r0, [pc, #56] ; (8027530 ) 80274f6: 4639 mov r1, r7 80274f8: f000 fbaa bl 8027c50 printf("PC 0x%08lx\n\r", pc); 80274fc: 480d ldr r0, [pc, #52] ; (8027534 ) 80274fe: 4631 mov r1, r6 8027500: f000 fba6 bl 8027c50 printf("PSR 0x%08lx\n\r", psr); 8027504: 480c ldr r0, [pc, #48] ; (8027538 ) 8027506: 4629 mov r1, r5 8027508: f000 fba2 bl 8027c50 802750c: e7fe b.n 802750c 802750e: bf00 nop 8027510: 08039087 .word 0x08039087 8027514: 08039094 .word 0x08039094 8027518: 080390a3 .word 0x080390a3 802751c: 080390b9 .word 0x080390b9 8027520: 080390cf .word 0x080390cf 8027524: 080390e5 .word 0x080390e5 8027528: 080390fb .word 0x080390fb 802752c: 08039111 .word 0x08039111 8027530: 08039127 .word 0x08039127 8027534: 0803913d .word 0x0803913d 8027538: 08039153 .word 0x08039153 0802753c : */ #if defined ( __GNUC__ ) __attribute__( (naked) ) void HardFault_Handler(void) { __asm volatile 802753c: f01e 0f04 tst.w lr, #4 8027540: bf0c ite eq 8027542: f3ef 8008 mrseq r0, MSP 8027546: f3ef 8009 mrsne r0, PSP 802754a: f8df 1004 ldr.w r1, [pc, #4] ; 8027550 802754e: 4708 bx r1 08027550 : 8027550: 08027499 .word 0x08027499 08027554 : * @brief This function handles Memory Manage exception. * @param None * @retval None */ void MemManage_Handler(void) { 8027554: e7fe b.n 8027554 08027556 : * @brief This function handles Bus Fault exception. * @param None * @retval None */ void BusFault_Handler(void) { 8027556: e7fe b.n 8027556 08027558 : * @brief This function handles Usage Fault exception. * @param None * @retval None */ void UsageFault_Handler(void) { 8027558: e7fe b.n 8027558 0802755a : * @brief This function handles Debug Monitor exception. * @param None * @retval None */ void DebugMon_Handler(void) { 802755a: 4770 bx lr 0802755c : /*void PPP_IRQHandler(void) { }*/ void SDIO_IRQHandler(void) { 802755c: 4770 bx lr 802755e: 0000 movs r0, r0 08027560 : * @brief This function handles ethernet DMA interrupt request. * @param None * @retval None */ void ETH_IRQHandler(void) { 8027560: b507 push {r0, r1, r2, lr} portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 8027562: 2300 movs r3, #0 /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 8027564: 2040 movs r0, #64 ; 0x40 * @param None * @retval None */ void ETH_IRQHandler(void) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 8027566: 9301 str r3, [sp, #4] /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 8027568: f011 f9bc bl 80388e4 802756c: 2801 cmp r0, #1 802756e: d104 bne.n 802757a { /* Give the semaphore to wakeup LwIP task */ xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken ); 8027570: 4b09 ldr r3, [pc, #36] ; (8027598 ) 8027572: a901 add r1, sp, #4 8027574: 6818 ldr r0, [r3, #0] 8027576: f003 fec5 bl 802b304 } /* Clear the interrupt flags. */ /* Clear the Eth DMA Rx IT pending bits */ ETH_DMAClearITPendingBit(ETH_DMA_IT_R); 802757a: 2040 movs r0, #64 ; 0x40 802757c: f011 f9c8 bl 8038910 ETH_DMAClearITPendingBit(ETH_DMA_IT_NIS); 8027580: f44f 3080 mov.w r0, #65536 ; 0x10000 8027584: f011 f9c4 bl 8038910 // Switch tasks if necessary. */ if( xHigherPriorityTaskWoken != pdFALSE ) 8027588: 9b01 ldr r3, [sp, #4] 802758a: b11b cbz r3, 8027594 { portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); 802758c: 4b03 ldr r3, [pc, #12] ; (802759c ) 802758e: f04f 5280 mov.w r2, #268435456 ; 0x10000000 8027592: 601a str r2, [r3, #0] } } 8027594: bd0e pop {r1, r2, r3, pc} 8027596: bf00 nop 8027598: 2000c820 .word 0x2000c820 802759c: e000ed04 .word 0xe000ed04 080275a0 : #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { 80275a0: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 80275a4: 68d3 ldr r3, [r2, #12] static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { int n = 0; unsigned long long int d = 1; char *bf = p->bf; 80275a6: f8d2 b010 ldr.w fp, [r2, #16] #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { 80275aa: 4681 mov r9, r0 80275ac: 468a mov sl, r1 80275ae: 4690 mov r8, r2 int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 80275b0: 461e mov r6, r3 80275b2: 2700 movs r7, #0 #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { int n = 0; unsigned long long int d = 1; 80275b4: 2401 movs r4, #1 80275b6: 2500 movs r5, #0 char *bf = p->bf; while (num / d >= p->base) 80275b8: e006 b.n 80275c8 d *= p->base; 80275ba: fb04 f307 mul.w r3, r4, r7 80275be: fb06 3305 mla r3, r6, r5, r3 80275c2: fba4 4506 umull r4, r5, r4, r6 80275c6: 195d adds r5, r3, r5 unsigned long long int num, struct param *p) { int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 80275c8: 4648 mov r0, r9 80275ca: 4651 mov r1, sl 80275cc: 4622 mov r2, r4 80275ce: 462b mov r3, r5 80275d0: f7f9 fe38 bl 8021244 <__aeabi_uldivmod> 80275d4: 42b9 cmp r1, r7 80275d6: bf08 it eq 80275d8: 42b0 cmpeq r0, r6 80275da: d2ee bcs.n 80275ba 80275dc: 2600 movs r6, #0 80275de: e02d b.n 802763c d *= p->base; while (d != 0) { int dgt = num / d; 80275e0: 4622 mov r2, r4 80275e2: 462b mov r3, r5 80275e4: 4648 mov r0, r9 80275e6: 4651 mov r1, sl 80275e8: f7f9 fe2c bl 8021244 <__aeabi_uldivmod> num %= d; 80275ec: 4651 mov r1, sl 80275ee: 4622 mov r2, r4 80275f0: 462b mov r3, r5 unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { int dgt = num / d; 80275f2: 4607 mov r7, r0 num %= d; 80275f4: 4648 mov r0, r9 80275f6: f7f9 fe25 bl 8021244 <__aeabi_uldivmod> d /= p->base; 80275fa: 4620 mov r0, r4 80275fc: 4629 mov r1, r5 char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { int dgt = num / d; num %= d; 80275fe: 4691 mov r9, r2 8027600: 469a mov sl, r3 d /= p->base; 8027602: f8d8 200c ldr.w r2, [r8, #12] 8027606: 2300 movs r3, #0 8027608: f7f9 fe1c bl 8021244 <__aeabi_uldivmod> 802760c: 4604 mov r4, r0 802760e: 460d mov r5, r1 if (n || dgt > 0 || d == 0) { 8027610: b926 cbnz r6, 802761c 8027612: 2f00 cmp r7, #0 8027614: dc02 bgt.n 802761c 8027616: ea54 0305 orrs.w r3, r4, r5 802761a: d1e1 bne.n 80275e0 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 802761c: 2f09 cmp r7, #9 802761e: b2fa uxtb r2, r7 8027620: dd07 ble.n 8027632 8027622: f898 3000 ldrb.w r3, [r8] 8027626: f013 0f04 tst.w r3, #4 802762a: bf0c ite eq 802762c: 2357 moveq r3, #87 ; 0x57 802762e: 2337 movne r3, #55 ; 0x37 8027630: e000 b.n 8027634 8027632: 2330 movs r3, #48 ; 0x30 8027634: 189b adds r3, r3, r2 8027636: f80b 3b01 strb.w r3, [fp], #1 ++n; 802763a: 3601 adds r6, #1 int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { 802763c: ea54 0305 orrs.w r3, r4, r5 8027640: d1ce bne.n 80275e0 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 8027642: 2300 movs r3, #0 8027644: f88b 3000 strb.w r3, [fp] 8027648: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802764c : } #endif #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { 802764c: b570 push {r4, r5, r6, lr} int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) 802764e: 68ca ldr r2, [r1, #12] #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { int n = 0; unsigned long int d = 1; char *bf = p->bf; 8027650: 690c ldr r4, [r1, #16] #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { int n = 0; unsigned long int d = 1; 8027652: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 8027654: e000 b.n 8027658 d *= p->base; 8027656: 4353 muls r3, r2 static void uli2a(unsigned long int num, struct param *p) { int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) 8027658: fbb0 f5f3 udiv r5, r0, r3 802765c: 4295 cmp r5, r2 802765e: d2fa bcs.n 8027656 8027660: 2500 movs r5, #0 8027662: e01a b.n 802769a d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 8027664: 68ce ldr r6, [r1, #12] unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { int dgt = num / d; 8027666: fbb0 f2f3 udiv r2, r0, r3 num %= d; 802766a: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 802766e: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 8027672: b91d cbnz r5, 802767c 8027674: 2a00 cmp r2, #0 8027676: dc01 bgt.n 802767c 8027678: 2b00 cmp r3, #0 802767a: d1f3 bne.n 8027664 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 802767c: 2a09 cmp r2, #9 802767e: b2d6 uxtb r6, r2 8027680: dd06 ble.n 8027690 8027682: 780a ldrb r2, [r1, #0] 8027684: f012 0f04 tst.w r2, #4 8027688: bf0c ite eq 802768a: 2257 moveq r2, #87 ; 0x57 802768c: 2237 movne r2, #55 ; 0x37 802768e: e000 b.n 8027692 8027690: 2230 movs r2, #48 ; 0x30 8027692: 1992 adds r2, r2, r6 8027694: f804 2b01 strb.w r2, [r4], #1 ++n; 8027698: 3501 adds r5, #1 int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { 802769a: 2b00 cmp r3, #0 802769c: d1e2 bne.n 8027664 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 802769e: 7023 strb r3, [r4, #0] 80276a0: bd70 pop {r4, r5, r6, pc} 080276a2 : uli2a(num, p); } #endif static void ui2a(unsigned int num, struct param *p) { 80276a2: b570 push {r4, r5, r6, lr} int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) 80276a4: 68ca ldr r2, [r1, #12] static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; char *bf = p->bf; 80276a6: 690c ldr r4, [r1, #16] #endif static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; 80276a8: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 80276aa: e000 b.n 80276ae d *= p->base; 80276ac: 4353 muls r3, r2 static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) 80276ae: fbb0 f5f3 udiv r5, r0, r3 80276b2: 4295 cmp r5, r2 80276b4: d2fa bcs.n 80276ac 80276b6: 2500 movs r5, #0 80276b8: e01a b.n 80276f0 d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 80276ba: 68ce ldr r6, [r1, #12] unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { int dgt = num / d; 80276bc: fbb0 f2f3 udiv r2, r0, r3 num %= d; 80276c0: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 80276c4: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 80276c8: b91d cbnz r5, 80276d2 80276ca: 2a00 cmp r2, #0 80276cc: dc01 bgt.n 80276d2 80276ce: 2b00 cmp r3, #0 80276d0: d1f3 bne.n 80276ba *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 80276d2: 2a09 cmp r2, #9 80276d4: b2d6 uxtb r6, r2 80276d6: dd06 ble.n 80276e6 80276d8: 780a ldrb r2, [r1, #0] 80276da: f012 0f04 tst.w r2, #4 80276de: bf0c ite eq 80276e0: 2257 moveq r2, #87 ; 0x57 80276e2: 2237 movne r2, #55 ; 0x37 80276e4: e000 b.n 80276e8 80276e6: 2230 movs r2, #48 ; 0x30 80276e8: 1992 adds r2, r2, r6 80276ea: f804 2b01 strb.w r2, [r4], #1 ++n; 80276ee: 3501 adds r5, #1 int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { 80276f0: 2b00 cmp r3, #0 80276f2: d1e2 bne.n 80276ba if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 80276f4: 7023 strb r3, [r4, #0] 80276f6: bd70 pop {r4, r5, r6, pc} 080276f8 : } static void putchw(void *putp, putcf putf, struct param *p) { 80276f8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} char ch; int n = p->width; char *bf = p->bf; 80276fc: 6913 ldr r3, [r2, #16] } static void putchw(void *putp, putcf putf, struct param *p) { char ch; int n = p->width; 80276fe: 6854 ldr r4, [r2, #4] } static void putchw(void *putp, putcf putf, struct param *p) { 8027700: 4606 mov r6, r0 8027702: 460f mov r7, r1 8027704: 4615 mov r5, r2 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8027706: e000 b.n 802770a n--; 8027708: 3c01 subs r4, #1 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 802770a: f813 2b01 ldrb.w r2, [r3], #1 802770e: b912 cbnz r2, 8027716 n--; if (p->sign) 8027710: 7a2b ldrb r3, [r5, #8] 8027712: b91b cbnz r3, 802771c 8027714: e003 b.n 802771e char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8027716: 2c00 cmp r4, #0 8027718: dcf6 bgt.n 8027708 802771a: e7f9 b.n 8027710 n--; if (p->sign) n--; 802771c: 3c01 subs r4, #1 if (p->alt && p->base == 16) 802771e: 782b ldrb r3, [r5, #0] 8027720: 0799 lsls r1, r3, #30 8027722: d507 bpl.n 8027734 8027724: 68eb ldr r3, [r5, #12] 8027726: 2b10 cmp r3, #16 8027728: d101 bne.n 802772e n -= 2; 802772a: 3c02 subs r4, #2 802772c: e002 b.n 8027734 else if (p->alt && p->base == 8) 802772e: 2b08 cmp r3, #8 n--; 8027730: bf08 it eq 8027732: 3c01 subeq r4, #1 /* Fill with space to align to the right, before alternate or sign */ if (!p->lz && !p->align_left) { 8027734: 782b ldrb r3, [r5, #0] 8027736: f013 0f09 tst.w r3, #9 802773a: d10d bne.n 8027758 802773c: 46a0 mov r8, r4 802773e: e004 b.n 802774a while (n-- > 0) putf(putp, ' '); 8027740: 4630 mov r0, r6 8027742: 2120 movs r1, #32 8027744: 47b8 blx r7 8027746: f108 38ff add.w r8, r8, #4294967295 else if (p->alt && p->base == 8) n--; /* Fill with space to align to the right, before alternate or sign */ if (!p->lz && !p->align_left) { while (n-- > 0) 802774a: f1b8 0f00 cmp.w r8, #0 802774e: dcf7 bgt.n 8027740 return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 8027750: 1e63 subs r3, r4, #1 8027752: ea24 74e4 bic.w r4, r4, r4, asr #31 8027756: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, ' '); } /* print sign */ if (p->sign) 8027758: 7a29 ldrb r1, [r5, #8] 802775a: b109 cbz r1, 8027760 putf(putp, p->sign); 802775c: 4630 mov r0, r6 802775e: 47b8 blx r7 /* Alternate */ if (p->alt && p->base == 16) { 8027760: 782b ldrb r3, [r5, #0] 8027762: 079a lsls r2, r3, #30 8027764: d512 bpl.n 802778c 8027766: 68eb ldr r3, [r5, #12] 8027768: 2b10 cmp r3, #16 802776a: d10a bne.n 8027782 putf(putp, '0'); 802776c: 2130 movs r1, #48 ; 0x30 802776e: 4630 mov r0, r6 8027770: 47b8 blx r7 putf(putp, (p->uc ? 'X' : 'x')); 8027772: 782b ldrb r3, [r5, #0] 8027774: f013 0f04 tst.w r3, #4 8027778: 4630 mov r0, r6 802777a: bf0c ite eq 802777c: 2178 moveq r1, #120 ; 0x78 802777e: 2158 movne r1, #88 ; 0x58 8027780: e003 b.n 802778a } else if (p->alt && p->base == 8) { 8027782: 2b08 cmp r3, #8 8027784: d102 bne.n 802778c putf(putp, '0'); 8027786: 4630 mov r0, r6 8027788: 2130 movs r1, #48 ; 0x30 802778a: 47b8 blx r7 } /* Fill with zeros, after alternate or sign */ if (p->lz) { 802778c: 782b ldrb r3, [r5, #0] 802778e: 07db lsls r3, r3, #31 8027790: d50d bpl.n 80277ae 8027792: 46a0 mov r8, r4 8027794: e004 b.n 80277a0 while (n-- > 0) putf(putp, '0'); 8027796: 4630 mov r0, r6 8027798: 2130 movs r1, #48 ; 0x30 802779a: 47b8 blx r7 802779c: f108 38ff add.w r8, r8, #4294967295 putf(putp, '0'); } /* Fill with zeros, after alternate or sign */ if (p->lz) { while (n-- > 0) 80277a0: f1b8 0f00 cmp.w r8, #0 80277a4: dcf7 bgt.n 8027796 return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 80277a6: 1e63 subs r3, r4, #1 80277a8: ea24 74e4 bic.w r4, r4, r4, asr #31 80277ac: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; 80277ae: f8d5 8010 ldr.w r8, [r5, #16] while ((ch = *bf++)) 80277b2: e001 b.n 80277b8 putf(putp, ch); 80277b4: 4630 mov r0, r6 80277b6: 47b8 blx r7 putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; while ((ch = *bf++)) 80277b8: f818 1b01 ldrb.w r1, [r8], #1 80277bc: 2900 cmp r1, #0 80277be: d1f9 bne.n 80277b4 putf(putp, ch); /* Fill with space to align to the left, after string */ if (!p->lz && p->align_left) { 80277c0: 782b ldrb r3, [r5, #0] 80277c2: f003 0309 and.w r3, r3, #9 80277c6: 2b08 cmp r3, #8 80277c8: d106 bne.n 80277d8 80277ca: e003 b.n 80277d4 while (n-- > 0) putf(putp, ' '); 80277cc: 4630 mov r0, r6 80277ce: 2120 movs r1, #32 80277d0: 47b8 blx r7 80277d2: 3c01 subs r4, #1 while ((ch = *bf++)) putf(putp, ch); /* Fill with space to align to the left, after string */ if (!p->lz && p->align_left) { while (n-- > 0) 80277d4: 2c00 cmp r4, #0 80277d6: dcf9 bgt.n 80277cc 80277d8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 080277dc <_vsnprintf_putcf>: }; static void _vsnprintf_putcf(void *p, char c) { struct _vsnprintf_putcf_data *data = (struct _vsnprintf_putcf_data*)p; if (data->num_chars < data->dest_capacity) 80277dc: 6883 ldr r3, [r0, #8] 80277de: 6802 ldr r2, [r0, #0] 80277e0: 4293 cmp r3, r2 data->dest[data->num_chars] = c; 80277e2: bf3c itt cc 80277e4: 6842 ldrcc r2, [r0, #4] 80277e6: 54d1 strbcc r1, [r2, r3] data->num_chars ++; 80277e8: 6883 ldr r3, [r0, #8] 80277ea: 3301 adds r3, #1 80277ec: 6083 str r3, [r0, #8] 80277ee: 4770 bx lr 080277f0 <_vsprintf_putcf>: }; static void _vsprintf_putcf(void *p, char c) { struct _vsprintf_putcf_data *data = (struct _vsprintf_putcf_data*)p; data->dest[data->num_chars++] = c; 80277f0: e890 000c ldmia.w r0, {r2, r3} 80277f4: 54d1 strb r1, [r2, r3] 80277f6: 3301 adds r3, #1 80277f8: 6043 str r3, [r0, #4] 80277fa: 4770 bx lr 080277fc : putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 80277fc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8027800: b09b sub sp, #108 ; 0x6c 8027802: 4617 mov r7, r2 char bf[23]; /* long = 64b on some architectures */ #else char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; 8027804: aa04 add r2, sp, #16 putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 8027806: 4605 mov r5, r0 8027808: 460e mov r6, r1 802780a: 461c mov r4, r3 char bf[23]; /* long = 64b on some architectures */ #else char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; 802780c: 920e str r2, [sp, #56] ; 0x38 while ((ch = *(fmt++))) { 802780e: e208 b.n 8027c22 if (ch != '%') { 8027810: 2925 cmp r1, #37 ; 0x25 8027812: d000 beq.n 8027816 8027814: e13a b.n 8027a8c #endif /* Init parameter struct */ p.lz = 0; p.alt = 0; p.width = 0; p.align_left = 0; 8027816: f89d 2028 ldrb.w r2, [sp, #40] ; 0x28 char lng = 0; /* 1 for long, 2 for long long */ #endif /* Init parameter struct */ p.lz = 0; p.alt = 0; p.width = 0; 802781a: 2300 movs r3, #0 p.align_left = 0; 802781c: f002 02fc and.w r2, r2, #252 ; 0xfc 8027820: f363 02c3 bfi r2, r3, #3, #1 8027824: f88d 2028 strb.w r2, [sp, #40] ; 0x28 p.sign = 0; p.prec = 2; 8027828: 2102 movs r1, #2 } else { #ifdef PRINTF_LONG_SUPPORT char lng = 0; /* 1 for long, 2 for long long */ #endif /* Init parameter struct */ p.lz = 0; 802782a: b2d2 uxtb r2, r2 802782c: f002 0c01 and.w ip, r2, #1 8027830: f3c2 0040 ubfx r0, r2, #1, #1 p.alt = 0; p.width = 0; 8027834: 930b str r3, [sp, #44] ; 0x2c p.align_left = 0; p.sign = 0; 8027836: f88d 3030 strb.w r3, [sp, #48] ; 0x30 p.prec = 2; 802783a: f88d 103c strb.w r1, [sp, #60] ; 0x3c 802783e: f3c2 02c0 ubfx r2, r2, #3, #1 /* Flags */ while ((ch = *(fmt++))) { 8027842: e012 b.n 802786a switch (ch) { 8027844: 292d cmp r1, #45 ; 0x2d 8027846: d00f beq.n 8027868 8027848: d804 bhi.n 8027854 802784a: 2923 cmp r1, #35 ; 0x23 802784c: d008 beq.n 8027860 802784e: 292b cmp r1, #43 ; 0x2b 8027850: d10f bne.n 8027872 8027852: e007 b.n 8027864 8027854: 2930 cmp r1, #48 ; 0x30 8027856: d000 beq.n 802785a 8027858: e00b b.n 8027872 case '-': p.align_left = 1; continue; case '0': p.lz = 1; 802785a: f04f 0c01 mov.w ip, #1 continue; 802785e: e004 b.n 802786a case '#': p.alt = 1; 8027860: 2001 movs r0, #1 continue; 8027862: e002 b.n 802786a case '+': p.sign = 1; 8027864: 2301 movs r3, #1 continue; 8027866: e000 b.n 802786a /* Flags */ while ((ch = *(fmt++))) { switch (ch) { case '-': p.align_left = 1; 8027868: 2201 movs r2, #1 p.align_left = 0; p.sign = 0; p.prec = 2; /* Flags */ while ((ch = *(fmt++))) { 802786a: f817 1b01 ldrb.w r1, [r7], #1 802786e: 2900 cmp r1, #0 8027870: d1e8 bne.n 8027844 8027872: f89d 8028 ldrb.w r8, [sp, #40] ; 0x28 8027876: f88d 3030 strb.w r3, [sp, #48] ; 0x30 802787a: f36c 0800 bfi r8, ip, #0, #1 802787e: 46c4 mov ip, r8 8027880: f360 0c41 bfi ip, r0, #1, #1 8027884: 4660 mov r0, ip } break; } /* Width */ if (ch >= '0' && ch <= '9') { 8027886: f1a1 0330 sub.w r3, r1, #48 ; 0x30 802788a: f362 00c3 bfi r0, r2, #3, #1 802788e: 2b09 cmp r3, #9 8027890: f88d 0028 strb.w r0, [sp, #40] ; 0x28 8027894: d81d bhi.n 80278d2 8027896: e004 b.n 80278a2 unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 8027898: fb00 3202 mla r2, r0, r2, r3 ch = *p++; 802789c: f817 1b01 ldrb.w r1, [r7], #1 80278a0: e001 b.n 80278a6 } break; } /* Width */ if (ch >= '0' && ch <= '9') { 80278a2: 2200 movs r2, #0 unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 80278a4: 200a movs r0, #10 ui2a(num, p); } static int a2d(char ch) { if (ch >= '0' && ch <= '9') 80278a6: f1a1 0330 sub.w r3, r1, #48 ; 0x30 80278aa: fa5f fc83 uxtb.w ip, r3 80278ae: f1bc 0f09 cmp.w ip, #9 80278b2: d9f1 bls.n 8027898 return ch - '0'; else if (ch >= 'a' && ch <= 'f') 80278b4: f1a1 0361 sub.w r3, r1, #97 ; 0x61 80278b8: 2b05 cmp r3, #5 80278ba: d802 bhi.n 80278c2 return ch - 'a' + 10; 80278bc: f1a1 0357 sub.w r3, r1, #87 ; 0x57 80278c0: e1b5 b.n 8027c2e else if (ch >= 'A' && ch <= 'F') 80278c2: f1a1 0341 sub.w r3, r1, #65 ; 0x41 80278c6: 2b05 cmp r3, #5 80278c8: d802 bhi.n 80278d0 return ch - 'A' + 10; 80278ca: f1a1 0337 sub.w r3, r1, #55 ; 0x37 80278ce: e1ae b.n 8027c2e break; num = num * base + digit; ch = *p++; } *src = p; *nump = num; 80278d0: 920b str r2, [sp, #44] ; 0x2c } /* We accept 'x.y' format but don't support it completely: * we ignore the 'y' digit => this ignores 0-fill * size and makes it == width (ie. 'x') */ if (ch == '.') { 80278d2: 292e cmp r1, #46 ; 0x2e 80278d4: d10e bne.n 80278f4 //p.lz = 1; /* zero-padding */ /* ignore actual 0-fill size: */ ch = *(fmt++); if (ch >= '0' && ch <= '9') 80278d6: 783a ldrb r2, [r7, #0] 80278d8: 3a30 subs r2, #48 ; 0x30 80278da: b2d2 uxtb r2, r2 * we ignore the 'y' digit => this ignores 0-fill * size and makes it == width (ie. 'x') */ if (ch == '.') { //p.lz = 1; /* zero-padding */ /* ignore actual 0-fill size: */ ch = *(fmt++); 80278dc: 1c7b adds r3, r7, #1 if (ch >= '0' && ch <= '9') 80278de: 2a09 cmp r2, #9 p.prec = ch - '0'; 80278e0: bf98 it ls 80278e2: f88d 203c strbls.w r2, [sp, #60] ; 0x3c do { ch = *(fmt++); 80278e6: f813 1b01 ldrb.w r1, [r3], #1 } while (ch >= '0' && ch <= '9'); 80278ea: f1a1 0230 sub.w r2, r1, #48 ; 0x30 80278ee: 2a09 cmp r2, #9 ch = *(fmt++); if (ch >= '0' && ch <= '9') p.prec = ch - '0'; do { ch = *(fmt++); 80278f0: 461f mov r7, r3 } while (ch >= '0' && ch <= '9'); 80278f2: d9f8 bls.n 80278e6 } #ifdef PRINTF_SIZE_T_SUPPORT # ifdef PRINTF_LONG_SUPPORT if (ch == 'z') { 80278f4: 297a cmp r1, #122 ; 0x7a 80278f6: d102 bne.n 80278fe ch = *(fmt++); 80278f8: f817 1b01 ldrb.w r1, [r7], #1 80278fc: e005 b.n 802790a } else # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { 80278fe: 296c cmp r1, #108 ; 0x6c 8027900: d109 bne.n 8027916 ch = *(fmt++); 8027902: 7839 ldrb r1, [r7, #0] lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { 8027904: 296c cmp r1, #108 ; 0x6c 8027906: d002 beq.n 802790e # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 8027908: 3701 adds r7, #1 lng = 1; 802790a: 2301 movs r3, #1 802790c: e004 b.n 8027918 #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 802790e: 7879 ldrb r1, [r7, #1] lng = 2; 8027910: 2302 movs r3, #2 if (ch == 'l') { ch = *(fmt++); lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 8027912: 3702 adds r7, #2 8027914: e000 b.n 8027918 while ((ch = *(fmt++))) { if (ch != '%') { putf(putp, ch); } else { #ifdef PRINTF_LONG_SUPPORT char lng = 0; /* 1 for long, 2 for long long */ 8027916: 2300 movs r3, #0 lng = 2; } #endif } #endif switch (ch) { 8027918: 2969 cmp r1, #105 ; 0x69 802791a: d036 beq.n 802798a 802791c: d816 bhi.n 802794c 802791e: 2963 cmp r1, #99 ; 0x63 8027920: f000 80a1 beq.w 8027a66 8027924: d80c bhi.n 8027940 8027926: 2946 cmp r1, #70 ; 0x46 8027928: f000 80b3 beq.w 8027a92 802792c: d806 bhi.n 802793c 802792e: 2900 cmp r1, #0 8027930: f000 8181 beq.w 8027c36 8027934: 2925 cmp r1, #37 ; 0x25 8027936: f040 8174 bne.w 8027c22 802793a: e0a7 b.n 8027a8c 802793c: 2958 cmp r1, #88 ; 0x58 802793e: e012 b.n 8027966 8027940: 2964 cmp r1, #100 ; 0x64 8027942: d022 beq.n 802798a 8027944: 2966 cmp r1, #102 ; 0x66 8027946: f040 816c bne.w 8027c22 802794a: e0a2 b.n 8027a92 802794c: 2973 cmp r1, #115 ; 0x73 802794e: f000 8090 beq.w 8027a72 8027952: d805 bhi.n 8027960 8027954: 296f cmp r1, #111 ; 0x6f 8027956: d078 beq.n 8027a4a 8027958: 2970 cmp r1, #112 ; 0x70 802795a: f040 8162 bne.w 8027c22 802795e: e040 b.n 80279e2 8027960: 2975 cmp r1, #117 ; 0x75 8027962: d003 beq.n 802796c 8027964: 2978 cmp r1, #120 ; 0x78 8027966: f040 815c bne.w 8027c22 802796a: e041 b.n 80279f0 case 0: goto abort; case 'u': p.base = 10; 802796c: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802796e: 2b02 cmp r3, #2 #endif switch (ch) { case 0: goto abort; case 'u': p.base = 10; 8027970: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8027972: d107 bne.n 8027984 ulli2a(va_arg(va, unsigned long long int), &p); 8027974: 3407 adds r4, #7 8027976: f024 0307 bic.w r3, r4, #7 802797a: f103 0408 add.w r4, r3, #8 802797e: e9d3 0100 ldrd r0, r1, [r3] 8027982: e017 b.n 80279b4 else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 8027984: 6820 ldr r0, [r4, #0] 8027986: a90a add r1, sp, #40 ; 0x28 8027988: e04f b.n 8027a2a ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 802798a: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802798c: 2b02 cmp r3, #2 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 802798e: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8027990: d112 bne.n 80279b8 lli2a(va_arg(va, long long int), &p); 8027992: 3407 adds r4, #7 8027994: f024 0307 bic.w r3, r4, #7 8027998: e9d3 0100 ldrd r0, r1, [r3] 802799c: f103 0408 add.w r4, r3, #8 *bf = 0; } static void lli2a(long long int num, struct param *p) { if (num < 0) { 80279a0: 2800 cmp r0, #0 80279a2: f171 0300 sbcs.w r3, r1, #0 80279a6: da05 bge.n 80279b4 num = -num; p->sign = '-'; 80279a8: 232d movs r3, #45 ; 0x2d } static void lli2a(long long int num, struct param *p) { if (num < 0) { num = -num; 80279aa: 4240 negs r0, r0 80279ac: eb61 0141 sbc.w r1, r1, r1, lsl #1 p->sign = '-'; 80279b0: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ulli2a(num, p); 80279b4: aa0a add r2, sp, #40 ; 0x28 80279b6: e033 b.n 8027a20 #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) lli2a(va_arg(va, long long int), &p); else #endif if (1 == lng) 80279b8: 2b01 cmp r3, #1 li2a(va_arg(va, long int), &p); 80279ba: 6820 ldr r0, [r4, #0] 80279bc: f104 0804 add.w r8, r4, #4 #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) lli2a(va_arg(va, long long int), &p); else #endif if (1 == lng) 80279c0: d107 bne.n 80279d2 *bf = 0; } static void li2a(long num, struct param *p) { if (num < 0) { 80279c2: 2800 cmp r0, #0 80279c4: da03 bge.n 80279ce num = -num; p->sign = '-'; 80279c6: 232d movs r3, #45 ; 0x2d } static void li2a(long num, struct param *p) { if (num < 0) { num = -num; 80279c8: 4240 negs r0, r0 p->sign = '-'; 80279ca: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } uli2a(num, p); 80279ce: a90a add r1, sp, #40 ; 0x28 80279d0: e02f b.n 8027a32 *bf = 0; } static void i2a(int num, struct param *p) { if (num < 0) { 80279d2: 2800 cmp r0, #0 80279d4: da03 bge.n 80279de num = -num; p->sign = '-'; 80279d6: 232d movs r3, #45 ; 0x2d } static void i2a(int num, struct param *p) { if (num < 0) { num = -num; 80279d8: 4240 negs r0, r0 p->sign = '-'; 80279da: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ui2a(num, p); 80279de: a90a add r1, sp, #40 ; 0x28 80279e0: e02a b.n 8027a38 i2a(va_arg(va, int), &p); putchw(putp, putf, &p); break; #ifdef SIZEOF_POINTER case 'p': p.alt = 1; 80279e2: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 80279e6: f043 0302 orr.w r3, r3, #2 80279ea: f88d 3028 strb.w r3, [sp, #40] ; 0x28 # if defined(SIZEOF_INT) && SIZEOF_POINTER <= SIZEOF_INT lng = 0; 80279ee: 2300 movs r3, #0 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 80279f0: 2210 movs r2, #16 p.uc = (ch == 'X')?1:0; 80279f2: f1b1 0e58 subs.w lr, r1, #88 ; 0x58 80279f6: f1de 0100 rsbs r1, lr, #0 80279fa: f89d 0028 ldrb.w r0, [sp, #40] ; 0x28 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 80279fe: 920d str r2, [sp, #52] ; 0x34 p.uc = (ch == 'X')?1:0; 8027a00: eb51 010e adcs.w r1, r1, lr 8027a04: aa1a add r2, sp, #104 ; 0x68 8027a06: f361 0082 bfi r0, r1, #2, #1 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8027a0a: 2b02 cmp r3, #2 # endif #endif case 'x': case 'X': p.base = 16; p.uc = (ch == 'X')?1:0; 8027a0c: f802 0d40 strb.w r0, [r2, #-64]! #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8027a10: d109 bne.n 8027a26 ulli2a(va_arg(va, unsigned long long int), &p); 8027a12: 3407 adds r4, #7 8027a14: f024 0307 bic.w r3, r4, #7 8027a18: e9d3 0100 ldrd r0, r1, [r3] 8027a1c: f103 0408 add.w r4, r3, #8 8027a20: f7ff fdbe bl 80275a0 8027a24: e00b b.n 8027a3e else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 8027a26: 6820 ldr r0, [r4, #0] 8027a28: 4611 mov r1, r2 #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) ulli2a(va_arg(va, unsigned long long int), &p); else #endif if (1 == lng) 8027a2a: 2b01 cmp r3, #1 8027a2c: f104 0804 add.w r8, r4, #4 8027a30: d102 bne.n 8027a38 uli2a(va_arg(va, unsigned long int), &p); 8027a32: f7ff fe0b bl 802764c 8027a36: e001 b.n 8027a3c else #endif ui2a(va_arg(va, unsigned int), &p); 8027a38: f7ff fe33 bl 80276a2 8027a3c: 4644 mov r4, r8 putchw(putp, putf, &p); 8027a3e: 4628 mov r0, r5 8027a40: 4631 mov r1, r6 8027a42: aa0a add r2, sp, #40 ; 0x28 8027a44: f7ff fe58 bl 80276f8 break; 8027a48: e0eb b.n 8027c22 case 'o': p.base = 8; 8027a4a: 2308 movs r3, #8 ui2a(va_arg(va, unsigned int), &p); 8027a4c: 6820 ldr r0, [r4, #0] #endif ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'o': p.base = 8; 8027a4e: 930d str r3, [sp, #52] ; 0x34 ui2a(va_arg(va, unsigned int), &p); 8027a50: a90a add r1, sp, #40 ; 0x28 8027a52: f7ff fe26 bl 80276a2 putchw(putp, putf, &p); 8027a56: 4628 mov r0, r5 8027a58: 4631 mov r1, r6 8027a5a: aa0a add r2, sp, #40 ; 0x28 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'o': p.base = 8; ui2a(va_arg(va, unsigned int), &p); 8027a5c: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); 8027a60: f7ff fe4a bl 80276f8 8027a64: e010 b.n 8027a88 break; case 'c': putf(putp, (char)(va_arg(va, int))); 8027a66: 4628 mov r0, r5 8027a68: 7821 ldrb r1, [r4, #0] 8027a6a: f104 0804 add.w r8, r4, #4 8027a6e: 47b0 blx r6 8027a70: e00a b.n 8027a88 break; case 's': p.bf = va_arg(va, char *); 8027a72: 6823 ldr r3, [r4, #0] putchw(putp, putf, &p); 8027a74: aa0a add r2, sp, #40 ; 0x28 8027a76: 4628 mov r0, r5 8027a78: 4631 mov r1, r6 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 8027a7a: 930e str r3, [sp, #56] ; 0x38 putchw(putp, putf, &p); 8027a7c: f7ff fe3c bl 80276f8 p.bf = bf; 8027a80: aa04 add r2, sp, #16 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 8027a82: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); p.bf = bf; 8027a86: 920e str r2, [sp, #56] ; 0x38 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 8027a88: 4644 mov r4, r8 putchw(putp, putf, &p); p.bf = bf; break; 8027a8a: e0ca b.n 8027c22 case '%': putf(putp, ch); 8027a8c: 4628 mov r0, r5 8027a8e: 47b0 blx r6 break; 8027a90: e0c7 b.n 8027c22 case 'f': case 'F': fval = va_arg(va, double); 8027a92: 3407 adds r4, #7 8027a94: f024 0307 bic.w r3, r4, #7 8027a98: f103 0408 add.w r4, r3, #8 8027a9c: e893 0404 ldmia.w r3, {r2, sl} 8027aa0: 9200 str r2, [sp, #0] sign = 0; if (fval < 0) 8027aa2: 4610 mov r0, r2 8027aa4: 4651 mov r1, sl 8027aa6: 2200 movs r2, #0 8027aa8: 2300 movs r3, #0 8027aaa: f7f9 f837 bl 8020b1c <__aeabi_dcmplt> 8027aae: b138 cbz r0, 8027ac0 { sign = 1; p.width--; 8027ab0: 9b0b ldr r3, [sp, #44] ; 0x2c 8027ab2: 3b01 subs r3, #1 8027ab4: 930b str r3, [sp, #44] ; 0x2c fval = - fval; 8027ab6: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 case 'F': fval = va_arg(va, double); sign = 0; if (fval < 0) { sign = 1; 8027aba: f04f 0b01 mov.w fp, #1 8027abe: e009 b.n 8027ad4 p.width--; fval = - fval; } else if (p.sign) { 8027ac0: f89d 3030 ldrb.w r3, [sp, #48] ; 0x30 8027ac4: b12b cbz r3, 8027ad2 sign = 2; p.width--; 8027ac6: 9b0b ldr r3, [sp, #44] ; 0x2c 8027ac8: 3b01 subs r3, #1 8027aca: 930b str r3, [sp, #44] ; 0x2c sign = 1; p.width--; fval = - fval; } else if (p.sign) { sign = 2; 8027acc: f04f 0b02 mov.w fp, #2 8027ad0: e000 b.n 8027ad4 putf(putp, ch); break; case 'f': case 'F': fval = va_arg(va, double); sign = 0; 8027ad2: 469b mov fp, r3 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 8027ad4: 4651 mov r1, sl 8027ad6: 9800 ldr r0, [sp, #0] 8027ad8: f7f9 f848 bl 8020b6c <__aeabi_d2iz> fiter = 0; 8027adc: 2200 movs r2, #0 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 8027ade: 9001 str r0, [sp, #4] 8027ae0: 4680 mov r8, r0 fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 8027ae2: 210a movs r1, #10 } fpart = (int)fval; fiter = 0; while (fpart != 0) 8027ae4: e008 b.n 8027af8 { temp_buffer[fiter++] = fpart % 10; 8027ae6: fb98 f0f1 sdiv r0, r8, r1 8027aea: ab10 add r3, sp, #64 ; 0x40 8027aec: fb01 8810 mls r8, r1, r0, r8 8027af0: f843 8022 str.w r8, [r3, r2, lsl #2] 8027af4: 3201 adds r2, #1 fpart = fpart / 10; 8027af6: 4680 mov r8, r0 } fpart = (int)fval; fiter = 0; while (fpart != 0) 8027af8: f1b8 0f00 cmp.w r8, #0 8027afc: d1f3 bne.n 8027ae6 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; if (fiter == -1) 8027afe: f102 39ff add.w r9, r2, #4294967295 8027b02: b912 cbnz r2, 8027b0a p.width--; 8027b04: 9a0b ldr r2, [sp, #44] ; 0x2c 8027b06: 3a01 subs r2, #1 8027b08: 920b str r2, [sp, #44] ; 0x2c /* Leading zeros */ if (p.lz) { 8027b0a: f89d 2028 ldrb.w r2, [sp, #40] ; 0x28 8027b0e: 07d0 lsls r0, r2, #31 8027b10: d51b bpl.n 8027b4a if (sign == 1) 8027b12: f1bb 0f01 cmp.w fp, #1 8027b16: d102 bne.n 8027b1e putf(putp, '-'); 8027b18: 4628 mov r0, r5 8027b1a: 212d movs r1, #45 ; 0x2d 8027b1c: e007 b.n 8027b2e else if (sign == 2) 8027b1e: f1bb 0f02 cmp.w fp, #2 8027b22: d105 bne.n 8027b30 putf(putp, '+'); 8027b24: 4628 mov r0, r5 8027b26: 212b movs r1, #43 ; 0x2b 8027b28: e001 b.n 8027b2e while (p.width-- > p.prec + fiter + 2) { putf(putp, '0'); 8027b2a: 4628 mov r0, r5 8027b2c: 2130 movs r1, #48 ; 0x30 8027b2e: 47b0 blx r6 if (sign == 1) putf(putp, '-'); else if (sign == 2) putf(putp, '+'); while (p.width-- > p.prec + fiter + 2) 8027b30: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 8027b34: 9b0b ldr r3, [sp, #44] ; 0x2c 8027b36: 444a add r2, r9 8027b38: 3202 adds r2, #2 8027b3a: 1e59 subs r1, r3, #1 8027b3c: 4293 cmp r3, r2 8027b3e: 910b str r1, [sp, #44] ; 0x2c 8027b40: dcf3 bgt.n 8027b2a 8027b42: e017 b.n 8027b74 else { while (p.width-- > p.prec + fiter + 2) { putf(putp, ' '); 8027b44: 4628 mov r0, r5 8027b46: 2120 movs r1, #32 8027b48: 47b0 blx r6 } } else { while (p.width-- > p.prec + fiter + 2) 8027b4a: f89d 103c ldrb.w r1, [sp, #60] ; 0x3c 8027b4e: 9a0b ldr r2, [sp, #44] ; 0x2c 8027b50: 4449 add r1, r9 8027b52: 3102 adds r1, #2 8027b54: 1e50 subs r0, r2, #1 8027b56: 428a cmp r2, r1 8027b58: 900b str r0, [sp, #44] ; 0x2c 8027b5a: dcf3 bgt.n 8027b44 { putf(putp, ' '); } if (sign == 1) 8027b5c: f1bb 0f01 cmp.w fp, #1 8027b60: d102 bne.n 8027b68 putf(putp, '-'); 8027b62: 4628 mov r0, r5 8027b64: 212d movs r1, #45 ; 0x2d 8027b66: e004 b.n 8027b72 else if (sign == 2) 8027b68: f1bb 0f02 cmp.w fp, #2 8027b6c: d102 bne.n 8027b74 putf(putp, '+'); 8027b6e: 4628 mov r0, r5 8027b70: 212b movs r1, #43 ; 0x2b 8027b72: 47b0 blx r6 } if (fiter == -1) 8027b74: f1b9 3fff cmp.w r9, #4294967295 8027b78: d102 bne.n 8027b80 putf(putp, '0'); 8027b7a: 4628 mov r0, r5 8027b7c: 2130 movs r1, #48 ; 0x30 8027b7e: e007 b.n 8027b90 while (fiter > -1) { putf(putp, '0' + (temp_buffer[fiter--])); 8027b80: ab10 add r3, sp, #64 ; 0x40 8027b82: 4628 mov r0, r5 8027b84: f853 1029 ldr.w r1, [r3, r9, lsl #2] 8027b88: 3130 adds r1, #48 ; 0x30 8027b8a: f109 39ff add.w r9, r9, #4294967295 8027b8e: b2c9 uxtb r1, r1 8027b90: 47b0 blx r6 } if (fiter == -1) putf(putp, '0'); while (fiter > -1) 8027b92: f1b9 3fff cmp.w r9, #4294967295 8027b96: d1f3 bne.n 8027b80 { putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); 8027b98: 4628 mov r0, r5 8027b9a: 212e movs r1, #46 ; 0x2e 8027b9c: 47b0 blx r6 ffactor = 1; 8027b9e: f04f 0901 mov.w r9, #1 while (p.prec-- > 0) 8027ba2: e01d b.n 8027be0 { ffactor *= 10; 8027ba4: 230a movs r3, #10 fpart = (int)((fval - (int)fval)*ffactor); 8027ba6: 9801 ldr r0, [sp, #4] putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) { ffactor *= 10; 8027ba8: fb03 f909 mul.w r9, r3, r9 fpart = (int)((fval - (int)fval)*ffactor); 8027bac: f7f8 fcde bl 802056c <__aeabi_i2d> 8027bb0: 4602 mov r2, r0 8027bb2: 460b mov r3, r1 8027bb4: 9800 ldr r0, [sp, #0] 8027bb6: 4651 mov r1, sl 8027bb8: f7f8 fb8a bl 80202d0 <__aeabi_dsub> 8027bbc: e9cd 0102 strd r0, r1, [sp, #8] 8027bc0: 4648 mov r0, r9 8027bc2: f7f8 fcd3 bl 802056c <__aeabi_i2d> 8027bc6: 4602 mov r2, r0 8027bc8: 460b mov r3, r1 8027bca: e9dd 0102 ldrd r0, r1, [sp, #8] 8027bce: f7f8 fd33 bl 8020638 <__aeabi_dmul> 8027bd2: f7f8 ffcb bl 8020b6c <__aeabi_d2iz> if (fpart == 0) 8027bd6: 4680 mov r8, r0 8027bd8: b910 cbnz r0, 8027be0 putf(putp, '0'); 8027bda: 4628 mov r0, r5 8027bdc: 2130 movs r1, #48 ; 0x30 8027bde: 47b0 blx r6 putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) 8027be0: f89d 303c ldrb.w r3, [sp, #60] ; 0x3c 8027be4: 1e5a subs r2, r3, #1 8027be6: f88d 203c strb.w r2, [sp, #60] ; 0x3c 8027bea: 2b00 cmp r3, #0 8027bec: d1da bne.n 8027ba4 putf(putp, '0'); } fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 8027bee: 220a movs r2, #10 8027bf0: e008 b.n 8027c04 8027bf2: fb98 f1f2 sdiv r1, r8, r2 8027bf6: a810 add r0, sp, #64 ; 0x40 8027bf8: fb02 8811 mls r8, r2, r1, r8 8027bfc: f840 8023 str.w r8, [r0, r3, lsl #2] 8027c00: 3301 adds r3, #1 fpart = fpart / 10; 8027c02: 4688 mov r8, r1 fpart = (int)((fval - (int)fval)*ffactor); if (fpart == 0) putf(putp, '0'); } fiter = 0; while (fpart != 0) 8027c04: f1b8 0f00 cmp.w r8, #0 8027c08: d1f3 bne.n 8027bf2 8027c0a: 4698 mov r8, r3 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 8027c0c: e006 b.n 8027c1c { putf(putp, '0' + (temp_buffer[fiter--])); 8027c0e: ab10 add r3, sp, #64 ; 0x40 8027c10: 4628 mov r0, r5 8027c12: f853 1028 ldr.w r1, [r3, r8, lsl #2] 8027c16: 3130 adds r1, #48 ; 0x30 8027c18: b2c9 uxtb r1, r1 8027c1a: 47b0 blx r6 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 8027c1c: f118 38ff adds.w r8, r8, #4294967295 8027c20: d2f5 bcs.n 8027c0e char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; while ((ch = *(fmt++))) { 8027c22: f817 1b01 ldrb.w r1, [r7], #1 8027c26: 2900 cmp r1, #0 8027c28: f47f adf2 bne.w 8027810 8027c2c: e003 b.n 8027c36 { const char *p = *src; unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) 8027c2e: 2b0a cmp r3, #10 8027c30: f77f ae32 ble.w 8027898 8027c34: e64c b.n 80278d0 break; } } } abort:; } 8027c36: b01b add sp, #108 ; 0x6c 8027c38: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08027c3c : static putcf stdout_putf; static void *stdout_putp; void init_printf(void *putp, putcf putf) { stdout_putf = putf; 8027c3c: 4b02 ldr r3, [pc, #8] ; (8027c48 ) 8027c3e: 6019 str r1, [r3, #0] stdout_putp = putp; 8027c40: 4b02 ldr r3, [pc, #8] ; (8027c4c ) 8027c42: 6018 str r0, [r3, #0] 8027c44: 4770 bx lr 8027c46: bf00 nop 8027c48: 20000b24 .word 0x20000b24 8027c4c: 20000b28 .word 0x20000b28 08027c50 : } void tfp_printf(char *fmt, ...) { 8027c50: b40f push {r0, r1, r2, r3} 8027c52: b507 push {r0, r1, r2, lr} va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027c54: 4906 ldr r1, [pc, #24] ; (8027c70 ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027c56: ab04 add r3, sp, #16 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027c58: 6808 ldr r0, [r1, #0] 8027c5a: 4906 ldr r1, [pc, #24] ; (8027c74 ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027c5c: f853 2b04 ldr.w r2, [r3], #4 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027c60: 6809 ldr r1, [r1, #0] } void tfp_printf(char *fmt, ...) { va_list va; va_start(va, fmt); 8027c62: 9301 str r3, [sp, #4] tfp_format(stdout_putp, stdout_putf, fmt, va); 8027c64: f7ff fdca bl 80277fc va_end(va); } 8027c68: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 8027c6c: b004 add sp, #16 8027c6e: 4770 bx lr 8027c70: 20000b28 .word 0x20000b28 8027c74: 20000b24 .word 0x20000b24 08027c78 : data->dest[data->num_chars] = c; data->num_chars ++; } int tfp_vsnprintf(char *str, size_t size, const char *format, va_list ap) { 8027c78: b51f push {r0, r1, r2, r3, r4, lr} 8027c7a: 2400 movs r4, #0 struct _vsnprintf_putcf_data data; if (size < 1) 8027c7c: b181 cbz r1, 8027ca0 return 0; data.dest = str; data.dest_capacity = size-1; 8027c7e: 3901 subs r1, #1 struct _vsnprintf_putcf_data data; if (size < 1) return 0; data.dest = str; 8027c80: 9002 str r0, [sp, #8] data.dest_capacity = size-1; 8027c82: 9101 str r1, [sp, #4] data.num_chars = 0; tfp_format(&data, _vsnprintf_putcf, format, ap); 8027c84: a801 add r0, sp, #4 8027c86: 4908 ldr r1, [pc, #32] ; (8027ca8 ) if (size < 1) return 0; data.dest = str; data.dest_capacity = size-1; data.num_chars = 0; 8027c88: 9403 str r4, [sp, #12] tfp_format(&data, _vsnprintf_putcf, format, ap); 8027c8a: f7ff fdb7 bl 80277fc if (data.num_chars < data.dest_capacity) 8027c8e: 9903 ldr r1, [sp, #12] 8027c90: 9b01 ldr r3, [sp, #4] 8027c92: 9a02 ldr r2, [sp, #8] 8027c94: 4299 cmp r1, r3 data.dest[data.num_chars] = '\0'; 8027c96: bf34 ite cc 8027c98: 5454 strbcc r4, [r2, r1] else data.dest[data.dest_capacity] = '\0'; 8027c9a: 54d4 strbcs r4, [r2, r3] return data.num_chars; 8027c9c: 9803 ldr r0, [sp, #12] 8027c9e: e000 b.n 8027ca2 int tfp_vsnprintf(char *str, size_t size, const char *format, va_list ap) { struct _vsnprintf_putcf_data data; if (size < 1) return 0; 8027ca0: 4608 mov r0, r1 data.dest[data.num_chars] = '\0'; else data.dest[data.dest_capacity] = '\0'; return data.num_chars; } 8027ca2: b004 add sp, #16 8027ca4: bd10 pop {r4, pc} 8027ca6: bf00 nop 8027ca8: 080277dd .word 0x080277dd 08027cac : int tfp_snprintf(char *str, size_t size, const char *format, ...) { 8027cac: b40c push {r2, r3} 8027cae: b507 push {r0, r1, r2, lr} 8027cb0: ab04 add r3, sp, #16 8027cb2: f853 2b04 ldr.w r2, [r3], #4 va_list ap; int retval; va_start(ap, format); 8027cb6: 9301 str r3, [sp, #4] retval = tfp_vsnprintf(str, size, format, ap); 8027cb8: f7ff ffde bl 8027c78 va_end(ap); return retval; } 8027cbc: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 8027cc0: b002 add sp, #8 8027cc2: 4770 bx lr 08027cc4 : struct _vsprintf_putcf_data *data = (struct _vsprintf_putcf_data*)p; data->dest[data->num_chars++] = c; } int tfp_vsprintf(char *str, const char *format, va_list ap) { 8027cc4: b537 push {r0, r1, r2, r4, r5, lr} 8027cc6: 460d mov r5, r1 8027cc8: 4613 mov r3, r2 struct _vsprintf_putcf_data data; data.dest = str; 8027cca: 9000 str r0, [sp, #0] data.num_chars = 0; 8027ccc: 2400 movs r4, #0 tfp_format(&data, _vsprintf_putcf, format, ap); 8027cce: 4668 mov r0, sp 8027cd0: 462a mov r2, r5 8027cd2: 4904 ldr r1, [pc, #16] ; (8027ce4 ) int tfp_vsprintf(char *str, const char *format, va_list ap) { struct _vsprintf_putcf_data data; data.dest = str; data.num_chars = 0; 8027cd4: 9401 str r4, [sp, #4] tfp_format(&data, _vsprintf_putcf, format, ap); 8027cd6: f7ff fd91 bl 80277fc data.dest[data.num_chars] = '\0'; 8027cda: e89d 000c ldmia.w sp, {r2, r3} 8027cde: 54d4 strb r4, [r2, r3] return data.num_chars; } 8027ce0: 9801 ldr r0, [sp, #4] 8027ce2: bd3e pop {r1, r2, r3, r4, r5, pc} 8027ce4: 080277f1 .word 0x080277f1 08027ce8 : int tfp_sprintf(char *str, const char *format, ...) { 8027ce8: b40e push {r1, r2, r3} 8027cea: b503 push {r0, r1, lr} 8027cec: aa03 add r2, sp, #12 8027cee: f852 1b04 ldr.w r1, [r2], #4 va_list ap; int retval; va_start(ap, format); 8027cf2: 9201 str r2, [sp, #4] retval = tfp_vsprintf(str, format, ap); 8027cf4: f7ff ffe6 bl 8027cc4 va_end(ap); return retval; } 8027cf8: e8bd 400c ldmia.w sp!, {r2, r3, lr} 8027cfc: b003 add sp, #12 8027cfe: 4770 bx lr 08027d00 : /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8027d00: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Freq_in); 8027d02: 4b08 ldr r3, [pc, #32] ; (8027d24 ) /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8027d04: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Freq_in); 8027d06: 6818 ldr r0, [r3, #0] /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8027d08: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Freq_in); 8027d0a: f7f8 fc41 bl 8020590 <__aeabi_f2d> 8027d0e: 4602 mov r2, r0 8027d10: 460b mov r3, r1 8027d12: 4620 mov r0, r4 8027d14: 4904 ldr r1, [pc, #16] ; (8027d28 ) 8027d16: f7ff ffe7 bl 8027ce8 *len = strlen(str); 8027d1a: 4620 mov r0, r4 8027d1c: f7fa fa54 bl 80221c8 8027d20: 7028 strb r0, [r5, #0] 8027d22: bd38 pop {r3, r4, r5, pc} 8027d24: 2000d7d8 .word 0x2000d7d8 8027d28: 08039169 .word 0x08039169 08027d2c : /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027d2c: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Freq_in); 8027d2e: 4b08 ldr r3, [pc, #32] ; (8027d50 ) /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027d30: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Freq_in); 8027d32: 6818 ldr r0, [r3, #0] /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027d34: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Freq_in); 8027d36: f7f8 fc2b bl 8020590 <__aeabi_f2d> 8027d3a: 4602 mov r2, r0 8027d3c: 460b mov r3, r1 8027d3e: 4620 mov r0, r4 8027d40: 4904 ldr r1, [pc, #16] ; (8027d54 ) 8027d42: f7ff ffd1 bl 8027ce8 *len = strlen(str); 8027d46: 4620 mov r0, r4 8027d48: f7fa fa3e bl 80221c8 8027d4c: 7028 strb r0, [r5, #0] 8027d4e: bd38 pop {r3, r4, r5, pc} 8027d50: 2000d7d8 .word 0x2000d7d8 8027d54: 08039169 .word 0x08039169 08027d58 : /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027d58: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.VAC_in); 8027d5a: 4b08 ldr r3, [pc, #32] ; (8027d7c ) /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027d5c: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.VAC_in); 8027d5e: 6858 ldr r0, [r3, #4] /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027d60: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.VAC_in); 8027d62: f7f8 fc15 bl 8020590 <__aeabi_f2d> 8027d66: 4602 mov r2, r0 8027d68: 460b mov r3, r1 8027d6a: 4620 mov r0, r4 8027d6c: 4904 ldr r1, [pc, #16] ; (8027d80 ) 8027d6e: f7ff ffbb bl 8027ce8 *len = strlen(str); 8027d72: 4620 mov r0, r4 8027d74: f7fa fa28 bl 80221c8 8027d78: 7028 strb r0, [r5, #0] 8027d7a: bd38 pop {r3, r4, r5, pc} 8027d7c: 2000d7d8 .word 0x2000d7d8 8027d80: 08039169 .word 0x08039169 08027d84 : /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027d84: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.VAC_out); 8027d86: 4b08 ldr r3, [pc, #32] ; (8027da8 ) /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027d88: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.VAC_out); 8027d8a: 6898 ldr r0, [r3, #8] /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027d8c: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.VAC_out); 8027d8e: f7f8 fbff bl 8020590 <__aeabi_f2d> 8027d92: 4602 mov r2, r0 8027d94: 460b mov r3, r1 8027d96: 4620 mov r0, r4 8027d98: 4904 ldr r1, [pc, #16] ; (8027dac ) 8027d9a: f7ff ffa5 bl 8027ce8 *len = strlen(str); 8027d9e: 4620 mov r0, r4 8027da0: f7fa fa12 bl 80221c8 8027da4: 7028 strb r0, [r5, #0] 8027da6: bd38 pop {r3, r4, r5, pc} 8027da8: 2000d7d8 .word 0x2000d7d8 8027dac: 08039169 .word 0x08039169 08027db0 : /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 8027db0: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Load); 8027db2: 4b06 ldr r3, [pc, #24] ; (8027dcc ) /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 8027db4: 4605 mov r5, r0 8027db6: 460c mov r4, r1 sprintf(str, "%d", UPS.Load); 8027db8: 7c1a ldrb r2, [r3, #16] 8027dba: 4905 ldr r1, [pc, #20] ; (8027dd0 ) 8027dbc: f7ff ff94 bl 8027ce8 *len = strlen(str); 8027dc0: 4628 mov r0, r5 8027dc2: f7fa fa01 bl 80221c8 8027dc6: 7020 strb r0, [r4, #0] 8027dc8: bd38 pop {r3, r4, r5, pc} 8027dca: bf00 nop 8027dcc: 2000d7d8 .word 0x2000d7d8 8027dd0: 0803916f .word 0x0803916f 08027dd4 : /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 8027dd4: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.SOC); 8027dd6: 4b06 ldr r3, [pc, #24] ; (8027df0 ) /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 8027dd8: 4605 mov r5, r0 8027dda: 460c mov r4, r1 sprintf(str, "%d", UPS.SOC); 8027ddc: 7c5a ldrb r2, [r3, #17] 8027dde: 4905 ldr r1, [pc, #20] ; (8027df4 ) 8027de0: f7ff ff82 bl 8027ce8 *len = strlen(str); 8027de4: 4628 mov r0, r5 8027de6: f7fa f9ef bl 80221c8 8027dea: 7020 strb r0, [r4, #0] 8027dec: bd38 pop {r3, r4, r5, pc} 8027dee: bf00 nop 8027df0: 2000d7d8 .word 0x2000d7d8 8027df4: 0803916f .word 0x0803916f 08027df8 : /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 8027df8: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.work_time); 8027dfa: 4b06 ldr r3, [pc, #24] ; (8027e14 ) /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 8027dfc: 4605 mov r5, r0 8027dfe: 460c mov r4, r1 sprintf(str, "%d", UPS.work_time); 8027e00: 7c9a ldrb r2, [r3, #18] 8027e02: 4905 ldr r1, [pc, #20] ; (8027e18 ) 8027e04: f7ff ff70 bl 8027ce8 *len = strlen(str); 8027e08: 4628 mov r0, r5 8027e0a: f7fa f9dd bl 80221c8 8027e0e: 7020 strb r0, [r4, #0] 8027e10: bd38 pop {r3, r4, r5, pc} 8027e12: bf00 nop 8027e14: 2000d7d8 .word 0x2000d7d8 8027e18: 0803916f .word 0x0803916f 08027e1c : /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8027e1c: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Temp); 8027e1e: 4b08 ldr r3, [pc, #32] ; (8027e40 ) /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8027e20: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Temp); 8027e22: 68d8 ldr r0, [r3, #12] /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8027e24: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Temp); 8027e26: f7f8 fbb3 bl 8020590 <__aeabi_f2d> 8027e2a: 4602 mov r2, r0 8027e2c: 460b mov r3, r1 8027e2e: 4620 mov r0, r4 8027e30: 4904 ldr r1, [pc, #16] ; (8027e44 ) 8027e32: f7ff ff59 bl 8027ce8 *len = strlen(str); 8027e36: 4620 mov r0, r4 8027e38: f7fa f9c6 bl 80221c8 8027e3c: 7028 strb r0, [r5, #0] 8027e3e: bd38 pop {r3, r4, r5, pc} 8027e40: 2000d7d8 .word 0x2000d7d8 8027e44: 08039169 .word 0x08039169 08027e48 : /** * @brief */ void GetAlarmMonitorStr(char *str, uint8_t *len) { 8027e48: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Alarm); 8027e4a: 4b06 ldr r3, [pc, #24] ; (8027e64 ) /** * @brief */ void GetAlarmMonitorStr(char *str, uint8_t *len) { 8027e4c: 4605 mov r5, r0 8027e4e: 460c mov r4, r1 sprintf(str, "%d", UPS.Alarm); 8027e50: 7d1a ldrb r2, [r3, #20] 8027e52: 4905 ldr r1, [pc, #20] ; (8027e68 ) 8027e54: f7ff ff48 bl 8027ce8 *len = strlen(str); 8027e58: 4628 mov r0, r5 8027e5a: f7fa f9b5 bl 80221c8 8027e5e: 7020 strb r0, [r4, #0] 8027e60: bd38 pop {r3, r4, r5, pc} 8027e62: bf00 nop 8027e64: 2000d7d8 .word 0x2000d7d8 8027e68: 0803916f .word 0x0803916f 08027e6c : /** * @brief */ void GetConnectMonitorStr(char *str, uint8_t *len) { 8027e6c: b538 push {r3, r4, r5, lr} if(UPS.Present) 8027e6e: 4b08 ldr r3, [pc, #32] ; (8027e90 ) 8027e70: f893 302d ldrb.w r3, [r3, #45] ; 0x2d /** * @brief */ void GetConnectMonitorStr(char *str, uint8_t *len) { 8027e74: 4605 mov r5, r0 8027e76: 460c mov r4, r1 if(UPS.Present) 8027e78: b10b cbz r3, 8027e7e strcpy(str, "0"); 8027e7a: 4906 ldr r1, [pc, #24] ; (8027e94 ) 8027e7c: e000 b.n 8027e80 else strcpy(str, "1"); 8027e7e: 4906 ldr r1, [pc, #24] ; (8027e98 ) 8027e80: f7fa f944 bl 802210c *len = strlen(str); 8027e84: 4628 mov r0, r5 8027e86: f7fa f99f bl 80221c8 8027e8a: 7020 strb r0, [r4, #0] 8027e8c: bd38 pop {r3, r4, r5, pc} 8027e8e: bf00 nop 8027e90: 2000d7d8 .word 0x2000d7d8 8027e94: 0803921b .word 0x0803921b 8027e98: 080394a7 .word 0x080394a7 08027e9c : /** * @brief Индикация аварийных ситуаций */ void GetAlarmStr(char *str, uint8_t *len) { 8027e9c: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Status); 8027e9e: 4b06 ldr r3, [pc, #24] ; (8027eb8 ) /** * @brief Индикация аварийных ситуаций */ void GetAlarmStr(char *str, uint8_t *len) { 8027ea0: 4605 mov r5, r0 8027ea2: 460c mov r4, r1 sprintf(str, "%d", UPS.Status); 8027ea4: 7cda ldrb r2, [r3, #19] 8027ea6: 4905 ldr r1, [pc, #20] ; (8027ebc ) 8027ea8: f7ff ff1e bl 8027ce8 *len = strlen(str); 8027eac: 4628 mov r0, r5 8027eae: f7fa f98b bl 80221c8 8027eb2: 7020 strb r0, [r4, #0] 8027eb4: bd38 pop {r3, r4, r5, pc} 8027eb6: bf00 nop 8027eb8: 2000d7d8 .word 0x2000d7d8 8027ebc: 0803916f .word 0x0803916f 08027ec0 : /** * @brief Дата (Ready for PRS!) */ void GetDateStr(char *str, uint8_t *len) { 8027ec0: b530 push {r4, r5, lr} 8027ec2: b087 sub sp, #28 8027ec4: 4604 mov r4, r0 8027ec6: 460d mov r5, r1 TM_RTC_t data; uint16_t sys_year ; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027ec8: a802 add r0, sp, #8 8027eca: 2100 movs r1, #0 8027ecc: f7fe fcba bl 8026844 sys_year = 2000 + data.year; sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 8027ed0: f89d 100f ldrb.w r1, [sp, #15] { TM_RTC_t data; uint16_t sys_year ; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); sys_year = 2000 + data.year; 8027ed4: f89d 2011 ldrb.w r2, [sp, #17] sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 8027ed8: f89d 3010 ldrb.w r3, [sp, #16] 8027edc: 9100 str r1, [sp, #0] 8027ede: f502 62fa add.w r2, r2, #2000 ; 0x7d0 8027ee2: 4905 ldr r1, [pc, #20] ; (8027ef8 ) 8027ee4: 4620 mov r0, r4 8027ee6: f7ff feff bl 8027ce8 *len = strlen(str); 8027eea: 4620 mov r0, r4 8027eec: f7fa f96c bl 80221c8 8027ef0: 7028 strb r0, [r5, #0] } 8027ef2: b007 add sp, #28 8027ef4: bd30 pop {r4, r5, pc} 8027ef6: bf00 nop 8027ef8: 08039172 .word 0x08039172 08027efc : /** * @brief Время (Ready for PRS!) */ void GetTimeStr(char *str, uint8_t *len) { 8027efc: b530 push {r4, r5, lr} 8027efe: b085 sub sp, #20 8027f00: 4604 mov r4, r0 8027f02: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027f04: 4668 mov r0, sp 8027f06: 2100 movs r1, #0 8027f08: f7fe fc9c bl 8026844 sprintf(str, "%02i:%02i", data.hours, data.minutes); 8027f0c: 4906 ldr r1, [pc, #24] ; (8027f28 ) 8027f0e: f89d 2005 ldrb.w r2, [sp, #5] 8027f12: f89d 3004 ldrb.w r3, [sp, #4] 8027f16: 4620 mov r0, r4 8027f18: f7ff fee6 bl 8027ce8 *len = strlen(str); 8027f1c: 4620 mov r0, r4 8027f1e: f7fa f953 bl 80221c8 8027f22: 7028 strb r0, [r5, #0] } 8027f24: b005 add sp, #20 8027f26: bd30 pop {r4, r5, pc} 8027f28: 080391b8 .word 0x080391b8 08027f2c : /** * @brief Время (Ready for PRS!) */ void GetUnixTimeStr(char *str, uint8_t *len) { 8027f2c: b530 push {r4, r5, lr} 8027f2e: b085 sub sp, #20 8027f30: 4604 mov r4, r0 8027f32: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027f34: 4668 mov r0, sp 8027f36: 2100 movs r1, #0 8027f38: f7fe fc84 bl 8026844 sprintf(str, "%d", data.unix); 8027f3c: 4905 ldr r1, [pc, #20] ; (8027f54 ) 8027f3e: 9a03 ldr r2, [sp, #12] 8027f40: 4620 mov r0, r4 8027f42: f7ff fed1 bl 8027ce8 *len = strlen(str); 8027f46: 4620 mov r0, r4 8027f48: f7fa f93e bl 80221c8 8027f4c: 7028 strb r0, [r5, #0] } 8027f4e: b005 add sp, #20 8027f50: bd30 pop {r4, r5, pc} 8027f52: bf00 nop 8027f54: 0803916f .word 0x0803916f 08027f58 : /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 8027f58: b538 push {r3, r4, r5, lr} if (sSettings.sSNTP.sntpEnable) 8027f5a: 4b08 ldr r3, [pc, #32] ; (8027f7c ) 8027f5c: f893 3340 ldrb.w r3, [r3, #832] ; 0x340 /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 8027f60: 460c mov r4, r1 8027f62: 4605 mov r5, r0 if (sSettings.sSNTP.sntpEnable) { sprintf(str, "%s", "1"); //авто 8027f64: 4906 ldr r1, [pc, #24] ; (8027f80 ) /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { if (sSettings.sSNTP.sntpEnable) 8027f66: b10b cbz r3, 8027f6c { sprintf(str, "%s", "1"); //авто 8027f68: 4a06 ldr r2, [pc, #24] ; (8027f84 ) 8027f6a: e000 b.n 8027f6e *len = strlen(str); } else { sprintf(str, "%s", "0"); //ручной 8027f6c: 4a06 ldr r2, [pc, #24] ; (8027f88 ) 8027f6e: f7ff febb bl 8027ce8 *len = strlen(str); 8027f72: 4628 mov r0, r5 8027f74: f7fa f928 bl 80221c8 8027f78: 7020 strb r0, [r4, #0] 8027f7a: bd38 pop {r3, r4, r5, pc} 8027f7c: 2000d414 .word 0x2000d414 8027f80: 080402f4 .word 0x080402f4 8027f84: 080394a7 .word 0x080394a7 8027f88: 0803921b .word 0x0803921b 08027f8c : /** * @brief IP адрес SNTP сервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027f8c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.ip); 8027f8e: 4a05 ldr r2, [pc, #20] ; (8027fa4 ) /** * @brief IP адрес SNTP сервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027f90: 4605 mov r5, r0 8027f92: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.ip); 8027f94: 4904 ldr r1, [pc, #16] ; (8027fa8 ) 8027f96: f7ff fea7 bl 8027ce8 *len = strlen(str); 8027f9a: 4628 mov r0, r5 8027f9c: f7fa f914 bl 80221c8 8027fa0: 7020 strb r0, [r4, #0] 8027fa2: bd38 pop {r3, r4, r5, pc} 8027fa4: 2000d755 .word 0x2000d755 8027fa8: 080402f4 .word 0x080402f4 08027fac : /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027fac: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027fae: 4b09 ldr r3, [pc, #36] ; (8027fd4 ) /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027fb0: 4604 mov r4, r0 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027fb2: f8d3 0370 ldr.w r0, [r3, #880] ; 0x370 /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027fb6: 460d mov r5, r1 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027fb8: f7f8 faea bl 8020590 <__aeabi_f2d> 8027fbc: 4602 mov r2, r0 8027fbe: 460b mov r3, r1 8027fc0: 4620 mov r0, r4 8027fc2: 4905 ldr r1, [pc, #20] ; (8027fd8 ) 8027fc4: f7ff fe90 bl 8027ce8 *len = strlen(str); 8027fc8: 4620 mov r0, r4 8027fca: f7fa f8fd bl 80221c8 8027fce: 7028 strb r0, [r5, #0] 8027fd0: bd38 pop {r3, r4, r5, pc} 8027fd2: bf00 nop 8027fd4: 2000d414 .word 0x2000d414 8027fd8: 08039169 .word 0x08039169 08027fdc : /** * @brief Дата последней синхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027fdc: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.data); 8027fde: 4a05 ldr r2, [pc, #20] ; (8027ff4 ) /** * @brief Дата последней синхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027fe0: 4605 mov r5, r0 8027fe2: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.data); 8027fe4: 4904 ldr r1, [pc, #16] ; (8027ff8 ) 8027fe6: f7ff fe7f bl 8027ce8 *len = strlen(str); 8027fea: 4628 mov r0, r5 8027fec: f7fa f8ec bl 80221c8 8027ff0: 7020 strb r0, [r4, #0] 8027ff2: bd38 pop {r3, r4, r5, pc} 8027ff4: 2000d765 .word 0x2000d765 8027ff8: 080402f4 .word 0x080402f4 08027ffc : /** * @brief Тип действий при срабатывание сухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027ffc: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027ffe: 4b07 ldr r3, [pc, #28] ; (802801c ) 8028000: 189a adds r2, r3, r2 /** * @brief Тип действий при срабатывание сухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8028002: 4605 mov r5, r0 8028004: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8028006: f892 2376 ldrb.w r2, [r2, #886] ; 0x376 802800a: 4905 ldr r1, [pc, #20] ; (8028020 ) 802800c: f7ff fe6c bl 8027ce8 *len = strlen(str); 8028010: 4628 mov r0, r5 8028012: f7fa f8d9 bl 80221c8 8028016: 7020 strb r0, [r4, #0] 8028018: bd38 pop {r3, r4, r5, pc} 802801a: bf00 nop 802801c: 2000d414 .word 0x2000d414 8028020: 0803916f .word 0x0803916f 08028024 : /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8028024: 3208 adds r2, #8 /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8028026: b538 push {r3, r4, r5, lr} 8028028: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 802802a: b2d0 uxtb r0, r2 /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 802802c: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 802802e: f001 f92a bl 8029286 8028032: 4905 ldr r1, [pc, #20] ; (8028048 ) 8028034: 4602 mov r2, r0 8028036: 4620 mov r0, r4 8028038: f7ff fe56 bl 8027ce8 *len = strlen(str); 802803c: 4620 mov r0, r4 802803e: f7fa f8c3 bl 80221c8 8028042: 7028 strb r0, [r5, #0] 8028044: bd38 pop {r3, r4, r5, pc} 8028046: bf00 nop 8028048: 0803916f .word 0x0803916f 0802804c : /** * @brief Состояние сухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 802804c: b538 push {r3, r4, r5, lr} 802804e: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1)); 8028050: 2008 movs r0, #8 /** * @brief Состояние сухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8028052: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1)); 8028054: f001 f917 bl 8029286 8028058: 4904 ldr r1, [pc, #16] ; (802806c ) 802805a: 4602 mov r2, r0 802805c: 4620 mov r0, r4 802805e: f7ff fe43 bl 8027ce8 *len = strlen(str); 8028062: 4620 mov r0, r4 8028064: f7fa f8b0 bl 80221c8 8028068: 7028 strb r0, [r5, #0] 802806a: bd38 pop {r3, r4, r5, pc} 802806c: 0803916f .word 0x0803916f 08028070 : /** * @brief Источник срабатывания реле */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8028070: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8028072: 4b07 ldr r3, [pc, #28] ; (8028090 ) 8028074: 189a adds r2, r3, r2 /** * @brief Источник срабатывания реле */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8028076: 4605 mov r5, r0 8028078: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 802807a: f892 2374 ldrb.w r2, [r2, #884] ; 0x374 802807e: 4905 ldr r1, [pc, #20] ; (8028094 ) 8028080: f7ff fe32 bl 8027ce8 *len = strlen(str); 8028084: 4628 mov r0, r5 8028086: f7fa f89f bl 80221c8 802808a: 7020 strb r0, [r4, #0] 802808c: bd38 pop {r3, r4, r5, pc} 802808e: bf00 nop 8028090: 2000d414 .word 0x2000d414 8028094: 0803916f .word 0x0803916f 08028098 : /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8028098: 3209 adds r2, #9 /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 802809a: b538 push {r3, r4, r5, lr} 802809c: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 802809e: b2d0 uxtb r0, r2 /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 80280a0: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 80280a2: f001 f8f0 bl 8029286 80280a6: 4905 ldr r1, [pc, #20] ; (80280bc ) 80280a8: 4602 mov r2, r0 80280aa: 4620 mov r0, r4 80280ac: f7ff fe1c bl 8027ce8 *len = strlen(str); 80280b0: 4620 mov r0, r4 80280b2: f7fa f889 bl 80221c8 80280b6: 7028 strb r0, [r5, #0] 80280b8: bd38 pop {r3, r4, r5, pc} 80280ba: bf00 nop 80280bc: 0803916f .word 0x0803916f 080280c0 : /** * @brief Состояние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 80280c0: b538 push {r3, r4, r5, lr} 80280c2: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1)); 80280c4: 2009 movs r0, #9 /** * @brief Состояние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 80280c6: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1)); 80280c8: f001 f8dd bl 8029286 80280cc: 4904 ldr r1, [pc, #16] ; (80280e0 ) 80280ce: 4602 mov r2, r0 80280d0: 4620 mov r0, r4 80280d2: f7ff fe09 bl 8027ce8 *len = strlen(str); 80280d6: 4620 mov r0, r4 80280d8: f7fa f876 bl 80221c8 80280dc: 7028 strb r0, [r5, #0] 80280de: bd38 pop {r3, r4, r5, pc} 80280e0: 0803916f .word 0x0803916f 080280e4 : /** * @brief Состояние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 80280e4: b538 push {r3, r4, r5, lr} 80280e6: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT2)); 80280e8: 200a movs r0, #10 /** * @brief Состояние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 80280ea: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT2)); 80280ec: f001 f8cb bl 8029286 80280f0: 4904 ldr r1, [pc, #16] ; (8028104 ) 80280f2: 4602 mov r2, r0 80280f4: 4620 mov r0, r4 80280f6: f7ff fdf7 bl 8027ce8 *len = strlen(str); 80280fa: 4620 mov r0, r4 80280fc: f7fa f864 bl 80221c8 8028100: 7028 strb r0, [r5, #0] 8028102: bd38 pop {r3, r4, r5, pc} 8028104: 0803916f .word 0x0803916f 08028108 : #ifndef BT6702_SERVICE /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 8028108: b57f push {r0, r1, r2, r3, r4, r5, r6, lr} 802810a: 4604 mov r4, r0 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 802810c: a803 add r0, sp, #12 #ifndef BT6702_SERVICE /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 802810e: 460e mov r6, r1 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8028110: f00c f8be bl 8034290 day = tick/8640000; 8028114: 9803 ldr r0, [sp, #12] tick = tick%8640000; 8028116: 4b0c ldr r3, [pc, #48] ; (8028148 ) hour = tick/360000; tick = tick%360000; 8028118: 4d0c ldr r5, [pc, #48] ; (802814c ) snmp_get_sysuptime(&tick); day = tick/8640000; tick = tick%8640000; 802811a: fbb0 f2f3 udiv r2, r0, r3 802811e: fb03 0012 mls r0, r3, r2, r0 hour = tick/360000; tick = tick%360000; 8028122: fbb0 f3f5 udiv r3, r0, r5 8028126: fb05 0013 mls r0, r5, r3, r0 min = tick/6000; 802812a: f241 7170 movw r1, #6000 ; 0x1770 day = tick/8640000; tick = tick%8640000; hour = tick/360000; tick = tick%360000; 802812e: 9003 str r0, [sp, #12] min = tick/6000; 8028130: fbb0 f0f1 udiv r0, r0, r1 sprintf(str, "%d дн. %d ч. %d мин.", day, hour, min); 8028134: 9000 str r0, [sp, #0] 8028136: 4906 ldr r1, [pc, #24] ; (8028150 ) 8028138: 4620 mov r0, r4 802813a: f7ff fdd5 bl 8027ce8 *len = strlen(str); 802813e: 4620 mov r0, r4 8028140: f7fa f842 bl 80221c8 8028144: 7030 strb r0, [r6, #0] } 8028146: bd7f pop {r0, r1, r2, r3, r4, r5, r6, pc} 8028148: 0083d600 .word 0x0083d600 802814c: 00057e40 .word 0x00057e40 8028150: 08039181 .word 0x08039181 08028154 : #endif /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8028154: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysName); 8028156: 4c07 ldr r4, [pc, #28] ; (8028174 ) #endif /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8028158: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysName); 802815a: 4620 mov r0, r4 #endif /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 802815c: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysName); 802815e: f7fa f833 bl 80221c8 8028162: 4602 mov r2, r0 8028164: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysName, *len); 8028166: 4621 mov r1, r4 8028168: 4628 mov r0, r5 802816a: b2d2 uxtb r2, r2 } 802816c: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { *len = strlen(sSettings.sSnmp.sysName); strncpy(str, sSettings.sSnmp.sysName, *len); 8028170: f7fa b8e2 b.w 8022338 8028174: 2000d63f .word 0x2000d63f 08028178 : /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8028178: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.productionData); 802817a: 4c07 ldr r4, [pc, #28] ; (8028198 ) /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 802817c: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.productionData); 802817e: 4620 mov r0, r4 /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8028180: 460e mov r6, r1 *len = strlen(sSettings.sInfo.productionData); 8028182: f7fa f821 bl 80221c8 8028186: 4602 mov r2, r0 8028188: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.productionData, *len); 802818a: 4621 mov r1, r4 802818c: 4628 mov r0, r5 802818e: b2d2 uxtb r2, r2 } 8028190: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { *len = strlen(sSettings.sInfo.productionData); strncpy(str, sSettings.sInfo.productionData, *len); 8028194: f7fa b8d0 b.w 8022338 8028198: 2000d478 .word 0x2000d478 0802819c : /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 802819c: b570 push {r4, r5, r6, lr} *len = strlen(VERSION); 802819e: 4c07 ldr r4, [pc, #28] ; (80281bc ) /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 80281a0: 4605 mov r5, r0 *len = strlen(VERSION); 80281a2: 4620 mov r0, r4 /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 80281a4: 460e mov r6, r1 *len = strlen(VERSION); 80281a6: f7fa f80f bl 80221c8 80281aa: 4602 mov r2, r0 80281ac: 7030 strb r0, [r6, #0] strncpy(str, VERSION, *len); 80281ae: 4621 mov r1, r4 80281b0: 4628 mov r0, r5 80281b2: b2d2 uxtb r2, r2 } 80281b4: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { *len = strlen(VERSION); strncpy(str, VERSION, *len); 80281b8: f7fa b8be b.w 8022338 80281bc: 0803919c .word 0x0803919c 080281c0 : /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 80281c0: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.mac); 80281c2: 4c07 ldr r4, [pc, #28] ; (80281e0 ) /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 80281c4: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.mac); 80281c6: 4620 mov r0, r4 /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 80281c8: 460e mov r6, r1 *len = strlen(sSettings.sInfo.mac); 80281ca: f7f9 fffd bl 80221c8 80281ce: 4602 mov r2, r0 80281d0: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.mac, *len); 80281d2: 4621 mov r1, r4 80281d4: 4628 mov r0, r5 80281d6: b2d2 uxtb r2, r2 } 80281d8: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { *len = strlen(sSettings.sInfo.mac); strncpy(str, sSettings.sInfo.mac, *len); 80281dc: f7fa b8ac b.w 8022338 80281e0: 2000d4a0 .word 0x2000d4a0 080281e4 : /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 80281e4: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.serialNumber); 80281e6: 4c07 ldr r4, [pc, #28] ; (8028204 ) /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 80281e8: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.serialNumber); 80281ea: 4620 mov r0, r4 /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 80281ec: 460e mov r6, r1 *len = strlen(sSettings.sInfo.serialNumber); 80281ee: f7f9 ffeb bl 80221c8 80281f2: 4602 mov r2, r0 80281f4: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.serialNumber, *len); 80281f6: 4621 mov r1, r4 80281f8: 4628 mov r0, r5 80281fa: b2d2 uxtb r2, r2 } 80281fc: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { *len = strlen(sSettings.sInfo.serialNumber); strncpy(str, sSettings.sInfo.serialNumber, *len); 8028200: f7fa b89a b.w 8022338 8028204: 2000d4b2 .word 0x2000d4b2 08028208 : /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8028208: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysContact); 802820a: 4c07 ldr r4, [pc, #28] ; (8028228 ) /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 802820c: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysContact); 802820e: 4620 mov r0, r4 /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8028210: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysContact); 8028212: f7f9 ffd9 bl 80221c8 8028216: 4602 mov r2, r0 8028218: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysContact, *len); 802821a: 4621 mov r1, r4 802821c: 4628 mov r0, r5 802821e: b2d2 uxtb r2, r2 } 8028220: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { *len = strlen(sSettings.sSnmp.sysContact); strncpy(str, sSettings.sSnmp.sysContact, *len); 8028224: f7fa b888 b.w 8022338 8028228: 2000d60d .word 0x2000d60d 0802822c : /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 802822c: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysLocation); 802822e: 4c07 ldr r4, [pc, #28] ; (802824c ) /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8028230: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysLocation); 8028232: 4620 mov r0, r4 /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8028234: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysLocation); 8028236: f7f9 ffc7 bl 80221c8 802823a: 4602 mov r2, r0 802823c: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysLocation, *len); 802823e: 4621 mov r1, r4 8028240: 4628 mov r0, r5 8028242: b2d2 uxtb r2, r2 } 8028244: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { *len = strlen(sSettings.sSnmp.sysLocation); strncpy(str, sSettings.sSnmp.sysLocation, *len); 8028248: f7fa b876 b.w 8022338 802824c: 2000d653 .word 0x2000d653 08028250 : /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8028250: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.comments); 8028252: 4c07 ldr r4, [pc, #28] ; (8028270 ) /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8028254: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.comments); 8028256: 4620 mov r0, r4 /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8028258: 460e mov r6, r1 *len = strlen(sSettings.sInfo.comments); 802825a: f7f9 ffb5 bl 80221c8 802825e: 4602 mov r2, r0 8028260: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.comments, *len); 8028262: 4621 mov r1, r4 8028264: 4628 mov r0, r5 8028266: b2d2 uxtb r2, r2 } 8028268: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { *len = strlen(sSettings.sInfo.comments); strncpy(str, sSettings.sInfo.comments, *len); 802826c: f7fa b864 b.w 8022338 8028270: 2000d4c2 .word 0x2000d4c2 08028274 : #ifndef BT6702_SERVICE /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8028274: b570 push {r4, r5, r6, lr} *len = strlen(UPS.model); 8028276: 4c07 ldr r4, [pc, #28] ; (8028294 ) #ifndef BT6702_SERVICE /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8028278: 4605 mov r5, r0 *len = strlen(UPS.model); 802827a: 4620 mov r0, r4 #ifndef BT6702_SERVICE /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 802827c: 460e mov r6, r1 *len = strlen(UPS.model); 802827e: f7f9 ffa3 bl 80221c8 8028282: 4602 mov r2, r0 8028284: 7030 strb r0, [r6, #0] strncpy(str, UPS.model, *len); 8028286: 4621 mov r1, r4 8028288: 4628 mov r0, r5 802828a: b2d2 uxtb r2, r2 } 802828c: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { *len = strlen(UPS.model); strncpy(str, UPS.model, *len); 8028290: f7fa b852 b.w 8022338 8028294: 2000d7ed .word 0x2000d7ed 08028298 : /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8028298: b570 push {r4, r5, r6, lr} *len = strlen(UPS.vertion); 802829a: 4c07 ldr r4, [pc, #28] ; (80282b8 ) /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 802829c: 4605 mov r5, r0 *len = strlen(UPS.vertion); 802829e: 4620 mov r0, r4 /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 80282a0: 460e mov r6, r1 *len = strlen(UPS.vertion); 80282a2: f7f9 ff91 bl 80221c8 80282a6: 4602 mov r2, r0 80282a8: 7030 strb r0, [r6, #0] strncpy(str, UPS.vertion, *len); 80282aa: 4621 mov r1, r4 80282ac: 4628 mov r0, r5 80282ae: b2d2 uxtb r2, r2 } 80282b0: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { *len = strlen(UPS.vertion); strncpy(str, UPS.vertion, *len); 80282b4: f7fa b840 b.w 8022338 80282b8: 2000d7f8 .word 0x2000d7f8 080282bc : #endif // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 80282bc: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].login); 80282be: 4b08 ldr r3, [pc, #32] ; (80282e0 ) #endif // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 80282c0: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].login); 80282c2: 2217 movs r2, #23 80282c4: fb02 3200 mla r2, r2, r0, r3 #endif // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 80282c8: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].login); 80282ca: 4608 mov r0, r1 80282cc: 3202 adds r2, #2 80282ce: 4905 ldr r1, [pc, #20] ; (80282e4 ) 80282d0: f7ff fd0a bl 8027ce8 *len = strlen(str); 80282d4: 4620 mov r0, r4 80282d6: f7f9 ff77 bl 80221c8 80282da: 7028 strb r0, [r5, #0] 80282dc: bd38 pop {r3, r4, r5, pc} 80282de: bf00 nop 80282e0: 2000d724 .word 0x2000d724 80282e4: 080402f4 .word 0x080402f4 080282e8 : } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 80282e8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].password); 80282ea: 4b08 ldr r3, [pc, #32] ; (802830c ) sprintf(str, "%s", sSettings.sAuth[user_id].login); *len = strlen(str); } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 80282ec: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].password); 80282ee: 2217 movs r2, #23 80282f0: fb02 3200 mla r2, r2, r0, r3 sprintf(str, "%s", sSettings.sAuth[user_id].login); *len = strlen(str); } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 80282f4: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].password); 80282f6: 4608 mov r0, r1 80282f8: 3205 adds r2, #5 80282fa: 4905 ldr r1, [pc, #20] ; (8028310 ) 80282fc: f7ff fcf4 bl 8027ce8 *len = strlen(str); 8028300: 4620 mov r0, r4 8028302: f7f9 ff61 bl 80221c8 8028306: 7028 strb r0, [r5, #0] 8028308: bd38 pop {r3, r4, r5, pc} 802830a: bf00 nop 802830c: 2000d72c .word 0x2000d72c 8028310: 080402f4 .word 0x080402f4 08028314 : *len = strlen(str); } void GetUserLevelInt(uint8_t user_id, uint8_t *value) { *value = sSettings.sAuth[user_id].level; 8028314: 4b03 ldr r3, [pc, #12] ; (8028324 ) 8028316: 2217 movs r2, #23 8028318: fb02 3000 mla r0, r2, r0, r3 802831c: f890 3311 ldrb.w r3, [r0, #785] ; 0x311 8028320: 700b strb r3, [r1, #0] 8028322: 4770 bx lr 8028324: 2000d414 .word 0x2000d414 08028328 : * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8028328: 4a08 ldr r2, [pc, #32] ; (802834c ) /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 802832a: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 802832c: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 8028330: 460c mov r4, r1 8028332: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.ip); 8028334: 4906 ldr r1, [pc, #24] ; (8028350 ) * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8028336: b10b cbz r3, 802833c sprintf(str, "%s", sSettings.sWebTempParams.ip); 8028338: 3233 adds r2, #51 ; 0x33 802833a: e000 b.n 802833e else sprintf(str, "%s", sSettings.sWebParams.ip); 802833c: 3202 adds r2, #2 802833e: f7ff fcd3 bl 8027ce8 *len = strlen(str); 8028342: 4628 mov r0, r5 8028344: f7f9 ff40 bl 80221c8 8028348: 7020 strb r0, [r4, #0] 802834a: bd38 pop {r3, r4, r5, pc} 802834c: 2000d414 .word 0x2000d414 8028350: 080402f4 .word 0x080402f4 08028354 : * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8028354: 4a08 ldr r2, [pc, #32] ; (8028378 ) /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8028356: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8028358: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 802835c: 460c mov r4, r1 802835e: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.gate); 8028360: 4906 ldr r1, [pc, #24] ; (802837c ) * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8028362: b10b cbz r3, 8028368 sprintf(str, "%s", sSettings.sWebTempParams.gate); 8028364: 3243 adds r2, #67 ; 0x43 8028366: e000 b.n 802836a else sprintf(str, "%s", sSettings.sWebParams.gate); 8028368: 3212 adds r2, #18 802836a: f7ff fcbd bl 8027ce8 *len = strlen(str); 802836e: 4628 mov r0, r5 8028370: f7f9 ff2a bl 80221c8 8028374: 7020 strb r0, [r4, #0] 8028376: bd38 pop {r3, r4, r5, pc} 8028378: 2000d414 .word 0x2000d414 802837c: 080402f4 .word 0x080402f4 08028380 : * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8028380: 4a08 ldr r2, [pc, #32] ; (80283a4 ) /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8028382: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8028384: f892 3120 ldrb.w r3, [r2, #288] ; 0x120 /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8028388: 460c mov r4, r1 802838a: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.mask); 802838c: 4906 ldr r1, [pc, #24] ; (80283a8 ) * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 802838e: b10b cbz r3, 8028394 sprintf(str, "%s", sSettings.sWebTempParams.mask); 8028390: 3253 adds r2, #83 ; 0x53 8028392: e000 b.n 8028396 else sprintf(str, "%s", sSettings.sWebParams.mask); 8028394: 3222 adds r2, #34 ; 0x22 8028396: f7ff fca7 bl 8027ce8 *len = strlen(str); 802839a: 4628 mov r0, r5 802839c: f7f9 ff14 bl 80221c8 80283a0: 7020 strb r0, [r4, #0] 80283a2: bd38 pop {r3, r4, r5, pc} 80283a4: 2000d414 .word 0x2000d414 80283a8: 080402f4 .word 0x080402f4 080283ac : * @brief Настройка DHCP */ void GetDhcpStateStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 80283ac: 4b08 ldr r3, [pc, #32] ; (80283d0 ) 80283ae: f893 2120 ldrb.w r2, [r3, #288] ; 0x120 80283b2: b112 cbz r2, 80283ba { if (sSettings.sWebTempParams.dhcpEnable) 80283b4: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 80283b8: e001 b.n 80283be else *str = '0'; } else { if (sSettings.sWebParams.dhcpEnable) 80283ba: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 80283be: b10b cbz r3, 80283c4 *str = '1'; 80283c0: 2331 movs r3, #49 ; 0x31 80283c2: e000 b.n 80283c6 else *str = '0'; 80283c4: 2330 movs r3, #48 ; 0x30 80283c6: 7003 strb r3, [r0, #0] } *len = 1; 80283c8: 2301 movs r3, #1 80283ca: 700b strb r3, [r1, #0] 80283cc: 4770 bx lr 80283ce: bf00 nop 80283d0: 2000d414 .word 0x2000d414 080283d4 : /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 80283d4: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.readCommunity); 80283d6: 4a05 ldr r2, [pc, #20] ; (80283ec ) /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 80283d8: 4605 mov r5, r0 80283da: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.readCommunity); 80283dc: 4904 ldr r1, [pc, #16] ; (80283f0 ) 80283de: f7ff fc83 bl 8027ce8 *len = strlen(str); 80283e2: 4628 mov r0, r5 80283e4: f7f9 fef0 bl 80221c8 80283e8: 7020 strb r0, [r4, #0] 80283ea: bd38 pop {r3, r4, r5, pc} 80283ec: 2000d5e5 .word 0x2000d5e5 80283f0: 080402f4 .word 0x080402f4 080283f4 : /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 80283f4: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 80283f6: 4a05 ldr r2, [pc, #20] ; (802840c ) /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 80283f8: 4605 mov r5, r0 80283fa: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 80283fc: 4904 ldr r1, [pc, #16] ; (8028410 ) 80283fe: f7ff fc73 bl 8027ce8 *len = strlen(str); 8028402: 4628 mov r0, r5 8028404: f7f9 fee0 bl 80221c8 8028408: 7020 strb r0, [r4, #0] 802840a: bd38 pop {r3, r4, r5, pc} 802840c: 2000d5f9 .word 0x2000d5f9 8028410: 080402f4 .word 0x080402f4 08028414 : /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8028414: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP); 8028416: 4a05 ldr r2, [pc, #20] ; (802842c ) /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8028418: 4605 mov r5, r0 802841a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP); 802841c: 4904 ldr r1, [pc, #16] ; (8028430 ) 802841e: f7ff fc63 bl 8027ce8 *len = strlen(str); 8028422: 4628 mov r0, r5 8028424: f7f9 fed0 bl 80221c8 8028428: 7020 strb r0, [r4, #0] 802842a: bd38 pop {r3, r4, r5, pc} 802842c: 2000d6c1 .word 0x2000d6c1 8028430: 080402f4 .word 0x080402f4 08028434 : } void GetManagerIp2(char *str, uint8_t *len) { 8028434: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8028436: 4a05 ldr r2, [pc, #20] ; (802844c ) sprintf(str, "%s", sSettings.sSnmp.managerIP); *len = strlen(str); } void GetManagerIp2(char *str, uint8_t *len) { 8028438: 4605 mov r5, r0 802843a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP2); 802843c: 4904 ldr r1, [pc, #16] ; (8028450 ) 802843e: f7ff fc53 bl 8027ce8 *len = strlen(str); 8028442: 4628 mov r0, r5 8028444: f7f9 fec0 bl 80221c8 8028448: 7020 strb r0, [r4, #0] 802844a: bd38 pop {r3, r4, r5, pc} 802844c: 2000d6d5 .word 0x2000d6d5 8028450: 080402f4 .word 0x080402f4 08028454 : } void GetManagerIp3(char *str, uint8_t *len) { 8028454: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8028456: 4a05 ldr r2, [pc, #20] ; (802846c ) sprintf(str, "%s", sSettings.sSnmp.managerIP2); *len = strlen(str); } void GetManagerIp3(char *str, uint8_t *len) { 8028458: 4605 mov r5, r0 802845a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP3); 802845c: 4904 ldr r1, [pc, #16] ; (8028470 ) 802845e: f7ff fc43 bl 8027ce8 *len = strlen(str); 8028462: 4628 mov r0, r5 8028464: f7f9 feb0 bl 80221c8 8028468: 7020 strb r0, [r4, #0] 802846a: bd38 pop {r3, r4, r5, pc} 802846c: 2000d6e9 .word 0x2000d6e9 8028470: 080402f4 .word 0x080402f4 08028474 : } void GetManagerIp4(char *str, uint8_t *len) { 8028474: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP4); 8028476: 4a05 ldr r2, [pc, #20] ; (802848c ) sprintf(str, "%s", sSettings.sSnmp.managerIP3); *len = strlen(str); } void GetManagerIp4(char *str, uint8_t *len) { 8028478: 4605 mov r5, r0 802847a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP4); 802847c: 4904 ldr r1, [pc, #16] ; (8028490 ) 802847e: f7ff fc33 bl 8027ce8 *len = strlen(str); 8028482: 4628 mov r0, r5 8028484: f7f9 fea0 bl 80221c8 8028488: 7020 strb r0, [r4, #0] 802848a: bd38 pop {r3, r4, r5, pc} 802848c: 2000d6fd .word 0x2000d6fd 8028490: 080402f4 .word 0x080402f4 08028494 : } void GetManagerIp5(char *str, uint8_t *len) { 8028494: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP5); 8028496: 4a05 ldr r2, [pc, #20] ; (80284ac ) sprintf(str, "%s", sSettings.sSnmp.managerIP4); *len = strlen(str); } void GetManagerIp5(char *str, uint8_t *len) { 8028498: 4605 mov r5, r0 802849a: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP5); 802849c: 4904 ldr r1, [pc, #16] ; (80284b0 ) 802849e: f7ff fc23 bl 8027ce8 *len = strlen(str); 80284a2: 4628 mov r0, r5 80284a4: f7f9 fe90 bl 80221c8 80284a8: 7020 strb r0, [r4, #0] 80284aa: bd38 pop {r3, r4, r5, pc} 80284ac: 2000d711 .word 0x2000d711 80284b0: 080402f4 .word 0x080402f4 080284b4 : /** * @brief Текущий IP адрес */ void GetRDSIpStr(char *str, uint8_t *len) { 80284b4: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 80284b6: 4a05 ldr r2, [pc, #20] ; (80284cc ) /** * @brief Текущий IP адрес */ void GetRDSIpStr(char *str, uint8_t *len) { 80284b8: 4605 mov r5, r0 80284ba: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 80284bc: 4904 ldr r1, [pc, #16] ; (80284d0 ) 80284be: f7ff fc13 bl 8027ce8 *len = strlen(str); 80284c2: 4628 mov r0, r5 80284c4: f7f9 fe80 bl 80221c8 80284c8: 7020 strb r0, [r4, #0] 80284ca: bd38 pop {r3, r4, r5, pc} 80284cc: 2000d78d .word 0x2000d78d 80284d0: 080402f4 .word 0x080402f4 080284d4 : /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 80284d4: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.port); 80284d6: 4b06 ldr r3, [pc, #24] ; (80284f0 ) /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 80284d8: 4605 mov r5, r0 80284da: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.port); 80284dc: f8d3 239c ldr.w r2, [r3, #924] ; 0x39c 80284e0: 4904 ldr r1, [pc, #16] ; (80284f4 ) 80284e2: f7ff fc01 bl 8027ce8 *len = strlen(str); 80284e6: 4628 mov r0, r5 80284e8: f7f9 fe6e bl 80221c8 80284ec: 7020 strb r0, [r4, #0] 80284ee: bd38 pop {r3, r4, r5, pc} 80284f0: 2000d414 .word 0x2000d414 80284f4: 0803916f .word 0x0803916f 080284f8 : /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 80284f8: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.key_access); 80284fa: 4b06 ldr r3, [pc, #24] ; (8028514 ) /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 80284fc: 4605 mov r5, r0 80284fe: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.key_access); 8028500: f8d3 23a0 ldr.w r2, [r3, #928] ; 0x3a0 8028504: 4904 ldr r1, [pc, #16] ; (8028518 ) 8028506: f7ff fbef bl 8027ce8 *len = strlen(str); 802850a: 4628 mov r0, r5 802850c: f7f9 fe5c bl 80221c8 8028510: 7020 strb r0, [r4, #0] 8028512: bd38 pop {r3, r4, r5, pc} 8028514: 2000d414 .word 0x2000d414 8028518: 0803916f .word 0x0803916f 0802851c : /** * @brief Текущая пароль RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 802851c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.rds_password); 802851e: 4a05 ldr r2, [pc, #20] ; (8028534 ) /** * @brief Текущая пароль RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 8028520: 4605 mov r5, r0 8028522: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.rds_password); 8028524: 4904 ldr r1, [pc, #16] ; (8028538 ) 8028526: f7ff fbdf bl 8027ce8 *len = strlen(str); 802852a: 4628 mov r0, r5 802852c: f7f9 fe4c bl 80221c8 8028530: 7020 strb r0, [r4, #0] 8028532: bd38 pop {r3, r4, r5, pc} 8028534: 2000d79d .word 0x2000d79d 8028538: 080402f4 .word 0x080402f4 0802853c : /** * @brief Настройка вкл/ выкл RADIUS сервера */ void GetRDSEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.RDSEnable) 802853c: 4b05 ldr r3, [pc, #20] ; (8028554 ) 802853e: f893 339a ldrb.w r3, [r3, #922] ; 0x39a 8028542: b10b cbz r3, 8028548 *str = '1'; 8028544: 2331 movs r3, #49 ; 0x31 8028546: e000 b.n 802854a else *str = '0'; 8028548: 2330 movs r3, #48 ; 0x30 802854a: 7003 strb r3, [r0, #0] *len = 1; 802854c: 2301 movs r3, #1 802854e: 700b strb r3, [r1, #0] 8028550: 4770 bx lr 8028552: bf00 nop 8028554: 2000d414 .word 0x2000d414 08028558 : /** * @brief Настройка вкл/ выкл авторизации */ void GetAuthEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.Auth_enable) 8028558: 4b05 ldr r3, [pc, #20] ; (8028570 ) 802855a: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 802855e: b10b cbz r3, 8028564 *str = '1'; 8028560: 2331 movs r3, #49 ; 0x31 8028562: e000 b.n 8028566 else *str = '0'; 8028564: 2330 movs r3, #48 ; 0x30 8028566: 7003 strb r3, [r0, #0] *len = 1; 8028568: 2301 movs r3, #1 802856a: 700b strb r3, [r1, #0] 802856c: 4770 bx lr 802856e: bf00 nop 8028570: 2000d414 .word 0x2000d414 08028574 : /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 8028574: b538 push {r3, r4, r5, lr} if (sSettings.sFlags.netsettingsChanged) 8028576: 4b08 ldr r3, [pc, #32] ; (8028598 ) 8028578: f893 3120 ldrb.w r3, [r3, #288] ; 0x120 /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 802857c: 460c mov r4, r1 802857e: 4605 mov r5, r0 if (sSettings.sFlags.netsettingsChanged) { sprintf(str, "%s", "true"); 8028580: 4906 ldr r1, [pc, #24] ; (802859c ) /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { if (sSettings.sFlags.netsettingsChanged) 8028582: b10b cbz r3, 8028588 { sprintf(str, "%s", "true"); 8028584: 4a06 ldr r2, [pc, #24] ; (80285a0 ) 8028586: e000 b.n 802858a *len = strlen(str); } else { sprintf(str, "%s", "false"); 8028588: 4a06 ldr r2, [pc, #24] ; (80285a4 ) 802858a: f7ff fbad bl 8027ce8 *len = strlen(str); 802858e: 4628 mov r0, r5 8028590: f7f9 fe1a bl 80221c8 8028594: 7020 strb r0, [r4, #0] 8028596: bd38 pop {r3, r4, r5, pc} 8028598: 2000d414 .word 0x2000d414 802859c: 080402f4 .word 0x080402f4 80285a0: 080391a6 .word 0x080391a6 80285a4: 080391ab .word 0x080391ab 080285a8 : * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 80285a8: 2001 movs r0, #1 /** * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { 80285aa: b508 push {r3, lr} /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 80285ac: 4601 mov r1, r0 80285ae: f7fd fc2b bl 8025e08 /* Set bootTry = 0 */ RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 80285b2: 2002 movs r0, #2 80285b4: 2100 movs r1, #0 } 80285b6: e8bd 4008 ldmia.w sp!, {r3, lr} void SetLoadMode(void) { /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); /* Set bootTry = 0 */ RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 80285ba: f7fd bc25 b.w 8025e08 80285be: 0000 movs r0, r0 080285c0 : /** * @brief Установить признак изменения сетевых параметров */ void SetWebReinitFlag(bool value) { sSettings.sFlags.netsettingsChanged = value; 80285c0: 4b01 ldr r3, [pc, #4] ; (80285c8 ) 80285c2: f883 0120 strb.w r0, [r3, #288] ; 0x120 80285c6: 4770 bx lr 80285c8: 2000d414 .word 0x2000d414 080285cc : /** * @brief Установить флаг подтверждения сетевых настроек пользователем */ void SetConfirmWebParamsFlag(void) { fConfirmWebParams = true; 80285cc: 4b01 ldr r3, [pc, #4] ; (80285d4 ) 80285ce: 2201 movs r2, #1 80285d0: 701a strb r2, [r3, #0] 80285d2: 4770 bx lr 80285d4: 20000b2c .word 0x20000b2c 080285d8 : // Сетевые параметры /** * @brief IP адрес */ void SetIPStr(char *str) { 80285d8: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.ip, str); strcpy(sSettings.sWebTempParams.ip, str); 80285da: 4801 ldr r0, [pc, #4] ; (80285e0 ) 80285dc: f7f9 bd96 b.w 802210c 80285e0: 2000d447 .word 0x2000d447 080285e4 : /** * @brief Шлюз */ void SetGatewayStr(char *str) { 80285e4: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.gate, str); strcpy(sSettings.sWebTempParams.gate, str); 80285e6: 4801 ldr r0, [pc, #4] ; (80285ec ) 80285e8: f7f9 bd90 b.w 802210c 80285ec: 2000d457 .word 0x2000d457 080285f0 : /** * @brief Текущая маска подсети */ void SetMaskStr(char *str) { 80285f0: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.mask, str); strcpy(sSettings.sWebTempParams.mask, str); 80285f2: 4801 ldr r0, [pc, #4] ; (80285f8 ) 80285f4: f7f9 bd8a b.w 802210c 80285f8: 2000d467 .word 0x2000d467 080285fc : /** * @brief Настройка DHCP */ void SetDhcpStateStr(char *str) { 80285fc: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 80285fe: 4906 ldr r1, [pc, #24] ; (8028618 ) 8028600: 2202 movs r2, #2 8028602: f7f9 fe43 bl 802228c 8028606: 4b05 ldr r3, [pc, #20] ; (802861c ) 8028608: b908 cbnz r0, 802860e //sSettings.sWebParams.dhcpEnable = 1; sSettings.sWebTempParams.dhcpEnable = 1; 802860a: 2201 movs r2, #1 802860c: e000 b.n 8028610 else //sSettings.sWebParams.dhcpEnable = 0; sSettings.sWebTempParams.dhcpEnable = 0; 802860e: 2200 movs r2, #0 8028610: f883 2063 strb.w r2, [r3, #99] ; 0x63 8028614: bd08 pop {r3, pc} 8028616: bf00 nop 8028618: 080391b1 .word 0x080391b1 802861c: 2000d414 .word 0x2000d414 08028620 : /** * @brief Community для чтения */ void SetReadCommunity(char *str) { 8028620: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, str); 8028622: 4801 ldr r0, [pc, #4] ; (8028628 ) 8028624: f7f9 bd72 b.w 802210c 8028628: 2000d5e5 .word 0x2000d5e5 0802862c : /** * @brief Community для записи */ void SetWriteCommunity(char *str) { 802862c: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, str); 802862e: 4801 ldr r0, [pc, #4] ; (8028634 ) 8028630: f7f9 bd6c b.w 802210c 8028634: 2000d5f9 .word 0x2000d5f9 08028638 : #ifndef BT6702_SERVICE /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 8028638: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP, str); 802863a: 4c05 ldr r4, [pc, #20] ; (8028650 ) #ifndef BT6702_SERVICE /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 802863c: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP, str); 802863e: 4620 mov r0, r4 8028640: f7f9 fd64 bl 802210c SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8028644: 4620 mov r0, r4 } 8028646: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 802864a: f00f bbdd b.w 8037e08 802864e: bf00 nop 8028650: 2000d6c1 .word 0x2000d6c1 08028654 : } void SetManagerIp2(char *str) { 8028654: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP2, str); 8028656: 4c05 ldr r4, [pc, #20] ; (802866c ) strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); } void SetManagerIp2(char *str) { 8028658: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP2, str); 802865a: 4620 mov r0, r4 802865c: f7f9 fd56 bl 802210c SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8028660: 4620 mov r0, r4 } 8028662: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp2(char *str) { strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8028666: f00f bbcf b.w 8037e08 802866a: bf00 nop 802866c: 2000d6d5 .word 0x2000d6d5 08028670 : } void SetManagerIp3(char *str) { 8028670: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP3, str); 8028672: 4c05 ldr r4, [pc, #20] ; (8028688 ) strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); } void SetManagerIp3(char *str) { 8028674: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP3, str); 8028676: 4620 mov r0, r4 8028678: f7f9 fd48 bl 802210c SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 802867c: 4620 mov r0, r4 } 802867e: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp3(char *str) { strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 8028682: f00f bbc1 b.w 8037e08 8028686: bf00 nop 8028688: 2000d6e9 .word 0x2000d6e9 0802868c : } void SetManagerIp4(char *str) { 802868c: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP4, str); 802868e: 4c05 ldr r4, [pc, #20] ; (80286a4 ) strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); } void SetManagerIp4(char *str) { 8028690: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP4, str); 8028692: 4620 mov r0, r4 8028694: f7f9 fd3a bl 802210c SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 8028698: 4620 mov r0, r4 } 802869a: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp4(char *str) { strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 802869e: f00f bbb3 b.w 8037e08 80286a2: bf00 nop 80286a4: 2000d6fd .word 0x2000d6fd 080286a8 : } void SetManagerIp5(char *str) { 80286a8: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP5, str); 80286aa: 4c05 ldr r4, [pc, #20] ; (80286c0 ) strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); } void SetManagerIp5(char *str) { 80286ac: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP5, str); 80286ae: 4620 mov r0, r4 80286b0: f7f9 fd2c bl 802210c SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 80286b4: 4620 mov r0, r4 } 80286b6: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp5(char *str) { strcpy(sSettings.sSnmp.managerIP5, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 80286ba: f00f bba5 b.w 8037e08 80286be: bf00 nop 80286c0: 2000d711 .word 0x2000d711 080286c4 : /** * @brief Установить владельца */ void SetOwner(char *str) { 80286c4: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysContact, str); 80286c6: 4c06 ldr r4, [pc, #24] ; (80286e0 ) /** * @brief Установить владельца */ void SetOwner(char *str) { 80286c8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysContact, str); 80286ca: 4620 mov r0, r4 80286cc: f7f9 fd1e bl 802210c SNMP_SetSysContact(sSettings.sSnmp.sysContact); 80286d0: 4620 mov r0, r4 80286d2: f00f fb6f bl 8037db4 SNMP_SetObjDescr(); } 80286d6: e8bd 4010 ldmia.w sp!, {r4, lr} */ void SetOwner(char *str) { strcpy(sSettings.sSnmp.sysContact, str); SNMP_SetSysContact(sSettings.sSnmp.sysContact); SNMP_SetObjDescr(); 80286da: f00f bb21 b.w 8037d20 80286de: bf00 nop 80286e0: 2000d60d .word 0x2000d60d 080286e4 : /** * @brief Установить местоположение */ void SetLocation(char *str) { 80286e4: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysLocation, str); 80286e6: 4c05 ldr r4, [pc, #20] ; (80286fc ) /** * @brief Установить местоположение */ void SetLocation(char *str) { 80286e8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysLocation, str); 80286ea: 4620 mov r0, r4 80286ec: f7f9 fd0e bl 802210c SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 80286f0: 4620 mov r0, r4 } 80286f2: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief Установить местоположение */ void SetLocation(char *str) { strcpy(sSettings.sSnmp.sysLocation, str); SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 80286f6: f00f bb79 b.w 8037dec 80286fa: bf00 nop 80286fc: 2000d653 .word 0x2000d653 08028700 : #endif /** * @brief Установить комментарий */ void SetComment(char *str) { 8028700: 4601 mov r1, r0 strcpy(sSettings.sInfo.comments, str); 8028702: 4801 ldr r0, [pc, #4] ; (8028708 ) 8028704: f7f9 bd02 b.w 802210c 8028708: 2000d4c2 .word 0x2000d4c2 0802870c : // Сетевые параметры RADIUS сервера /** * @brief IP адрес */ void SetRDSIpStr(char *str) { 802870c: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.ServerIP, str); 802870e: 4801 ldr r0, [pc, #4] ; (8028714 ) 8028710: f7f9 bcfc b.w 802210c 8028714: 2000d78d .word 0x2000d78d 08028718 : /** * @brief Порт */ void SetRDSPortStr(char *str) { 8028718: b508 push {r3, lr} sSettings.sRADIUS.port = atoi(str); 802871a: f7f9 fa5d bl 8021bd8 802871e: 4b02 ldr r3, [pc, #8] ; (8028728 ) 8028720: f8c3 039c str.w r0, [r3, #924] ; 0x39c 8028724: bd08 pop {r3, pc} 8028726: bf00 nop 8028728: 2000d414 .word 0x2000d414 0802872c : /** * @brief Код access */ void SetRDSKeyAccesstStr(char *str) { 802872c: b508 push {r3, lr} sSettings.sRADIUS.key_access = atoi(str); 802872e: f7f9 fa53 bl 8021bd8 8028732: 4b02 ldr r3, [pc, #8] ; (802873c ) 8028734: f8c3 03a0 str.w r0, [r3, #928] ; 0x3a0 8028738: bd08 pop {r3, pc} 802873a: bf00 nop 802873c: 2000d414 .word 0x2000d414 08028740 : /** * @brief пароль RADIUS */ void SetRDSPasswordkStr(char *str) { 8028740: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.rds_password, str); 8028742: 4801 ldr r0, [pc, #4] ; (8028748 ) 8028744: f7f9 bce2 b.w 802210c 8028748: 2000d79d .word 0x2000d79d 0802874c : /** * @brief Настройка вкл/ выкл RADIUS сервера */ void SetRDSEnableStateStr(char *str) { 802874c: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 802874e: 4906 ldr r1, [pc, #24] ; (8028768 ) 8028750: 2202 movs r2, #2 8028752: f7f9 fd9b bl 802228c 8028756: 4b05 ldr r3, [pc, #20] ; (802876c ) 8028758: b908 cbnz r0, 802875e sSettings.sRADIUS.RDSEnable = 1; 802875a: 2201 movs r2, #1 802875c: e000 b.n 8028760 else sSettings.sRADIUS.RDSEnable = 0; 802875e: 2200 movs r2, #0 8028760: f883 239a strb.w r2, [r3, #922] ; 0x39a 8028764: bd08 pop {r3, pc} 8028766: bf00 nop 8028768: 080391b1 .word 0x080391b1 802876c: 2000d414 .word 0x2000d414 08028770 : /** * @brief Настройка вкл/ выкл авторизации */ void SetAuthEnableStateStr(char *str) { 8028770: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 8028772: 4906 ldr r1, [pc, #24] ; (802878c ) 8028774: 2202 movs r2, #2 8028776: f7f9 fd89 bl 802228c 802877a: 4b05 ldr r3, [pc, #20] ; (8028790 ) 802877c: b908 cbnz r0, 8028782 sSettings.sRADIUS.Auth_enable = 1; 802877e: 2201 movs r2, #1 8028780: e000 b.n 8028784 else sSettings.sRADIUS.Auth_enable = 0; 8028782: 2200 movs r2, #0 8028784: f883 2378 strb.w r2, [r3, #888] ; 0x378 8028788: bd08 pop {r3, pc} 802878a: bf00 nop 802878c: 080391b1 .word 0x080391b1 8028790: 2000d414 .word 0x2000d414 08028794 : /** * @brief Дата */ void SetDateStr(char *str) { 8028794: b510 push {r4, lr} 8028796: b08c sub sp, #48 ; 0x30 8028798: 4604 mov r4, r0 TM_RTC_t tmp_data; char str_data[18]; char str_time[9]; uint8_t len; memset(str_data, 0, 18); 802879a: 2100 movs r1, #0 802879c: 2212 movs r2, #18 802879e: a807 add r0, sp, #28 80287a0: f7f9 fb3a bl 8021e18 memset(str_time, 0, 9); 80287a4: 2100 movs r1, #0 80287a6: 2209 movs r2, #9 80287a8: 4668 mov r0, sp 80287aa: f7f9 fb35 bl 8021e18 str += 2; strncpy(str_data, (str + 6), 2); 80287ae: f104 0108 add.w r1, r4, #8 80287b2: 2202 movs r2, #2 80287b4: a807 add r0, sp, #28 80287b6: f7f9 fdbf bl 8022338 strncat(str_data, (str + 2), 4); 80287ba: 1d21 adds r1, r4, #4 80287bc: 2204 movs r2, #4 80287be: a807 add r0, sp, #28 80287c0: f7f9 fd32 bl 8022228 strncat(str_data, str, 2); 80287c4: 2202 movs r2, #2 80287c6: 1ca1 adds r1, r4, #2 80287c8: a807 add r0, sp, #28 80287ca: f7f9 fd2d bl 8022228 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 80287ce: a803 add r0, sp, #12 80287d0: 2100 movs r1, #0 80287d2: f7fe f837 bl 8026844 sprintf(str_time, "-01-%02i:%02i", tmp_data.hours, tmp_data.minutes); 80287d6: f89d 2011 ldrb.w r2, [sp, #17] 80287da: f89d 3010 ldrb.w r3, [sp, #16] 80287de: 4908 ldr r1, [pc, #32] ; (8028800 ) 80287e0: 4668 mov r0, sp 80287e2: f7ff fa81 bl 8027ce8 len = strlen(str_time); 80287e6: 4668 mov r0, sp 80287e8: f7f9 fcee bl 80221c8 strncat(str_data, str_time, len); 80287ec: 4669 mov r1, sp 80287ee: b2c2 uxtb r2, r0 80287f0: a807 add r0, sp, #28 80287f2: f7f9 fd19 bl 8022228 //TM_RTC_SetDateTimeString(&str_data); TM_RTC_SetDateTimeString(str_data); 80287f6: a807 add r0, sp, #28 80287f8: f7fd ff0a bl 8026610 } 80287fc: b00c add sp, #48 ; 0x30 80287fe: bd10 pop {r4, pc} 8028800: 080391b4 .word 0x080391b4 08028804 : /** * @brief Время */ void SetTimeStr(char *str) { 8028804: b510 push {r4, lr} 8028806: b090 sub sp, #64 ; 0x40 8028808: 4604 mov r4, r0 TM_RTC_t tmp_data; char str_data[18]; char str_date[14]; uint8_t len; memset(str_data, 0, 18); 802880a: 2100 movs r1, #0 802880c: 2212 movs r2, #18 802880e: a80b add r0, sp, #44 ; 0x2c 8028810: f7f9 fb02 bl 8021e18 memset(str_date, 0, 14); 8028814: 220e movs r2, #14 8028816: 2100 movs r1, #0 8028818: a803 add r0, sp, #12 802881a: f7f9 fafd bl 8021e18 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 802881e: a807 add r0, sp, #28 8028820: 2100 movs r1, #0 8028822: f7fe f80f bl 8026844 sprintf(str_date, "%02i-%02i-%02i-01-", tmp_data.date, tmp_data.month, tmp_data.year); 8028826: f89d 1025 ldrb.w r1, [sp, #37] ; 0x25 802882a: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 802882e: f89d 2023 ldrb.w r2, [sp, #35] ; 0x23 8028832: 9100 str r1, [sp, #0] 8028834: a803 add r0, sp, #12 8028836: 490a ldr r1, [pc, #40] ; (8028860 ) 8028838: f7ff fa56 bl 8027ce8 len = strlen(str_date); 802883c: a803 add r0, sp, #12 802883e: f7f9 fcc3 bl 80221c8 strncat(str_data, str_date, len); 8028842: a903 add r1, sp, #12 8028844: b2c2 uxtb r2, r0 8028846: a80b add r0, sp, #44 ; 0x2c 8028848: f7f9 fcee bl 8022228 strncat(str_data, str, 5); 802884c: a80b add r0, sp, #44 ; 0x2c 802884e: 4621 mov r1, r4 8028850: 2205 movs r2, #5 8028852: f7f9 fce9 bl 8022228 //TM_RTC_SetDateTimeString(&str_data); TM_RTC_SetDateTimeString(str_data); 8028856: a80b add r0, sp, #44 ; 0x2c 8028858: f7fd feda bl 8026610 } 802885c: b010 add sp, #64 ; 0x40 802885e: bd10 pop {r4, pc} 8028860: 080391c2 .word 0x080391c2 08028864 : /** * @brief Состояние SNTP */ void SetSntpStateStr(char *str) { 8028864: b538 push {r3, r4, r5, lr} bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 8028866: 4c0d ldr r4, [pc, #52] ; (802889c ) if (strncmp(str, "1", 1) == 0){ 8028868: 490d ldr r1, [pc, #52] ; (80288a0 ) /** * @brief Состояние SNTP */ void SetSntpStateStr(char *str) { bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 802886a: f894 5340 ldrb.w r5, [r4, #832] ; 0x340 if (strncmp(str, "1", 1) == 0){ 802886e: 2201 movs r2, #1 8028870: f7f9 fd0c bl 802228c 8028874: b948 cbnz r0, 802888a sSettings.sSNTP.sntpEnable = true; 8028876: 2001 movs r0, #1 8028878: f884 0340 strb.w r0, [r4, #832] ; 0x340 if(old_sntpEnable != sSettings.sSNTP.sntpEnable){ 802887c: b965 cbnz r5, 8028898 SNTP_Enable(sSettings.sSNTP.sntpEnable); 802887e: f00f fbbf bl 8038000 } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 8028882: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} bool old_sntpEnable = sSettings.sSNTP.sntpEnable; if (strncmp(str, "1", 1) == 0){ sSettings.sSNTP.sntpEnable = true; if(old_sntpEnable != sSettings.sSNTP.sntpEnable){ SNTP_Enable(sSettings.sSNTP.sntpEnable); SNTP_Poll(); 8028886: f00f bbfd b.w 8038084 } } else{ sSettings.sSNTP.sntpEnable = false; 802888a: 2000 movs r0, #0 802888c: f884 0340 strb.w r0, [r4, #832] ; 0x340 SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 8028890: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} SNTP_Poll(); } } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); 8028894: f00f bbb4 b.w 8038000 8028898: bd38 pop {r3, r4, r5, pc} 802889a: bf00 nop 802889c: 2000d414 .word 0x2000d414 80288a0: 080394a7 .word 0x080394a7 080288a4 : /** * @brief IP адрес SNTP сервера */ void SetSntpServerIpStr(char *str) { 80288a4: 4601 mov r1, r0 strcpy(sSettings.sSNTP.ip, str); 80288a6: 4801 ldr r0, [pc, #4] ; (80288ac ) 80288a8: f7f9 bc30 b.w 802210c 80288ac: 2000d755 .word 0x2000d755 080288b0 : /** * @brief Часовой пояс контроллера */ void SetSntpTimeZoneStr(char *str) { 80288b0: b570 push {r4, r5, r6, lr} float newUtc; newUtc = atof(str); 80288b2: f7f9 f98d bl 8021bd0 80288b6: f7f8 f9a1 bl 8020bfc <__aeabi_d2f> if (sSettings.sSNTP.timeZone > 0) 80288ba: 4b27 ldr r3, [pc, #156] ; (8028958 ) 80288bc: f8d3 4370 ldr.w r4, [r3, #880] ; 0x370 */ void SetSntpTimeZoneStr(char *str) { float newUtc; newUtc = atof(str); 80288c0: 4606 mov r6, r0 if (sSettings.sSNTP.timeZone > 0) 80288c2: 2100 movs r1, #0 80288c4: 4620 mov r0, r4 80288c6: f7f8 fcb3 bl 8021230 <__aeabi_fcmpgt> 80288ca: b100 cbz r0, 80288ce 80288cc: e033 b.n 8028936 { TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); } } else if (sSettings.sSNTP.timeZone < 0) 80288ce: 4620 mov r0, r4 80288d0: 2100 movs r1, #0 80288d2: f7f8 fc8f bl 80211f4 <__aeabi_fcmplt> 80288d6: 2800 cmp r0, #0 80288d8: d032 beq.n 8028940 { if (newUtc >= 0) 80288da: 4630 mov r0, r6 80288dc: 2100 movs r1, #0 80288de: f7f8 fc9d bl 802121c <__aeabi_fcmpge> 80288e2: b170 cbz r0, 8028902 { TM_RTC_Correction(newUtc + fabs(sSettings.sSNTP.timeZone)); 80288e4: 4620 mov r0, r4 80288e6: f7f7 fe53 bl 8020590 <__aeabi_f2d> 80288ea: f7fc fe57 bl 802559c 80288ee: 4604 mov r4, r0 80288f0: 460d mov r5, r1 80288f2: 4630 mov r0, r6 80288f4: f7f7 fe4c bl 8020590 <__aeabi_f2d> 80288f8: 4622 mov r2, r4 80288fa: 462b mov r3, r5 80288fc: f7f7 fcea bl 80202d4 <__adddf3> 8028900: e016 b.n 8028930 } else { if (newUtc >= sSettings.sSNTP.timeZone) 8028902: 4630 mov r0, r6 8028904: 4621 mov r1, r4 8028906: f7f8 fc89 bl 802121c <__aeabi_fcmpge> 802890a: b1a0 cbz r0, 8028936 TM_RTC_Correction(fabs(sSettings.sSNTP.timeZone) - fabs(newUtc)); 802890c: 4620 mov r0, r4 802890e: f7f7 fe3f bl 8020590 <__aeabi_f2d> 8028912: f7fc fe43 bl 802559c 8028916: 4604 mov r4, r0 8028918: 4630 mov r0, r6 802891a: 460d mov r5, r1 802891c: f7f7 fe38 bl 8020590 <__aeabi_f2d> 8028920: f7fc fe3c bl 802559c 8028924: 4602 mov r2, r0 8028926: 460b mov r3, r1 8028928: 4620 mov r0, r4 802892a: 4629 mov r1, r5 802892c: f7f7 fcd0 bl 80202d0 <__aeabi_dsub> 8028930: f7f8 f964 bl 8020bfc <__aeabi_d2f> 8028934: e00a b.n 802894c else TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); 8028936: 4630 mov r0, r6 8028938: 4621 mov r1, r4 802893a: f7f8 f9b3 bl 8020ca4 <__aeabi_fsub> 802893e: e005 b.n 802894c } } else if (sSettings.sSNTP.timeZone == 0) 8028940: 4620 mov r0, r4 8028942: 2100 movs r1, #0 8028944: f7f8 fc4c bl 80211e0 <__aeabi_fcmpeq> 8028948: b110 cbz r0, 8028950 { TM_RTC_Correction(newUtc); 802894a: 4630 mov r0, r6 802894c: f7fe f878 bl 8026a40 } sSettings.sSNTP.timeZone = newUtc; // atof(str); 8028950: 4b01 ldr r3, [pc, #4] ; (8028958 ) 8028952: f8c3 6370 str.w r6, [r3, #880] ; 0x370 8028956: bd70 pop {r4, r5, r6, pc} 8028958: 2000d414 .word 0x2000d414 0802895c : /** * @brief Тип действий при срабатывание сухих контактов */ void SetDINTypeActStr(char *str, uint8_t num) { 802895c: b510 push {r4, lr} 802895e: 460c mov r4, r1 sSettings.sInOuts.din_type_act[num] = atoi(str); 8028960: f7f9 f93a bl 8021bd8 8028964: 4902 ldr r1, [pc, #8] ; (8028970 ) 8028966: 1909 adds r1, r1, r4 8028968: f881 0376 strb.w r0, [r1, #886] ; 0x376 802896c: bd10 pop {r4, pc} 802896e: bf00 nop 8028970: 2000d414 .word 0x2000d414 08028974 : /** * @brief */ void SetROStr(char *str, uint8_t num) { 8028974: b510 push {r4, lr} 8028976: 460c mov r4, r1 set_state_douts((DOUT1+num), atoi(str)); 8028978: f7f9 f92e bl 8021bd8 802897c: f104 0309 add.w r3, r4, #9 8028980: b2c1 uxtb r1, r0 8028982: b2d8 uxtb r0, r3 } 8028984: e8bd 4010 ldmia.w sp!, {r4, lr} /** * @brief */ void SetROStr(char *str, uint8_t num) { set_state_douts((DOUT1+num), atoi(str)); 8028988: f000 bc7f b.w 802928a 0802898c : /** * @brief */ void SetROInt(uint8_t val, uint8_t num) { 802898c: 4603 mov r3, r0 set_state_douts((DOUT1+num), val); 802898e: 3109 adds r1, #9 8028990: b2c8 uxtb r0, r1 8028992: 4619 mov r1, r3 8028994: f000 bc79 b.w 802928a 08028998 : /** * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { 8028998: b510 push {r4, lr} 802899a: 460c mov r4, r1 sSettings.sInOuts.ro_type_source[num] = atoi(str); 802899c: f7f9 f91c bl 8021bd8 80289a0: 4b04 ldr r3, [pc, #16] ; (80289b4 ) 80289a2: 191b adds r3, r3, r4 SetROInt(0, num); 80289a4: 4621 mov r1, r4 /** * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { sSettings.sInOuts.ro_type_source[num] = atoi(str); 80289a6: f883 0374 strb.w r0, [r3, #884] ; 0x374 SetROInt(0, num); 80289aa: 2000 movs r0, #0 } 80289ac: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { sSettings.sInOuts.ro_type_source[num] = atoi(str); SetROInt(0, num); 80289b0: f7ff bfec b.w 802898c 80289b4: 2000d414 .word 0x2000d414 080289b8 : /** * @brief Установить параметры обновления ПО по умолчанию */ void SETTINGS_SetBootParamsDef(void) { sSettings.bootParams.loadMode = 0; 80289b8: 4b02 ldr r3, [pc, #8] ; (80289c4 ) 80289ba: 2200 movs r2, #0 80289bc: 701a strb r2, [r3, #0] sSettings.bootParams.bootTry = 0; 80289be: 705a strb r2, [r3, #1] 80289c0: 4770 bx lr 80289c2: bf00 nop 80289c4: 2000d414 .word 0x2000d414 080289c8 : /** * @brief Установить параметры сетевого подключения по умолчанию */ void SETTINGS_SetWebParamsDef(void) { 80289c8: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.8"); 80289ca: 4c09 ldr r4, [pc, #36] ; (80289f0 ) 80289cc: 4909 ldr r1, [pc, #36] ; (80289f4 ) 80289ce: 4620 mov r0, r4 80289d0: f7f9 fb9c bl 802210c strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 80289d4: 4908 ldr r1, [pc, #32] ; (80289f8 ) 80289d6: f104 0010 add.w r0, r4, #16 80289da: f7f9 fb97 bl 802210c strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 80289de: f104 0020 add.w r0, r4, #32 80289e2: 4906 ldr r1, [pc, #24] ; (80289fc ) 80289e4: f7f9 fb92 bl 802210c sSettings.sWebParams.dhcpEnable = 1; 80289e8: 2201 movs r2, #1 80289ea: f884 2030 strb.w r2, [r4, #48] ; 0x30 80289ee: bd10 pop {r4, pc} 80289f0: 2000d416 .word 0x2000d416 80289f4: 080391d5 .word 0x080391d5 80289f8: 080391e1 .word 0x080391e1 80289fc: 080391ed .word 0x080391ed 08028a00 : /** * @brief Установить временные параметры сетевого подключения по умолчанию */ void SETTINGS_SetTempWebParamsDef(void) { 8028a00: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 8028a02: 4c09 ldr r4, [pc, #36] ; (8028a28 ) 8028a04: 4909 ldr r1, [pc, #36] ; (8028a2c ) 8028a06: 4620 mov r0, r4 8028a08: f7f9 fb80 bl 802210c strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 8028a0c: 4908 ldr r1, [pc, #32] ; (8028a30 ) 8028a0e: f104 0010 add.w r0, r4, #16 8028a12: f7f9 fb7b bl 802210c strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 8028a16: f104 0020 add.w r0, r4, #32 8028a1a: 4906 ldr r1, [pc, #24] ; (8028a34 ) 8028a1c: f7f9 fb76 bl 802210c sSettings.sWebParams.dhcpEnable = 1; 8028a20: 2201 movs r2, #1 8028a22: f884 2030 strb.w r2, [r4, #48] ; 0x30 8028a26: bd10 pop {r4, pc} 8028a28: 2000d416 .word 0x2000d416 8028a2c: 080391fb .word 0x080391fb 8028a30: 080391e1 .word 0x080391e1 8028a34: 080391ed .word 0x080391ed 08028a38 : /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { 8028a38: b570 push {r4, r5, r6, lr} strcpy(sSettings.sSnmp.sysDescr, ""); 8028a3a: 4c1e ldr r4, [pc, #120] ; (8028ab4 ) 8028a3c: 4d1e ldr r5, [pc, #120] ; (8028ab8 ) strcpy(sSettings.sSnmp.readCommunity, "public"); 8028a3e: 4e1f ldr r6, [pc, #124] ; (8028abc ) /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { strcpy(sSettings.sSnmp.sysDescr, ""); 8028a40: 4629 mov r1, r5 8028a42: 4620 mov r0, r4 8028a44: f7f9 fb62 bl 802210c strcpy(sSettings.sSnmp.readCommunity, "public"); 8028a48: 4631 mov r1, r6 8028a4a: f104 00a0 add.w r0, r4, #160 ; 0xa0 8028a4e: f7f9 fb5d bl 802210c strcpy(sSettings.sSnmp.writeCommunity, "public"); 8028a52: 4631 mov r1, r6 8028a54: f104 00b4 add.w r0, r4, #180 ; 0xb4 8028a58: f7f9 fb58 bl 802210c strcpy(sSettings.sSnmp.sysContact, ""); 8028a5c: 4629 mov r1, r5 8028a5e: f104 00c8 add.w r0, r4, #200 ; 0xc8 8028a62: f7f9 fb53 bl 802210c strcpy(sSettings.sSnmp.sysName, "BT6702"); 8028a66: f104 00fa add.w r0, r4, #250 ; 0xfa 8028a6a: 4915 ldr r1, [pc, #84] ; (8028ac0 ) 8028a6c: f7f9 fb4e bl 802210c strcpy(sSettings.sSnmp.sysLocation, ""); 8028a70: 4629 mov r1, r5 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 8028a72: 4d14 ldr r5, [pc, #80] ; (8028ac4 ) strcpy(sSettings.sSnmp.sysDescr, ""); strcpy(sSettings.sSnmp.readCommunity, "public"); strcpy(sSettings.sSnmp.writeCommunity, "public"); strcpy(sSettings.sSnmp.sysContact, ""); strcpy(sSettings.sSnmp.sysName, "BT6702"); strcpy(sSettings.sSnmp.sysLocation, ""); 8028a74: f504 7087 add.w r0, r4, #270 ; 0x10e 8028a78: f7f9 fb48 bl 802210c strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 8028a7c: 4629 mov r1, r5 8028a7e: f504 70be add.w r0, r4, #380 ; 0x17c 8028a82: f7f9 fb43 bl 802210c strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0"); 8028a86: 4629 mov r1, r5 8028a88: f504 70c8 add.w r0, r4, #400 ; 0x190 8028a8c: f7f9 fb3e bl 802210c strcpy(sSettings.sSnmp.managerIP3, "0.0.0.0"); 8028a90: 4629 mov r1, r5 8028a92: f504 70d2 add.w r0, r4, #420 ; 0x1a4 8028a96: f7f9 fb39 bl 802210c strcpy(sSettings.sSnmp.managerIP4, "0.0.0.0"); 8028a9a: 4629 mov r1, r5 8028a9c: f504 70dc add.w r0, r4, #440 ; 0x1b8 8028aa0: f7f9 fb34 bl 802210c strcpy(sSettings.sSnmp.managerIP5, "0.0.0.0"); 8028aa4: f504 70e6 add.w r0, r4, #460 ; 0x1cc 8028aa8: 4629 mov r1, r5 } 8028aaa: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} strcpy(sSettings.sSnmp.sysLocation, ""); strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0"); strcpy(sSettings.sSnmp.managerIP3, "0.0.0.0"); strcpy(sSettings.sSnmp.managerIP4, "0.0.0.0"); strcpy(sSettings.sSnmp.managerIP5, "0.0.0.0"); 8028aae: f7f9 bb2d b.w 802210c 8028ab2: bf00 nop 8028ab4: 2000d545 .word 0x2000d545 8028ab8: 080405c1 .word 0x080405c1 8028abc: 08039207 .word 0x08039207 8028ac0: 0803920e .word 0x0803920e 8028ac4: 08039215 .word 0x08039215 08028ac8 : /** * @brief Установить Информацию об устройстве по умолчанию */ void SETTINGS_SetInfoDef(void) { 8028ac8: b510 push {r4, lr} SYS_t *sSys = NULL; sSys = pvPortMalloc(sizeof(*sSys)); 8028aca: 2050 movs r0, #80 ; 0x50 8028acc: f003 fb72 bl 802c1b4 if (sSys) { 8028ad0: 4604 mov r4, r0 8028ad2: b198 cbz r0, 8028afc SYS_Load(sSys); 8028ad4: f000 fa74 bl 8028fc0 strcpy(sSettings.sInfo.mac, sSys->mac); 8028ad8: 4621 mov r1, r4 8028ada: 4811 ldr r0, [pc, #68] ; (8028b20 ) 8028adc: f7f9 fb16 bl 802210c strcpy(sSettings.sInfo.serialNumber, sSys->serial); 8028ae0: f104 0112 add.w r1, r4, #18 8028ae4: 480f ldr r0, [pc, #60] ; (8028b24 ) 8028ae6: f7f9 fb11 bl 802210c strcpy(sSettings.sInfo.productionData, sSys->proddate); 8028aea: f104 0132 add.w r1, r4, #50 ; 0x32 8028aee: 480e ldr r0, [pc, #56] ; (8028b28 ) 8028af0: f7f9 fb0c bl 802210c vPortFree(sSys); 8028af4: 4620 mov r0, r4 8028af6: f003 fbe3 bl 802c2c0 8028afa: e00b b.n 8028b14 } else { strcpy(sSettings.sInfo.productionData, "09.07.2017"); 8028afc: 490b ldr r1, [pc, #44] ; (8028b2c ) 8028afe: 480a ldr r0, [pc, #40] ; (8028b28 ) 8028b00: f7f9 fb04 bl 802210c strcpy(sSettings.sInfo.mac, DEVICE_MAC); 8028b04: 490a ldr r1, [pc, #40] ; (8028b30 ) 8028b06: 4806 ldr r0, [pc, #24] ; (8028b20 ) 8028b08: f7f9 fb00 bl 802210c strcpy(sSettings.sInfo.serialNumber, DEVICE_SERIAL); 8028b0c: 4805 ldr r0, [pc, #20] ; (8028b24 ) 8028b0e: 4909 ldr r1, [pc, #36] ; (8028b34 ) 8028b10: f7f9 fafc bl 802210c } strcpy(sSettings.sInfo.comments, ""); 8028b14: 4808 ldr r0, [pc, #32] ; (8028b38 ) 8028b16: 4909 ldr r1, [pc, #36] ; (8028b3c ) } 8028b18: e8bd 4010 ldmia.w sp!, {r4, lr} strcpy(sSettings.sInfo.productionData, "09.07.2017"); strcpy(sSettings.sInfo.mac, DEVICE_MAC); strcpy(sSettings.sInfo.serialNumber, DEVICE_SERIAL); } strcpy(sSettings.sInfo.comments, ""); 8028b1c: f7f9 baf6 b.w 802210c 8028b20: 2000d4a0 .word 0x2000d4a0 8028b24: 2000d4b2 .word 0x2000d4b2 8028b28: 2000d478 .word 0x2000d478 8028b2c: 0803921d .word 0x0803921d 8028b30: 08039228 .word 0x08039228 8028b34: 0803923a .word 0x0803923a 8028b38: 2000d4c2 .word 0x2000d4c2 8028b3c: 080405c1 .word 0x080405c1 08028b40 : /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) { 8028b40: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8028b44: 4d14 ldr r5, [pc, #80] ; (8028b98 ) 8028b46: 2400 movs r4, #0 } /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) 8028b48: 2717 movs r7, #23 strcpy(sSettings.sAuth[user_id].login, "admin"); strcpy(sSettings.sAuth[user_id].password, "12345"); break; case 1: default: sSettings.sAuth[user_id].level = USER; 8028b4a: f04f 0801 mov.w r8, #1 void SETTINGS_SetServiceDef(void) { uint8_t user_id; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { switch (user_id) { 8028b4e: f014 03ff ands.w r3, r4, #255 ; 0xff 8028b52: d108 bne.n 8028b66 /* First users in the system is always ADMIN. * Others are USER */ case 0: sSettings.sAuth[user_id].level = ADMIN; strcpy(sSettings.sAuth[user_id].login, "admin"); 8028b54: 4911 ldr r1, [pc, #68] ; (8028b9c ) 8028b56: 4812 ldr r0, [pc, #72] ; (8028ba0 ) for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { switch (user_id) { /* First users in the system is always ADMIN. * Others are USER */ case 0: sSettings.sAuth[user_id].level = ADMIN; 8028b58: f885 3311 strb.w r3, [r5, #785] ; 0x311 strcpy(sSettings.sAuth[user_id].login, "admin"); 8028b5c: f7f9 fad6 bl 802210c strcpy(sSettings.sAuth[user_id].password, "12345"); 8028b60: 4810 ldr r0, [pc, #64] ; (8028ba4 ) 8028b62: 4911 ldr r1, [pc, #68] ; (8028ba8 ) 8028b64: e010 b.n 8028b88 } /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) 8028b66: fb07 f604 mul.w r6, r7, r4 8028b6a: 19ab adds r3, r5, r6 strcpy(sSettings.sAuth[user_id].password, "12345"); break; case 1: default: sSettings.sAuth[user_id].level = USER; strcpy(sSettings.sAuth[user_id].login, "user"); 8028b6c: f506 7044 add.w r0, r6, #784 ; 0x310 8028b70: 1828 adds r0, r5, r0 8028b72: 490e ldr r1, [pc, #56] ; (8028bac ) strcpy(sSettings.sAuth[user_id].login, "admin"); strcpy(sSettings.sAuth[user_id].password, "12345"); break; case 1: default: sSettings.sAuth[user_id].level = USER; 8028b74: f883 8311 strb.w r8, [r3, #785] ; 0x311 strcpy(sSettings.sAuth[user_id].login, "user"); 8028b78: 3002 adds r0, #2 strcpy(sSettings.sAuth[user_id].password, "1234"); 8028b7a: f506 7646 add.w r6, r6, #792 ; 0x318 strcpy(sSettings.sAuth[user_id].password, "12345"); break; case 1: default: sSettings.sAuth[user_id].level = USER; strcpy(sSettings.sAuth[user_id].login, "user"); 8028b7e: f7f9 fac5 bl 802210c strcpy(sSettings.sAuth[user_id].password, "1234"); 8028b82: 19a8 adds r0, r5, r6 8028b84: 490a ldr r1, [pc, #40] ; (8028bb0 ) 8028b86: 3005 adds r0, #5 8028b88: 3401 adds r4, #1 8028b8a: f7f9 fabf bl 802210c */ void SETTINGS_SetServiceDef(void) { uint8_t user_id; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 8028b8e: 2c02 cmp r4, #2 8028b90: d1dd bne.n 8028b4e strcpy(sSettings.sAuth[user_id].login, "user"); strcpy(sSettings.sAuth[user_id].password, "1234"); break; } } } 8028b92: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8028b96: bf00 nop 8028b98: 2000d414 .word 0x2000d414 8028b9c: 08039242 .word 0x08039242 8028ba0: 2000d726 .word 0x2000d726 8028ba4: 2000d731 .word 0x2000d731 8028ba8: 08039248 .word 0x08039248 8028bac: 0803924e .word 0x0803924e 8028bb0: 08039253 .word 0x08039253 08028bb4 : /** * @brief Установить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { 8028bb4: b510 push {r4, lr} sSettings.sSNTP.sntpEnable = true; 8028bb6: 4c08 ldr r4, [pc, #32] ; (8028bd8 ) strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 8028bb8: 4908 ldr r1, [pc, #32] ; (8028bdc ) 8028bba: 4809 ldr r0, [pc, #36] ; (8028be0 ) /** * @brief Установить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; 8028bbc: 2301 movs r3, #1 8028bbe: f884 3340 strb.w r3, [r4, #832] ; 0x340 strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 8028bc2: f7f9 faa3 bl 802210c sSettings.sSNTP.timeZone = 3.0; 8028bc6: 4b07 ldr r3, [pc, #28] ; (8028be4 ) strcpy(sSettings.sSNTP.data, "none"); 8028bc8: 4807 ldr r0, [pc, #28] ; (8028be8 ) 8028bca: 4908 ldr r1, [pc, #32] ; (8028bec ) */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; strcpy(sSettings.sSNTP.ip, "88.147.254.235"); sSettings.sSNTP.timeZone = 3.0; 8028bcc: f8c4 3370 str.w r3, [r4, #880] ; 0x370 strcpy(sSettings.sSNTP.data, "none"); } 8028bd0: e8bd 4010 ldmia.w sp!, {r4, lr} void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; strcpy(sSettings.sSNTP.ip, "88.147.254.235"); sSettings.sSNTP.timeZone = 3.0; strcpy(sSettings.sSNTP.data, "none"); 8028bd4: f7f9 ba9a b.w 802210c 8028bd8: 2000d414 .word 0x2000d414 8028bdc: 08039258 .word 0x08039258 8028be0: 2000d755 .word 0x2000d755 8028be4: 40400000 .word 0x40400000 8028be8: 2000d765 .word 0x2000d765 8028bec: 08039267 .word 0x08039267 08028bf0 : /** * @brief Установить параметры настроек сухих контактов / реле по умолчанию */ void SETTINGS_SetINOUTSDef(void) { sSettings.sInOuts.ro_type_source[0] = CRITICAL; 8028bf0: 4b04 ldr r3, [pc, #16] ; (8028c04 ) 8028bf2: 2201 movs r2, #1 sSettings.sInOuts.ro_type_source[1] = SNMP_SET; 8028bf4: 2103 movs r1, #3 /** * @brief Установить параметры настроек сухих контактов / реле по умолчанию */ void SETTINGS_SetINOUTSDef(void) { sSettings.sInOuts.ro_type_source[0] = CRITICAL; 8028bf6: f883 2374 strb.w r2, [r3, #884] ; 0x374 sSettings.sInOuts.ro_type_source[1] = SNMP_SET; 8028bfa: f883 1375 strb.w r1, [r3, #885] ; 0x375 sSettings.sInOuts.din_type_act[0] = DI_CONN; 8028bfe: f883 2376 strb.w r2, [r3, #886] ; 0x376 8028c02: 4770 bx lr 8028c04: 2000d414 .word 0x2000d414 08028c08 : /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { 8028c08: b510 push {r4, lr} sSettings.sRADIUS.Auth_enable = true; 8028c0a: 4c0b ldr r4, [pc, #44] ; (8028c38 ) sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "0.0.0.0"); 8028c0c: 490b ldr r1, [pc, #44] ; (8028c3c ) 8028c0e: 480c ldr r0, [pc, #48] ; (8028c40 ) /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.Auth_enable = true; 8028c10: 2301 movs r3, #1 8028c12: f884 3378 strb.w r3, [r4, #888] ; 0x378 sSettings.sRADIUS.RDSEnable = true; 8028c16: f884 339a strb.w r3, [r4, #922] ; 0x39a strcpy(sSettings.sRADIUS.ServerIP, "0.0.0.0"); 8028c1a: f7f9 fa77 bl 802210c sSettings.sRADIUS.port = 1812; 8028c1e: f240 7314 movw r3, #1812 ; 0x714 sSettings.sRADIUS.key_access = 123; strcpy(sSettings.sRADIUS.rds_password, "12345"); 8028c22: 4808 ldr r0, [pc, #32] ; (8028c44 ) 8028c24: 4908 ldr r1, [pc, #32] ; (8028c48 ) void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.Auth_enable = true; sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "0.0.0.0"); sSettings.sRADIUS.port = 1812; 8028c26: f8c4 339c str.w r3, [r4, #924] ; 0x39c sSettings.sRADIUS.key_access = 123; 8028c2a: 237b movs r3, #123 ; 0x7b 8028c2c: f8c4 33a0 str.w r3, [r4, #928] ; 0x3a0 strcpy(sSettings.sRADIUS.rds_password, "12345"); } 8028c30: e8bd 4010 ldmia.w sp!, {r4, lr} sSettings.sRADIUS.Auth_enable = true; sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "0.0.0.0"); sSettings.sRADIUS.port = 1812; sSettings.sRADIUS.key_access = 123; strcpy(sSettings.sRADIUS.rds_password, "12345"); 8028c34: f7f9 ba6a b.w 802210c 8028c38: 2000d414 .word 0x2000d414 8028c3c: 08039215 .word 0x08039215 8028c40: 2000d78d .word 0x2000d78d 8028c44: 2000d79d .word 0x2000d79d 8028c48: 08039248 .word 0x08039248 08028c4c : */ void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; for (uint32_t i = 0; i < size; i++) 8028c4c: 2300 movs r3, #0 8028c4e: e006 b.n 8028c5e *data++ = (*(uint32_t*)baseAddress++);; 8028c50: f103 6200 add.w r2, r3, #134217728 ; 0x8000000 8028c54: f502 4280 add.w r2, r2, #16384 ; 0x4000 8028c58: 6812 ldr r2, [r2, #0] 8028c5a: 54c2 strb r2, [r0, r3] */ void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; for (uint32_t i = 0; i < size; i++) 8028c5c: 3301 adds r3, #1 8028c5e: 428b cmp r3, r1 8028c60: d1f6 bne.n 8028c50 *data++ = (*(uint32_t*)baseAddress++);; } 8028c62: 4770 bx lr 08028c64 : */ void SETTINGS_EraseFlashSector(void) { FLASH_Status status; if ((status = FLASH_EraseSector(FLASH_Sector_1, VoltageRange_3)) != FLASH_COMPLETE) { 8028c64: 2008 movs r0, #8 8028c66: 2102 movs r1, #2 8028c68: f7fc bd7a b.w 8025760 08028c6c : /** * @brief * @retval */ uint32_t SETTINGS_GetCRC(void) { 8028c6c: b508 push {r3, lr} CRC_ResetDR(); 8028c6e: f7fc fce1 bl 8025634 return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4 - 1); 8028c72: 4803 ldr r0, [pc, #12] ; (8028c80 ) 8028c74: 21e9 movs r1, #233 ; 0xe9 } 8028c76: e8bd 4008 ldmia.w sp!, {r3, lr} * @retval */ uint32_t SETTINGS_GetCRC(void) { CRC_ResetDR(); return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4 - 1); 8028c7a: f7fc bce1 b.w 8025640 8028c7e: bf00 nop 8028c80: 2000d414 .word 0x2000d414 08028c84 : /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { 8028c84: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8028c88: 4606 mov r6, r0 8028c8a: 468a mov sl, r1 uint32_t baseAddress = SETTINGS_SECTOR; uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 8028c8c: f7ff ffee bl 8028c6c /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; 8028c90: 4c17 ldr r4, [pc, #92] ; (8028cf0 ) uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 8028c92: 4680 mov r8, r0 8028c94: 2703 movs r7, #3 FLASH_Status status; for (uint8_t i = 0; i < 3; i++) { fAlarm = 0; FLASH_Unlock(); 8028c96: f7fc fce3 bl 8025660 8028c9a: 4635 mov r5, r6 SETTINGS_EraseFlashSector(); 8028c9c: f7ff ffe2 bl 8028c64 } /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) 8028ca0: eb04 0b0a add.w fp, r4, sl fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8028ca4: e00a b.n 8028cbc if ((status = FLASH_ProgramByte(baseAddress++, *data++)) != FLASH_COMPLETE) { 8028ca6: f815 1b01 ldrb.w r1, [r5], #1 8028caa: 4620 mov r0, r4 8028cac: f7fc fd1e bl 80256ec 8028cb0: f104 0901 add.w r9, r4, #1 8028cb4: 2808 cmp r0, #8 8028cb6: 462e mov r6, r5 8028cb8: 464c mov r4, r9 8028cba: d102 bne.n 8028cc2 fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8028cbc: 455c cmp r4, fp 8028cbe: 462e mov r6, r5 8028cc0: d1f1 bne.n 8028ca6 if ((status = FLASH_ProgramByte(baseAddress++, *data++)) != FLASH_COMPLETE) { DBG printf("FLASH_ProgramByte error: status = %d\r\n", status); break; } if ((status = FLASH_ProgramWord((uint32_t)CRC_ADDRESS, crc)) != FLASH_COMPLETE) { 8028cc2: 4641 mov r1, r8 8028cc4: 480b ldr r0, [pc, #44] ; (8028cf4 ) 8028cc6: f7fc fd2d bl 8025724 DBG printf("FLASH_ProgramWord error: status = %d\r\n", status); } FLASH_Lock(); 8028cca: f7fc fcd7 bl 802567c /* Считываем что записали */ SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028cce: 480a ldr r0, [pc, #40] ; (8028cf8 ) 8028cd0: f44f 716a mov.w r1, #936 ; 0x3a8 8028cd4: f7ff ffba bl 8028c4c checkCrc = SETTINGS_GetCRC(); 8028cd8: f7ff ffc8 bl 8028c6c /* Проверяем CRC того что было записано */ if (checkCrc == crc) 8028cdc: 4540 cmp r0, r8 8028cde: d004 beq.n 8028cea 8028ce0: 3f01 subs r7, #1 uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); bool fAlarm = 0; FLASH_Status status; for (uint8_t i = 0; i < 3; i++) 8028ce2: f017 07ff ands.w r7, r7, #255 ; 0xff 8028ce6: d1d6 bne.n 8028c96 8028ce8: e7fe b.n 8028ce8 8028cea: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8028cee: bf00 nop 8028cf0: 08004000 .word 0x08004000 8028cf4: 08005f9c .word 0x08005f9c 8028cf8: 2000d414 .word 0x2000d414 08028cfc : /** * @brief * @retval */ uint32_t SETTINGS_GetCritSecCRC(void) { 8028cfc: b508 push {r3, lr} CRC_ResetDR(); 8028cfe: f7fc fc99 bl 8025634 uint32_t critsec_len = (uint32_t)((uint8_t *)(&sSettings.CritSecCRC) - (uint8_t *)&sSettings) / 4; return CRC_CalcBlockCRC((uint32_t *)&sSettings, critsec_len); 8028d02: 4803 ldr r0, [pc, #12] ; (8028d10 ) 8028d04: 2147 movs r1, #71 ; 0x47 } 8028d06: e8bd 4008 ldmia.w sp!, {r3, lr} */ uint32_t SETTINGS_GetCritSecCRC(void) { CRC_ResetDR(); uint32_t critsec_len = (uint32_t)((uint8_t *)(&sSettings.CritSecCRC) - (uint8_t *)&sSettings) / 4; return CRC_CalcBlockCRC((uint32_t *)&sSettings, critsec_len); 8028d0a: f7fc bc99 b.w 8025640 8028d0e: bf00 nop 8028d10: 2000d414 .word 0x2000d414 08028d14 : /** * @brief Запись структуры настроек во flesh */ void SETTINGS_Save(void) { 8028d14: b508 push {r3, lr} /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028d16: f7ff fff1 bl 8028cfc 8028d1a: 4b05 ldr r3, [pc, #20] ; (8028d30 ) SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028d1c: f44f 716a mov.w r1, #936 ; 0x3a8 * @brief Запись структуры настроек во flesh */ void SETTINGS_Save(void) { /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028d20: f8c3 011c str.w r0, [r3, #284] ; 0x11c SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028d24: 4618 mov r0, r3 } 8028d26: e8bd 4008 ldmia.w sp!, {r3, lr} void SETTINGS_Save(void) { /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028d2a: f7ff bfab b.w 8028c84 8028d2e: bf00 nop 8028d30: 2000d414 .word 0x2000d414 08028d34 : /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { 8028d34: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028d36: 4c0d ldr r4, [pc, #52] ; (8028d6c ) /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { SETTINGS_SetWebParamsDef(); 8028d38: f7ff fe46 bl 80289c8 SETTINGS_SetTempWebParamsDef(); 8028d3c: f7ff fe60 bl 8028a00 SETTINGS_SetSnmpDef(); 8028d40: f7ff fe7a bl 8028a38 SETTINGS_SetBootParamsDef(); 8028d44: f7ff fe38 bl 80289b8 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028d48: 2300 movs r3, #0 8028d4a: f884 3120 strb.w r3, [r4, #288] ; 0x120 SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetBootParamsDef(); SETTINGS_SetFlagsDef(); //SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); 8028d4e: f7ff ff31 bl 8028bb4 SETTINGS_SetINOUTSDef(); 8028d52: f7ff ff4d bl 8028bf0 SETTINGS_SetRADIUSDef(); 8028d56: f7ff ff57 bl 8028c08 //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028d5a: f7ff ffcf bl 8028cfc sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028d5e: 4b04 ldr r3, [pc, #16] ; (8028d70 ) SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028d60: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028d64: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028d68: bd10 pop {r4, pc} 8028d6a: bf00 nop 8028d6c: 2000d414 .word 0x2000d414 8028d70: 075bcd15 .word 0x075bcd15 08028d74 : /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { 8028d74: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028d76: 4c0f ldr r4, [pc, #60] ; (8028db4 ) /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { SETTINGS_SetBootParamsDef(); 8028d78: f7ff fe1e bl 80289b8 SETTINGS_SetWebParamsDef(); 8028d7c: f7ff fe24 bl 80289c8 SETTINGS_SetTempWebParamsDef(); 8028d80: f7ff fe3e bl 8028a00 SETTINGS_SetSnmpDef(); 8028d84: f7ff fe58 bl 8028a38 SETTINGS_SetInfoDef(); 8028d88: f7ff fe9e bl 8028ac8 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028d8c: 2300 movs r3, #0 8028d8e: f884 3120 strb.w r3, [r4, #288] ; 0x120 SETTINGS_SetWebParamsDef(); SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetInfoDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 8028d92: f7ff fed5 bl 8028b40 SETTINGS_SetSntpDef(); 8028d96: f7ff ff0d bl 8028bb4 SETTINGS_SetINOUTSDef(); 8028d9a: f7ff ff29 bl 8028bf0 SETTINGS_SetRADIUSDef(); 8028d9e: f7ff ff33 bl 8028c08 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028da2: f7ff ffab bl 8028cfc sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028da6: 4b04 ldr r3, [pc, #16] ; (8028db8 ) SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028da8: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028dac: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028db0: bd10 pop {r4, pc} 8028db2: bf00 nop 8028db4: 2000d414 .word 0x2000d414 8028db8: 075bcd15 .word 0x075bcd15 08028dbc : /** * @brief Загрузка структуры настроек из flesh */ void SETTINGS_Load(void) { 8028dbc: b510 push {r4, lr} uint32_t loadCRC; // CRC из flash uint32_t newCRC; // CRC загруженной структуры настроек SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028dbe: 4809 ldr r0, [pc, #36] ; (8028de4 ) 8028dc0: f44f 716a mov.w r1, #936 ; 0x3a8 8028dc4: f7ff ff42 bl 8028c4c /* Считываем CRC из флеш памяти */ loadCRC = (*(uint32_t*)CRC_ADDRESS); 8028dc8: 4b07 ldr r3, [pc, #28] ; (8028de8 ) 8028dca: 681c ldr r4, [r3, #0] /* Рассчитываем CRC для структуры настроек */ newCRC = SETTINGS_GetCRC(); 8028dcc: f7ff ff4e bl 8028c6c if (loadCRC != newCRC) { 8028dd0: 4284 cmp r4, r0 8028dd2: d005 beq.n 8028de0 SETTINGS_SetAllDefault(); 8028dd4: f7ff ffce bl 8028d74 SETTINGS_Save(); } } 8028dd8: e8bd 4010 ldmia.w sp!, {r4, lr} /* Рассчитываем CRC для структуры настроек */ newCRC = SETTINGS_GetCRC(); if (loadCRC != newCRC) { SETTINGS_SetAllDefault(); SETTINGS_Save(); 8028ddc: f7ff bf9a b.w 8028d14 8028de0: bd10 pop {r4, pc} 8028de2: bf00 nop 8028de4: 2000d414 .word 0x2000d414 8028de8: 08005f9c .word 0x08005f9c 08028dec : /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { 8028dec: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028dee: 4c0b ldr r4, [pc, #44] ; (8028e1c ) /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { SETTINGS_SetBootParamsDef(); 8028df0: f7ff fde2 bl 80289b8 SETTINGS_SetSnmpDef(); 8028df4: f7ff fe20 bl 8028a38 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028df8: 2300 movs r3, #0 8028dfa: f884 3120 strb.w r3, [r4, #288] ; 0x120 { SETTINGS_SetBootParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetFlagsDef(); // SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); 8028dfe: f7ff fed9 bl 8028bb4 SETTINGS_SetINOUTSDef(); 8028e02: f7ff fef5 bl 8028bf0 SETTINGS_SetRADIUSDef(); 8028e06: f7ff feff bl 8028c08 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028e0a: f7ff ff77 bl 8028cfc sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028e0e: 4b04 ldr r3, [pc, #16] ; (8028e20 ) // SETTINGS_SetServiceDef(); SETTINGS_SetSntpDef(); SETTINGS_SetINOUTSDef(); SETTINGS_SetRADIUSDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028e10: f8c4 011c str.w r0, [r4, #284] ; 0x11c sSettings.controlWorld = SETTINGS_CONTROL_WORD; 8028e14: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 8028e18: bd10 pop {r4, pc} 8028e1a: bf00 nop 8028e1c: 2000d414 .word 0x2000d414 8028e20: 075bcd15 .word 0x075bcd15 08028e24 : /** * @brief Сброс флага boottry в регистре RTC */ void SETTINGS_ResetBootTry(void) { uint8_t bootTry = RTC_ReadBackupRegister(RTC_BKP_DR2); 8028e24: 2002 movs r0, #2 /** * @brief Сброс флага boottry в регистре RTC */ void SETTINGS_ResetBootTry(void) { 8028e26: b508 push {r3, lr} uint8_t bootTry = RTC_ReadBackupRegister(RTC_BKP_DR2); 8028e28: f7fc fffe bl 8025e28 if (bootTry > 0 ) 8028e2c: f010 0fff tst.w r0, #255 ; 0xff 8028e30: d014 beq.n 8028e5c { bootTry = 0; RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 8028e32: 2002 movs r0, #2 8028e34: 2100 movs r1, #0 8028e36: f7fc ffe7 bl 8025e08 /* Check FW update flag */ if (RTC_ReadBackupRegister(RTC_BKP_DR3)) { 8028e3a: 2003 movs r0, #3 8028e3c: f7fc fff4 bl 8025e28 8028e40: b160 cbz r0, 8028e5c /* Отправка трапа об успешном обновлении ПО */ #ifndef BT6702_SERVICE SNMP_SendUserTrap(FW_VERSION_UPDATED); 8028e42: 2002 movs r0, #2 8028e44: f00e ff4c bl 8037ce0 log_event_data(LOG_UPDATE_SOFT, "Успешно"); 8028e48: 2002 movs r0, #2 8028e4a: 4905 ldr r1, [pc, #20] ; (8028e60 ) 8028e4c: f001 fa0a bl 802a264 #endif /* Clear FW update flag */ RTC_WriteBackupRegister(RTC_BKP_DR3, 0); 8028e50: 2003 movs r0, #3 8028e52: 2100 movs r1, #0 //taskENTER_CRITICAL(); SETTINGS_Save(); //taskEXIT_CRITICAL(); } */ } 8028e54: e8bd 4008 ldmia.w sp!, {r3, lr} #ifndef BT6702_SERVICE SNMP_SendUserTrap(FW_VERSION_UPDATED); log_event_data(LOG_UPDATE_SOFT, "Успешно"); #endif /* Clear FW update flag */ RTC_WriteBackupRegister(RTC_BKP_DR3, 0); 8028e58: f7fc bfd6 b.w 8025e08 8028e5c: bd08 pop {r3, pc} 8028e5e: bf00 nop 8028e60: 0803926c .word 0x0803926c 08028e64 : /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) { 8028e64: b573 push {r0, r1, r4, r5, r6, lr} #if defined ( __ICCARM__ ) macPtr = DEVICE_MAC; #endif for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 8028e66: 4e0a ldr r6, [pc, #40] ; (8028e90 ) /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) 8028e68: 1e45 subs r5, r0, #1 8028e6a: 2400 movs r4, #0 #if defined ( __ICCARM__ ) macPtr = DEVICE_MAC; #endif for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 8028e6c: 1931 adds r1, r6, r4 8028e6e: 318c adds r1, #140 ; 0x8c 8028e70: 2202 movs r2, #2 8028e72: a801 add r0, sp, #4 8028e74: f7f9 fa60 bl 8022338 mac[i] = (uint8_t)strtol(dummy, NULL, 16); 8028e78: 2100 movs r1, #0 8028e7a: 2210 movs r2, #16 8028e7c: a801 add r0, sp, #4 8028e7e: f7fa fd91 bl 80239a4 8028e82: 3403 adds r4, #3 char *macPtr = sSettings.sInfo.mac; #if defined ( __ICCARM__ ) macPtr = DEVICE_MAC; #endif for (uint8_t i = 0; i < 6; i++) 8028e84: 2c12 cmp r4, #18 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); 8028e86: f805 0f01 strb.w r0, [r5, #1]! char *macPtr = sSettings.sInfo.mac; #if defined ( __ICCARM__ ) macPtr = DEVICE_MAC; #endif for (uint8_t i = 0; i < 6; i++) 8028e8a: d1ef bne.n 8028e6c { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); } } 8028e8c: bd7c pop {r2, r3, r4, r5, r6, pc} 8028e8e: bf00 nop 8028e90: 2000d414 .word 0x2000d414 08028e94 : /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028e94: b570 push {r4, r5, r6, lr} memset(sSettings.sInfo.productionData, 0, 40); 8028e96: 4c07 ldr r4, [pc, #28] ; (8028eb4 ) /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028e98: 4606 mov r6, r0 8028e9a: 460d mov r5, r1 memset(sSettings.sInfo.productionData, 0, 40); 8028e9c: 2228 movs r2, #40 ; 0x28 8028e9e: 2100 movs r1, #0 8028ea0: 4620 mov r0, r4 8028ea2: f7f8 ffb9 bl 8021e18 memcpy(sSettings.sInfo.productionData, proDate, len); 8028ea6: 4620 mov r0, r4 8028ea8: 4631 mov r1, r6 8028eaa: 462a mov r2, r5 } 8028eac: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { memset(sSettings.sInfo.productionData, 0, 40); memcpy(sSettings.sInfo.productionData, proDate, len); 8028eb0: f7f8 bef8 b.w 8021ca4 8028eb4: 2000d478 .word 0x2000d478 08028eb8 : * @brief Общая структура настроек */ extern SETTINGS_t sSettings; #ifdef BACKUP_OLD_SYS bool SYS_BackupInfo(char *mac, char *serial) { 8028eb8: b510 push {r4, lr} 8028eba: 4602 mov r2, r0 8028ebc: 460c mov r4, r1 snprintf(mac_backup, MAC_LEN, mac); 8028ebe: 4806 ldr r0, [pc, #24] ; (8028ed8 ) 8028ec0: 2112 movs r1, #18 8028ec2: f7fe fef3 bl 8027cac snprintf(serial_backup, SER_LEN, serial); 8028ec6: 2110 movs r1, #16 8028ec8: 4622 mov r2, r4 8028eca: 4804 ldr r0, [pc, #16] ; (8028edc ) 8028ecc: f7fe feee bl 8027cac backup_done = true; 8028ed0: 4b03 ldr r3, [pc, #12] ; (8028ee0 ) 8028ed2: 2001 movs r0, #1 8028ed4: 7018 strb r0, [r3, #0] return backup_done; } 8028ed6: bd10 pop {r4, pc} 8028ed8: 20000b2d .word 0x20000b2d 8028edc: 20000b3f .word 0x20000b3f 8028ee0: 20000b51 .word 0x20000b51 08028ee4 : bool SYS_RestoreInfo(SYS_t *settings) { if (backup_done) { 8028ee4: 4b09 ldr r3, [pc, #36] ; (8028f0c ) 8028ee6: 781b ldrb r3, [r3, #0] return backup_done; } bool SYS_RestoreInfo(SYS_t *settings) { 8028ee8: b510 push {r4, lr} 8028eea: 4604 mov r4, r0 if (backup_done) { 8028eec: b15b cbz r3, 8028f06 snprintf(settings->mac, MAC_LEN, mac_backup); 8028eee: 2112 movs r1, #18 8028ef0: 4a07 ldr r2, [pc, #28] ; (8028f10 ) 8028ef2: f7fe fedb bl 8027cac snprintf(settings->serial, SER_LEN, serial_backup); 8028ef6: f104 0012 add.w r0, r4, #18 8028efa: 2110 movs r1, #16 8028efc: 4a05 ldr r2, [pc, #20] ; (8028f14 ) 8028efe: f7fe fed5 bl 8027cac return true; 8028f02: 2001 movs r0, #1 8028f04: bd10 pop {r4, pc} } return false; 8028f06: 4618 mov r0, r3 } 8028f08: bd10 pop {r4, pc} 8028f0a: bf00 nop 8028f0c: 20000b51 .word 0x20000b51 8028f10: 20000b2d .word 0x20000b2d 8028f14: 20000b3f .word 0x20000b3f 08028f18 : #endif bool SYS_SetDefault(SYS_t *settings) { 8028f18: b570 push {r4, r5, r6, lr} if (!settings) 8028f1a: 4604 mov r4, r0 8028f1c: b358 cbz r0, 8028f76 return false; #ifdef BACKUP_OLD_SYS /* Try to backup device MAC and serial. */ if (sSettings.CritSecCRC == SETTINGS_GetCritSecCRC()) { 8028f1e: 4d16 ldr r5, [pc, #88] ; (8028f78 ) 8028f20: f8d5 611c ldr.w r6, [r5, #284] ; 0x11c 8028f24: f7ff feea bl 8028cfc 8028f28: 4286 cmp r6, r0 8028f2a: d105 bne.n 8028f38 if (SYS_BackupInfo(sSettings.sInfo.mac, sSettings.sInfo.serialNumber)) { 8028f2c: f105 008c add.w r0, r5, #140 ; 0x8c 8028f30: f105 019e add.w r1, r5, #158 ; 0x9e 8028f34: f7ff ffc0 bl 8028eb8 } } /* Try to restore device MAC and serial. * If not, store defaults */ if (!SYS_RestoreInfo(settings)) { 8028f38: 4620 mov r0, r4 8028f3a: f7ff ffd3 bl 8028ee4 8028f3e: b950 cbnz r0, 8028f56 snprintf(settings->mac, MAC_LEN, SYS_MAC); 8028f40: 2112 movs r1, #18 8028f42: 4a0e ldr r2, [pc, #56] ; (8028f7c ) 8028f44: 4620 mov r0, r4 8028f46: f7fe feb1 bl 8027cac snprintf(settings->serial, SER_LEN, SYS_SERIAL); 8028f4a: f104 0012 add.w r0, r4, #18 8028f4e: 2110 movs r1, #16 8028f50: 4a0b ldr r2, [pc, #44] ; (8028f80 ) 8028f52: f7fe feab bl 8027cac else { DBG printf("Sys info restored!\r\n"); } #endif snprintf(settings->customer, CUST_LEN, SYS_CUSTOMER); 8028f56: 2110 movs r1, #16 8028f58: f104 0022 add.w r0, r4, #34 ; 0x22 8028f5c: 4a09 ldr r2, [pc, #36] ; (8028f84 ) 8028f5e: f7fe fea5 bl 8027cac snprintf(settings->proddate, PROD_LEN, "00.00.00"); 8028f62: f104 0032 add.w r0, r4, #50 ; 0x32 8028f66: 2114 movs r1, #20 8028f68: 4a07 ldr r2, [pc, #28] ; (8028f88 ) 8028f6a: f7fe fe9f bl 8027cac settings->controlword = SETTINGS_CONTROL_WORD; 8028f6e: 4b07 ldr r3, [pc, #28] ; (8028f8c ) return true; 8028f70: 2001 movs r0, #1 } #endif snprintf(settings->customer, CUST_LEN, SYS_CUSTOMER); snprintf(settings->proddate, PROD_LEN, "00.00.00"); settings->controlword = SETTINGS_CONTROL_WORD; 8028f72: 64a3 str r3, [r4, #72] ; 0x48 return true; 8028f74: bd70 pop {r4, r5, r6, pc} } 8028f76: bd70 pop {r4, r5, r6, pc} 8028f78: 2000d414 .word 0x2000d414 8028f7c: 08039228 .word 0x08039228 8028f80: 0803923a .word 0x0803923a 8028f84: 08039280 .word 0x08039280 8028f88: 08039286 .word 0x08039286 8028f8c: 075bcd15 .word 0x075bcd15 08028f90 : /** * @brief * @retval */ uint32_t SYS_GetCRC(SYS_t *settings) { 8028f90: b510 push {r4, lr} 8028f92: 4604 mov r4, r0 CRC_ResetDR(); 8028f94: f7fc fb4e bl 8025634 return CRC_CalcBlockCRC((uint32_t *)settings, sizeof(*settings)/4 - 1); 8028f98: 4620 mov r0, r4 8028f9a: 2113 movs r1, #19 } 8028f9c: e8bd 4010 ldmia.w sp!, {r4, lr} * @retval */ uint32_t SYS_GetCRC(SYS_t *settings) { CRC_ResetDR(); return CRC_CalcBlockCRC((uint32_t *)settings, sizeof(*settings)/4 - 1); 8028fa0: f7fc bb4e b.w 8025640 08028fa4 : /** * @brief Запись структуры настроек во flash */ bool SYS_Save(SYS_t *settings) { 8028fa4: b510 push {r4, lr} uint32_t crc_user = 0; if (!settings) 8028fa6: 4604 mov r4, r0 8028fa8: b140 cbz r0, 8028fbc return false; crc_user = SYS_GetCRC(settings); 8028faa: f7ff fff1 bl 8028f90 SYS_WriteToFlash((uint8_t*)settings, sizeof(*settings), crc_user); 8028fae: 2150 movs r1, #80 ; 0x50 uint32_t crc_user = 0; if (!settings) return false; crc_user = SYS_GetCRC(settings); 8028fb0: 4602 mov r2, r0 SYS_WriteToFlash((uint8_t*)settings, sizeof(*settings), crc_user); 8028fb2: 4620 mov r0, r4 8028fb4: f000 f834 bl 8029020 return true; 8028fb8: 2001 movs r0, #1 8028fba: bd10 pop {r4, pc} } 8028fbc: bd10 pop {r4, pc} 8028fbe: 0000 movs r0, r0 08028fc0 : /** * @brief Загрузка структуры системных настроек из flash */ bool SYS_Load(SYS_t *settings) { 8028fc0: b538 push {r3, r4, r5, lr} uint32_t loadCRC; // CRC из flash uint32_t newCRC; // CRC загруженной структуры настроек bool need_default = false; if (!settings) 8028fc2: 4604 mov r4, r0 8028fc4: b178 cbz r0, 8028fe6 return false; SYS_ReadFromFlash((uint8_t*)settings, sizeof(*settings), SYS_SECTOR); 8028fc6: 2150 movs r1, #80 ; 0x50 8028fc8: 4a0b ldr r2, [pc, #44] ; (8028ff8 ) 8028fca: f000 f81b bl 8029004 /* Считываем CRC из флеш памяти */ loadCRC = (*(uint32_t*)SYS_CRC_ADDRESS); 8028fce: 4b0b ldr r3, [pc, #44] ; (8028ffc ) /* Рассчитываем CRC для структуры настроек */ newCRC = SYS_GetCRC(settings); 8028fd0: 4620 mov r0, r4 return false; SYS_ReadFromFlash((uint8_t*)settings, sizeof(*settings), SYS_SECTOR); /* Считываем CRC из флеш памяти */ loadCRC = (*(uint32_t*)SYS_CRC_ADDRESS); 8028fd2: 681d ldr r5, [r3, #0] /* Рассчитываем CRC для структуры настроек */ newCRC = SYS_GetCRC(settings); 8028fd4: f7ff ffdc bl 8028f90 /* Если CRC не совпадают нужно прошивать дефолтные настройки */ if (loadCRC != newCRC) 8028fd8: 4285 cmp r5, r0 8028fda: d105 bne.n 8028fe8 DBG printf("Bad system sector CRC. Factory defaults restored.\r\n"); need_default = true; } /* CRC совпала, проверяем контрольное слово если слово не совпадает то это значит, что поплыла структура нстроек, прошиваем дефолт */ else if (settings->controlword != SETTINGS_CONTROL_WORD) 8028fdc: 6ca3 ldr r3, [r4, #72] ; 0x48 8028fde: 4a08 ldr r2, [pc, #32] ; (8029000 ) 8028fe0: 4293 cmp r3, r2 8028fe2: d101 bne.n 8028fe8 8028fe4: e006 b.n 8028ff4 8028fe6: bd38 pop {r3, r4, r5, pc} need_default = true; } /* Прошиваем дефолтные настройки если нужно */ if (need_default) { SYS_SetDefault(settings); 8028fe8: 4620 mov r0, r4 8028fea: f7ff ff95 bl 8028f18 SYS_Save(settings); 8028fee: 4620 mov r0, r4 8028ff0: f7ff ffd8 bl 8028fa4 } return true; 8028ff4: 2001 movs r0, #1 } 8028ff6: bd38 pop {r3, r4, r5, pc} 8028ff8: 08008000 .word 0x08008000 8028ffc: 0800bf9c .word 0x0800bf9c 8029000: 075bcd15 .word 0x075bcd15 08029004 : #endif /** * @brief */ void SYS_ReadFromFlash(uint8_t *data, uint32_t size, uint32_t baseAddress) 8029004: 1851 adds r1, r2, r1 8029006: 1a80 subs r0, r0, r2 { for (uint32_t i = 0; i < size; i++) 8029008: e002 b.n 8029010 *data++ = (*(uint32_t*)baseAddress++); 802900a: 6813 ldr r3, [r2, #0] 802900c: 5483 strb r3, [r0, r2] 802900e: 3201 adds r2, #1 /** * @brief */ void SYS_ReadFromFlash(uint8_t *data, uint32_t size, uint32_t baseAddress) { for (uint32_t i = 0; i < size; i++) 8029010: 428a cmp r2, r1 8029012: d1fa bne.n 802900a *data++ = (*(uint32_t*)baseAddress++); } 8029014: 4770 bx lr 08029016 : */ void SYS_EraseFlashSector(void) { FLASH_Status status; if ((status = FLASH_EraseSector(FLASH_Sector_2, VoltageRange_3)) != FLASH_COMPLETE) { 8029016: 2010 movs r0, #16 8029018: 2102 movs r1, #2 802901a: f7fc bba1 b.w 8025760 802901e: 0000 movs r0, r0 08029020 : /** * @brief */ void SYS_WriteToFlash(uint8_t *data, uint32_t size, uint32_t crc) { 8029020: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} uint32_t baseAddress = SYS_SECTOR; 8029024: 4c1b ldr r4, [pc, #108] ; (8029094 ) /** * @brief */ void SYS_WriteToFlash(uint8_t *data, uint32_t size, uint32_t crc) { 8029026: 468a mov sl, r1 8029028: 4690 mov r8, r2 uint32_t baseAddress = SYS_SECTOR; uint32_t checkCrc = 0; bool fAlarm = 0; FLASH_Status status; uint8_t *pdata = data; 802902a: 4606 mov r6, r0 802902c: 2703 movs r7, #3 for (uint8_t i = 0; i < 3; i++) { fAlarm = 0; FLASH_Unlock(); 802902e: f7fc fb17 bl 8025660 8029032: 4635 mov r5, r6 SYS_EraseFlashSector(); 8029034: f7ff ffef bl 8029016 } /** * @brief */ void SYS_WriteToFlash(uint8_t *data, uint32_t size, uint32_t crc) 8029038: eb04 0b0a add.w fp, r4, sl fAlarm = 0; FLASH_Unlock(); SYS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 802903c: e00a b.n 8029054 if ((status = FLASH_ProgramByte(baseAddress++, *pdata++)) != FLASH_COMPLETE) { 802903e: f815 1b01 ldrb.w r1, [r5], #1 8029042: 4620 mov r0, r4 8029044: f7fc fb52 bl 80256ec 8029048: f104 0901 add.w r9, r4, #1 802904c: 2808 cmp r0, #8 802904e: 462e mov r6, r5 8029050: 464c mov r4, r9 8029052: d102 bne.n 802905a fAlarm = 0; FLASH_Unlock(); SYS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8029054: 455c cmp r4, fp 8029056: 462e mov r6, r5 8029058: d1f1 bne.n 802903e if ((status = FLASH_ProgramByte(baseAddress++, *pdata++)) != FLASH_COMPLETE) { DBG printf("FLASH_ProgramByte error: %d\r\n", status); break; } if ((status = FLASH_ProgramWord((uint32_t)SYS_CRC_ADDRESS, crc)) != FLASH_COMPLETE) { 802905a: 4641 mov r1, r8 802905c: 480e ldr r0, [pc, #56] ; (8029098 ) 802905e: f7fc fb61 bl 8025724 DBG printf("FLASH_ProgramWord error: %d\r\n", status); } FLASH_Lock(); 8029062: f7fc fb0b bl 802567c // /* Считываем что записали */ // SYS_ReadFromFlash((uint8_t*)data, size, SYS_SECTOR); // // checkCrc = SYS_GetCRC(data); checkCrc = SYS_GetCRC((SYS_t *)SYS_SECTOR); 8029066: 480b ldr r0, [pc, #44] ; (8029094 ) 8029068: f7ff ff92 bl 8028f90 /* Проверяем CRC того что было записано */ if (checkCrc == crc) { 802906c: 4540 cmp r0, r8 802906e: d00f beq.n 8029090 8029070: 3f01 subs r7, #1 uint32_t checkCrc = 0; bool fAlarm = 0; FLASH_Status status; uint8_t *pdata = data; for (uint8_t i = 0; i < 3; i++) 8029072: f017 07ff ands.w r7, r7, #255 ; 0xff 8029076: d1da bne.n 802902e This function acts as a special kind of Data Memory Barrier. It completes when all explicit memory accesses before this instruction complete. */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __DSB(void) { __ASM volatile ("dsb"); 8029078: f3bf 8f4f dsb sy //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 802907c: 4a07 ldr r2, [pc, #28] ; (802909c ) 802907e: 4b08 ldr r3, [pc, #32] ; (80290a0 ) 8029080: 68d1 ldr r1, [r2, #12] 8029082: f401 61e0 and.w r1, r1, #1792 ; 0x700 8029086: 430b orrs r3, r1 __STATIC_INLINE void NVIC_SystemReset(void) //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | 8029088: 60d3 str r3, [r2, #12] 802908a: f3bf 8f4f dsb sy 802908e: e7fe b.n 802908e 8029090: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8029094: 08008000 .word 0x08008000 8029098: 0800bf9c .word 0x0800bf9c 802909c: e000ed00 .word 0xe000ed00 80290a0: 05fa0004 .word 0x05fa0004 080290a4 : /** * @brief * @retval */ void WDG_Init(void) { 80290a4: b530 push {r4, r5, lr} // GPIO_InitTypeDef GPIO_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE); RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM13, ENABLE); 80290a6: 2101 movs r1, #1 /** * @brief * @retval */ void WDG_Init(void) { 80290a8: b085 sub sp, #20 // GPIO_InitTypeDef GPIO_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE); RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM13, ENABLE); 80290aa: 2080 movs r0, #128 ; 0x80 80290ac: f7fc fcf2 bl 8025a94 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOE, &GPIO_InitStructure);*/ NVIC_InitStructure.NVIC_IRQChannel = TIM8_UP_TIM13_IRQn; 80290b0: 232c movs r3, #44 ; 0x2c NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x6; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0; 80290b2: 2400 movs r4, #0 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 80290b4: 2501 movs r5, #1 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOE, &GPIO_InitStructure);*/ NVIC_InitStructure.NVIC_IRQChannel = TIM8_UP_TIM13_IRQn; 80290b6: f88d 3000 strb.w r3, [sp] NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x6; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); 80290ba: 4668 mov r0, sp GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_Init(GPIOE, &GPIO_InitStructure);*/ NVIC_InitStructure.NVIC_IRQChannel = TIM8_UP_TIM13_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x6; 80290bc: 2306 movs r3, #6 80290be: f88d 3001 strb.w r3, [sp, #1] NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0; 80290c2: f88d 4002 strb.w r4, [sp, #2] NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 80290c6: f88d 5003 strb.w r5, [sp, #3] NVIC_Init(&NVIC_InitStructure); 80290ca: f7fc fa75 bl 80255b8 __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { if(IRQn < 0) { SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M System Interrupts */ else { NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */ 80290ce: 4b0f ldr r3, [pc, #60] ; (802910c ) 80290d0: 2220 movs r2, #32 80290d2: f883 232c strb.w r2, [r3, #812] ; 0x32c /* APB1 Timer clock is 60Mhz, configure timer clock to 10khz (1 update event per 100 us) */ TIM_TimeBaseStructure.TIM_Prescaler = 6000 - 1; /* Configure timer period to 100ms */ TIM_TimeBaseStructure.TIM_Period = 1000; TIM_TimeBaseStructure.TIM_ClockDivision = 0; 80290d6: f8ad 400c strh.w r4, [sp, #12] TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; 80290da: f8ad 4006 strh.w r4, [sp, #6] TIM_TimeBaseInit(TIM13, &TIM_TimeBaseStructure); 80290de: 4c0c ldr r4, [pc, #48] ; (8029110 ) NVIC_Init(&NVIC_InitStructure); NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 2); /* APB1 Timer clock is 60Mhz, configure timer clock to 10khz (1 update event per 100 us) */ TIM_TimeBaseStructure.TIM_Prescaler = 6000 - 1; 80290e0: f241 736f movw r3, #5999 ; 0x176f 80290e4: f8ad 3004 strh.w r3, [sp, #4] /* Configure timer period to 100ms */ TIM_TimeBaseStructure.TIM_Period = 1000; TIM_TimeBaseStructure.TIM_ClockDivision = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(TIM13, &TIM_TimeBaseStructure); 80290e8: 4620 mov r0, r4 NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 2); /* APB1 Timer clock is 60Mhz, configure timer clock to 10khz (1 update event per 100 us) */ TIM_TimeBaseStructure.TIM_Prescaler = 6000 - 1; /* Configure timer period to 100ms */ TIM_TimeBaseStructure.TIM_Period = 1000; 80290ea: f44f 737a mov.w r3, #1000 ; 0x3e8 TIM_TimeBaseStructure.TIM_ClockDivision = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(TIM13, &TIM_TimeBaseStructure); 80290ee: a901 add r1, sp, #4 NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 2); /* APB1 Timer clock is 60Mhz, configure timer clock to 10khz (1 update event per 100 us) */ TIM_TimeBaseStructure.TIM_Prescaler = 6000 - 1; /* Configure timer period to 100ms */ TIM_TimeBaseStructure.TIM_Period = 1000; 80290f0: 9302 str r3, [sp, #8] TIM_TimeBaseStructure.TIM_ClockDivision = 0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; TIM_TimeBaseInit(TIM13, &TIM_TimeBaseStructure); 80290f2: f7fc fed5 bl 8025ea0 TIM_Cmd(TIM13, ENABLE); 80290f6: 4620 mov r0, r4 80290f8: 4629 mov r1, r5 80290fa: f7fc ff0f bl 8025f1c TIM_ITConfig(TIM13, TIM_IT_Update, ENABLE); 80290fe: 4620 mov r0, r4 8029100: 4629 mov r1, r5 8029102: 462a mov r2, r5 8029104: f7fc ff16 bl 8025f34 } 8029108: b005 add sp, #20 802910a: bd30 pop {r4, r5, pc} 802910c: e000e100 .word 0xe000e100 8029110: 40001c00 .word 0x40001c00 08029114 : /** * @brief Дергаем пином (сброс внешнего WDT) * @retval */ void TIM8_UP_TIM13_IRQHandler(void) { 8029114: b508 push {r3, lr} TIM_ClearITPendingBit(TIM13, TIM_IT_Update); 8029116: 4804 ldr r0, [pc, #16] ; (8029128 ) 8029118: 2101 movs r1, #1 802911a: f7fc ff14 bl 8025f46 gpio_invert_output(_WDG); 802911e: 2012 movs r0, #18 } 8029120: e8bd 4008 ldmia.w sp!, {r3, lr} * @retval */ void TIM8_UP_TIM13_IRQHandler(void) { TIM_ClearITPendingBit(TIM13, TIM_IT_Update); gpio_invert_output(_WDG); 8029124: f7fd b976 b.w 8026414 8029128: 40001c00 .word 0x40001c00 0802912c : /** * @brief */ void LED_On(gpio_t pin) { gpio_set(pin, 1); 802912c: 2101 movs r1, #1 802912e: f7fd b8dd b.w 80262ec 08029132 : /** * @brief */ void LED_Off(gpio_t pin) { gpio_set(pin, 0); 8029132: 2100 movs r1, #0 8029134: f7fd b8da b.w 80262ec 08029138 : /** * @brief * @retval */ void LED_Init(void) { 8029138: b508 push {r3, lr} LED_Off(LED_INIT_R); 802913a: 200b movs r0, #11 802913c: f7ff fff9 bl 8029132 LED_Off(LED_INIT_G); 8029140: 200c movs r0, #12 8029142: f7ff fff6 bl 8029132 LED_Off(LED_MAJOR_R); 8029146: 200d movs r0, #13 8029148: f7ff fff3 bl 8029132 LED_Off(LED_MINOR_G); 802914c: 200e movs r0, #14 802914e: f7ff fff0 bl 8029132 LED_Off(LED_MINOR_R); 8029152: 200f movs r0, #15 } 8029154: e8bd 4008 ldmia.w sp!, {r3, lr} { LED_Off(LED_INIT_R); LED_Off(LED_INIT_G); LED_Off(LED_MAJOR_R); LED_Off(LED_MINOR_G); LED_Off(LED_MINOR_R); 8029158: f7ff bfeb b.w 8029132 0802915c : /** * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { 802915c: b570 push {r4, r5, r6, lr} uint8_t start_status = 0; uint8_t start_status_old = 0; start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 802915e: 4e0e ldr r6, [pc, #56] ; (8029198 ) LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 8029160: 4d0e ldr r5, [pc, #56] ; (802919c ) * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { uint8_t start_status = 0; uint8_t start_status_old = 0; 8029162: 2300 movs r3, #0 start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8029164: 7cf4 ldrb r4, [r6, #19] /* Просто отражает состояние контроллера - "живой" */ if((UPS.Status >> 7) & 0x01){ 8029166: 09e4 lsrs r4, r4, #7 8029168: d009 beq.n 802917e if(start_status_old != start_status) 802916a: 42a3 cmp r3, r4 802916c: d002 beq.n 8029174 LED_Off(LED_INIT_G); 802916e: 200c movs r0, #12 8029170: f7ff ffdf bl 8029132 /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8029174: 200c movs r0, #12 8029176: f7fd f94d bl 8026414 802917a: 200b movs r0, #11 802917c: e005 b.n 802918a LED_Off(LED_INIT_G); LED_Toggle(LED_INIT_G); LED_Toggle(LED_INIT_R); } else{ if(start_status_old != start_status) 802917e: 42a3 cmp r3, r4 8029180: d002 beq.n 8029188 LED_Off(LED_INIT_R); 8029182: 200b movs r0, #11 8029184: f7ff ffd5 bl 8029132 /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8029188: 200c movs r0, #12 802918a: f7fd f943 bl 8026414 LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 802918e: 8828 ldrh r0, [r5, #0] 8029190: f002 fc8e bl 802bab0 uint8_t start_status = 0; uint8_t start_status_old = 0; start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8029194: 4623 mov r3, r4 LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); } 8029196: e7e5 b.n 8029164 8029198: 2000d7d8 .word 0x2000d7d8 802919c: 20000670 .word 0x20000670 080291a0 : /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 80291a0: f7fd b938 b.w 8026414 080291a4 : /** * @brief */ void LED_SetStatusLedFreq(uint16_t freq) { statusLedFreq = freq; 80291a4: 4b01 ldr r3, [pc, #4] ; (80291ac ) 80291a6: 8018 strh r0, [r3, #0] 80291a8: 4770 bx lr 80291aa: bf00 nop 80291ac: 20000670 .word 0x20000670 080291b0 : /** * @brief Заглушка */ void BUTTON_VoidHandler(void) { 80291b0: 4770 bx lr 80291b2: 0000 movs r0, r0 080291b4 : /** * @brief Хендлер кнопки DEFAULT. Сброс всех настроек, сохранение и перезагрузка */ void BUTTON_DEF_DownHandler(void) { 80291b4: b508 push {r3, lr} //taskENTER_CRITICAL(); SNMP_SendUserTrap(DEVICE_RESTORED); 80291b6: 2003 movs r0, #3 80291b8: f00e fd92 bl 8037ce0 log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); 80291bc: 4909 ldr r1, [pc, #36] ; (80291e4 ) 80291be: 2001 movs r0, #1 80291c0: f001 f850 bl 802a264 vTaskDelay(500); 80291c4: f44f 70fa mov.w r0, #500 ; 0x1f4 80291c8: f002 fc72 bl 802bab0 SETTINGS_SetDefaultDebug(); 80291cc: f7ff fdb2 bl 8028d34 SETTINGS_Save(); 80291d0: f7ff fda0 bl 8028d14 vTaskDelay(1010); 80291d4: f240 30f2 movw r0, #1010 ; 0x3f2 80291d8: f002 fc6a bl 802bab0 Reboot(); //taskEXIT_CRITICAL(); } 80291dc: e8bd 4008 ldmia.w sp!, {r3, lr} vTaskDelay(500); SETTINGS_SetDefaultDebug(); SETTINGS_Save(); vTaskDelay(1010); Reboot(); 80291e0: f000 bb46 b.w 8029870 80291e4: 0803928f .word 0x0803928f 080291e8 : /** * @brief Возвращает сотояние ключа */ BUTTON_STATE_t BUTTON_GetState(BUTTON_NO_FIX_t *button) { return (BUTTON_STATE_t)gpio_get(button->id_pin); 80291e8: 7800 ldrb r0, [r0, #0] 80291ea: f7fd b923 b.w 8026434 80291ee: 0000 movs r0, r0 080291f0 : /** * @brief * @retval */ void BUTTON_Init(void) { 80291f0: b510 push {r4, lr} defButton.id_pin = KEY_DEF; 80291f2: 4c09 ldr r4, [pc, #36] ; (8029218 ) 80291f4: 2311 movs r3, #17 80291f6: 7023 strb r3, [r4, #0] defButton.timeDelay = 5; 80291f8: 2305 movs r3, #5 80291fa: 8063 strh r3, [r4, #2] defButton.pressHandler = BUTTON_VoidHandler; 80291fc: 4b07 ldr r3, [pc, #28] ; (802921c ) 80291fe: 60a3 str r3, [r4, #8] defButton.unpressHandler = BUTTON_DEF_DownHandler; 8029200: 4b07 ldr r3, [pc, #28] ; (8029220 ) defButton.counterActivation = 0; defButton.timeActivation = 40; 8029202: 2228 movs r2, #40 ; 0x28 void BUTTON_Init(void) { defButton.id_pin = KEY_DEF; defButton.timeDelay = 5; defButton.pressHandler = BUTTON_VoidHandler; defButton.unpressHandler = BUTTON_DEF_DownHandler; 8029204: 60e3 str r3, [r4, #12] defButton.counterActivation = 0; defButton.timeActivation = 40; defButton.fActivation = false; defButton.stateOld = BUTTON_GetState(&defButton); 8029206: 4620 mov r0, r4 { defButton.id_pin = KEY_DEF; defButton.timeDelay = 5; defButton.pressHandler = BUTTON_VoidHandler; defButton.unpressHandler = BUTTON_DEF_DownHandler; defButton.counterActivation = 0; 8029208: 2300 movs r3, #0 802920a: 6163 str r3, [r4, #20] defButton.timeActivation = 40; 802920c: 8322 strh r2, [r4, #24] defButton.fActivation = false; 802920e: 76a3 strb r3, [r4, #26] defButton.stateOld = BUTTON_GetState(&defButton); 8029210: f7ff ffea bl 80291e8 8029214: 71a0 strb r0, [r4, #6] 8029216: bd10 pop {r4, pc} 8029218: 2000d7bc .word 0x2000d7bc 802921c: 080291b1 .word 0x080291b1 8029220: 080291b5 .word 0x080291b5 08029224 : время нажатия. * @param *button: указатель на структуру типа BUTTON_NO_FIX * @retval нет */ void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { 8029224: b510 push {r4, lr} 8029226: 4604 mov r4, r0 /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки 8029228: 7800 ldrb r0, [r0, #0] 802922a: f7fd f903 bl 8026434 802922e: 6963 ldr r3, [r4, #20] 8029230: b950 cbnz r0, 8029248 { button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8029232: 8b22 ldrh r2, [r4, #24] { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; button->fActivation = false; 8029234: 76a0 strb r0, [r4, #26] void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 8029236: 3301 adds r3, #1 button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8029238: 4293 cmp r3, r2 void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 802923a: 6163 str r3, [r4, #20] button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 802923c: d914 bls.n 8029268 LED_SetStatusLedFreq(100); 802923e: 2064 movs r0, #100 ; 0x64 } else button->counterActivation = 0; } } 8029240: e8bd 4010 ldmia.w sp!, {r4, lr} button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) LED_SetStatusLedFreq(100); 8029244: f7ff bfae b.w 80291a4 } /* Кнопку отжата. Если до этого она была нажата нужное время - вызываем хендлер */ else { if ((button->counterActivation > button->timeActivation) 8029248: 8b22 ldrh r2, [r4, #24] 802924a: 4293 cmp r3, r2 802924c: d90a bls.n 8029264 && button->fActivation == false) 802924e: 7ea3 ldrb r3, [r4, #26] 8029250: b943 cbnz r3, 8029264 { button->fActivation = true; 8029252: 2301 movs r3, #1 8029254: 76a3 strb r3, [r4, #26] LED_SetStatusLedFreq(1000); 8029256: f44f 707a mov.w r0, #1000 ; 0x3e8 802925a: f7ff ffa3 bl 80291a4 button->unpressHandler(); 802925e: 68e3 ldr r3, [r4, #12] 8029260: 4798 blx r3 8029262: bd10 pop {r4, pc} } else button->counterActivation = 0; 8029264: 2300 movs r3, #0 8029266: 6163 str r3, [r4, #20] 8029268: bd10 pop {r4, pc} 802926a: 0000 movs r0, r0 0802926c : /** * @brief Опрос кнопок */ void vTaskButtons(void *pvParameters) { 802926c: b508 push {r3, lr} for (;;) { BUTTON_DellayHandler(&defButton); 802926e: 4803 ldr r0, [pc, #12] ; (802927c ) 8029270: f7ff ffd8 bl 8029224 vTaskDelay(100); //20 8029274: 2064 movs r0, #100 ; 0x64 8029276: f002 fc1b bl 802bab0 802927a: e7f8 b.n 802926e 802927c: 2000d7bc .word 0x2000d7bc 08029280 : #include #include "gpio.h" bool set_mode_jumper(void) { return gpio_get(MODE_JUMPER); 8029280: 2010 movs r0, #16 8029282: f7fd b8d7 b.w 8026434 08029286 : /* data actuality mutexes */ static SemaphoreHandle_t outputs_mutex, inputs_mutex; uint8_t get_state_din_outs(gpio_t pin) { uint8_t res = 0; res = gpio_get(pin); 8029286: f7fd b8d5 b.w 8026434 0802928a : return res; } void set_state_douts(gpio_t pin, uint8_t value) { gpio_set(pin, value); 802928a: 3100 adds r1, #0 802928c: bf18 it ne 802928e: 2101 movne r1, #1 8029290: f7fd b82c b.w 80262ec 08029294 : extern bool flUpdateLog; void init_UPS_value(void) { 8029294: b538 push {r3, r4, r5, lr} UPS.Freq_in = 0; 8029296: 4c10 ldr r4, [pc, #64] ; (80292d8 ) UPS.VAC_in = 0; UPS.VAC_out = 0; UPS.Temp = 0; UPS.Load = 0; 8029298: 2500 movs r5, #0 extern bool flUpdateLog; void init_UPS_value(void) { UPS.Freq_in = 0; 802929a: 2300 movs r3, #0 UPS.Alarm = 0; UPS.cnt_err_ups = 0; UPS.Flag_Present = false; UPS.Present = false; memset(UPS.model, 0, 11); 802929c: 4629 mov r1, r5 802929e: 220b movs r2, #11 80292a0: f104 0015 add.w r0, r4, #21 extern bool flUpdateLog; void init_UPS_value(void) { UPS.Freq_in = 0; 80292a4: 6023 str r3, [r4, #0] UPS.VAC_in = 0; 80292a6: 6063 str r3, [r4, #4] UPS.VAC_out = 0; 80292a8: 60a3 str r3, [r4, #8] UPS.Temp = 0; 80292aa: 60e3 str r3, [r4, #12] UPS.Load = 0; 80292ac: 7425 strb r5, [r4, #16] UPS.SOC = 0; 80292ae: 7465 strb r5, [r4, #17] UPS.work_time = 0; 80292b0: 74a5 strb r5, [r4, #18] UPS.Status = 0; 80292b2: 74e5 strb r5, [r4, #19] UPS.Alarm = 0; 80292b4: 7525 strb r5, [r4, #20] UPS.cnt_err_ups = 0; 80292b6: f884 502c strb.w r5, [r4, #44] ; 0x2c UPS.Flag_Present = false; 80292ba: f884 502e strb.w r5, [r4, #46] ; 0x2e UPS.Present = false; 80292be: f884 502d strb.w r5, [r4, #45] ; 0x2d memset(UPS.model, 0, 11); 80292c2: f7f8 fda9 bl 8021e18 memset(UPS.vertion, 0, 11); 80292c6: f104 0020 add.w r0, r4, #32 80292ca: 4629 mov r1, r5 80292cc: 220b movs r2, #11 } 80292ce: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} UPS.cnt_err_ups = 0; UPS.Flag_Present = false; UPS.Present = false; memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); 80292d2: f7f8 bda1 b.w 8021e18 80292d6: bf00 nop 80292d8: 2000d7d8 .word 0x2000d7d8 080292dc : } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 80292dc: b530 push {r4, r5, lr} if(command == ups_test_time){ 80292de: 2803 cmp r0, #3 memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 80292e0: b087 sub sp, #28 80292e2: 4d36 ldr r5, [pc, #216] ; (80293bc ) if(command == ups_test_time){ 80292e4: d10c bne.n 8029300 uint8_t req[10]; memset(req, 0, 10); 80292e6: 2100 movs r1, #0 80292e8: 220a movs r2, #10 80292ea: a803 add r0, sp, #12 80292ec: f7f8 fd94 bl 8021e18 sprintf(req, "%s%d\r", MegaTecCMD[command], TimeParam); 80292f0: 4b33 ldr r3, [pc, #204] ; (80293c0 ) 80292f2: 4934 ldr r1, [pc, #208] ; (80293c4 ) 80292f4: 68ea ldr r2, [r5, #12] 80292f6: 881b ldrh r3, [r3, #0] 80292f8: a803 add r0, sp, #12 80292fa: f7fe fcf5 bl 8027ce8 80292fe: e037 b.n 8029370 ups_send_block(req, strlen(req)); } else if(command == ups_shutdown){ 8029300: 2805 cmp r0, #5 8029302: d13b bne.n 802937c uint8_t req[10]; memset(req, 0, 10); 8029304: 2100 movs r1, #0 8029306: a803 add r0, sp, #12 8029308: 220a movs r2, #10 802930a: f7f8 fd85 bl 8021e18 if(TimeParamFloat >= 1 && TimeParamFloat < 10) 802930e: 4b2e ldr r3, [pc, #184] ; (80293c8 ) 8029310: 681c ldr r4, [r3, #0] 8029312: f04f 517e mov.w r1, #1065353216 ; 0x3f800000 8029316: 4620 mov r0, r4 8029318: f7f7 ff80 bl 802121c <__aeabi_fcmpge> 802931c: b160 cbz r0, 8029338 802931e: 4620 mov r0, r4 8029320: 492a ldr r1, [pc, #168] ; (80293cc ) 8029322: f7f7 ff67 bl 80211f4 <__aeabi_fcmplt> 8029326: b138 cbz r0, 8029338 { sprintf(req, "%s0%f\r", MegaTecCMD[command], TimeParamFloat); 8029328: 4620 mov r0, r4 802932a: f7f7 f931 bl 8020590 <__aeabi_f2d> 802932e: e9cd 0100 strd r0, r1, [sp] 8029332: a803 add r0, sp, #12 8029334: 4926 ldr r1, [pc, #152] ; (80293d0 ) 8029336: e018 b.n 802936a } else if(TimeParamFloat < 1){ 8029338: 4620 mov r0, r4 802933a: f04f 517e mov.w r1, #1065353216 ; 0x3f800000 802933e: f7f7 ff59 bl 80211f4 <__aeabi_fcmplt> 8029342: 4d1e ldr r5, [pc, #120] ; (80293bc ) 8029344: b150 cbz r0, 802935c sprintf(req, "%s.%f\r", MegaTecCMD[command], 10*TimeParamFloat); 8029346: 4921 ldr r1, [pc, #132] ; (80293cc ) 8029348: 4620 mov r0, r4 802934a: f7f7 fdb5 bl 8020eb8 <__aeabi_fmul> 802934e: f7f7 f91f bl 8020590 <__aeabi_f2d> 8029352: e9cd 0100 strd r0, r1, [sp] 8029356: a803 add r0, sp, #12 8029358: 491e ldr r1, [pc, #120] ; (80293d4 ) 802935a: e006 b.n 802936a } else{ sprintf(req, "%s%f\r", MegaTecCMD[command], TimeParamFloat); 802935c: 4620 mov r0, r4 802935e: f7f7 f917 bl 8020590 <__aeabi_f2d> 8029362: e9cd 0100 strd r0, r1, [sp] 8029366: 491c ldr r1, [pc, #112] ; (80293d8 ) 8029368: a803 add r0, sp, #12 802936a: 696a ldr r2, [r5, #20] 802936c: f7fe fcbc bl 8027ce8 } ups_send_block(req, strlen(req)); 8029370: a803 add r0, sp, #12 8029372: f7f8 ff29 bl 80221c8 8029376: b2c1 uxtb r1, r0 8029378: a803 add r0, sp, #12 802937a: e01a b.n 80293b2 } else if(command == ups_shutdown_restore){ 802937c: 2806 cmp r0, #6 802937e: d111 bne.n 80293a4 uint8_t req[10]; memset(req, 0, 10); 8029380: 2100 movs r1, #0 8029382: 220a movs r2, #10 8029384: a803 add r0, sp, #12 8029386: f7f8 fd47 bl 8021e18 sprintf(req, "%s.%d%s%d\r", MegaTecCMD[command-1], TimeParam, MegaTecCMD[command], TimeParam2); 802938a: 69aa ldr r2, [r5, #24] 802938c: 4b0c ldr r3, [pc, #48] ; (80293c0 ) 802938e: 4913 ldr r1, [pc, #76] ; (80293dc ) 8029390: 881b ldrh r3, [r3, #0] 8029392: 9200 str r2, [sp, #0] 8029394: 4a12 ldr r2, [pc, #72] ; (80293e0 ) 8029396: 8812 ldrh r2, [r2, #0] 8029398: a803 add r0, sp, #12 802939a: 9201 str r2, [sp, #4] 802939c: 696a ldr r2, [r5, #20] 802939e: f7fe fca3 bl 8027ce8 80293a2: e7e5 b.n 8029370 ups_send_block(req, strlen(req)); } else{ // TODO ����������� ��������� //ups_send_block(MegaTecCMD[command], strlen(MegaTecCMD[command])); ups_send_block((void*)MegaTecCMD[command], strlen(MegaTecCMD[command])); 80293a4: f855 4020 ldr.w r4, [r5, r0, lsl #2] 80293a8: 4620 mov r0, r4 80293aa: f7f8 ff0d bl 80221c8 80293ae: b2c1 uxtb r1, r0 80293b0: 4620 mov r0, r4 80293b2: f7fd fe79 bl 80270a8 } } 80293b6: b007 add sp, #28 80293b8: bd30 pop {r4, r5, pc} 80293ba: bf00 nop 80293bc: 20000674 .word 0x20000674 80293c0: 20000b8c .word 0x20000b8c 80293c4: 080392c3 .word 0x080392c3 80293c8: 20000b88 .word 0x20000b88 80293cc: 41200000 .word 0x41200000 80293d0: 080392aa .word 0x080392aa 80293d4: 080392b1 .word 0x080392b1 80293d8: 080392b8 .word 0x080392b8 80293dc: 080392be .word 0x080392be 80293e0: 20000b52 .word 0x20000b52 080293e4 : bool ups_megatec_rx_pdu(void) { 80293e4: b510 push {r4, lr} int c = 0; ups_pdu.len = 0; 80293e6: 4c0e ldr r4, [pc, #56] ; (8029420 ) 80293e8: 2000 movs r0, #0 80293ea: 8660 strh r0, [r4, #50] ; 0x32 while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 80293ec: e00d b.n 802940a c = ups_getchar(500);//portMAX_DELAY 80293ee: f44f 70fa mov.w r0, #500 ; 0x1f4 80293f2: f7fd fe7d bl 80270f0 if(c < 0) 80293f6: 2800 cmp r0, #0 80293f8: da03 bge.n 8029402 { ups_pdu.len = 0; 80293fa: 4b09 ldr r3, [pc, #36] ; (8029420 ) 80293fc: 2200 movs r2, #0 80293fe: 865a strh r2, [r3, #50] ; 0x32 break; 8029400: e008 b.n 8029414 } ups_pdu.data[ups_pdu.len++] = c; 8029402: 8e63 ldrh r3, [r4, #50] ; 0x32 8029404: 54e0 strb r0, [r4, r3] 8029406: 3301 adds r3, #1 8029408: 8663 strh r3, [r4, #50] ; 0x32 { int c = 0; ups_pdu.len = 0; while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 802940a: 8e63 ldrh r3, [r4, #50] ; 0x32 802940c: 2b31 cmp r3, #49 ; 0x31 802940e: d801 bhi.n 8029414 8029410: 280d cmp r0, #13 8029412: d1ec bne.n 80293ee break; } ups_pdu.data[ups_pdu.len++] = c; } if (ups_pdu.len == 0) 8029414: 4b02 ldr r3, [pc, #8] ; (8029420 ) 8029416: 8e58 ldrh r0, [r3, #50] ; 0x32 return false; return true; } 8029418: 3000 adds r0, #0 802941a: bf18 it ne 802941c: 2001 movne r0, #1 802941e: bd10 pop {r4, pc} 8029420: 20000b54 .word 0x20000b54 8029424: 00000000 .word 0x00000000 08029428 : void ups_status_response(char *data) { 8029428: e92d 41ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} uint8_t i; char *endValue; char value[10]; uint8_t len = 0; if(data[0] != '(') 802942c: 7803 ldrb r3, [r0, #0] 802942e: 2b28 cmp r3, #40 ; 0x28 return true; } void ups_status_response(char *data) { 8029430: 4604 mov r4, r0 uint8_t i; char *endValue; char value[10]; uint8_t len = 0; if(data[0] != '(') 8029432: f040 80e4 bne.w 80295fe return; UPS.Present = true; 8029436: 4b78 ldr r3, [pc, #480] ; (8029618 ) 8029438: 2201 movs r2, #1 802943a: f883 202d strb.w r2, [r3, #45] ; 0x2d UPS.Flag_Present = true; 802943e: f883 202e strb.w r2, [r3, #46] ; 0x2e UPS.cnt_err_ups = 0; 8029442: 2200 movs r2, #0 8029444: f883 202c strb.w r2, [r3, #44] ; 0x2c if(flUpdateLog){ 8029448: 4b74 ldr r3, [pc, #464] ; (802961c ) 802944a: 7819 ldrb r1, [r3, #0] 802944c: b111 cbz r1, 8029454 flUpdateLog = false; 802944e: 701a strb r2, [r3, #0] log_add(data); 8029450: f000 ff1e bl 802a290 } data++; 8029454: 3401 adds r4, #1 memset(value, 0, 10); 8029456: 220a movs r2, #10 8029458: 2100 movs r1, #0 802945a: a801 add r0, sp, #4 802945c: f7f8 fcdc bl 8021e18 endValue = strpbrk(data," "); 8029460: 4620 mov r0, r4 8029462: 496f ldr r1, [pc, #444] ; (8029620 ) 8029464: f7f8 ff9a bl 802239c len = endValue - data; 8029468: 1b00 subs r0, r0, r4 void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 802946a: b2c6 uxtb r6, r0 data++; memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 802946c: 4632 mov r2, r6 802946e: 4621 mov r1, r4 8029470: a801 add r0, sp, #4 8029472: f7f8 ff61 bl 8022338 data += (len + 1); UPS.VAC_in = atof(value); 8029476: a801 add r0, sp, #4 8029478: f7f8 fbaa bl 8021bd0 802947c: f7f7 fbbe bl 8020bfc <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8029480: 3601 adds r6, #1 8029482: 19a6 adds r6, r4, r6 UPS.VAC_in = atof(value); 8029484: 4c64 ldr r4, [pc, #400] ; (8029618 ) //TODO memset(value, 0, 10); 8029486: 220a movs r2, #10 memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); UPS.VAC_in = atof(value); 8029488: 6060 str r0, [r4, #4] //TODO memset(value, 0, 10); 802948a: 2100 movs r1, #0 802948c: a801 add r0, sp, #4 802948e: f7f8 fcc3 bl 8021e18 endValue = strpbrk(data," "); 8029492: 4630 mov r0, r6 8029494: 4962 ldr r1, [pc, #392] ; (8029620 ) 8029496: f7f8 ff81 bl 802239c len = endValue - data; 802949a: 1b80 subs r0, r0, r6 void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 802949c: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 802949e: 4631 mov r1, r6 80294a0: 462a mov r2, r5 80294a2: a801 add r0, sp, #4 data += (len + 1); 80294a4: 3501 adds r5, #1 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 80294a6: f7f8 ff47 bl 8022338 data += (len + 1); 80294aa: 1975 adds r5, r6, r5 memset(value, 0, 10); 80294ac: 220a movs r2, #10 80294ae: 2100 movs r1, #0 80294b0: a801 add r0, sp, #4 80294b2: f7f8 fcb1 bl 8021e18 endValue = strpbrk(data," "); 80294b6: 4628 mov r0, r5 80294b8: 4959 ldr r1, [pc, #356] ; (8029620 ) 80294ba: f7f8 ff6f bl 802239c len = endValue - data; 80294be: 1b40 subs r0, r0, r5 void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 80294c0: fa5f f880 uxtb.w r8, r0 data += (len + 1); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 80294c4: 4642 mov r2, r8 80294c6: 4629 mov r1, r5 80294c8: a801 add r0, sp, #4 80294ca: f7f8 ff35 bl 8022338 data += (len + 1); UPS.VAC_out = atof(value); 80294ce: a801 add r0, sp, #4 80294d0: f7f8 fb7e bl 8021bd0 80294d4: f7f7 fb92 bl 8020bfc <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 80294d8: f108 0801 add.w r8, r8, #1 80294dc: 44a8 add r8, r5 UPS.VAC_out = atof(value); memset(value, 0, 10); 80294de: 220a movs r2, #10 memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); UPS.VAC_out = atof(value); 80294e0: 60a0 str r0, [r4, #8] memset(value, 0, 10); 80294e2: 2100 movs r1, #0 80294e4: a801 add r0, sp, #4 80294e6: f7f8 fc97 bl 8021e18 endValue = strpbrk(data," "); 80294ea: 494d ldr r1, [pc, #308] ; (8029620 ) 80294ec: 4640 mov r0, r8 80294ee: f7f8 ff55 bl 802239c len = endValue - data; 80294f2: ebc8 0000 rsb r0, r8, r0 void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 80294f6: b2c7 uxtb r7, r0 UPS.VAC_out = atof(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 80294f8: 463a mov r2, r7 80294fa: 4641 mov r1, r8 80294fc: a801 add r0, sp, #4 80294fe: f7f8 ff1b bl 8022338 data += (len + 1); UPS.Load = atoi(value); 8029502: a801 add r0, sp, #4 8029504: f7f8 fb68 bl 8021bd8 memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8029508: 3701 adds r7, #1 802950a: 4447 add r7, r8 UPS.Load = atoi(value); memset(value, 0, 10); 802950c: 220a movs r2, #10 memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); UPS.Load = atoi(value); 802950e: 7420 strb r0, [r4, #16] memset(value, 0, 10); 8029510: 2100 movs r1, #0 8029512: a801 add r0, sp, #4 8029514: f7f8 fc80 bl 8021e18 endValue = strpbrk(data," "); 8029518: 4941 ldr r1, [pc, #260] ; (8029620 ) 802951a: 4638 mov r0, r7 802951c: f7f8 ff3e bl 802239c len = endValue - data; 8029520: 1bc0 subs r0, r0, r7 void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8029522: b2c6 uxtb r6, r0 UPS.Load = atoi(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8029524: 4632 mov r2, r6 8029526: 4639 mov r1, r7 8029528: a801 add r0, sp, #4 802952a: f7f8 ff05 bl 8022338 data += (len + 1); UPS.Freq_in = atof(value); 802952e: a801 add r0, sp, #4 8029530: f7f8 fb4e bl 8021bd0 8029534: f7f7 fb62 bl 8020bfc <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8029538: 3601 adds r6, #1 802953a: 19be adds r6, r7, r6 UPS.Freq_in = atof(value); 802953c: 6020 str r0, [r4, #0] //TODO memset(value, 0, 10); 802953e: 220a movs r2, #10 8029540: 2100 movs r1, #0 8029542: a801 add r0, sp, #4 8029544: f7f8 fc68 bl 8021e18 endValue = strpbrk(data," "); 8029548: 4630 mov r0, r6 802954a: 4935 ldr r1, [pc, #212] ; (8029620 ) 802954c: f7f8 ff26 bl 802239c len = endValue - data; 8029550: 1b80 subs r0, r0, r6 void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8029552: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8029554: 462a mov r2, r5 8029556: 4631 mov r1, r6 8029558: a801 add r0, sp, #4 802955a: f7f8 feed bl 8022338 data += (len + 1); UPS.SOC = 100*((atof(value)) - 1.6)/0.7; 802955e: a801 add r0, sp, #4 8029560: f7f8 fb36 bl 8021bd0 8029564: a328 add r3, pc, #160 ; (adr r3, 8029608 ) 8029566: e9d3 2300 ldrd r2, r3, [r3] 802956a: f7f6 feb1 bl 80202d0 <__aeabi_dsub> 802956e: 2200 movs r2, #0 8029570: 4b2c ldr r3, [pc, #176] ; (8029624 ) 8029572: f7f7 f861 bl 8020638 <__aeabi_dmul> 8029576: a326 add r3, pc, #152 ; (adr r3, 8029610 ) 8029578: e9d3 2300 ldrd r2, r3, [r3] 802957c: f7f7 f986 bl 802088c <__aeabi_ddiv> 8029580: f7f7 fb1c bl 8020bbc <__aeabi_d2uiz> //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8029584: 3501 adds r5, #1 8029586: 1975 adds r5, r6, r5 UPS.SOC = 100*((atof(value)) - 1.6)/0.7; 8029588: 7460 strb r0, [r4, #17] memset(value, 0, 10); 802958a: 220a movs r2, #10 802958c: 2100 movs r1, #0 802958e: a801 add r0, sp, #4 8029590: f7f8 fc42 bl 8021e18 endValue = strpbrk(data," "); 8029594: 4628 mov r0, r5 8029596: 4922 ldr r1, [pc, #136] ; (8029620 ) 8029598: f7f8 ff00 bl 802239c len = endValue - data; 802959c: 1b40 subs r0, r0, r5 void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 802959e: b2c6 uxtb r6, r0 UPS.SOC = 100*((atof(value)) - 1.6)/0.7; memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 80295a0: 4632 mov r2, r6 80295a2: 4629 mov r1, r5 80295a4: a801 add r0, sp, #4 80295a6: f7f8 fec7 bl 8022338 data += (len + 1); UPS.Temp = atof(value); 80295aa: a801 add r0, sp, #4 80295ac: f7f8 fb10 bl 8021bd0 80295b0: f7f7 fb24 bl 8020bfc <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 80295b4: 3601 adds r6, #1 80295b6: 19ad adds r5, r5, r6 UPS.Temp = atof(value); 80295b8: 60e0 str r0, [r4, #12] memset(value, 0, 10); 80295ba: 220a movs r2, #10 80295bc: 2100 movs r1, #0 80295be: a801 add r0, sp, #4 80295c0: f7f8 fc2a bl 8021e18 endValue = strpbrk(data,"\r"); 80295c4: 4918 ldr r1, [pc, #96] ; (8029628 ) 80295c6: 4628 mov r0, r5 80295c8: f7f8 fee8 bl 802239c len = endValue - data; 80295cc: 1b40 subs r0, r0, r5 80295ce: b2c4 uxtb r4, r0 strncpy(value, data, len); 80295d0: 4629 mov r1, r5 80295d2: a801 add r0, sp, #4 80295d4: 4622 mov r2, r4 80295d6: f7f8 feaf bl 8022338 uint8_t stat = 0; for(i = 0; i < len; i ++) 80295da: 2300 movs r3, #0 memset(value, 0, 10); endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(value, data, len); uint8_t stat = 0; 80295dc: 4619 mov r1, r3 for(i = 0; i < len; i ++) 80295de: e009 b.n 80295f4 { stat |= (value[i] - 0x30) << (7-i); 80295e0: aa01 add r2, sp, #4 return false; return true; } void ups_status_response(char *data) 80295e2: f1c3 0007 rsb r0, r3, #7 len = endValue - data; strncpy(value, data, len); uint8_t stat = 0; for(i = 0; i < len; i ++) { stat |= (value[i] - 0x30) << (7-i); 80295e6: 5c9a ldrb r2, [r3, r2] 80295e8: 3a30 subs r2, #48 ; 0x30 80295ea: fa02 f200 lsl.w r2, r2, r0 80295ee: 4311 orrs r1, r2 80295f0: b2c9 uxtb r1, r1 80295f2: 3301 adds r3, #1 memset(value, 0, 10); endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(value, data, len); uint8_t stat = 0; for(i = 0; i < len; i ++) 80295f4: b2da uxtb r2, r3 80295f6: 42a2 cmp r2, r4 80295f8: d3f2 bcc.n 80295e0 { stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; 80295fa: 4b07 ldr r3, [pc, #28] ; (8029618 ) 80295fc: 74d9 strb r1, [r3, #19] } 80295fe: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 8029602: bf00 nop 8029604: f3af 8000 nop.w 8029608: 9999999a .word 0x9999999a 802960c: 3ff99999 .word 0x3ff99999 8029610: 66666666 .word 0x66666666 8029614: 3fe66666 .word 0x3fe66666 8029618: 2000d7d8 .word 0x2000d7d8 802961c: 20000bfc .word 0x20000bfc 8029620: 080392c9 .word 0x080392c9 8029624: 40590000 .word 0x40590000 8029628: 08045251 .word 0x08045251 802962c: f3af 8000 nop.w 08029630 : void ups_info_response(char *data) { 8029630: b510 push {r4, lr} uint8_t i = 0; if(data[0] != '#') 8029632: 7803 ldrb r3, [r0, #0] 8029634: 2b23 cmp r3, #35 ; 0x23 8029636: d137 bne.n 80296a8 return; UPS.Present = true; 8029638: 4b1c ldr r3, [pc, #112] ; (80296ac ) 802963a: 2201 movs r2, #1 802963c: f883 202d strb.w r2, [r3, #45] ; 0x2d UPS.Flag_Present = true; 8029640: f883 202e strb.w r2, [r3, #46] ; 0x2e UPS.cnt_err_ups = 0; data++; data += 16; 8029644: 3011 adds r0, #17 if(data[0] != '#') return; UPS.Present = true; UPS.Flag_Present = true; UPS.cnt_err_ups = 0; 8029646: 2200 movs r2, #0 8029648: f883 202c strb.w r2, [r3, #44] ; 0x2c data++; data += 16; while(data[0] == ' '){ 802964c: 4603 mov r3, r0 802964e: 461c mov r4, r3 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8029650: 1a1a subs r2, r3, r0 data++; data += 16; while(data[0] == ' '){ 8029652: 7821 ldrb r1, [r4, #0] 8029654: 3301 adds r3, #1 8029656: 2920 cmp r1, #32 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8029658: b2d2 uxtb r2, r2 data++; data += 16; while(data[0] == ' '){ 802965a: d0f8 beq.n 802964e 802965c: 4813 ldr r0, [pc, #76] ; (80296ac ) data ++; i ++; } if(i < 15){ 802965e: 2a0e cmp r2, #14 /*endValue = strpbrk(data," "); len = endValue - data;*/ if(UPS.model[0] == 0){ 8029660: 7d43 ldrb r3, [r0, #21] strncpy(UPS.model, data, 10); 8029662: f100 0015 add.w r0, r0, #21 while(data[0] == ' '){ data ++; i ++; } if(i < 15){ 8029666: d808 bhi.n 802967a /*endValue = strpbrk(data," "); len = endValue - data;*/ if(UPS.model[0] == 0){ strncpy(UPS.model, data, 10); 8029668: 4621 mov r1, r4 802966a: 220a movs r2, #10 i ++; } if(i < 15){ /*endValue = strpbrk(data," "); len = endValue - data;*/ if(UPS.model[0] == 0){ 802966c: b913 cbnz r3, 8029674 strncpy(UPS.model, data, 10); 802966e: f7f8 fe63 bl 8022338 8029672: e006 b.n 8029682 SNMP_SetObjDescr(); } else{ strncpy(UPS.model, data, 10); 8029674: f7f8 fe60 bl 8022338 8029678: e008 b.n 802968c data += 11; } else { if(UPS.model[0] == 0){ strcpy(UPS.model, "RTMP II"); 802967a: 490d ldr r1, [pc, #52] ; (80296b0 ) data += 11; } else { if(UPS.model[0] == 0){ 802967c: b923 cbnz r3, 8029688 strcpy(UPS.model, "RTMP II"); 802967e: f7f8 fd45 bl 802210c SNMP_SetObjDescr(); 8029682: f00e fb4d bl 8037d20 8029686: e001 b.n 802968c } else{ strcpy(UPS.model, "RTMP II"); 8029688: f7f8 fd40 bl 802210c } data += 11; 802968c: 340b adds r4, #11 } strncpy(UPS.serial, data, 8); 802968e: 4621 mov r1, r4 8029690: 2208 movs r2, #8 8029692: 4808 ldr r0, [pc, #32] ; (80296b4 ) 8029694: f7f8 fe50 bl 8022338 data += 8; strncpy(UPS.vertion, data, 2); 8029698: 4807 ldr r0, [pc, #28] ; (80296b8 ) 802969a: f104 0108 add.w r1, r4, #8 802969e: 2202 movs r2, #2 } 80296a0: e8bd 4010 ldmia.w sp!, {r4, lr} } strncpy(UPS.serial, data, 8); data += 8; strncpy(UPS.vertion, data, 2); 80296a4: f7f8 be48 b.w 8022338 80296a8: bd10 pop {r4, pc} 80296aa: bf00 nop 80296ac: 2000d7d8 .word 0x2000d7d8 80296b0: 080392cb .word 0x080392cb 80296b4: 2000d7fb .word 0x2000d7fb 80296b8: 2000d7f8 .word 0x2000d7f8 080296bc : } void ups_remain_time_response(char *data) { 80296bc: b530 push {r4, r5, lr} char value[10]; if(data[0] != '(') 80296be: 7803 ldrb r3, [r0, #0] 80296c0: 2b28 cmp r3, #40 ; 0x28 strncpy(UPS.vertion, data, 2); } void ups_remain_time_response(char *data) { 80296c2: b085 sub sp, #20 80296c4: 4605 mov r5, r0 char value[10]; if(data[0] != '(') 80296c6: d11b bne.n 8029700 return; UPS.Present = true; 80296c8: 4c0e ldr r4, [pc, #56] ; (8029704 ) 80296ca: 2301 movs r3, #1 UPS.Flag_Present = true; UPS.cnt_err_ups = 0; 80296cc: 2100 movs r1, #0 data++; memset(value, 0, 10); 80296ce: 220a movs r2, #10 80296d0: a801 add r0, sp, #4 { char value[10]; if(data[0] != '(') return; UPS.Present = true; 80296d2: f884 302d strb.w r3, [r4, #45] ; 0x2d UPS.Flag_Present = true; 80296d6: f884 302e strb.w r3, [r4, #46] ; 0x2e UPS.cnt_err_ups = 0; 80296da: f884 102c strb.w r1, [r4, #44] ; 0x2c data++; memset(value, 0, 10); 80296de: f7f8 fb9b bl 8021e18 strcpy(value, data); 80296e2: 1c69 adds r1, r5, #1 80296e4: a801 add r0, sp, #4 80296e6: f7f8 fd11 bl 802210c if((UPS.Status >> 7) & 0x01) 80296ea: 7ce3 ldrb r3, [r4, #19] 80296ec: 09db lsrs r3, r3, #7 80296ee: d006 beq.n 80296fe UPS.work_time = atof(value); 80296f0: a801 add r0, sp, #4 80296f2: f7f8 fa6d bl 8021bd0 80296f6: f7f7 fa61 bl 8020bbc <__aeabi_d2uiz> 80296fa: 74a0 strb r0, [r4, #18] 80296fc: e000 b.n 8029700 else UPS.work_time = 0; 80296fe: 74a3 strb r3, [r4, #18] } 8029700: b005 add sp, #20 8029702: bd30 pop {r4, r5, pc} 8029704: 2000d7d8 .word 0x2000d7d8 08029708 : } // TODO ����������� ��������� //void request_task(void) void request_task(void* params) { 8029708: b570 push {r4, r5, r6, lr} for(;;) { if(UPS.Present == true){ 802970a: 4c2e ldr r4, [pc, #184] ; (80297c4 ) //memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } } } if(megatec_send){ 802970c: 4d2e ldr r5, [pc, #184] ; (80297c8 ) if(UPS.Flag_Present == false) { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; 802970e: 2600 movs r6, #0 void request_task(void* params) { for(;;) { if(UPS.Present == true){ 8029710: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8029714: b1cb cbz r3, 802974a if(UPS.Flag_Present == false) 8029716: f894 102e ldrb.w r1, [r4, #46] ; 0x2e 802971a: b9b1 cbnz r1, 802974a { if(UPS.cnt_err_ups != 2) 802971c: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 8029720: 2b02 cmp r3, #2 8029722: d003 beq.n 802972c UPS.cnt_err_ups++; 8029724: 3301 adds r3, #1 8029726: f884 302c strb.w r3, [r4, #44] ; 0x2c 802972a: e00e b.n 802974a UPS.Status = 0; UPS.Alarm = 0; UPS.Present = false; //memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); 802972c: 4827 ldr r0, [pc, #156] ; (80297cc ) if(UPS.Flag_Present == false) { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; 802972e: 6026 str r6, [r4, #0] UPS.Status = 0; UPS.Alarm = 0; UPS.Present = false; //memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); 8029730: 220b movs r2, #11 { if(UPS.cnt_err_ups != 2) UPS.cnt_err_ups++; else{ UPS.Freq_in = 0; UPS.VAC_in = 0; 8029732: 6066 str r6, [r4, #4] UPS.VAC_out = 0; 8029734: 60a6 str r6, [r4, #8] UPS.Temp = 0; 8029736: 60e6 str r6, [r4, #12] UPS.Load = 0; 8029738: 7421 strb r1, [r4, #16] UPS.SOC = 0; 802973a: 7461 strb r1, [r4, #17] UPS.work_time = 0; 802973c: 74a1 strb r1, [r4, #18] UPS.Status = 0; 802973e: 74e1 strb r1, [r4, #19] UPS.Alarm = 0; 8029740: 7521 strb r1, [r4, #20] UPS.Present = false; 8029742: f884 102d strb.w r1, [r4, #45] ; 0x2d //memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); 8029746: f7f8 fb67 bl 8021e18 } } } if(megatec_send){ 802974a: 782b ldrb r3, [r5, #0] 802974c: b16b cbz r3, 802976a megatec_send= false; 802974e: 2000 movs r0, #0 8029750: 7028 strb r0, [r5, #0] UPS.Flag_Present = false; 8029752: f884 002e strb.w r0, [r4, #46] ; 0x2e send_MegaTec_cmd(ups_status_req); 8029756: f7ff fdc1 bl 80292dc if (ups_megatec_rx_pdu()) 802975a: f7ff fe43 bl 80293e4 802975e: b110 cbz r0, 8029766 void ups_megatec_process_pdu(cmdMegaTecEnums_t command) { switch(command) { case ups_status_req: ups_status_response(ups_pdu.data); 8029760: 481b ldr r0, [pc, #108] ; (80297d0 ) 8029762: f7ff fe61 bl 8029428 UPS.Flag_Present = false; send_MegaTec_cmd(ups_status_req); if (ups_megatec_rx_pdu()) ups_megatec_process_pdu(ups_status_req); megatec_send=true; 8029766: 2301 movs r3, #1 8029768: 702b strb r3, [r5, #0] } if(megatec_send){ 802976a: 782b ldrb r3, [r5, #0] 802976c: b19b cbz r3, 8029796 memset(ups_pdu.data, 0, UPS_PDU_MAX_LEN); 802976e: 2100 movs r1, #0 8029770: 2232 movs r2, #50 ; 0x32 8029772: 4817 ldr r0, [pc, #92] ; (80297d0 ) 8029774: f7f8 fb50 bl 8021e18 megatec_send= false; 8029778: 2300 movs r3, #0 UPS.Flag_Present = false; send_MegaTec_cmd(ups_remain_time_reg); 802977a: 200b movs r0, #11 megatec_send=true; } if(megatec_send){ memset(ups_pdu.data, 0, UPS_PDU_MAX_LEN); megatec_send= false; 802977c: 702b strb r3, [r5, #0] UPS.Flag_Present = false; 802977e: f884 302e strb.w r3, [r4, #46] ; 0x2e send_MegaTec_cmd(ups_remain_time_reg); 8029782: f7ff fdab bl 80292dc if (ups_megatec_rx_pdu()) 8029786: f7ff fe2d bl 80293e4 802978a: b110 cbz r0, 8029792 break; case ups_rating_info: break; case ups_remain_time_reg: ups_remain_time_response(ups_pdu.data); 802978c: 4810 ldr r0, [pc, #64] ; (80297d0 ) 802978e: f7ff ff95 bl 80296bc UPS.Flag_Present = false; send_MegaTec_cmd(ups_remain_time_reg); if (ups_megatec_rx_pdu()) ups_megatec_process_pdu(ups_remain_time_reg); megatec_send=true; 8029792: 2301 movs r3, #1 8029794: 702b strb r3, [r5, #0] } //vTaskDelay(100); if(megatec_send){ 8029796: 782b ldrb r3, [r5, #0] 8029798: b173 cbz r3, 80297b8 megatec_send = false; 802979a: 2300 movs r3, #0 UPS.Flag_Present = false; send_MegaTec_cmd(ups_info); 802979c: 2009 movs r0, #9 megatec_send=true; } //vTaskDelay(100); if(megatec_send){ megatec_send = false; 802979e: 702b strb r3, [r5, #0] UPS.Flag_Present = false; 80297a0: f884 302e strb.w r3, [r4, #46] ; 0x2e send_MegaTec_cmd(ups_info); 80297a4: f7ff fd9a bl 80292dc if (ups_megatec_rx_pdu()) 80297a8: f7ff fe1c bl 80293e4 80297ac: b110 cbz r0, 80297b4 { case ups_status_req: ups_status_response(ups_pdu.data); break; case ups_info: ups_info_response(ups_pdu.data); 80297ae: 4808 ldr r0, [pc, #32] ; (80297d0 ) 80297b0: f7ff ff3e bl 8029630 megatec_send = false; UPS.Flag_Present = false; send_MegaTec_cmd(ups_info); if (ups_megatec_rx_pdu()) ups_megatec_process_pdu(ups_info); megatec_send = true; 80297b4: 2301 movs r3, #1 80297b6: 702b strb r3, [r5, #0] } vTaskDelay(1000); 80297b8: f44f 707a mov.w r0, #1000 ; 0x3e8 80297bc: f002 f978 bl 802bab0 } 80297c0: e7a6 b.n 8029710 80297c2: bf00 nop 80297c4: 2000d7d8 .word 0x2000d7d8 80297c8: 20000672 .word 0x20000672 80297cc: 2000d7f8 .word 0x2000d7f8 80297d0: 20000b54 .word 0x20000b54 080297d4 : break; } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { 80297d4: b570 push {r4, r5, r6, lr} 80297d6: 4606 mov r6, r0 while(!megatec_send) 80297d8: 4c14 ldr r4, [pc, #80] ; (802982c ) 80297da: e002 b.n 80297e2 { vTaskDelay(50); 80297dc: 2032 movs r0, #50 ; 0x32 80297de: f002 f967 bl 802bab0 } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { while(!megatec_send) 80297e2: 7823 ldrb r3, [r4, #0] 80297e4: 4d11 ldr r5, [pc, #68] ; (802982c ) 80297e6: 2b00 cmp r3, #0 80297e8: d0f8 beq.n 80297dc { vTaskDelay(50); } megatec_send = false; 80297ea: 2300 movs r3, #0 send_MegaTec_cmd(command); 80297ec: 4630 mov r0, r6 { while(!megatec_send) { vTaskDelay(50); } megatec_send = false; 80297ee: 702b strb r3, [r5, #0] send_MegaTec_cmd(command); 80297f0: f7ff fd74 bl 80292dc if (ups_megatec_rx_pdu()) 80297f4: f7ff fdf6 bl 80293e4 80297f8: b190 cbz r0, 8029820 { megatec_send = true; 80297fa: 2401 movs r4, #1 if(strncmp(ups_pdu.data, "ACK", 3) == 0) 80297fc: 480c ldr r0, [pc, #48] ; (8029830 ) 80297fe: 490d ldr r1, [pc, #52] ; (8029834 ) } megatec_send = false; send_MegaTec_cmd(command); if (ups_megatec_rx_pdu()) { megatec_send = true; 8029800: 702c strb r4, [r5, #0] if(strncmp(ups_pdu.data, "ACK", 3) == 0) 8029802: 2203 movs r2, #3 8029804: f7f8 fd42 bl 802228c 8029808: b168 cbz r0, 8029826 return 1; else if(strncmp(ups_pdu.data, "NCK", 3) == 0) 802980a: 490b ldr r1, [pc, #44] ; (8029838 ) 802980c: 4808 ldr r0, [pc, #32] ; (8029830 ) 802980e: 2203 movs r2, #3 8029810: f7f8 fd3c bl 802228c return 0; 8029814: 2800 cmp r0, #0 8029816: bf14 ite ne 8029818: f04f 30ff movne.w r0, #4294967295 802981c: 2000 moveq r0, #0 802981e: bd70 pop {r4, r5, r6, pc} } return -1; 8029820: f04f 30ff mov.w r0, #4294967295 8029824: bd70 pop {r4, r5, r6, pc} send_MegaTec_cmd(command); if (ups_megatec_rx_pdu()) { megatec_send = true; if(strncmp(ups_pdu.data, "ACK", 3) == 0) return 1; 8029826: 4620 mov r0, r4 else if(strncmp(ups_pdu.data, "NCK", 3) == 0) return 0; } return -1; } 8029828: bd70 pop {r4, r5, r6, pc} 802982a: bf00 nop 802982c: 20000672 .word 0x20000672 8029830: 20000b54 .word 0x20000b54 8029834: 080392d3 .word 0x080392d3 8029838: 080392d7 .word 0x080392d7 0802983c : vTaskDelay(1000); } } void ups_megatec_init(void) { 802983c: b51f push {r0, r1, r2, r3, r4, lr} init_UPS_value(); 802983e: f7ff fd29 bl 8029294 UPS.Present = true; 8029842: 4b08 ldr r3, [pc, #32] ; (8029864 ) xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8029844: 4908 ldr r1, [pc, #32] ; (8029868 ) 8029846: 4809 ldr r0, [pc, #36] ; (802986c ) } } void ups_megatec_init(void) { init_UPS_value(); UPS.Present = true; 8029848: 2201 movs r2, #1 802984a: f883 202d strb.w r2, [r3, #45] ; 0x2d xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 802984e: 2300 movs r3, #0 8029850: 9300 str r3, [sp, #0] 8029852: 9301 str r3, [sp, #4] 8029854: 9302 str r3, [sp, #8] 8029856: 9303 str r3, [sp, #12] 8029858: f44f 7280 mov.w r2, #256 ; 0x100 802985c: f001 fe8e bl 802b57c } 8029860: b005 add sp, #20 8029862: bd00 pop {pc} 8029864: 2000d7d8 .word 0x2000d7d8 8029868: 080392db .word 0x080392db 802986c: 08029709 .word 0x08029709 08029870 : #endif #include #include "FreeRTOS.h" #include "task.h" void Reboot(void) { 8029870: b508 push {r3, lr} #ifndef BT6702_SERVICE SNMP_SendUserTrap(DEVICE_REBOOTED); 8029872: 2004 movs r0, #4 8029874: f00e fa34 bl 8037ce0 log_event_data(LOG_SYSTEM_BOOT, "Администратор"); 8029878: 490a ldr r1, [pc, #40] ; (80298a4 ) 802987a: 2000 movs r0, #0 802987c: f000 fcf2 bl 802a264 vTaskDelay(1010); 8029880: f240 30f2 movw r0, #1010 ; 0x3f2 8029884: f002 f914 bl 802bab0 LOG_Disable(); 8029888: f000 fc0e bl 802a0a8 802988c: f3bf 8f4f dsb sy //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 8029890: 4a05 ldr r2, [pc, #20] ; (80298a8 ) 8029892: 4b06 ldr r3, [pc, #24] ; (80298ac ) 8029894: 68d1 ldr r1, [r2, #12] 8029896: f401 61e0 and.w r1, r1, #1792 ; 0x700 802989a: 430b orrs r3, r1 __STATIC_INLINE void NVIC_SystemReset(void) //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | 802989c: 60d3 str r3, [r2, #12] 802989e: f3bf 8f4f dsb sy 80298a2: e7fe b.n 80298a2 80298a4: 0803928f .word 0x0803928f 80298a8: e000ed00 .word 0xe000ed00 80298ac: 05fa0004 .word 0x05fa0004 080298b0 : #define _size_w(n) sizeof(n) / sizeof(int) void rbuf32_init(rbuf_t *rbuf32, uint32_t *buffer, uint32_t size) { rbuf32->buf_ptr = buffer; rbuf32->size = size; rbuf32->read_index = 0; 80298b0: 2300 movs r3, #0 #define _size_w(n) sizeof(n) / sizeof(int) void rbuf32_init(rbuf_t *rbuf32, uint32_t *buffer, uint32_t size) { rbuf32->buf_ptr = buffer; rbuf32->size = size; 80298b2: e880 0006 stmia.w r0, {r1, r2} rbuf32->read_index = 0; 80298b6: 6083 str r3, [r0, #8] rbuf32->write_index = 0; 80298b8: 60c3 str r3, [r0, #12] 80298ba: 4770 bx lr 080298bc : return full_space; } bool rbuf_isfull(rbuf_t *rbuf) { int r_tmp; if (rbuf->write_index == (rbuf->size - 1)) { 80298bc: 6842 ldr r2, [r0, #4] 80298be: 68c3 ldr r3, [r0, #12] 80298c0: 6880 ldr r0, [r0, #8] 80298c2: 1e51 subs r1, r2, #1 80298c4: 428b cmp r3, r1 r_tmp = rbuf->read_index + rbuf->size; 80298c6: bf08 it eq 80298c8: 1810 addeq r0, r2, r0 } else r_tmp = rbuf->read_index; if (r_tmp - rbuf->write_index == 1) 80298ca: 1ac0 subs r0, r0, r3 return true; else return false; } 80298cc: 1e42 subs r2, r0, #1 80298ce: 4250 negs r0, r2 80298d0: 4150 adcs r0, r2 80298d2: 4770 bx lr 080298d4 : rbuf64->read_index = 0; rbuf64->write_index = 0; } bool rbuf_isempty(rbuf_t *rbuf) { if (rbuf->read_index == rbuf->write_index) 80298d4: 6883 ldr r3, [r0, #8] 80298d6: 68c2 ldr r2, [r0, #12] 80298d8: 4293 cmp r3, r2 80298da: d105 bne.n 80298e8 80298dc: e002 b.n 80298e4 /* Check whether buffer is not empty */ if (!rbuf_isempty(rbuf32)) { *data = rbuf32->buf_ptr[rbuf32->read_index++]; /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) rbuf32->read_index = 0; 80298de: 2300 movs r3, #0 80298e0: 6083 str r3, [r0, #8] 80298e2: e00a b.n 80298fa return true; } else return false; 80298e4: 2000 movs r0, #0 80298e6: 4770 bx lr } bool rbuf32_get(rbuf_t *rbuf32, uint32_t *data) { /* Check whether buffer is not empty */ if (!rbuf_isempty(rbuf32)) { *data = rbuf32->buf_ptr[rbuf32->read_index++]; 80298e8: 6802 ldr r2, [r0, #0] 80298ea: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80298ee: 600a str r2, [r1, #0] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 80298f0: 6842 ldr r2, [r0, #4] } bool rbuf32_get(rbuf_t *rbuf32, uint32_t *data) { /* Check whether buffer is not empty */ if (!rbuf_isempty(rbuf32)) { *data = rbuf32->buf_ptr[rbuf32->read_index++]; 80298f2: 3301 adds r3, #1 /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 80298f4: 4293 cmp r3, r2 } bool rbuf32_get(rbuf_t *rbuf32, uint32_t *data) { /* Check whether buffer is not empty */ if (!rbuf_isempty(rbuf32)) { *data = rbuf32->buf_ptr[rbuf32->read_index++]; 80298f6: 6083 str r3, [r0, #8] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 80298f8: d0f1 beq.n 80298de rbuf32->read_index = 0; return true; 80298fa: 2001 movs r0, #1 } else return false; } 80298fc: 4770 bx lr 080298fe : /* * Oldest data is overwriting when write_ptr reaches read_ptr - 1 (!). * For check use rbuf_isfull. */ bool rbuf32_put(rbuf_t *rbuf32, uint32_t data) { 80298fe: b538 push {r3, r4, r5, lr} 8029900: 4604 mov r4, r0 8029902: 460d mov r5, r1 if(!rbuf_isfull(rbuf32)) 8029904: f7ff ffda bl 80298bc 8029908: b950 cbnz r0, 8029920 { rbuf32->buf_ptr[rbuf32->write_index++] = data; 802990a: 68e3 ldr r3, [r4, #12] 802990c: 6822 ldr r2, [r4, #0] 802990e: f842 5023 str.w r5, [r2, r3, lsl #2] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8029912: 6862 ldr r2, [r4, #4] */ bool rbuf32_put(rbuf_t *rbuf32, uint32_t data) { if(!rbuf_isfull(rbuf32)) { rbuf32->buf_ptr[rbuf32->write_index++] = data; 8029914: 3301 adds r3, #1 /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8029916: 4293 cmp r3, r2 */ bool rbuf32_put(rbuf_t *rbuf32, uint32_t data) { if(!rbuf_isfull(rbuf32)) { rbuf32->buf_ptr[rbuf32->write_index++] = data; 8029918: 60e3 str r3, [r4, #12] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 802991a: d103 bne.n 8029924 rbuf32->write_index = 0; 802991c: 60e0 str r0, [r4, #12] 802991e: e001 b.n 8029924 return true; } else return false; 8029920: 2000 movs r0, #0 8029922: bd38 pop {r3, r4, r5, pc} bool rbuf32_put(rbuf_t *rbuf32, uint32_t data) { if(!rbuf_isfull(rbuf32)) { rbuf32->buf_ptr[rbuf32->write_index++] = data; /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8029924: 2001 movs r0, #1 rbuf32->write_index = 0; return true; } else return false; } 8029926: bd38 pop {r3, r4, r5, pc} 08029928 : #include #include /* Converts a hex character to its integer value */ char from_hex(char ch) { return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10; 8029928: 4b08 ldr r3, [pc, #32] ; (802994c ) 802992a: 681b ldr r3, [r3, #0] 802992c: 181b adds r3, r3, r0 802992e: 785b ldrb r3, [r3, #1] 8029930: f003 0204 and.w r2, r3, #4 8029934: b2d2 uxtb r2, r2 8029936: b10a cbz r2, 802993c 8029938: 3830 subs r0, #48 ; 0x30 802993a: e005 b.n 8029948 802993c: f003 0303 and.w r3, r3, #3 8029940: 2b01 cmp r3, #1 8029942: bf08 it eq 8029944: 3020 addeq r0, #32 8029946: 3857 subs r0, #87 ; 0x57 8029948: b2c0 uxtb r0, r0 } 802994a: 4770 bx lr 802994c: 20000000 .word 0x20000000 08029950 : return buf; } /* Returns a url-decoded version of str */ /* IMPORTANT: be sure that outbuf is big enougth */ char *url_decode(char *outbuf, uint32_t outlen, char *inbuf) { 8029950: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8029954: 4607 mov r7, r0 8029956: 460e mov r6, r1 char *pstr = inbuf, *buf = outbuf, *pbuf = buf; 8029958: 4604 mov r4, r0 802995a: 4615 mov r5, r2 if (pstr[1] && pstr[2]) { *pbuf++ = from_hex(pstr[1]) << 4 | from_hex(pstr[2]); pstr += 2; } } else if (*pstr == '+') { *pbuf++ = ' '; 802995c: f04f 0920 mov.w r9, #32 /* Returns a url-decoded version of str */ /* IMPORTANT: be sure that outbuf is big enougth */ char *url_decode(char *outbuf, uint32_t outlen, char *inbuf) { char *pstr = inbuf, *buf = outbuf, *pbuf = buf; while ((*pstr) && outlen > 1) { 8029960: e01e b.n 80299a0 if (*pstr == '%') { 8029962: 2b25 cmp r3, #37 ; 0x25 8029964: d112 bne.n 802998c if (pstr[1] && pstr[2]) { 8029966: 7868 ldrb r0, [r5, #1] 8029968: b1c0 cbz r0, 802999c 802996a: f895 8002 ldrb.w r8, [r5, #2] 802996e: f1b8 0f00 cmp.w r8, #0 8029972: d013 beq.n 802999c *pbuf++ = from_hex(pstr[1]) << 4 | from_hex(pstr[2]); 8029974: f7ff ffd8 bl 8029928 8029978: 4682 mov sl, r0 802997a: 4640 mov r0, r8 802997c: f7ff ffd4 bl 8029928 8029980: ea40 100a orr.w r0, r0, sl, lsl #4 8029984: f804 0b01 strb.w r0, [r4], #1 pstr += 2; 8029988: 3502 adds r5, #2 802998a: e007 b.n 802999c } } else if (*pstr == '+') { 802998c: 2b2b cmp r3, #43 ; 0x2b 802998e: f104 0201 add.w r2, r4, #1 *pbuf++ = ' '; 8029992: bf0c ite eq 8029994: f884 9000 strbeq.w r9, [r4] } else { *pbuf++ = *pstr; 8029998: 7023 strbne r3, [r4, #0] 802999a: 4614 mov r4, r2 } pstr++; 802999c: 3501 adds r5, #1 outlen--; 802999e: 3e01 subs r6, #1 /* Returns a url-decoded version of str */ /* IMPORTANT: be sure that outbuf is big enougth */ char *url_decode(char *outbuf, uint32_t outlen, char *inbuf) { char *pstr = inbuf, *buf = outbuf, *pbuf = buf; while ((*pstr) && outlen > 1) { 80299a0: 782b ldrb r3, [r5, #0] 80299a2: b10b cbz r3, 80299a8 80299a4: 2e01 cmp r6, #1 80299a6: d8dc bhi.n 8029962 *pbuf++ = *pstr; } pstr++; outlen--; } *pbuf = '\0'; 80299a8: 2300 movs r3, #0 80299aa: 7023 strb r3, [r4, #0] return buf; } 80299ac: 4638 mov r0, r7 80299ae: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80299b2: 0000 movs r0, r0 080299b4 : /** * @brief Мониторинг бита DI0 state */ void UPS_DI0Monitor(void) { 80299b4: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1) ^ sSettings.sInOuts.din_type_act[0]; 80299b6: 2008 movs r0, #8 80299b8: f7ff fc65 bl 8029286 80299bc: 4b1c ldr r3, [pc, #112] ; (8029a30 ) 80299be: f893 4376 ldrb.w r4, [r3, #886] ; 0x376 UPS.Alarm = (UPS.Alarm & 0x0f) | ((DI0StateCurrent^1) << 4); 80299c2: 4b1c ldr r3, [pc, #112] ; (8029a34 ) { static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1) ^ sSettings.sInOuts.din_type_act[0]; 80299c4: 4060 eors r0, r4 UPS.Alarm = (UPS.Alarm & 0x0f) | ((DI0StateCurrent^1) << 4); 80299c6: 7d1a ldrb r2, [r3, #20] { static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1) ^ sSettings.sInOuts.din_type_act[0]; 80299c8: b2c4 uxtb r4, r0 UPS.Alarm = (UPS.Alarm & 0x0f) | ((DI0StateCurrent^1) << 4); 80299ca: f084 0101 eor.w r1, r4, #1 80299ce: f002 020f and.w r2, r2, #15 80299d2: ea42 1201 orr.w r2, r2, r1, lsl #4 80299d6: 751a strb r2, [r3, #20] if (!isValueRecv) { 80299d8: 4a17 ldr r2, [pc, #92] ; (8029a38 ) 80299da: 4b18 ldr r3, [pc, #96] ; (8029a3c ) 80299dc: 7811 ldrb r1, [r2, #0] 80299de: b969 cbnz r1, 80299fc isValueRecv = true; 80299e0: 2501 movs r5, #1 80299e2: 7015 strb r5, [r2, #0] DI0OldState = DI0StateCurrent; 80299e4: 701c strb r4, [r3, #0] if (!DI0StateCurrent){ 80299e6: bb14 cbnz r4, 8029a2e log_event_data(LOG_ALARM_DIO, "Авария"); 80299e8: 2008 movs r0, #8 80299ea: 4915 ldr r1, [pc, #84] ; (8029a40 ) 80299ec: f000 fc3a bl 802a264 SNMP_SendUserTrap(DI0_ALARM); 80299f0: 2006 movs r0, #6 80299f2: f00e f975 bl 8037ce0 flUpdateLog = true; 80299f6: 4b13 ldr r3, [pc, #76] ; (8029a44 ) 80299f8: 701d strb r5, [r3, #0] 80299fa: bd38 pop {r3, r4, r5, pc} } return; } if (!DI0StateCurrent) 80299fc: b914 cbnz r4, 8029a04 flCriticalAlarm = true; 80299fe: 4a12 ldr r2, [pc, #72] ; (8029a48 ) 8029a00: 2101 movs r1, #1 8029a02: 7011 strb r1, [r2, #0] // Значение параметра изменилось if (DI0StateCurrent != DI0OldState) 8029a04: 781b ldrb r3, [r3, #0] 8029a06: 42a3 cmp r3, r4 8029a08: d00f beq.n 8029a2a 8029a0a: 4d0e ldr r5, [pc, #56] ; (8029a44 ) { if (DI0StateCurrent){ log_event_data(LOG_ALARM_DIO, "Норма"); 8029a0c: 2008 movs r0, #8 // Значение параметра изменилось if (DI0StateCurrent != DI0OldState) { if (DI0StateCurrent){ 8029a0e: b124 cbz r4, 8029a1a log_event_data(LOG_ALARM_DIO, "Норма"); 8029a10: 490e ldr r1, [pc, #56] ; (8029a4c ) 8029a12: f000 fc27 bl 802a264 SNMP_SendUserTrap(DI0_NORM); 8029a16: 2005 movs r0, #5 8029a18: e003 b.n 8029a22 flUpdateLog = true; } else{ log_event_data(LOG_ALARM_DIO, "Авария"); 8029a1a: 4909 ldr r1, [pc, #36] ; (8029a40 ) 8029a1c: f000 fc22 bl 802a264 SNMP_SendUserTrap(DI0_ALARM); 8029a20: 2006 movs r0, #6 8029a22: f00e f95d bl 8037ce0 flUpdateLog = true; 8029a26: 2301 movs r3, #1 8029a28: 702b strb r3, [r5, #0] } } DI0OldState = DI0StateCurrent; 8029a2a: 4b04 ldr r3, [pc, #16] ; (8029a3c ) 8029a2c: 701c strb r4, [r3, #0] 8029a2e: bd38 pop {r3, r4, r5, pc} 8029a30: 2000d414 .word 0x2000d414 8029a34: 2000d7d8 .word 0x2000d7d8 8029a38: 20000b95 .word 0x20000b95 8029a3c: 20000b93 .word 0x20000b93 8029a40: 0803930a .word 0x0803930a 8029a44: 20000bfc .word 0x20000bfc 8029a48: 20000b98 .word 0x20000b98 8029a4c: 08039317 .word 0x08039317 08029a50 : /** * @brief Мониторинг бита CriticalAlarm */ void UPS_CriticalAlarmMonitor(void) { 8029a50: b5f0 push {r4, r5, r6, r7, lr} 8029a52: b089 sub sp, #36 ; 0x24 static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[30]; memset(str, 0, 30); 8029a54: 2100 movs r1, #0 8029a56: 4668 mov r0, sp 8029a58: 221e movs r2, #30 8029a5a: f7f8 f9dd bl 8021e18 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8029a5e: 4b45 ldr r3, [pc, #276] ; (8029b74 ) 8029a60: f893 5374 ldrb.w r5, [r3, #884] ; 0x374 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 8029a64: f893 7375 ldrb.w r7, [r3, #885] ; 0x375 CriticalAlarmCurrent = flCriticalAlarm; 8029a68: 4b43 ldr r3, [pc, #268] ; (8029b78 ) 8029a6a: 781c ldrb r4, [r3, #0] if (!isValueRecv) { 8029a6c: 4b43 ldr r3, [pc, #268] ; (8029b7c ) 8029a6e: 7819 ldrb r1, [r3, #0] 8029a70: bb29 cbnz r1, 8029abe isValueRecv = true; 8029a72: 2201 movs r2, #1 8029a74: 701a strb r2, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 8029a76: 4b42 ldr r3, [pc, #264] ; (8029b80 ) 8029a78: 701c strb r4, [r3, #0] OldRO0type_Sourse = CurrRO1type_Sourse; 8029a7a: 4b42 ldr r3, [pc, #264] ; (8029b84 ) 8029a7c: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029a7e: 4b42 ldr r3, [pc, #264] ; (8029b88 ) if(OldRO0type_Sourse == CRITICAL){ 8029a80: 4295 cmp r5, r2 if (!isValueRecv) { isValueRecv = true; CriticalAlarmOldState = CriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 8029a82: 701f strb r7, [r3, #0] if(OldRO0type_Sourse == CRITICAL){ 8029a84: d10a bne.n 8029a9c if(CriticalAlarmCurrent){ 8029a86: b14c cbz r4, 8029a9c SetROInt(1, 0); 8029a88: 4628 mov r0, r5 8029a8a: f7fe ff7f bl 802898c SNMP_SendUserTrap(DO0_TOGGLED); 8029a8e: 2007 movs r0, #7 8029a90: f00e f926 bl 8037ce0 log_event_data(LOG_DO0_STATE, "Замкнуто"); 8029a94: 2009 movs r0, #9 8029a96: 493d ldr r1, [pc, #244] ; (8029b8c ) 8029a98: f000 fbe4 bl 802a264 } } if(OldRO2type_Sourse == CRITICAL){ 8029a9c: 4b3a ldr r3, [pc, #232] ; (8029b88 ) 8029a9e: 7818 ldrb r0, [r3, #0] 8029aa0: 2801 cmp r0, #1 8029aa2: d165 bne.n 8029b70 if(CriticalAlarmCurrent){ 8029aa4: 2c00 cmp r4, #0 8029aa6: d063 beq.n 8029b70 SetROInt(1, 1); 8029aa8: 4601 mov r1, r0 8029aaa: f7fe ff6f bl 802898c SNMP_SendUserTrap(DO1_TOGGLED); 8029aae: 2008 movs r0, #8 8029ab0: f00e f916 bl 8037ce0 log_event_data(LOG_DO1_STATE, "Замкнуто"); 8029ab4: 200a movs r0, #10 8029ab6: 4935 ldr r1, [pc, #212] ; (8029b8c ) 8029ab8: f000 fbd4 bl 802a264 8029abc: e058 b.n 8029b70 } } return; } if(CriticalAlarmCurrent){ 8029abe: b154 cbz r4, 8029ad6 if (UPS.Present) 8029ac0: 4b33 ldr r3, [pc, #204] ; (8029b90 ) 8029ac2: f893 302d ldrb.w r3, [r3, #45] ; 0x2d LED_Toggle(LED_MAJOR_R); 8029ac6: 200d movs r0, #13 } return; } if(CriticalAlarmCurrent){ if (UPS.Present) 8029ac8: b113 cbz r3, 8029ad0 LED_Toggle(LED_MAJOR_R); 8029aca: f7ff fb69 bl 80291a0 8029ace: e005 b.n 8029adc else LED_On(LED_MAJOR_R); 8029ad0: f7ff fb2c bl 802912c 8029ad4: e002 b.n 8029adc } else{ LED_Off(LED_MAJOR_R); 8029ad6: 200d movs r0, #13 8029ad8: f7ff fb2b bl 8029132 } // Значение параметра изменилось if (CriticalAlarmCurrent != CriticalAlarmOldState) 8029adc: 4b28 ldr r3, [pc, #160] ; (8029b80 ) 8029ade: 781b ldrb r3, [r3, #0] 8029ae0: 42a3 cmp r3, r4 8029ae2: d03f beq.n 8029b64 { if(OldRO0type_Sourse == CRITICAL){ 8029ae4: 4b27 ldr r3, [pc, #156] ; (8029b84 ) 8029ae6: 781e ldrb r6, [r3, #0] 8029ae8: 2e01 cmp r6, #1 8029aea: d11b bne.n 8029b24 memset(str, 0, 30); 8029aec: 4668 mov r0, sp 8029aee: 2100 movs r1, #0 8029af0: 221e movs r2, #30 8029af2: f7f8 f991 bl 8021e18 if(CriticalAlarmCurrent){ 8029af6: b134 cbz r4, 8029b06 SetROInt(1, 0); 8029af8: 4630 mov r0, r6 8029afa: 2100 movs r1, #0 8029afc: f7fe ff46 bl 802898c strcat(str, "Замкнуто"); 8029b00: 4668 mov r0, sp 8029b02: 4922 ldr r1, [pc, #136] ; (8029b8c ) 8029b04: e005 b.n 8029b12 } else{ SetROInt(0, 0); 8029b06: 4620 mov r0, r4 8029b08: 4621 mov r1, r4 8029b0a: f7fe ff3f bl 802898c strcat(str, "Разомкнуто"); 8029b0e: 4921 ldr r1, [pc, #132] ; (8029b94 ) 8029b10: 4668 mov r0, sp 8029b12: f7f8 f9e7 bl 8021ee4 } SNMP_SendUserTrap(DO0_TOGGLED); 8029b16: 2007 movs r0, #7 8029b18: f00e f8e2 bl 8037ce0 log_event_data(LOG_DO0_STATE, str); 8029b1c: 2009 movs r0, #9 8029b1e: 4669 mov r1, sp 8029b20: f000 fba0 bl 802a264 } if(OldRO2type_Sourse == CRITICAL){ 8029b24: 4b18 ldr r3, [pc, #96] ; (8029b88 ) 8029b26: 781e ldrb r6, [r3, #0] 8029b28: 2e01 cmp r6, #1 8029b2a: d11b bne.n 8029b64 memset(str, 0, 30); 8029b2c: 4668 mov r0, sp 8029b2e: 2100 movs r1, #0 8029b30: 221e movs r2, #30 8029b32: f7f8 f971 bl 8021e18 if(CriticalAlarmCurrent){ 8029b36: b134 cbz r4, 8029b46 SetROInt(1, 1); 8029b38: 4630 mov r0, r6 8029b3a: 4631 mov r1, r6 8029b3c: f7fe ff26 bl 802898c strcat(str, "Замкнуто"); 8029b40: 4668 mov r0, sp 8029b42: 4912 ldr r1, [pc, #72] ; (8029b8c ) 8029b44: e005 b.n 8029b52 } else{ SetROInt(0, 1); 8029b46: 4620 mov r0, r4 8029b48: 4631 mov r1, r6 8029b4a: f7fe ff1f bl 802898c strcat(str, "Разомкнуто"); 8029b4e: 4911 ldr r1, [pc, #68] ; (8029b94 ) 8029b50: 4668 mov r0, sp 8029b52: f7f8 f9c7 bl 8021ee4 } SNMP_SendUserTrap(DO1_TOGGLED); 8029b56: 2008 movs r0, #8 8029b58: f00e f8c2 bl 8037ce0 log_event_data(LOG_DO1_STATE, str); 8029b5c: 200a movs r0, #10 8029b5e: 4669 mov r1, sp 8029b60: f000 fb80 bl 802a264 SNMP_SendUserTrap(DO1_TOGGLED); log_event_data(LOG_DO1_STATE, str); } } OldRO0type_Sourse = CurrRO1type_Sourse; 8029b64: 4b07 ldr r3, [pc, #28] ; (8029b84 ) 8029b66: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029b68: 4b07 ldr r3, [pc, #28] ; (8029b88 ) 8029b6a: 701f strb r7, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 8029b6c: 4b04 ldr r3, [pc, #16] ; (8029b80 ) 8029b6e: 701c strb r4, [r3, #0] } 8029b70: b009 add sp, #36 ; 0x24 8029b72: bdf0 pop {r4, r5, r6, r7, pc} 8029b74: 2000d414 .word 0x2000d414 8029b78: 20000b98 .word 0x20000b98 8029b7c: 20000b9a .word 0x20000b9a 8029b80: 20000b9c .word 0x20000b9c 8029b84: 20000b8e .word 0x20000b8e 8029b88: 20000b92 .word 0x20000b92 8029b8c: 08039322 .word 0x08039322 8029b90: 2000d7d8 .word 0x2000d7d8 8029b94: 08039333 .word 0x08039333 08029b98 : /** * @brief Мониторинг бита NonCriticalAlarm */ void UPS_NonCriticalAlarmMonitor(void) { 8029b98: b5f0 push {r4, r5, r6, r7, lr} 8029b9a: b089 sub sp, #36 ; 0x24 static uint8_t OldRO0type_Sourse = 0; static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[30]; memset(str, 0, 30); 8029b9c: 2100 movs r1, #0 8029b9e: 221e movs r2, #30 8029ba0: 4668 mov r0, sp 8029ba2: f7f8 f939 bl 8021e18 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 8029ba6: 4f3d ldr r7, [pc, #244] ; (8029c9c ) uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[30]; memset(str, 0, 30); CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8029ba8: 4b3d ldr r3, [pc, #244] ; (8029ca0 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 8029baa: 7839 ldrb r1, [r7, #0] uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; char str[30]; memset(str, 0, 30); CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8029bac: f893 5374 ldrb.w r5, [r3, #884] ; 0x374 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 8029bb0: f893 6375 ldrb.w r6, [r3, #885] ; 0x375 NonCriticalAlarmCurrent = flNonCriticalAlarm; 8029bb4: 4b3b ldr r3, [pc, #236] ; (8029ca4 ) 8029bb6: 4a3c ldr r2, [pc, #240] ; (8029ca8 ) 8029bb8: 781c ldrb r4, [r3, #0] 8029bba: 4b3c ldr r3, [pc, #240] ; (8029cac ) if (!isValueRecv) { 8029bbc: bb19 cbnz r1, 8029c06 isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; 8029bbe: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029bc0: 4b3b ldr r3, [pc, #236] ; (8029cb0 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 8029bc2: 7014 strb r4, [r2, #0] CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { isValueRecv = true; 8029bc4: 2001 movs r0, #1 NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; if(OldRO0type_Sourse == NON_CRITICAL){ 8029bc6: 2d02 cmp r5, #2 CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { isValueRecv = true; 8029bc8: 7038 strb r0, [r7, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 8029bca: 701e strb r6, [r3, #0] if(OldRO0type_Sourse == NON_CRITICAL){ 8029bcc: d109 bne.n 8029be2 if(NonCriticalAlarmCurrent){ 8029bce: b144 cbz r4, 8029be2 SetROInt(1, 0); 8029bd0: f7fe fedc bl 802898c SNMP_SendUserTrap(DO0_TOGGLED); 8029bd4: 2007 movs r0, #7 8029bd6: f00e f883 bl 8037ce0 log_event_data(LOG_DO0_STATE, "Замкнуто"); 8029bda: 2009 movs r0, #9 8029bdc: 4935 ldr r1, [pc, #212] ; (8029cb4 ) 8029bde: f000 fb41 bl 802a264 } } if(OldRO2type_Sourse == NON_CRITICAL){ 8029be2: 4b33 ldr r3, [pc, #204] ; (8029cb0 ) 8029be4: 781b ldrb r3, [r3, #0] 8029be6: 2b02 cmp r3, #2 8029be8: d155 bne.n 8029c96 if(NonCriticalAlarmCurrent){ 8029bea: 2c00 cmp r4, #0 8029bec: d053 beq.n 8029c96 SetROInt(1, 1); 8029bee: 2001 movs r0, #1 8029bf0: 4601 mov r1, r0 8029bf2: f7fe fecb bl 802898c SNMP_SendUserTrap(DO1_TOGGLED); 8029bf6: 2008 movs r0, #8 8029bf8: f00e f872 bl 8037ce0 log_event_data(LOG_DO1_STATE, "Замкнуто"); 8029bfc: 200a movs r0, #10 8029bfe: 492d ldr r1, [pc, #180] ; (8029cb4 ) 8029c00: f000 fb30 bl 802a264 8029c04: e047 b.n 8029c96 } return; } // Значение параметра изменилось if (NonCriticalAlarmCurrent != NonCriticalAlarmOldState) 8029c06: 7812 ldrb r2, [r2, #0] 8029c08: 42a2 cmp r2, r4 8029c0a: d03e beq.n 8029c8a { if(OldRO0type_Sourse == NON_CRITICAL){ 8029c0c: 781b ldrb r3, [r3, #0] 8029c0e: 2b02 cmp r3, #2 8029c10: d11b bne.n 8029c4a memset(str, 0, 30); 8029c12: 4668 mov r0, sp 8029c14: 2100 movs r1, #0 8029c16: 221e movs r2, #30 8029c18: f7f8 f8fe bl 8021e18 if(NonCriticalAlarmCurrent){ 8029c1c: b134 cbz r4, 8029c2c SetROInt(1, 0); 8029c1e: 2001 movs r0, #1 8029c20: 2100 movs r1, #0 8029c22: f7fe feb3 bl 802898c strcat(str, "Замкнуто"); 8029c26: 4668 mov r0, sp 8029c28: 4922 ldr r1, [pc, #136] ; (8029cb4 ) 8029c2a: e005 b.n 8029c38 } else{ SetROInt(0, 0); 8029c2c: 4620 mov r0, r4 8029c2e: 4621 mov r1, r4 8029c30: f7fe feac bl 802898c strcat(str, "Разомкнуто"); 8029c34: 4920 ldr r1, [pc, #128] ; (8029cb8 ) 8029c36: 4668 mov r0, sp 8029c38: f7f8 f954 bl 8021ee4 } SNMP_SendUserTrap(DO0_TOGGLED); 8029c3c: 2007 movs r0, #7 8029c3e: f00e f84f bl 8037ce0 log_event_data(LOG_DO0_STATE, str); 8029c42: 2009 movs r0, #9 8029c44: 4669 mov r1, sp 8029c46: f000 fb0d bl 802a264 } if(OldRO2type_Sourse == NON_CRITICAL){ 8029c4a: 4b19 ldr r3, [pc, #100] ; (8029cb0 ) 8029c4c: 781b ldrb r3, [r3, #0] 8029c4e: 2b02 cmp r3, #2 8029c50: d11b bne.n 8029c8a memset(str, 0, 30); 8029c52: 4668 mov r0, sp 8029c54: 2100 movs r1, #0 8029c56: 221e movs r2, #30 8029c58: f7f8 f8de bl 8021e18 if(NonCriticalAlarmCurrent){ 8029c5c: b134 cbz r4, 8029c6c SetROInt(1, 1); 8029c5e: 2001 movs r0, #1 8029c60: 4601 mov r1, r0 8029c62: f7fe fe93 bl 802898c strcat(str, "Разомкнуто"); 8029c66: 4668 mov r0, sp 8029c68: 4913 ldr r1, [pc, #76] ; (8029cb8 ) 8029c6a: e005 b.n 8029c78 } else{ SetROInt(0, 1); 8029c6c: 4620 mov r0, r4 8029c6e: 2101 movs r1, #1 8029c70: f7fe fe8c bl 802898c strcat(str, "Замкнуто"); 8029c74: 490f ldr r1, [pc, #60] ; (8029cb4 ) 8029c76: 4668 mov r0, sp 8029c78: f7f8 f934 bl 8021ee4 } SNMP_SendUserTrap(DO1_TOGGLED); 8029c7c: 2008 movs r0, #8 8029c7e: f00e f82f bl 8037ce0 log_event_data(LOG_DO1_STATE, str); 8029c82: 200a movs r0, #10 8029c84: 4669 mov r1, sp 8029c86: f000 faed bl 802a264 SNMP_SendUserTrap(DO1_TOGGLED); log_event_data(LOG_DO1_STATE, str); } } OldRO0type_Sourse = CurrRO1type_Sourse; 8029c8a: 4b08 ldr r3, [pc, #32] ; (8029cac ) 8029c8c: 701d strb r5, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8029c8e: 4b08 ldr r3, [pc, #32] ; (8029cb0 ) 8029c90: 701e strb r6, [r3, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 8029c92: 4b05 ldr r3, [pc, #20] ; (8029ca8 ) 8029c94: 701c strb r4, [r3, #0] } 8029c96: b009 add sp, #36 ; 0x24 8029c98: bdf0 pop {r4, r5, r6, r7, pc} 8029c9a: bf00 nop 8029c9c: 20000ba0 .word 0x20000ba0 8029ca0: 2000d414 .word 0x2000d414 8029ca4: 20000b9f .word 0x20000b9f 8029ca8: 20000b99 .word 0x20000b99 8029cac: 20000ba1 .word 0x20000ba1 8029cb0: 20000b97 .word 0x20000b97 8029cb4: 08039322 .word 0x08039322 8029cb8: 08039333 .word 0x08039333 08029cbc : /** * @brief Мониторинг бита LainFail */ void UPS_LineFailMonitor(void) { 8029cbc: b538 push {r3, r4, r5, lr} static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; if (!isValueRecv) { 8029cbe: 4a17 ldr r2, [pc, #92] ; (8029d1c ) { static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 8029cc0: 4b17 ldr r3, [pc, #92] ; (8029d20 ) if (!isValueRecv) { 8029cc2: 7811 ldrb r1, [r2, #0] { static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 8029cc4: 7cdc ldrb r4, [r3, #19] 8029cc6: 4b17 ldr r3, [pc, #92] ; (8029d24 ) 8029cc8: 09e4 lsrs r4, r4, #7 if (!isValueRecv) { 8029cca: b969 cbnz r1, 8029ce8 isValueRecv = true; 8029ccc: 2501 movs r5, #1 8029cce: 7015 strb r5, [r2, #0] lineFailOldState = lineFailCurrent; 8029cd0: 701c strb r4, [r3, #0] if (lineFailCurrent){ 8029cd2: b314 cbz r4, 8029d1a log_event_data(LOG_ALARM_LINE, "Авария"); 8029cd4: 200c movs r0, #12 8029cd6: 4914 ldr r1, [pc, #80] ; (8029d28 ) 8029cd8: f000 fac4 bl 802a264 SNMP_SendUserTrap(LINE_ALARM); 8029cdc: 200b movs r0, #11 8029cde: f00d ffff bl 8037ce0 flUpdateLog = true; 8029ce2: 4b12 ldr r3, [pc, #72] ; (8029d2c ) 8029ce4: 701d strb r5, [r3, #0] 8029ce6: bd38 pop {r3, r4, r5, pc} } return; } if (lineFailCurrent) 8029ce8: b114 cbz r4, 8029cf0 flCriticalAlarm = true; 8029cea: 4a11 ldr r2, [pc, #68] ; (8029d30 ) 8029cec: 2101 movs r1, #1 8029cee: 7011 strb r1, [r2, #0] // Значение параметра изменилось if (lineFailCurrent != lineFailOldState) 8029cf0: 781b ldrb r3, [r3, #0] 8029cf2: 42a3 cmp r3, r4 8029cf4: d00f beq.n 8029d16 8029cf6: 4d0d ldr r5, [pc, #52] ; (8029d2c ) { if (lineFailCurrent){ log_event_data(LOG_ALARM_LINE, "Авария"); 8029cf8: 200c movs r0, #12 flCriticalAlarm = true; // Значение параметра изменилось if (lineFailCurrent != lineFailOldState) { if (lineFailCurrent){ 8029cfa: b124 cbz r4, 8029d06 log_event_data(LOG_ALARM_LINE, "Авария"); 8029cfc: 490a ldr r1, [pc, #40] ; (8029d28 ) 8029cfe: f000 fab1 bl 802a264 SNMP_SendUserTrap(LINE_ALARM); 8029d02: 200b movs r0, #11 8029d04: e003 b.n 8029d0e flUpdateLog = true; } else{ log_event_data(LOG_ALARM_LINE, "Норма"); 8029d06: 490b ldr r1, [pc, #44] ; (8029d34 ) 8029d08: f000 faac bl 802a264 SNMP_SendUserTrap(LINE_NORM); 8029d0c: 200c movs r0, #12 8029d0e: f00d ffe7 bl 8037ce0 flUpdateLog = true; 8029d12: 2301 movs r3, #1 8029d14: 702b strb r3, [r5, #0] } } lineFailOldState = lineFailCurrent; 8029d16: 4b03 ldr r3, [pc, #12] ; (8029d24 ) 8029d18: 701c strb r4, [r3, #0] 8029d1a: bd38 pop {r3, r4, r5, pc} 8029d1c: 20000b9b .word 0x20000b9b 8029d20: 2000d7d8 .word 0x2000d7d8 8029d24: 20000b96 .word 0x20000b96 8029d28: 0803930a .word 0x0803930a 8029d2c: 20000bfc .word 0x20000bfc 8029d30: 20000b98 .word 0x20000b98 8029d34: 08039317 .word 0x08039317 08029d38 : /** * @brief Мониторинг бита LowBat */ void UPS_LowBatMonitor(void) { 8029d38: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 8029d3a: 4b19 ldr r3, [pc, #100] ; (8029da0 ) lowBatCurrent = (UPS.Status >> 6) & 0x01; else lowBatCurrent = 0; if (!isValueRecv) { 8029d3c: 4a19 ldr r2, [pc, #100] ; (8029da4 ) void UPS_LowBatMonitor(void) { static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 8029d3e: 7cdb ldrb r3, [r3, #19] lowBatCurrent = (UPS.Status >> 6) & 0x01; else lowBatCurrent = 0; if (!isValueRecv) { 8029d40: 7811 ldrb r1, [r2, #0] void UPS_LowBatMonitor(void) { static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 8029d42: 09dc lsrs r4, r3, #7 lowBatCurrent = (UPS.Status >> 6) & 0x01; 8029d44: bf18 it ne 8029d46: f3c3 1480 ubfxne r4, r3, #6, #1 8029d4a: 4b17 ldr r3, [pc, #92] ; (8029da8 ) else lowBatCurrent = 0; if (!isValueRecv) { 8029d4c: b969 cbnz r1, 8029d6a isValueRecv = true; 8029d4e: 2501 movs r5, #1 8029d50: 7015 strb r5, [r2, #0] lowBatOldState = lowBatCurrent; 8029d52: 701c strb r4, [r3, #0] if (lowBatCurrent){ 8029d54: b31c cbz r4, 8029d9e log_event_data(LOG_ALARM_LOW_BAT, "Авария"); 8029d56: 200d movs r0, #13 8029d58: 4914 ldr r1, [pc, #80] ; (8029dac ) 8029d5a: f000 fa83 bl 802a264 SNMP_SendUserTrap(LOW_BAT_ALARM); 8029d5e: 200d movs r0, #13 8029d60: f00d ffbe bl 8037ce0 flUpdateLog = true; 8029d64: 4b12 ldr r3, [pc, #72] ; (8029db0 ) 8029d66: 701d strb r5, [r3, #0] 8029d68: bd38 pop {r3, r4, r5, pc} } return; } if (lowBatCurrent) 8029d6a: b114 cbz r4, 8029d72 flNonCriticalAlarm = true; 8029d6c: 4a11 ldr r2, [pc, #68] ; (8029db4 ) 8029d6e: 2101 movs r1, #1 8029d70: 7011 strb r1, [r2, #0] // Значение параметра изменилось if (lowBatCurrent != lowBatOldState) 8029d72: 781b ldrb r3, [r3, #0] 8029d74: 42a3 cmp r3, r4 8029d76: d010 beq.n 8029d9a 8029d78: 4d0d ldr r5, [pc, #52] ; (8029db0 ) { if (lowBatCurrent){ 8029d7a: b12c cbz r4, 8029d88 SNMP_SendUserTrap(LOW_BAT_ALARM); 8029d7c: 200d movs r0, #13 8029d7e: f00d ffaf bl 8037ce0 log_event_data(LOG_ALARM_LOW_BAT, "Авария"); 8029d82: 200d movs r0, #13 8029d84: 4909 ldr r1, [pc, #36] ; (8029dac ) 8029d86: e004 b.n 8029d92 flUpdateLog = true; } else{ SNMP_SendUserTrap(LOW_BAT_NORM); 8029d88: 200e movs r0, #14 8029d8a: f00d ffa9 bl 8037ce0 log_event_data(LOG_ALARM_LOW_BAT, "Норма"); 8029d8e: 490a ldr r1, [pc, #40] ; (8029db8 ) 8029d90: 200d movs r0, #13 8029d92: f000 fa67 bl 802a264 flUpdateLog = true; 8029d96: 2301 movs r3, #1 8029d98: 702b strb r3, [r5, #0] } } lowBatOldState = lowBatCurrent; 8029d9a: 4b03 ldr r3, [pc, #12] ; (8029da8 ) 8029d9c: 701c strb r4, [r3, #0] 8029d9e: bd38 pop {r3, r4, r5, pc} 8029da0: 2000d7d8 .word 0x2000d7d8 8029da4: 20000ba3 .word 0x20000ba3 8029da8: 20000b9d .word 0x20000b9d 8029dac: 0803930a .word 0x0803930a 8029db0: 20000bfc .word 0x20000bfc 8029db4: 20000b9f .word 0x20000b9f 8029db8: 08039317 .word 0x08039317 08029dbc : /** * @brief Мониторинг нагрузки */ void UPS_PowerMonitor(void) { 8029dbc: b538 push {r3, r4, r5, lr} float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 8029dbe: 4c22 ldr r4, [pc, #136] ; (8029e48 ) 8029dc0: 7c20 ldrb r0, [r4, #16] 8029dc2: f7f7 f821 bl 8020e08 <__aeabi_ui2f> /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) 8029dc6: 4921 ldr r1, [pc, #132] ; (8029e4c ) void UPS_PowerMonitor(void) { float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 8029dc8: 4605 mov r5, r0 /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) 8029dca: f7f7 fa31 bl 8021230 <__aeabi_fcmpgt> 8029dce: b1d8 cbz r0, 8029e08 { flCriticalAlarm = true; 8029dd0: 4b1f ldr r3, [pc, #124] ; (8029e50 ) 8029dd2: 2501 movs r5, #1 8029dd4: 701d strb r5, [r3, #0] UPS.Alarm = (UPS.Alarm & 0x0e) | (1 << 0); 8029dd6: 7d23 ldrb r3, [r4, #20] 8029dd8: f003 030e and.w r3, r3, #14 8029ddc: 432b orrs r3, r5 8029dde: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_IDLE) 8029de0: 4c1c ldr r4, [pc, #112] ; (8029e54 ) 8029de2: 7823 ldrb r3, [r4, #0] 8029de4: bb73 cbnz r3, 8029e44 { LED_On(LED_MINOR_R); 8029de6: 200f movs r0, #15 8029de8: f7ff f9a0 bl 802912c LED_On(LED_MINOR_G); 8029dec: 200e movs r0, #14 8029dee: f7ff f99d bl 802912c stateCurrent = HYST_UP; log_event_data(LOG_ALARM_POWER, "Авария"); 8029df2: 200e movs r0, #14 8029df4: 4918 ldr r1, [pc, #96] ; (8029e58 ) UPS.Alarm = (UPS.Alarm & 0x0e) | (1 << 0); if (stateCurrent == HYST_IDLE) { LED_On(LED_MINOR_R); LED_On(LED_MINOR_G); stateCurrent = HYST_UP; 8029df6: 7025 strb r5, [r4, #0] log_event_data(LOG_ALARM_POWER, "Авария"); 8029df8: f000 fa34 bl 802a264 // Отправка трапа о завышении SNMP_SendUserTrap(POWER_ALARM); 8029dfc: 200f movs r0, #15 8029dfe: f00d ff6f bl 8037ce0 flUpdateLog = true; 8029e02: 4b16 ldr r3, [pc, #88] ; (8029e5c ) 8029e04: 701d strb r5, [r3, #0] 8029e06: bd38 pop {r3, r4, r5, pc} } } /* Отслеживается нормализация */ else if (load < (UPS_LOAD - UPS_LOAD_HIST)) 8029e08: 4628 mov r0, r5 8029e0a: 4915 ldr r1, [pc, #84] ; (8029e60 ) 8029e0c: f7f7 f9f2 bl 80211f4 <__aeabi_fcmplt> 8029e10: b1c0 cbz r0, 8029e44 { UPS.Alarm = (UPS.Alarm & 0x0e); 8029e12: 7d23 ldrb r3, [r4, #20] if (stateCurrent == HYST_UP) 8029e14: 4d0f ldr r5, [pc, #60] ; (8029e54 ) } } /* Отслеживается нормализация */ else if (load < (UPS_LOAD - UPS_LOAD_HIST)) { UPS.Alarm = (UPS.Alarm & 0x0e); 8029e16: f003 030e and.w r3, r3, #14 8029e1a: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_UP) 8029e1c: 782c ldrb r4, [r5, #0] 8029e1e: 2c01 cmp r4, #1 8029e20: d110 bne.n 8029e44 { LED_Off(LED_MINOR_R); 8029e22: 200f movs r0, #15 8029e24: f7ff f985 bl 8029132 LED_Off(LED_MINOR_G); 8029e28: 200e movs r0, #14 8029e2a: f7ff f982 bl 8029132 stateCurrent = HYST_IDLE; 8029e2e: 2300 movs r3, #0 log_event_data(LOG_ALARM_POWER, "Норма"); 8029e30: 200e movs r0, #14 8029e32: 490c ldr r1, [pc, #48] ; (8029e64 ) UPS.Alarm = (UPS.Alarm & 0x0e); if (stateCurrent == HYST_UP) { LED_Off(LED_MINOR_R); LED_Off(LED_MINOR_G); stateCurrent = HYST_IDLE; 8029e34: 702b strb r3, [r5, #0] log_event_data(LOG_ALARM_POWER, "Норма"); 8029e36: f000 fa15 bl 802a264 // Отправка трапа о нормализации SNMP_SendUserTrap(POWER_NORM); 8029e3a: 2010 movs r0, #16 8029e3c: f00d ff50 bl 8037ce0 flUpdateLog = true; 8029e40: 4b06 ldr r3, [pc, #24] ; (8029e5c ) 8029e42: 701c strb r4, [r3, #0] 8029e44: bd38 pop {r3, r4, r5, pc} 8029e46: bf00 nop 8029e48: 2000d7d8 .word 0x2000d7d8 8029e4c: 428c0000 .word 0x428c0000 8029e50: 20000b98 .word 0x20000b98 8029e54: 20000b91 .word 0x20000b91 8029e58: 0803930a .word 0x0803930a 8029e5c: 20000bfc .word 0x20000bfc 8029e60: 428a0000 .word 0x428a0000 8029e64: 08039317 .word 0x08039317 08029e68 : /** * @brief Мониторинг температуры */ void UPS_TemperatureMonitor(void) { 8029e68: b538 push {r3, r4, r5, lr} float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 8029e6a: 4c1b ldr r4, [pc, #108] ; (8029ed8 ) /* Отслеживается переход через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 8029e6c: 491b ldr r1, [pc, #108] ; (8029edc ) void UPS_TemperatureMonitor(void) { float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 8029e6e: 68e5 ldr r5, [r4, #12] /* Отслеживается переход через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 8029e70: 4628 mov r0, r5 8029e72: f7f7 f9dd bl 8021230 <__aeabi_fcmpgt> 8029e76: b1b0 cbz r0, 8029ea6 { flCriticalAlarm = true; 8029e78: 4b19 ldr r3, [pc, #100] ; (8029ee0 ) 8029e7a: 2501 movs r5, #1 8029e7c: 701d strb r5, [r3, #0] UPS.Alarm = (UPS.Alarm & 0x0d) | (1 << 1); 8029e7e: 7d23 ldrb r3, [r4, #20] 8029e80: f003 030d and.w r3, r3, #13 8029e84: f043 0302 orr.w r3, r3, #2 8029e88: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_IDLE) 8029e8a: 4b16 ldr r3, [pc, #88] ; (8029ee4 ) 8029e8c: 781a ldrb r2, [r3, #0] 8029e8e: bb12 cbnz r2, 8029ed6 { stateCurrent = HYST_UP; log_event_data(LOG_ALARM_TEMP, "Авария"); 8029e90: 200b movs r0, #11 8029e92: 4915 ldr r1, [pc, #84] ; (8029ee8 ) { flCriticalAlarm = true; UPS.Alarm = (UPS.Alarm & 0x0d) | (1 << 1); if (stateCurrent == HYST_IDLE) { stateCurrent = HYST_UP; 8029e94: 701d strb r5, [r3, #0] log_event_data(LOG_ALARM_TEMP, "Авария"); 8029e96: f000 f9e5 bl 802a264 // Отправка трапа о завышении SNMP_SendUserTrap(BATTERY_TEMPERATURE_ALARM); 8029e9a: 200a movs r0, #10 8029e9c: f00d ff20 bl 8037ce0 flUpdateLog = true; 8029ea0: 4b12 ldr r3, [pc, #72] ; (8029eec ) 8029ea2: 701d strb r5, [r3, #0] 8029ea4: bd38 pop {r3, r4, r5, pc} } } /* Отслеживается нормализация */ else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) 8029ea6: 4628 mov r0, r5 8029ea8: 4911 ldr r1, [pc, #68] ; (8029ef0 ) 8029eaa: f7f7 f9a3 bl 80211f4 <__aeabi_fcmplt> 8029eae: b190 cbz r0, 8029ed6 { UPS.Alarm = (UPS.Alarm & 0x0d); 8029eb0: 7d23 ldrb r3, [r4, #20] 8029eb2: f003 030d and.w r3, r3, #13 8029eb6: 7523 strb r3, [r4, #20] if (stateCurrent == HYST_UP) 8029eb8: 4b0a ldr r3, [pc, #40] ; (8029ee4 ) 8029eba: 781c ldrb r4, [r3, #0] 8029ebc: 2c01 cmp r4, #1 8029ebe: d10a bne.n 8029ed6 { stateCurrent = HYST_IDLE; 8029ec0: 2200 movs r2, #0 log_event_data(LOG_ALARM_TEMP, "Норма"); 8029ec2: 200b movs r0, #11 8029ec4: 490b ldr r1, [pc, #44] ; (8029ef4 ) else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) { UPS.Alarm = (UPS.Alarm & 0x0d); if (stateCurrent == HYST_UP) { stateCurrent = HYST_IDLE; 8029ec6: 701a strb r2, [r3, #0] log_event_data(LOG_ALARM_TEMP, "Норма"); 8029ec8: f000 f9cc bl 802a264 // Отправка трапа о нормализации SNMP_SendUserTrap(BATTERY_TEMPERATURE_NORM); 8029ecc: 2009 movs r0, #9 8029ece: f00d ff07 bl 8037ce0 flUpdateLog = true; 8029ed2: 4b06 ldr r3, [pc, #24] ; (8029eec ) 8029ed4: 701c strb r4, [r3, #0] 8029ed6: bd38 pop {r3, r4, r5, pc} 8029ed8: 2000d7d8 .word 0x2000d7d8 8029edc: 42200000 .word 0x42200000 8029ee0: 20000b98 .word 0x20000b98 8029ee4: 20000b8f .word 0x20000b8f 8029ee8: 0803930a .word 0x0803930a 8029eec: 20000bfc .word 0x20000bfc 8029ef0: 421c0000 .word 0x421c0000 8029ef4: 08039317 .word 0x08039317 08029ef8 : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_ConnectMonitor(void) { 8029ef8: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 8029efa: 4b1b ldr r3, [pc, #108] ; (8029f68 ) UPS.Alarm = (UPS.Alarm & 0x0b) | ((connectCurrent^1) << 2); 8029efc: 7d1a ldrb r2, [r3, #20] { static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 8029efe: f893 402d ldrb.w r4, [r3, #45] ; 0x2d UPS.Alarm = (UPS.Alarm & 0x0b) | ((connectCurrent^1) << 2); 8029f02: f002 020b and.w r2, r2, #11 8029f06: f084 0101 eor.w r1, r4, #1 8029f0a: ea42 0281 orr.w r2, r2, r1, lsl #2 8029f0e: 751a strb r2, [r3, #20] if (!isValueRecv) { 8029f10: 4a16 ldr r2, [pc, #88] ; (8029f6c ) 8029f12: 4b17 ldr r3, [pc, #92] ; (8029f70 ) 8029f14: 7811 ldrb r1, [r2, #0] 8029f16: b969 cbnz r1, 8029f34 isValueRecv = true; 8029f18: 2501 movs r5, #1 8029f1a: 7015 strb r5, [r2, #0] connectOldState = connectCurrent; 8029f1c: 701c strb r4, [r3, #0] if (!connectCurrent){ 8029f1e: bb14 cbnz r4, 8029f66 log_event_data(LOG_ALARM_UPS, "Авария"); 8029f20: 200f movs r0, #15 8029f22: 4914 ldr r1, [pc, #80] ; (8029f74 ) 8029f24: f000 f99e bl 802a264 SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 8029f28: 2011 movs r0, #17 8029f2a: f00d fed9 bl 8037ce0 flUpdateLog = true; 8029f2e: 4b12 ldr r3, [pc, #72] ; (8029f78 ) 8029f30: 701d strb r5, [r3, #0] 8029f32: bd38 pop {r3, r4, r5, pc} } return; } if (!connectCurrent) 8029f34: b914 cbnz r4, 8029f3c flCriticalAlarm = true; 8029f36: 4a11 ldr r2, [pc, #68] ; (8029f7c ) 8029f38: 2101 movs r1, #1 8029f3a: 7011 strb r1, [r2, #0] // Значение параметра изменилось if (connectCurrent != connectOldState) 8029f3c: 781b ldrb r3, [r3, #0] 8029f3e: 42a3 cmp r3, r4 8029f40: d00f beq.n 8029f62 8029f42: 4d0d ldr r5, [pc, #52] ; (8029f78 ) { if (connectCurrent){ log_event_data(LOG_ALARM_UPS, "Норма"); 8029f44: 200f movs r0, #15 if (!connectCurrent) flCriticalAlarm = true; // Значение параметра изменилось if (connectCurrent != connectOldState) { if (connectCurrent){ 8029f46: b124 cbz r4, 8029f52 log_event_data(LOG_ALARM_UPS, "Норма"); 8029f48: 490d ldr r1, [pc, #52] ; (8029f80 ) 8029f4a: f000 f98b bl 802a264 SNMP_SendUserTrap(CONNECT_MONITOR_NORM); 8029f4e: 2012 movs r0, #18 8029f50: e003 b.n 8029f5a flUpdateLog = true; } else{ log_event_data(LOG_ALARM_UPS, "Авария"); 8029f52: 4908 ldr r1, [pc, #32] ; (8029f74 ) 8029f54: f000 f986 bl 802a264 SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 8029f58: 2011 movs r0, #17 8029f5a: f00d fec1 bl 8037ce0 flUpdateLog = true; 8029f5e: 2301 movs r3, #1 8029f60: 702b strb r3, [r5, #0] } } connectOldState = connectCurrent; 8029f62: 4b03 ldr r3, [pc, #12] ; (8029f70 ) 8029f64: 701c strb r4, [r3, #0] 8029f66: bd38 pop {r3, r4, r5, pc} 8029f68: 2000d7d8 .word 0x2000d7d8 8029f6c: 20000b90 .word 0x20000b90 8029f70: 20000b94 .word 0x20000b94 8029f74: 0803930a .word 0x0803930a 8029f78: 20000bfc .word 0x20000bfc 8029f7c: 20000b98 .word 0x20000b98 8029f80: 08039317 .word 0x08039317 08029f84 : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_BatteryConnectMonitor(void) { 8029f84: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t AKBconnectOldState = 0; uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) 8029f86: 4b1d ldr r3, [pc, #116] ; (8029ffc ) 8029f88: 7cdc ldrb r4, [r3, #19] 8029f8a: 09e2 lsrs r2, r4, #7 AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 8029f8c: 7d1a ldrb r2, [r3, #20] static bool isValueRecv = false; static uint8_t AKBconnectOldState = 0; uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) AKBconnectCurrent = (UPS.Status >> 6) & 0x01; 8029f8e: bf08 it eq 8029f90: f3c4 1480 ubfxeq r4, r4, #6, #1 else{ AKBconnectCurrent = 0; } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 8029f94: f002 0207 and.w r2, r2, #7 uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; 8029f98: bf18 it ne 8029f9a: 2400 movne r4, #0 } UPS.Alarm = (UPS.Alarm & 0x07) | (AKBconnectCurrent << 3); 8029f9c: ea42 02c4 orr.w r2, r2, r4, lsl #3 8029fa0: 751a strb r2, [r3, #20] if (!isValueRecv) { 8029fa2: 4a17 ldr r2, [pc, #92] ; (802a000 ) 8029fa4: 4b17 ldr r3, [pc, #92] ; (802a004 ) 8029fa6: 7811 ldrb r1, [r2, #0] 8029fa8: b969 cbnz r1, 8029fc6 isValueRecv = true; 8029faa: 2501 movs r5, #1 8029fac: 7015 strb r5, [r2, #0] AKBconnectOldState = AKBconnectCurrent; 8029fae: 701c strb r4, [r3, #0] if (AKBconnectCurrent){ 8029fb0: b314 cbz r4, 8029ff8 log_event_data(LOG_ALARM_AKB, "Авария"); 8029fb2: 2010 movs r0, #16 8029fb4: 4914 ldr r1, [pc, #80] ; (802a008 ) 8029fb6: f000 f955 bl 802a264 SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 8029fba: 2013 movs r0, #19 8029fbc: f00d fe90 bl 8037ce0 flUpdateLog = true; 8029fc0: 4b12 ldr r3, [pc, #72] ; (802a00c ) 8029fc2: 701d strb r5, [r3, #0] 8029fc4: bd38 pop {r3, r4, r5, pc} } return; } if (AKBconnectCurrent) 8029fc6: b114 cbz r4, 8029fce flCriticalAlarm = true; 8029fc8: 4a11 ldr r2, [pc, #68] ; (802a010 ) 8029fca: 2101 movs r1, #1 8029fcc: 7011 strb r1, [r2, #0] // Значение параметра изменилось if (AKBconnectCurrent != AKBconnectOldState) 8029fce: 781b ldrb r3, [r3, #0] 8029fd0: 42a3 cmp r3, r4 8029fd2: d00f beq.n 8029ff4 8029fd4: 4d0d ldr r5, [pc, #52] ; (802a00c ) { if (!AKBconnectCurrent){ log_event_data(LOG_ALARM_AKB, "Норма"); 8029fd6: 2010 movs r0, #16 if (AKBconnectCurrent) flCriticalAlarm = true; // Значение параметра изменилось if (AKBconnectCurrent != AKBconnectOldState) { if (!AKBconnectCurrent){ 8029fd8: b924 cbnz r4, 8029fe4 log_event_data(LOG_ALARM_AKB, "Норма"); 8029fda: 490e ldr r1, [pc, #56] ; (802a014 ) 8029fdc: f000 f942 bl 802a264 SNMP_SendUserTrap(BATTERY_CONNECT_NORM); 8029fe0: 2014 movs r0, #20 8029fe2: e003 b.n 8029fec flUpdateLog = true; } else{ log_event_data(LOG_ALARM_AKB, "Авария"); 8029fe4: 4908 ldr r1, [pc, #32] ; (802a008 ) 8029fe6: f000 f93d bl 802a264 SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 8029fea: 2013 movs r0, #19 8029fec: f00d fe78 bl 8037ce0 flUpdateLog = true; 8029ff0: 2301 movs r3, #1 8029ff2: 702b strb r3, [r5, #0] } } AKBconnectOldState = AKBconnectCurrent; 8029ff4: 4b03 ldr r3, [pc, #12] ; (802a004 ) 8029ff6: 701c strb r4, [r3, #0] 8029ff8: bd38 pop {r3, r4, r5, pc} 8029ffa: bf00 nop 8029ffc: 2000d7d8 .word 0x2000d7d8 802a000: 20000ba2 .word 0x20000ba2 802a004: 20000b9e .word 0x20000b9e 802a008: 0803930a .word 0x0803930a 802a00c: 20000bfc .word 0x20000bfc 802a010: 20000b98 .word 0x20000b98 802a014: 08039317 .word 0x08039317 0802a018 : /** * @brief Задача мониторинга параметров UPS */ void UPS_Monitor(void *params) { 802a018: b570 push {r4, r5, r6, lr} vTaskDelay(5000); 802a01a: f241 3088 movw r0, #5000 ; 0x1388 802a01e: f001 fd47 bl 802bab0 for (;;) { flCriticalAlarm = false; 802a022: 4d10 ldr r5, [pc, #64] ; (802a064 ) flNonCriticalAlarm = false; 802a024: 4e10 ldr r6, [pc, #64] ; (802a068 ) void UPS_Monitor(void *params) { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; 802a026: 2400 movs r4, #0 flNonCriticalAlarm = false; // Проверяем флаг подключения UPS if (UPS.Present) 802a028: 4b10 ldr r3, [pc, #64] ; (802a06c ) void UPS_Monitor(void *params) { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; 802a02a: 702c strb r4, [r5, #0] flNonCriticalAlarm = false; // Проверяем флаг подключения UPS if (UPS.Present) 802a02c: f893 302d ldrb.w r3, [r3, #45] ; 0x2d { vTaskDelay(5000); for (;;) { flCriticalAlarm = false; flNonCriticalAlarm = false; 802a030: 7034 strb r4, [r6, #0] // Проверяем флаг подключения UPS if (UPS.Present) 802a032: b14b cbz r3, 802a048 { UPS_LineFailMonitor(); 802a034: f7ff fe42 bl 8029cbc UPS_LowBatMonitor(); 802a038: f7ff fe7e bl 8029d38 UPS_PowerMonitor(); 802a03c: f7ff febe bl 8029dbc UPS_TemperatureMonitor(); 802a040: f7ff ff12 bl 8029e68 UPS_BatteryConnectMonitor(); 802a044: f7ff ff9e bl 8029f84 } UPS_ConnectMonitor(); 802a048: f7ff ff56 bl 8029ef8 UPS_DI0Monitor(); 802a04c: f7ff fcb2 bl 80299b4 UPS_CriticalAlarmMonitor(); 802a050: f7ff fcfe bl 8029a50 UPS_NonCriticalAlarmMonitor(); 802a054: f7ff fda0 bl 8029b98 vTaskDelay(1000); 802a058: f44f 707a mov.w r0, #1000 ; 0x3e8 802a05c: f001 fd28 bl 802bab0 } 802a060: e7e2 b.n 802a028 802a062: bf00 nop 802a064: 20000b98 .word 0x20000b98 802a068: 20000b9f .word 0x20000b9f 802a06c: 2000d7d8 .word 0x2000d7d8 0802a070 : } static ssize_t op_read(struct ringfs_flash_partition *flash, int address, void *data, size_t size) { (void)flash; int ret; ret = spi_flash_read(address, data, size, 0); 802a070: 4608 mov r0, r1 802a072: 4611 mov r1, r2 802a074: 461a mov r2, r3 802a076: 2300 movs r3, #0 802a078: f7fc be1e b.w 8026cb8 0802a07c : } static ssize_t op_program(struct ringfs_flash_partition *flash, int address, const void *data, size_t size) { (void)flash; int ret; ret = spi_flash_write(address, data, size, 0); 802a07c: 4608 mov r0, r1 802a07e: 4611 mov r1, r2 802a080: 461a mov r2, r3 802a082: 2300 movs r3, #0 802a084: f7fc be67 b.w 8026d56 0802a088 : #define ALARM_LOG_FLASH_SECTOR_OFFSET 258 static int op_sector_erase(struct ringfs_flash_partition *flash, int address) { (void)flash; int ret; ret = spi_flash_erase_sector(address, 0); 802a088: 4608 mov r0, r1 802a08a: 2100 movs r1, #0 802a08c: f7fc be73 b.w 8026d76 0802a090 : return true; } } void log_task(void* params) { 802a090: b508 push {r3, lr} for(;;){ flUpdateLog = true; 802a092: 4c03 ldr r4, [pc, #12] ; (802a0a0 ) 802a094: 2501 movs r5, #1 vTaskDelay(LOG_TIME); 802a096: 4803 ldr r0, [pc, #12] ; (802a0a4 ) } void log_task(void* params) { for(;;){ flUpdateLog = true; 802a098: 7025 strb r5, [r4, #0] vTaskDelay(LOG_TIME); 802a09a: f001 fd09 bl 802bab0 802a09e: e7fa b.n 802a096 802a0a0: 20000bfc .word 0x20000bfc 802a0a4: 000927c0 .word 0x000927c0 0802a0a8 : /** * @brief Отключает журнал для безопасной перезагрузки */ bool LOG_Disable(void) { 802a0a8: b508 push {r3, lr} if (fLogInit) { 802a0aa: 4b08 ldr r3, [pc, #32] ; (802a0cc ) 802a0ac: 781b ldrb r3, [r3, #0] 802a0ae: b15b cbz r3, 802a0c8 /* Ожидаем завершения работы с журнал */ if ( xSemaphoreTake(log_mutex, 10000) == pdTRUE ) { 802a0b0: 4b07 ldr r3, [pc, #28] ; (802a0d0 ) 802a0b2: 2100 movs r1, #0 802a0b4: 6818 ldr r0, [r3, #0] 802a0b6: f242 7210 movw r2, #10000 ; 0x2710 802a0ba: 460b mov r3, r1 802a0bc: f001 f954 bl 802b368 802a0c0: 1e43 subs r3, r0, #1 802a0c2: 4258 negs r0, r3 802a0c4: 4158 adcs r0, r3 802a0c6: bd08 pop {r3, pc} else { return false; } } else { return true; 802a0c8: 2001 movs r0, #1 } } 802a0ca: bd08 pop {r3, pc} 802a0cc: 20000c04 .word 0x20000c04 802a0d0: 20000c00 .word 0x20000c00 0802a0d4 : log_event_data(LOG_SYSTEM_BOOT, "Администратор"); log_add(")215.7;215.7;220.5;000;50.1;2.30;25.0;00000001;");*/ } } void log_init(bool format) { 802a0d4: b51f push {r0, r1, r2, r3, r4, lr} DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) 802a0d6: 4b22 ldr r3, [pc, #136] ; (802a160 ) 802a0d8: 781a ldrb r2, [r3, #0] log_event_data(LOG_SYSTEM_BOOT, "Администратор"); log_add(")215.7;215.7;220.5;000;50.1;2.30;25.0;00000001;");*/ } } void log_init(bool format) { 802a0da: 4604 mov r4, r0 DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) 802a0dc: 2a00 cmp r2, #0 802a0de: d03e beq.n 802a15e return; ringfs_flash.sector_size = spi_flash_desc.sector_size; 802a0e0: 685a ldr r2, [r3, #4] ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 802a0e2: 895b ldrh r3, [r3, #10] void log_init(bool format) { DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) return; ringfs_flash.sector_size = spi_flash_desc.sector_size; 802a0e4: 491f ldr r1, [pc, #124] ; (802a164 ) ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; ringfs_init(&fs, &ringfs_flash, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 802a0e6: 4820 ldr r0, [pc, #128] ; (802a168 ) void log_init(bool format) { DBG printf(">>> Event log\n"); if (!spi_flash_desc.present) return; ringfs_flash.sector_size = spi_flash_desc.sector_size; 802a0e8: 600a str r2, [r1, #0] ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 802a0ea: 085b lsrs r3, r3, #1 802a0ec: 3b04 subs r3, #4 802a0ee: 608b str r3, [r1, #8] ringfs_init(&fs, &ringfs_flash, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 802a0f0: 2201 movs r2, #1 802a0f2: 2338 movs r3, #56 ; 0x38 802a0f4: f000 fba1 bl 802a83a if (format || ringfs_scan(&fs) != 0) 802a0f8: b11c cbz r4, 802a102 ringfs_format(&fs); 802a0fa: 481b ldr r0, [pc, #108] ; (802a168 ) 802a0fc: f000 fba7 bl 802a84e 802a100: e004 b.n 802a10c return; ringfs_flash.sector_size = spi_flash_desc.sector_size; ringfs_flash.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; ringfs_init(&fs, &ringfs_flash, LOG_ENTRY_VERSION, sizeof(log_entry_t)); if (format || ringfs_scan(&fs) != 0) 802a102: 4819 ldr r0, [pc, #100] ; (802a168 ) 802a104: f000 fc85 bl 802aa12 802a108: 2800 cmp r0, #0 802a10a: d1f6 bne.n 802a0fa ringfs_format(&fs); ringfs_flash2.sector_size = spi_flash_desc.sector_size; 802a10c: 4b14 ldr r3, [pc, #80] ; (802a160 ) 802a10e: 4917 ldr r1, [pc, #92] ; (802a16c ) 802a110: 685a ldr r2, [r3, #4] ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 802a112: 895b ldrh r3, [r3, #10] ringfs_init(&fs, &ringfs_flash, LOG_ENTRY_VERSION, sizeof(log_entry_t)); if (format || ringfs_scan(&fs) != 0) ringfs_format(&fs); ringfs_flash2.sector_size = spi_flash_desc.sector_size; 802a114: 600a str r2, [r1, #0] ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; 802a116: 085b lsrs r3, r3, #1 802a118: 3b04 subs r3, #4 802a11a: 608b str r3, [r1, #8] ringfs_init(&fs2, &ringfs_flash2, LOG_ENTRY_VERSION, sizeof(log_entry_t)); 802a11c: 4814 ldr r0, [pc, #80] ; (802a170 ) 802a11e: 2201 movs r2, #1 802a120: 2338 movs r3, #56 ; 0x38 802a122: f000 fb8a bl 802a83a if (format || ringfs_scan(&fs2) != 0) 802a126: b11c cbz r4, 802a130 ringfs_format(&fs2); 802a128: 4811 ldr r0, [pc, #68] ; (802a170 ) 802a12a: f000 fb90 bl 802a84e 802a12e: e004 b.n 802a13a ringfs_flash2.sector_size = spi_flash_desc.sector_size; ringfs_flash2.sector_count = spi_flash_desc.sector_count/2 - LOG_FLASH_SECTOR_OFFSET; ringfs_init(&fs2, &ringfs_flash2, LOG_ENTRY_VERSION, sizeof(log_entry_t)); if (format || ringfs_scan(&fs2) != 0) 802a130: 480f ldr r0, [pc, #60] ; (802a170 ) 802a132: f000 fc6e bl 802aa12 802a136: 2800 cmp r0, #0 802a138: d1f6 bne.n 802a128 ringfs_format(&fs2); fLogInit = true; 802a13a: 4b0e ldr r3, [pc, #56] ; (802a174 ) 802a13c: 2001 movs r0, #1 802a13e: 7018 strb r0, [r3, #0] log_mutex = xSemaphoreCreateMutex(); 802a140: f001 f86c bl 802b21c 802a144: 4b0c ldr r3, [pc, #48] ; (802a178 ) xTaskCreate(log_task, ( char * ) "log_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 802a146: 490d ldr r1, [pc, #52] ; (802a17c ) if (format || ringfs_scan(&fs2) != 0) ringfs_format(&fs2); fLogInit = true; log_mutex = xSemaphoreCreateMutex(); 802a148: 6018 str r0, [r3, #0] xTaskCreate(log_task, ( char * ) "log_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 802a14a: 2300 movs r3, #0 802a14c: 9300 str r3, [sp, #0] 802a14e: 9301 str r3, [sp, #4] 802a150: 9302 str r3, [sp, #8] 802a152: 9303 str r3, [sp, #12] 802a154: 480a ldr r0, [pc, #40] ; (802a180 ) 802a156: f44f 7280 mov.w r2, #256 ; 0x100 802a15a: f001 fa0f bl 802b57c } 802a15e: bd1f pop {r0, r1, r2, r3, r4, pc} 802a160: 2000c890 .word 0x2000c890 802a164: 200006bc .word 0x200006bc 802a168: 20000bd0 .word 0x20000bd0 802a16c: 200006a4 .word 0x200006a4 802a170: 20000ba4 .word 0x20000ba4 802a174: 20000c04 .word 0x20000c04 802a178: 20000c00 .word 0x20000c00 802a17c: 08039348 .word 0x08039348 802a180: 0802a091 .word 0x0802a091 0802a184 : } return 0; } int log_append(log_entry_t *entry) { 802a184: b530 push {r4, r5, lr} int ret; TM_RTC_t data; ret = xSemaphoreTake( log_mutex, portMAX_DELAY ); 802a186: 4b12 ldr r3, [pc, #72] ; (802a1d0 ) 802a188: 2100 movs r1, #0 } return 0; } int log_append(log_entry_t *entry) { 802a18a: b085 sub sp, #20 802a18c: 4604 mov r4, r0 int ret; TM_RTC_t data; ret = xSemaphoreTake( log_mutex, portMAX_DELAY ); 802a18e: f04f 32ff mov.w r2, #4294967295 802a192: 6818 ldr r0, [r3, #0] 802a194: 460b mov r3, r1 802a196: f001 f8e7 bl 802b368 if (ret == pdFALSE) 802a19a: 4605 mov r5, r0 802a19c: b1a8 cbz r0, 802a1ca return ret; if (!entry->timestamp){ 802a19e: 6821 ldr r1, [r4, #0] 802a1a0: b921 cbnz r1, 802a1ac TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 802a1a2: 4668 mov r0, sp 802a1a4: f7fc fb4e bl 8026844 entry->timestamp = data.unix; 802a1a8: 9b03 ldr r3, [sp, #12] 802a1aa: 6023 str r3, [r4, #0] } if(entry->type == LOG_VALUE) 802a1ac: 7923 ldrb r3, [r4, #4] 802a1ae: 2b11 cmp r3, #17 ringfs_append(&fs, entry); 802a1b0: bf0c ite eq 802a1b2: 4808 ldreq r0, [pc, #32] ; (802a1d4 ) else ringfs_append(&fs2, entry); 802a1b4: 4808 ldrne r0, [pc, #32] ; (802a1d8 ) 802a1b6: 4621 mov r1, r4 802a1b8: f000 fb7c bl 802a8b4 xSemaphoreGive(log_mutex); 802a1bc: 4b04 ldr r3, [pc, #16] ; (802a1d0 ) 802a1be: 2100 movs r1, #0 802a1c0: 6818 ldr r0, [r3, #0] 802a1c2: 460a mov r2, r1 802a1c4: 460b mov r3, r1 802a1c6: f000 ff8f bl 802b0e8 return ret; } 802a1ca: 4628 mov r0, r5 802a1cc: b005 add sp, #20 802a1ce: bd30 pop {r4, r5, pc} 802a1d0: 20000c00 .word 0x20000c00 802a1d4: 20000bd0 .word 0x20000bd0 802a1d8: 20000ba4 .word 0x20000ba4 0802a1dc : int log_fetch(log_entry_t *entry, uint32_t timeout) { 802a1dc: b570 push {r4, r5, r6, lr} int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802a1de: 4e0d ldr r6, [pc, #52] ; (802a214 ) ringfs_append(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_fetch(log_entry_t *entry, uint32_t timeout) { 802a1e0: 460a mov r2, r1 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802a1e2: 2100 movs r1, #0 ringfs_append(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_fetch(log_entry_t *entry, uint32_t timeout) { 802a1e4: 4605 mov r5, r0 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802a1e6: 460b mov r3, r1 802a1e8: 6830 ldr r0, [r6, #0] 802a1ea: f001 f8bd bl 802b368 if (ret == pdFALSE) 802a1ee: 4604 mov r4, r0 802a1f0: b170 cbz r0, 802a210 return ret; if(entry->type == LOG_VALUE) 802a1f2: 792b ldrb r3, [r5, #4] 802a1f4: 2b11 cmp r3, #17 ret = ringfs_fetch(&fs, entry); 802a1f6: bf0c ite eq 802a1f8: 4807 ldreq r0, [pc, #28] ; (802a218 ) else ret = ringfs_fetch(&fs2, entry); 802a1fa: 4808 ldrne r0, [pc, #32] ; (802a21c ) 802a1fc: 4629 mov r1, r5 802a1fe: f000 fbc3 bl 802a988 xSemaphoreGive(log_mutex); 802a202: 2100 movs r1, #0 if (ret == pdFALSE) return ret; if(entry->type == LOG_VALUE) ret = ringfs_fetch(&fs, entry); else ret = ringfs_fetch(&fs2, entry); 802a204: 4604 mov r4, r0 xSemaphoreGive(log_mutex); 802a206: 460a mov r2, r1 802a208: 6830 ldr r0, [r6, #0] 802a20a: 460b mov r3, r1 802a20c: f000 ff6c bl 802b0e8 return ret; } 802a210: 4620 mov r0, r4 802a212: bd70 pop {r4, r5, r6, pc} 802a214: 20000c00 .word 0x20000c00 802a218: 20000bd0 .word 0x20000bd0 802a21c: 20000ba4 .word 0x20000ba4 0802a220 : int log_rewind(log_entry_t *entry, uint32_t timeout) { 802a220: b570 push {r4, r5, r6, lr} int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802a222: 4d0d ldr r5, [pc, #52] ; (802a258 ) ret = ringfs_fetch(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_rewind(log_entry_t *entry, uint32_t timeout) { 802a224: 460a mov r2, r1 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802a226: 2100 movs r1, #0 ret = ringfs_fetch(&fs2, entry); xSemaphoreGive(log_mutex); return ret; } int log_rewind(log_entry_t *entry, uint32_t timeout) { 802a228: 4606 mov r6, r0 int ret; ret = xSemaphoreTake( log_mutex, (TickType_t)timeout ); 802a22a: 460b mov r3, r1 802a22c: 6828 ldr r0, [r5, #0] 802a22e: f001 f89b bl 802b368 if (ret == pdFALSE) 802a232: 4604 mov r4, r0 802a234: b168 cbz r0, 802a252 return ret; if(entry->type == LOG_VALUE) 802a236: 7933 ldrb r3, [r6, #4] 802a238: 2b11 cmp r3, #17 ret = ringfs_rewind(&fs); 802a23a: bf0c ite eq 802a23c: 4807 ldreq r0, [pc, #28] ; (802a25c ) else ret = ringfs_rewind(&fs2); 802a23e: 4808 ldrne r0, [pc, #32] ; (802a260 ) 802a240: f000 fbdc bl 802a9fc xSemaphoreGive(log_mutex); 802a244: 2100 movs r1, #0 if (ret == pdFALSE) return ret; if(entry->type == LOG_VALUE) ret = ringfs_rewind(&fs); else ret = ringfs_rewind(&fs2); 802a246: 4604 mov r4, r0 xSemaphoreGive(log_mutex); 802a248: 460a mov r2, r1 802a24a: 6828 ldr r0, [r5, #0] 802a24c: 460b mov r3, r1 802a24e: f000 ff4b bl 802b0e8 return ret; } 802a252: 4620 mov r0, r4 802a254: bd70 pop {r4, r5, r6, pc} 802a256: bf00 nop 802a258: 20000c00 .word 0x20000c00 802a25c: 20000bd0 .word 0x20000bd0 802a260: 20000ba4 .word 0x20000ba4 0802a264 : xSemaphoreGive(log_mutex); return ret; } void log_event_data(log_type_t type, char *data) { 802a264: b500 push {lr} 802a266: b08f sub sp, #60 ; 0x3c log_entry_t entry_data; entry_data.timestamp = 0; 802a268: 2300 movs r3, #0 802a26a: 9300 str r3, [sp, #0] entry_data.type = type; strncpy(entry_data.data, data, 49); 802a26c: 446b add r3, sp void log_event_data(log_type_t type, char *data) { log_entry_t entry_data; entry_data.timestamp = 0; entry_data.type = type; 802a26e: f88d 0004 strb.w r0, [sp, #4] strncpy(entry_data.data, data, 49); 802a272: 2231 movs r2, #49 ; 0x31 802a274: 1d58 adds r0, r3, #5 802a276: f7f8 f85f bl 8022338 if (fLogInit) 802a27a: 4b04 ldr r3, [pc, #16] ; (802a28c ) 802a27c: 781b ldrb r3, [r3, #0] 802a27e: b113 cbz r3, 802a286 log_append(&entry_data); 802a280: 4668 mov r0, sp 802a282: f7ff ff7f bl 802a184 } 802a286: b00f add sp, #60 ; 0x3c 802a288: bd00 pop {pc} 802a28a: bf00 nop 802a28c: 20000c04 .word 0x20000c04 0802a290 : void log_add(char *log_data) { 802a290: b530 push {r4, r5, lr} 802a292: b08f sub sp, #60 ; 0x3c 802a294: 4605 mov r5, r0 char buf_value[50]; uint8_t i, len; memset(buf_value, 0, 50); 802a296: 2100 movs r1, #0 802a298: 2232 movs r2, #50 ; 0x32 802a29a: a801 add r0, sp, #4 802a29c: f7f7 fdbc bl 8021e18 len = strlen(log_data); 802a2a0: 4628 mov r0, r5 802a2a2: f7f7 ff91 bl 80221c8 802a2a6: b2c4 uxtb r4, r0 strncpy(buf_value, log_data, len); 802a2a8: 4629 mov r1, r5 802a2aa: a801 add r0, sp, #4 802a2ac: 4622 mov r2, r4 802a2ae: f7f8 f843 bl 8022338 buf_value[0] = '\"'; 802a2b2: 2322 movs r3, #34 ; 0x22 802a2b4: f88d 3004 strb.w r3, [sp, #4] for(i = 0; i < len; i++) { if(buf_value[i] == ' ') buf_value[i] = ';'; 802a2b8: 213b movs r1, #59 ; 0x3b len = strlen(log_data); strncpy(buf_value, log_data, len); buf_value[0] = '\"'; for(i = 0; i < len; i++) 802a2ba: 2300 movs r3, #0 802a2bc: e005 b.n 802a2ca { if(buf_value[i] == ' ') 802a2be: aa01 add r2, sp, #4 802a2c0: 5c98 ldrb r0, [r3, r2] 802a2c2: 2820 cmp r0, #32 buf_value[i] = ';'; 802a2c4: bf08 it eq 802a2c6: 5499 strbeq r1, [r3, r2] 802a2c8: 3301 adds r3, #1 len = strlen(log_data); strncpy(buf_value, log_data, len); buf_value[0] = '\"'; for(i = 0; i < len; i++) 802a2ca: b2da uxtb r2, r3 802a2cc: 42a2 cmp r2, r4 802a2ce: d3f6 bcc.n 802a2be { if(buf_value[i] == ' ') buf_value[i] = ';'; } buf_value[len - 1] = ';'; 802a2d0: ab0e add r3, sp, #56 ; 0x38 802a2d2: 191c adds r4, r3, r4 802a2d4: 233b movs r3, #59 ; 0x3b 802a2d6: f804 3c35 strb.w r3, [r4, #-53] if(fLogInit){ 802a2da: 4b04 ldr r3, [pc, #16] ; (802a2ec ) 802a2dc: 781b ldrb r3, [r3, #0] 802a2de: b11b cbz r3, 802a2e8 if(fs.write.slot>67) { log_entry_t entry_data; entry_data.timestamp = 0; log_event_data(LOG_VALUE, buf_value); 802a2e0: 2011 movs r0, #17 802a2e2: a901 add r1, sp, #4 802a2e4: f7ff ffbe bl 802a264 } else log_event_data(LOG_VALUE, buf_value); } } 802a2e8: b00f add sp, #60 ; 0x3c 802a2ea: bd30 pop {r4, r5, pc} 802a2ec: 20000c04 .word 0x20000c04 0802a2f0 : * @brief Возвращает true если журнал проинициализирован */ bool LOG_IsInit() { return fLogInit; } 802a2f0: 4b01 ldr r3, [pc, #4] ; (802a2f8 ) 802a2f2: 7818 ldrb r0, [r3, #0] 802a2f4: 4770 bx lr 802a2f6: bf00 nop 802a2f8: 20000c04 .word 0x20000c04 0802a2fc : /** * @brief Возвращает общее количество страниц */ uint32_t LOG_GetPageCount(void) { 802a2fc: b508 push {r3, lr} return (((ringfs_count_estimate(&fs)) / 10) + 1); 802a2fe: 4804 ldr r0, [pc, #16] ; (802a310 ) 802a300: f000 fac6 bl 802a890 802a304: 230a movs r3, #10 802a306: fb90 f0f3 sdiv r0, r0, r3 } 802a30a: 3001 adds r0, #1 802a30c: bd08 pop {r3, pc} 802a30e: bf00 nop 802a310: 20000bd0 .word 0x20000bd0 0802a314 : uint32_t LOG_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs); 802a314: 4801 ldr r0, [pc, #4] ; (802a31c ) 802a316: f000 babb b.w 802a890 802a31a: bf00 nop 802a31c: 20000bd0 .word 0x20000bd0 0802a320 : } void LOG_GetPage(char *str, uint32_t page) { 802a320: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802a324: b09d sub sp, #116 ; 0x74 802a326: 460d mov r5, r1 802a328: 4606 mov r6, r0 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; int start =LOG_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); 802a32a: f7ff fff3 bl 802a314 memset(buf, 0, 20); 802a32e: 2100 movs r1, #0 { TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; int start =LOG_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); 802a330: 4604 mov r4, r0 memset(buf, 0, 20); 802a332: 2214 movs r2, #20 802a334: a809 add r0, sp, #36 ; 0x24 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 802a336: f06f 0809 mvn.w r8, #9 log_entry_t entry; char buf[20]; uint8_t i; int start =LOG_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); memset(buf, 0, 20); 802a33a: f7f7 fd6d bl 8021e18 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 802a33e: fb08 4805 mla r8, r8, r5, r4 802a342: 4c2a ldr r4, [pc, #168] ; (802a3ec ) 802a344: f108 0809 add.w r8, r8, #9 802a348: 2500 movs r5, #0 fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; } entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); entry.data[49] = 0; strncat(str, entry.data, strlen(entry.data)); 802a34a: f10d 073d add.w r7, sp, #61 ; 0x3d uint32_t LOG_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs); } void LOG_GetPage(char *str, uint32_t page) 802a34e: ebc5 0308 rsb r3, r5, r8 int start =LOG_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); memset(buf, 0, 20); for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; if(fs.cursor_position < 0) 802a352: 2b00 cmp r3, #0 uint8_t i; int start =LOG_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); memset(buf, 0, 20); for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; 802a354: 62a3 str r3, [r4, #40] ; 0x28 if(fs.cursor_position < 0) 802a356: db46 blt.n 802a3e6 break; else{ fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 802a358: f8d4 900c ldr.w r9, [r4, #12] 802a35c: 6920 ldr r0, [r4, #16] 802a35e: 6821 ldr r1, [r4, #0] 802a360: fb93 f2f9 sdiv r2, r3, r9 802a364: eb02 0e00 add.w lr, r2, r0 802a368: 6888 ldr r0, [r1, #8] 802a36a: fb9e fcf0 sdiv ip, lr, r0 802a36e: fb00 e01c mls r0, r0, ip, lr fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 802a372: fb09 3312 mls r3, r9, r2, r3 for(i=0; i < 10; i++){ fs.cursor_position = start - 10*(page-1) - 1 - i; if(fs.cursor_position < 0) break; else{ fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 802a376: 6220 str r0, [r4, #32] fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 802a378: 6263 str r3, [r4, #36] ; 0x24 } entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); 802a37a: f04f 31ff mov.w r1, #4294967295 break; else{ fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; } entry.type = LOG_VALUE; 802a37e: 2311 movs r3, #17 log_fetch(&entry, portMAX_DELAY); 802a380: a80e add r0, sp, #56 ; 0x38 break; else{ fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; } entry.type = LOG_VALUE; 802a382: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 802a386: f7ff ff29 bl 802a1dc entry.data[49] = 0; 802a38a: 2300 movs r3, #0 strncat(str, entry.data, strlen(entry.data)); 802a38c: 4638 mov r0, r7 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; } entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); entry.data[49] = 0; 802a38e: f88d 306e strb.w r3, [sp, #110] ; 0x6e strncat(str, entry.data, strlen(entry.data)); 802a392: f7f7 ff19 bl 80221c8 802a396: 4639 mov r1, r7 802a398: 4602 mov r2, r0 802a39a: 4630 mov r0, r6 802a39c: f7f7 ff44 bl 8022228 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 802a3a0: a805 add r0, sp, #20 802a3a2: 990e ldr r1, [sp, #56] ; 0x38 802a3a4: f7fc fade bl 8026964 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 802a3a8: f89d 101d ldrb.w r1, [sp, #29] 802a3ac: f89d 201b ldrb.w r2, [sp, #27] 802a3b0: 9100 str r1, [sp, #0] 802a3b2: f89d 1019 ldrb.w r1, [sp, #25] 802a3b6: f89d 301c ldrb.w r3, [sp, #28] 802a3ba: 9101 str r1, [sp, #4] 802a3bc: f89d 1018 ldrb.w r1, [sp, #24] 802a3c0: 9102 str r1, [sp, #8] 802a3c2: f89d 1014 ldrb.w r1, [sp, #20] 802a3c6: a809 add r0, sp, #36 ; 0x24 802a3c8: 9103 str r1, [sp, #12] 802a3ca: 4909 ldr r1, [pc, #36] ; (802a3f0 ) 802a3cc: f7fd fc8c bl 8027ce8 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 802a3d0: a909 add r1, sp, #36 ; 0x24 802a3d2: 4630 mov r0, r6 802a3d4: f7f7 fd86 bl 8021ee4 802a3d8: 3501 adds r5, #1 strcat(str, "\","); 802a3da: 4630 mov r0, r6 802a3dc: 4905 ldr r1, [pc, #20] ; (802a3f4 ) 802a3de: f7f7 fd81 bl 8021ee4 char buf[20]; uint8_t i; int start =LOG_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); memset(buf, 0, 20); for(i=0; i < 10; i++){ 802a3e2: 2d0a cmp r5, #10 802a3e4: d1b3 bne.n 802a34e sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); strcat(str, "\","); } } 802a3e6: b01d add sp, #116 ; 0x74 802a3e8: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802a3ec: 20000bd0 .word 0x20000bd0 802a3f0: 08039351 .word 0x08039351 802a3f4: 0803936f .word 0x0803936f 0802a3f8 : uint32_t LOG_GetData(int ptr, char *str, uint32_t size, bool start) { 802a3f8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802a3fc: b09c sub sp, #112 ; 0x70 802a3fe: 4690 mov r8, r2 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; entry.type = LOG_VALUE; 802a400: 2211 movs r2, #17 strcat(str, "\","); } } uint32_t LOG_GetData(int ptr, char *str, uint32_t size, bool start) { 802a402: 4605 mov r5, r0 802a404: 460c mov r4, r1 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; entry.type = LOG_VALUE; 802a406: f88d 203c strb.w r2, [sp, #60] ; 0x3c if(start) 802a40a: b123 cbz r3, 802a416 log_rewind(&entry, portMAX_DELAY); 802a40c: a80e add r0, sp, #56 ; 0x38 802a40e: f04f 31ff mov.w r1, #4294967295 802a412: f7ff ff05 bl 802a220 fs.cursor_position = ptr/STRING_SIZE; 802a416: 4b2c ldr r3, [pc, #176] ; (802a4c8 ) 802a418: 2040 movs r0, #64 ; 0x40 802a41a: fb95 f0f0 sdiv r0, r5, r0 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 802a41e: 681e ldr r6, [r3, #0] 802a420: 68dd ldr r5, [r3, #12] 802a422: 691f ldr r7, [r3, #16] 802a424: 68b6 ldr r6, [r6, #8] uint8_t i; entry.type = LOG_VALUE; if(start) log_rewind(&entry, portMAX_DELAY); fs.cursor_position = ptr/STRING_SIZE; 802a426: 6298 str r0, [r3, #40] ; 0x28 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 802a428: fb90 f1f5 sdiv r1, r0, r5 802a42c: 19cf adds r7, r1, r7 802a42e: fb97 f2f6 sdiv r2, r7, r6 802a432: fb06 7612 mls r6, r6, r2, r7 fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 802a436: fb05 0011 mls r0, r5, r1, r0 entry.type = LOG_VALUE; if(start) log_rewind(&entry, portMAX_DELAY); fs.cursor_position = ptr/STRING_SIZE; fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; 802a43a: 621e str r6, [r3, #32] fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; 802a43c: 6258 str r0, [r3, #36] ; 0x24 for(i = 0; i < size/STRING_SIZE; i++) 802a43e: ea4f 1798 mov.w r7, r8, lsr #6 802a442: 2500 movs r5, #0 { entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); entry.data[49] = 0; strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 802a444: f10d 063d add.w r6, sp, #61 ; 0x3d fs.cursor_position = ptr/STRING_SIZE; fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; for(i = 0; i < size/STRING_SIZE; i++) 802a448: e035 b.n 802a4b6 { entry.type = LOG_VALUE; 802a44a: 2311 movs r3, #17 log_fetch(&entry, portMAX_DELAY); 802a44c: f04f 31ff mov.w r1, #4294967295 802a450: a80e add r0, sp, #56 ; 0x38 fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; for(i = 0; i < size/STRING_SIZE; i++) { entry.type = LOG_VALUE; 802a452: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 802a456: f7ff fec1 bl 802a1dc entry.data[49] = 0; 802a45a: 2300 movs r3, #0 strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 802a45c: 4630 mov r0, r6 for(i = 0; i < size/STRING_SIZE; i++) { entry.type = LOG_VALUE; log_fetch(&entry, portMAX_DELAY); entry.data[49] = 0; 802a45e: f88d 306e strb.w r3, [sp, #110] ; 0x6e strncat(str, &entry.data[1], (strlen(entry.data) - 1)); 802a462: f7f7 feb1 bl 80221c8 802a466: f10d 013e add.w r1, sp, #62 ; 0x3e 802a46a: 1e42 subs r2, r0, #1 802a46c: 4620 mov r0, r4 802a46e: f7f7 fedb bl 8022228 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 802a472: a805 add r0, sp, #20 802a474: 990e ldr r1, [sp, #56] ; 0x38 802a476: f7fc fa75 bl 8026964 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 802a47a: f89d 101d ldrb.w r1, [sp, #29] 802a47e: f89d 201b ldrb.w r2, [sp, #27] 802a482: 9100 str r1, [sp, #0] 802a484: f89d 1019 ldrb.w r1, [sp, #25] 802a488: f89d 301c ldrb.w r3, [sp, #28] 802a48c: 9101 str r1, [sp, #4] 802a48e: f89d 1018 ldrb.w r1, [sp, #24] 802a492: 9102 str r1, [sp, #8] 802a494: f89d 1014 ldrb.w r1, [sp, #20] 802a498: a809 add r0, sp, #36 ; 0x24 802a49a: 9103 str r1, [sp, #12] 802a49c: 490b ldr r1, [pc, #44] ; (802a4cc ) 802a49e: f7fd fc23 bl 8027ce8 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 802a4a2: a909 add r1, sp, #36 ; 0x24 802a4a4: 4620 mov r0, r4 802a4a6: f7f7 fd1d bl 8021ee4 strcat(str, "\n"); 802a4aa: 4620 mov r0, r4 802a4ac: 4908 ldr r1, [pc, #32] ; (802a4d0 ) 802a4ae: f7f7 fd19 bl 8021ee4 fs.cursor_position = ptr/STRING_SIZE; fs.cursor.sector = (fs.read.sector + fs.cursor_position/fs.slots_per_sector)%fs.flash->sector_count; fs.cursor.slot = fs.cursor_position%fs.slots_per_sector; for(i = 0; i < size/STRING_SIZE; i++) 802a4b2: 3501 adds r5, #1 802a4b4: b2ed uxtb r5, r5 802a4b6: 42bd cmp r5, r7 802a4b8: d3c7 bcc.n 802a44a sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); strcat(str, "\n"); } return strlen(str); 802a4ba: 4620 mov r0, r4 802a4bc: f7f7 fe84 bl 80221c8 } 802a4c0: b01c add sp, #112 ; 0x70 802a4c2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802a4c6: bf00 nop 802a4c8: 20000bd0 .word 0x20000bd0 802a4cc: 08039351 .word 0x08039351 802a4d0: 080405c0 .word 0x080405c0 0802a4d4 : /** * @brief Возвращает общее количество страниц */ uint32_t History_GetPageCount(void) { 802a4d4: b508 push {r3, lr} return (((ringfs_count_estimate(&fs2)) / 10) + 1); 802a4d6: 4804 ldr r0, [pc, #16] ; (802a4e8 ) 802a4d8: f000 f9da bl 802a890 802a4dc: 230a movs r3, #10 802a4de: fb90 f0f3 sdiv r0, r0, r3 } 802a4e2: 3001 adds r0, #1 802a4e4: bd08 pop {r3, pc} 802a4e6: bf00 nop 802a4e8: 20000ba4 .word 0x20000ba4 0802a4ec : uint32_t History_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs2); 802a4ec: 4801 ldr r0, [pc, #4] ; (802a4f4 ) 802a4ee: f000 b9cf b.w 802a890 802a4f2: bf00 nop 802a4f4: 20000ba4 .word 0x20000ba4 0802a4f8 : } void History_GetPage(char *str, uint32_t page) { 802a4f8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802a4fc: b09d sub sp, #116 ; 0x74 802a4fe: 460e mov r6, r1 802a500: 4604 mov r4, r0 TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; int start =History_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); 802a502: f7ff fff3 bl 802a4ec memset(buf, 0, 20); 802a506: 2100 movs r1, #0 { TM_RTC_t rtc_data; log_entry_t entry; char buf[20]; uint8_t i; int start =History_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); 802a508: 4605 mov r5, r0 memset(buf, 0, 20); 802a50a: 2214 movs r2, #20 802a50c: a809 add r0, sp, #36 ; 0x24 for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 802a50e: f06f 0909 mvn.w r9, #9 log_entry_t entry; char buf[20]; uint8_t i; int start =History_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); memset(buf, 0, 20); 802a512: f7f7 fc81 bl 8021e18 for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 802a516: fb09 5906 mla r9, r9, r6, r5 802a51a: 4d38 ldr r5, [pc, #224] ; (802a5fc ) 802a51c: f109 0909 add.w r9, r9, #9 802a520: 2600 movs r6, #0 log_fetch(&entry, portMAX_DELAY); strcat(str, "\""); strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); strcat(str, ";"); entry.data[49] = 0; strncat(str, entry.data, (strlen(entry.data) )); 802a522: f10d 073d add.w r7, sp, #61 ; 0x3d uint32_t History_GetTotalSTRCount(void) { return ringfs_count_estimate(&fs2); } void History_GetPage(char *str, uint32_t page) 802a526: ebc6 0309 rsb r3, r6, r9 int start =History_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); memset(buf, 0, 20); for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; if(fs2.cursor_position < 0) 802a52a: 2b00 cmp r3, #0 uint8_t i; int start =History_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); memset(buf, 0, 20); for(i=0; i < 10; i++){ fs2.cursor_position = start - 10*(page-1) - 1 - i; 802a52c: 62ab str r3, [r5, #40] ; 0x28 if(fs2.cursor_position < 0) 802a52e: db61 blt.n 802a5f4 break; else{ fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs.slots_per_sector)%fs2.flash->sector_count; 802a530: 4a33 ldr r2, [pc, #204] ; (802a600 ) 802a532: 68d1 ldr r1, [r2, #12] 802a534: 692a ldr r2, [r5, #16] 802a536: fb93 f1f1 sdiv r1, r3, r1 802a53a: 1889 adds r1, r1, r2 802a53c: 682a ldr r2, [r5, #0] 802a53e: 6892 ldr r2, [r2, #8] 802a540: fb91 f0f2 sdiv r0, r1, r2 802a544: fb02 1210 mls r2, r2, r0, r1 802a548: 622a str r2, [r5, #32] fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 802a54a: 68ea ldr r2, [r5, #12] 802a54c: fb93 f1f2 sdiv r1, r3, r2 802a550: fb02 3311 mls r3, r2, r1, r3 802a554: 626b str r3, [r5, #36] ; 0x24 } entry.type = LOG_LOGIN; log_fetch(&entry, portMAX_DELAY); 802a556: f04f 31ff mov.w r1, #4294967295 break; else{ fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs.slots_per_sector)%fs2.flash->sector_count; fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; } entry.type = LOG_LOGIN; 802a55a: 2305 movs r3, #5 log_fetch(&entry, portMAX_DELAY); 802a55c: a80e add r0, sp, #56 ; 0x38 break; else{ fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs.slots_per_sector)%fs2.flash->sector_count; fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; } entry.type = LOG_LOGIN; 802a55e: f88d 303c strb.w r3, [sp, #60] ; 0x3c log_fetch(&entry, portMAX_DELAY); 802a562: f7ff fe3b bl 802a1dc strcat(str, "\""); 802a566: 4927 ldr r1, [pc, #156] ; (802a604 ) 802a568: 4620 mov r0, r4 802a56a: f7f7 fcbb bl 8021ee4 strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); 802a56e: 4b26 ldr r3, [pc, #152] ; (802a608 ) 802a570: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 802a574: f853 8022 ldr.w r8, [r3, r2, lsl #2] 802a578: 4640 mov r0, r8 802a57a: f7f7 fe25 bl 80221c8 802a57e: 4641 mov r1, r8 802a580: 4602 mov r2, r0 802a582: 4620 mov r0, r4 802a584: f7f7 fe50 bl 8022228 strcat(str, ";"); 802a588: 4920 ldr r1, [pc, #128] ; (802a60c ) 802a58a: 4620 mov r0, r4 802a58c: f7f7 fcaa bl 8021ee4 entry.data[49] = 0; 802a590: 2300 movs r3, #0 strncat(str, entry.data, (strlen(entry.data) )); 802a592: 4638 mov r0, r7 entry.type = LOG_LOGIN; log_fetch(&entry, portMAX_DELAY); strcat(str, "\""); strncat(str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]) )); strcat(str, ";"); entry.data[49] = 0; 802a594: f88d 306e strb.w r3, [sp, #110] ; 0x6e strncat(str, entry.data, (strlen(entry.data) )); 802a598: f7f7 fe16 bl 80221c8 802a59c: 4639 mov r1, r7 802a59e: 4602 mov r2, r0 802a5a0: 4620 mov r0, r4 802a5a2: f7f7 fe41 bl 8022228 strcat(str, ";"); 802a5a6: 4919 ldr r1, [pc, #100] ; (802a60c ) 802a5a8: 4620 mov r0, r4 802a5aa: f7f7 fc9b bl 8021ee4 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 802a5ae: a805 add r0, sp, #20 802a5b0: 990e ldr r1, [sp, #56] ; 0x38 802a5b2: f7fc f9d7 bl 8026964 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 802a5b6: f89d 101d ldrb.w r1, [sp, #29] 802a5ba: f89d 201b ldrb.w r2, [sp, #27] 802a5be: 9100 str r1, [sp, #0] 802a5c0: f89d 1019 ldrb.w r1, [sp, #25] 802a5c4: f89d 301c ldrb.w r3, [sp, #28] 802a5c8: 9101 str r1, [sp, #4] 802a5ca: f89d 1018 ldrb.w r1, [sp, #24] 802a5ce: 9102 str r1, [sp, #8] 802a5d0: f89d 1014 ldrb.w r1, [sp, #20] 802a5d4: a809 add r0, sp, #36 ; 0x24 802a5d6: 9103 str r1, [sp, #12] 802a5d8: 490d ldr r1, [pc, #52] ; (802a610 ) 802a5da: f7fd fb85 bl 8027ce8 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); 802a5de: a909 add r1, sp, #36 ; 0x24 802a5e0: 4620 mov r0, r4 802a5e2: f7f7 fc7f bl 8021ee4 802a5e6: 3601 adds r6, #1 strcat(str, "\","); 802a5e8: 4620 mov r0, r4 802a5ea: 490a ldr r1, [pc, #40] ; (802a614 ) 802a5ec: f7f7 fc7a bl 8021ee4 char buf[20]; uint8_t i; int start =History_GetTotalSTRCount();//(fs.write.sector*fs.slots_per_sector + fs.write.slot); memset(buf, 0, 20); for(i=0; i < 10; i++){ 802a5f0: 2e0a cmp r6, #10 802a5f2: d198 bne.n 802a526 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(str, buf); strcat(str, "\","); } } 802a5f4: b01d add sp, #116 ; 0x74 802a5f6: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802a5fa: bf00 nop 802a5fc: 20000ba4 .word 0x20000ba4 802a600: 20000bd0 .word 0x20000bd0 802a604: 0804443b .word 0x0804443b 802a608: 200006d4 .word 0x200006d4 802a60c: 08039372 .word 0x08039372 802a610: 08039351 .word 0x08039351 802a614: 0803936f .word 0x0803936f 0802a618 : uint32_t History_GetData(int ptr, char *str, uint32_t size, bool start) { 802a618: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802a61c: f5ad 6d8b sub.w sp, sp, #1112 ; 0x458 802a620: 4690 mov r8, r2 log_entry_t entry; char buf[20]; char temp_str[FILE_BUF_MAX_LEN]; uint8_t i; uint16_t len; entry.type = LOG_LOGIN; 802a622: 2205 movs r2, #5 strcat(str, "\","); } } uint32_t History_GetData(int ptr, char *str, uint32_t size, bool start) { 802a624: 4604 mov r4, r0 802a626: 460d mov r5, r1 log_entry_t entry; char buf[20]; char temp_str[FILE_BUF_MAX_LEN]; uint8_t i; uint16_t len; entry.type = LOG_LOGIN; 802a628: f88d 203c strb.w r2, [sp, #60] ; 0x3c if(start) 802a62c: b123 cbz r3, 802a638 log_rewind(&entry, portMAX_DELAY); 802a62e: a80e add r0, sp, #56 ; 0x38 802a630: f04f 31ff mov.w r1, #4294967295 802a634: f7ff fdf4 bl 802a220 fs2.cursor_position = ptr/STRING_SIZE_HISTORY; 802a638: 4b43 ldr r3, [pc, #268] ; (802a748 ) 802a63a: 2164 movs r1, #100 ; 0x64 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 802a63c: 68de ldr r6, [r3, #12] 802a63e: 691f ldr r7, [r3, #16] uint16_t len; entry.type = LOG_LOGIN; if(start) log_rewind(&entry, portMAX_DELAY); fs2.cursor_position = ptr/STRING_SIZE_HISTORY; 802a640: fb94 f4f1 sdiv r4, r4, r1 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 802a644: fb94 f0f6 sdiv r0, r4, r6 802a648: eb00 0e07 add.w lr, r0, r7 802a64c: 681f ldr r7, [r3, #0] uint16_t len; entry.type = LOG_LOGIN; if(start) log_rewind(&entry, portMAX_DELAY); fs2.cursor_position = ptr/STRING_SIZE_HISTORY; 802a64e: 629c str r4, [r3, #40] ; 0x28 fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 802a650: 68bf ldr r7, [r7, #8] 802a652: fb9e f2f7 sdiv r2, lr, r7 fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 802a656: fb06 4410 mls r4, r6, r0, r4 entry.type = LOG_LOGIN; if(start) log_rewind(&entry, portMAX_DELAY); fs2.cursor_position = ptr/STRING_SIZE_HISTORY; fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 802a65a: fb07 e712 mls r7, r7, r2, lr fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; 802a65e: 625c str r4, [r3, #36] ; 0x24 entry.type = LOG_LOGIN; if(start) log_rewind(&entry, portMAX_DELAY); fs2.cursor_position = ptr/STRING_SIZE_HISTORY; fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; 802a660: 621f str r7, [r3, #32] fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; for(i = 0; i < size/STRING_SIZE_HISTORY; i++) 802a662: fbb8 f8f1 udiv r8, r8, r1 802a666: 2400 movs r4, #0 memset(temp_str, 0, 100); log_fetch(&entry, portMAX_DELAY); strncat(temp_str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]))); strcat(temp_str, ";"); entry.data[49] = 0; strncat(temp_str, entry.data, (strlen(entry.data))); 802a668: f10d 063d add.w r6, sp, #61 ; 0x3d fs2.cursor_position = ptr/STRING_SIZE_HISTORY; fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; for(i = 0; i < size/STRING_SIZE_HISTORY; i++) 802a66c: e062 b.n 802a734 { memset(temp_str, 0, 100); 802a66e: 2264 movs r2, #100 ; 0x64 802a670: 2100 movs r1, #0 802a672: a81c add r0, sp, #112 ; 0x70 802a674: f7f7 fbd0 bl 8021e18 log_fetch(&entry, portMAX_DELAY); 802a678: f04f 31ff mov.w r1, #4294967295 802a67c: a80e add r0, sp, #56 ; 0x38 802a67e: f7ff fdad bl 802a1dc strncat(temp_str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]))); 802a682: 4b32 ldr r3, [pc, #200] ; (802a74c ) 802a684: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 802a688: f853 7022 ldr.w r7, [r3, r2, lsl #2] 802a68c: 4638 mov r0, r7 802a68e: f7f7 fd9b bl 80221c8 802a692: 4639 mov r1, r7 802a694: 4602 mov r2, r0 802a696: a81c add r0, sp, #112 ; 0x70 802a698: f7f7 fdc6 bl 8022228 strcat(temp_str, ";"); 802a69c: 492c ldr r1, [pc, #176] ; (802a750 ) 802a69e: a81c add r0, sp, #112 ; 0x70 802a6a0: f7f7 fc20 bl 8021ee4 entry.data[49] = 0; 802a6a4: 2300 movs r3, #0 strncat(temp_str, entry.data, (strlen(entry.data))); 802a6a6: 4630 mov r0, r6 { memset(temp_str, 0, 100); log_fetch(&entry, portMAX_DELAY); strncat(temp_str, logsStrShortRu[entry.type], (strlen(logsStrShortRu[entry.type]))); strcat(temp_str, ";"); entry.data[49] = 0; 802a6a8: f88d 306e strb.w r3, [sp, #110] ; 0x6e strncat(temp_str, entry.data, (strlen(entry.data))); 802a6ac: f7f7 fd8c bl 80221c8 802a6b0: 4631 mov r1, r6 802a6b2: 4602 mov r2, r0 802a6b4: a81c add r0, sp, #112 ; 0x70 802a6b6: f7f7 fdb7 bl 8022228 strcat(temp_str, ";"); 802a6ba: 4925 ldr r1, [pc, #148] ; (802a750 ) 802a6bc: a81c add r0, sp, #112 ; 0x70 802a6be: f7f7 fc11 bl 8021ee4 TM_RTC_GetDateTimeFromUnix(&rtc_data, entry.timestamp); 802a6c2: a805 add r0, sp, #20 802a6c4: 990e ldr r1, [sp, #56] ; 0x38 802a6c6: f7fc f94d bl 8026964 sprintf(buf, "%02i.%02i.%02i %02i:%02i:%02i", rtc_data.date, rtc_data.month, 802a6ca: f89d 101d ldrb.w r1, [sp, #29] 802a6ce: f89d 301c ldrb.w r3, [sp, #28] 802a6d2: 9100 str r1, [sp, #0] 802a6d4: f89d 1019 ldrb.w r1, [sp, #25] 802a6d8: f89d 201b ldrb.w r2, [sp, #27] 802a6dc: 9101 str r1, [sp, #4] 802a6de: f89d 1018 ldrb.w r1, [sp, #24] 802a6e2: 9102 str r1, [sp, #8] 802a6e4: f89d 1014 ldrb.w r1, [sp, #20] 802a6e8: a809 add r0, sp, #36 ; 0x24 802a6ea: 9103 str r1, [sp, #12] 802a6ec: 4919 ldr r1, [pc, #100] ; (802a754 ) 802a6ee: f7fd fafb bl 8027ce8 rtc_data.year, rtc_data.hours, rtc_data.minutes, rtc_data.seconds); strcat(temp_str, buf); 802a6f2: a909 add r1, sp, #36 ; 0x24 802a6f4: a81c add r0, sp, #112 ; 0x70 802a6f6: f7f7 fbf5 bl 8021ee4 len = strlen(temp_str); 802a6fa: a81c add r0, sp, #112 ; 0x70 802a6fc: f7f7 fd64 bl 80221c8 if (len <= STRING_SIZE_HISTORY - 1) 802a700: b283 uxth r3, r0 802a702: 2b63 cmp r3, #99 ; 0x63 802a704: d80c bhi.n 802a720 strncat(str, temp_str, STRING_SIZE_HISTORY); } return strlen(str); } 802a706: 461a mov r2, r3 len = strlen(temp_str); if (len <= STRING_SIZE_HISTORY - 1) { memset(&temp_str[len], ' ', STRING_SIZE_HISTORY - len - 1); 802a708: ab1c add r3, sp, #112 ; 0x70 802a70a: 1898 adds r0, r3, r2 802a70c: 2120 movs r1, #32 802a70e: f1c2 0263 rsb r2, r2, #99 ; 0x63 802a712: f7f7 fb81 bl 8021e18 strcat(temp_str, "\n"); 802a716: a81c add r0, sp, #112 ; 0x70 802a718: 490f ldr r1, [pc, #60] ; (802a758 ) 802a71a: f7f7 fbe3 bl 8021ee4 802a71e: e002 b.n 802a726 } else { temp_str[STRING_SIZE - 1] = 0xa; 802a720: 230a movs r3, #10 802a722: f88d 30af strb.w r3, [sp, #175] ; 0xaf } strncat(str, temp_str, STRING_SIZE_HISTORY); 802a726: 4628 mov r0, r5 802a728: a91c add r1, sp, #112 ; 0x70 802a72a: 2264 movs r2, #100 ; 0x64 802a72c: f7f7 fd7c bl 8022228 fs2.cursor_position = ptr/STRING_SIZE_HISTORY; fs2.cursor.sector = (fs2.read.sector + fs2.cursor_position/fs2.slots_per_sector)%fs2.flash->sector_count; fs2.cursor.slot = fs2.cursor_position%fs2.slots_per_sector; for(i = 0; i < size/STRING_SIZE_HISTORY; i++) 802a730: 3401 adds r4, #1 802a732: b2e4 uxtb r4, r4 802a734: 4544 cmp r4, r8 802a736: d39a bcc.n 802a66e temp_str[STRING_SIZE - 1] = 0xa; } strncat(str, temp_str, STRING_SIZE_HISTORY); } return strlen(str); 802a738: 4628 mov r0, r5 802a73a: f7f7 fd45 bl 80221c8 } 802a73e: b016 add sp, #88 ; 0x58 802a740: f50d 6d80 add.w sp, sp, #1024 ; 0x400 802a744: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802a748: 20000ba4 .word 0x20000ba4 802a74c: 200006d4 .word 0x200006d4 802a750: 08039372 .word 0x08039372 802a754: 08039351 .word 0x08039351 802a758: 080405c0 .word 0x080405c0 0802a75c <_slot_address>: uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a75c: 6803 ldr r3, [r0, #0] 802a75e: 680a ldr r2, [r1, #0] struct slot_header { uint32_t status; }; static int _slot_address(struct ringfs *fs, struct ringfs_loc *loc) { 802a760: b510 push {r4, lr} uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a762: 685c ldr r4, [r3, #4] 802a764: 18a2 adds r2, r4, r2 802a766: 681c ldr r4, [r3, #0] static int _slot_address(struct ringfs *fs, struct ringfs_loc *loc) { return _sector_address(fs, loc->sector) + sizeof(struct sector_header) + (sizeof(struct slot_header) + fs->object_size) * loc->slot; 802a768: 6883 ldr r3, [r0, #8] 802a76a: 6848 ldr r0, [r1, #4] 802a76c: 3304 adds r3, #4 802a76e: 4343 muls r3, r0 }; static int _slot_address(struct ringfs *fs, struct ringfs_loc *loc) { return _sector_address(fs, loc->sector) + sizeof(struct sector_header) + 802a770: fb04 3002 mla r0, r4, r2, r3 (sizeof(struct slot_header) + fs->object_size) * loc->slot; } 802a774: 3008 adds r0, #8 802a776: bd10 pop {r4, pc} 0802a778 <_slot_get_status>: static int _slot_get_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t *status) { 802a778: b570 push {r4, r5, r6, lr} return fs->flash->read(fs->flash, 802a77a: 6804 ldr r4, [r0, #0] sizeof(struct sector_header) + (sizeof(struct slot_header) + fs->object_size) * loc->slot; } static int _slot_get_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t *status) { 802a77c: 4616 mov r6, r2 return fs->flash->read(fs->flash, 802a77e: f7ff ffed bl 802a75c <_slot_address> 802a782: 6965 ldr r5, [r4, #20] 802a784: 4601 mov r1, r0 802a786: 4632 mov r2, r6 802a788: 4620 mov r0, r4 802a78a: 2304 movs r3, #4 802a78c: 47a8 blx r5 _slot_address(fs, loc) + offsetof(struct slot_header, status), status, sizeof(*status)); } 802a78e: bd70 pop {r4, r5, r6, pc} 0802a790 <_slot_set_status>: static int _slot_set_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t status) { 802a790: b573 push {r0, r1, r4, r5, r6, lr} 802a792: ac02 add r4, sp, #8 return fs->flash->program(fs->flash, 802a794: 6805 ldr r5, [r0, #0] _slot_address(fs, loc) + offsetof(struct slot_header, status), status, sizeof(*status)); } static int _slot_set_status(struct ringfs *fs, struct ringfs_loc *loc, uint32_t status) { 802a796: f844 2d04 str.w r2, [r4, #-4]! return fs->flash->program(fs->flash, 802a79a: f7ff ffdf bl 802a75c <_slot_address> 802a79e: 692e ldr r6, [r5, #16] 802a7a0: 4601 mov r1, r0 802a7a2: 4622 mov r2, r4 802a7a4: 4628 mov r0, r5 802a7a6: 2304 movs r3, #4 802a7a8: 47b0 blx r6 _slot_address(fs, loc) + offsetof(struct slot_header, status), &status, sizeof(status)); } 802a7aa: bd7c pop {r2, r3, r4, r5, r6, pc} 0802a7ac <_sector_get_status>: return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; } static int _sector_get_status(struct ringfs *fs, int sector, uint32_t *status) { return fs->flash->read(fs->flash, 802a7ac: 6800 ldr r0, [r0, #0] uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a7ae: 6843 ldr r3, [r0, #4] 802a7b0: 18cb adds r3, r1, r3 802a7b2: 6801 ldr r1, [r0, #0] } static int _sector_get_status(struct ringfs *fs, int sector, uint32_t *status) { 802a7b4: b510 push {r4, lr} return fs->flash->read(fs->flash, 802a7b6: 4359 muls r1, r3 802a7b8: 6944 ldr r4, [r0, #20] 802a7ba: 2304 movs r3, #4 802a7bc: 47a0 blx r4 _sector_address(fs, sector) + offsetof(struct sector_header, status), status, sizeof(*status)); } 802a7be: bd10 pop {r4, pc} 0802a7c0 <_sector_set_status>: static int _sector_set_status(struct ringfs *fs, int sector, uint32_t status) { 802a7c0: b513 push {r0, r1, r4, lr} return fs->flash->program(fs->flash, 802a7c2: 6800 ldr r0, [r0, #0] _sector_address(fs, sector) + offsetof(struct sector_header, status), status, sizeof(*status)); } static int _sector_set_status(struct ringfs *fs, int sector, uint32_t status) { 802a7c4: ab02 add r3, sp, #8 return fs->flash->program(fs->flash, 802a7c6: 6904 ldr r4, [r0, #16] _sector_address(fs, sector) + offsetof(struct sector_header, status), status, sizeof(*status)); } static int _sector_set_status(struct ringfs *fs, int sector, uint32_t status) { 802a7c8: f843 2d04 str.w r2, [r3, #-4]! uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a7cc: 6842 ldr r2, [r0, #4] 802a7ce: 188a adds r2, r1, r2 802a7d0: 6801 ldr r1, [r0, #0] status, sizeof(*status)); } static int _sector_set_status(struct ringfs *fs, int sector, uint32_t status) { return fs->flash->program(fs->flash, 802a7d2: 4351 muls r1, r2 802a7d4: 461a mov r2, r3 802a7d6: 2304 movs r3, #4 802a7d8: 47a0 blx r4 _sector_address(fs, sector) + offsetof(struct sector_header, status), &status, sizeof(status)); } 802a7da: bd1c pop {r2, r3, r4, pc} 0802a7dc <_sector_free>: static int _sector_free(struct ringfs *fs, int sector) { 802a7dc: b5f8 push {r3, r4, r5, r6, r7, lr} uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a7de: 6803 ldr r3, [r0, #0] 802a7e0: cb28 ldmia r3, {r3, r5} _sector_address(fs, sector) + offsetof(struct sector_header, status), &status, sizeof(status)); } static int _sector_free(struct ringfs *fs, int sector) { 802a7e2: 4604 mov r4, r0 uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a7e4: 194d adds r5, r1, r5 } static int _sector_free(struct ringfs *fs, int sector) { int sector_addr = _sector_address(fs, sector); _sector_set_status(fs, sector, SECTOR_ERASING); 802a7e6: f04f 427f mov.w r2, #4278190080 ; 0xff000000 uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802a7ea: 435d muls r5, r3 _sector_address(fs, sector) + offsetof(struct sector_header, status), &status, sizeof(status)); } static int _sector_free(struct ringfs *fs, int sector) { 802a7ec: 460e mov r6, r1 int sector_addr = _sector_address(fs, sector); _sector_set_status(fs, sector, SECTOR_ERASING); 802a7ee: f7ff ffe7 bl 802a7c0 <_sector_set_status> fs->flash->sector_erase(fs->flash, sector_addr); 802a7f2: 6820 ldr r0, [r4, #0] 802a7f4: 4629 mov r1, r5 802a7f6: 68c3 ldr r3, [r0, #12] 802a7f8: 4798 blx r3 fs->flash->program(fs->flash, 802a7fa: 4622 mov r2, r4 802a7fc: 1d29 adds r1, r5, #4 802a7fe: f852 0b04 ldr.w r0, [r2], #4 802a802: 2304 movs r3, #4 802a804: 6907 ldr r7, [r0, #16] 802a806: 47b8 blx r7 sector_addr + offsetof(struct sector_header, version), &fs->version, sizeof(fs->version)); _sector_set_status(fs, sector, SECTOR_FREE); 802a808: 4620 mov r0, r4 802a80a: 4631 mov r1, r6 802a80c: f06f 02ff mvn.w r2, #255 ; 0xff 802a810: f7ff ffd6 bl 802a7c0 <_sector_set_status> return 0; } 802a814: 2000 movs r0, #0 802a816: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a818 <_loc_advance_slot>: } /** Advance a location to the next slot, advancing the sector too if needed. */ static void _loc_advance_slot(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot++; 802a818: 684b ldr r3, [r1, #4] if (loc->slot >= fs->slots_per_sector) 802a81a: 68c2 ldr r2, [r0, #12] } /** Advance a location to the next slot, advancing the sector too if needed. */ static void _loc_advance_slot(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot++; 802a81c: 3301 adds r3, #1 if (loc->slot >= fs->slots_per_sector) 802a81e: 4293 cmp r3, r2 } /** Advance a location to the next slot, advancing the sector too if needed. */ static void _loc_advance_slot(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot++; 802a820: 604b str r3, [r1, #4] if (loc->slot >= fs->slots_per_sector) 802a822: db09 blt.n 802a838 <_loc_advance_slot+0x20> /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a824: 6800 ldr r0, [r0, #0] /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; 802a826: 680a ldr r2, [r1, #0] if (loc->sector >= fs->flash->sector_count) 802a828: 6880 ldr r0, [r0, #8] /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; 802a82a: 3201 adds r2, #1 } /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; 802a82c: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a82e: 4282 cmp r2, r0 } /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; 802a830: e881 000c stmia.w r1, {r2, r3} loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 802a834: bfa8 it ge 802a836: 600b strge r3, [r1, #0] 802a838: 4770 bx lr 0802a83a : int ringfs_init(struct ringfs *fs, struct ringfs_flash_partition *flash, uint32_t version, int object_size) { /* Copy arguments to instance. */ fs->flash = flash; fs->version = version; fs->object_size = object_size; 802a83a: e880 000e stmia.w r0, {r1, r2, r3} /* Precalculate commonly used values. */ fs->slots_per_sector = (fs->flash->sector_size - sizeof(struct sector_header)) / 802a83e: 680a ldr r2, [r1, #0] (sizeof(struct slot_header) + fs->object_size); 802a840: 3304 adds r3, #4 fs->flash = flash; fs->version = version; fs->object_size = object_size; /* Precalculate commonly used values. */ fs->slots_per_sector = (fs->flash->sector_size - sizeof(struct sector_header)) / 802a842: 3a08 subs r2, #8 802a844: fbb2 f3f3 udiv r3, r2, r3 802a848: 60c3 str r3, [r0, #12] (sizeof(struct slot_header) + fs->object_size); return 0; } 802a84a: 2000 movs r0, #0 802a84c: 4770 bx lr 0802a84e : int ringfs_format(struct ringfs *fs) { 802a84e: b538 push {r3, r4, r5, lr} 802a850: 4604 mov r4, r0 /* Mark all sectors to prevent half-erased filesystems. */ for (int sector=0; sectorflash->sector_count; sector++) 802a852: 2500 movs r5, #0 802a854: e005 b.n 802a862 _sector_set_status(fs, sector, SECTOR_FORMATTING); 802a856: 4629 mov r1, r5 802a858: 4620 mov r0, r4 802a85a: 2200 movs r2, #0 802a85c: f7ff ffb0 bl 802a7c0 <_sector_set_status> } int ringfs_format(struct ringfs *fs) { /* Mark all sectors to prevent half-erased filesystems. */ for (int sector=0; sectorflash->sector_count; sector++) 802a860: 3501 adds r5, #1 802a862: 6823 ldr r3, [r4, #0] 802a864: 689b ldr r3, [r3, #8] 802a866: 429d cmp r5, r3 802a868: dbf5 blt.n 802a856 802a86a: 2500 movs r5, #0 802a86c: e004 b.n 802a878 _sector_set_status(fs, sector, SECTOR_FORMATTING); /* Erase, update version, mark as free. */ for (int sector=0; sectorflash->sector_count; sector++) _sector_free(fs, sector); 802a86e: 4629 mov r1, r5 802a870: 4620 mov r0, r4 802a872: f7ff ffb3 bl 802a7dc <_sector_free> /* Mark all sectors to prevent half-erased filesystems. */ for (int sector=0; sectorflash->sector_count; sector++) _sector_set_status(fs, sector, SECTOR_FORMATTING); /* Erase, update version, mark as free. */ for (int sector=0; sectorflash->sector_count; sector++) 802a876: 3501 adds r5, #1 802a878: 6823 ldr r3, [r4, #0] 802a87a: 689b ldr r3, [r3, #8] 802a87c: 429d cmp r5, r3 802a87e: dbf6 blt.n 802a86e _sector_free(fs, sector); /* Start reading & writing at the first sector. */ fs->read.sector = 0; 802a880: 2000 movs r0, #0 802a882: 6120 str r0, [r4, #16] fs->read.slot = 0; 802a884: 6160 str r0, [r4, #20] fs->write.sector = 0; 802a886: 61a0 str r0, [r4, #24] fs->write.slot = 0; 802a888: 61e0 str r0, [r4, #28] fs->cursor.sector = 0; 802a88a: 6220 str r0, [r4, #32] fs->cursor.slot = 0; 802a88c: 6260 str r0, [r4, #36] ; 0x24 return 0; } 802a88e: bd38 pop {r3, r4, r5, pc} 0802a890 : return fs->slots_per_sector * (fs->flash->sector_count - 1); } int ringfs_count_estimate(struct ringfs *fs) { int sector_diff = (fs->write.sector - fs->read.sector + fs->flash->sector_count) % 802a890: 6803 ldr r3, [r0, #0] 802a892: 6981 ldr r1, [r0, #24] 802a894: 6902 ldr r2, [r0, #16] 802a896: 689b ldr r3, [r3, #8] 802a898: 1a8a subs r2, r1, r2 802a89a: 18d2 adds r2, r2, r3 802a89c: fb92 f1f3 sdiv r1, r2, r3 802a8a0: fb03 2311 mls r3, r3, r1, r2 { return fs->slots_per_sector * (fs->flash->sector_count - 1); } int ringfs_count_estimate(struct ringfs *fs) { 802a8a4: b510 push {r4, lr} int sector_diff = (fs->write.sector - fs->read.sector + fs->flash->sector_count) % fs->flash->sector_count; return sector_diff * fs->slots_per_sector + fs->write.slot - fs->read.slot; 802a8a6: 69c1 ldr r1, [r0, #28] 802a8a8: 68c4 ldr r4, [r0, #12] 802a8aa: 6940 ldr r0, [r0, #20] 802a8ac: fb04 1103 mla r1, r4, r3, r1 } 802a8b0: 1a08 subs r0, r1, r0 802a8b2: bd10 pop {r4, pc} 0802a8b4 : * - the next sector: it must be free (invariant) * - the next-next sector: read & cursor heads are moved there if needed */ /* Make sure the next sector is free. */ int next_sector = (fs->write.sector+1) % fs->flash->sector_count; 802a8b4: 6803 ldr r3, [r0, #0] int ringfs_cursor_position(struct ringfs *fs) { return fs->cursor_position; } int ringfs_append(struct ringfs *fs, const void *object) { 802a8b6: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} * - the next sector: it must be free (invariant) * - the next-next sector: read & cursor heads are moved there if needed */ /* Make sure the next sector is free. */ int next_sector = (fs->write.sector+1) % fs->flash->sector_count; 802a8b8: 6985 ldr r5, [r0, #24] 802a8ba: 689b ldr r3, [r3, #8] 802a8bc: 3501 adds r5, #1 802a8be: fb95 f2f3 sdiv r2, r5, r3 802a8c2: fb03 5512 mls r5, r3, r2, r5 int ringfs_cursor_position(struct ringfs *fs) { return fs->cursor_position; } int ringfs_append(struct ringfs *fs, const void *object) { 802a8c6: 460f mov r7, r1 * - the next-next sector: read & cursor heads are moved there if needed */ /* Make sure the next sector is free. */ int next_sector = (fs->write.sector+1) % fs->flash->sector_count; _sector_get_status(fs, next_sector, &status); 802a8c8: aa01 add r2, sp, #4 802a8ca: 4629 mov r1, r5 int ringfs_cursor_position(struct ringfs *fs) { return fs->cursor_position; } int ringfs_append(struct ringfs *fs, const void *object) { 802a8cc: 4604 mov r4, r0 * - the next-next sector: read & cursor heads are moved there if needed */ /* Make sure the next sector is free. */ int next_sector = (fs->write.sector+1) % fs->flash->sector_count; _sector_get_status(fs, next_sector, &status); 802a8ce: f7ff ff6d bl 802a7ac <_sector_get_status> if (status != SECTOR_FREE) { 802a8d2: 9b01 ldr r3, [sp, #4] 802a8d4: f513 7f80 cmn.w r3, #256 ; 0x100 802a8d8: d01b beq.n 802a912 /* Next sector must be freed. But first... */ /* Move the read & cursor heads out of the way. */ if (fs->read.sector == next_sector) 802a8da: 6923 ldr r3, [r4, #16] 802a8dc: 42ab cmp r3, r5 802a8de: d108 bne.n 802a8f2 /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a8e0: 6821 ldr r1, [r4, #0] 802a8e2: 6889 ldr r1, [r1, #8] /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; 802a8e4: 1c6a adds r2, r5, #1 } /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; 802a8e6: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a8e8: 428a cmp r2, r1 /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; 802a8ea: 6122 str r2, [r4, #16] } /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; 802a8ec: 6163 str r3, [r4, #20] loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 802a8ee: bfa8 it ge 802a8f0: 6123 strge r3, [r4, #16] /* Next sector must be freed. But first... */ /* Move the read & cursor heads out of the way. */ if (fs->read.sector == next_sector) _loc_advance_sector(fs, &fs->read); if (fs->cursor.sector == next_sector) 802a8f2: 6a23 ldr r3, [r4, #32] 802a8f4: 42ab cmp r3, r5 802a8f6: d108 bne.n 802a90a /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a8f8: 6821 ldr r1, [r4, #0] 802a8fa: 6889 ldr r1, [r1, #8] /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; 802a8fc: 1c6a adds r2, r5, #1 } /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; 802a8fe: 2300 movs r3, #0 loc->sector++; if (loc->sector >= fs->flash->sector_count) 802a900: 428a cmp r2, r1 /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; loc->sector++; 802a902: 6222 str r2, [r4, #32] } /** Advance a location to the beginning of the next sector. */ static void _loc_advance_sector(struct ringfs *fs, struct ringfs_loc *loc) { loc->slot = 0; 802a904: 6263 str r3, [r4, #36] ; 0x24 loc->sector++; if (loc->sector >= fs->flash->sector_count) loc->sector = 0; 802a906: bfa8 it ge 802a908: 6223 strge r3, [r4, #32] _loc_advance_sector(fs, &fs->read); if (fs->cursor.sector == next_sector) _loc_advance_sector(fs, &fs->cursor); /* Free the next sector. */ _sector_free(fs, next_sector); 802a90a: 4620 mov r0, r4 802a90c: 4629 mov r1, r5 802a90e: f7ff ff65 bl 802a7dc <_sector_free> } /* Now we can make sure the current write sector is writable. */ _sector_get_status(fs, fs->write.sector, &status); 802a912: 4620 mov r0, r4 802a914: 69a1 ldr r1, [r4, #24] 802a916: aa01 add r2, sp, #4 802a918: f7ff ff48 bl 802a7ac <_sector_get_status> if (status == SECTOR_FREE) { 802a91c: 9b01 ldr r3, [sp, #4] 802a91e: f513 7f80 cmn.w r3, #256 ; 0x100 802a922: d105 bne.n 802a930 /* Free sector. Mark as used. */ _sector_set_status(fs, fs->write.sector, SECTOR_IN_USE); 802a924: 4620 mov r0, r4 802a926: 69a1 ldr r1, [r4, #24] 802a928: 4a15 ldr r2, [pc, #84] ; (802a980 ) 802a92a: f7ff ff49 bl 802a7c0 <_sector_set_status> 802a92e: e008 b.n 802a942 } else if (status != SECTOR_IN_USE) { 802a930: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a934: d005 beq.n 802a942 printf("ringfs_append: corrupted filesystem\r\n"); 802a936: 4813 ldr r0, [pc, #76] ; (802a984 ) 802a938: f7fd f98a bl 8027c50 return -1; 802a93c: f04f 30ff mov.w r0, #4294967295 802a940: e01d b.n 802a97e } /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); 802a942: f104 0518 add.w r5, r4, #24 802a946: f06f 02ff mvn.w r2, #255 ; 0xff 802a94a: 4629 mov r1, r5 802a94c: 4620 mov r0, r4 802a94e: f7ff ff1f bl 802a790 <_slot_set_status> /* Write object. */ fs->flash->program(fs->flash, _slot_address(fs, &fs->write) + sizeof(struct slot_header), 802a952: 4629 mov r1, r5 802a954: 4620 mov r0, r4 802a956: f7ff ff01 bl 802a75c <_slot_address> /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); /* Write object. */ fs->flash->program(fs->flash, 802a95a: 6826 ldr r6, [r4, #0] 802a95c: 68a3 ldr r3, [r4, #8] 802a95e: f8d6 c010 ldr.w ip, [r6, #16] _slot_address(fs, &fs->write) + sizeof(struct slot_header), 802a962: 1d01 adds r1, r0, #4 /* Preallocate slot. */ _slot_set_status(fs, &fs->write, SLOT_RESERVED); /* Write object. */ fs->flash->program(fs->flash, 802a964: 463a mov r2, r7 802a966: 4630 mov r0, r6 802a968: 47e0 blx ip _slot_address(fs, &fs->write) + sizeof(struct slot_header), object, fs->object_size); /* Commit write. */ _slot_set_status(fs, &fs->write, SLOT_VALID); 802a96a: 4629 mov r1, r5 802a96c: 4a04 ldr r2, [pc, #16] ; (802a980 ) 802a96e: 4620 mov r0, r4 802a970: f7ff ff0e bl 802a790 <_slot_set_status> /* Advance the write head. */ _loc_advance_slot(fs, &fs->write); 802a974: 4620 mov r0, r4 802a976: 4629 mov r1, r5 802a978: f7ff ff4e bl 802a818 <_loc_advance_slot> return 0; 802a97c: 2000 movs r0, #0 } 802a97e: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 802a980: ffff0000 .word 0xffff0000 802a984: 0803959f .word 0x0803959f 0802a988 : int ringfs_fetch(struct ringfs *fs, void *object) { 802a988: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 802a98c: 4604 mov r4, r0 802a98e: 4688 mov r8, r1 /* Advance forward in search of a valid slot. */ while (!_loc_equal(&fs->cursor, &fs->write)) { 802a990: f100 0520 add.w r5, r0, #32 802a994: e021 b.n 802a9da uint32_t status; _slot_get_status(fs, &fs->cursor, &status); 802a996: 4620 mov r0, r4 802a998: 4629 mov r1, r5 802a99a: aa01 add r2, sp, #4 802a99c: f7ff feec bl 802a778 <_slot_get_status> if (status == SLOT_VALID) { 802a9a0: 9b01 ldr r3, [sp, #4] 802a9a2: f513 3f80 cmn.w r3, #65536 ; 0x10000 802a9a6: d114 bne.n 802a9d2 fs->flash->read(fs->flash, _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), 802a9a8: 4629 mov r1, r5 802a9aa: 4620 mov r0, r4 802a9ac: f7ff fed6 bl 802a75c <_slot_address> uint32_t status; _slot_get_status(fs, &fs->cursor, &status); if (status == SLOT_VALID) { fs->flash->read(fs->flash, 802a9b0: 6827 ldr r7, [r4, #0] 802a9b2: 68a3 ldr r3, [r4, #8] 802a9b4: f8d7 c014 ldr.w ip, [r7, #20] _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), 802a9b8: 1d01 adds r1, r0, #4 uint32_t status; _slot_get_status(fs, &fs->cursor, &status); if (status == SLOT_VALID) { fs->flash->read(fs->flash, 802a9ba: 4642 mov r2, r8 802a9bc: 4638 mov r0, r7 802a9be: 47e0 blx ip _slot_address(fs, &fs->cursor) + sizeof(struct slot_header), object, fs->object_size); _loc_advance_slot(fs, &fs->cursor); 802a9c0: 4620 mov r0, r4 802a9c2: 4629 mov r1, r5 802a9c4: f7ff ff28 bl 802a818 <_loc_advance_slot> fs->cursor_position++; 802a9c8: 6aa3 ldr r3, [r4, #40] ; 0x28 802a9ca: 3301 adds r3, #1 802a9cc: 62a3 str r3, [r4, #40] ; 0x28 return 0; 802a9ce: 4630 mov r0, r6 802a9d0: e012 b.n 802a9f8 } _loc_advance_slot(fs, &fs->cursor); 802a9d2: 4620 mov r0, r4 802a9d4: 4629 mov r1, r5 802a9d6: f7ff ff1f bl 802a818 <_loc_advance_slot> * @{ */ static bool _loc_equal(struct ringfs_loc *a, struct ringfs_loc *b) { return (a->sector == b->sector) && (a->slot == b->slot); 802a9da: 6a22 ldr r2, [r4, #32] 802a9dc: 69a3 ldr r3, [r4, #24] 802a9de: 429a cmp r2, r3 802a9e0: d105 bne.n 802a9ee 802a9e2: 6a66 ldr r6, [r4, #36] ; 0x24 802a9e4: 69e3 ldr r3, [r4, #28] 802a9e6: 1af1 subs r1, r6, r3 802a9e8: 424e negs r6, r1 802a9ea: 414e adcs r6, r1 802a9ec: e000 b.n 802a9f0 802a9ee: 2600 movs r6, #0 } int ringfs_fetch(struct ringfs *fs, void *object) { /* Advance forward in search of a valid slot. */ while (!_loc_equal(&fs->cursor, &fs->write)) { 802a9f0: 2e00 cmp r6, #0 802a9f2: d0d0 beq.n 802a996 } _loc_advance_slot(fs, &fs->cursor); } return -1; 802a9f4: f04f 30ff mov.w r0, #4294967295 } 802a9f8: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 0802a9fc : return 0; } int ringfs_rewind(struct ringfs *fs) { fs->cursor = fs->read; 802a9fc: f100 0110 add.w r1, r0, #16 fs->cursor_position = 0; return 0; } int ringfs_rewind(struct ringfs *fs) { 802aa00: 4603 mov r3, r0 fs->cursor = fs->read; 802aa02: f100 0220 add.w r2, r0, #32 802aa06: c903 ldmia r1, {r0, r1} 802aa08: e882 0003 stmia.w r2, {r0, r1} fs->cursor_position = 0; 802aa0c: 2000 movs r0, #0 802aa0e: 6298 str r0, [r3, #40] ; 0x28 return 0; } 802aa10: 4770 bx lr 0802aa12 : return 0; } int ringfs_scan(struct ringfs *fs) { 802aa12: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* The read sector is the first IN_USE sector *after* a FREE sector * (or the first one). */ int read_sector = 0; /* The write sector is the last IN_USE sector *before* a FREE sector * (or the last one). */ int write_sector = fs->flash->sector_count - 1; 802aa16: 6803 ldr r3, [r0, #0] 802aa18: 689e ldr r6, [r3, #8] bool free_seen = false; /* If there's no IN_USE sector, we start at the first one. */ bool used_seen = false; /* Iterate over sectors. */ for (int sector=0; sectorflash->sector_count; sector++) { 802aa1a: 2500 movs r5, #0 return 0; } int ringfs_scan(struct ringfs *fs) { 802aa1c: b085 sub sp, #20 802aa1e: 4604 mov r4, r0 /* The read sector is the first IN_USE sector *after* a FREE sector * (or the first one). */ int read_sector = 0; /* The write sector is the last IN_USE sector *before* a FREE sector * (or the last one). */ int write_sector = fs->flash->sector_count - 1; 802aa20: 3e01 subs r6, #1 /* There must be at least one FREE sector available at all times. */ bool free_seen = false; /* If there's no IN_USE sector, we start at the first one. */ bool used_seen = false; 802aa22: 46aa mov sl, r5 int read_sector = 0; /* The write sector is the last IN_USE sector *before* a FREE sector * (or the last one). */ int write_sector = fs->flash->sector_count - 1; /* There must be at least one FREE sector available at all times. */ bool free_seen = false; 802aa24: 46a8 mov r8, r5 int ringfs_scan(struct ringfs *fs) { uint32_t previous_sector_status = SECTOR_FREE; /* The read sector is the first IN_USE sector *after* a FREE sector * (or the first one). */ int read_sector = 0; 802aa26: 46a9 mov r9, r5 return 0; } int ringfs_scan(struct ringfs *fs) { uint32_t previous_sector_status = SECTOR_FREE; 802aa28: f06f 07ff mvn.w r7, #255 ; 0xff bool free_seen = false; /* If there's no IN_USE sector, we start at the first one. */ bool used_seen = false; /* Iterate over sectors. */ for (int sector=0; sectorflash->sector_count; sector++) { 802aa2c: e031 b.n 802aa92 uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802aa2e: 6843 ldr r3, [r0, #4] for (int sector=0; sectorflash->sector_count; sector++) { int addr = _sector_address(fs, sector); /* Read sector header. */ struct sector_header header; fs->flash->read(fs->flash, addr, &header, sizeof(header)); 802aa30: f8d0 c014 ldr.w ip, [r0, #20] uint32_t version; }; static int _sector_address(struct ringfs *fs, int sector_offset) { return (fs->flash->sector_offset + sector_offset) * fs->flash->sector_size; 802aa34: eb05 0b03 add.w fp, r5, r3 802aa38: 6803 ldr r3, [r0, #0] 802aa3a: fb03 fb0b mul.w fp, r3, fp for (int sector=0; sectorflash->sector_count; sector++) { int addr = _sector_address(fs, sector); /* Read sector header. */ struct sector_header header; fs->flash->read(fs->flash, addr, &header, sizeof(header)); 802aa3e: 4659 mov r1, fp 802aa40: 2308 movs r3, #8 802aa42: aa02 add r2, sp, #8 802aa44: 47e0 blx ip /* Detect partially-formatted partitions. */ if (header.status == SECTOR_FORMATTING) { 802aa46: 9b02 ldr r3, [sp, #8] 802aa48: 2b00 cmp r3, #0 802aa4a: d06b beq.n 802ab24 DBG printf("ringfs_scan: partially formatted partition\r\n"); return -1; } /* Detect and fix partially erased sectors. */ if (header.status == SECTOR_ERASING || header.status == SECTOR_ERASED) { 802aa4c: f1b3 4f7f cmp.w r3, #4278190080 ; 0xff000000 802aa50: d001 beq.n 802aa56 802aa52: 3301 adds r3, #1 802aa54: d106 bne.n 802aa64 _sector_free(fs, addr); 802aa56: 4620 mov r0, r4 802aa58: 4659 mov r1, fp 802aa5a: f7ff febf bl 802a7dc <_sector_free> header.status = SECTOR_FREE; 802aa5e: f06f 03ff mvn.w r3, #255 ; 0xff 802aa62: 9302 str r3, [sp, #8] } /* Detect corrupted sectors. */ if (header.status != SECTOR_FREE && header.status != SECTOR_IN_USE) { 802aa64: 9b02 ldr r3, [sp, #8] 802aa66: f513 7f80 cmn.w r3, #256 ; 0x100 802aa6a: d002 beq.n 802aa72 802aa6c: f513 3f80 cmn.w r3, #65536 ; 0x10000 802aa70: d158 bne.n 802ab24 return -1; } /* Detect obsolete versions. We can't do this earlier because the version * could have been invalid due to a partial erase. */ if (header.version != fs->version) { 802aa72: 6862 ldr r2, [r4, #4] 802aa74: 9903 ldr r1, [sp, #12] 802aa76: 4291 cmp r1, r2 802aa78: d154 bne.n 802ab24 DBG printf("ringfs_scan: incompatible version 0x%08"PRIx32"\r\n", header.version); return -1; } /* Record the presence of a FREE sector. */ if (header.status == SECTOR_FREE) 802aa7a: f513 7f80 cmn.w r3, #256 ; 0x100 802aa7e: d05b beq.n 802ab38 free_seen = true; /* Record the presence of a IN_USE sector. */ if (header.status == SECTOR_IN_USE) 802aa80: f513 3f80 cmn.w r3, #65536 ; 0x10000 802aa84: d103 bne.n 802aa8e 802aa86: e050 b.n 802ab2a fs->cursor.slot = 0; return 0; } int ringfs_scan(struct ringfs *fs) 802aa88: 1e6e subs r6, r5, #1 return -1; } /* Record the presence of a FREE sector. */ if (header.status == SECTOR_FREE) free_seen = true; 802aa8a: f04f 0801 mov.w r8, #1 bool free_seen = false; /* If there's no IN_USE sector, we start at the first one. */ bool used_seen = false; /* Iterate over sectors. */ for (int sector=0; sectorflash->sector_count; sector++) { 802aa8e: 3501 adds r5, #1 _sector_free(fs, addr); header.status = SECTOR_FREE; } /* Detect corrupted sectors. */ if (header.status != SECTOR_FREE && header.status != SECTOR_IN_USE) { 802aa90: 461f mov r7, r3 bool free_seen = false; /* If there's no IN_USE sector, we start at the first one. */ bool used_seen = false; /* Iterate over sectors. */ for (int sector=0; sectorflash->sector_count; sector++) { 802aa92: 6820 ldr r0, [r4, #0] 802aa94: 6883 ldr r3, [r0, #8] 802aa96: 429d cmp r5, r3 802aa98: dbc9 blt.n 802aa2e previous_sector_status = header.status; } /* Detect the lack of a FREE sector. */ if (!free_seen) { 802aa9a: f1b8 0f00 cmp.w r8, #0 802aa9e: d041 beq.n 802ab24 return -1; } /* Start writing at the first sector if the filesystem is empty. */ if (!used_seen) { write_sector = 0; 802aaa0: f1ba 0f00 cmp.w sl, #0 802aaa4: bf08 it eq 802aaa6: 2600 moveq r6, #0 } /* Scan the write sector and skip all occupied slots at the beginning. */ fs->write.sector = write_sector; fs->write.slot = 0; 802aaa8: 2300 movs r3, #0 if (!used_seen) { write_sector = 0; } /* Scan the write sector and skip all occupied slots at the beginning. */ fs->write.sector = write_sector; 802aaaa: 61a6 str r6, [r4, #24] fs->write.slot = 0; 802aaac: 61e3 str r3, [r4, #28] while (fs->write.sector == write_sector) { uint32_t status; _slot_get_status(fs, &fs->write, &status); 802aaae: f104 0518 add.w r5, r4, #24 } /* Scan the write sector and skip all occupied slots at the beginning. */ fs->write.sector = write_sector; fs->write.slot = 0; while (fs->write.sector == write_sector) { 802aab2: e00b b.n 802aacc uint32_t status; _slot_get_status(fs, &fs->write, &status); 802aab4: 4620 mov r0, r4 802aab6: 4629 mov r1, r5 802aab8: aa01 add r2, sp, #4 802aaba: f7ff fe5d bl 802a778 <_slot_get_status> if (status == SLOT_ERASED) 802aabe: 9b01 ldr r3, [sp, #4] 802aac0: 3301 adds r3, #1 802aac2: d006 beq.n 802aad2 break; _loc_advance_slot(fs, &fs->write); 802aac4: 4620 mov r0, r4 802aac6: 4629 mov r1, r5 802aac8: f7ff fea6 bl 802a818 <_loc_advance_slot> } /* Scan the write sector and skip all occupied slots at the beginning. */ fs->write.sector = write_sector; fs->write.slot = 0; while (fs->write.sector == write_sector) { 802aacc: 69a3 ldr r3, [r4, #24] 802aace: 42b3 cmp r3, r6 802aad0: d0f0 beq.n 802aab4 /* Position the read head at the start of the first IN_USE sector, then skip * over garbage/invalid slots until something of value is found or we reach * the write head which means there's no data. */ fs->read.sector = read_sector; fs->read.slot = 0; 802aad2: 2300 movs r3, #0 /* If the sector was full, we're at the beginning of a FREE sector now. */ /* Position the read head at the start of the first IN_USE sector, then skip * over garbage/invalid slots until something of value is found or we reach * the write head which means there's no data. */ fs->read.sector = read_sector; 802aad4: f8c4 9010 str.w r9, [r4, #16] fs->read.slot = 0; 802aad8: 6163 str r3, [r4, #20] while (!_loc_equal(&fs->read, &fs->write)) { 802aada: f104 0510 add.w r5, r4, #16 802aade: e00c b.n 802aafa uint32_t status; _slot_get_status(fs, &fs->read, &status); 802aae0: 4620 mov r0, r4 802aae2: 4629 mov r1, r5 802aae4: aa01 add r2, sp, #4 802aae6: f7ff fe47 bl 802a778 <_slot_get_status> if (status == SLOT_VALID) 802aaea: 9b01 ldr r3, [sp, #4] 802aaec: f513 3f80 cmn.w r3, #65536 ; 0x10000 802aaf0: d013 beq.n 802ab1a break; _loc_advance_slot(fs, &fs->read); 802aaf2: 4620 mov r0, r4 802aaf4: 4629 mov r1, r5 802aaf6: f7ff fe8f bl 802a818 <_loc_advance_slot> * @{ */ static bool _loc_equal(struct ringfs_loc *a, struct ringfs_loc *b) { return (a->sector == b->sector) && (a->slot == b->slot); 802aafa: 6922 ldr r2, [r4, #16] 802aafc: 69a3 ldr r3, [r4, #24] 802aafe: 429a cmp r2, r3 802ab00: d108 bne.n 802ab14 802ab02: 69e3 ldr r3, [r4, #28] 802ab04: 6962 ldr r2, [r4, #20] 802ab06: ebb2 0e03 subs.w lr, r2, r3 802ab0a: f1de 0300 rsbs r3, lr, #0 802ab0e: eb53 030e adcs.w r3, r3, lr 802ab12: e000 b.n 802ab16 802ab14: 2300 movs r3, #0 /* Position the read head at the start of the first IN_USE sector, then skip * over garbage/invalid slots until something of value is found or we reach * the write head which means there's no data. */ fs->read.sector = read_sector; fs->read.slot = 0; while (!_loc_equal(&fs->read, &fs->write)) { 802ab16: 2b00 cmp r3, #0 802ab18: d0e2 beq.n 802aae0 _loc_advance_slot(fs, &fs->read); } /* Move the read cursor to the read head position. */ ringfs_rewind(fs); 802ab1a: 4620 mov r0, r4 802ab1c: f7ff ff6e bl 802a9fc return 0; 802ab20: 2000 movs r0, #0 802ab22: e00d b.n 802ab40 } /* Detect the lack of a FREE sector. */ if (!free_seen) { DBG printf("ringfs_scan: invariant violated: no FREE sector found\r\n"); return -1; 802ab24: f04f 30ff mov.w r0, #4294967295 802ab28: e00a b.n 802ab40 /* Record the presence of a IN_USE sector. */ if (header.status == SECTOR_IN_USE) used_seen = true; /* Update read & write sectors according to the above rules. */ if (header.status == SECTOR_IN_USE && previous_sector_status == SECTOR_FREE) 802ab2a: f517 7f80 cmn.w r7, #256 ; 0x100 802ab2e: bf08 it eq 802ab30: 46a9 moveq r9, r5 if (header.status == SECTOR_FREE) free_seen = true; /* Record the presence of a IN_USE sector. */ if (header.status == SECTOR_IN_USE) used_seen = true; 802ab32: f04f 0a01 mov.w sl, #1 802ab36: e7aa b.n 802aa8e /* Update read & write sectors according to the above rules. */ if (header.status == SECTOR_IN_USE && previous_sector_status == SECTOR_FREE) read_sector = sector; if (header.status == SECTOR_FREE && previous_sector_status == SECTOR_IN_USE) 802ab38: f517 3f80 cmn.w r7, #65536 ; 0x10000 802ab3c: d0a4 beq.n 802aa88 802ab3e: e7a4 b.n 802aa8a /* Move the read cursor to the read head position. */ ringfs_rewind(fs); return 0; } 802ab40: b005 add sp, #20 802ab42: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802ab46: 0000 movs r0, r0 0802ab48 : pxOverflowTimerList = pxTemp; } /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 802ab48: b5f8 push {r3, r4, r5, r6, r7, lr} /* Check that the list from which active timers are referenced, and the queue used to communicate with the timer service, have been initialised. */ taskENTER_CRITICAL(); { if( xTimerQueue == NULL ) 802ab4a: 4c0f ldr r4, [pc, #60] ; (802ab88 ) static void prvCheckForValidListAndQueue( void ) { /* Check that the list from which active timers are referenced, and the queue used to communicate with the timer service, have been initialised. */ taskENTER_CRITICAL(); 802ab4c: f001 fa24 bl 802bf98 { if( xTimerQueue == NULL ) 802ab50: 6825 ldr r5, [r4, #0] 802ab52: b9ad cbnz r5, 802ab80 { vListInitialise( &xActiveTimerList1 ); 802ab54: 4f0d ldr r7, [pc, #52] ; (802ab8c ) vListInitialise( &xActiveTimerList2 ); 802ab56: 4e0e ldr r6, [pc, #56] ; (802ab90 ) initialised. */ taskENTER_CRITICAL(); { if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); 802ab58: 4638 mov r0, r7 802ab5a: f000 f997 bl 802ae8c vListInitialise( &xActiveTimerList2 ); 802ab5e: 4630 mov r0, r6 802ab60: f000 f994 bl 802ae8c pxCurrentTimerList = &xActiveTimerList1; 802ab64: 4b0b ldr r3, [pc, #44] ; (802ab94 ) 802ab66: 601f str r7, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 802ab68: 4b0b ldr r3, [pc, #44] ; (802ab98 ) xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802ab6a: 200a movs r0, #10 802ab6c: 210c movs r1, #12 802ab6e: 462a mov r2, r5 if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); vListInitialise( &xActiveTimerList2 ); pxCurrentTimerList = &xActiveTimerList1; pxOverflowTimerList = &xActiveTimerList2; 802ab70: 601e str r6, [r3, #0] xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802ab72: f000 fa7c bl 802b06e 802ab76: 6020 str r0, [r4, #0] configASSERT( xTimerQueue ); 802ab78: b910 cbnz r0, 802ab80 802ab7a: f001 fa05 bl 802bf88 802ab7e: e7fe b.n 802ab7e { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); } 802ab80: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802ab84: f001 ba34 b.w 802bff0 802ab88: 20000c38 .word 0x20000c38 802ab8c: 20000c0c .word 0x20000c0c 802ab90: 20000c20 .word 0x20000c20 802ab94: 20000c08 .word 0x20000c08 802ab98: 20000c3c .word 0x20000c3c 0802ab9c : return xTimeNow; } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 802ab9c: b510 push {r4, lr} 802ab9e: 4604 mov r4, r0 BaseType_t xProcessTimerNow = pdFALSE; listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime ); listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); if( xNextExpiryTime <= xTimeNow ) 802aba0: 4291 cmp r1, r2 static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { BaseType_t xProcessTimerNow = pdFALSE; listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime ); 802aba2: 6041 str r1, [r0, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802aba4: 6120 str r0, [r4, #16] if( xNextExpiryTime <= xTimeNow ) 802aba6: d805 bhi.n 802abb4 { /* Has the expiry time elapsed between the command to start/reset a timer was issued, and the time the command was processed? */ if( ( xTimeNow - xCommandTime ) >= pxTimer->xTimerPeriodInTicks ) 802aba8: 6981 ldr r1, [r0, #24] 802abaa: 1ad2 subs r2, r2, r3 802abac: 428a cmp r2, r1 802abae: d20c bcs.n 802abca processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 802abb0: 4b07 ldr r3, [pc, #28] ; (802abd0 ) 802abb2: e004 b.n 802abbe } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 802abb4: 429a cmp r2, r3 802abb6: d201 bcs.n 802abbc 802abb8: 4299 cmp r1, r3 802abba: d206 bcs.n 802abca its expiry time and should be processed immediately. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802abbc: 4b05 ldr r3, [pc, #20] ; (802abd4 ) 802abbe: 6818 ldr r0, [r3, #0] 802abc0: 1d21 adds r1, r4, #4 802abc2: f000 f97d bl 802aec0 } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { BaseType_t xProcessTimerNow = pdFALSE; 802abc6: 2000 movs r0, #0 802abc8: bd10 pop {r4, pc} timer was issued, and the time the command was processed? */ if( ( xTimeNow - xCommandTime ) >= pxTimer->xTimerPeriodInTicks ) { /* The time between a command being issued and the command being processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; 802abca: 2001 movs r0, #1 vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } } return xProcessTimerNow; } 802abcc: bd10 pop {r4, pc} 802abce: bf00 nop 802abd0: 20000c3c .word 0x20000c3c 802abd4: 20000c08 .word 0x20000c08 0802abd8 : static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { 802abd8: b51f push {r0, r1, r2, r3, r4, lr} /* This function is called when the scheduler is started if configUSE_TIMERS is set to 1. Check that the infrastructure used by the timer service task has been created/initialised. If timers have already been created then the initialisation will already have been performed. */ prvCheckForValidListAndQueue(); 802abda: f7ff ffb5 bl 802ab48 if( xTimerQueue != NULL ) 802abde: 4b0b ldr r3, [pc, #44] ; (802ac0c ) 802abe0: 681b ldr r3, [r3, #0] 802abe2: b913 cbnz r3, 802abea else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802abe4: f001 f9d0 bl 802bf88 802abe8: e00d b.n 802ac06 xReturn = xTaskCreate( prvTimerTask, "Tmr Svc", ( uint16_t ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, &xTimerTaskHandle ); } #else { /* Create the timer task without storing its handle. */ xReturn = xTaskCreate( prvTimerTask, "Tmr Svc", ( uint16_t ) configTIMER_TASK_STACK_DEPTH, NULL, ( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, NULL); 802abea: 2302 movs r3, #2 802abec: 9300 str r3, [sp, #0] 802abee: 2300 movs r3, #0 802abf0: 9301 str r3, [sp, #4] 802abf2: 9302 str r3, [sp, #8] 802abf4: 9303 str r3, [sp, #12] 802abf6: 4806 ldr r0, [pc, #24] ; (802ac10 ) 802abf8: 4906 ldr r1, [pc, #24] ; (802ac14 ) 802abfa: f44f 7280 mov.w r2, #256 ; 0x100 802abfe: f000 fcbd bl 802b57c else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802ac02: b908 cbnz r0, 802ac08 802ac04: e7ee b.n 802abe4 802ac06: e7fe b.n 802ac06 return xReturn; } 802ac08: b005 add sp, #20 802ac0a: bd00 pop {pc} 802ac0c: 20000c38 .word 0x20000c38 802ac10: 0802ad11 .word 0x0802ad11 802ac14: 080395c5 .word 0x080395c5 0802ac18 : /*-----------------------------------------------------------*/ TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { 802ac18: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ac1c: 4680 mov r8, r0 802ac1e: 4617 mov r7, r2 802ac20: 461e mov r6, r3 Timer_t *pxNewTimer; /* Allocate the timer structure. */ if( xTimerPeriodInTicks == ( TickType_t ) 0U ) 802ac22: 460d mov r5, r1 802ac24: b191 cbz r1, 802ac4c { pxNewTimer = NULL; } else { pxNewTimer = ( Timer_t * ) pvPortMalloc( sizeof( Timer_t ) ); 802ac26: 202c movs r0, #44 ; 0x2c 802ac28: f001 fac4 bl 802c1b4 if( pxNewTimer != NULL ) 802ac2c: 4604 mov r4, r0 802ac2e: b180 cbz r0, 802ac52 { /* Ensure the infrastructure used by the timer service task has been created/initialised. */ prvCheckForValidListAndQueue(); 802ac30: f7ff ff8a bl 802ab48 /* Initialise the timer structure members using the function parameters. */ pxNewTimer->pcTimerName = pcTimerName; pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; pxNewTimer->uxAutoReload = uxAutoReload; pxNewTimer->pvTimerID = pvTimerID; pxNewTimer->pxCallbackFunction = pxCallbackFunction; 802ac34: 9b06 ldr r3, [sp, #24] /* Ensure the infrastructure used by the timer service task has been created/initialised. */ prvCheckForValidListAndQueue(); /* Initialise the timer structure members using the function parameters. */ pxNewTimer->pcTimerName = pcTimerName; 802ac36: f8c4 8000 str.w r8, [r4] pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; 802ac3a: 61a5 str r5, [r4, #24] pxNewTimer->uxAutoReload = uxAutoReload; 802ac3c: 61e7 str r7, [r4, #28] pxNewTimer->pvTimerID = pvTimerID; 802ac3e: 6226 str r6, [r4, #32] pxNewTimer->pxCallbackFunction = pxCallbackFunction; 802ac40: 6263 str r3, [r4, #36] ; 0x24 vListInitialiseItem( &( pxNewTimer->xTimerListItem ) ); 802ac42: 1d20 adds r0, r4, #4 802ac44: f000 f92d bl 802aea2 802ac48: e003 b.n 802ac52 802ac4a: e7fe b.n 802ac4a traceTIMER_CREATE_FAILED(); } } /* 0 is not a valid value for xTimerPeriodInTicks. */ configASSERT( ( xTimerPeriodInTicks > 0 ) ); 802ac4c: f001 f99c bl 802bf88 802ac50: e7fb b.n 802ac4a return ( TimerHandle_t ) pxNewTimer; } 802ac52: 4620 mov r0, r4 802ac54: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802ac58 : /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 802ac58: b530 push {r4, r5, lr} BaseType_t xReturn = pdFAIL; DaemonTaskMessage_t xMessage; /* Send a message to the timer service task to perform a particular action on a particular timer definition. */ if( xTimerQueue != NULL ) 802ac5a: 4c0f ldr r4, [pc, #60] ; (802ac98 ) return ( TimerHandle_t ) pxNewTimer; } /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 802ac5c: 4605 mov r5, r0 BaseType_t xReturn = pdFAIL; DaemonTaskMessage_t xMessage; /* Send a message to the timer service task to perform a particular action on a particular timer definition. */ if( xTimerQueue != NULL ) 802ac5e: 6820 ldr r0, [r4, #0] return ( TimerHandle_t ) pxNewTimer; } /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 802ac60: b085 sub sp, #20 BaseType_t xReturn = pdFAIL; DaemonTaskMessage_t xMessage; /* Send a message to the timer service task to perform a particular action on a particular timer definition. */ if( xTimerQueue != NULL ) 802ac62: b1b8 cbz r0, 802ac94 /* Send a command to the timer service task to start the xTimer timer. */ xMessage.xMessageID = xCommandID; xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; xMessage.u.xTimerParameters.pxTimer = ( Timer_t * ) xTimer; if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 802ac64: 2905 cmp r1, #5 /* Send a message to the timer service task to perform a particular action on a particular timer definition. */ if( xTimerQueue != NULL ) { /* Send a command to the timer service task to start the xTimer timer. */ xMessage.xMessageID = xCommandID; 802ac66: 9101 str r1, [sp, #4] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 802ac68: 9202 str r2, [sp, #8] xMessage.u.xTimerParameters.pxTimer = ( Timer_t * ) xTimer; 802ac6a: 9503 str r5, [sp, #12] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 802ac6c: dc0d bgt.n 802ac8a { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 802ac6e: f001 f8a9 bl 802bdc4 802ac72: 2802 cmp r0, #2 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802ac74: a901 add r1, sp, #4 802ac76: 6820 ldr r0, [r4, #0] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; xMessage.u.xTimerParameters.pxTimer = ( Timer_t * ) xTimer; if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 802ac78: d102 bne.n 802ac80 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802ac7a: 9a08 ldr r2, [sp, #32] 802ac7c: 2300 movs r3, #0 802ac7e: e001 b.n 802ac84 } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 802ac80: 2200 movs r2, #0 802ac82: 4613 mov r3, r2 802ac84: f000 fa30 bl 802b0e8 802ac88: e004 b.n 802ac94 } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 802ac8a: 461a mov r2, r3 802ac8c: a901 add r1, sp, #4 802ac8e: 2300 movs r3, #0 802ac90: f000 faee bl 802b270 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802ac94: b005 add sp, #20 802ac96: bd30 pop {r4, r5, pc} 802ac98: 20000c38 .word 0x20000c38 0802ac9c : } } /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { 802ac9c: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} /* The tick count has overflowed. The timer lists must be switched. If there are any timers still referenced from the current timer list then they must have expired and should be processed before the lists are switched. */ while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) 802aca0: 4e19 ldr r6, [pc, #100] ; (802ad08 ) listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802aca2: f04f 0800 mov.w r8, #0 802aca6: e023 b.n 802acf0 If there are any timers still referenced from the current timer list then they must have expired and should be processed before the lists are switched. */ while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 802aca8: 68db ldr r3, [r3, #12] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); 802acaa: 68dc ldr r4, [r3, #12] If there are any timers still referenced from the current timer list then they must have expired and should be processed before the lists are switched. */ while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 802acac: 681d ldr r5, [r3, #0] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802acae: 1d27 adds r7, r4, #4 802acb0: 4638 mov r0, r7 802acb2: f000 f91d bl 802aef0 traceTIMER_EXPIRED( pxTimer ); /* Execute its callback, then send a command to restart the timer if it is an auto-reload timer. It cannot be restarted here as the lists have not yet been switched. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802acb6: 6a63 ldr r3, [r4, #36] ; 0x24 802acb8: 4620 mov r0, r4 802acba: 4798 blx r3 if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802acbc: 69e3 ldr r3, [r4, #28] 802acbe: 2b01 cmp r3, #1 802acc0: d116 bne.n 802acf0 the timer going into the same timer list then it has already expired and the timer should be re-inserted into the current list so it is processed again within this loop. Otherwise a command should be sent to restart the timer to ensure it is only inserted into a list after the lists have been swapped. */ xReloadTime = ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ); 802acc2: 69a3 ldr r3, [r4, #24] 802acc4: 18eb adds r3, r5, r3 if( xReloadTime > xNextExpireTime ) 802acc6: 42ab cmp r3, r5 802acc8: d906 bls.n 802acd8 { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 802acca: 6063 str r3, [r4, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802accc: 6124 str r4, [r4, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802acce: 6830 ldr r0, [r6, #0] 802acd0: 4639 mov r1, r7 802acd2: f000 f8f5 bl 802aec0 802acd6: e00b b.n 802acf0 } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802acd8: 2100 movs r1, #0 802acda: f8cd 8000 str.w r8, [sp] 802acde: 4620 mov r0, r4 802ace0: 462a mov r2, r5 802ace2: 460b mov r3, r1 802ace4: f7ff ffb8 bl 802ac58 configASSERT( xResult ); 802ace8: b910 cbnz r0, 802acf0 802acea: f001 f94d bl 802bf88 802acee: e7fe b.n 802acee /* The tick count has overflowed. The timer lists must be switched. If there are any timers still referenced from the current timer list then they must have expired and should be processed before the lists are switched. */ while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) 802acf0: 6833 ldr r3, [r6, #0] 802acf2: 681a ldr r2, [r3, #0] 802acf4: 2a00 cmp r2, #0 802acf6: d1d7 bne.n 802aca8 mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802acf8: 4a04 ldr r2, [pc, #16] ; (802ad0c ) 802acfa: 4803 ldr r0, [pc, #12] ; (802ad08 ) 802acfc: 6811 ldr r1, [r2, #0] pxOverflowTimerList = pxTemp; 802acfe: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802ad00: 6001 str r1, [r0, #0] pxOverflowTimerList = pxTemp; } 802ad02: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 802ad06: bf00 nop 802ad08: 20000c08 .word 0x20000c08 802ad0c: 20000c3c .word 0x20000c3c 0802ad10 : pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802ad10: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} TickType_t xTimeNow; PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */ xTimeNow = xTaskGetTickCount(); if( xTimeNow < xLastTime ) 802ad14: f8df 816c ldr.w r8, [pc, #364] ; 802ae84 pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802ad18: b087 sub sp, #28 802ad1a: 46c1 mov r9, r8 the timer with the nearest expiry time will expire. If there are no active timers then just set the next expire time to 0. That will cause this task to unblock when the tick count overflows, at which point the timer lists will be switched and the next expiry time can be re-assessed. */ *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList ); 802ad1c: 4b57 ldr r3, [pc, #348] ; (802ae7c ) 802ad1e: 681b ldr r3, [r3, #0] 802ad20: 681f ldr r7, [r3, #0] 802ad22: f1d7 0701 rsbs r7, r7, #1 802ad26: bf38 it cc 802ad28: 2700 movcc r7, #0 if( *pxListWasEmpty == pdFALSE ) 802ad2a: b917 cbnz r7, 802ad32 { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 802ad2c: 68db ldr r3, [r3, #12] 802ad2e: 681d ldr r5, [r3, #0] 802ad30: e000 b.n 802ad34 } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 802ad32: 2500 movs r5, #0 static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) { TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); 802ad34: f000 fd82 bl 802b83c static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched ) { TickType_t xTimeNow; PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */ xTimeNow = xTaskGetTickCount(); 802ad38: f000 fd88 bl 802b84c if( xTimeNow < xLastTime ) 802ad3c: f8d8 3000 ldr.w r3, [r8] 802ad40: 4298 cmp r0, r3 static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched ) { TickType_t xTimeNow; PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */ xTimeNow = xTaskGetTickCount(); 802ad42: 4606 mov r6, r0 if( xTimeNow < xLastTime ) 802ad44: d203 bcs.n 802ad4e { prvSwitchTimerLists(); 802ad46: f7ff ffa9 bl 802ac9c *pxTimerListsWereSwitched = pdTRUE; 802ad4a: 2301 movs r3, #1 802ad4c: e000 b.n 802ad50 } else { *pxTimerListsWereSwitched = pdFALSE; 802ad4e: 2300 movs r3, #0 } xLastTime = xTimeNow; 802ad50: f8c9 6000 str.w r6, [r9] has expired or not. If obtaining the time causes the lists to switch then don't process this timer as any timers that remained in the list when the lists were switched will have been processed within the prvSampleTimeNow() function. */ xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); if( xTimerListsWereSwitched == pdFALSE ) 802ad54: 2b00 cmp r3, #0 802ad56: d132 bne.n 802adbe { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 802ad58: bb2f cbnz r7, 802ada6 802ad5a: 42b5 cmp r5, r6 802ad5c: d823 bhi.n 802ada6 { ( void ) xTaskResumeAll(); 802ad5e: f000 fe09 bl 802b974 /*-----------------------------------------------------------*/ static void prvProcessExpiredTimer( const TickType_t xNextExpireTime, const TickType_t xTimeNow ) { BaseType_t xResult; Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); 802ad62: 4b46 ldr r3, [pc, #280] ; (802ae7c ) 802ad64: 681b ldr r3, [r3, #0] 802ad66: 68db ldr r3, [r3, #12] 802ad68: 68dc ldr r4, [r3, #12] /* Remove the timer from the list of active timers. A check has already been performed to ensure the list is not empty. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802ad6a: 1d20 adds r0, r4, #4 802ad6c: f000 f8c0 bl 802aef0 traceTIMER_EXPIRED( pxTimer ); /* If the timer is an auto reload timer then calculate the next expiry time and re-insert the timer in the list of active timers. */ if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802ad70: 69e3 ldr r3, [r4, #28] 802ad72: 2b01 cmp r3, #1 802ad74: d113 bne.n 802ad9e { /* The timer is inserted into a list using a time relative to anything other than the current time. It will therefore be inserted into the correct list relative to the time this task thinks it is now. */ if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) == pdTRUE ) 802ad76: 69a1 ldr r1, [r4, #24] 802ad78: 4620 mov r0, r4 802ad7a: 1869 adds r1, r5, r1 802ad7c: 4632 mov r2, r6 802ad7e: 462b mov r3, r5 802ad80: f7ff ff0c bl 802ab9c 802ad84: 2801 cmp r0, #1 802ad86: d10a bne.n 802ad9e { /* The timer expired before it was added to the active timer list. Reload it now. */ xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802ad88: 9700 str r7, [sp, #0] 802ad8a: 4620 mov r0, r4 802ad8c: 4639 mov r1, r7 802ad8e: 462a mov r2, r5 802ad90: 463b mov r3, r7 802ad92: f7ff ff61 bl 802ac58 configASSERT( xResult ); 802ad96: b910 cbnz r0, 802ad9e 802ad98: f001 f8f6 bl 802bf88 802ad9c: e7fe b.n 802ad9c { mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802ad9e: 6a63 ldr r3, [r4, #36] ; 0x24 802ada0: 4620 mov r0, r4 802ada2: 4798 blx r3 802ada4: e05f b.n 802ae66 time has not been reached yet. This task should therefore block to wait for the next expire time or a command to be received - whichever comes first. The following line cannot be reached unless xNextExpireTime > xTimeNow, except in the case when the current timer list is empty. */ vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ) ); 802ada6: 4b36 ldr r3, [pc, #216] ; (802ae80 ) 802ada8: 1ba9 subs r1, r5, r6 802adaa: 6818 ldr r0, [r3, #0] 802adac: f000 fb8e bl 802b4cc if( xTaskResumeAll() == pdFALSE ) 802adb0: f000 fde0 bl 802b974 802adb4: 2800 cmp r0, #0 802adb6: d156 bne.n 802ae66 { /* Yield to wait for either a command to arrive, or the block time to expire. If a command arrived between the critical section being exited and this yield then the yield will not cause the task to block. */ portYIELD_WITHIN_API(); 802adb8: f001 f8da bl 802bf70 802adbc: e053 b.n 802ae66 } } } else { ( void ) xTaskResumeAll(); 802adbe: f000 fdd9 bl 802b974 802adc2: e050 b.n 802ae66 } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 802adc4: 9b03 ldr r3, [sp, #12] 802adc6: 2b00 cmp r3, #0 802adc8: db4e blt.n 802ae68 { /* The messages uses the xTimerParameters member to work on a software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; 802adca: 9c05 ldr r4, [sp, #20] if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) 802adcc: 6963 ldr r3, [r4, #20] 802adce: b113 cbz r3, 802add6 { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802add0: 1d20 adds r0, r4, #4 802add2: f000 f88d bl 802aef0 static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched ) { TickType_t xTimeNow; PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */ xTimeNow = xTaskGetTickCount(); 802add6: f000 fd39 bl 802b84c if( xTimeNow < xLastTime ) 802adda: f8d8 3000 ldr.w r3, [r8] 802adde: 4298 cmp r0, r3 static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched ) { TickType_t xTimeNow; PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */ xTimeNow = xTaskGetTickCount(); 802ade0: 4605 mov r5, r0 if( xTimeNow < xLastTime ) 802ade2: d201 bcs.n 802ade8 { prvSwitchTimerLists(); 802ade4: f7ff ff5a bl 802ac9c possibility of a higher priority task adding a message to the message queue with a time that is ahead of the timer daemon task (because it pre-empted the timer daemon task after the xTimeNow value was set). */ xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); switch( xMessage.xMessageID ) 802ade8: 9b03 ldr r3, [sp, #12] else { *pxTimerListsWereSwitched = pdFALSE; } xLastTime = xTimeNow; 802adea: f8c9 5000 str.w r5, [r9] possibility of a higher priority task adding a message to the message queue with a time that is ahead of the timer daemon task (because it pre-empted the timer daemon task after the xTimeNow value was set). */ xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); switch( xMessage.xMessageID ) 802adee: 2b09 cmp r3, #9 802adf0: d83a bhi.n 802ae68 802adf2: f04f 6204 mov.w r2, #138412032 ; 0x8400000 802adf6: 409a lsls r2, r3 802adf8: d424 bmi.n 802ae44 802adfa: f04f 4263 mov.w r2, #3808428032 ; 0xe3000000 802adfe: 409a lsls r2, r3 802ae00: d404 bmi.n 802ae0c 802ae02: f04f 6280 mov.w r2, #67108864 ; 0x4000000 802ae06: 409a lsls r2, r3 802ae08: d429 bmi.n 802ae5e 802ae0a: e02d b.n 802ae68 case tmrCOMMAND_START_FROM_ISR : case tmrCOMMAND_RESET : case tmrCOMMAND_RESET_FROM_ISR : case tmrCOMMAND_START_DONT_TRACE : /* Start or restart a timer. */ if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) == pdTRUE ) 802ae0c: 9b04 ldr r3, [sp, #16] 802ae0e: 69a1 ldr r1, [r4, #24] 802ae10: 4620 mov r0, r4 802ae12: 1859 adds r1, r3, r1 802ae14: 462a mov r2, r5 802ae16: f7ff fec1 bl 802ab9c 802ae1a: 2801 cmp r0, #1 802ae1c: d124 bne.n 802ae68 { /* The timer expired before it was added to the active timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802ae1e: 6a63 ldr r3, [r4, #36] ; 0x24 802ae20: 4620 mov r0, r4 802ae22: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802ae24: 69e3 ldr r3, [r4, #28] 802ae26: 2b01 cmp r3, #1 802ae28: d11e bne.n 802ae68 { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 802ae2a: 69a2 ldr r2, [r4, #24] 802ae2c: 9b04 ldr r3, [sp, #16] 802ae2e: 2100 movs r1, #0 802ae30: 18d2 adds r2, r2, r3 802ae32: 9100 str r1, [sp, #0] 802ae34: 4620 mov r0, r4 802ae36: 460b mov r3, r1 802ae38: f7ff ff0e bl 802ac58 configASSERT( xResult ); 802ae3c: b9a0 cbnz r0, 802ae68 802ae3e: f001 f8a3 bl 802bf88 802ae42: e7fe b.n 802ae42 There is nothing to do here. */ break; case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR : pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 802ae44: 9904 ldr r1, [sp, #16] 802ae46: 61a1 str r1, [r4, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 802ae48: b911 cbnz r1, 802ae50 802ae4a: f001 f89d bl 802bf88 802ae4e: e7fe b.n 802ae4e longer or shorter than the old one. The command time is therefore set to the current time, and as the period cannot be zero the next expiry time can only be in the future, meaning (unlike for the xTimerStart() case above) there is no fail case that needs to be handled here. */ ( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow ); 802ae50: 4620 mov r0, r4 802ae52: 1869 adds r1, r5, r1 802ae54: 462a mov r2, r5 802ae56: 462b mov r3, r5 802ae58: f7ff fea0 bl 802ab9c 802ae5c: e004 b.n 802ae68 break; case tmrCOMMAND_DELETE : /* The timer has already been removed from the active list, just free up the memory. */ vPortFree( pxTimer ); 802ae5e: 4620 mov r0, r4 802ae60: f001 fa2e bl 802c2c0 802ae64: e000 b.n 802ae68 DaemonTaskMessage_t xMessage; Timer_t *pxTimer; BaseType_t xTimerListsWereSwitched, xResult; TickType_t xTimeNow; while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */ 802ae66: 4e06 ldr r6, [pc, #24] ; (802ae80 ) 802ae68: 2200 movs r2, #0 802ae6a: 6830 ldr r0, [r6, #0] 802ae6c: a903 add r1, sp, #12 802ae6e: 4613 mov r3, r2 802ae70: f000 fa7a bl 802b368 802ae74: 2800 cmp r0, #0 802ae76: d1a5 bne.n 802adc4 802ae78: e750 b.n 802ad1c 802ae7a: bf00 nop 802ae7c: 20000c08 .word 0x20000c08 802ae80: 20000c38 .word 0x20000c38 802ae84: 20000c34 .word 0x20000c34 0802ae88 : void *pvTimerGetTimerID( const TimerHandle_t xTimer ) { Timer_t * const pxTimer = ( Timer_t * ) xTimer; return pxTimer->pvTimerID; } 802ae88: 6a00 ldr r0, [r0, #32] 802ae8a: 4770 bx lr 0802ae8c : void vListInitialise( List_t * const pxList ) { /* The list structure contains a list item which is used to mark the end of the list. To initialise the list the list end is inserted as the only list entry. */ pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 802ae8c: f100 0308 add.w r3, r0, #8 802ae90: 6043 str r3, [r0, #4] /* The list end value is the highest possible value in the list to ensure it remains at the end of the list. */ pxList->xListEnd.xItemValue = portMAX_DELAY; 802ae92: f04f 32ff mov.w r2, #4294967295 /* The list end next and previous pointers point to itself so we know when the list is empty. */ pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 802ae96: 60c3 str r3, [r0, #12] pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 802ae98: 6103 str r3, [r0, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 802ae9a: 2300 movs r3, #0 as the only list entry. */ pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ /* The list end value is the highest possible value in the list to ensure it remains at the end of the list. */ pxList->xListEnd.xItemValue = portMAX_DELAY; 802ae9c: 6082 str r2, [r0, #8] /* The list end next and previous pointers point to itself so we know when the list is empty. */ pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 802ae9e: 6003 str r3, [r0, #0] 802aea0: 4770 bx lr 0802aea2 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { /* Make sure the list item is not recorded as being on a list. */ pxItem->pvContainer = NULL; 802aea2: 2300 movs r3, #0 802aea4: 6103 str r3, [r0, #16] 802aea6: 4770 bx lr 0802aea8 : } /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t * const pxIndex = pxList->pxIndex; 802aea8: 6843 ldr r3, [r0, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; pxIndex->pxPrevious->pxNext = pxNewListItem; pxIndex->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; 802aeaa: 6108 str r0, [r1, #16] /* Insert a new list item into pxList, but rather than sort the list, makes the new list item the last item to be removed by a call to listGET_OWNER_OF_NEXT_ENTRY(). */ pxNewListItem->pxNext = pxIndex; pxNewListItem->pxPrevious = pxIndex->pxPrevious; 802aeac: 689a ldr r2, [r3, #8] listTEST_LIST_ITEM_INTEGRITY( pxNewListItem ); /* Insert a new list item into pxList, but rather than sort the list, makes the new list item the last item to be removed by a call to listGET_OWNER_OF_NEXT_ENTRY(). */ pxNewListItem->pxNext = pxIndex; 802aeae: 604b str r3, [r1, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 802aeb0: 608a str r2, [r1, #8] pxIndex->pxPrevious->pxNext = pxNewListItem; 802aeb2: 689a ldr r2, [r3, #8] pxIndex->pxPrevious = pxNewListItem; 802aeb4: 6099 str r1, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802aeb6: 6803 ldr r3, [r0, #0] /* Insert a new list item into pxList, but rather than sort the list, makes the new list item the last item to be removed by a call to listGET_OWNER_OF_NEXT_ENTRY(). */ pxNewListItem->pxNext = pxIndex; pxNewListItem->pxPrevious = pxIndex->pxPrevious; pxIndex->pxPrevious->pxNext = pxNewListItem; 802aeb8: 6051 str r1, [r2, #4] pxIndex->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802aeba: 3301 adds r3, #1 802aebc: 6003 str r3, [r0, #0] 802aebe: 4770 bx lr 0802aec0 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 802aec0: 680a ldr r2, [r1, #0] new list item should be placed after it. This ensures that TCB's which are stored in ready lists (all of which have the same xItemValue value) get a share of the CPU. However, if the xItemValue is the same as the back marker the iteration loop below will not end. Therefore the value is checked first, and the algorithm slightly modified if necessary. */ if( xValueOfInsertion == portMAX_DELAY ) 802aec2: 1c53 adds r3, r2, #1 ( pxList->uxNumberOfItems )++; } /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 802aec4: b530 push {r4, r5, lr} new list item should be placed after it. This ensures that TCB's which are stored in ready lists (all of which have the same xItemValue value) get a share of the CPU. However, if the xItemValue is the same as the back marker the iteration loop below will not end. Therefore the value is checked first, and the algorithm slightly modified if necessary. */ if( xValueOfInsertion == portMAX_DELAY ) 802aec6: d101 bne.n 802aecc { pxIterator = pxList->xListEnd.pxPrevious; 802aec8: 6903 ldr r3, [r0, #16] 802aeca: e007 b.n 802aedc 4) Using a queue or semaphore before it has been initialised or before the scheduler has been started (are interrupts firing before vTaskStartScheduler() has been called?). **********************************************************************/ for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 802aecc: f100 0308 add.w r3, r0, #8 802aed0: e000 b.n 802aed4 802aed2: 4623 mov r3, r4 802aed4: 685c ldr r4, [r3, #4] 802aed6: 6825 ldr r5, [r4, #0] 802aed8: 4295 cmp r5, r2 802aeda: d9fa bls.n 802aed2 /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 802aedc: 685a ldr r2, [r3, #4] pxNewListItem->pxPrevious = pxIterator; pxIterator->pxNext = pxNewListItem; /* Remember which list the item is in. This allows fast removal of the item later. */ pxNewListItem->pvContainer = ( void * ) pxList; 802aede: 6108 str r0, [r1, #16] /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 802aee0: 604a str r2, [r1, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 802aee2: 6091 str r1, [r2, #8] pxNewListItem->pxPrevious = pxIterator; pxIterator->pxNext = pxNewListItem; 802aee4: 6059 str r1, [r3, #4] } } pxNewListItem->pxNext = pxIterator->pxNext; pxNewListItem->pxNext->pxPrevious = pxNewListItem; pxNewListItem->pxPrevious = pxIterator; 802aee6: 608b str r3, [r1, #8] /* Remember which list the item is in. This allows fast removal of the item later. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 802aee8: 6803 ldr r3, [r0, #0] 802aeea: 3301 adds r3, #1 802aeec: 6003 str r3, [r0, #0] 802aeee: bd30 pop {r4, r5, pc} 0802aef0 : { /* The list item knows which list it is in. Obtain the list from the list item. */ List_t * const pxList = ( List_t * ) pxItemToRemove->pvContainer; pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 802aef0: 6841 ldr r1, [r0, #4] 802aef2: 6882 ldr r2, [r0, #8] UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) { /* The list item knows which list it is in. Obtain the list from the list item. */ List_t * const pxList = ( List_t * ) pxItemToRemove->pvContainer; 802aef4: 6903 ldr r3, [r0, #16] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 802aef6: 608a str r2, [r1, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 802aef8: 6882 ldr r2, [r0, #8] 802aefa: 6051 str r1, [r2, #4] /* Make sure the index is left pointing to a valid item. */ if( pxList->pxIndex == pxItemToRemove ) 802aefc: 6859 ldr r1, [r3, #4] 802aefe: 4281 cmp r1, r0 { pxList->pxIndex = pxItemToRemove->pxPrevious; 802af00: bf08 it eq 802af02: 605a streq r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pvContainer = NULL; 802af04: 2200 movs r2, #0 802af06: 6102 str r2, [r0, #16] ( pxList->uxNumberOfItems )--; 802af08: 6818 ldr r0, [r3, #0] 802af0a: 3801 subs r0, #1 802af0c: 6018 str r0, [r3, #0] return pxList->uxNumberOfItems; } 802af0e: 4770 bx lr 0802af10 : } } /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 802af10: b538 push {r3, r4, r5, lr} 802af12: 4604 mov r4, r0 { /* Tasks that are removed from the event list will get added to the pending ready list as the scheduler is still suspended. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802af14: f104 0524 add.w r5, r4, #36 ; 0x24 /* The lock counts contains the number of extra data items placed or removed from the queue while the queue was locked. When a queue is locked items can be added or removed, but the event lists cannot be updated. */ taskENTER_CRITICAL(); 802af18: f001 f83e bl 802bf98 { /* See if data was added to the queue while it was locked. */ while( pxQueue->xTxLock > queueLOCKED_UNMODIFIED ) 802af1c: e00a b.n 802af34 } #else /* configUSE_QUEUE_SETS */ { /* Tasks that are removed from the event list will get added to the pending ready list as the scheduler is still suspended. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802af1e: 6a63 ldr r3, [r4, #36] ; 0x24 802af20: b15b cbz r3, 802af3a { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802af22: 4628 mov r0, r5 802af24: f000 fece bl 802bcc4 802af28: b108 cbz r0, 802af2e { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 802af2a: f000 ff45 bl 802bdb8 break; } } #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); 802af2e: 6ca3 ldr r3, [r4, #72] ; 0x48 802af30: 3b01 subs r3, #1 802af32: 64a3 str r3, [r4, #72] ; 0x48 locked items can be added or removed, but the event lists cannot be updated. */ taskENTER_CRITICAL(); { /* See if data was added to the queue while it was locked. */ while( pxQueue->xTxLock > queueLOCKED_UNMODIFIED ) 802af34: 6ca3 ldr r3, [r4, #72] ; 0x48 802af36: 2b00 cmp r3, #0 802af38: dcf1 bgt.n 802af1e #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); } pxQueue->xTxLock = queueUNLOCKED; 802af3a: f04f 33ff mov.w r3, #4294967295 802af3e: 64a3 str r3, [r4, #72] ; 0x48 } taskEXIT_CRITICAL(); 802af40: f001 f856 bl 802bff0 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802af44: f104 0510 add.w r5, r4, #16 pxQueue->xTxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 802af48: f001 f826 bl 802bf98 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 802af4c: e00a b.n 802af64 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802af4e: 6923 ldr r3, [r4, #16] 802af50: b15b cbz r3, 802af6a { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 802af52: 4628 mov r0, r5 802af54: f000 feb6 bl 802bcc4 802af58: b108 cbz r0, 802af5e { vTaskMissedYield(); 802af5a: f000 ff2d bl 802bdb8 else { mtCOVERAGE_TEST_MARKER(); } --( pxQueue->xRxLock ); 802af5e: 6c63 ldr r3, [r4, #68] ; 0x44 802af60: 3b01 subs r3, #1 802af62: 6463 str r3, [r4, #68] ; 0x44 taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 802af64: 6c63 ldr r3, [r4, #68] ; 0x44 802af66: 2b00 cmp r3, #0 802af68: dcf1 bgt.n 802af4e { break; } } pxQueue->xRxLock = queueUNLOCKED; 802af6a: f04f 33ff mov.w r3, #4294967295 802af6e: 6463 str r3, [r4, #68] ; 0x44 } taskEXIT_CRITICAL(); } 802af70: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } } pxQueue->xRxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); 802af74: f001 b83c b.w 802bff0 0802af78 : } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802af78: 6c02 ldr r2, [r0, #64] ; 0x40 return xReturn; } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 802af7a: b530 push {r4, r5, lr} 802af7c: 4603 mov r3, r0 if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802af7e: b16a cbz r2, 802af9c { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 802af80: 68c4 ldr r4, [r0, #12] if( pxQueue->u.pcReadFrom >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ 802af82: 6845 ldr r5, [r0, #4] static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 802af84: 18a4 adds r4, r4, r2 if( pxQueue->u.pcReadFrom >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ 802af86: 42ac cmp r4, r5 static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 802af88: 60c4 str r4, [r0, #12] if( pxQueue->u.pcReadFrom >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ { pxQueue->u.pcReadFrom = pxQueue->pcHead; 802af8a: bf24 itt cs 802af8c: 6804 ldrcs r4, [r0, #0] 802af8e: 60c4 strcs r4, [r0, #12] } else { mtCOVERAGE_TEST_MARKER(); } ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. */ 802af90: 4608 mov r0, r1 802af92: 68d9 ldr r1, [r3, #12] } } 802af94: e8bd 4030 ldmia.w sp!, {r4, r5, lr} } else { mtCOVERAGE_TEST_MARKER(); } ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. */ 802af98: f7f6 be84 b.w 8021ca4 802af9c: bd30 pop {r4, r5, pc} 0802af9e : #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 802af9e: b538 push {r3, r4, r5, lr} 802afa0: 4615 mov r5, r2 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802afa2: 6c02 ldr r2, [r0, #64] ; 0x40 #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 802afa4: 4604 mov r4, r0 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802afa6: b93a cbnz r2, 802afb8 { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802afa8: 6805 ldr r5, [r0, #0] 802afaa: b105 cbz r5, 802afae 802afac: e028 b.n 802b000 { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( ( void * ) pxQueue->pxMutexHolder ); 802afae: 6840 ldr r0, [r0, #4] 802afb0: f000 ff64 bl 802be7c pxQueue->pxMutexHolder = NULL; 802afb4: 6065 str r5, [r4, #4] 802afb6: e024 b.n 802b002 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 802afb8: b96d cbnz r5, 802afd6 { ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. */ 802afba: 6880 ldr r0, [r0, #8] 802afbc: f7f6 fe72 bl 8021ca4 pxQueue->pcWriteTo += pxQueue->uxItemSize; 802afc0: 68a2 ldr r2, [r4, #8] 802afc2: 6c23 ldr r3, [r4, #64] ; 0x40 802afc4: 18d3 adds r3, r2, r3 if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802afc6: 6862 ldr r2, [r4, #4] #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) { ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. */ pxQueue->pcWriteTo += pxQueue->uxItemSize; 802afc8: 60a3 str r3, [r4, #8] if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802afca: 4293 cmp r3, r2 802afcc: d318 bcc.n 802b000 { pxQueue->pcWriteTo = pxQueue->pcHead; 802afce: 6823 ldr r3, [r4, #0] #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { BaseType_t xReturn = pdFALSE; 802afd0: 4628 mov r0, r5 { ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. */ pxQueue->pcWriteTo += pxQueue->uxItemSize; if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ { pxQueue->pcWriteTo = pxQueue->pcHead; 802afd2: 60a3 str r3, [r4, #8] 802afd4: e015 b.n 802b002 mtCOVERAGE_TEST_MARKER(); } } else { ( void ) memcpy( ( void * ) pxQueue->u.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 802afd6: 68c0 ldr r0, [r0, #12] 802afd8: f7f6 fe64 bl 8021ca4 pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 802afdc: 6c23 ldr r3, [r4, #64] ; 0x40 802afde: 68e2 ldr r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802afe0: 6821 ldr r1, [r4, #0] } } else { ( void ) memcpy( ( void * ) pxQueue->u.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 802afe2: 425b negs r3, r3 802afe4: 18d2 adds r2, r2, r3 if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802afe6: 428a cmp r2, r1 } } else { ( void ) memcpy( ( void * ) pxQueue->u.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 802afe8: 60e2 str r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 802afea: d202 bcs.n 802aff2 { pxQueue->u.pcReadFrom = ( pxQueue->pcTail - pxQueue->uxItemSize ); 802afec: 6862 ldr r2, [r4, #4] 802afee: 18d3 adds r3, r2, r3 802aff0: 60e3 str r3, [r4, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 802aff2: 2d02 cmp r5, #2 802aff4: d104 bne.n 802b000 { if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802aff6: 6ba3 ldr r3, [r4, #56] ; 0x38 802aff8: b113 cbz r3, 802b000 { /* An item is not being added but overwritten, so subtract one from the recorded number of items in the queue so when one is added again below the number of recorded items remains correct. */ --( pxQueue->uxMessagesWaiting ); 802affa: 6ba3 ldr r3, [r4, #56] ; 0x38 802affc: 3b01 subs r3, #1 802affe: 63a3 str r3, [r4, #56] ; 0x38 #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { BaseType_t xReturn = pdFALSE; 802b000: 2000 movs r0, #0 { mtCOVERAGE_TEST_MARKER(); } } ++( pxQueue->uxMessagesWaiting ); 802b002: 6ba3 ldr r3, [r4, #56] ; 0x38 802b004: 3301 adds r3, #1 802b006: 63a3 str r3, [r4, #56] ; 0x38 return xReturn; } 802b008: bd38 pop {r3, r4, r5, pc} 0802b00a : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 802b00a: b538 push {r3, r4, r5, lr} 802b00c: 460d mov r5, r1 Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802b00e: 4604 mov r4, r0 802b010: b910 cbnz r0, 802b018 802b012: f000 ffb9 bl 802bf88 802b016: e7fe b.n 802b016 taskENTER_CRITICAL(); 802b018: f000 ffbe bl 802bf98 { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802b01c: 6823 ldr r3, [r4, #0] 802b01e: 6be0 ldr r0, [r4, #60] ; 0x3c 802b020: 6c22 ldr r2, [r4, #64] ; 0x40 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; 802b022: 60a3 str r3, [r4, #8] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802b024: fb00 3102 mla r1, r0, r2, r3 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); 802b028: 3801 subs r0, #1 802b02a: fb02 3300 mla r3, r2, r0, r3 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 802b02e: 6061 str r1, [r4, #4] pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); 802b030: 60e3 str r3, [r4, #12] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802b032: 2100 movs r1, #0 pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->xRxLock = queueUNLOCKED; 802b034: f04f 33ff mov.w r3, #4294967295 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802b038: 63a1 str r1, [r4, #56] ; 0x38 pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->xRxLock = queueUNLOCKED; 802b03a: 6463 str r3, [r4, #68] ; 0x44 pxQueue->xTxLock = queueUNLOCKED; 802b03c: 64a3 str r3, [r4, #72] ; 0x48 if( xNewQueue == pdFALSE ) 802b03e: b955 cbnz r5, 802b056 /* If there are tasks blocked waiting to read from the queue, then the tasks will remain blocked as after this function exits the queue will still be empty. If there are tasks blocked waiting to write to the queue, then one should be unblocked as after this function exits it will be possible to write to it. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802b040: 6923 ldr r3, [r4, #16] 802b042: b183 cbz r3, 802b066 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802b044: f104 0010 add.w r0, r4, #16 802b048: f000 fe3c bl 802bcc4 802b04c: 2801 cmp r0, #1 802b04e: d10a bne.n 802b066 { queueYIELD_IF_USING_PREEMPTION(); 802b050: f000 ff8e bl 802bf70 802b054: e007 b.n 802b066 } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 802b056: f104 0010 add.w r0, r4, #16 802b05a: f7ff ff17 bl 802ae8c vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 802b05e: f104 0024 add.w r0, r4, #36 ; 0x24 802b062: f7ff ff13 bl 802ae8c } } taskEXIT_CRITICAL(); 802b066: f000 ffc3 bl 802bff0 /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; } 802b06a: 2001 movs r0, #1 802b06c: bd38 pop {r3, r4, r5, pc} 0802b06e : /*-----------------------------------------------------------*/ QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 802b06e: b5f8 push {r3, r4, r5, r6, r7, lr} 802b070: 460d mov r5, r1 802b072: 4617 mov r7, r2 /* Remove compiler warnings about unused parameters should configUSE_TRACE_FACILITY not be set to 1. */ ( void ) ucQueueType; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 802b074: 4606 mov r6, r0 802b076: b910 cbnz r0, 802b07e 802b078: f000 ff86 bl 802bf88 802b07c: e7fe b.n 802b07c if( uxItemSize == ( UBaseType_t ) 0 ) 802b07e: b111 cbz r1, 802b086 } else { /* The queue is one byte longer than asked for to make wrap checking easier/faster. */ xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ) + ( size_t ) 1; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 802b080: 4348 muls r0, r1 802b082: 3001 adds r0, #1 802b084: e000 b.n 802b088 configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); if( uxItemSize == ( UBaseType_t ) 0 ) { /* There is not going to be a queue storage area. */ xQueueSizeInBytes = ( size_t ) 0; 802b086: 4608 mov r0, r1 easier/faster. */ xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ) + ( size_t ) 1; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ } /* Allocate the new queue structure and storage area. */ pcAllocatedBuffer = ( int8_t * ) pvPortMalloc( sizeof( Queue_t ) + xQueueSizeInBytes ); 802b088: 3054 adds r0, #84 ; 0x54 802b08a: f001 f893 bl 802c1b4 if( pcAllocatedBuffer != NULL ) 802b08e: 4604 mov r4, r0 802b090: b138 cbz r0, 802b0a2 { pxNewQueue = ( Queue_t * ) pcAllocatedBuffer; /*lint !e826 MISRA The buffer cannot be to small because it was dimensioned by sizeof( Queue_t ) + xQueueSizeInBytes. */ if( uxItemSize == ( UBaseType_t ) 0 ) 802b092: b90d cbnz r5, 802b098 { /* No RAM was allocated for the queue storage area, but PC head cannot be set to NULL because NULL is used as a key to say the queue is used as a mutex. Therefore just set pcHead to point to the queue as a benign value that is known to be within the memory map. */ pxNewQueue->pcHead = ( int8_t * ) pxNewQueue; 802b094: 6020 str r0, [r4, #0] 802b096: e007 b.n 802b0a8 } else { /* Jump past the queue structure to find the location of the queue storage area - adding the padding bytes to get a better alignment. */ pxNewQueue->pcHead = pcAllocatedBuffer + sizeof( Queue_t ); 802b098: f100 0354 add.w r3, r0, #84 ; 0x54 802b09c: 6003 str r3, [r0, #0] 802b09e: e003 b.n 802b0a8 802b0a0: e7fe b.n 802b0a0 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802b0a2: f000 ff71 bl 802bf88 802b0a6: e7fb b.n 802b0a0 pxNewQueue->pcHead = pcAllocatedBuffer + sizeof( Queue_t ); } /* Initialise the queue members as described above where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 802b0a8: 63e6 str r6, [r4, #60] ; 0x3c pxNewQueue->uxItemSize = uxItemSize; 802b0aa: 6425 str r5, [r4, #64] ; 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 802b0ac: 4620 mov r0, r4 802b0ae: 2101 movs r1, #1 802b0b0: f7ff ffab bl 802b00a #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 802b0b4: f884 7050 strb.w r7, [r4, #80] ; 0x50 } configASSERT( xReturn ); return xReturn; } 802b0b8: 4620 mov r0, r4 802b0ba: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802b0bc : /*-----------------------------------------------------------*/ #if ( configUSE_COUNTING_SEMAPHORES == 1 ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 802b0bc: b510 push {r4, lr} 802b0be: 460c mov r4, r1 QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 802b0c0: b910 cbnz r0, 802b0c8 802b0c2: f000 ff61 bl 802bf88 802b0c6: e7fe b.n 802b0c6 configASSERT( uxInitialCount <= uxMaxCount ); 802b0c8: 4281 cmp r1, r0 802b0ca: d902 bls.n 802b0d2 802b0cc: f000 ff5c bl 802bf88 802b0d0: e7fe b.n 802b0d0 xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 802b0d2: 2100 movs r1, #0 802b0d4: 2202 movs r2, #2 802b0d6: f7ff ffca bl 802b06e if( xHandle != NULL ) 802b0da: b110 cbz r0, 802b0e2 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 802b0dc: 6384 str r4, [r0, #56] ; 0x38 802b0de: bd10 pop {r4, pc} 802b0e0: e7fe b.n 802b0e0 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } configASSERT( xHandle ); 802b0e2: f000 ff51 bl 802bf88 802b0e6: e7fb b.n 802b0e0 0802b0e8 : #endif /* configUSE_COUNTING_SEMAPHORES */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) { 802b0e8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802b0ec: b085 sub sp, #20 802b0ee: 460f mov r7, r1 802b0f0: 9201 str r2, [sp, #4] 802b0f2: 461d mov r5, r3 BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802b0f4: 4604 mov r4, r0 802b0f6: b910 cbnz r0, 802b0fe 802b0f8: f000 ff46 bl 802bf88 802b0fc: e7fe b.n 802b0fc configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802b0fe: 2900 cmp r1, #0 802b100: d17b bne.n 802b1fa 802b102: 6c03 ldr r3, [r0, #64] ; 0x40 802b104: 2b00 cmp r3, #0 802b106: d078 beq.n 802b1fa 802b108: e074 b.n 802b1f4 802b10a: e7fe b.n 802b10a configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802b10c: 6be3 ldr r3, [r4, #60] ; 0x3c 802b10e: 2b01 cmp r3, #1 802b110: d176 bne.n 802b200 802b112: e078 b.n 802b206 802b114: e7fe b.n 802b114 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802b116: 9e01 ldr r6, [sp, #4] 802b118: b126 cbz r6, 802b124 802b11a: e079 b.n 802b210 802b11c: e7fe b.n 802b11c 802b11e: 2601 movs r6, #1 802b120: e002 b.n 802b128 802b122: 2600 movs r6, #0 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); prvLockQueue( pxQueue ); 802b124: f04f 0800 mov.w r8, #0 /* This function relaxes the coding standard somewhat to allow return statements within the function itself. This is done in the interest of execution time efficiency. */ for( ;; ) { taskENTER_CRITICAL(); 802b128: f000 ff36 bl 802bf98 { /* Is there room on the queue now? The running task must be the highest priority task wanting to access the queue. If the head item in the queue is to be overwritten then it does not matter if the queue is full. */ if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802b12c: 6ba2 ldr r2, [r4, #56] ; 0x38 802b12e: 6be3 ldr r3, [r4, #60] ; 0x3c 802b130: 429a cmp r2, r3 802b132: d301 bcc.n 802b138 802b134: 2d02 cmp r5, #2 802b136: d115 bne.n 802b164 { traceQUEUE_SEND( pxQueue ); xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 802b138: 4620 mov r0, r4 802b13a: 4639 mov r1, r7 802b13c: 462a mov r2, r5 802b13e: f7ff ff2e bl 802af9e } #else /* configUSE_QUEUE_SETS */ { /* If there was a task waiting for data to arrive on the queue then unblock it now. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802b142: 6a63 ldr r3, [r4, #36] ; 0x24 802b144: b143 cbz r3, 802b158 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE ) 802b146: f104 0024 add.w r0, r4, #36 ; 0x24 802b14a: f000 fdbb bl 802bcc4 802b14e: 2801 cmp r0, #1 802b150: d104 bne.n 802b15c { /* The unblocked task has a priority higher than our own so yield immediately. Yes it is ok to do this from within the critical section - the kernel takes care of that. */ queueYIELD_IF_USING_PREEMPTION(); 802b152: f000 ff0d bl 802bf70 802b156: e001 b.n 802b15c else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 802b158: 2800 cmp r0, #0 802b15a: d1fa bne.n 802b152 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 802b15c: f000 ff48 bl 802bff0 return pdPASS; 802b160: 2001 movs r0, #1 802b162: e058 b.n 802b216 } else { if( xTicksToWait == ( TickType_t ) 0 ) 802b164: f8dd 9004 ldr.w r9, [sp, #4] 802b168: f1b9 0f00 cmp.w r9, #0 802b16c: d102 bne.n 802b174 { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802b16e: f000 ff3f bl 802bff0 802b172: e03d b.n 802b1f0 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } else if( xEntryTimeSet == pdFALSE ) 802b174: b916 cbnz r6, 802b17c { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802b176: a802 add r0, sp, #8 802b178: f000 fde0 bl 802bd3c /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 802b17c: f000 ff38 bl 802bff0 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802b180: f000 fb5c bl 802b83c prvLockQueue( pxQueue ); 802b184: f000 ff08 bl 802bf98 802b188: 6c63 ldr r3, [r4, #68] ; 0x44 802b18a: 3301 adds r3, #1 802b18c: bf08 it eq 802b18e: f8c4 8044 streq.w r8, [r4, #68] ; 0x44 802b192: 6ca3 ldr r3, [r4, #72] ; 0x48 802b194: 3301 adds r3, #1 802b196: bf08 it eq 802b198: f8c4 8048 streq.w r8, [r4, #72] ; 0x48 802b19c: f000 ff28 bl 802bff0 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802b1a0: a802 add r0, sp, #8 802b1a2: a901 add r1, sp, #4 802b1a4: f000 fdda bl 802bd5c 802b1a8: b9e8 cbnz r0, 802b1e6 static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802b1aa: f000 fef5 bl 802bf98 { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 802b1ae: f8d4 9038 ldr.w r9, [r4, #56] ; 0x38 802b1b2: 6be6 ldr r6, [r4, #60] ; 0x3c else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 802b1b4: f000 ff1c bl 802bff0 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 802b1b8: 45b1 cmp r9, r6 802b1ba: d10e bne.n 802b1da { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 802b1bc: f104 0010 add.w r0, r4, #16 802b1c0: 9901 ldr r1, [sp, #4] 802b1c2: f000 fd23 bl 802bc0c /* Unlocking the queue means queue events can effect the event list. It is possible that interrupts occurring now remove this task from the event list again - but as the scheduler is suspended the task will go onto the pending ready last instead of the actual ready list. */ prvUnlockQueue( pxQueue ); 802b1c6: 4620 mov r0, r4 802b1c8: f7ff fea2 bl 802af10 /* Resuming the scheduler will move tasks from the pending ready list into the ready list - so it is feasible that this task is already in a ready list before it yields - in which case the yield will not cause a context switch unless there is also a higher priority task in the pending ready list. */ if( xTaskResumeAll() == pdFALSE ) 802b1cc: f000 fbd2 bl 802b974 802b1d0: 2800 cmp r0, #0 802b1d2: d1a4 bne.n 802b11e { portYIELD_WITHIN_API(); 802b1d4: f000 fecc bl 802bf70 802b1d8: e7a1 b.n 802b11e } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802b1da: 4620 mov r0, r4 802b1dc: f7ff fe98 bl 802af10 ( void ) xTaskResumeAll(); 802b1e0: f000 fbc8 bl 802b974 802b1e4: e79b b.n 802b11e } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 802b1e6: 4620 mov r0, r4 802b1e8: f7ff fe92 bl 802af10 ( void ) xTaskResumeAll(); 802b1ec: f000 fbc2 bl 802b974 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 802b1f0: 2000 movs r0, #0 802b1f2: e010 b.n 802b216 BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802b1f4: f000 fec8 bl 802bf88 802b1f8: e787 b.n 802b10a configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802b1fa: 2d02 cmp r5, #2 802b1fc: d103 bne.n 802b206 802b1fe: e785 b.n 802b10c 802b200: f000 fec2 bl 802bf88 802b204: e786 b.n 802b114 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802b206: f000 fddd bl 802bdc4 802b20a: 2800 cmp r0, #0 802b20c: d189 bne.n 802b122 802b20e: e782 b.n 802b116 802b210: f000 feba bl 802bf88 802b214: e782 b.n 802b11c function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } } } 802b216: b005 add sp, #20 802b218: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802b21c : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 802b21c: b570 push {r4, r5, r6, lr} 802b21e: 4606 mov r6, r0 /* Prevent compiler warnings about unused parameters if configUSE_TRACE_FACILITY does not equal 1. */ ( void ) ucQueueType; /* Allocate the new queue structure. */ pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) ); 802b220: 2054 movs r0, #84 ; 0x54 802b222: f000 ffc7 bl 802c1b4 if( pxNewQueue != NULL ) 802b226: 4604 mov r4, r0 802b228: b108 cbz r0, 802b22e 802b22a: e003 b.n 802b234 802b22c: e7fe b.n 802b22c else { traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); 802b22e: f000 feab bl 802bf88 802b232: e7fb b.n 802b22c /* Each mutex has a length of 1 (like a binary semaphore) and an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; 802b234: 2301 movs r3, #1 /* Allocate the new queue structure. */ pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) ); if( pxNewQueue != NULL ) { /* Information required for priority inheritance. */ pxNewQueue->pxMutexHolder = NULL; 802b236: 2500 movs r5, #0 /* Each mutex has a length of 1 (like a binary semaphore) and an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; 802b238: 63c3 str r3, [r0, #60] ; 0x3c pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; 802b23a: f04f 33ff mov.w r3, #4294967295 pxNewQueue->u.pcReadFrom = NULL; /* Each mutex has a length of 1 (like a binary semaphore) and an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802b23e: 6385 str r5, [r0, #56] ; 0x38 /* Allocate the new queue structure. */ pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) ); if( pxNewQueue != NULL ) { /* Information required for priority inheritance. */ pxNewQueue->pxMutexHolder = NULL; 802b240: 6045 str r5, [r0, #4] an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; 802b242: 6443 str r3, [r0, #68] ; 0x44 pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) ); if( pxNewQueue != NULL ) { /* Information required for priority inheritance. */ pxNewQueue->pxMutexHolder = NULL; pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX; 802b244: 6005 str r5, [r0, #0] of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; pxNewQueue->xTxLock = queueUNLOCKED; 802b246: 6483 str r3, [r0, #72] ; 0x48 pxNewQueue->pxMutexHolder = NULL; pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX; /* Queues used as a mutex no data is actually copied into or out of the queue. */ pxNewQueue->pcWriteTo = NULL; 802b248: 6085 str r5, [r0, #8] pxNewQueue->u.pcReadFrom = NULL; 802b24a: 60c5 str r5, [r0, #12] /* Each mutex has a length of 1 (like a binary semaphore) and an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; 802b24c: 6405 str r5, [r0, #64] ; 0x40 pxNewQueue->xRxLock = queueUNLOCKED; pxNewQueue->xTxLock = queueUNLOCKED; #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 802b24e: f880 6050 strb.w r6, [r0, #80] ; 0x50 pxNewQueue->pxQueueSetContainer = NULL; } #endif /* Ensure the event queues start with the correct state. */ vListInitialise( &( pxNewQueue->xTasksWaitingToSend ) ); 802b252: 3010 adds r0, #16 802b254: f7ff fe1a bl 802ae8c vListInitialise( &( pxNewQueue->xTasksWaitingToReceive ) ); 802b258: f104 0024 add.w r0, r4, #36 ; 0x24 802b25c: f7ff fe16 bl 802ae8c traceCREATE_MUTEX( pxNewQueue ); /* Start with the semaphore in the expected state. */ ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK ); 802b260: 4620 mov r0, r4 802b262: 4629 mov r1, r5 802b264: 462a mov r2, r5 802b266: 462b mov r3, r5 802b268: f7ff ff3e bl 802b0e8 traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); return pxNewQueue; } 802b26c: 4620 mov r0, r4 802b26e: bd70 pop {r4, r5, r6, pc} 0802b270 : #endif /* configUSE_ALTERNATIVE_API */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 802b270: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b274: 460f mov r7, r1 802b276: 4616 mov r6, r2 802b278: 461d mov r5, r3 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802b27a: 4604 mov r4, r0 802b27c: b910 cbnz r0, 802b284 802b27e: f000 fe83 bl 802bf88 802b282: e7fe b.n 802b282 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802b284: bb41 cbnz r1, 802b2d8 802b286: 6c03 ldr r3, [r0, #64] ; 0x40 802b288: b333 cbz r3, 802b2d8 802b28a: e022 b.n 802b2d2 802b28c: e7fe b.n 802b28c configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802b28e: 6be3 ldr r3, [r4, #60] ; 0x3c 802b290: 2b01 cmp r3, #1 802b292: d124 bne.n 802b2de 802b294: e026 b.n 802b2e4 802b296: e7fe b.n 802b296 read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802b298: 2d02 cmp r5, #2 802b29a: d118 bne.n 802b2ce /* A task can only have an inherited priority if it is a mutex holder - and if there is a mutex holder then the mutex cannot be given from an ISR. Therefore, unlike the xQueueGenericGive() function, there is no need to determine the need for priority disinheritance here or to clear the mutex holder TCB member. */ ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 802b29c: 4620 mov r0, r4 802b29e: 4639 mov r1, r7 802b2a0: 462a mov r2, r5 802b2a2: f7ff fe7c bl 802af9e /* The event list is not altered if the queue is locked. This will be done when the queue is unlocked later. */ if( pxQueue->xTxLock == queueUNLOCKED ) 802b2a6: 6ca3 ldr r3, [r4, #72] ; 0x48 802b2a8: 3301 adds r3, #1 802b2aa: d10b bne.n 802b2c4 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802b2ac: 6a63 ldr r3, [r4, #36] ; 0x24 802b2ae: b903 cbnz r3, 802b2b2 802b2b0: e00b b.n 802b2ca { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802b2b2: f104 0024 add.w r0, r4, #36 ; 0x24 802b2b6: f000 fd05 bl 802bcc4 802b2ba: b130 cbz r0, 802b2ca { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802b2bc: b12e cbz r6, 802b2ca { *pxHigherPriorityTaskWoken = pdTRUE; 802b2be: 2401 movs r4, #1 802b2c0: 6034 str r4, [r6, #0] 802b2c2: e019 b.n 802b2f8 } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 802b2c4: 6ca3 ldr r3, [r4, #72] ; 0x48 802b2c6: 3301 adds r3, #1 802b2c8: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802b2ca: 2401 movs r4, #1 802b2cc: e014 b.n 802b2f8 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802b2ce: 2400 movs r4, #0 802b2d0: e012 b.n 802b2f8 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802b2d2: f000 fe59 bl 802bf88 802b2d6: e7d9 b.n 802b28c configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802b2d8: 2d02 cmp r5, #2 802b2da: d103 bne.n 802b2e4 802b2dc: e7d7 b.n 802b28e 802b2de: f000 fe53 bl 802bf88 802b2e2: e7d8 b.n 802b296 that have been assigned a priority at or (logically) below the maximum system call interrupt priority. FreeRTOS maintains a separate interrupt safe API to ensure interrupt entry is as fast and as simple as possible. More information (albeit Cortex-M specific) is provided on the following link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */ portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); 802b2e4: f000 ff20 bl 802c128 /* Similar to xQueueGenericSend, except without blocking if there is no room in the queue. Also don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 802b2e8: f000 fe4e bl 802bf88 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802b2ec: 6ba2 ldr r2, [r4, #56] ; 0x38 802b2ee: 6be3 ldr r3, [r4, #60] ; 0x3c 802b2f0: 429a cmp r2, r3 /* Similar to xQueueGenericSend, except without blocking if there is no room in the queue. Also don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 802b2f2: 4680 mov r8, r0 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 802b2f4: d2d0 bcs.n 802b298 802b2f6: e7d1 b.n 802b29c { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802b2f8: 4640 mov r0, r8 802b2fa: f000 fe75 bl 802bfe8 return xReturn; } 802b2fe: 4620 mov r0, r4 802b300: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802b304 : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 802b304: b5f8 push {r3, r4, r5, r6, r7, lr} 802b306: 460d mov r5, r1 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802b308: 4604 mov r4, r0 802b30a: b910 cbnz r0, 802b312 802b30c: f000 fe3c bl 802bf88 802b310: e7fe b.n 802b310 /* xQueueGenericSendFromISR() should be used in the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 802b312: 6c06 ldr r6, [r0, #64] ; 0x40 802b314: b116 cbz r6, 802b31c 802b316: f000 fe37 bl 802bf88 802b31a: e7fe b.n 802b31a that have been assigned a priority at or (logically) below the maximum system call interrupt priority. FreeRTOS maintains a separate interrupt safe API to ensure interrupt entry is as fast and as simple as possible. More information (albeit Cortex-M specific) is provided on the following link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */ portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); 802b31c: f000 ff04 bl 802c128 /* Similar to xQueueGenericSendFromISR() but used with semaphores where the item size is 0. Don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 802b320: f000 fe32 bl 802bf88 { /* When the queue is used to implement a semaphore no data is ever moved through the queue but it is still valid to see if the queue 'has space'. */ if( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) 802b324: 6ba2 ldr r2, [r4, #56] ; 0x38 802b326: 6be3 ldr r3, [r4, #60] ; 0x3c 802b328: 429a cmp r2, r3 /* Similar to xQueueGenericSendFromISR() but used with semaphores where the item size is 0. Don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 802b32a: 4607 mov r7, r0 { /* When the queue is used to implement a semaphore no data is ever moved through the queue but it is still valid to see if the queue 'has space'. */ if( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) 802b32c: d216 bcs.n 802b35c holder - and if there is a mutex holder then the mutex cannot be given from an ISR. Therefore, unlike the xQueueGenericGive() function, there is no need to determine the need for priority disinheritance here or to clear the mutex holder TCB member. */ ++( pxQueue->uxMessagesWaiting ); 802b32e: 6ba3 ldr r3, [r4, #56] ; 0x38 802b330: 3301 adds r3, #1 802b332: 63a3 str r3, [r4, #56] ; 0x38 /* The event list is not altered if the queue is locked. This will be done when the queue is unlocked later. */ if( pxQueue->xTxLock == queueUNLOCKED ) 802b334: 6ca3 ldr r3, [r4, #72] ; 0x48 802b336: 3301 adds r3, #1 802b338: d10b bne.n 802b352 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802b33a: 6a63 ldr r3, [r4, #36] ; 0x24 802b33c: b903 cbnz r3, 802b340 802b33e: e00b b.n 802b358 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802b340: f104 0024 add.w r0, r4, #36 ; 0x24 802b344: f000 fcbe bl 802bcc4 802b348: b130 cbz r0, 802b358 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802b34a: b12d cbz r5, 802b358 { *pxHigherPriorityTaskWoken = pdTRUE; 802b34c: 2401 movs r4, #1 802b34e: 602c str r4, [r5, #0] 802b350: e005 b.n 802b35e } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 802b352: 6ca3 ldr r3, [r4, #72] ; 0x48 802b354: 3301 adds r3, #1 802b356: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802b358: 2401 movs r4, #1 802b35a: e000 b.n 802b35e } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802b35c: 4634 mov r4, r6 } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 802b35e: 4638 mov r0, r7 802b360: f000 fe42 bl 802bfe8 return xReturn; } 802b364: 4620 mov r0, r4 802b366: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802b368 : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeeking ) { 802b368: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802b36c: b085 sub sp, #20 802b36e: 460e mov r6, r1 802b370: 9201 str r2, [sp, #4] 802b372: 4699 mov r9, r3 BaseType_t xEntryTimeSet = pdFALSE; TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802b374: 4604 mov r4, r0 802b376: b910 cbnz r0, 802b37e 802b378: f000 fe06 bl 802bf88 802b37c: e7fe b.n 802b37c configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802b37e: 2900 cmp r1, #0 802b380: f040 8089 bne.w 802b496 802b384: 6c03 ldr r3, [r0, #64] ; 0x40 802b386: 2b00 cmp r3, #0 802b388: f000 8085 beq.w 802b496 802b38c: e080 b.n 802b490 802b38e: e7fe b.n 802b38e #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802b390: 9d01 ldr r5, [sp, #4] 802b392: b125 cbz r5, 802b39e 802b394: e085 b.n 802b4a2 802b396: e7fe b.n 802b396 802b398: 2501 movs r5, #1 802b39a: e001 b.n 802b3a0 802b39c: 2500 movs r5, #0 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); prvLockQueue( pxQueue ); 802b39e: 2700 movs r7, #0 statements within the function itself. This is done in the interest of execution time efficiency. */ for( ;; ) { taskENTER_CRITICAL(); 802b3a0: f000 fdfa bl 802bf98 { /* Is there data in the queue now? To be running the calling task must be the highest priority task wanting to access the queue. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 802b3a4: 6ba3 ldr r3, [r4, #56] ; 0x38 802b3a6: b33b cbz r3, 802b3f8 { /* Remember the read position in case the queue is only being peeked. */ pcOriginalReadPosition = pxQueue->u.pcReadFrom; prvCopyDataFromQueue( pxQueue, pvBuffer ); 802b3a8: 4620 mov r0, r4 802b3aa: 4631 mov r1, r6 must be the highest priority task wanting to access the queue. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) { /* Remember the read position in case the queue is only being peeked. */ pcOriginalReadPosition = pxQueue->u.pcReadFrom; 802b3ac: 68e5 ldr r5, [r4, #12] prvCopyDataFromQueue( pxQueue, pvBuffer ); 802b3ae: f7ff fde3 bl 802af78 if( xJustPeeking == pdFALSE ) 802b3b2: f1b9 0f00 cmp.w r9, #0 802b3b6: d112 bne.n 802b3de { traceQUEUE_RECEIVE( pxQueue ); /* Actually removing data, not just peeking. */ --( pxQueue->uxMessagesWaiting ); 802b3b8: 6ba3 ldr r3, [r4, #56] ; 0x38 802b3ba: 3b01 subs r3, #1 802b3bc: 63a3 str r3, [r4, #56] ; 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802b3be: 6823 ldr r3, [r4, #0] 802b3c0: b913 cbnz r3, 802b3c8 { /* Record the information required to implement priority inheritance should it become necessary. */ pxQueue->pxMutexHolder = ( int8_t * ) pvTaskIncrementMutexHeldCount(); /*lint !e961 Cast is not redundant as TaskHandle_t is a typedef. */ 802b3c2: f000 fd99 bl 802bef8 802b3c6: 6060 str r0, [r4, #4] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 802b3c8: 6923 ldr r3, [r4, #16] 802b3ca: b18b cbz r3, 802b3f0 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802b3cc: f104 0010 add.w r0, r4, #16 802b3d0: f000 fc78 bl 802bcc4 802b3d4: 2801 cmp r0, #1 802b3d6: d10b bne.n 802b3f0 { queueYIELD_IF_USING_PREEMPTION(); 802b3d8: f000 fdca bl 802bf70 802b3dc: e008 b.n 802b3f0 pointer. */ pxQueue->u.pcReadFrom = pcOriginalReadPosition; /* The data is being left in the queue, so see if there are any other tasks waiting for the data. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802b3de: 6a63 ldr r3, [r4, #36] ; 0x24 { traceQUEUE_PEEK( pxQueue ); /* The data is not being removed, so reset the read pointer. */ pxQueue->u.pcReadFrom = pcOriginalReadPosition; 802b3e0: 60e5 str r5, [r4, #12] /* The data is being left in the queue, so see if there are any other tasks waiting for the data. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802b3e2: b12b cbz r3, 802b3f0 { /* Tasks that are removed from the event list will get added to the pending ready list as the scheduler is still suspended. */ if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802b3e4: f104 0024 add.w r0, r4, #36 ; 0x24 802b3e8: f000 fc6c bl 802bcc4 802b3ec: 2800 cmp r0, #0 802b3ee: d1f3 bne.n 802b3d8 { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802b3f0: f000 fdfe bl 802bff0 return pdPASS; 802b3f4: 2001 movs r0, #1 802b3f6: e057 b.n 802b4a8 } else { if( xTicksToWait == ( TickType_t ) 0 ) 802b3f8: f8dd 8004 ldr.w r8, [sp, #4] 802b3fc: f1b8 0f00 cmp.w r8, #0 802b400: d102 bne.n 802b408 { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802b402: f000 fdf5 bl 802bff0 802b406: e041 b.n 802b48c traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } else if( xEntryTimeSet == pdFALSE ) 802b408: b915 cbnz r5, 802b410 { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802b40a: a802 add r0, sp, #8 802b40c: f000 fc96 bl 802bd3c /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 802b410: f000 fdee bl 802bff0 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802b414: f000 fa12 bl 802b83c prvLockQueue( pxQueue ); 802b418: f000 fdbe bl 802bf98 802b41c: 6c63 ldr r3, [r4, #68] ; 0x44 802b41e: 3301 adds r3, #1 802b420: bf08 it eq 802b422: 6467 streq r7, [r4, #68] ; 0x44 802b424: 6ca3 ldr r3, [r4, #72] ; 0x48 802b426: 3301 adds r3, #1 802b428: bf08 it eq 802b42a: 64a7 streq r7, [r4, #72] ; 0x48 802b42c: f000 fde0 bl 802bff0 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802b430: a802 add r0, sp, #8 802b432: a901 add r1, sp, #4 802b434: f000 fc92 bl 802bd5c 802b438: bb18 cbnz r0, 802b482 static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802b43a: f000 fdad bl 802bf98 { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 802b43e: 6ba5 ldr r5, [r4, #56] ; 0x38 else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 802b440: f000 fdd6 bl 802bff0 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 802b444: b9bd cbnz r5, 802b476 { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802b446: 6823 ldr r3, [r4, #0] 802b448: b933 cbnz r3, 802b458 { taskENTER_CRITICAL(); 802b44a: f000 fda5 bl 802bf98 { vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder ); 802b44e: 6860 ldr r0, [r4, #4] 802b450: f000 fcc8 bl 802bde4 } taskEXIT_CRITICAL(); 802b454: f000 fdcc bl 802bff0 mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802b458: f104 0024 add.w r0, r4, #36 ; 0x24 802b45c: 9901 ldr r1, [sp, #4] 802b45e: f000 fbd5 bl 802bc0c prvUnlockQueue( pxQueue ); 802b462: 4620 mov r0, r4 802b464: f7ff fd54 bl 802af10 if( xTaskResumeAll() == pdFALSE ) 802b468: f000 fa84 bl 802b974 802b46c: 2800 cmp r0, #0 802b46e: d193 bne.n 802b398 { portYIELD_WITHIN_API(); 802b470: f000 fd7e bl 802bf70 802b474: e790 b.n 802b398 } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802b476: 4620 mov r0, r4 802b478: f7ff fd4a bl 802af10 ( void ) xTaskResumeAll(); 802b47c: f000 fa7a bl 802b974 802b480: e78a b.n 802b398 } } else { prvUnlockQueue( pxQueue ); 802b482: 4620 mov r0, r4 802b484: f7ff fd44 bl 802af10 ( void ) xTaskResumeAll(); 802b488: f000 fa74 bl 802b974 traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 802b48c: 2000 movs r0, #0 802b48e: e00b b.n 802b4a8 TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802b490: f000 fd7a bl 802bf88 802b494: e77b b.n 802b38e #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802b496: f000 fc95 bl 802bdc4 802b49a: 2800 cmp r0, #0 802b49c: f47f af7e bne.w 802b39c 802b4a0: e776 b.n 802b390 802b4a2: f000 fd71 bl 802bf88 802b4a6: e776 b.n 802b396 ( void ) xTaskResumeAll(); traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } } } 802b4a8: b005 add sp, #20 802b4aa: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802b4ae : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue ) { 802b4ae: b510 push {r4, lr} UBaseType_t uxReturn; Queue_t *pxQueue; pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802b4b0: 4604 mov r4, r0 802b4b2: b910 cbnz r0, 802b4ba 802b4b4: f000 fd68 bl 802bf88 802b4b8: e7fe b.n 802b4b8 taskENTER_CRITICAL(); 802b4ba: f000 fd6d bl 802bf98 { uxReturn = pxQueue->uxLength - pxQueue->uxMessagesWaiting; 802b4be: 6ba3 ldr r3, [r4, #56] ; 0x38 802b4c0: 6be4 ldr r4, [r4, #60] ; 0x3c 802b4c2: 1ae4 subs r4, r4, r3 } taskEXIT_CRITICAL(); 802b4c4: f000 fd94 bl 802bff0 return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 802b4c8: 4620 mov r0, r4 802b4ca: bd10 pop {r4, pc} 0802b4cc : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) { 802b4cc: b538 push {r3, r4, r5, lr} 802b4ce: 4604 mov r4, r0 802b4d0: 460d mov r5, r1 will not actually cause the task to block, just place it on a blocked list. It will not block until the scheduler is unlocked - at which time a yield will be performed. If an item is added to the queue while the queue is locked, and the calling task blocks on the queue, then the calling task will be immediately unblocked when the queue is unlocked. */ prvLockQueue( pxQueue ); 802b4d2: f000 fd61 bl 802bf98 802b4d6: 6c63 ldr r3, [r4, #68] ; 0x44 802b4d8: 3301 adds r3, #1 802b4da: d101 bne.n 802b4e0 802b4dc: 2300 movs r3, #0 802b4de: 6463 str r3, [r4, #68] ; 0x44 802b4e0: 6ca3 ldr r3, [r4, #72] ; 0x48 802b4e2: 3301 adds r3, #1 802b4e4: d101 bne.n 802b4ea 802b4e6: 2300 movs r3, #0 802b4e8: 64a3 str r3, [r4, #72] ; 0x48 802b4ea: f000 fd81 bl 802bff0 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 802b4ee: 6ba3 ldr r3, [r4, #56] ; 0x38 802b4f0: b923 cbnz r3, 802b4fc { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802b4f2: f104 0024 add.w r0, r4, #36 ; 0x24 802b4f6: 4629 mov r1, r5 802b4f8: f000 fbbc bl 802bc74 } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 802b4fc: 4620 mov r0, r4 } 802b4fe: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 802b502: f7ff bd05 b.w 802af10 802b506: 0000 movs r0, r0 0802b508 : static void prvResetNextTaskUnblockTime( void ) { TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802b508: 4a06 ldr r2, [pc, #24] ; (802b524 ) 802b50a: 6813 ldr r3, [r2, #0] 802b50c: 6819 ldr r1, [r3, #0] 802b50e: 4b06 ldr r3, [pc, #24] ; (802b528 ) 802b510: b911 cbnz r1, 802b518 /* The new current delayed list is empty. Set xNextTaskUnblockTime to the maximum possible value so it is extremely unlikely that the if( xTickCount >= xNextTaskUnblockTime ) test will pass until there is an item in the delayed list. */ xNextTaskUnblockTime = portMAX_DELAY; 802b512: f04f 32ff mov.w r2, #4294967295 802b516: e003 b.n 802b520 { /* The new current delayed list is not empty, get the value of the item at the head of the delayed list. This is the time at which the task at the head of the delayed list should be removed from the Blocked state. */ ( pxTCB ) = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); 802b518: 6812 ldr r2, [r2, #0] 802b51a: 68d2 ldr r2, [r2, #12] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xGenericListItem ) ); 802b51c: 68d2 ldr r2, [r2, #12] 802b51e: 6852 ldr r2, [r2, #4] 802b520: 601a str r2, [r3, #0] 802b522: 4770 bx lr 802b524: 20000c44 .word 0x20000c44 802b528: 20000718 .word 0x20000718 0802b52c : /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 802b52c: 4b0e ldr r3, [pc, #56] ; (802b568 ) 802b52e: 681a ldr r2, [r3, #0] #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802b530: b510 push {r4, lr} /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 802b532: 6050 str r0, [r2, #4] if( xTimeToWake < xTickCount ) 802b534: 4a0d ldr r2, [pc, #52] ; (802b56c ) 802b536: 6812 ldr r2, [r2, #0] 802b538: 4290 cmp r0, r2 #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802b53a: 4604 mov r4, r0 /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xTickCount ) 802b53c: d207 bcs.n 802b54e { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802b53e: 4a0c ldr r2, [pc, #48] ; (802b570 ) 802b540: 6810 ldr r0, [r2, #0] 802b542: 6819 ldr r1, [r3, #0] 802b544: 3104 adds r1, #4 else { mtCOVERAGE_TEST_MARKER(); } } } 802b546: e8bd 4010 ldmia.w sp!, {r4, lr} listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xTickCount ) { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802b54a: f7ff bcb9 b.w 802aec0 } else { /* The wake time has not overflowed, so the current block list is used. */ vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802b54e: 4a09 ldr r2, [pc, #36] ; (802b574 ) 802b550: 6810 ldr r0, [r2, #0] 802b552: 6819 ldr r1, [r3, #0] 802b554: 3104 adds r1, #4 802b556: f7ff fcb3 bl 802aec0 /* If the task entering the blocked state was placed at the head of the list of blocked tasks then xNextTaskUnblockTime needs to be updated too. */ if( xTimeToWake < xNextTaskUnblockTime ) 802b55a: 4b07 ldr r3, [pc, #28] ; (802b578 ) 802b55c: 681a ldr r2, [r3, #0] 802b55e: 4294 cmp r4, r2 { xNextTaskUnblockTime = xTimeToWake; 802b560: bf38 it cc 802b562: 601c strcc r4, [r3, #0] 802b564: bd10 pop {r4, pc} 802b566: bf00 nop 802b568: 20000cf4 .word 0x20000cf4 802b56c: 20000d10 .word 0x20000d10 802b570: 20000d14 .word 0x20000d14 802b574: 20000c44 .word 0x20000c44 802b578: 20000718 .word 0x20000718 0802b57c : #endif /*-----------------------------------------------------------*/ BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { 802b57c: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802b580: 9d0a ldr r5, [sp, #40] ; 0x28 802b582: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 802b586: 9e0c ldr r6, [sp, #48] ; 0x30 802b588: 460f mov r7, r1 802b58a: 4693 mov fp, r2 802b58c: 469a mov sl, r3 BaseType_t xReturn; TCB_t * pxNewTCB; StackType_t *pxTopOfStack; configASSERT( pxTaskCode ); 802b58e: 4681 mov r9, r0 802b590: b910 cbnz r0, 802b598 802b592: f000 fcf9 bl 802bf88 802b596: e7fe b.n 802b596 configASSERT( ( ( uxPriority & ( ~portPRIVILEGE_BIT ) ) < configMAX_PRIORITIES ) ); 802b598: 2d04 cmp r5, #4 802b59a: d902 bls.n 802b5a2 802b59c: f000 fcf4 bl 802bf88 802b5a0: e7fe b.n 802b5a0 #else /* portSTACK_GROWTH */ { StackType_t *pxStack; /* Allocate space for the stack used by the task being created. */ pxStack = ( StackType_t * ) pvPortMallocAligned( ( ( ( size_t ) usStackDepth ) * sizeof( StackType_t ) ), puxStackBuffer ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 802b5a2: b936 cbnz r6, 802b5b2 802b5a4: 0090 lsls r0, r2, #2 802b5a6: f000 fe05 bl 802c1b4 if( pxStack != NULL ) 802b5aa: 4606 mov r6, r0 802b5ac: 2800 cmp r0, #0 802b5ae: f000 809e beq.w 802b6ee { /* Allocate space for the TCB. Where the memory comes from depends on the implementation of the port malloc function. */ pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) ); 802b5b2: 205c movs r0, #92 ; 0x5c 802b5b4: f000 fdfe bl 802c1b4 if( pxNewTCB != NULL ) 802b5b8: 4604 mov r4, r0 802b5ba: b178 cbz r0, 802b5dc { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 802b5bc: 6306 str r6, [r0, #48] ; 0x30 { /* Avoid dependency on memset() if it is not required. */ #if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) || ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) ) { /* Just to help debugging. */ ( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) usStackDepth * sizeof( StackType_t ) ); 802b5be: ea4f 028b mov.w r2, fp, lsl #2 802b5c2: 4630 mov r0, r6 802b5c4: 21a5 movs r1, #165 ; 0xa5 802b5c6: f7f6 fc27 bl 8021e18 stack grows from high memory to low (as per the 80x86) or vice versa. portSTACK_GROWTH is used to make the result positive or negative as required by the port. */ #if( portSTACK_GROWTH < 0 ) { pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - ( uint16_t ) 1 ); 802b5ca: 6b23 ldr r3, [r4, #48] ; 0x30 802b5cc: f10b 3bff add.w fp, fp, #4294967295 802b5d0: eb03 0b8b add.w fp, r3, fp, lsl #2 pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ( portPOINTER_SIZE_TYPE ) ~portBYTE_ALIGNMENT_MASK ) ); /*lint !e923 MISRA exception. Avoiding casts between pointers and integers is not practical. Size differences accounted for using portPOINTER_SIZE_TYPE type. */ 802b5d4: f02b 0b07 bic.w fp, fp, #7 static void prvInitialiseTCBVariables( TCB_t * const pxTCB, const char * const pcName, UBaseType_t uxPriority, const MemoryRegion_t * const xRegions, const uint16_t usStackDepth ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { UBaseType_t x; /* Store the task name in the TCB. */ for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 802b5d8: 2600 movs r6, #0 802b5da: e003 b.n 802b5e4 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 802b5dc: 4630 mov r0, r6 802b5de: f000 fe6f bl 802c2c0 802b5e2: e084 b.n 802b6ee static char *prvWriteNameToBuffer( char *pcBuffer, const char *pcTaskName ); #endif /*-----------------------------------------------------------*/ BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ 802b5e4: 19a3 adds r3, r4, r6 UBaseType_t x; /* Store the task name in the TCB. */ for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) { pxTCB->pcTaskName[ x ] = pcName[ x ]; 802b5e6: 5dba ldrb r2, [r7, r6] 802b5e8: f883 2034 strb.w r2, [r3, #52] ; 0x34 /* Don't copy all configMAX_TASK_NAME_LEN if the string is shorter than configMAX_TASK_NAME_LEN characters just in case the memory after the string is not accessible (extremely unlikely). */ if( pcName[ x ] == 0x00 ) 802b5ec: 5dbb ldrb r3, [r7, r6] 802b5ee: b113 cbz r3, 802b5f6 static void prvInitialiseTCBVariables( TCB_t * const pxTCB, const char * const pcName, UBaseType_t uxPriority, const MemoryRegion_t * const xRegions, const uint16_t usStackDepth ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { UBaseType_t x; /* Store the task name in the TCB. */ for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 802b5f0: 3601 adds r6, #1 802b5f2: 2e10 cmp r6, #16 802b5f4: d1f6 bne.n 802b5e4 } } /* Ensure the name string is terminated in the case that the string length was greater or equal to configMAX_TASK_NAME_LEN. */ pxTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0'; 802b5f6: 2600 movs r6, #0 pxTCB->uxBasePriority = uxPriority; pxTCB->uxMutexesHeld = 0; } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802b5f8: 1d27 adds r7, r4, #4 802b5fa: 4638 mov r0, r7 } } /* Ensure the name string is terminated in the case that the string length was greater or equal to configMAX_TASK_NAME_LEN. */ pxTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0'; 802b5fc: f884 6043 strb.w r6, [r4, #67] ; 0x43 else { mtCOVERAGE_TEST_MARKER(); } pxTCB->uxPriority = uxPriority; 802b600: 62e5 str r5, [r4, #44] ; 0x2c #if ( configUSE_MUTEXES == 1 ) { pxTCB->uxBasePriority = uxPriority; 802b602: 64e5 str r5, [r4, #76] ; 0x4c pxTCB->uxMutexesHeld = 0; 802b604: 6526 str r6, [r4, #80] ; 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802b606: f7ff fc4c bl 802aea2 vListInitialiseItem( &( pxTCB->xEventListItem ) ); 802b60a: f104 0018 add.w r0, r4, #24 802b60e: f7ff fc48 bl 802aea2 /* Set the pxTCB as a link back from the ListItem_t. This is so we can get back to the containing TCB from a generic item in a list. */ listSET_LIST_ITEM_OWNER( &( pxTCB->xGenericListItem ), pxTCB ); /* Event lists are always in priority order. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 802b612: f1c5 0305 rsb r3, r5, #5 } #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; 802b616: 6566 str r6, [r4, #84] ; 0x54 vListInitialiseItem( &( pxTCB->xGenericListItem ) ); vListInitialiseItem( &( pxTCB->xEventListItem ) ); /* Set the pxTCB as a link back from the ListItem_t. This is so we can get back to the containing TCB from a generic item in a list. */ listSET_LIST_ITEM_OWNER( &( pxTCB->xGenericListItem ), pxTCB ); 802b618: 6124 str r4, [r4, #16] /* Event lists are always in priority order. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 802b61a: 61a3 str r3, [r4, #24] listSET_LIST_ITEM_OWNER( &( pxTCB->xEventListItem ), pxTCB ); 802b61c: 6264 str r4, [r4, #36] ; 0x24 #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; pxTCB->eNotifyState = eNotWaitingNotification; 802b61e: f884 6058 strb.w r6, [r4, #88] ; 0x58 { pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters, xRunPrivileged ); } #else /* portUSING_MPU_WRAPPERS */ { pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters ); 802b622: 4658 mov r0, fp 802b624: 4649 mov r1, r9 802b626: 4652 mov r2, sl 802b628: f000 fc82 bl 802bf30 802b62c: 6020 str r0, [r4, #0] } #endif /* portUSING_MPU_WRAPPERS */ if( ( void * ) pxCreatedTask != NULL ) 802b62e: f1b8 0f00 cmp.w r8, #0 802b632: d001 beq.n 802b638 { /* Pass the TCB out - in an anonymous way. The calling function/ task can use this as a handle to delete the task later if required.*/ *pxCreatedTask = ( TaskHandle_t ) pxNewTCB; 802b634: f8c8 4000 str.w r4, [r8] mtCOVERAGE_TEST_MARKER(); } /* Ensure interrupts don't access the task lists while they are being updated. */ taskENTER_CRITICAL(); 802b638: f000 fcae bl 802bf98 { uxCurrentNumberOfTasks++; 802b63c: 4a2e ldr r2, [pc, #184] ; (802b6f8 ) 802b63e: 6813 ldr r3, [r2, #0] 802b640: 3301 adds r3, #1 802b642: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 802b644: 4b2d ldr r3, [pc, #180] ; (802b6fc ) 802b646: 681e ldr r6, [r3, #0] 802b648: bb36 cbnz r6, 802b698 { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 802b64a: 601c str r4, [r3, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 802b64c: 6813 ldr r3, [r2, #0] 802b64e: 2b01 cmp r3, #1 802b650: d12a bne.n 802b6a8 { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 802b652: f8df 80d0 ldr.w r8, [pc, #208] ; 802b724 802b656: f04f 0914 mov.w r9, #20 802b65a: fb09 8006 mla r0, r9, r6, r8 static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 802b65e: 3601 adds r6, #1 { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 802b660: f7ff fc14 bl 802ae8c static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 802b664: 2e05 cmp r6, #5 802b666: d1f8 bne.n 802b65a { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802b668: f8df 80bc ldr.w r8, [pc, #188] ; 802b728 vListInitialise( &xDelayedTaskList2 ); 802b66c: 4e24 ldr r6, [pc, #144] ; (802b700 ) for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802b66e: 4640 mov r0, r8 802b670: f7ff fc0c bl 802ae8c vListInitialise( &xDelayedTaskList2 ); 802b674: 4630 mov r0, r6 802b676: f7ff fc09 bl 802ae8c vListInitialise( &xPendingReadyList ); 802b67a: 4822 ldr r0, [pc, #136] ; (802b704 ) 802b67c: f7ff fc06 bl 802ae8c #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 802b680: 4821 ldr r0, [pc, #132] ; (802b708 ) 802b682: f7ff fc03 bl 802ae8c } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 802b686: 4821 ldr r0, [pc, #132] ; (802b70c ) 802b688: f7ff fc00 bl 802ae8c } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 802b68c: 4b20 ldr r3, [pc, #128] ; (802b710 ) 802b68e: f8c3 8000 str.w r8, [r3] pxOverflowDelayedTaskList = &xDelayedTaskList2; 802b692: 4b20 ldr r3, [pc, #128] ; (802b714 ) 802b694: 601e str r6, [r3, #0] 802b696: e007 b.n 802b6a8 else { /* If the scheduler is not already running, make this task the current task if it is the highest priority task to be created so far. */ if( xSchedulerRunning == pdFALSE ) 802b698: 4a1f ldr r2, [pc, #124] ; (802b718 ) 802b69a: 6812 ldr r2, [r2, #0] 802b69c: b922 cbnz r2, 802b6a8 { if( pxCurrentTCB->uxPriority <= uxPriority ) 802b69e: 681a ldr r2, [r3, #0] 802b6a0: 6ad2 ldr r2, [r2, #44] ; 0x2c 802b6a2: 42aa cmp r2, r5 { pxCurrentTCB = pxNewTCB; 802b6a4: bf98 it ls 802b6a6: 601c strls r4, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 802b6a8: 4a1c ldr r2, [pc, #112] ; (802b71c ) 802b6aa: 6813 ldr r3, [r2, #0] 802b6ac: 3301 adds r3, #1 802b6ae: 6013 str r3, [r2, #0] pxNewTCB->uxTCBNumber = uxTaskNumber; } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 802b6b0: 4a1b ldr r2, [pc, #108] ; (802b720 ) uxTaskNumber++; #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 802b6b2: 6463 str r3, [r4, #68] ; 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 802b6b4: 6ae3 ldr r3, [r4, #44] ; 0x2c 802b6b6: 6811 ldr r1, [r2, #0] 802b6b8: 2401 movs r4, #1 802b6ba: fa04 f003 lsl.w r0, r4, r3 802b6be: 4301 orrs r1, r0 802b6c0: 6011 str r1, [r2, #0] 802b6c2: 4a18 ldr r2, [pc, #96] ; (802b724 ) 802b6c4: 2014 movs r0, #20 802b6c6: fb00 2003 mla r0, r0, r3, r2 802b6ca: 4639 mov r1, r7 802b6cc: f7ff fbec bl 802aea8 xReturn = pdPASS; portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 802b6d0: f000 fc8e bl 802bff0 traceTASK_CREATE_FAILED(); } if( xReturn == pdPASS ) { if( xSchedulerRunning != pdFALSE ) 802b6d4: 4b10 ldr r3, [pc, #64] ; (802b718 ) 802b6d6: 681b ldr r3, [r3, #0] 802b6d8: b133 cbz r3, 802b6e8 { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < uxPriority ) 802b6da: 4b08 ldr r3, [pc, #32] ; (802b6fc ) 802b6dc: 681b ldr r3, [r3, #0] 802b6de: 6adb ldr r3, [r3, #44] ; 0x2c 802b6e0: 42ab cmp r3, r5 802b6e2: d201 bcs.n 802b6e8 { taskYIELD_IF_USING_PREEMPTION(); 802b6e4: f000 fc44 bl 802bf70 #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); xReturn = pdPASS; 802b6e8: 4620 mov r0, r4 802b6ea: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} } taskEXIT_CRITICAL(); } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 802b6ee: f04f 30ff mov.w r0, #4294967295 mtCOVERAGE_TEST_MARKER(); } } return xReturn; } 802b6f2: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802b6f6: bf00 nop 802b6f8: 20000d1c .word 0x20000d1c 802b6fc: 20000cf4 .word 0x20000cf4 802b700: 20000c64 .word 0x20000c64 802b704: 20000cf8 .word 0x20000cf8 802b708: 20000ce0 .word 0x20000ce0 802b70c: 20000d20 .word 0x20000d20 802b710: 20000c44 .word 0x20000c44 802b714: 20000d14 .word 0x20000d14 802b718: 20000c48 .word 0x20000c48 802b71c: 20000d18 .word 0x20000d18 802b720: 20000d34 .word 0x20000d34 802b724: 20000c7c .word 0x20000c7c 802b728: 20000c50 .word 0x20000c50 0802b72c : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) void vTaskDelete( TaskHandle_t xTaskToDelete ) { 802b72c: b538 push {r3, r4, r5, lr} 802b72e: 4604 mov r4, r0 TCB_t *pxTCB; taskENTER_CRITICAL(); 802b730: f000 fc32 bl 802bf98 { /* If null is passed in here then it is the calling task that is being deleted. */ pxTCB = prvGetTCBFromHandle( xTaskToDelete ); 802b734: b90c cbnz r4, 802b73a 802b736: 4b22 ldr r3, [pc, #136] ; (802b7c0 ) 802b738: 681c ldr r4, [r3, #0] /* Remove task from the ready list and place in the termination list. This will stop the task from be scheduled. The idle task will check the termination list and free up any memory allocated by the scheduler for the TCB and stack. */ if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 802b73a: 1d25 adds r5, r4, #4 802b73c: 4628 mov r0, r5 802b73e: f7ff fbd7 bl 802aef0 802b742: b968 cbnz r0, 802b760 { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802b744: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b746: 491f ldr r1, [pc, #124] ; (802b7c4 ) 802b748: 2314 movs r3, #20 802b74a: 4353 muls r3, r2 802b74c: 58cb ldr r3, [r1, r3] 802b74e: b93b cbnz r3, 802b760 802b750: 4b1d ldr r3, [pc, #116] ; (802b7c8 ) 802b752: 2001 movs r0, #1 802b754: 6819 ldr r1, [r3, #0] 802b756: fa00 f202 lsl.w r2, r0, r2 802b75a: ea21 0202 bic.w r2, r1, r2 802b75e: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Is the task waiting on an event also? */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 802b760: 6aa3 ldr r3, [r4, #40] ; 0x28 802b762: b11b cbz r3, 802b76c { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802b764: f104 0018 add.w r0, r4, #24 802b768: f7ff fbc2 bl 802aef0 else { mtCOVERAGE_TEST_MARKER(); } vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xGenericListItem ) ); 802b76c: 4817 ldr r0, [pc, #92] ; (802b7cc ) 802b76e: 4629 mov r1, r5 802b770: f7ff fb9a bl 802aea8 /* Increment the ucTasksDeleted variable so the idle task knows there is a task that has been deleted and that it should therefore check the xTasksWaitingTermination list. */ ++uxTasksDeleted; 802b774: 4b16 ldr r3, [pc, #88] ; (802b7d0 ) 802b776: 681a ldr r2, [r3, #0] 802b778: 3201 adds r2, #1 802b77a: 601a str r2, [r3, #0] /* Increment the uxTaskNumberVariable also so kernel aware debuggers can detect that the task lists need re-generating. */ uxTaskNumber++; 802b77c: 4b15 ldr r3, [pc, #84] ; (802b7d4 ) 802b77e: 681a ldr r2, [r3, #0] 802b780: 3201 adds r2, #1 802b782: 601a str r2, [r3, #0] traceTASK_DELETE( pxTCB ); } taskEXIT_CRITICAL(); 802b784: f000 fc34 bl 802bff0 /* Force a reschedule if it is the currently running task that has just been deleted. */ if( xSchedulerRunning != pdFALSE ) 802b788: 4b13 ldr r3, [pc, #76] ; (802b7d8 ) 802b78a: 681b ldr r3, [r3, #0] 802b78c: 2b00 cmp r3, #0 802b78e: d015 beq.n 802b7bc { if( pxTCB == pxCurrentTCB ) 802b790: 4b0b ldr r3, [pc, #44] ; (802b7c0 ) 802b792: 681b ldr r3, [r3, #0] 802b794: 429c cmp r4, r3 802b796: d109 bne.n 802b7ac { configASSERT( uxSchedulerSuspended == 0 ); 802b798: 4b10 ldr r3, [pc, #64] ; (802b7dc ) 802b79a: 681b ldr r3, [r3, #0] 802b79c: b113 cbz r3, 802b7a4 802b79e: f000 fbf3 bl 802bf88 802b7a2: e7fe b.n 802b7a2 prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); } } } 802b7a4: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} in which Windows specific clean up operations are performed, after which it is not possible to yield away from this task - hence xYieldPending is used to latch that a context switch is required. */ portPRE_TASK_DELETE_HOOK( pxTCB, &xYieldPending ); portYIELD_WITHIN_API(); 802b7a8: f000 bbe2 b.w 802bf70 } else { /* Reset the next expected unblock time in case it referred to the task that has just been deleted. */ taskENTER_CRITICAL(); 802b7ac: f000 fbf4 bl 802bf98 { prvResetNextTaskUnblockTime(); 802b7b0: f7ff feaa bl 802b508 } taskEXIT_CRITICAL(); } } } 802b7b4: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} the task that has just been deleted. */ taskENTER_CRITICAL(); { prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); 802b7b8: f000 bc1a b.w 802bff0 802b7bc: bd38 pop {r3, r4, r5, pc} 802b7be: bf00 nop 802b7c0: 20000cf4 .word 0x20000cf4 802b7c4: 20000c7c .word 0x20000c7c 802b7c8: 20000d34 .word 0x20000d34 802b7cc: 20000ce0 .word 0x20000ce0 802b7d0: 20000c4c .word 0x20000c4c 802b7d4: 20000d18 .word 0x20000d18 802b7d8: 20000c48 .word 0x20000c48 802b7dc: 20000d0c .word 0x20000d0c 0802b7e0 : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 802b7e0: b530 push {r4, r5, lr} 802b7e2: b085 sub sp, #20 xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), &xIdleTaskHandle ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ } #else { /* Create the idle task without storing its handle. */ xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), NULL ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ 802b7e4: 2400 movs r4, #0 802b7e6: 2280 movs r2, #128 ; 0x80 802b7e8: 9400 str r4, [sp, #0] 802b7ea: 9401 str r4, [sp, #4] 802b7ec: 9402 str r4, [sp, #8] 802b7ee: 9403 str r4, [sp, #12] 802b7f0: 480e ldr r0, [pc, #56] ; (802b82c ) 802b7f2: 490f ldr r1, [pc, #60] ; (802b830 ) 802b7f4: 4623 mov r3, r4 802b7f6: f7ff fec1 bl 802b57c } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 802b7fa: 2801 cmp r0, #1 xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), &xIdleTaskHandle ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ } #else { /* Create the idle task without storing its handle. */ xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), NULL ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ 802b7fc: 4605 mov r5, r0 } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 802b7fe: d10f bne.n 802b820 { xReturn = xTimerCreateTimerTask(); 802b800: f7ff f9ea bl 802abd8 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802b804: 2801 cmp r0, #1 #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) { xReturn = xTimerCreateTimerTask(); 802b806: 4605 mov r5, r0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802b808: d10a bne.n 802b820 /* Interrupts are turned off here, to ensure a tick does not occur before or during the call to xPortStartScheduler(). The stacks of the created tasks contain a status word with interrupts switched on so interrupts will automatically get re-enabled when the first task starts to run. */ portDISABLE_INTERRUPTS(); 802b80a: f000 fbbd bl 802bf88 structure specific to the task that will run first. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ xSchedulerRunning = pdTRUE; 802b80e: 4b09 ldr r3, [pc, #36] ; (802b834 ) 802b810: 601d str r5, [r3, #0] xTickCount = ( TickType_t ) 0U; 802b812: 4b09 ldr r3, [pc, #36] ; (802b838 ) 802b814: 601c str r4, [r3, #0] /* This line will only be reached if the kernel could not be started, because there was not enough FreeRTOS heap to create the idle task or the timer task. */ configASSERT( xReturn ); } } 802b816: b005 add sp, #20 802b818: e8bd 4030 ldmia.w sp!, {r4, r5, lr} the run time counter time base. */ portCONFIGURE_TIMER_FOR_RUN_TIME_STATS(); /* Setting up the timer tick is hardware specific and thus in the portable interface. */ if( xPortStartScheduler() != pdFALSE ) 802b81c: f000 bc40 b.w 802c0a0 else { /* This line will only be reached if the kernel could not be started, because there was not enough FreeRTOS heap to create the idle task or the timer task. */ configASSERT( xReturn ); 802b820: b915 cbnz r5, 802b828 802b822: f000 fbb1 bl 802bf88 802b826: e7fe b.n 802b826 } } 802b828: b005 add sp, #20 802b82a: bd30 pop {r4, r5, pc} 802b82c: 0802ba4d .word 0x0802ba4d 802b830: 080395cd .word 0x080395cd 802b834: 20000c48 .word 0x20000c48 802b838: 20000d10 .word 0x20000d10 0802b83c : { /* A critical section is not required as the variable is of type BaseType_t. Please read Richard Barry's reply in the following link to a post in the FreeRTOS support forum before reporting this as a bug! - http://goo.gl/wu4acr */ ++uxSchedulerSuspended; 802b83c: 4b02 ldr r3, [pc, #8] ; (802b848 ) 802b83e: 681a ldr r2, [r3, #0] 802b840: 3201 adds r2, #1 802b842: 601a str r2, [r3, #0] 802b844: 4770 bx lr 802b846: bf00 nop 802b848: 20000d0c .word 0x20000d0c 0802b84c : TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 802b84c: 4b01 ldr r3, [pc, #4] ; (802b854 ) 802b84e: 6818 ldr r0, [r3, #0] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; } 802b850: 4770 bx lr 802b852: bf00 nop 802b854: 20000d10 .word 0x20000d10 0802b858 : /* Called by the portable layer each time a tick interrupt occurs. Increments the tick then checks to see if the new tick value will cause any tasks to be unblocked. */ traceTASK_INCREMENT_TICK( xTickCount ); if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b858: 4b3b ldr r3, [pc, #236] ; (802b948 ) 802b85a: 681b ldr r3, [r3, #0] #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 802b85c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} /* Called by the portable layer each time a tick interrupt occurs. Increments the tick then checks to see if the new tick value will cause any tasks to be unblocked. */ traceTASK_INCREMENT_TICK( xTickCount ); if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b860: 2b00 cmp r3, #0 802b862: d15b bne.n 802b91c { /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ ++xTickCount; 802b864: 4b39 ldr r3, [pc, #228] ; (802b94c ) 802b866: 681a ldr r2, [r3, #0] 802b868: 3201 adds r2, #1 802b86a: 601a str r2, [r3, #0] { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802b86c: 681e ldr r6, [r3, #0] if( xConstTickCount == ( TickType_t ) 0U ) 802b86e: b98e cbnz r6, 802b894 { taskSWITCH_DELAYED_LISTS(); 802b870: 4b37 ldr r3, [pc, #220] ; (802b950 ) 802b872: 681a ldr r2, [r3, #0] 802b874: 6812 ldr r2, [r2, #0] 802b876: b112 cbz r2, 802b87e 802b878: f000 fb86 bl 802bf88 802b87c: e7fe b.n 802b87c 802b87e: 4a35 ldr r2, [pc, #212] ; (802b954 ) 802b880: 6819 ldr r1, [r3, #0] 802b882: 6810 ldr r0, [r2, #0] 802b884: 6018 str r0, [r3, #0] 802b886: 4b34 ldr r3, [pc, #208] ; (802b958 ) 802b888: 6011 str r1, [r2, #0] 802b88a: 681a ldr r2, [r3, #0] 802b88c: 3201 adds r2, #1 802b88e: 601a str r2, [r3, #0] 802b890: f7ff fe3a bl 802b508 /* See if this tick has made a timeout expire. Tasks are stored in the queue in the order of their wake time - meaning once one task has been found whose block time has not expired there is no need to look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) 802b894: 4b31 ldr r3, [pc, #196] ; (802b95c ) 802b896: 681b ldr r3, [r3, #0] 802b898: 2400 movs r4, #0 802b89a: 429e cmp r6, r3 802b89c: d200 bcs.n 802b8a0 802b89e: e032 b.n 802b906 { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802b8a0: 4f2b ldr r7, [pc, #172] ; (802b950 ) mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 802b8a2: f8df 80cc ldr.w r8, [pc, #204] ; 802b970 802b8a6: f8df a0bc ldr.w sl, [pc, #188] ; 802b964 look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802b8aa: 683b ldr r3, [r7, #0] 802b8ac: 681b ldr r3, [r3, #0] 802b8ae: 2b00 cmp r3, #0 802b8b0: d13a bne.n 802b928 /* The delayed list is empty. Set xNextTaskUnblockTime to the maximum possible value so it is extremely unlikely that the if( xTickCount >= xNextTaskUnblockTime ) test will pass next time through. */ xNextTaskUnblockTime = portMAX_DELAY; 802b8b2: 4b2a ldr r3, [pc, #168] ; (802b95c ) 802b8b4: f04f 32ff mov.w r2, #4294967295 802b8b8: 601a str r2, [r3, #0] break; 802b8ba: e024 b.n 802b906 /* It is not time to unblock this item yet, but the item value is the time at which the task at the head of the blocked list must be removed from the Blocked state - so record the item value in xNextTaskUnblockTime. */ xNextTaskUnblockTime = xItemValue; 802b8bc: 4a27 ldr r2, [pc, #156] ; (802b95c ) 802b8be: 6013 str r3, [r2, #0] break; 802b8c0: e021 b.n 802b906 { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802b8c2: f105 0904 add.w r9, r5, #4 802b8c6: 4648 mov r0, r9 802b8c8: f7ff fb12 bl 802aef0 /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 802b8cc: 6aab ldr r3, [r5, #40] ; 0x28 802b8ce: b11b cbz r3, 802b8d8 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802b8d0: f105 0018 add.w r0, r5, #24 802b8d4: f7ff fb0c bl 802aef0 mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 802b8d8: 6aeb ldr r3, [r5, #44] ; 0x2c 802b8da: f8d8 1000 ldr.w r1, [r8] 802b8de: 2201 movs r2, #1 802b8e0: fa02 f203 lsl.w r2, r2, r3 802b8e4: 2014 movs r0, #20 802b8e6: 430a orrs r2, r1 802b8e8: fb00 a003 mla r0, r0, r3, sl 802b8ec: 4649 mov r1, r9 802b8ee: f8c8 2000 str.w r2, [r8] 802b8f2: f7ff fad9 bl 802aea8 { /* Preemption is on, but a context switch should only be performed if the unblocked task has a priority that is equal to or higher than the currently executing task. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 802b8f6: 4b1a ldr r3, [pc, #104] ; (802b960 ) 802b8f8: 6aea ldr r2, [r5, #44] ; 0x2c 802b8fa: 681b ldr r3, [r3, #0] 802b8fc: 6adb ldr r3, [r3, #44] ; 0x2c { xSwitchRequired = pdTRUE; 802b8fe: 429a cmp r2, r3 802b900: bf28 it cs 802b902: 2401 movcs r4, #1 802b904: e7d1 b.n 802b8aa /* Tasks of equal priority to the currently running task will share processing time (time slice) if preemption is on, and the application writer has not explicitly turned time slicing off. */ #if ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) ) { if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( UBaseType_t ) 1 ) 802b906: 4b16 ldr r3, [pc, #88] ; (802b960 ) 802b908: 681b ldr r3, [r3, #0] 802b90a: 6adb ldr r3, [r3, #44] ; 0x2c 802b90c: 2214 movs r2, #20 802b90e: 4353 muls r3, r2 802b910: 4a14 ldr r2, [pc, #80] ; (802b964 ) 802b912: 58d3 ldr r3, [r2, r3] { xSwitchRequired = pdTRUE; 802b914: 2b01 cmp r3, #1 802b916: bf88 it hi 802b918: 2401 movhi r4, #1 802b91a: e00c b.n 802b936 } #endif /* configUSE_TICK_HOOK */ } else { ++uxPendedTicks; 802b91c: 4b12 ldr r3, [pc, #72] ; (802b968 ) 802b91e: 681a ldr r2, [r3, #0] 802b920: 3201 adds r2, #1 802b922: 601a str r2, [r3, #0] BaseType_t xTaskIncrementTick( void ) { TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 802b924: 2400 movs r4, #0 802b926: e006 b.n 802b936 { /* The delayed list is not empty, get the value of the item at the head of the delayed list. This is the time at which the task at the head of the delayed list must be removed from the Blocked state. */ pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); 802b928: 683b ldr r3, [r7, #0] 802b92a: 68db ldr r3, [r3, #12] 802b92c: 68dd ldr r5, [r3, #12] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xGenericListItem ) ); 802b92e: 686b ldr r3, [r5, #4] if( xConstTickCount < xItemValue ) 802b930: 429e cmp r6, r3 802b932: d2c6 bcs.n 802b8c2 802b934: e7c2 b.n 802b8bc #endif } #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 802b936: 4b0d ldr r3, [pc, #52] ; (802b96c ) 802b938: 681b ldr r3, [r3, #0] { xSwitchRequired = pdTRUE; 802b93a: 2b00 cmp r3, #0 802b93c: bf18 it ne 802b93e: 2401 movne r4, #1 } } #endif /* configUSE_PREEMPTION */ return xSwitchRequired; } 802b940: 4620 mov r0, r4 802b942: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802b946: bf00 nop 802b948: 20000d0c .word 0x20000d0c 802b94c: 20000d10 .word 0x20000d10 802b950: 20000c44 .word 0x20000c44 802b954: 20000d14 .word 0x20000d14 802b958: 20000c40 .word 0x20000c40 802b95c: 20000718 .word 0x20000718 802b960: 20000cf4 .word 0x20000cf4 802b964: 20000c7c .word 0x20000c7c 802b968: 20000c78 .word 0x20000c78 802b96c: 20000d38 .word 0x20000d38 802b970: 20000d34 .word 0x20000d34 0802b974 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 802b974: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} TCB_t *pxTCB; BaseType_t xAlreadyYielded = pdFALSE; /* If uxSchedulerSuspended is zero then this function does not match a previous call to vTaskSuspendAll(). */ configASSERT( uxSchedulerSuspended ); 802b978: 4c2c ldr r4, [pc, #176] ; (802ba2c ) 802b97a: 6823 ldr r3, [r4, #0] 802b97c: b913 cbnz r3, 802b984 802b97e: f000 fb03 bl 802bf88 802b982: e7fe b.n 802b982 /* It is possible that an ISR caused a task to be removed from an event list while the scheduler was suspended. If this was the case then the removed task will have been added to the xPendingReadyList. Once the scheduler has been resumed it is safe to move all the pending ready tasks from this list into their appropriate ready list. */ taskENTER_CRITICAL(); 802b984: f000 fb08 bl 802bf98 { --uxSchedulerSuspended; 802b988: 6823 ldr r3, [r4, #0] 802b98a: 3b01 subs r3, #1 802b98c: 6023 str r3, [r4, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802b98e: 6823 ldr r3, [r4, #0] 802b990: b10b cbz r3, 802b996 /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { TCB_t *pxTCB; BaseType_t xAlreadyYielded = pdFALSE; 802b992: 2400 movs r4, #0 802b994: e044 b.n 802ba20 { --uxSchedulerSuspended; if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 802b996: 4b26 ldr r3, [pc, #152] ; (802ba30 ) 802b998: 681b ldr r3, [r3, #0] 802b99a: bb0b cbnz r3, 802b9e0 802b99c: e7f9 b.n 802b992 { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); 802b99e: 68f3 ldr r3, [r6, #12] 802b9a0: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802b9a2: f104 0804 add.w r8, r4, #4 /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 802b9a6: f104 0018 add.w r0, r4, #24 802b9aa: f7ff faa1 bl 802aef0 ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802b9ae: 4640 mov r0, r8 802b9b0: f7ff fa9e bl 802aef0 prvAddTaskToReadyList( pxTCB ); 802b9b4: 6ae3 ldr r3, [r4, #44] ; 0x2c 802b9b6: 682a ldr r2, [r5, #0] 802b9b8: 2701 movs r7, #1 802b9ba: fa07 f103 lsl.w r1, r7, r3 802b9be: 2014 movs r0, #20 802b9c0: 430a orrs r2, r1 802b9c2: fb00 9003 mla r0, r0, r3, r9 802b9c6: 4641 mov r1, r8 802b9c8: 602a str r2, [r5, #0] 802b9ca: f7ff fa6d bl 802aea8 /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 802b9ce: 4b19 ldr r3, [pc, #100] ; (802ba34 ) 802b9d0: 6ae2 ldr r2, [r4, #44] ; 0x2c 802b9d2: 681b ldr r3, [r3, #0] 802b9d4: 6adb ldr r3, [r3, #44] ; 0x2c 802b9d6: 429a cmp r2, r3 802b9d8: d306 bcc.n 802b9e8 { xYieldPending = pdTRUE; 802b9da: 4b17 ldr r3, [pc, #92] ; (802ba38 ) 802b9dc: 601f str r7, [r3, #0] 802b9de: e003 b.n 802b9e8 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802b9e0: 4e16 ldr r6, [pc, #88] ; (802ba3c ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); prvAddTaskToReadyList( pxTCB ); 802b9e2: 4d17 ldr r5, [pc, #92] ; (802ba40 ) 802b9e4: f8df 9060 ldr.w r9, [pc, #96] ; 802ba48 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802b9e8: 6833 ldr r3, [r6, #0] 802b9ea: 2b00 cmp r3, #0 802b9ec: d1d7 bne.n 802b99e /* If any ticks occurred while the scheduler was suspended then they should be processed now. This ensures the tick count does not slip, and that any delayed tasks are resumed at the correct time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) 802b9ee: 4c15 ldr r4, [pc, #84] ; (802ba44 ) 802b9f0: 6823 ldr r3, [r4, #0] 802b9f2: b96b cbnz r3, 802ba10 else { mtCOVERAGE_TEST_MARKER(); } if( xYieldPending == pdTRUE ) 802b9f4: 4b10 ldr r3, [pc, #64] ; (802ba38 ) 802b9f6: 681c ldr r4, [r3, #0] 802b9f8: 2c01 cmp r4, #1 802b9fa: d1ca bne.n 802b992 802b9fc: e00e b.n 802ba1c time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) 802b9fe: f7ff ff2b bl 802b858 802ba02: b108 cbz r0, 802ba08 { xYieldPending = pdTRUE; 802ba04: 2301 movs r3, #1 802ba06: 6033 str r3, [r6, #0] } else { mtCOVERAGE_TEST_MARKER(); } --uxPendedTicks; 802ba08: 682b ldr r3, [r5, #0] 802ba0a: 3b01 subs r3, #1 802ba0c: 602b str r3, [r5, #0] 802ba0e: e001 b.n 802ba14 { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) { xYieldPending = pdTRUE; 802ba10: 4e09 ldr r6, [pc, #36] ; (802ba38 ) 802ba12: 4625 mov r5, r4 they should be processed now. This ensures the tick count does not slip, and that any delayed tasks are resumed at the correct time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) { while( uxPendedTicks > ( UBaseType_t ) 0U ) 802ba14: 6823 ldr r3, [r4, #0] 802ba16: 2b00 cmp r3, #0 802ba18: d1f1 bne.n 802b9fe 802ba1a: e7eb b.n 802b9f4 #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; } #endif taskYIELD_IF_USING_PREEMPTION(); 802ba1c: f000 faa8 bl 802bf70 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802ba20: f000 fae6 bl 802bff0 return xAlreadyYielded; } 802ba24: 4620 mov r0, r4 802ba26: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802ba2a: bf00 nop 802ba2c: 20000d0c .word 0x20000d0c 802ba30: 20000d1c .word 0x20000d1c 802ba34: 20000cf4 .word 0x20000cf4 802ba38: 20000d38 .word 0x20000d38 802ba3c: 20000cf8 .word 0x20000cf8 802ba40: 20000d34 .word 0x20000d34 802ba44: 20000c78 .word 0x20000c78 802ba48: 20000c7c .word 0x20000c7c 0802ba4c : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 802ba4c: b5f8 push {r3, r4, r5, r6, r7, lr} { BaseType_t xListIsEmpty; /* ucTasksDeleted is used to prevent vTaskSuspendAll() being called too often in the idle task. */ while( uxTasksDeleted > ( UBaseType_t ) 0U ) 802ba4e: 4c14 ldr r4, [pc, #80] ; (802baa0 ) { vTaskSuspendAll(); { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802ba50: 4e14 ldr r6, [pc, #80] ; (802baa4 ) taskENTER_CRITICAL(); { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); --uxCurrentNumberOfTasks; 802ba52: 4f15 ldr r7, [pc, #84] ; (802baa8 ) { BaseType_t xListIsEmpty; /* ucTasksDeleted is used to prevent vTaskSuspendAll() being called too often in the idle task. */ while( uxTasksDeleted > ( UBaseType_t ) 0U ) 802ba54: 6823 ldr r3, [r4, #0] 802ba56: b1e3 cbz r3, 802ba92 { vTaskSuspendAll(); 802ba58: f7ff fef0 bl 802b83c { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802ba5c: 6835 ldr r5, [r6, #0] } ( void ) xTaskResumeAll(); 802ba5e: f7ff ff89 bl 802b974 if( xListIsEmpty == pdFALSE ) 802ba62: 2d00 cmp r5, #0 802ba64: d0f6 beq.n 802ba54 { TCB_t *pxTCB; taskENTER_CRITICAL(); 802ba66: f000 fa97 bl 802bf98 { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); 802ba6a: 68f3 ldr r3, [r6, #12] 802ba6c: 68dd ldr r5, [r3, #12] ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802ba6e: 1d28 adds r0, r5, #4 802ba70: f7ff fa3e bl 802aef0 --uxCurrentNumberOfTasks; 802ba74: 683b ldr r3, [r7, #0] 802ba76: 3b01 subs r3, #1 802ba78: 603b str r3, [r7, #0] --uxTasksDeleted; 802ba7a: 6823 ldr r3, [r4, #0] 802ba7c: 3b01 subs r3, #1 802ba7e: 6023 str r3, [r4, #0] } taskEXIT_CRITICAL(); 802ba80: f000 fab6 bl 802bff0 vPortFreeAligned( pxTCB->pxStack ); } } #else { vPortFreeAligned( pxTCB->pxStack ); 802ba84: 6b28 ldr r0, [r5, #48] ; 0x30 802ba86: f000 fc1b bl 802c2c0 } #endif vPortFree( pxTCB ); 802ba8a: 4628 mov r0, r5 802ba8c: f000 fc18 bl 802c2c0 802ba90: e7e0 b.n 802ba54 A critical region is not required here as we are just reading from the list, and an occasional incorrect value will not matter. If the ready list at the idle priority contains more than one task then a task other than the idle task is ready to execute. */ if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 ) 802ba92: 4b06 ldr r3, [pc, #24] ; (802baac ) 802ba94: 681b ldr r3, [r3, #0] 802ba96: 2b01 cmp r3, #1 802ba98: d9dc bls.n 802ba54 { taskYIELD(); 802ba9a: f000 fa69 bl 802bf70 802ba9e: e7d9 b.n 802ba54 802baa0: 20000c4c .word 0x20000c4c 802baa4: 20000ce0 .word 0x20000ce0 802baa8: 20000d1c .word 0x20000d1c 802baac: 20000c7c .word 0x20000c7c 0802bab0 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 802bab0: b538 push {r3, r4, r5, lr} TickType_t xTimeToWake; BaseType_t xAlreadyYielded = pdFALSE; /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) 802bab2: 4604 mov r4, r0 802bab4: b918 cbnz r0, 802babe } else { mtCOVERAGE_TEST_MARKER(); } } 802bab6: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) { portYIELD_WITHIN_API(); 802baba: f000 ba59 b.w 802bf70 /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) { configASSERT( uxSchedulerSuspended == 0 ); 802babe: 4b11 ldr r3, [pc, #68] ; (802bb04 ) 802bac0: 681b ldr r3, [r3, #0] 802bac2: b113 cbz r3, 802baca 802bac4: f000 fa60 bl 802bf88 802bac8: e7fe b.n 802bac8 vTaskSuspendAll(); 802baca: f7ff feb7 bl 802b83c This task cannot be in an event list as it is the currently executing task. */ /* Calculate the time to wake - this may overflow but this is not a problem. */ xTimeToWake = xTickCount + xTicksToDelay; 802bace: 4b0e ldr r3, [pc, #56] ; (802bb08 ) 802bad0: 681d ldr r5, [r3, #0] 802bad2: 1965 adds r5, r4, r5 /* We must remove ourselves from the ready list before adding ourselves to the blocked list as the same list item is used for both lists. */ if( uxListRemove( &( pxCurrentTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 802bad4: 4c0d ldr r4, [pc, #52] ; (802bb0c ) 802bad6: 6820 ldr r0, [r4, #0] 802bad8: 3004 adds r0, #4 802bada: f7ff fa09 bl 802aef0 802bade: b948 cbnz r0, 802baf4 { /* The current task must be in a ready list, so there is no need to check, and the port reset macro can be called directly. */ portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority ); 802bae0: 4b0b ldr r3, [pc, #44] ; (802bb10 ) 802bae2: 6819 ldr r1, [r3, #0] 802bae4: 6822 ldr r2, [r4, #0] 802bae6: 6ad2 ldr r2, [r2, #44] ; 0x2c 802bae8: 2001 movs r0, #1 802baea: fa00 f202 lsl.w r2, r0, r2 802baee: ea21 0202 bic.w r2, r1, r2 802baf2: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 802baf4: 4628 mov r0, r5 802baf6: f7ff fd19 bl 802b52c } xAlreadyYielded = xTaskResumeAll(); 802bafa: f7ff ff3b bl 802b974 mtCOVERAGE_TEST_MARKER(); } /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 802bafe: 2800 cmp r0, #0 802bb00: d0d9 beq.n 802bab6 } else { mtCOVERAGE_TEST_MARKER(); } } 802bb02: bd38 pop {r3, r4, r5, pc} 802bb04: 20000d0c .word 0x20000d0c 802bb08: 20000d10 .word 0x20000d10 802bb0c: 20000cf4 .word 0x20000cf4 802bb10: 20000d34 .word 0x20000d34 0802bb14 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { 802bb14: b570 push {r4, r5, r6, lr} 802bb16: 460c mov r4, r1 TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; configASSERT( pxPreviousWakeTime ); 802bb18: 4605 mov r5, r0 802bb1a: b910 cbnz r0, 802bb22 802bb1c: f000 fa34 bl 802bf88 802bb20: e7fe b.n 802bb20 configASSERT( ( xTimeIncrement > 0U ) ); 802bb22: b911 cbnz r1, 802bb2a 802bb24: f000 fa30 bl 802bf88 802bb28: e7fe b.n 802bb28 configASSERT( uxSchedulerSuspended == 0 ); 802bb2a: 4b1c ldr r3, [pc, #112] ; (802bb9c ) 802bb2c: 681e ldr r6, [r3, #0] 802bb2e: b116 cbz r6, 802bb36 802bb30: f000 fa2a bl 802bf88 802bb34: e7fe b.n 802bb34 vTaskSuspendAll(); 802bb36: f7ff fe81 bl 802b83c { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802bb3a: 4b19 ldr r3, [pc, #100] ; (802bba0 ) /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; 802bb3c: 682a ldr r2, [r5, #0] vTaskSuspendAll(); { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802bb3e: 6818 ldr r0, [r3, #0] /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; if( xConstTickCount < *pxPreviousWakeTime ) 802bb40: 4290 cmp r0, r2 /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; 802bb42: 4414 add r4, r2 if( xConstTickCount < *pxPreviousWakeTime ) 802bb44: d202 bcs.n 802bb4c /* The tick count has overflowed since this function was lasted called. In this case the only time we should ever actually delay is if the wake time has also overflowed, and the wake time is greater than the tick time. When this is the case it is as if neither time had overflowed. */ if( ( xTimeToWake < *pxPreviousWakeTime ) && ( xTimeToWake > xConstTickCount ) ) 802bb46: 4294 cmp r4, r2 802bb48: d207 bcs.n 802bb5a 802bb4a: e001 b.n 802bb50 else { /* The tick time has not overflowed. In this case we will delay if either the wake time has overflowed, and/or the tick time is less than the wake time. */ if( ( xTimeToWake < *pxPreviousWakeTime ) || ( xTimeToWake > xConstTickCount ) ) 802bb4c: 4294 cmp r4, r2 802bb4e: d306 bcc.n 802bb5e 802bb50: 4284 cmp r4, r0 802bb52: bf94 ite ls 802bb54: 2300 movls r3, #0 802bb56: 2301 movhi r3, #1 802bb58: e002 b.n 802bb60 #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; 802bb5a: 4633 mov r3, r6 802bb5c: e000 b.n 802bb60 /* The tick time has not overflowed. In this case we will delay if either the wake time has overflowed, and/or the tick time is less than the wake time. */ if( ( xTimeToWake < *pxPreviousWakeTime ) || ( xTimeToWake > xConstTickCount ) ) { xShouldDelay = pdTRUE; 802bb5e: 2301 movs r3, #1 mtCOVERAGE_TEST_MARKER(); } } /* Update the wake time ready for the next call. */ *pxPreviousWakeTime = xTimeToWake; 802bb60: 602c str r4, [r5, #0] if( xShouldDelay != pdFALSE ) 802bb62: b193 cbz r3, 802bb8a { traceTASK_DELAY_UNTIL(); /* Remove the task from the ready list before adding it to the blocked list as the same list item is used for both lists. */ if( uxListRemove( &( pxCurrentTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 802bb64: 4d0f ldr r5, [pc, #60] ; (802bba4 ) 802bb66: 6828 ldr r0, [r5, #0] 802bb68: 3004 adds r0, #4 802bb6a: f7ff f9c1 bl 802aef0 802bb6e: b948 cbnz r0, 802bb84 { /* The current task must be in a ready list, so there is no need to check, and the port reset macro can be called directly. */ portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority ); 802bb70: 4b0d ldr r3, [pc, #52] ; (802bba8 ) 802bb72: 6819 ldr r1, [r3, #0] 802bb74: 682a ldr r2, [r5, #0] 802bb76: 6ad2 ldr r2, [r2, #44] ; 0x2c 802bb78: 2001 movs r0, #1 802bb7a: fa00 f202 lsl.w r2, r0, r2 802bb7e: ea21 0202 bic.w r2, r1, r2 802bb82: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 802bb84: 4620 mov r0, r4 802bb86: f7ff fcd1 bl 802b52c else { mtCOVERAGE_TEST_MARKER(); } } xAlreadyYielded = xTaskResumeAll(); 802bb8a: f7ff fef3 bl 802b974 /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 802bb8e: b918 cbnz r0, 802bb98 } else { mtCOVERAGE_TEST_MARKER(); } } 802bb90: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) { portYIELD_WITHIN_API(); 802bb94: f000 b9ec b.w 802bf70 802bb98: bd70 pop {r4, r5, r6, pc} 802bb9a: bf00 nop 802bb9c: 20000d0c .word 0x20000d0c 802bba0: 20000d10 .word 0x20000d10 802bba4: 20000cf4 .word 0x20000cf4 802bba8: 20000d34 .word 0x20000d34 0802bbac : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 802bbac: b508 push {r3, lr} if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 802bbae: 4b12 ldr r3, [pc, #72] ; (802bbf8 ) 802bbb0: 681a ldr r2, [r3, #0] 802bbb2: 4b12 ldr r3, [pc, #72] ; (802bbfc ) 802bbb4: b10a cbz r2, 802bbba { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 802bbb6: 2201 movs r2, #1 802bbb8: e01c b.n 802bbf4 } else { xYieldPending = pdFALSE; 802bbba: 601a str r2, [r3, #0] taskFIRST_CHECK_FOR_STACK_OVERFLOW(); taskSECOND_CHECK_FOR_STACK_OVERFLOW(); /* Select a new task to run using either the generic C or port optimised asm code. */ taskSELECT_HIGHEST_PRIORITY_TASK(); 802bbbc: 4b10 ldr r3, [pc, #64] ; (802bc00 ) 802bbbe: 681a ldr r2, [r3, #0] /* Generic helper function. */ __attribute__( ( always_inline ) ) static inline uint8_t ucPortCountLeadingZeros( uint32_t ulBitmap ) { uint8_t ucReturn; __asm volatile ( "clz %0, %1" : "=r" ( ucReturn ) : "r" ( ulBitmap ) ); 802bbc0: fab2 f282 clz r2, r2 802bbc4: b2d2 uxtb r2, r2 802bbc6: 2314 movs r3, #20 802bbc8: f1c2 021f rsb r2, r2, #31 802bbcc: 490d ldr r1, [pc, #52] ; (802bc04 ) 802bbce: 435a muls r2, r3 802bbd0: 188b adds r3, r1, r2 802bbd2: 588a ldr r2, [r1, r2] 802bbd4: b912 cbnz r2, 802bbdc 802bbd6: f000 f9d7 bl 802bf88 802bbda: e7fe b.n 802bbda 802bbdc: 685a ldr r2, [r3, #4] 802bbde: 6852 ldr r2, [r2, #4] 802bbe0: f103 0108 add.w r1, r3, #8 802bbe4: 428a cmp r2, r1 802bbe6: 605a str r2, [r3, #4] 802bbe8: bf04 itt eq 802bbea: 6852 ldreq r2, [r2, #4] 802bbec: 605a streq r2, [r3, #4] 802bbee: 685b ldr r3, [r3, #4] 802bbf0: 68da ldr r2, [r3, #12] 802bbf2: 4b05 ldr r3, [pc, #20] ; (802bc08 ) 802bbf4: 601a str r2, [r3, #0] 802bbf6: bd08 pop {r3, pc} 802bbf8: 20000d0c .word 0x20000d0c 802bbfc: 20000d38 .word 0x20000d38 802bc00: 20000d34 .word 0x20000d34 802bc04: 20000c7c .word 0x20000c7c 802bc08: 20000cf4 .word 0x20000cf4 0802bc0c : } } /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802bc0c: b538 push {r3, r4, r5, lr} 802bc0e: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802bc10: b910 cbnz r0, 802bc18 802bc12: f000 f9b9 bl 802bf88 802bc16: e7fe b.n 802bc16 /* Place the event list item of the TCB in the appropriate event list. This is placed in the list in priority order so the highest priority task is the first to be woken by the event. The queue that contains the event list is locked, preventing simultaneous access from interrupts. */ vListInsert( pxEventList, &( pxCurrentTCB->xEventListItem ) ); 802bc18: 4c12 ldr r4, [pc, #72] ; (802bc64 ) 802bc1a: 6821 ldr r1, [r4, #0] 802bc1c: 3118 adds r1, #24 802bc1e: f7ff f94f bl 802aec0 /* The task must be removed from from the ready list before it is added to the blocked list as the same list item is used for both lists. Exclusive access to the ready lists guaranteed because the scheduler is locked. */ if( uxListRemove( &( pxCurrentTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 802bc22: 6820 ldr r0, [r4, #0] 802bc24: 3004 adds r0, #4 802bc26: f7ff f963 bl 802aef0 802bc2a: b948 cbnz r0, 802bc40 { /* The current task must be in a ready list, so there is no need to check, and the port reset macro can be called directly. */ portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority ); 802bc2c: 4b0e ldr r3, [pc, #56] ; (802bc68 ) 802bc2e: 6819 ldr r1, [r3, #0] 802bc30: 6822 ldr r2, [r4, #0] 802bc32: 6ad2 ldr r2, [r2, #44] ; 0x2c 802bc34: 2001 movs r0, #1 802bc36: fa00 f202 lsl.w r2, r0, r2 802bc3a: ea21 0202 bic.w r2, r1, r2 802bc3e: 601a str r2, [r3, #0] mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( xTicksToWait == portMAX_DELAY ) 802bc40: 1c69 adds r1, r5, #1 802bc42: d107 bne.n 802bc54 { /* Add the task to the suspended task list instead of a delayed task list to ensure the task is not woken by a timing event. It will block indefinitely. */ vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802bc44: 4b07 ldr r3, [pc, #28] ; (802bc64 ) 802bc46: 4809 ldr r0, [pc, #36] ; (802bc6c ) 802bc48: 6819 ldr r1, [r3, #0] 802bc4a: 3104 adds r1, #4 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802bc4c: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} if( xTicksToWait == portMAX_DELAY ) { /* Add the task to the suspended task list instead of a delayed task list to ensure the task is not woken by a timing event. It will block indefinitely. */ vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802bc50: f7ff b92a b.w 802aea8 else { /* Calculate the time at which the task should be woken if the event does not occur. This may overflow but this doesn't matter, the scheduler will handle it. */ xTimeToWake = xTickCount + xTicksToWait; 802bc54: 4b06 ldr r3, [pc, #24] ; (802bc70 ) 802bc56: 6818 ldr r0, [r3, #0] prvAddCurrentTaskToDelayedList( xTimeToWake ); 802bc58: 1828 adds r0, r5, r0 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802bc5a: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} { /* Calculate the time at which the task should be woken if the event does not occur. This may overflow but this doesn't matter, the scheduler will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); 802bc5e: f7ff bc65 b.w 802b52c 802bc62: bf00 nop 802bc64: 20000cf4 .word 0x20000cf4 802bc68: 20000d34 .word 0x20000d34 802bc6c: 20000d20 .word 0x20000d20 802bc70: 20000d10 .word 0x20000d10 0802bc74 : /*-----------------------------------------------------------*/ #if configUSE_TIMERS == 1 void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802bc74: b538 push {r3, r4, r5, lr} 802bc76: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802bc78: b910 cbnz r0, 802bc80 802bc7a: f000 f985 bl 802bf88 802bc7e: e7fe b.n 802bc7e /* Place the event list item of the TCB in the appropriate event list. In this case it is assume that this is the only task that is going to be waiting on this event list, so the faster vListInsertEnd() function can be used in place of vListInsert. */ vListInsertEnd( pxEventList, &( pxCurrentTCB->xEventListItem ) ); 802bc80: 4c0d ldr r4, [pc, #52] ; (802bcb8 ) 802bc82: 6821 ldr r1, [r4, #0] 802bc84: 3118 adds r1, #24 802bc86: f7ff f90f bl 802aea8 /* We must remove this task from the ready list before adding it to the blocked list as the same list item is used for both lists. This function is called form a critical section. */ if( uxListRemove( &( pxCurrentTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 802bc8a: 6820 ldr r0, [r4, #0] 802bc8c: 3004 adds r0, #4 802bc8e: f7ff f92f bl 802aef0 802bc92: b948 cbnz r0, 802bca8 { /* The current task must be in a ready list, so there is no need to check, and the port reset macro can be called directly. */ portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority ); 802bc94: 4b09 ldr r3, [pc, #36] ; (802bcbc ) 802bc96: 6819 ldr r1, [r3, #0] 802bc98: 6822 ldr r2, [r4, #0] 802bc9a: 6ad2 ldr r2, [r2, #44] ; 0x2c 802bc9c: 2001 movs r0, #1 802bc9e: fa00 f202 lsl.w r2, r0, r2 802bca2: ea21 0202 bic.w r2, r1, r2 802bca6: 601a str r2, [r3, #0] mtCOVERAGE_TEST_MARKER(); } /* Calculate the time at which the task should be woken if the event does not occur. This may overflow but this doesn't matter. */ xTimeToWake = xTickCount + xTicksToWait; 802bca8: 4b05 ldr r3, [pc, #20] ; (802bcc0 ) 802bcaa: 6818 ldr r0, [r3, #0] traceTASK_DELAY_UNTIL(); prvAddCurrentTaskToDelayedList( xTimeToWake ); 802bcac: 1828 adds r0, r5, r0 } 802bcae: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} /* Calculate the time at which the task should be woken if the event does not occur. This may overflow but this doesn't matter. */ xTimeToWake = xTickCount + xTicksToWait; traceTASK_DELAY_UNTIL(); prvAddCurrentTaskToDelayedList( xTimeToWake ); 802bcb2: f7ff bc3b b.w 802b52c 802bcb6: bf00 nop 802bcb8: 20000cf4 .word 0x20000cf4 802bcbc: 20000d34 .word 0x20000d34 802bcc0: 20000d10 .word 0x20000d10 0802bcc4 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 802bcc4: b538 push {r3, r4, r5, lr} get called - the lock count on the queue will get modified instead. This means exclusive access to the event list is guaranteed here. This function assumes that a check has already been made to ensure that pxEventList is not empty. */ pxUnblockedTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); 802bcc6: 68c3 ldr r3, [r0, #12] 802bcc8: 68dc ldr r4, [r3, #12] configASSERT( pxUnblockedTCB ); 802bcca: b914 cbnz r4, 802bcd2 802bccc: f000 f95c bl 802bf88 802bcd0: e7fe b.n 802bcd0 ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 802bcd2: f104 0518 add.w r5, r4, #24 802bcd6: 4628 mov r0, r5 802bcd8: f7ff f90a bl 802aef0 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802bcdc: 4b11 ldr r3, [pc, #68] ; (802bd24 ) 802bcde: 681b ldr r3, [r3, #0] 802bce0: b983 cbnz r3, 802bd04 { ( void ) uxListRemove( &( pxUnblockedTCB->xGenericListItem ) ); 802bce2: 1d25 adds r5, r4, #4 802bce4: 4628 mov r0, r5 802bce6: f7ff f903 bl 802aef0 prvAddTaskToReadyList( pxUnblockedTCB ); 802bcea: 4a0f ldr r2, [pc, #60] ; (802bd28 ) 802bcec: 6ae3 ldr r3, [r4, #44] ; 0x2c 802bcee: 6810 ldr r0, [r2, #0] 802bcf0: 2101 movs r1, #1 802bcf2: fa01 f103 lsl.w r1, r1, r3 802bcf6: 4301 orrs r1, r0 802bcf8: 6011 str r1, [r2, #0] 802bcfa: 4a0c ldr r2, [pc, #48] ; (802bd2c ) 802bcfc: 2014 movs r0, #20 802bcfe: fb00 2003 mla r0, r0, r3, r2 802bd02: e000 b.n 802bd06 } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 802bd04: 480a ldr r0, [pc, #40] ; (802bd30 ) 802bd06: 4629 mov r1, r5 802bd08: f7ff f8ce bl 802aea8 } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 802bd0c: 4b09 ldr r3, [pc, #36] ; (802bd34 ) 802bd0e: 6ae2 ldr r2, [r4, #44] ; 0x2c 802bd10: 681b ldr r3, [r3, #0] 802bd12: 6adb ldr r3, [r3, #44] ; 0x2c 802bd14: 429a cmp r2, r3 802bd16: d903 bls.n 802bd20 it should force a context switch now. */ xReturn = pdTRUE; /* Mark that a yield is pending in case the user is not using the "xHigherPriorityTaskWoken" parameter to an ISR safe FreeRTOS function. */ xYieldPending = pdTRUE; 802bd18: 4b07 ldr r3, [pc, #28] ; (802bd38 ) 802bd1a: 2001 movs r0, #1 802bd1c: 6018 str r0, [r3, #0] 802bd1e: bd38 pop {r3, r4, r5, pc} } else { xReturn = pdFALSE; 802bd20: 2000 movs r0, #0 prvResetNextTaskUnblockTime(); } #endif return xReturn; } 802bd22: bd38 pop {r3, r4, r5, pc} 802bd24: 20000d0c .word 0x20000d0c 802bd28: 20000d34 .word 0x20000d34 802bd2c: 20000c7c .word 0x20000c7c 802bd30: 20000cf8 .word 0x20000cf8 802bd34: 20000cf4 .word 0x20000cf4 802bd38: 20000d38 .word 0x20000d38 0802bd3c : return xReturn; } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 802bd3c: b508 push {r3, lr} configASSERT( pxTimeOut ); 802bd3e: b910 cbnz r0, 802bd46 802bd40: f000 f922 bl 802bf88 802bd44: e7fe b.n 802bd44 pxTimeOut->xOverflowCount = xNumOfOverflows; 802bd46: 4b03 ldr r3, [pc, #12] ; (802bd54 ) 802bd48: 681b ldr r3, [r3, #0] 802bd4a: 6003 str r3, [r0, #0] pxTimeOut->xTimeOnEntering = xTickCount; 802bd4c: 4b02 ldr r3, [pc, #8] ; (802bd58 ) 802bd4e: 681b ldr r3, [r3, #0] 802bd50: 6043 str r3, [r0, #4] 802bd52: bd08 pop {r3, pc} 802bd54: 20000c40 .word 0x20000c40 802bd58: 20000d10 .word 0x20000d10 0802bd5c : } /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 802bd5c: b538 push {r3, r4, r5, lr} 802bd5e: 460d mov r5, r1 BaseType_t xReturn; configASSERT( pxTimeOut ); 802bd60: 4604 mov r4, r0 802bd62: b910 cbnz r0, 802bd6a 802bd64: f000 f910 bl 802bf88 802bd68: e7fe b.n 802bd68 configASSERT( pxTicksToWait ); 802bd6a: b911 cbnz r1, 802bd72 802bd6c: f000 f90c bl 802bf88 802bd70: e7fe b.n 802bd70 taskENTER_CRITICAL(); 802bd72: f000 f911 bl 802bf98 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802bd76: 4b0e ldr r3, [pc, #56] ; (802bdb0 ) 802bd78: 681a ldr r2, [r3, #0] #if ( INCLUDE_vTaskSuspend == 1 ) /* If INCLUDE_vTaskSuspend is set to 1 and the block time specified is the maximum block time then the task should block indefinitely, and therefore never time out. */ if( *pxTicksToWait == portMAX_DELAY ) 802bd7a: 682b ldr r3, [r5, #0] 802bd7c: 1c59 adds r1, r3, #1 802bd7e: d010 beq.n 802bda2 xReturn = pdFALSE; } else /* We are not blocking indefinitely, perform the checks below. */ #endif if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */ 802bd80: 490c ldr r1, [pc, #48] ; (802bdb4 ) 802bd82: 6808 ldr r0, [r1, #0] 802bd84: 6821 ldr r1, [r4, #0] 802bd86: 4288 cmp r0, r1 802bd88: 6861 ldr r1, [r4, #4] 802bd8a: d001 beq.n 802bd90 802bd8c: 428a cmp r2, r1 802bd8e: d20a bcs.n 802bda6 was called, but has also overflowed since vTaskSetTimeOut() was called. It must have wrapped all the way around and gone past us again. This passed since vTaskSetTimeout() was called. */ xReturn = pdTRUE; } else if( ( xConstTickCount - pxTimeOut->xTimeOnEntering ) < *pxTicksToWait ) 802bd90: 1a50 subs r0, r2, r1 802bd92: 4298 cmp r0, r3 802bd94: d207 bcs.n 802bda6 { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= ( xConstTickCount - pxTimeOut->xTimeOnEntering ); 802bd96: 1a8a subs r2, r1, r2 802bd98: 18d3 adds r3, r2, r3 802bd9a: 602b str r3, [r5, #0] vTaskSetTimeOutState( pxTimeOut ); 802bd9c: 4620 mov r0, r4 802bd9e: f7ff ffcd bl 802bd3c /* If INCLUDE_vTaskSuspend is set to 1 and the block time specified is the maximum block time then the task should block indefinitely, and therefore never time out. */ if( *pxTicksToWait == portMAX_DELAY ) { xReturn = pdFALSE; 802bda2: 2400 movs r4, #0 802bda4: e000 b.n 802bda8 { /* The tick count is greater than the time at which vTaskSetTimeout() was called, but has also overflowed since vTaskSetTimeOut() was called. It must have wrapped all the way around and gone past us again. This passed since vTaskSetTimeout() was called. */ xReturn = pdTRUE; 802bda6: 2401 movs r4, #1 else { xReturn = pdTRUE; } } taskEXIT_CRITICAL(); 802bda8: f000 f922 bl 802bff0 return xReturn; } 802bdac: 4620 mov r0, r4 802bdae: bd38 pop {r3, r4, r5, pc} 802bdb0: 20000d10 .word 0x20000d10 802bdb4: 20000c40 .word 0x20000c40 0802bdb8 : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { xYieldPending = pdTRUE; 802bdb8: 4b01 ldr r3, [pc, #4] ; (802bdc0 ) 802bdba: 2201 movs r2, #1 802bdbc: 601a str r2, [r3, #0] 802bdbe: 4770 bx lr 802bdc0: 20000d38 .word 0x20000d38 0802bdc4 : BaseType_t xTaskGetSchedulerState( void ) { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) 802bdc4: 4b05 ldr r3, [pc, #20] ; (802bddc ) 802bdc6: 681b ldr r3, [r3, #0] 802bdc8: b133 cbz r3, 802bdd8 { xReturn = taskSCHEDULER_NOT_STARTED; } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802bdca: 4b05 ldr r3, [pc, #20] ; (802bde0 ) 802bdcc: 6818 ldr r0, [r3, #0] { xReturn = taskSCHEDULER_RUNNING; 802bdce: 2800 cmp r0, #0 802bdd0: bf0c ite eq 802bdd2: 2002 moveq r0, #2 802bdd4: 2000 movne r0, #0 802bdd6: 4770 bx lr { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) { xReturn = taskSCHEDULER_NOT_STARTED; 802bdd8: 2001 movs r0, #1 xReturn = taskSCHEDULER_SUSPENDED; } } return xReturn; } 802bdda: 4770 bx lr 802bddc: 20000c48 .word 0x20000c48 802bde0: 20000d0c .word 0x20000d0c 0802bde4 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 802bde4: b5f8 push {r3, r4, r5, r6, r7, lr} TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; /* If the mutex was given back by an interrupt while the queue was locked then the mutex holder might now be NULL. */ if( pxMutexHolder != NULL ) 802bde6: 4604 mov r4, r0 802bde8: 2800 cmp r0, #0 802bdea: d040 beq.n 802be6e { if( pxTCB->uxPriority < pxCurrentTCB->uxPriority ) 802bdec: 4a20 ldr r2, [pc, #128] ; (802be70 ) 802bdee: 6ac3 ldr r3, [r0, #44] ; 0x2c 802bdf0: 6811 ldr r1, [r2, #0] 802bdf2: 6ac9 ldr r1, [r1, #44] ; 0x2c 802bdf4: 428b cmp r3, r1 802bdf6: d23a bcs.n 802be6e { /* Adjust the mutex holder state to account for its new priority. Only reset the event list item value if the value is not being used for anything else. */ if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL ) 802bdf8: 6981 ldr r1, [r0, #24] 802bdfa: 2900 cmp r1, #0 802bdfc: db04 blt.n 802be08 { listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxCurrentTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 802bdfe: 6812 ldr r2, [r2, #0] 802be00: 6ad2 ldr r2, [r2, #44] ; 0x2c 802be02: f1c2 0205 rsb r2, r2, #5 802be06: 6182 str r2, [r0, #24] mtCOVERAGE_TEST_MARKER(); } /* If the task being modified is in the ready state it will need to be moved into a new list. */ if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxTCB->uxPriority ] ), &( pxTCB->xGenericListItem ) ) != pdFALSE ) 802be08: 4e1a ldr r6, [pc, #104] ; (802be74 ) 802be0a: 6962 ldr r2, [r4, #20] 802be0c: 2714 movs r7, #20 802be0e: fb07 6303 mla r3, r7, r3, r6 802be12: 429a cmp r2, r3 802be14: d127 bne.n 802be66 802be16: e01f b.n 802be58 { if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802be18: 6ae2 ldr r2, [r4, #44] ; 0x2c 802be1a: 4357 muls r7, r2 802be1c: 59f3 ldr r3, [r6, r7] 802be1e: b93b cbnz r3, 802be30 802be20: 4b15 ldr r3, [pc, #84] ; (802be78 ) 802be22: 2001 movs r0, #1 802be24: 6819 ldr r1, [r3, #0] 802be26: fa00 f202 lsl.w r2, r0, r2 802be2a: ea21 0202 bic.w r2, r1, r2 802be2e: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802be30: 4b0f ldr r3, [pc, #60] ; (802be70 ) prvAddTaskToReadyList( pxTCB ); 802be32: 4a11 ldr r2, [pc, #68] ; (802be78 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802be34: 681b ldr r3, [r3, #0] prvAddTaskToReadyList( pxTCB ); 802be36: 6810 ldr r0, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802be38: 6adb ldr r3, [r3, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802be3a: 2101 movs r1, #1 802be3c: fa01 f103 lsl.w r1, r1, r3 802be40: 4301 orrs r1, r0 802be42: 6011 str r1, [r2, #0] 802be44: 4a0b ldr r2, [pc, #44] ; (802be74 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802be46: 62e3 str r3, [r4, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802be48: 2014 movs r0, #20 802be4a: fb00 2003 mla r0, r0, r3, r2 802be4e: 4629 mov r1, r5 } else { mtCOVERAGE_TEST_MARKER(); } } 802be50: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; prvAddTaskToReadyList( pxTCB ); 802be54: f7ff b828 b.w 802aea8 /* If the task being modified is in the ready state it will need to be moved into a new list. */ if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxTCB->uxPriority ] ), &( pxTCB->xGenericListItem ) ) != pdFALSE ) { if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 802be58: 1d25 adds r5, r4, #4 802be5a: 4628 mov r0, r5 802be5c: f7ff f848 bl 802aef0 802be60: 2800 cmp r0, #0 802be62: d0d9 beq.n 802be18 802be64: e7e4 b.n 802be30 prvAddTaskToReadyList( pxTCB ); } else { /* Just inherit the priority. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802be66: 4b02 ldr r3, [pc, #8] ; (802be70 ) 802be68: 681b ldr r3, [r3, #0] 802be6a: 6adb ldr r3, [r3, #44] ; 0x2c 802be6c: 62e3 str r3, [r4, #44] ; 0x2c 802be6e: bdf8 pop {r3, r4, r5, r6, r7, pc} 802be70: 20000cf4 .word 0x20000cf4 802be74: 20000c7c .word 0x20000c7c 802be78: 20000d34 .word 0x20000d34 0802be7c : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 802be7c: b538 push {r3, r4, r5, lr} TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) 802be7e: 4604 mov r4, r0 802be80: b908 cbnz r0, 802be86 #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; 802be82: 2000 movs r0, #0 802be84: bd38 pop {r3, r4, r5, pc} if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); 802be86: 6d03 ldr r3, [r0, #80] ; 0x50 802be88: b913 cbnz r3, 802be90 802be8a: f000 f87d bl 802bf88 802be8e: e7fe b.n 802be8e ( pxTCB->uxMutexesHeld )--; if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802be90: 6ac1 ldr r1, [r0, #44] ; 0x2c 802be92: 6cc2 ldr r2, [r0, #76] ; 0x4c BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802be94: 3b01 subs r3, #1 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802be96: 4291 cmp r1, r2 BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802be98: 6503 str r3, [r0, #80] ; 0x50 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802be9a: d0f2 beq.n 802be82 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 802be9c: 2b00 cmp r3, #0 802be9e: d1f0 bne.n 802be82 /* A task can only have an inhertied priority if it holds the mutex. If the mutex is held by a task then it cannot be given from an interrupt, and if a mutex is given by the holding task then it must be the running state task. Remove the holding task from the ready list. */ if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 802bea0: 1d05 adds r5, r0, #4 802bea2: 4628 mov r0, r5 802bea4: f7ff f824 bl 802aef0 802bea8: b968 cbnz r0, 802bec6 { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802beaa: 6ae2 ldr r2, [r4, #44] ; 0x2c 802beac: 4910 ldr r1, [pc, #64] ; (802bef0 ) 802beae: 2314 movs r3, #20 802beb0: 4353 muls r3, r2 802beb2: 58cb ldr r3, [r1, r3] 802beb4: b93b cbnz r3, 802bec6 802beb6: 4b0f ldr r3, [pc, #60] ; (802bef4 ) 802beb8: 2001 movs r0, #1 802beba: 6819 ldr r1, [r3, #0] 802bebc: fa00 f202 lsl.w r2, r0, r2 802bec0: ea21 0202 bic.w r2, r1, r2 802bec4: 601a str r2, [r3, #0] } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 802bec6: 6ce3 ldr r3, [r4, #76] ; 0x4c /* Reset the event list item value. It cannot be in use for any other purpose if this task is running, and it must be running to give back the mutex. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 802bec8: f1c3 0205 rsb r2, r3, #5 802becc: 61a2 str r2, [r4, #24] prvAddTaskToReadyList( pxTCB ); 802bece: 4a09 ldr r2, [pc, #36] ; (802bef4 ) } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 802bed0: 62e3 str r3, [r4, #44] ; 0x2c /* Reset the event list item value. It cannot be in use for any other purpose if this task is running, and it must be running to give back the mutex. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ prvAddTaskToReadyList( pxTCB ); 802bed2: 6811 ldr r1, [r2, #0] 802bed4: 2401 movs r4, #1 802bed6: fa04 f003 lsl.w r0, r4, r3 802beda: 4301 orrs r1, r0 802bedc: 6011 str r1, [r2, #0] 802bede: 4a04 ldr r2, [pc, #16] ; (802bef0 ) 802bee0: 2014 movs r0, #20 802bee2: fb00 2003 mla r0, r0, r3, r2 802bee6: 4629 mov r1, r5 802bee8: f7fe ffde bl 802aea8 in an order different to that in which they were taken. If a context switch did not occur when the first mutex was returned, even if a task was waiting on it, then a context switch should occur when the last mutex is returned whether a task is waiting on it or not. */ xReturn = pdTRUE; 802beec: 4620 mov r0, r4 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802beee: bd38 pop {r3, r4, r5, pc} 802bef0: 20000c7c .word 0x20000c7c 802bef4: 20000d34 .word 0x20000d34 0802bef8 : void *pvTaskIncrementMutexHeldCount( void ) { /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 802bef8: 4b04 ldr r3, [pc, #16] ; (802bf0c ) 802befa: 681a ldr r2, [r3, #0] 802befc: b11a cbz r2, 802bf06 { ( pxCurrentTCB->uxMutexesHeld )++; 802befe: 681a ldr r2, [r3, #0] 802bf00: 6d11 ldr r1, [r2, #80] ; 0x50 802bf02: 3101 adds r1, #1 802bf04: 6511 str r1, [r2, #80] ; 0x50 } return pxCurrentTCB; 802bf06: 6818 ldr r0, [r3, #0] } 802bf08: 4770 bx lr 802bf0a: bf00 nop 802bf0c: 20000cf4 .word 0x20000cf4 0802bf10 : } /*-----------------------------------------------------------*/ static void prvPortStartFirstTask( void ) { __asm volatile( 802bf10: 4806 ldr r0, [pc, #24] ; (802bf2c ) 802bf12: 6800 ldr r0, [r0, #0] 802bf14: 6800 ldr r0, [r0, #0] 802bf16: f380 8808 msr MSP, r0 802bf1a: b662 cpsie i 802bf1c: b661 cpsie f 802bf1e: f3bf 8f4f dsb sy 802bf22: f3bf 8f6f isb sy 802bf26: df00 svc 0 802bf28: bf00 nop 802bf2a: 0000 .short 0x0000 802bf2c: e000ed08 .word 0xe000ed08 0802bf30 : StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) { /* Simulate the stack frame as it would be created by a context switch interrupt. */ pxTopOfStack--; /* Offset added to account for the way the MCU uses the stack on entry/exit of interrupts. */ *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ 802bf30: f04f 7380 mov.w r3, #16777216 ; 0x1000000 pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* PC */ 802bf34: e900 000a stmdb r0, {r1, r3} pxTopOfStack--; *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 802bf38: 4b03 ldr r3, [pc, #12] ; (802bf48 ) pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 802bf3a: f840 2c20 str.w r2, [r0, #-32] pxTopOfStack--; /* Offset added to account for the way the MCU uses the stack on entry/exit of interrupts. */ *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* PC */ pxTopOfStack--; *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 802bf3e: f840 3c0c str.w r3, [r0, #-12] pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */ return pxTopOfStack; } 802bf42: 3840 subs r0, #64 ; 0x40 802bf44: 4770 bx lr 802bf46: bf00 nop 802bf48: 0802bfcd .word 0x0802bfcd 0802bf4c : } /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 802bf4c: 4b07 ldr r3, [pc, #28] ; (802bf6c ) 802bf4e: 6819 ldr r1, [r3, #0] 802bf50: 6808 ldr r0, [r1, #0] 802bf52: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802bf56: f380 8809 msr PSP, r0 802bf5a: f3bf 8f6f isb sy 802bf5e: f04f 0000 mov.w r0, #0 802bf62: f380 8811 msr BASEPRI, r0 802bf66: f04e 0e0d orr.w lr, lr, #13 802bf6a: 4770 bx lr 0802bf6c : 802bf6c: 20000cf4 .word 0x20000cf4 0802bf70 : /*-----------------------------------------------------------*/ void vPortYield( void ) { /* Set a PendSV to request a context switch. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802bf70: 4b04 ldr r3, [pc, #16] ; (802bf84 ) 802bf72: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802bf76: 601a str r2, [r3, #0] /* Barriers are normally not required but do ensure the code is completely within the specified behaviour for the architecture. */ __asm volatile( "dsb" ); 802bf78: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802bf7c: f3bf 8f6f isb sy 802bf80: 4770 bx lr 802bf82: bf00 nop 802bf84: e000ed04 .word 0xe000ed04 0802bf88 : } /*-----------------------------------------------------------*/ __attribute__(( naked )) uint32_t ulPortSetInterruptMask( void ) { __asm volatile \ 802bf88: f3ef 8011 mrs r0, BASEPRI 802bf8c: f04f 0150 mov.w r1, #80 ; 0x50 802bf90: f381 8811 msr BASEPRI, r1 802bf94: 4770 bx lr ); /* This return will not be reached but is necessary to prevent compiler warnings. */ return 0; } 802bf96: 2000 movs r0, #0 0802bf98 : __asm volatile( "isb" ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 802bf98: b508 push {r3, lr} portDISABLE_INTERRUPTS(); 802bf9a: f7ff fff5 bl 802bf88 uxCriticalNesting++; 802bf9e: 4a09 ldr r2, [pc, #36] ; (802bfc4 ) 802bfa0: 6813 ldr r3, [r2, #0] 802bfa2: 3301 adds r3, #1 802bfa4: 6013 str r3, [r2, #0] __asm volatile( "dsb" ); 802bfa6: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802bfaa: f3bf 8f6f isb sy /* This is not the interrupt safe version of the enter critical function so assert() if it is being called from an interrupt context. Only API functions that end in "FromISR" can be used in an interrupt. Only assert if the critical nesting count is 1 to protect against recursive calls if the assert function also uses a critical section. */ if( uxCriticalNesting == 1 ) 802bfae: 2b01 cmp r3, #1 802bfb0: d107 bne.n 802bfc2 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 802bfb2: 4b05 ldr r3, [pc, #20] ; (802bfc8 ) 802bfb4: 681b ldr r3, [r3, #0] 802bfb6: f013 0fff tst.w r3, #255 ; 0xff 802bfba: d002 beq.n 802bfc2 802bfbc: f7ff ffe4 bl 802bf88 802bfc0: e7fe b.n 802bfc0 802bfc2: bd08 pop {r3, pc} 802bfc4: 2000071c .word 0x2000071c 802bfc8: e000ed04 .word 0xe000ed04 0802bfcc : return pxTopOfStack; } /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 802bfcc: b508 push {r3, lr} its caller as there is nothing to return to. If a task wants to exit it should instead call vTaskDelete( NULL ). Artificially force an assert() to be triggered if configASSERT() is defined, then stop here so application writers can catch the error. */ configASSERT( uxCriticalNesting == ~0UL ); 802bfce: 4b05 ldr r3, [pc, #20] ; (802bfe4 ) 802bfd0: 681b ldr r3, [r3, #0] 802bfd2: 3301 adds r3, #1 802bfd4: d002 beq.n 802bfdc 802bfd6: f7ff ffd7 bl 802bf88 802bfda: e7fe b.n 802bfda portDISABLE_INTERRUPTS(); 802bfdc: f7ff ffd4 bl 802bf88 802bfe0: e7fe b.n 802bfe0 802bfe2: bf00 nop 802bfe4: 2000071c .word 0x2000071c 0802bfe8 : } /*-----------------------------------------------------------*/ __attribute__(( naked )) void vPortClearInterruptMask( uint32_t ulNewMaskValue ) { __asm volatile \ 802bfe8: f380 8811 msr BASEPRI, r0 802bfec: 4770 bx lr 802bfee: 0000 movs r0, r0 0802bff0 : } } /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 802bff0: b508 push {r3, lr} configASSERT( uxCriticalNesting ); 802bff2: 4b07 ldr r3, [pc, #28] ; (802c010 ) 802bff4: 6818 ldr r0, [r3, #0] 802bff6: b910 cbnz r0, 802bffe 802bff8: f7ff ffc6 bl 802bf88 802bffc: e7fe b.n 802bffc uxCriticalNesting--; 802bffe: 3801 subs r0, #1 802c000: 6018 str r0, [r3, #0] if( uxCriticalNesting == 0 ) 802c002: b918 cbnz r0, 802c00c { portENABLE_INTERRUPTS(); } } 802c004: e8bd 4008 ldmia.w sp!, {r3, lr} { configASSERT( uxCriticalNesting ); uxCriticalNesting--; if( uxCriticalNesting == 0 ) { portENABLE_INTERRUPTS(); 802c008: f7ff bfee b.w 802bfe8 802c00c: bd08 pop {r3, pc} 802c00e: bf00 nop 802c010: 2000071c .word 0x2000071c 0802c014 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 802c014: f3ef 8009 mrs r0, PSP 802c018: f3bf 8f6f isb sy 802c01c: 4b0d ldr r3, [pc, #52] ; (802c054 ) 802c01e: 681a ldr r2, [r3, #0] 802c020: e920 0ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802c024: 6010 str r0, [r2, #0] 802c026: e92d 4008 stmdb sp!, {r3, lr} 802c02a: f04f 0050 mov.w r0, #80 ; 0x50 802c02e: f380 8811 msr BASEPRI, r0 802c032: f7ff fdbb bl 802bbac 802c036: f04f 0000 mov.w r0, #0 802c03a: f380 8811 msr BASEPRI, r0 802c03e: e8bd 4008 ldmia.w sp!, {r3, lr} 802c042: 6819 ldr r1, [r3, #0] 802c044: 6808 ldr r0, [r1, #0] 802c046: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802c04a: f380 8809 msr PSP, r0 802c04e: f3bf 8f6f isb sy 802c052: 4770 bx lr 0802c054 : 802c054: 20000cf4 .word 0x20000cf4 0802c058 : ); } /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 802c058: b508 push {r3, lr} /* The SysTick runs at the lowest interrupt priority, so when this interrupt executes all interrupts must be unmasked. There is therefore no need to save and then restore the interrupt mask value as its value is already known. */ ( void ) portSET_INTERRUPT_MASK_FROM_ISR(); 802c05a: f7ff ff95 bl 802bf88 { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) 802c05e: f7ff fbfb bl 802b858 802c062: b118 cbz r0, 802c06c { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802c064: 4b04 ldr r3, [pc, #16] ; (802c078 ) 802c066: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802c06a: 601a str r2, [r3, #0] } } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); 802c06c: 2000 movs r0, #0 } 802c06e: e8bd 4008 ldmia.w sp!, {r3, lr} /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); 802c072: f7ff bfb9 b.w 802bfe8 802c076: bf00 nop 802c078: e000ed04 .word 0xe000ed04 0802c07c : ulStoppedTimerCompensation = portMISSED_COUNTS_FACTOR / ( configCPU_CLOCK_HZ / configSYSTICK_CLOCK_HZ ); } #endif /* configUSE_TICKLESS_IDLE */ /* Configure SysTick to interrupt at the requested rate. */ portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL; 802c07c: 4b06 ldr r3, [pc, #24] ; (802c098 ) 802c07e: 681a ldr r2, [r3, #0] 802c080: f44f 737a mov.w r3, #1000 ; 0x3e8 802c084: fbb2 f2f3 udiv r2, r2, r3 802c088: 4b04 ldr r3, [pc, #16] ; (802c09c ) 802c08a: 3a01 subs r2, #1 802c08c: 601a str r2, [r3, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 802c08e: 2207 movs r2, #7 802c090: f843 2c04 str.w r2, [r3, #-4] 802c094: 4770 bx lr 802c096: bf00 nop 802c098: 200005bc .word 0x200005bc 802c09c: e000e014 .word 0xe000e014 0802c0a0 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 802c0a0: b507 push {r0, r1, r2, lr} functions can be called. ISR safe functions are those that end in "FromISR". FreeRTOS maintains separate thread and ISR API functions to ensure interrupt entry is as fast and simple as possible. Save the interrupt priority value that is about to be clobbered. */ ulOriginalPriority = *pucFirstUserPriorityRegister; 802c0a2: 4b1d ldr r3, [pc, #116] ; (802c118 ) 802c0a4: 781a ldrb r2, [r3, #0] 802c0a6: 9201 str r2, [sp, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 802c0a8: 22ff movs r2, #255 ; 0xff 802c0aa: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 802c0ac: 781b ldrb r3, [r3, #0] 802c0ae: f88d 3003 strb.w r3, [sp, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 802c0b2: f89d 2003 ldrb.w r2, [sp, #3] 802c0b6: 4b19 ldr r3, [pc, #100] ; (802c11c ) 802c0b8: f002 0250 and.w r2, r2, #80 ; 0x50 802c0bc: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 802c0be: 4a18 ldr r2, [pc, #96] ; (802c120 ) 802c0c0: 2307 movs r3, #7 802c0c2: 6013 str r3, [r2, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 802c0c4: e005 b.n 802c0d2 { ulMaxPRIGROUPValue--; ucMaxPriorityValue <<= ( uint8_t ) 0x01; 802c0c6: f89d 3003 ldrb.w r3, [sp, #3] 802c0ca: 005b lsls r3, r3, #1 802c0cc: f88d 3003 strb.w r3, [sp, #3] 802c0d0: 460b mov r3, r1 ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 802c0d2: f89d 2003 ldrb.w r2, [sp, #3] 802c0d6: 1e59 subs r1, r3, #1 802c0d8: 0612 lsls r2, r2, #24 802c0da: d4f4 bmi.n 802c0c6 } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802c0dc: 4a10 ldr r2, [pc, #64] ; (802c120 ) ucMaxPriorityValue <<= ( uint8_t ) 0x01; } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 802c0de: 021b lsls r3, r3, #8 ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802c0e0: f403 63e0 and.w r3, r3, #1792 ; 0x700 802c0e4: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 802c0e6: 4b0c ldr r3, [pc, #48] ; (802c118 ) 802c0e8: 9a01 ldr r2, [sp, #4] 802c0ea: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 802c0ec: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802c0f0: f442 0270 orr.w r2, r2, #15728640 ; 0xf00000 802c0f4: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 802c0f8: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802c0fc: f042 4270 orr.w r2, r2, #4026531840 ; 0xf0000000 802c100: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 802c104: f7ff ffba bl 802c07c /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 802c108: 4b06 ldr r3, [pc, #24] ; (802c124 ) 802c10a: 2200 movs r2, #0 802c10c: 601a str r2, [r3, #0] /* Start the first task. */ prvPortStartFirstTask(); 802c10e: f7ff feff bl 802bf10 /* Should never get here as the tasks will now be executing! Call the task exit error function to prevent compiler warnings about a static function not being called in the case that the application writer overrides this functionality by defining configTASK_RETURN_ADDRESS. */ prvTaskExitError(); 802c112: f7ff ff5b bl 802bfcc 802c116: bf00 nop 802c118: e000e400 .word 0xe000e400 802c11c: 20000d3c .word 0x20000d3c 802c120: 20000d40 .word 0x20000d40 802c124: 2000071c .word 0x2000071c 0802c128 : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 802c128: b508 push {r3, lr} uint32_t ulCurrentInterrupt; uint8_t ucCurrentPriority; /* Obtain the number of the currently executing interrupt. */ __asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) ); 802c12a: f3ef 8305 mrs r3, IPSR /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 802c12e: 2b0f cmp r3, #15 802c130: d908 bls.n 802c144 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 802c132: 4a0a ldr r2, [pc, #40] ; (802c15c ) 802c134: 5c9b ldrb r3, [r3, r2] interrupt entry is as fast and simple as possible. The following links provide detailed information: http://www.freertos.org/RTOS-Cortex-M3-M4.html http://www.freertos.org/FAQHelp.html */ configASSERT( ucCurrentPriority >= ucMaxSysCallPriority ); 802c136: 4a0a ldr r2, [pc, #40] ; (802c160 ) 802c138: 7812 ldrb r2, [r2, #0] 802c13a: 429a cmp r2, r3 802c13c: d902 bls.n 802c144 802c13e: f7ff ff23 bl 802bf88 802c142: e7fe b.n 802c142 configuration then the correct setting can be achieved on all Cortex-M devices by calling NVIC_SetPriorityGrouping( 0 ); before starting the scheduler. Note however that some vendor specific peripheral libraries assume a non-zero priority group setting, in which cases using a value of zero will result in unpredicable behaviour. */ configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue ); 802c144: 4b07 ldr r3, [pc, #28] ; (802c164 ) 802c146: 681a ldr r2, [r3, #0] 802c148: 4b07 ldr r3, [pc, #28] ; (802c168 ) 802c14a: 681b ldr r3, [r3, #0] 802c14c: f402 62e0 and.w r2, r2, #1792 ; 0x700 802c150: 429a cmp r2, r3 802c152: d902 bls.n 802c15a 802c154: f7ff ff18 bl 802bf88 802c158: e7fe b.n 802c158 802c15a: bd08 pop {r3, pc} 802c15c: e000e3f0 .word 0xe000e3f0 802c160: 20000d3c .word 0x20000d3c 802c164: e000ed0c .word 0xe000ed0c 802c168: 20000d40 .word 0x20000d40 0802c16c : xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); } /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 802c16c: b510 push {r4, lr} BlockLink_t *pxIterator; uint8_t *puc; /* Iterate through the list until a block is found that has a higher address than the block being inserted. */ for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock ) 802c16e: 4b0f ldr r3, [pc, #60] ; (802c1ac ) 802c170: e000 b.n 802c174 802c172: 4613 mov r3, r2 802c174: 681a ldr r2, [r3, #0] 802c176: 4282 cmp r2, r0 802c178: d3fb bcc.n 802c172 } /* Do the block being inserted, and the block it is being inserted after make a contiguous block of memory? */ puc = ( uint8_t * ) pxIterator; if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) 802c17a: 6859 ldr r1, [r3, #4] 802c17c: 185c adds r4, r3, r1 802c17e: 4284 cmp r4, r0 802c180: d103 bne.n 802c18a { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 802c182: 6840 ldr r0, [r0, #4] 802c184: 1841 adds r1, r0, r1 802c186: 6059 str r1, [r3, #4] 802c188: 4618 mov r0, r3 } /* Do the block being inserted, and the block it is being inserted before make a contiguous block of memory? */ puc = ( uint8_t * ) pxBlockToInsert; if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) 802c18a: 6841 ldr r1, [r0, #4] 802c18c: 1844 adds r4, r0, r1 802c18e: 4294 cmp r4, r2 802c190: d106 bne.n 802c1a0 { if( pxIterator->pxNextFreeBlock != pxEnd ) 802c192: 4c07 ldr r4, [pc, #28] ; (802c1b0 ) 802c194: 6824 ldr r4, [r4, #0] 802c196: 42a2 cmp r2, r4 802c198: d002 beq.n 802c1a0 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 802c19a: ca14 ldmia r2, {r2, r4} if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) { if( pxIterator->pxNextFreeBlock != pxEnd ) { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; 802c19c: 1861 adds r1, r4, r1 802c19e: 6041 str r1, [r0, #4] /* If the block being inserted plugged a gab, so was merged with the block before and the block after, then it's pxNextFreeBlock pointer will have already been set, and should not be set here as that would make it point to itself. */ if( pxIterator != pxBlockToInsert ) 802c1a0: 4283 cmp r3, r0 pxBlockToInsert->pxNextFreeBlock = pxEnd; } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 802c1a2: 6002 str r2, [r0, #0] before and the block after, then it's pxNextFreeBlock pointer will have already been set, and should not be set here as that would make it point to itself. */ if( pxIterator != pxBlockToInsert ) { pxIterator->pxNextFreeBlock = pxBlockToInsert; 802c1a4: bf18 it ne 802c1a6: 6018 strne r0, [r3, #0] 802c1a8: bd10 pop {r4, pc} 802c1aa: bf00 nop 802c1ac: 20000d4c .word 0x20000d4c 802c1b0: 20000d48 .word 0x20000d48 0802c1b4 : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 802c1b4: b5f8 push {r3, r4, r5, r6, r7, lr} 802c1b6: 4605 mov r5, r0 BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; vTaskSuspendAll(); 802c1b8: f7ff fb40 bl 802b83c { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 802c1bc: 4b3a ldr r3, [pc, #232] ; (802c2a8 ) 802c1be: 681b ldr r3, [r3, #0] 802c1c0: bb1b cbnz r3, 802c20a uint8_t *pucAlignedHeap; uint32_t ulAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; /* Ensure the heap starts on a correctly aligned boundary. */ ulAddress = ( uint32_t ) ucHeap; 802c1c2: 4a3a ldr r2, [pc, #232] ; (802c2ac ) if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 802c1c4: 0756 lsls r6, r2, #29 802c1c6: d007 beq.n 802c1d8 { ulAddress += ( portBYTE_ALIGNMENT - 1 ); 802c1c8: 1dd3 adds r3, r2, #7 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802c1ca: f023 0307 bic.w r3, r3, #7 xTotalHeapSize -= ulAddress - ( uint32_t ) ucHeap; 802c1ce: f502 4270 add.w r2, r2, #61440 ; 0xf000 802c1d2: 1ad1 subs r1, r2, r3 ulAddress = ( uint32_t ) ucHeap; if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) { ulAddress += ( portBYTE_ALIGNMENT - 1 ); ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802c1d4: 461a mov r2, r3 802c1d6: e001 b.n 802c1dc static void prvHeapInit( void ) { BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; uint32_t ulAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 802c1d8: f44f 4170 mov.w r1, #61440 ; 0xf000 xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap; xStart.xBlockSize = ( size_t ) 0; /* pxEnd is used to mark the end of the list of free blocks and is inserted at the end of the heap space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; 802c1dc: 1851 adds r1, r2, r1 ulAddress -= xHeapStructSize; 802c1de: 3908 subs r1, #8 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802c1e0: f021 0107 bic.w r1, r1, #7 pucAlignedHeap = ( uint8_t * ) ulAddress; /* xStart is used to hold a pointer to the first item in the list of free blocks. The void cast is used to prevent compiler warnings. */ xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap; 802c1e4: 4832 ldr r0, [pc, #200] ; (802c2b0 ) xStart.xBlockSize = ( size_t ) 0; 802c1e6: 2300 movs r3, #0 802c1e8: e880 000c stmia.w r0, {r2, r3} ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; ulAddress -= xHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( void * ) ulAddress; pxEnd->xBlockSize = 0; pxEnd->pxNextFreeBlock = NULL; 802c1ec: 600b str r3, [r1, #0] at the end of the heap space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; ulAddress -= xHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( void * ) ulAddress; pxEnd->xBlockSize = 0; 802c1ee: 604b str r3, [r1, #4] pxEnd->pxNextFreeBlock = NULL; /* To start with there is a single free block that is sized to take up the entire heap space, minus the space taken by pxEnd. */ pxFirstFreeBlock = ( void * ) pucAlignedHeap; pxFirstFreeBlock->xBlockSize = ulAddress - ( uint32_t ) pxFirstFreeBlock; 802c1f0: 1a8b subs r3, r1, r2 pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 802c1f2: e882 000a stmia.w r2, {r1, r3} /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802c1f6: 4a2f ldr r2, [pc, #188] ; (802c2b4 ) /* pxEnd is used to mark the end of the list of free blocks and is inserted at the end of the heap space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; ulAddress -= xHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( void * ) ulAddress; 802c1f8: 482b ldr r0, [pc, #172] ; (802c2a8 ) pxFirstFreeBlock = ( void * ) pucAlignedHeap; pxFirstFreeBlock->xBlockSize = ulAddress - ( uint32_t ) pxFirstFreeBlock; pxFirstFreeBlock->pxNextFreeBlock = pxEnd; /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802c1fa: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802c1fc: 4a2e ldr r2, [pc, #184] ; (802c2b8 ) /* pxEnd is used to mark the end of the list of free blocks and is inserted at the end of the heap space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; ulAddress -= xHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( void * ) ulAddress; 802c1fe: 6001 str r1, [r0, #0] pxFirstFreeBlock->xBlockSize = ulAddress - ( uint32_t ) pxFirstFreeBlock; pxFirstFreeBlock->pxNextFreeBlock = pxEnd; /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802c200: 6013 str r3, [r2, #0] /* Work out the position of the top bit in a size_t variable. */ xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); 802c202: 4b2e ldr r3, [pc, #184] ; (802c2bc ) 802c204: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 802c208: 601a str r2, [r3, #0] /* Check the requested block size is not so large that the top bit is set. The top bit of the block size member of the BlockLink_t structure is used to determine who owns the block - the application or the kernel, so it must be free. */ if( ( xWantedSize & xBlockAllocatedBit ) == 0 ) 802c20a: 4b2c ldr r3, [pc, #176] ; (802c2bc ) 802c20c: 681e ldr r6, [r3, #0] 802c20e: 4235 tst r5, r6 802c210: d140 bne.n 802c294 { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 802c212: 2d00 cmp r5, #0 802c214: d03f beq.n 802c296 { xWantedSize += xHeapStructSize; 802c216: f105 0308 add.w r3, r5, #8 /* Ensure that blocks are always aligned to the required number of bytes. */ if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) 802c21a: 0758 lsls r0, r3, #29 { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 802c21c: bf1c itt ne 802c21e: f023 0307 bicne.w r3, r3, #7 802c222: 3308 addne r3, #8 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 802c224: 2b00 cmp r3, #0 802c226: d033 beq.n 802c290 802c228: 4a23 ldr r2, [pc, #140] ; (802c2b8 ) 802c22a: 6817 ldr r7, [r2, #0] 802c22c: 42bb cmp r3, r7 802c22e: d831 bhi.n 802c294 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; 802c230: 4a1f ldr r2, [pc, #124] ; (802c2b0 ) 802c232: 6814 ldr r4, [r2, #0] while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802c234: e001 b.n 802c23a 802c236: 4622 mov r2, r4 { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; 802c238: 4604 mov r4, r0 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802c23a: 6861 ldr r1, [r4, #4] 802c23c: 4299 cmp r1, r3 802c23e: d304 bcc.n 802c24a pxBlock = pxBlock->pxNextFreeBlock; } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 802c240: 4819 ldr r0, [pc, #100] ; (802c2a8 ) 802c242: 6800 ldr r0, [r0, #0] 802c244: 4284 cmp r4, r0 802c246: d104 bne.n 802c252 802c248: e024 b.n 802c294 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802c24a: 6820 ldr r0, [r4, #0] 802c24c: 2800 cmp r0, #0 802c24e: d1f2 bne.n 802c236 802c250: e7f6 b.n 802c240 BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); /* This block is being returned for use so must be taken out of the list of free blocks. */ pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; 802c252: 6820 ldr r0, [r4, #0] was not found. */ if( pxBlock != pxEnd ) { /* Return the memory space pointed to - jumping over the BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); 802c254: 6815 ldr r5, [r2, #0] /* This block is being returned for use so must be taken out of the list of free blocks. */ pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; 802c256: 6010 str r0, [r2, #0] /* If the block is larger than required it can be split into two. */ if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) 802c258: 1aca subs r2, r1, r3 was not found. */ if( pxBlock != pxEnd ) { /* Return the memory space pointed to - jumping over the BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); 802c25a: 3508 adds r5, #8 of the list of free blocks. */ pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; /* If the block is larger than required it can be split into two. */ if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) 802c25c: 2a10 cmp r2, #16 802c25e: d909 bls.n 802c274 { /* This block is to be split into two. Create a new block following the number of bytes requested. The void cast is used to prevent byte alignment warnings from the compiler. */ pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize ); 802c260: 18e0 adds r0, r4, r3 configASSERT( ( ( ( uint32_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802c262: 0741 lsls r1, r0, #29 802c264: d002 beq.n 802c26c 802c266: f7ff fe8f bl 802bf88 802c26a: e7fe b.n 802c26a /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 802c26c: 6042 str r2, [r0, #4] pxBlock->xBlockSize = xWantedSize; 802c26e: 6063 str r3, [r4, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); 802c270: f7ff ff7c bl 802c16c else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 802c274: 6862 ldr r2, [r4, #4] 802c276: 4910 ldr r1, [pc, #64] ; (802c2b8 ) 802c278: 1abb subs r3, r7, r2 802c27a: 600b str r3, [r1, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 802c27c: 490d ldr r1, [pc, #52] ; (802c2b4 ) 802c27e: 6808 ldr r0, [r1, #0] 802c280: 4283 cmp r3, r0 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 802c282: bf38 it cc 802c284: 600b strcc r3, [r1, #0] mtCOVERAGE_TEST_MARKER(); } /* The block is being returned - it is allocated and owned by the application and has no "next" block. */ pxBlock->xBlockSize |= xBlockAllocatedBit; 802c286: 4316 orrs r6, r2 pxBlock->pxNextFreeBlock = NULL; 802c288: 2300 movs r3, #0 802c28a: e884 0048 stmia.w r4, {r3, r6} 802c28e: e002 b.n 802c296 /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 802c290: 461d mov r5, r3 802c292: e000 b.n 802c296 802c294: 2500 movs r5, #0 mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 802c296: f7ff fb6d bl 802b974 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( uint32_t ) pvReturn ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802c29a: 076b lsls r3, r5, #29 802c29c: d002 beq.n 802c2a4 802c29e: f7ff fe73 bl 802bf88 802c2a2: e7fe b.n 802c2a2 return pvReturn; } 802c2a4: 4628 mov r0, r5 802c2a6: bdf8 pop {r3, r4, r5, r6, r7, pc} 802c2a8: 20000d48 .word 0x20000d48 802c2ac: 10000000 .word 0x10000000 802c2b0: 20000d4c .word 0x20000d4c 802c2b4: 20000d54 .word 0x20000d54 802c2b8: 20000d44 .word 0x20000d44 802c2bc: 20000d58 .word 0x20000d58 0802c2c0 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 802c2c0: b510 push {r4, lr} uint8_t *puc = ( uint8_t * ) pv; BlockLink_t *pxLink; if( pv != NULL ) 802c2c2: 4604 mov r4, r0 802c2c4: b310 cbz r0, 802c30c /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 802c2c6: 4a12 ldr r2, [pc, #72] ; (802c310 ) 802c2c8: f850 3c04 ldr.w r3, [r0, #-4] 802c2cc: 6812 ldr r2, [r2, #0] 802c2ce: 421a tst r2, r3 802c2d0: d102 bne.n 802c2d8 802c2d2: f7ff fe59 bl 802bf88 802c2d6: e7fe b.n 802c2d6 configASSERT( pxLink->pxNextFreeBlock == NULL ); 802c2d8: f850 1c08 ldr.w r1, [r0, #-8] 802c2dc: b111 cbz r1, 802c2e4 802c2de: f7ff fe53 bl 802bf88 802c2e2: e7fe b.n 802c2e2 { if( pxLink->pxNextFreeBlock == NULL ) { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 802c2e4: ea23 0302 bic.w r3, r3, r2 802c2e8: f840 3c04 str.w r3, [r0, #-4] vTaskSuspendAll(); 802c2ec: f7ff faa6 bl 802b83c { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802c2f0: 4b08 ldr r3, [pc, #32] ; (802c314 ) 802c2f2: f854 1c04 ldr.w r1, [r4, #-4] 802c2f6: 681a ldr r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802c2f8: f1a4 0008 sub.w r0, r4, #8 pxLink->xBlockSize &= ~xBlockAllocatedBit; vTaskSuspendAll(); { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802c2fc: 188a adds r2, r1, r2 802c2fe: 601a str r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802c300: f7ff ff34 bl 802c16c else { mtCOVERAGE_TEST_MARKER(); } } } 802c304: e8bd 4010 ldmia.w sp!, {r4, lr} /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); } ( void ) xTaskResumeAll(); 802c308: f7ff bb34 b.w 802b974 802c30c: bd10 pop {r4, pc} 802c30e: bf00 nop 802c310: 20000d58 .word 0x20000d58 802c314: 20000d44 .word 0x20000d44 0802c318 : static void http_sent_log_err(void * arg, err_t err) { (void)err; (void)arg; /* Clear file transfer in progress flag */ fLogTransInprog = false; 802c318: 4b01 ldr r3, [pc, #4] ; (802c320 ) 802c31a: 2200 movs r2, #0 802c31c: 701a strb r2, [r3, #0] 802c31e: 4770 bx lr 802c320: 20000d6c .word 0x20000d6c 0802c324 : { uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802c324: 4b1b ldr r3, [pc, #108] ; (802c394 ) * @param data : pointer on receive packet buffer * @param len : buffer length * @retval size : Content_length in numeric format */ static uint32_t Parse_Content_Length(char *data, uint32_t len) { 802c326: b573 push {r0, r1, r4, r5, r6, lr} uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802c328: 2400 movs r4, #0 * @param data : pointer on receive packet buffer * @param len : buffer length * @retval size : Content_length in numeric format */ static uint32_t Parse_Content_Length(char *data, uint32_t len) { 802c32a: 4605 mov r5, r0 802c32c: 460e mov r6, r1 uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802c32e: 601c str r4, [r3, #0] /* find Content-Length data in packet buffer */ for (i=0;i { if (strncmp ((char*)(data+i), Content_Length, 16)==0) 802c332: 1928 adds r0, r5, r4 802c334: 4918 ldr r1, [pc, #96] ; (802c398 ) 802c336: 2210 movs r2, #16 802c338: f7f5 ffa8 bl 802228c 802c33c: b918 cbnz r0, 802c346 { ContentLengthOffset = i+16; 802c33e: 4b15 ldr r3, [pc, #84] ; (802c394 ) 802c340: 3410 adds r4, #16 802c342: 601c str r4, [r3, #0] break; 802c344: e002 b.n 802c34c char sizestring[6], *ptr; ContentLengthOffset =0; /* find Content-Length data in packet buffer */ for (i=0;i ContentLengthOffset = i+16; break; } } /* read Content-Length value */ if (ContentLengthOffset) 802c34c: 4b11 ldr r3, [pc, #68] ; (802c394 ) 802c34e: 681a ldr r2, [r3, #0] 802c350: 4618 mov r0, r3 802c352: b90a cbnz r2, 802c358 * @param len : buffer length * @retval size : Content_length in numeric format */ static uint32_t Parse_Content_Length(char *data, uint32_t len) { uint32_t i=0,size=0, S=1; 802c354: 2000 movs r0, #0 802c356: e01b b.n 802c390 } /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); 802c358: 18ad adds r5, r5, r2 } } /* read Content-Length value */ if (ContentLengthOffset) { i=0; 802c35a: 2300 movs r3, #0 ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) 802c35c: e002 b.n 802c364 { sizestring[i] = *(ptr+i); 802c35e: f80d 1003 strb.w r1, [sp, r3] i++; 802c362: 3301 adds r3, #1 /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) 802c364: 5ce9 ldrb r1, [r5, r3] 802c366: 290d cmp r1, #13 802c368: eb03 0402 add.w r4, r3, r2 802c36c: d1f7 bne.n 802c35e 802c36e: 6004 str r4, [r0, #0] { sizestring[i] = *(ptr+i); i++; ContentLengthOffset++; } if (i>0) 802c370: 2b00 cmp r3, #0 802c372: d0ef beq.n 802c354 { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802c374: 3b01 subs r3, #1 * @param len : buffer length * @retval size : Content_length in numeric format */ static uint32_t Parse_Content_Length(char *data, uint32_t len) { uint32_t i=0,size=0, S=1; 802c376: 2201 movs r2, #1 802c378: 2000 movs r0, #0 { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) { size += (sizestring[j]-0x30)*S; S=S*10; 802c37a: 210a movs r1, #10 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802c37c: e006 b.n 802c38c { size += (sizestring[j]-0x30)*S; 802c37e: f81d 4003 ldrb.w r4, [sp, r3] 802c382: 3c30 subs r4, #48 ; 0x30 802c384: fb02 0004 mla r0, r2, r4, r0 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802c388: 3b01 subs r3, #1 { size += (sizestring[j]-0x30)*S; S=S*10; 802c38a: 434a muls r2, r1 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802c38c: 2b00 cmp r3, #0 802c38e: daf6 bge.n 802c37e S=S*10; } } } return size; } 802c390: bd7c pop {r2, r3, r4, r5, r6, pc} 802c392: bf00 nop 802c394: 20000d68 .word 0x20000d68 802c398: 0803b820 .word 0x0803b820 0802c39c : /** * @brief Обновление времени последней активности пользователя */ static void HTTP_UpdateUserLoginTime(uint8_t user_id) { xTimerStart(users[user_id].LogoutTimer, 0); 802c39c: 4b07 ldr r3, [pc, #28] ; (802c3bc ) 802c39e: 2214 movs r2, #20 /** * @brief Обновление времени последней активности пользователя */ static void HTTP_UpdateUserLoginTime(uint8_t user_id) { 802c3a0: b513 push {r0, r1, r4, lr} xTimerStart(users[user_id].LogoutTimer, 0); 802c3a2: fb02 3000 mla r0, r2, r0, r3 802c3a6: 6904 ldr r4, [r0, #16] 802c3a8: f7ff fa50 bl 802b84c 802c3ac: 2300 movs r3, #0 802c3ae: 4602 mov r2, r0 802c3b0: 9300 str r3, [sp, #0] 802c3b2: 4620 mov r0, r4 802c3b4: 2101 movs r1, #1 802c3b6: f7fe fc4f bl 802ac58 } 802c3ba: bd1c pop {r2, r3, r4, pc} 802c3bc: 2000eaa0 .word 0x2000eaa0 0802c3c0 : * @param name : pointer to a file name * @param file : pointer to a fs_file structure * @retval 1 if success, 0 if fail */ static int fs_open(char *name, struct fs_file *file) { 802c3c0: b570 push {r4, r5, r6, lr} struct fsdata_file_noconst *f; for (f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next) 802c3c2: 4c09 ldr r4, [pc, #36] ; (802c3e8 ) * @param name : pointer to a file name * @param file : pointer to a fs_file structure * @retval 1 if success, 0 if fail */ static int fs_open(char *name, struct fs_file *file) { 802c3c4: 4606 mov r6, r0 802c3c6: 460d mov r5, r1 struct fsdata_file_noconst *f; for (f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next) { if (!strcmp(name, f->name)) 802c3c8: 4630 mov r0, r6 802c3ca: 6861 ldr r1, [r4, #4] 802c3cc: f7f5 fdb0 bl 8021f30 802c3d0: b928 cbnz r0, 802c3de { file->data = f->data; 802c3d2: 68a3 ldr r3, [r4, #8] 802c3d4: 602b str r3, [r5, #0] file->len = f->len; 802c3d6: 68e3 ldr r3, [r4, #12] return 1; 802c3d8: 2001 movs r0, #1 for (f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next) { if (!strcmp(name, f->name)) { file->data = f->data; file->len = f->len; 802c3da: 606b str r3, [r5, #4] return 1; 802c3dc: bd70 pop {r4, r5, r6, pc} */ static int fs_open(char *name, struct fs_file *file) { struct fsdata_file_noconst *f; for (f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next) 802c3de: 6824 ldr r4, [r4, #0] 802c3e0: 2c00 cmp r4, #0 802c3e2: d1f1 bne.n 802c3c8 file->data = f->data; file->len = f->len; return 1; } } return 0; 802c3e4: 4620 mov r0, r4 } 802c3e6: bd70 pop {r4, r5, r6, pc} 802c3e8: 0804068c .word 0x0804068c 0802c3ec : * @param pcb: pointer to a tcp_pcb structure * ¶m err: Lwip stack error code * @retval err */ static err_t http_accept(void *arg, struct tcp_pcb *pcb, err_t err) { 802c3ec: b538 push {r3, r4, r5, lr} struct http_state *hs; /* Allocate memory for the structure that holds the state of the connection */ hs = mem_malloc(sizeof(struct http_state)); 802c3ee: 2008 movs r0, #8 * @param pcb: pointer to a tcp_pcb structure * ¶m err: Lwip stack error code * @retval err */ static err_t http_accept(void *arg, struct tcp_pcb *pcb, err_t err) { 802c3f0: 460c mov r4, r1 struct http_state *hs; /* Allocate memory for the structure that holds the state of the connection */ hs = mem_malloc(sizeof(struct http_state)); 802c3f2: f003 fa9f bl 802f934 if (hs == NULL) 802c3f6: 4601 mov r1, r0 802c3f8: b1a0 cbz r0, 802c424 { return ERR_MEM; } /* Initialize the structure. */ hs->file = NULL; 802c3fa: 2500 movs r5, #0 802c3fc: 6005 str r5, [r0, #0] hs->left = 0; 802c3fe: 6045 str r5, [r0, #4] /* Tell TCP that this is the structure we wish to be passed for our callbacks. */ tcp_arg(pcb, hs); 802c400: 4620 mov r0, r4 802c402: f003 ff05 bl 8030210 /* Tell TCP that we wish to be informed of incoming data by a call to the http_recv() function. */ tcp_recv(pcb, http_recv); 802c406: 4620 mov r0, r4 802c408: 4908 ldr r1, [pc, #32] ; (802c42c ) 802c40a: f003 ff03 bl 8030214 tcp_err(pcb, conn_err); 802c40e: 4620 mov r0, r4 802c410: 4907 ldr r1, [pc, #28] ; (802c430 ) 802c412: f003 ff03 bl 803021c tcp_poll(pcb, http_poll, 10); 802c416: 4620 mov r0, r4 802c418: 4906 ldr r1, [pc, #24] ; (802c434 ) 802c41a: 220a movs r2, #10 802c41c: f003 ff03 bl 8030226 return ERR_OK; 802c420: 4628 mov r0, r5 802c422: e000 b.n 802c426 /* Allocate memory for the structure that holds the state of the connection */ hs = mem_malloc(sizeof(struct http_state)); if (hs == NULL) { return ERR_MEM; 802c424: 20ff movs r0, #255 ; 0xff tcp_err(pcb, conn_err); tcp_poll(pcb, http_poll, 10); return ERR_OK; } 802c426: b240 sxtb r0, r0 802c428: bd38 pop {r3, r4, r5, pc} 802c42a: bf00 nop 802c42c: 0802d439 .word 0x0802d439 802c430: 0802c47b .word 0x0802c47b 802c434: 0802c463 .word 0x0802c463 0802c438 : * @param pcb: pointer to a tcp_pcb struct * @param hs: pointer to a http_state struct * @retval none */ static void send_data(struct tcp_pcb *pcb, struct http_state *hs) { 802c438: b538 push {r3, r4, r5, lr} err_t err; u16_t len; /* We cannot send more data than space available in the send buffer */ if (tcp_sndbuf(pcb) < hs->left) 802c43a: 684b ldr r3, [r1, #4] 802c43c: f8b0 5066 ldrh.w r5, [r0, #102] ; 0x66 802c440: 429d cmp r5, r3 { len = tcp_sndbuf(pcb); } else { len = hs->left; 802c442: bf28 it cs 802c444: b29d uxthcs r5, r3 * @param pcb: pointer to a tcp_pcb struct * @param hs: pointer to a http_state struct * @retval none */ static void send_data(struct tcp_pcb *pcb, struct http_state *hs) { 802c446: 460c mov r4, r1 } else { len = hs->left; } err = tcp_write(pcb, hs->file, len, 0); 802c448: 462a mov r2, r5 802c44a: 6809 ldr r1, [r1, #0] 802c44c: 2300 movs r3, #0 802c44e: f005 fa44 bl 80318da if (err == ERR_OK) 802c452: b928 cbnz r0, 802c460 { hs->file += len; 802c454: 6823 ldr r3, [r4, #0] 802c456: 195b adds r3, r3, r5 802c458: 6023 str r3, [r4, #0] hs->left -= len; 802c45a: 6863 ldr r3, [r4, #4] 802c45c: 1b5d subs r5, r3, r5 802c45e: 6065 str r5, [r4, #4] 802c460: bd38 pop {r3, r4, r5, pc} 0802c462 : * @param arg: pointer to an argument to be passed to callback function * @param pcb: pointer on tcp_pcb structure * @retval err_t */ static err_t http_poll(void *arg, struct tcp_pcb *pcb) { 802c462: b508 push {r3, lr} if (arg == NULL) 802c464: 4603 mov r3, r0 { tcp_close(pcb); 802c466: 4608 mov r0, r1 * @param pcb: pointer on tcp_pcb structure * @retval err_t */ static err_t http_poll(void *arg, struct tcp_pcb *pcb) { if (arg == NULL) 802c468: b913 cbnz r3, 802c470 { tcp_close(pcb); 802c46a: f004 f96f bl 803074c 802c46e: e002 b.n 802c476 } else { send_data(pcb, (struct http_state *)arg); 802c470: 4619 mov r1, r3 802c472: f7ff ffe1 bl 802c438 } return ERR_OK; } 802c476: 2000 movs r0, #0 802c478: bd08 pop {r3, pc} 0802c47a : static void conn_err(void *arg, err_t err) { struct http_state *hs; hs = arg; mem_free(hs); 802c47a: f003 b993 b.w 802f7a4 0802c47e : * @param pcb: pointer to a tcp_pcb struct * @param hs: pointer to a http_state struct * @retval */ static void close_conn(struct tcp_pcb *pcb, struct http_state *hs) { 802c47e: b538 push {r3, r4, r5, lr} 802c480: 4604 mov r4, r0 802c482: 460d mov r5, r1 tcp_arg(pcb, NULL); 802c484: 2100 movs r1, #0 802c486: f003 fec3 bl 8030210 tcp_sent(pcb, NULL); 802c48a: 4620 mov r0, r4 802c48c: 2100 movs r1, #0 802c48e: f003 fec3 bl 8030218 tcp_recv(pcb, NULL); 802c492: 4620 mov r0, r4 802c494: 2100 movs r1, #0 802c496: f003 febd bl 8030214 mem_free(hs); 802c49a: 4628 mov r0, r5 802c49c: f003 f982 bl 802f7a4 tcp_close(pcb); 802c4a0: 4620 mov r0, r4 } 802c4a2: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} { tcp_arg(pcb, NULL); tcp_sent(pcb, NULL); tcp_recv(pcb, NULL); mem_free(hs); tcp_close(pcb); 802c4a6: f004 b951 b.w 803074c 0802c4aa : * @param pcb: pointer on tcp_pcb structure * @param len * @retval err : LwIP error code */ static err_t http_sent(void *arg, struct tcp_pcb *pcb, u16_t len) { 802c4aa: b508 push {r3, lr} 802c4ac: 4603 mov r3, r0 802c4ae: 4608 mov r0, r1 struct http_state *hs; hs = arg; if (hs->left > 0) 802c4b0: 685a ldr r2, [r3, #4] { send_data(pcb, hs); 802c4b2: 4619 mov r1, r3 { struct http_state *hs; hs = arg; if (hs->left > 0) 802c4b4: b112 cbz r2, 802c4bc { send_data(pcb, hs); 802c4b6: f7ff ffbf bl 802c438 802c4ba: e001 b.n 802c4c0 } else { close_conn(pcb, hs); 802c4bc: f7ff ffdf bl 802c47e } return ERR_OK; } 802c4c0: 2000 movs r0, #0 802c4c2: bd08 pop {r3, pc} 0802c4c4 : /** * @brief Sent callback for log file transfer (messages as is, not ordered) */ static err_t http_sent_log(void *arg, struct tcp_pcb *pcb, u16_t len) { 802c4c4: b570 push {r4, r5, r6, lr} static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802c4c6: 6845 ldr r5, [r0, #4] /** * @brief Sent callback for log file transfer (messages as is, not ordered) */ static err_t http_sent_log(void *arg, struct tcp_pcb *pcb, u16_t len) { 802c4c8: 4604 mov r4, r0 802c4ca: 460e mov r6, r1 static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802c4cc: b125 cbz r5, 802c4d8 { send_data(pcb, hs); 802c4ce: 4608 mov r0, r1 802c4d0: 4621 mov r1, r4 802c4d2: f7ff ffb1 bl 802c438 802c4d6: e036 b.n 802c546 } else { memset(logFileBuf, 0, FILE_BUF_MAX_LEN); 802c4d8: f44f 727a mov.w r2, #1000 ; 0x3e8 802c4dc: 481b ldr r0, [pc, #108] ; (802c54c ) 802c4de: 4629 mov r1, r5 802c4e0: f7f5 fc9a bl 8021e18 if (log_ptr + FILE_BUF_MAX_LEN_LOG <= log_size) { 802c4e4: 4b1a ldr r3, [pc, #104] ; (802c550 ) 802c4e6: 6818 ldr r0, [r3, #0] 802c4e8: 4b1a ldr r3, [pc, #104] ; (802c554 ) 802c4ea: 681a ldr r2, [r3, #0] 802c4ec: f500 7320 add.w r3, r0, #640 ; 0x280 802c4f0: 4293 cmp r3, r2 802c4f2: 4b19 ldr r3, [pc, #100] ; (802c558 ) 802c4f4: d803 bhi.n 802c4fe nbytes = LOG_GetData(log_ptr, logFileBuf, FILE_BUF_MAX_LEN_LOG, start); 802c4f6: 4915 ldr r1, [pc, #84] ; (802c54c ) 802c4f8: f44f 7220 mov.w r2, #640 ; 0x280 802c4fc: e003 b.n 802c506 } else if (log_ptr < log_size) { 802c4fe: 4290 cmp r0, r2 802c500: d205 bcs.n 802c50e nbytes = LOG_GetData(log_ptr, logFileBuf, (log_size - log_ptr), start); 802c502: 4912 ldr r1, [pc, #72] ; (802c54c ) 802c504: 1a12 subs r2, r2, r0 802c506: 781b ldrb r3, [r3, #0] 802c508: f7fd ff76 bl 802a3f8 802c50c: 4605 mov r5, r0 } else { nbytes = 0; } log_ptr += nbytes; 802c50e: 4b10 ldr r3, [pc, #64] ; (802c550 ) 802c510: 681a ldr r2, [r3, #0] 802c512: 18aa adds r2, r5, r2 802c514: 601a str r2, [r3, #0] start = false; 802c516: 4b10 ldr r3, [pc, #64] ; (802c558 ) 802c518: 2200 movs r2, #0 802c51a: 701a strb r2, [r3, #0] if (nbytes == 0) { 802c51c: b945 cbnz r5, 802c530 /* File transfer finished. */ start = true; 802c51e: 2201 movs r2, #1 close_conn(pcb, hs); 802c520: 4630 mov r0, r6 802c522: 4621 mov r1, r4 log_ptr += nbytes; start = false; if (nbytes == 0) { /* File transfer finished. */ start = true; 802c524: 701a strb r2, [r3, #0] close_conn(pcb, hs); 802c526: f7ff ffaa bl 802c47e /* Clear file transfer in progress flag */ fLogTransInprog = false; 802c52a: 4b0c ldr r3, [pc, #48] ; (802c55c ) 802c52c: 701d strb r5, [r3, #0] 802c52e: e00a b.n 802c546 return ERR_OK; } hs->file = logFileBuf; 802c530: 4b06 ldr r3, [pc, #24] ; (802c54c ) hs->left = nbytes; send_data(pcb, hs); 802c532: 4630 mov r0, r6 802c534: 4621 mov r1, r4 return ERR_OK; } hs->file = logFileBuf; hs->left = nbytes; 802c536: e884 0028 stmia.w r4, {r3, r5} send_data(pcb, hs); 802c53a: f7ff ff7d bl 802c438 tcp_sent(pcb, http_sent_log); 802c53e: 4630 mov r0, r6 802c540: 4907 ldr r1, [pc, #28] ; (802c560 ) 802c542: f003 fe69 bl 8030218 } return ERR_OK; } 802c546: 2000 movs r0, #0 802c548: bd70 pop {r4, r5, r6, pc} 802c54a: bf00 nop 802c54c: 2000d808 .word 0x2000d808 802c550: 20000d60 .word 0x20000d60 802c554: 20000d78 .word 0x20000d78 802c558: 20000720 .word 0x20000720 802c55c: 20000d6c .word 0x20000d6c 802c560: 0802c4c5 .word 0x0802c4c5 0802c564 : /** * @brief Sent callback for log file transfer (messages as is, not ordered) */ static err_t http_sent_history(void *arg, struct tcp_pcb *pcb, u16_t len) { 802c564: b570 push {r4, r5, r6, lr} static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802c566: 6845 ldr r5, [r0, #4] /** * @brief Sent callback for log file transfer (messages as is, not ordered) */ static err_t http_sent_history(void *arg, struct tcp_pcb *pcb, u16_t len) { 802c568: 4604 mov r4, r0 802c56a: 460e mov r6, r1 static bool start = true; (void)len; hs = arg; if (hs->left > 0) 802c56c: b125 cbz r5, 802c578 { send_data(pcb, hs); 802c56e: 4608 mov r0, r1 802c570: 4621 mov r1, r4 802c572: f7ff ff61 bl 802c438 802c576: e036 b.n 802c5e6 } else { memset(logFileBuf, 0, FILE_BUF_MAX_LEN); 802c578: f44f 727a mov.w r2, #1000 ; 0x3e8 802c57c: 481b ldr r0, [pc, #108] ; (802c5ec ) 802c57e: 4629 mov r1, r5 802c580: f7f5 fc4a bl 8021e18 if (log_ptr + FILE_BUF_MAX_LEN <= log_size) { 802c584: 4b1a ldr r3, [pc, #104] ; (802c5f0 ) 802c586: 6818 ldr r0, [r3, #0] 802c588: 4b1a ldr r3, [pc, #104] ; (802c5f4 ) 802c58a: 681a ldr r2, [r3, #0] 802c58c: f500 737a add.w r3, r0, #1000 ; 0x3e8 802c590: 4293 cmp r3, r2 802c592: 4b19 ldr r3, [pc, #100] ; (802c5f8 ) 802c594: d803 bhi.n 802c59e nbytes = History_GetData(log_ptr, logFileBuf, FILE_BUF_MAX_LEN, start); 802c596: 4915 ldr r1, [pc, #84] ; (802c5ec ) 802c598: f44f 727a mov.w r2, #1000 ; 0x3e8 802c59c: e003 b.n 802c5a6 } else if (log_ptr < log_size) { 802c59e: 4290 cmp r0, r2 802c5a0: d205 bcs.n 802c5ae nbytes = History_GetData(log_ptr, logFileBuf, (log_size - log_ptr), start); 802c5a2: 4912 ldr r1, [pc, #72] ; (802c5ec ) 802c5a4: 1a12 subs r2, r2, r0 802c5a6: 781b ldrb r3, [r3, #0] 802c5a8: f7fe f836 bl 802a618 802c5ac: 4605 mov r5, r0 } else { nbytes = 0; } log_ptr += nbytes; 802c5ae: 4b10 ldr r3, [pc, #64] ; (802c5f0 ) 802c5b0: 681a ldr r2, [r3, #0] 802c5b2: 18aa adds r2, r5, r2 802c5b4: 601a str r2, [r3, #0] start = false; 802c5b6: 4b10 ldr r3, [pc, #64] ; (802c5f8 ) 802c5b8: 2200 movs r2, #0 802c5ba: 701a strb r2, [r3, #0] if (nbytes == 0) { 802c5bc: b945 cbnz r5, 802c5d0 /* File transfer finished. */ start = true; 802c5be: 2201 movs r2, #1 close_conn(pcb, hs); 802c5c0: 4630 mov r0, r6 802c5c2: 4621 mov r1, r4 log_ptr += nbytes; start = false; if (nbytes == 0) { /* File transfer finished. */ start = true; 802c5c4: 701a strb r2, [r3, #0] close_conn(pcb, hs); 802c5c6: f7ff ff5a bl 802c47e /* Clear file transfer in progress flag */ fLogTransInprog = false; 802c5ca: 4b0c ldr r3, [pc, #48] ; (802c5fc ) 802c5cc: 701d strb r5, [r3, #0] 802c5ce: e00a b.n 802c5e6 return ERR_OK; } hs->file = logFileBuf; 802c5d0: 4b06 ldr r3, [pc, #24] ; (802c5ec ) hs->left = nbytes; send_data(pcb, hs); 802c5d2: 4630 mov r0, r6 802c5d4: 4621 mov r1, r4 return ERR_OK; } hs->file = logFileBuf; hs->left = nbytes; 802c5d6: e884 0028 stmia.w r4, {r3, r5} send_data(pcb, hs); 802c5da: f7ff ff2d bl 802c438 tcp_sent(pcb, http_sent_history); 802c5de: 4630 mov r0, r6 802c5e0: 4907 ldr r1, [pc, #28] ; (802c600 ) 802c5e2: f003 fe19 bl 8030218 } return ERR_OK; } 802c5e6: 2000 movs r0, #0 802c5e8: bd70 pop {r4, r5, r6, pc} 802c5ea: bf00 nop 802c5ec: 2000d808 .word 0x2000d808 802c5f0: 20000d60 .word 0x20000d60 802c5f4: 20000d78 .word 0x20000d78 802c5f8: 20000722 .word 0x20000722 802c5fc: 20000d6c .word 0x20000d6c 802c600: 0802c565 .word 0x0802c565 0802c604 : } /** * @brief >Callback таймера логаута пользователя */ void LogoutTimerCallback(TimerHandle_t pxTimer) { 802c604: b51f push {r0, r1, r2, r3, r4, lr} uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); 802c606: f7fe fc3f bl 802ae88 if( sSettings.sRADIUS.Auth_enable ) 802c60a: 4b0a ldr r3, [pc, #40] ; (802c634 ) 802c60c: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 /** * @brief >Callback таймера логаута пользователя */ void LogoutTimerCallback(TimerHandle_t pxTimer) { uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); 802c610: 4604 mov r4, r0 if( sSettings.sRADIUS.Auth_enable ) 802c612: b173 cbz r3, 802c632 static void HTTP_ForceUserLogout(uint8_t user_id) { char cookie[MAX_WEB_COOKIE_LEN]; /* Flush user cookie by random value */ sprintf(cookie, "%X", (unsigned int)GetRandomNumber()); 802c614: f7f9 ff38 bl 8026488 802c618: 4907 ldr r1, [pc, #28] ; (802c638 ) 802c61a: 4602 mov r2, r0 802c61c: 4668 mov r0, sp 802c61e: f7fb fb63 bl 8027ce8 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c622: 4b06 ldr r3, [pc, #24] ; (802c63c ) 802c624: b2e0 uxtb r0, r4 802c626: 2214 movs r2, #20 802c628: fb00 3002 mla r0, r0, r2, r3 802c62c: 4669 mov r1, sp 802c62e: f7f5 fd6d bl 802210c */ void LogoutTimerCallback(TimerHandle_t pxTimer) { uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); if( sSettings.sRADIUS.Auth_enable ) HTTP_ForceUserLogout(user_id); } 802c632: bd1f pop {r0, r1, r2, r3, r4, pc} 802c634: 2000d414 .word 0x2000d414 802c638: 0803fe3e .word 0x0803fe3e 802c63c: 2000eaa0 .word 0x2000eaa0 0802c640 : * @brief Initialize the HTTP server (start its thread) * @param none * @retval None */ void HTTP_Init() { 802c640: b5f0 push {r4, r5, r6, r7, lr} 802c642: b087 sub sp, #28 char buf[MAX_WEB_COOKIE_LEN]; uint8_t user_id; //sys_thread_new("HTTP", http_server_netconn_thread, NULL, 3000, 2); struct tcp_pcb *pcb; /*create new pcb*/ pcb = tcp_new(); 802c644: f004 f9b0 bl 80309a8 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802c648: 2250 movs r2, #80 ; 0x50 char buf[MAX_WEB_COOKIE_LEN]; uint8_t user_id; //sys_thread_new("HTTP", http_server_netconn_thread, NULL, 3000, 2); struct tcp_pcb *pcb; /*create new pcb*/ pcb = tcp_new(); 802c64a: 4604 mov r4, r0 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802c64c: 4913 ldr r1, [pc, #76] ; (802c69c ) /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c64e: 4f14 ldr r7, [pc, #80] ; (802c6a0 ) sprintf(buf, "%X", (unsigned int)GetRandomNumber()); HTTP_SetUserCookie(buf, user_id); /* Create user logout timers */ users[user_id].LogoutTimer = xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); 802c650: 4e14 ldr r6, [pc, #80] ; (802c6a4 ) //sys_thread_new("HTTP", http_server_netconn_thread, NULL, 3000, 2); struct tcp_pcb *pcb; /*create new pcb*/ pcb = tcp_new(); /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802c652: f003 fd0b bl 803006c /* start listening on port 80 */ pcb = tcp_listen(pcb); 802c656: 4620 mov r0, r4 802c658: 21ff movs r1, #255 ; 0xff 802c65a: f003 fd3f bl 80300dc /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); 802c65e: 4912 ldr r1, [pc, #72] ; (802c6a8 ) 802c660: f003 fddf bl 8030222 802c664: 2400 movs r4, #0 for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); 802c666: f7f9 ff0f bl 8026488 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c66a: 2514 movs r5, #20 pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); 802c66c: 4602 mov r2, r0 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c66e: fb05 7504 mla r5, r5, r4, r7 pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); 802c672: 490e ldr r1, [pc, #56] ; (802c6ac ) 802c674: a802 add r0, sp, #8 802c676: f7fb fb37 bl 8027ce8 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c67a: a902 add r1, sp, #8 802c67c: 4628 mov r0, r5 802c67e: f7f5 fd45 bl 802210c sprintf(buf, "%X", (unsigned int)GetRandomNumber()); HTTP_SetUserCookie(buf, user_id); /* Create user logout timers */ users[user_id].LogoutTimer = xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); 802c682: 2200 movs r2, #0 802c684: 4623 mov r3, r4 802c686: 9600 str r6, [sp, #0] 802c688: 4809 ldr r0, [pc, #36] ; (802c6b0 ) 802c68a: 490a ldr r1, [pc, #40] ; (802c6b4 ) 802c68c: f7fe fac4 bl 802ac18 802c690: 3401 adds r4, #1 tcp_bind(pcb, IP_ADDR_ANY, 80); /* start listening on port 80 */ pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802c692: 2c02 cmp r4, #2 /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); HTTP_SetUserCookie(buf, user_id); /* Create user logout timers */ users[user_id].LogoutTimer = 802c694: 6128 str r0, [r5, #16] tcp_bind(pcb, IP_ADDR_ANY, 80); /* start listening on port 80 */ pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802c696: d1e6 bne.n 802c666 /* Create user logout timers */ users[user_id].LogoutTimer = xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); } } 802c698: b007 add sp, #28 802c69a: bdf0 pop {r4, r5, r6, r7, pc} 802c69c: 08044744 .word 0x08044744 802c6a0: 2000eaa0 .word 0x2000eaa0 802c6a4: 0802c605 .word 0x0802c605 802c6a8: 0802c3ed .word 0x0802c3ed 802c6ac: 0803fe3e .word 0x0803fe3e 802c6b0: 0803fe41 .word 0x0803fe41 802c6b4: 001b7740 .word 0x001b7740 0802c6b8 : /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c6b8: b570 push {r4, r5, r6, lr} 802c6ba: 4602 mov r2, r0 802c6bc: b088 sub sp, #32 802c6be: 460c mov r4, r1 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802c6c0: 4668 mov r0, sp 802c6c2: 4611 mov r1, r2 802c6c4: 221e movs r2, #30 /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c6c6: 461e mov r6, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802c6c8: f7f5 fe36 bl 8022338 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802c6cc: 4668 mov r0, sp 802c6ce: 490b ldr r1, [pc, #44] ; (802c6fc ) 802c6d0: f7f5 fe64 bl 802239c 802c6d4: 4605 mov r5, r0 /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { //HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; 802c6d6: 2001 movs r0, #1 { char tempStr[30]; strncpy(tempStr, bufIn, 30); /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802c6d8: b975 cbnz r5, 802c6f8 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802c6da: 4629 mov r1, r5 802c6dc: f44f 62fa mov.w r2, #2000 ; 0x7d0 802c6e0: 4620 mov r0, r4 802c6e2: f7f5 fb99 bl 8021e18 HTTP_GetSettings(bufOut); 802c6e6: 4620 mov r0, r4 802c6e8: f001 fd16 bl 802e118 //printf(bufOut); *lenBufOut = strlen(bufOut); 802c6ec: 4620 mov r0, r4 802c6ee: f7f5 fd6b bl 80221c8 802c6f2: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802c6f4: 4628 mov r0, r5 802c6f6: e7ff b.n 802c6f8 { //HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; } } 802c6f8: b008 add sp, #32 802c6fa: bd70 pop {r4, r5, r6, pc} 802c6fc: 0803fe4b .word 0x0803fe4b 0802c700 : /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c700: b570 push {r4, r5, r6, lr} 802c702: 4602 mov r2, r0 802c704: b088 sub sp, #32 802c706: 460c mov r4, r1 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802c708: 4668 mov r0, sp 802c70a: 4611 mov r1, r2 802c70c: 221e movs r2, #30 /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c70e: 461e mov r6, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802c710: f7f5 fe12 bl 8022338 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802c714: 4668 mov r0, sp 802c716: 490b ldr r1, [pc, #44] ; (802c744 ) 802c718: f7f5 fe40 bl 802239c 802c71c: 4605 mov r5, r0 } /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { //HTTP_SetInfo(bufIn, lenBufIn); return SEND_REQUIRED_NO; 802c71e: 2001 movs r0, #1 { char tempStr[30]; strncpy(tempStr, bufIn, 30); /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802c720: b975 cbnz r5, 802c740 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802c722: 4629 mov r1, r5 802c724: f44f 62fa mov.w r2, #2000 ; 0x7d0 802c728: 4620 mov r0, r4 802c72a: f7f5 fb75 bl 8021e18 HTTP_GetInfo(bufOut); 802c72e: 4620 mov r0, r4 802c730: f001 fee4 bl 802e4fc *lenBufOut = strlen(bufOut); 802c734: 4620 mov r0, r4 802c736: f7f5 fd47 bl 80221c8 802c73a: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802c73c: 4628 mov r0, r5 802c73e: e7ff b.n 802c740 /* HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; */ } } 802c740: b008 add sp, #32 802c742: bd70 pop {r4, r5, r6, pc} 802c744: 0803fe4b .word 0x0803fe4b 0802c748 : /** * @brief Проверка пароля для перехода в режим bootloader * @retval None */ void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c748: b500 push {lr} 802c74a: b093 sub sp, #76 ; 0x4c 802c74c: 4601 mov r1, r0 char tempStr[50]; strncpy(tempStr, bufIn, 50); 802c74e: 2232 movs r2, #50 ; 0x32 802c750: a805 add r0, sp, #20 802c752: f7f5 fdf1 bl 8022338 char value[20]; uint8_t valueLen; memset(value, 0, 20); 802c756: 4668 mov r0, sp 802c758: 2100 movs r1, #0 802c75a: 2214 movs r2, #20 802c75c: f7f5 fb5c bl 8021e18 //if (strcmp(BOOTLOADER_PASWORD, value) == 0) { // *bufOut = '1'; /* Запускаем задачу отложенной перезагрузки. Контроллер должен успеть отправить ответ серверу о статусе пароля */ HTTP_StartResetTask(true); 802c760: 2001 movs r0, #1 802c762: f002 f8b7 bl 802e8d4 /* else *bufOut = '0';*/ //*lenBufOut = 1; } } 802c766: b013 add sp, #76 ; 0x4c 802c768: bd00 pop {pc} 802c76a: 0000 movs r0, r0 0802c76c : /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } void HTTP_LOGIN(char *bufOut, uint16_t *lenBufOut) { 802c76c: b530 push {r4, r5, lr} 802c76e: b093 sub sp, #76 ; 0x4c 802c770: 4604 mov r4, r0 802c772: 460d mov r5, r1 char tempStr[50]; uint8_t valueLen; char WebLogin[MAX_WEB_LOGIN_LEN]; GetUserLogin(ADMIN, WebLogin, &valueLen); 802c774: 2000 movs r0, #0 802c776: a902 add r1, sp, #8 802c778: f10d 0207 add.w r2, sp, #7 802c77c: f7fb fd9e bl 80282bc memset(tempStr, 0, 50); 802c780: 2100 movs r1, #0 802c782: 2232 movs r2, #50 ; 0x32 802c784: a805 add r0, sp, #20 802c786: f7f5 fb47 bl 8021e18 /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802c78a: 4b1b ldr r3, [pc, #108] ; (802c7f8 ) 802c78c: 2201 movs r2, #1 802c78e: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802c790: f7f9 fe7a bl 8026488 802c794: 4919 ldr r1, [pc, #100] ; (802c7fc ) 802c796: 4602 mov r2, r0 802c798: a805 add r0, sp, #20 802c79a: f7fb faa5 bl 8027ce8 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c79e: a905 add r1, sp, #20 802c7a0: 4817 ldr r0, [pc, #92] ; (802c800 ) 802c7a2: f7f5 fcb3 bl 802210c sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); /* Set users cookie */ HTTP_SetUserCookie(tempStr, ADMIN); HTTP_UpdateUserLoginTime(ADMIN); 802c7a6: 2000 movs r0, #0 802c7a8: f7ff fdf8 bl 802c39c /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802c7ac: 4915 ldr r1, [pc, #84] ; (802c804 ) 802c7ae: 4620 mov r0, r4 802c7b0: f7f5 fcac bl 802210c strcat(bufOut, WebLogin); 802c7b4: a902 add r1, sp, #8 802c7b6: 4620 mov r0, r4 802c7b8: f7f5 fb94 bl 8021ee4 strcat(bufOut, "\r\nSet-Cookie: id="); 802c7bc: 4912 ldr r1, [pc, #72] ; (802c808 ) 802c7be: 4620 mov r0, r4 802c7c0: f7f5 fb90 bl 8021ee4 strcat(bufOut, tempStr); 802c7c4: a905 add r1, sp, #20 802c7c6: 4620 mov r0, r4 802c7c8: f7f5 fb8c bl 8021ee4 strcat(bufOut, "\r\nSet-Cookie: role=0"); 802c7cc: 490f ldr r1, [pc, #60] ; (802c80c ) 802c7ce: 4620 mov r0, r4 802c7d0: f7f5 fb88 bl 8021ee4 strcat(bufOut, "\r\nSet-Cookie: auth=0"); 802c7d4: 490e ldr r1, [pc, #56] ; (802c810 ) 802c7d6: 4620 mov r0, r4 802c7d8: f7f5 fb84 bl 8021ee4 strcat(bufOut, "\r\n\r\n"); 802c7dc: 490d ldr r1, [pc, #52] ; (802c814 ) 802c7de: 4620 mov r0, r4 802c7e0: f7f5 fb80 bl 8021ee4 strcat(bufOut,"\r\n\r\n"); 802c7e4: 490c ldr r1, [pc, #48] ; (802c818 ) 802c7e6: 4620 mov r0, r4 802c7e8: f7f5 fb7c bl 8021ee4 *lenBufOut = strlen(bufOut); 802c7ec: 4620 mov r0, r4 802c7ee: f7f5 fceb bl 80221c8 802c7f2: 8028 strh r0, [r5, #0] } 802c7f4: b013 add sp, #76 ; 0x4c 802c7f6: bd30 pop {r4, r5, pc} 802c7f8: 20000d5f .word 0x20000d5f 802c7fc: 0803fe3e .word 0x0803fe3e 802c800: 2000eaa0 .word 0x2000eaa0 802c804: 0803fe4d .word 0x0803fe4d 802c808: 0803fe89 .word 0x0803fe89 802c80c: 0803fe9b .word 0x0803fe9b 802c810: 0803feb0 .word 0x0803feb0 802c814: 080405bd .word 0x080405bd 802c818: 0803fec5 .word 0x0803fec5 0802c81c : /** * @brief * @retval None */ uint8_t GetParamValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802c81c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c820: 4690 mov r8, r2 802c822: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802c824: f7f5 ff50 bl 80226c8 if (strPtr != 0) 802c828: 4605 mov r5, r0 802c82a: b1e0 cbz r0, 802c866 { beginValue = strpbrk(strPtr,"="); 802c82c: 490f ldr r1, [pc, #60] ; (802c86c ) 802c82e: f7f5 fdb5 bl 802239c endValue = strpbrk(strPtr,"&"); 802c832: 490f ldr r1, [pc, #60] ; (802c870 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802c834: 4606 mov r6, r0 endValue = strpbrk(strPtr,"&"); 802c836: 4628 mov r0, r5 802c838: f7f5 fdb0 bl 802239c if (endValue == 0) 802c83c: 4604 mov r4, r0 802c83e: b920 cbnz r0, 802c84a endValue = strpbrk(strPtr," "); 802c840: 4628 mov r0, r5 802c842: 490c ldr r1, [pc, #48] ; (802c874 ) 802c844: f7f5 fdaa bl 802239c 802c848: 4604 mov r4, r0 len = endValue - beginValue - 1; 802c84a: 1ba5 subs r5, r4, r6 802c84c: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802c84e: 4640 mov r0, r8 802c850: 1c71 adds r1, r6, #1 802c852: 462a mov r2, r5 802c854: f7f5 fd70 bl 8022338 *endValue = '0'; 802c858: 2330 movs r3, #48 ; 0x30 802c85a: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802c85c: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr," "); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802c85e: 7033 strb r3, [r6, #0] *paramLen = len; 802c860: 703d strb r5, [r7, #0] return 1; 802c862: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802c866: 7038 strb r0, [r7, #0] return 0; } } 802c868: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c86c: 0804025e .word 0x0804025e 802c870: 0803ff31 .word 0x0803ff31 802c874: 080392c9 .word 0x080392c9 0802c878 : /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c878: b5f0 push {r4, r5, r6, r7, lr} 802c87a: b0a9 sub sp, #164 ; 0xa4 802c87c: 4604 mov r4, r0 char *strPtr = 0; char WebPassword[MAX_WEB_PASSWD_LEN]; char WebLogin[MAX_WEB_LOGIN_LEN]; char buf[40]; memset(login, 0, 20); 802c87e: 2214 movs r2, #20 /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c880: 460d mov r5, r1 char *strPtr = 0; char WebPassword[MAX_WEB_PASSWD_LEN]; char WebLogin[MAX_WEB_LOGIN_LEN]; char buf[40]; memset(login, 0, 20); 802c882: a807 add r0, sp, #28 802c884: 2100 movs r1, #0 /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c886: 461f mov r7, r3 char *strPtr = 0; char WebPassword[MAX_WEB_PASSWD_LEN]; char WebLogin[MAX_WEB_LOGIN_LEN]; char buf[40]; memset(login, 0, 20); 802c888: f7f5 fac6 bl 8021e18 memset(password, 0, 20); 802c88c: 2100 movs r1, #0 802c88e: 2214 movs r2, #20 802c890: a80c add r0, sp, #48 ; 0x30 802c892: f7f5 fac1 bl 8021e18 memset(tempStr, 0, 50); 802c896: 2100 movs r1, #0 802c898: 2232 movs r2, #50 ; 0x32 802c89a: a81b add r0, sp, #108 ; 0x6c 802c89c: f7f5 fabc bl 8021e18 /* Get first 50 bytes of string */ strncpy(tempStr, bufIn, 49); 802c8a0: 2231 movs r2, #49 ; 0x31 802c8a2: 4621 mov r1, r4 802c8a4: a81b add r0, sp, #108 ; 0x6c 802c8a6: f7f5 fd47 bl 8022338 /* Add " " to the string in order GetParamValue() can be able to parse the param */ strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c8aa: f10d 0603 add.w r6, sp, #3 /* Get first 50 bytes of string */ strncpy(tempStr, bufIn, 49); /* Add " " to the string in order GetParamValue() can be able to parse the param */ strcat(tempStr, " "); 802c8ae: 4941 ldr r1, [pc, #260] ; (802c9b4 ) 802c8b0: a81b add r0, sp, #108 ; 0x6c 802c8b2: f7f5 fb17 bl 8021ee4 if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c8b6: a81b add r0, sp, #108 ; 0x6c 802c8b8: 493f ldr r1, [pc, #252] ; (802c9b8 ) 802c8ba: aa07 add r2, sp, #28 802c8bc: 4633 mov r3, r6 802c8be: f7ff ffad bl 802c81c 802c8c2: b920 cbnz r0, 802c8ce } } /* No valid login and pass found */ /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; 802c8c4: 4b3d ldr r3, [pc, #244] ; (802c9bc ) 802c8c6: 2200 movs r2, #0 802c8c8: 701a strb r2, [r3, #0] /* Wrong login or pass, return */ return SEND_REQUIRED_NO; 802c8ca: 2001 movs r0, #1 802c8cc: e070 b.n 802c9b0 /* Add " " to the string in order GetParamValue() can be able to parse the param */ strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && GetParamValue(tempStr, "password=", password, &valueLen)) 802c8ce: a81b add r0, sp, #108 ; 0x6c 802c8d0: 493b ldr r1, [pc, #236] ; (802c9c0 ) 802c8d2: aa0c add r2, sp, #48 ; 0x30 802c8d4: 4633 mov r3, r6 802c8d6: f7ff ffa1 bl 802c81c strncpy(tempStr, bufIn, 49); /* Add " " to the string in order GetParamValue() can be able to parse the param */ strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && 802c8da: 2800 cmp r0, #0 802c8dc: d0f2 beq.n 802c8c4 802c8de: 2400 movs r4, #0 GetParamValue(tempStr, "password=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { GetUserLogin(user_id, WebLogin, &valueLen); 802c8e0: 4620 mov r0, r4 802c8e2: a904 add r1, sp, #16 802c8e4: 4632 mov r2, r6 802c8e6: f7fb fce9 bl 80282bc GetUserPassword(user_id, WebPassword, &valueLen); 802c8ea: 4620 mov r0, r4 802c8ec: a901 add r1, sp, #4 802c8ee: 4632 mov r2, r6 802c8f0: f7fb fcfa bl 80282e8 /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802c8f4: a804 add r0, sp, #16 802c8f6: a907 add r1, sp, #28 802c8f8: 220b movs r2, #11 802c8fa: f7f5 fcc7 bl 802228c 802c8fe: 2800 cmp r0, #0 802c900: d151 bne.n 802c9a6 (strncmp(WebPassword, password, MAX_WEB_PASSWD_LEN) == 0)) { 802c902: a801 add r0, sp, #4 802c904: a90c add r1, sp, #48 ; 0x30 802c906: 220b movs r2, #11 802c908: f7f5 fcc0 bl 802228c GetUserLogin(user_id, WebLogin, &valueLen); GetUserPassword(user_id, WebPassword, &valueLen); /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802c90c: 2800 cmp r0, #0 802c90e: d14a bne.n 802c9a6 if (user_id >= 1) { } /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802c910: 4b2a ldr r3, [pc, #168] ; (802c9bc ) 802c912: 2201 movs r2, #1 802c914: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802c916: f7f9 fdb7 bl 8026488 802c91a: 492a ldr r1, [pc, #168] ; (802c9c4 ) 802c91c: 4602 mov r2, r0 802c91e: a81b add r0, sp, #108 ; 0x6c 802c920: f7fb f9e2 bl 8027ce8 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802c924: 4b28 ldr r3, [pc, #160] ; (802c9c8 ) 802c926: 2014 movs r0, #20 802c928: fb00 3004 mla r0, r0, r4, r3 802c92c: a91b add r1, sp, #108 ; 0x6c 802c92e: f7f5 fbed bl 802210c sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); /* Set users cookie */ HTTP_SetUserCookie(tempStr, user_id); HTTP_UpdateUserLoginTime(user_id); 802c932: 4620 mov r0, r4 802c934: f7ff fd32 bl 802c39c /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802c938: 4924 ldr r1, [pc, #144] ; (802c9cc ) 802c93a: 4628 mov r0, r5 802c93c: f7f5 fbe6 bl 802210c strcat(bufOut, WebLogin); 802c940: a904 add r1, sp, #16 802c942: 4628 mov r0, r5 802c944: f7f5 face bl 8021ee4 strcat(bufOut, "\r\nSet-Cookie: id="); 802c948: 4921 ldr r1, [pc, #132] ; (802c9d0 ) 802c94a: 4628 mov r0, r5 802c94c: f7f5 faca bl 8021ee4 strcat(bufOut, tempStr); 802c950: a91b add r1, sp, #108 ; 0x6c 802c952: 4628 mov r0, r5 802c954: f7f5 fac6 bl 8021ee4 sprintf(tempStr, "%d", user_id); 802c958: 4622 mov r2, r4 802c95a: 491e ldr r1, [pc, #120] ; (802c9d4 ) 802c95c: a81b add r0, sp, #108 ; 0x6c 802c95e: f7fb f9c3 bl 8027ce8 strcat(bufOut, "\r\nSet-Cookie: role="); 802c962: 491d ldr r1, [pc, #116] ; (802c9d8 ) 802c964: 4628 mov r0, r5 802c966: f7f5 fabd bl 8021ee4 strcat(bufOut, tempStr); 802c96a: a91b add r1, sp, #108 ; 0x6c 802c96c: 4628 mov r0, r5 802c96e: f7f5 fab9 bl 8021ee4 strcat(bufOut, "\r\n\r\n"); 802c972: 491a ldr r1, [pc, #104] ; (802c9dc ) 802c974: 4628 mov r0, r5 802c976: f7f5 fab5 bl 8021ee4 strcat(bufOut,"\r\n\r\n"); 802c97a: 4919 ldr r1, [pc, #100] ; (802c9e0 ) 802c97c: 4628 mov r0, r5 802c97e: f7f5 fab1 bl 8021ee4 *lenBufOut = strlen(bufOut); 802c982: 4628 mov r0, r5 802c984: f7f5 fc20 bl 80221c8 switch (user_id) { case 0: snprintf(buf, sizeof(buf), "Администратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c988: 2128 movs r1, #40 ; 0x28 strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); switch (user_id) { 802c98a: 2c01 cmp r4, #1 case 0: snprintf(buf, sizeof(buf), "Администратор"); 802c98c: bf14 ite ne 802c98e: 4a15 ldrne r2, [pc, #84] ; (802c9e4 ) break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c990: 4a15 ldreq r2, [pc, #84] ; (802c9e8 ) strcat(bufOut, "\r\nSet-Cookie: role="); strcat(bufOut, tempStr); strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); 802c992: 8038 strh r0, [r7, #0] switch (user_id) { case 0: snprintf(buf, sizeof(buf), "Администратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802c994: a811 add r0, sp, #68 ; 0x44 802c996: f7fb f989 bl 8027cac default: snprintf(buf, sizeof(buf), "", login); break; } log_event_data(LOG_LOGIN, buf); 802c99a: 2005 movs r0, #5 802c99c: a911 add r1, sp, #68 ; 0x44 802c99e: f7fd fc61 bl 802a264 /* Запускаем задачу-таймер логаута. */ /* TODO отправить ответ серверу о статусе пароля */ return SEND_REQUIRED_YES; 802c9a2: 2000 movs r0, #0 802c9a4: e004 b.n 802c9b0 strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && GetParamValue(tempStr, "password=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802c9a6: 3401 adds r4, #1 802c9a8: b2e4 uxtb r4, r4 802c9aa: 2c02 cmp r4, #2 802c9ac: d08a beq.n 802c8c4 802c9ae: e797 b.n 802c8e0 /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } 802c9b0: b029 add sp, #164 ; 0xa4 802c9b2: bdf0 pop {r4, r5, r6, r7, pc} 802c9b4: 080392c9 .word 0x080392c9 802c9b8: 0803ff33 .word 0x0803ff33 802c9bc: 20000d5f .word 0x20000d5f 802c9c0: 0803ff3a .word 0x0803ff3a 802c9c4: 0803fe3e .word 0x0803fe3e 802c9c8: 2000eaa0 .word 0x2000eaa0 802c9cc: 0803fe4d .word 0x0803fe4d 802c9d0: 0803fe89 .word 0x0803fe89 802c9d4: 0803916f .word 0x0803916f 802c9d8: 0803ff44 .word 0x0803ff44 802c9dc: 080405bd .word 0x080405bd 802c9e0: 0803fec5 .word 0x0803fec5 802c9e4: 0803928f .word 0x0803928f 802c9e8: 0803ff58 .word 0x0803ff58 0802c9ec : /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9ec: b570 push {r4, r5, r6, lr} 802c9ee: b09c sub sp, #112 ; 0x70 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802c9f0: 2232 movs r2, #50 ; 0x32 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9f2: 4606 mov r6, r0 802c9f4: 460c mov r4, r1 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802c9f6: a802 add r0, sp, #8 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { uint8_t valueLen = 0; 802c9f8: 2100 movs r1, #0 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802c9fa: 461d mov r5, r3 uint8_t valueLen = 0; 802c9fc: f88d 1007 strb.w r1, [sp, #7] char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802ca00: f7f5 fa0a bl 8021e18 strcpy(bufOut, HTTP_200_OK); 802ca04: 4928 ldr r1, [pc, #160] ; (802caa8 ) 802ca06: 4620 mov r0, r4 802ca08: f7f5 fb80 bl 802210c GetParamValue(bufIn, "func=", tempValue, &valueLen); 802ca0c: 4927 ldr r1, [pc, #156] ; (802caac ) 802ca0e: 4630 mov r0, r6 802ca10: aa02 add r2, sp, #8 802ca12: f10d 0307 add.w r3, sp, #7 802ca16: f7ff ff01 bl 802c81c if (strcmp(tempValue, "reboot") == 0){ 802ca1a: a802 add r0, sp, #8 802ca1c: 4924 ldr r1, [pc, #144] ; (802cab0 ) 802ca1e: f7f5 fa87 bl 8021f30 802ca22: b978 cbnz r0, 802ca44 res = ups_metac_service_pdu(ups_cancel_shut_down); 802ca24: 2007 movs r0, #7 802ca26: f7fc fed5 bl 80297d4 if(res == 1){ 802ca2a: b240 sxtb r0, r0 802ca2c: 2801 cmp r0, #1 802ca2e: d106 bne.n 802ca3e log_event_data(LOG_SHUTDOWN_UPS, "Администратор(Останов)"); 802ca30: 2007 movs r0, #7 802ca32: 4920 ldr r1, [pc, #128] ; (802cab4 ) 802ca34: f7fd fc16 bl 802a264 strcat(bufOut, "Выключение нагрузки ИБП отменено!"); 802ca38: 4620 mov r0, r4 802ca3a: 491f ldr r1, [pc, #124] ; (802cab8 ) 802ca3c: e02b b.n 802ca96 } else strcat(bufOut, "Выключение нагрузки ИБП не удалось отменить!"); 802ca3e: 4620 mov r0, r4 802ca40: 491e ldr r1, [pc, #120] ; (802cabc ) 802ca42: e028 b.n 802ca96 *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "off", 5) == 0){ 802ca44: 491e ldr r1, [pc, #120] ; (802cac0 ) 802ca46: a802 add r0, sp, #8 802ca48: 2205 movs r2, #5 802ca4a: f7f5 fc1f bl 802228c 802ca4e: 4601 mov r1, r0 802ca50: bb38 cbnz r0, 802caa2 memset(tempValue2, 0, 50); 802ca52: 2232 movs r2, #50 ; 0x32 802ca54: a80f add r0, sp, #60 ; 0x3c 802ca56: f7f5 f9df bl 8021e18 GetParamValue(bufIn, "after=", tempValue2, &valueLen); 802ca5a: aa0f add r2, sp, #60 ; 0x3c 802ca5c: f10d 0307 add.w r3, sp, #7 802ca60: 4918 ldr r1, [pc, #96] ; (802cac4 ) 802ca62: 4630 mov r0, r6 802ca64: f7ff feda bl 802c81c TimeParamFloat = atof(tempValue2); 802ca68: a80f add r0, sp, #60 ; 0x3c 802ca6a: f7f5 f8b1 bl 8021bd0 802ca6e: f7f4 f8c5 bl 8020bfc <__aeabi_d2f> 802ca72: 4b15 ldr r3, [pc, #84] ; (802cac8 ) 802ca74: 6018 str r0, [r3, #0] res = ups_metac_service_pdu(ups_shutdown); 802ca76: 2005 movs r0, #5 802ca78: f7fc feac bl 80297d4 if(res == 1){ 802ca7c: b240 sxtb r0, r0 802ca7e: 2801 cmp r0, #1 strcat(bufOut, "Отключение нагрузки ИБП!"); 802ca80: 4620 mov r0, r4 else if (strncmp(tempValue, "off", 5) == 0){ memset(tempValue2, 0, 50); GetParamValue(bufIn, "after=", tempValue2, &valueLen); TimeParamFloat = atof(tempValue2); res = ups_metac_service_pdu(ups_shutdown); if(res == 1){ 802ca82: d107 bne.n 802ca94 strcat(bufOut, "Отключение нагрузки ИБП!"); 802ca84: 4911 ldr r1, [pc, #68] ; (802cacc ) 802ca86: f7f5 fa2d bl 8021ee4 log_event_data(LOG_SHUTDOWN_UPS, "Администратор"); 802ca8a: 2007 movs r0, #7 802ca8c: 4910 ldr r1, [pc, #64] ; (802cad0 ) 802ca8e: f7fd fbe9 bl 802a264 802ca92: e002 b.n 802ca9a }else strcat(bufOut, "Отключение нагрузки ИБП не удалось!"); 802ca94: 490f ldr r1, [pc, #60] ; (802cad4 ) 802ca96: f7f5 fa25 bl 8021ee4 *lenBufOut = strlen(bufOut); 802ca9a: 4620 mov r0, r4 802ca9c: f7f5 fb94 bl 80221c8 802caa0: 8028 strh r0, [r5, #0] } } 802caa2: b01c add sp, #112 ; 0x70 802caa4: bd70 pop {r4, r5, r6, pc} 802caa6: bf00 nop 802caa8: 08041928 .word 0x08041928 802caac: 0803ff71 .word 0x0803ff71 802cab0: 0803ff77 .word 0x0803ff77 802cab4: 0803ff7e .word 0x0803ff7e 802cab8: 0803ffa9 .word 0x0803ffa9 802cabc: 0803ffe8 .word 0x0803ffe8 802cac0: 0804003b .word 0x0804003b 802cac4: 0804003f .word 0x0804003f 802cac8: 20000b88 .word 0x20000b88 802cacc: 08040046 .word 0x08040046 802cad0: 0803928f .word 0x0803928f 802cad4: 08040074 .word 0x08040074 0802cad8 : /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cad8: b5f0 push {r4, r5, r6, r7, lr} uint8_t valueLen = 0; 802cada: 2600 movs r6, #0 /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cadc: b08d sub sp, #52 ; 0x34 802cade: 4607 mov r7, r0 802cae0: 460c mov r4, r1 uint8_t valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802cae2: 2214 movs r2, #20 802cae4: 4631 mov r1, r6 802cae6: a802 add r0, sp, #8 /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802cae8: 461d mov r5, r3 uint8_t valueLen = 0; 802caea: f88d 6007 strb.w r6, [sp, #7] char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802caee: f7f5 f993 bl 8021e18 memset(tempValue2, 0, 20); 802caf2: 2214 movs r2, #20 802caf4: 4631 mov r1, r6 802caf6: a807 add r0, sp, #28 802caf8: f7f5 f98e bl 8021e18 strcpy(bufOut, HTTP_200_OK); 802cafc: 492b ldr r1, [pc, #172] ; (802cbac ) 802cafe: 4620 mov r0, r4 802cb00: f7f5 fb04 bl 802210c GetParamValue(bufIn, "func=", tempValue, &valueLen); 802cb04: 492a ldr r1, [pc, #168] ; (802cbb0 ) 802cb06: 4638 mov r0, r7 802cb08: aa02 add r2, sp, #8 802cb0a: f10d 0307 add.w r3, sp, #7 802cb0e: f7ff fe85 bl 802c81c if (strcmp(tempValue, "stop") == 0){ 802cb12: a802 add r0, sp, #8 802cb14: 4927 ldr r1, [pc, #156] ; (802cbb4 ) 802cb16: f7f5 fa0b bl 8021f30 802cb1a: b998 cbnz r0, 802cb44 res = ups_metac_service_pdu(ups_cancel_test); 802cb1c: 2008 movs r0, #8 802cb1e: f7fc fe59 bl 80297d4 802cb22: b2c6 uxtb r6, r0 if(res == 1 || res == 0){ 802cb24: 2e01 cmp r6, #1 802cb26: d807 bhi.n 802cb38 strcat(bufOut, "Тест остановлен!"); 802cb28: 4923 ldr r1, [pc, #140] ; (802cbb8 ) 802cb2a: 4620 mov r0, r4 802cb2c: f7f5 f9da bl 8021ee4 log_event_data(LOG_TEST_UPS, "Администратор(Останов)"); 802cb30: 2006 movs r0, #6 802cb32: 4922 ldr r1, [pc, #136] ; (802cbbc ) 802cb34: f7fd fb96 bl 802a264 } if(res == -1) 802cb38: b276 sxtb r6, r6 802cb3a: 1c72 adds r2, r6, #1 802cb3c: d130 bne.n 802cba0 strcat(bufOut, "Тест не удалось остановить!"); 802cb3e: 4620 mov r0, r4 802cb40: 491f ldr r1, [pc, #124] ; (802cbc0 ) 802cb42: e02b b.n 802cb9c *lenBufOut = strlen(bufOut); } else if (strcmp(tempValue, "discharge") == 0){ 802cb44: a802 add r0, sp, #8 802cb46: 491f ldr r1, [pc, #124] ; (802cbc4 ) 802cb48: f7f5 f9f2 bl 8021f30 802cb4c: b908 cbnz r0, 802cb52 res = ups_metac_service_pdu(ups_test_low_bat); 802cb4e: 2002 movs r0, #2 802cb50: e012 b.n 802cb78 } if(res == -1) strcat(bufOut, "Тест не удалось запустить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "time", 6) == 0){ 802cb52: a802 add r0, sp, #8 802cb54: 491c ldr r1, [pc, #112] ; (802cbc8 ) 802cb56: 2206 movs r2, #6 802cb58: f7f5 fb98 bl 802228c 802cb5c: bb20 cbnz r0, 802cba8 GetParamValue(bufIn, "=", tempValue2, &valueLen); 802cb5e: f10d 0307 add.w r3, sp, #7 802cb62: 491a ldr r1, [pc, #104] ; (802cbcc ) 802cb64: aa07 add r2, sp, #28 802cb66: 4638 mov r0, r7 802cb68: f7ff fe58 bl 802c81c TimeParam = atoi(tempValue2); 802cb6c: a807 add r0, sp, #28 802cb6e: f7f5 f833 bl 8021bd8 802cb72: 4b17 ldr r3, [pc, #92] ; (802cbd0 ) 802cb74: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_test_time); 802cb76: 2003 movs r0, #3 802cb78: f7fc fe2c bl 80297d4 802cb7c: b2c6 uxtb r6, r0 if(res == 1 || res == 0){ 802cb7e: 2e01 cmp r6, #1 802cb80: d807 bhi.n 802cb92 strcat(bufOut, "Тест запущен!"); 802cb82: 4914 ldr r1, [pc, #80] ; (802cbd4 ) 802cb84: 4620 mov r0, r4 802cb86: f7f5 f9ad bl 8021ee4 log_event_data(LOG_TEST_UPS, "Администратор (Запущен)"); 802cb8a: 2006 movs r0, #6 802cb8c: 4912 ldr r1, [pc, #72] ; (802cbd8 ) 802cb8e: f7fd fb69 bl 802a264 } if(res == -1) 802cb92: b276 sxtb r6, r6 802cb94: 1c73 adds r3, r6, #1 802cb96: d103 bne.n 802cba0 strcat(bufOut, "Тест не удалось запустить!"); 802cb98: 4910 ldr r1, [pc, #64] ; (802cbdc ) 802cb9a: 4620 mov r0, r4 802cb9c: f7f5 f9a2 bl 8021ee4 *lenBufOut = strlen(bufOut); 802cba0: 4620 mov r0, r4 802cba2: f7f5 fb11 bl 80221c8 802cba6: 8028 strh r0, [r5, #0] } } 802cba8: b00d add sp, #52 ; 0x34 802cbaa: bdf0 pop {r4, r5, r6, r7, pc} 802cbac: 08041928 .word 0x08041928 802cbb0: 0803ff71 .word 0x0803ff71 802cbb4: 080400b6 .word 0x080400b6 802cbb8: 080400bb .word 0x080400bb 802cbbc: 0803ff7e .word 0x0803ff7e 802cbc0: 080400da .word 0x080400da 802cbc4: 0804010d .word 0x0804010d 802cbc8: 0804018d .word 0x0804018d 802cbcc: 0804025e .word 0x0804025e 802cbd0: 20000b8c .word 0x20000b8c 802cbd4: 08040117 .word 0x08040117 802cbd8: 08040130 .word 0x08040130 802cbdc: 0804015c .word 0x0804015c 0802cbe0 : /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802cbe0: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802cbe2: 2400 movs r4, #0 /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802cbe4: b0bb sub sp, #236 ; 0xec 802cbe6: 4605 mov r5, r0 char value[110]; char str[110]; // ClearParamString(buf); memset(value, 0, len); 802cbe8: 4621 mov r1, r4 802cbea: 226e movs r2, #110 ; 0x6e 802cbec: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802cbee: f88d 4007 strb.w r4, [sp, #7] char value[110]; char str[110]; // ClearParamString(buf); memset(value, 0, len); 802cbf2: f7f5 f911 bl 8021e18 /* Владелец */ GetParamValue(buf, "owner=", value, &valueLen); 802cbf6: f10d 0307 add.w r3, sp, #7 802cbfa: aa02 add r2, sp, #8 802cbfc: 4628 mov r0, r5 802cbfe: 491e ldr r1, [pc, #120] ; (802cc78 ) 802cc00: f7ff fe0c bl 802c81c url_decode(str, sizeof(str), value); 802cc04: 216e movs r1, #110 ; 0x6e 802cc06: aa02 add r2, sp, #8 802cc08: a81e add r0, sp, #120 ; 0x78 802cc0a: f7fc fea1 bl 8029950 SetOwner(str); 802cc0e: a81e add r0, sp, #120 ; 0x78 802cc10: f7fb fd58 bl 80286c4 memset(value, 0, len); 802cc14: 4621 mov r1, r4 802cc16: 226e movs r2, #110 ; 0x6e 802cc18: a802 add r0, sp, #8 802cc1a: f7f5 f8fd bl 8021e18 /* Владелец */ GetParamValue(buf, "sysLocation=", value, &valueLen); 802cc1e: f10d 0307 add.w r3, sp, #7 802cc22: aa02 add r2, sp, #8 802cc24: 4628 mov r0, r5 802cc26: 4915 ldr r1, [pc, #84] ; (802cc7c ) 802cc28: f7ff fdf8 bl 802c81c url_decode(str, sizeof(str), value); 802cc2c: 216e movs r1, #110 ; 0x6e 802cc2e: aa02 add r2, sp, #8 802cc30: a81e add r0, sp, #120 ; 0x78 802cc32: f7fc fe8d bl 8029950 SetLocation(str); 802cc36: a81e add r0, sp, #120 ; 0x78 802cc38: f7fb fd54 bl 80286e4 memset(value, 0, len); 802cc3c: 4621 mov r1, r4 802cc3e: 226e movs r2, #110 ; 0x6e 802cc40: a802 add r0, sp, #8 802cc42: f7f5 f8e9 bl 8021e18 /* Комментарий */ GetParamValue(buf, "comment=", value, &valueLen); 802cc46: f10d 0307 add.w r3, sp, #7 802cc4a: aa02 add r2, sp, #8 802cc4c: 4628 mov r0, r5 802cc4e: 490c ldr r1, [pc, #48] ; (802cc80 ) 802cc50: f7ff fde4 bl 802c81c url_decode(str, sizeof(str), value); 802cc54: 216e movs r1, #110 ; 0x6e 802cc56: aa02 add r2, sp, #8 802cc58: a81e add r0, sp, #120 ; 0x78 802cc5a: f7fc fe79 bl 8029950 SetComment(str); 802cc5e: a81e add r0, sp, #120 ; 0x78 802cc60: f7fb fd4e bl 8028700 memset(value, 0, len); 802cc64: 4621 mov r1, r4 802cc66: 226e movs r2, #110 ; 0x6e 802cc68: a802 add r0, sp, #8 802cc6a: f7f5 f8d5 bl 8021e18 HTTP_SaveSettings(); 802cc6e: f001 fdfb bl 802e868 } 802cc72: b03b add sp, #236 ; 0xec 802cc74: bd30 pop {r4, r5, pc} 802cc76: bf00 nop 802cc78: 08040192 .word 0x08040192 802cc7c: 08040199 .word 0x08040199 802cc80: 080401a6 .word 0x080401a6 0802cc84 : /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802cc84: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802cc86: 2500 movs r5, #0 /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802cc88: b0a3 sub sp, #140 ; 0x8c 802cc8a: 4604 mov r4, r0 //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802cc8c: 2240 movs r2, #64 ; 0x40 802cc8e: 4629 mov r1, r5 802cc90: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802cc92: f88d 5007 strb.w r5, [sp, #7] //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802cc96: f7f5 f8bf bl 8021e18 memset(str, 0, MAX_WEB_PARAM_LEN); 802cc9a: 2240 movs r2, #64 ; 0x40 802cc9c: 4629 mov r1, r5 802cc9e: a812 add r0, sp, #72 ; 0x48 802cca0: f7f5 f8ba bl 8021e18 /* SNMP */ GetParamValue(buf, "read_community=", value, &valueLen); 802cca4: f10d 0307 add.w r3, sp, #7 802cca8: 49b5 ldr r1, [pc, #724] ; (802cf80 ) 802ccaa: aa02 add r2, sp, #8 802ccac: 4620 mov r0, r4 802ccae: f7ff fdb5 bl 802c81c SetReadCommunity(value); 802ccb2: a802 add r0, sp, #8 802ccb4: f7fb fcb4 bl 8028620 memset(value, 0, len); 802ccb8: 2240 movs r2, #64 ; 0x40 802ccba: 4629 mov r1, r5 802ccbc: a802 add r0, sp, #8 802ccbe: f7f5 f8ab bl 8021e18 GetParamValue(buf, "write_community=", value, &valueLen); 802ccc2: f10d 0307 add.w r3, sp, #7 802ccc6: 49af ldr r1, [pc, #700] ; (802cf84 ) 802ccc8: aa02 add r2, sp, #8 802ccca: 4620 mov r0, r4 802cccc: f7ff fda6 bl 802c81c SetWriteCommunity(value); 802ccd0: a802 add r0, sp, #8 802ccd2: f7fb fcab bl 802862c memset(value, 0, len); 802ccd6: 2240 movs r2, #64 ; 0x40 802ccd8: 4629 mov r1, r5 802ccda: a802 add r0, sp, #8 802ccdc: f7f5 f89c bl 8021e18 GetParamValue(buf, "managerIP=", value, &valueLen); 802cce0: f10d 0307 add.w r3, sp, #7 802cce4: 49a8 ldr r1, [pc, #672] ; (802cf88 ) 802cce6: aa02 add r2, sp, #8 802cce8: 4620 mov r0, r4 802ccea: f7ff fd97 bl 802c81c SetManagerIp(value); 802ccee: a802 add r0, sp, #8 802ccf0: f7fb fca2 bl 8028638 memset(value, 0, len); 802ccf4: 2240 movs r2, #64 ; 0x40 802ccf6: 4629 mov r1, r5 802ccf8: a802 add r0, sp, #8 802ccfa: f7f5 f88d bl 8021e18 GetParamValue(buf, "managerIP2=", value, &valueLen); 802ccfe: f10d 0307 add.w r3, sp, #7 802cd02: 49a2 ldr r1, [pc, #648] ; (802cf8c ) 802cd04: aa02 add r2, sp, #8 802cd06: 4620 mov r0, r4 802cd08: f7ff fd88 bl 802c81c SetManagerIp2(value); 802cd0c: a802 add r0, sp, #8 802cd0e: f7fb fca1 bl 8028654 memset(value, 0, len); 802cd12: 2240 movs r2, #64 ; 0x40 802cd14: 4629 mov r1, r5 802cd16: a802 add r0, sp, #8 802cd18: f7f5 f87e bl 8021e18 GetParamValue(buf, "managerIP3=", value, &valueLen); 802cd1c: f10d 0307 add.w r3, sp, #7 802cd20: 499b ldr r1, [pc, #620] ; (802cf90 ) 802cd22: aa02 add r2, sp, #8 802cd24: 4620 mov r0, r4 802cd26: f7ff fd79 bl 802c81c SetManagerIp3(value); 802cd2a: a802 add r0, sp, #8 802cd2c: f7fb fca0 bl 8028670 memset(value, 0, len); 802cd30: 2240 movs r2, #64 ; 0x40 802cd32: 4629 mov r1, r5 802cd34: a802 add r0, sp, #8 802cd36: f7f5 f86f bl 8021e18 GetParamValue(buf, "managerIP4=", value, &valueLen); 802cd3a: f10d 0307 add.w r3, sp, #7 802cd3e: 4995 ldr r1, [pc, #596] ; (802cf94 ) 802cd40: aa02 add r2, sp, #8 802cd42: 4620 mov r0, r4 802cd44: f7ff fd6a bl 802c81c SetManagerIp4(value); 802cd48: a802 add r0, sp, #8 802cd4a: f7fb fc9f bl 802868c memset(value, 0, len); 802cd4e: 2240 movs r2, #64 ; 0x40 802cd50: 4629 mov r1, r5 802cd52: a802 add r0, sp, #8 802cd54: f7f5 f860 bl 8021e18 GetParamValue(buf, "managerIP5=", value, &valueLen); 802cd58: f10d 0307 add.w r3, sp, #7 802cd5c: 498e ldr r1, [pc, #568] ; (802cf98 ) 802cd5e: aa02 add r2, sp, #8 802cd60: 4620 mov r0, r4 802cd62: f7ff fd5b bl 802c81c SetManagerIp5(value); 802cd66: a802 add r0, sp, #8 802cd68: f7fb fc9e bl 80286a8 memset(value, 0, len); 802cd6c: 2240 movs r2, #64 ; 0x40 802cd6e: 4629 mov r1, r5 802cd70: a802 add r0, sp, #8 802cd72: f7f5 f851 bl 8021e18 /* Сетевые параметры */ GetParamValue(buf, "dhcp=", value, &valueLen); 802cd76: 4989 ldr r1, [pc, #548] ; (802cf9c ) 802cd78: aa02 add r2, sp, #8 802cd7a: f10d 0307 add.w r3, sp, #7 802cd7e: 4620 mov r0, r4 802cd80: f7ff fd4c bl 802c81c SetDhcpStateStr(value); 802cd84: a802 add r0, sp, #8 802cd86: f7fb fc39 bl 80285fc if (strncmp(value, "on", 2) != 0) // Если dhcp off устанавливаем параметры 802cd8a: a802 add r0, sp, #8 802cd8c: 4984 ldr r1, [pc, #528] ; (802cfa0 ) 802cd8e: 2202 movs r2, #2 802cd90: f7f5 fa7c bl 802228c 802cd94: 2800 cmp r0, #0 802cd96: d031 beq.n 802cdfc { memset(value, 0, len); 802cd98: 4629 mov r1, r5 802cd9a: 2240 movs r2, #64 ; 0x40 802cd9c: a802 add r0, sp, #8 802cd9e: f7f5 f83b bl 8021e18 GetParamValue(buf, "ipaddr=", value, &valueLen); 802cda2: f10d 0307 add.w r3, sp, #7 802cda6: 497f ldr r1, [pc, #508] ; (802cfa4 ) 802cda8: aa02 add r2, sp, #8 802cdaa: 4620 mov r0, r4 802cdac: f7ff fd36 bl 802c81c SetIPStr(value); 802cdb0: a802 add r0, sp, #8 802cdb2: f7fb fc11 bl 80285d8 memset(value, 0, len); 802cdb6: 4629 mov r1, r5 802cdb8: 2240 movs r2, #64 ; 0x40 802cdba: a802 add r0, sp, #8 802cdbc: f7f5 f82c bl 8021e18 GetParamValue(buf, "gw=", value, &valueLen); 802cdc0: f10d 0307 add.w r3, sp, #7 802cdc4: 4978 ldr r1, [pc, #480] ; (802cfa8 ) 802cdc6: aa02 add r2, sp, #8 802cdc8: 4620 mov r0, r4 802cdca: f7ff fd27 bl 802c81c SetGatewayStr(value); 802cdce: a802 add r0, sp, #8 802cdd0: f7fb fc08 bl 80285e4 memset(value, 0, len); 802cdd4: 4629 mov r1, r5 802cdd6: 2240 movs r2, #64 ; 0x40 802cdd8: a802 add r0, sp, #8 802cdda: f7f5 f81d bl 8021e18 GetParamValue(buf, "mask=", value, &valueLen); 802cdde: 4973 ldr r1, [pc, #460] ; (802cfac ) 802cde0: aa02 add r2, sp, #8 802cde2: f10d 0307 add.w r3, sp, #7 802cde6: 4620 mov r0, r4 802cde8: f7ff fd18 bl 802c81c SetMaskStr(value); 802cdec: a802 add r0, sp, #8 802cdee: f7fb fbff bl 80285f0 memset(value, 0, len); 802cdf2: a802 add r0, sp, #8 802cdf4: 4629 mov r1, r5 802cdf6: 2240 movs r2, #64 ; 0x40 802cdf8: f7f5 f80e bl 8021e18 } memset(value, 0, len); 802cdfc: 2100 movs r1, #0 802cdfe: 2240 movs r2, #64 ; 0x40 802ce00: a802 add r0, sp, #8 802ce02: f7f5 f809 bl 8021e18 GetParamValue(buf, "swauth=", value, &valueLen); 802ce06: 496a ldr r1, [pc, #424] ; (802cfb0 ) 802ce08: aa02 add r2, sp, #8 802ce0a: f10d 0307 add.w r3, sp, #7 802ce0e: 4620 mov r0, r4 802ce10: f7ff fd04 bl 802c81c SetAuthEnableStateStr(value); 802ce14: a802 add r0, sp, #8 802ce16: f7fb fcab bl 8028770 if (strncmp(value, "on", 2) == 0){ 802ce1a: 4961 ldr r1, [pc, #388] ; (802cfa0 ) 802ce1c: a802 add r0, sp, #8 802ce1e: 2202 movs r2, #2 802ce20: f7f5 fa34 bl 802228c 802ce24: 4601 mov r1, r0 802ce26: 2800 cmp r0, #0 802ce28: d156 bne.n 802ced8 /* параметры RADIUS*/ memset(value, 0, len); 802ce2a: 2240 movs r2, #64 ; 0x40 802ce2c: a802 add r0, sp, #8 802ce2e: f7f4 fff3 bl 8021e18 GetParamValue(buf, "rs_enabled=", value, &valueLen); 802ce32: 4960 ldr r1, [pc, #384] ; (802cfb4 ) 802ce34: aa02 add r2, sp, #8 802ce36: f10d 0307 add.w r3, sp, #7 802ce3a: 4620 mov r0, r4 802ce3c: f7ff fcee bl 802c81c SetRDSEnableStateStr(value); 802ce40: a802 add r0, sp, #8 802ce42: f7fb fc83 bl 802874c if (strncmp(value, "on", 2) == 0) // Если raddius off устанавливаем параметры 802ce46: a802 add r0, sp, #8 802ce48: 4955 ldr r1, [pc, #340] ; (802cfa0 ) 802ce4a: 2202 movs r2, #2 802ce4c: f7f5 fa1e bl 802228c 802ce50: 4605 mov r5, r0 802ce52: 2800 cmp r0, #0 802ce54: d140 bne.n 802ced8 { memset(value, 0, len); 802ce56: 4629 mov r1, r5 802ce58: 2240 movs r2, #64 ; 0x40 802ce5a: a802 add r0, sp, #8 802ce5c: f7f4 ffdc bl 8021e18 GetParamValue(buf, "rs_server=", value, &valueLen); 802ce60: f10d 0307 add.w r3, sp, #7 802ce64: 4954 ldr r1, [pc, #336] ; (802cfb8 ) 802ce66: aa02 add r2, sp, #8 802ce68: 4620 mov r0, r4 802ce6a: f7ff fcd7 bl 802c81c SetRDSIpStr(value); 802ce6e: a802 add r0, sp, #8 802ce70: f7fb fc4c bl 802870c memset(value, 0, len); 802ce74: 4629 mov r1, r5 802ce76: 2240 movs r2, #64 ; 0x40 802ce78: a802 add r0, sp, #8 802ce7a: f7f4 ffcd bl 8021e18 GetParamValue(buf, "rs_port=", value, &valueLen); 802ce7e: f10d 0307 add.w r3, sp, #7 802ce82: 494e ldr r1, [pc, #312] ; (802cfbc ) 802ce84: aa02 add r2, sp, #8 802ce86: 4620 mov r0, r4 802ce88: f7ff fcc8 bl 802c81c SetRDSPortStr(value); 802ce8c: a802 add r0, sp, #8 802ce8e: f7fb fc43 bl 8028718 memset(value, 0, len); 802ce92: 4629 mov r1, r5 802ce94: 2240 movs r2, #64 ; 0x40 802ce96: a802 add r0, sp, #8 802ce98: f7f4 ffbe bl 8021e18 GetParamValue(buf, "rs_pwd=", value, &valueLen); 802ce9c: f10d 0307 add.w r3, sp, #7 802cea0: 4947 ldr r1, [pc, #284] ; (802cfc0 ) 802cea2: aa02 add r2, sp, #8 802cea4: 4620 mov r0, r4 802cea6: f7ff fcb9 bl 802c81c SetRDSPasswordkStr(value); 802ceaa: a802 add r0, sp, #8 802ceac: f7fb fc48 bl 8028740 memset(value, 0, len); 802ceb0: 4629 mov r1, r5 802ceb2: 2240 movs r2, #64 ; 0x40 802ceb4: a802 add r0, sp, #8 802ceb6: f7f4 ffaf bl 8021e18 GetParamValue(buf, "rs_key=", value, &valueLen); 802ceba: 4942 ldr r1, [pc, #264] ; (802cfc4 ) 802cebc: aa02 add r2, sp, #8 802cebe: f10d 0307 add.w r3, sp, #7 802cec2: 4620 mov r0, r4 802cec4: f7ff fcaa bl 802c81c SetRDSKeyAccesstStr(value); 802cec8: a802 add r0, sp, #8 802ceca: f7fb fc2f bl 802872c memset(value, 0, len); 802cece: a802 add r0, sp, #8 802ced0: 4629 mov r1, r5 802ced2: 2240 movs r2, #64 ; 0x40 802ced4: f7f4 ffa0 bl 8021e18 } } memset(value, 0, len); 802ced8: 2100 movs r1, #0 802ceda: 2240 movs r2, #64 ; 0x40 802cedc: a802 add r0, sp, #8 802cede: f7f4 ff9b bl 8021e18 // Параметры реле и сухих контактов GetParamValue(buf, "di1=", value, &valueLen); 802cee2: f10d 0307 add.w r3, sp, #7 802cee6: aa02 add r2, sp, #8 802cee8: 4937 ldr r1, [pc, #220] ; (802cfc8 ) 802ceea: 4620 mov r0, r4 802ceec: f7ff fc96 bl 802c81c SetDINTypeActStr(value, 0); 802cef0: a802 add r0, sp, #8 802cef2: 2100 movs r1, #0 802cef4: f7fb fd32 bl 802895c memset(value, 0, len); 802cef8: 2100 movs r1, #0 802cefa: 2240 movs r2, #64 ; 0x40 802cefc: a802 add r0, sp, #8 802cefe: f7f4 ff8b bl 8021e18 GetParamValue(buf, "ro1=", value, &valueLen); 802cf02: f10d 0307 add.w r3, sp, #7 802cf06: aa02 add r2, sp, #8 802cf08: 4930 ldr r1, [pc, #192] ; (802cfcc ) 802cf0a: 4620 mov r0, r4 802cf0c: f7ff fc86 bl 802c81c SetROTypeActStr(value, 0); 802cf10: a802 add r0, sp, #8 802cf12: 2100 movs r1, #0 802cf14: f7fb fd40 bl 8028998 memset(value, 0, len); 802cf18: 2100 movs r1, #0 802cf1a: 2240 movs r2, #64 ; 0x40 802cf1c: a802 add r0, sp, #8 802cf1e: f7f4 ff7b bl 8021e18 GetParamValue(buf, "ro2=", value, &valueLen); 802cf22: f10d 0307 add.w r3, sp, #7 802cf26: aa02 add r2, sp, #8 802cf28: 4929 ldr r1, [pc, #164] ; (802cfd0 ) 802cf2a: 4620 mov r0, r4 802cf2c: f7ff fc76 bl 802c81c SetROTypeActStr(value, 1); 802cf30: a802 add r0, sp, #8 802cf32: 2101 movs r1, #1 802cf34: f7fb fd30 bl 8028998 memset(value, 0, len); 802cf38: 2100 movs r1, #0 802cf3a: 2240 movs r2, #64 ; 0x40 802cf3c: a802 add r0, sp, #8 802cf3e: f7f4 ff6b bl 8021e18 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); 802cf42: 4924 ldr r1, [pc, #144] ; (802cfd4 ) 802cf44: aa02 add r2, sp, #8 802cf46: f10d 0307 add.w r3, sp, #7 802cf4a: 4620 mov r0, r4 802cf4c: f7ff fc66 bl 802c81c SetSntpStateStr(value); 802cf50: a802 add r0, sp, #8 802cf52: f7fb fc87 bl 8028864 if (strncmp(value, "1", 1) == 0) // Если ntp on устанавливаем параметры 802cf56: a802 add r0, sp, #8 802cf58: 491f ldr r1, [pc, #124] ; (802cfd8 ) 802cf5a: 2201 movs r2, #1 802cf5c: f7f5 f996 bl 802228c 802cf60: 4605 mov r5, r0 { memset(value, 0, len); 802cf62: a802 add r0, sp, #8 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); SetSntpStateStr(value); if (strncmp(value, "1", 1) == 0) // Если ntp on устанавливаем параметры 802cf64: 2d00 cmp r5, #0 802cf66: d13f bne.n 802cfe8 { memset(value, 0, len); 802cf68: 4629 mov r1, r5 802cf6a: 2240 movs r2, #64 ; 0x40 802cf6c: f7f4 ff54 bl 8021e18 GetParamValue(buf, "ntpservip=", value, &valueLen); 802cf70: 4620 mov r0, r4 802cf72: 491a ldr r1, [pc, #104] ; (802cfdc ) 802cf74: aa02 add r2, sp, #8 802cf76: f10d 0307 add.w r3, sp, #7 802cf7a: f7ff fc4f bl 802c81c 802cf7e: e02f b.n 802cfe0 802cf80: 080401af .word 0x080401af 802cf84: 080401bf .word 0x080401bf 802cf88: 080401d0 .word 0x080401d0 802cf8c: 080401db .word 0x080401db 802cf90: 080401e7 .word 0x080401e7 802cf94: 080401f3 .word 0x080401f3 802cf98: 080401ff .word 0x080401ff 802cf9c: 0804020b .word 0x0804020b 802cfa0: 080391b1 .word 0x080391b1 802cfa4: 08040211 .word 0x08040211 802cfa8: 08040219 .word 0x08040219 802cfac: 0804021d .word 0x0804021d 802cfb0: 08040223 .word 0x08040223 802cfb4: 0804022b .word 0x0804022b 802cfb8: 08040237 .word 0x08040237 802cfbc: 08040242 .word 0x08040242 802cfc0: 0804024b .word 0x0804024b 802cfc4: 08040253 .word 0x08040253 802cfc8: 0804025b .word 0x0804025b 802cfcc: 08040260 .word 0x08040260 802cfd0: 08040265 .word 0x08040265 802cfd4: 0804026a .word 0x0804026a 802cfd8: 080394a7 .word 0x080394a7 802cfdc: 0804026f .word 0x0804026f SetSntpServerIpStr(value); 802cfe0: a802 add r0, sp, #8 802cfe2: f7fb fc5f bl 80288a4 802cfe6: e023 b.n 802d030 memset(value, 0, len); } else if (strncmp(value, "0", 1) == 0){ 802cfe8: 4924 ldr r1, [pc, #144] ; (802d07c ) 802cfea: 2201 movs r2, #1 802cfec: f7f5 f94e bl 802228c 802cff0: 4605 mov r5, r0 802cff2: bb10 cbnz r0, 802d03a GetParamValue(buf, "date=", value, &valueLen); 802cff4: f10d 0307 add.w r3, sp, #7 802cff8: 4921 ldr r1, [pc, #132] ; (802d080 ) 802cffa: aa02 add r2, sp, #8 802cffc: 4620 mov r0, r4 802cffe: f7ff fc0d bl 802c81c SetDateStr(value); 802d002: a802 add r0, sp, #8 802d004: f7fb fbc6 bl 8028794 memset(value, 0, len); 802d008: 4629 mov r1, r5 802d00a: 2240 movs r2, #64 ; 0x40 802d00c: a802 add r0, sp, #8 802d00e: f7f4 ff03 bl 8021e18 GetParamValue(buf, "time=", value, &valueLen); 802d012: 491c ldr r1, [pc, #112] ; (802d084 ) 802d014: aa02 add r2, sp, #8 802d016: f10d 0307 add.w r3, sp, #7 802d01a: 4620 mov r0, r4 802d01c: f7ff fbfe bl 802c81c url_decode(str, sizeof(str), value); 802d020: a812 add r0, sp, #72 ; 0x48 802d022: 2140 movs r1, #64 ; 0x40 802d024: aa02 add r2, sp, #8 802d026: f7fc fc93 bl 8029950 SetTimeStr(str); 802d02a: a812 add r0, sp, #72 ; 0x48 802d02c: f7fb fbea bl 8028804 memset(value, 0, len); 802d030: a802 add r0, sp, #8 802d032: 4629 mov r1, r5 802d034: 2240 movs r2, #64 ; 0x40 802d036: f7f4 feef bl 8021e18 } GetParamValue(buf, "utc=", value, &valueLen); 802d03a: 4913 ldr r1, [pc, #76] ; (802d088 ) 802d03c: aa02 add r2, sp, #8 802d03e: f10d 0307 add.w r3, sp, #7 802d042: 4620 mov r0, r4 802d044: f7ff fbea bl 802c81c SetSntpTimeZoneStr(value); 802d048: a802 add r0, sp, #8 802d04a: f7fb fc31 bl 80288b0 memset(value, 0, len); 802d04e: 2100 movs r1, #0 802d050: 2240 movs r2, #64 ; 0x40 802d052: a802 add r0, sp, #8 802d054: f7f4 fee0 bl 8021e18 /* Если параметры WEB изменились выставляем флаг, сохраняем настройки и перезагружаемся */ if (GetStateWebReinit() == true) 802d058: f00a fc74 bl 8037944 802d05c: b150 cbz r0, 802d074 { SetWebReinitFlag(true); 802d05e: 2001 movs r0, #1 802d060: f7fb faae bl 80285c0 HTTP_SaveSettings(); 802d064: f001 fc00 bl 802e868 /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802d068: f240 30f2 movw r0, #1010 ; 0x3f2 802d06c: f7fe fd20 bl 802bab0 Reboot(); 802d070: f7fc fbfe bl 8029870 } HTTP_SaveSettings(); 802d074: f001 fbf8 bl 802e868 } 802d078: b023 add sp, #140 ; 0x8c 802d07a: bd30 pop {r4, r5, pc} 802d07c: 0803921b .word 0x0803921b 802d080: 0804028d .word 0x0804028d 802d084: 0804027a .word 0x0804027a 802d088: 08040280 .word 0x08040280 0802d08c : /** * @brief * @retval None */ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802d08c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802d090: 4690 mov r8, r2 802d092: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802d094: f7f5 fb18 bl 80226c8 if (strPtr != 0) 802d098: 4605 mov r5, r0 802d09a: b1e0 cbz r0, 802d0d6 { beginValue = strpbrk(strPtr,"="); 802d09c: 490f ldr r1, [pc, #60] ; (802d0dc ) 802d09e: f7f5 f97d bl 802239c endValue = strpbrk(strPtr,";"); 802d0a2: 490f ldr r1, [pc, #60] ; (802d0e0 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802d0a4: 4606 mov r6, r0 endValue = strpbrk(strPtr,";"); 802d0a6: 4628 mov r0, r5 802d0a8: f7f5 f978 bl 802239c if (endValue == 0) 802d0ac: 4604 mov r4, r0 802d0ae: b920 cbnz r0, 802d0ba endValue = strpbrk(strPtr,"\n"); 802d0b0: 4628 mov r0, r5 802d0b2: 490c ldr r1, [pc, #48] ; (802d0e4 ) 802d0b4: f7f5 f972 bl 802239c 802d0b8: 4604 mov r4, r0 len = endValue - beginValue - 1; 802d0ba: 1ba5 subs r5, r4, r6 802d0bc: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802d0be: 4640 mov r0, r8 802d0c0: 1c71 adds r1, r6, #1 802d0c2: 462a mov r2, r5 802d0c4: f7f5 f938 bl 8022338 *endValue = '0'; 802d0c8: 2330 movs r3, #48 ; 0x30 802d0ca: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802d0cc: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr,"\n"); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802d0ce: 7033 strb r3, [r6, #0] *paramLen = len; 802d0d0: 703d strb r5, [r7, #0] return 1; 802d0d2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802d0d6: 7038 strb r0, [r7, #0] return 0; } } 802d0d8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802d0dc: 0804025e .word 0x0804025e 802d0e0: 08039372 .word 0x08039372 802d0e4: 080405c0 .word 0x080405c0 0802d0e8 : } } */ void ClearParamString(char *inBuf) { 802d0e8: b510 push {r4, lr} uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802d0ea: 4908 ldr r1, [pc, #32] ; (802d10c ) } } */ void ClearParamString(char *inBuf) { 802d0ec: 4604 mov r4, r0 uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802d0ee: f7f5 faeb bl 80226c8 if (str != 0) 802d0f2: b148 cbz r0, 802d108 { len = str - inBuf; 802d0f4: 1b02 subs r2, r0, r4 memset(str, 0, RECIVE_BUF_MAX_LEN - len - 1); 802d0f6: b292 uxth r2, r2 802d0f8: f5c2 62bb rsb r2, r2, #1496 ; 0x5d8 802d0fc: 2100 movs r1, #0 802d0fe: 3203 adds r2, #3 } } 802d100: e8bd 4010 ldmia.w sp!, {r4, lr} str = strstr(inBuf, "HTTP"); if (str != 0) { len = str - inBuf; memset(str, 0, RECIVE_BUF_MAX_LEN - len - 1); 802d104: f7f4 be88 b.w 8021e18 802d108: bd10 pop {r4, pc} 802d10a: bf00 nop 802d10c: 08040285 .word 0x08040285 0802d110 : /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d110: b5f0 push {r4, r5, r6, r7, lr} uint8_t valueLen = 0; 802d112: 2500 movs r5, #0 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d114: b087 sub sp, #28 802d116: 4606 mov r6, r0 802d118: 460c mov r4, r1 uint8_t valueLen = 0; char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802d11a: f44f 62fa mov.w r2, #2000 ; 0x7d0 802d11e: 4608 mov r0, r1 802d120: 4629 mov r1, r5 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d122: 461f mov r7, r3 uint8_t valueLen = 0; 802d124: f88d 5003 strb.w r5, [sp, #3] char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802d128: f7f4 fe76 bl 8021e18 ClearParamString(bufIn); 802d12c: 4630 mov r0, r6 802d12e: f7ff ffdb bl 802d0e8 memset(value, 0, 20); 802d132: 4629 mov r1, r5 802d134: 2214 movs r2, #20 802d136: a801 add r0, sp, #4 802d138: f7f4 fe6e bl 8021e18 GetParamValue(bufIn, "prodate=", value, &valueLen); 802d13c: aa01 add r2, sp, #4 802d13e: f10d 0303 add.w r3, sp, #3 802d142: 490b ldr r1, [pc, #44] ; (802d170 ) 802d144: 4630 mov r0, r6 802d146: f7ff fb69 bl 802c81c printf(value); printf("\r\n"); */ /* Устанавливаем дату производства */ SETTINGS_SetProDate(value, valueLen); 802d14a: f89d 1003 ldrb.w r1, [sp, #3] 802d14e: a801 add r0, sp, #4 802d150: f7fb fea0 bl 8028e94 /* Устанавливаем дату следующей профилактики +1 год */ RTC_SetProfTime(value); 802d154: a801 add r0, sp, #4 802d156: f7f9 fcd3 bl 8026b00 /* Пока отправляем true */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\nTrue"); 802d15a: 4906 ldr r1, [pc, #24] ; (802d174 ) 802d15c: 4620 mov r0, r4 802d15e: f7f4 ffd5 bl 802210c *lenBufOut = strlen(bufOut); 802d162: 4620 mov r0, r4 802d164: f7f5 f830 bl 80221c8 802d168: 8038 strh r0, [r7, #0] // TEST_SetServerFlag(); } 802d16a: b007 add sp, #28 802d16c: bdf0 pop {r4, r5, r6, r7, pc} 802d16e: bf00 nop 802d170: 0804028a .word 0x0804028a 802d174: 08040293 .word 0x08040293 0802d178 : } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d178: b5f0 push {r4, r5, r6, r7, lr} uint8_t i, valueLen = 0; 802d17a: 2500 movs r5, #0 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d17c: b087 sub sp, #28 802d17e: 4607 mov r7, r0 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802d180: f44f 727a mov.w r2, #1000 ; 0x3e8 802d184: 4608 mov r0, r1 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d186: 460c mov r4, r1 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802d188: 4629 mov r1, r5 } } } int HTTP_UpsHistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d18a: 461e mov r6, r3 uint8_t i, valueLen = 0; 802d18c: f88d 5003 strb.w r5, [sp, #3] char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802d190: f7f4 fe42 bl 8021e18 ClearParamString(bufIn); 802d194: 4638 mov r0, r7 802d196: f7ff ffa7 bl 802d0e8 memset(value, 0, 20); 802d19a: 4629 mov r1, r5 802d19c: 2214 movs r2, #20 802d19e: a801 add r0, sp, #4 802d1a0: f7f4 fe3a bl 8021e18 GetParamValue(bufIn, "page=", value, &valueLen); 802d1a4: 491d ldr r1, [pc, #116] ; (802d21c ) 802d1a6: 4638 mov r0, r7 802d1a8: aa01 add r2, sp, #4 802d1aa: f10d 0303 add.w r3, sp, #3 802d1ae: f7ff fb35 bl 802c81c if (strcmp(value, "all") == 0) 802d1b2: a801 add r0, sp, #4 802d1b4: 491a ldr r1, [pc, #104] ; (802d220 ) 802d1b6: f7f4 febb bl 8021f30 802d1ba: b9e8 cbnz r0, 802d1f8 { if (!LOG_IsInit()) { 802d1bc: f7fd f898 bl 802a2f0 802d1c0: b908 cbnz r0, 802d1c6 return SEND_REQUIRED_NO; 802d1c2: 2001 movs r0, #1 802d1c4: e028 b.n 802d218 } if (fLogTransInprog == false) { 802d1c6: 4d17 ldr r5, [pc, #92] ; (802d224 ) 802d1c8: 782b ldrb r3, [r5, #0] 802d1ca: 2b00 cmp r3, #0 802d1cc: d1f9 bne.n 802d1c2 // Send log as raw data log_ptr = 0; 802d1ce: 4a16 ldr r2, [pc, #88] ; (802d228 ) 802d1d0: 6013 str r3, [r2, #0] log_size = LOG_GetTotalSTRCount() * STRING_SIZE + sizeof(UTF8_BOM)-1; 802d1d2: f7fd f89f bl 802a314 802d1d6: 4b15 ldr r3, [pc, #84] ; (802d22c ) sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); 802d1d8: 4915 ldr r1, [pc, #84] ; (802d230 ) if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE + sizeof(UTF8_BOM)-1; 802d1da: 0180 lsls r0, r0, #6 802d1dc: 1cc2 adds r2, r0, #3 802d1de: 601a str r2, [r3, #0] sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); 802d1e0: 4620 mov r0, r4 802d1e2: 4b14 ldr r3, [pc, #80] ; (802d234 ) 802d1e4: f7fa fd80 bl 8027ce8 *lenBufOut = strlen(bufOut); 802d1e8: 4620 mov r0, r4 802d1ea: f7f4 ffed bl 80221c8 // Set file transfer in progress flag fLogTransInprog = true; 802d1ee: 2301 movs r3, #1 log_ptr = 0; log_size = LOG_GetTotalSTRCount() * STRING_SIZE + sizeof(UTF8_BOM)-1; sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); *lenBufOut = strlen(bufOut); 802d1f0: 8030 strh r0, [r6, #0] // Set file transfer in progress flag fLogTransInprog = true; 802d1f2: 702b strb r3, [r5, #0] return SEND_REQUIRED_FILE; 802d1f4: 2002 movs r0, #2 802d1f6: e00f b.n 802d218 // We send nothing if file transfer already in progress return SEND_REQUIRED_NO; } } else { if (!LOG_IsInit()) { 802d1f8: f7fd f87a bl 802a2f0 802d1fc: 2800 cmp r0, #0 802d1fe: d0e0 beq.n 802d1c2 return SEND_REQUIRED_NO; } else { HTTP_GetUpsHistoryPage(bufOut, atoi(value)); 802d200: a801 add r0, sp, #4 802d202: f7f4 fce9 bl 8021bd8 802d206: 4601 mov r1, r0 802d208: 4620 mov r0, r4 802d20a: f001 fab7 bl 802e77c *lenBufOut = strlen(bufOut); 802d20e: 4620 mov r0, r4 802d210: f7f4 ffda bl 80221c8 802d214: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802d216: 4628 mov r0, r5 } } } 802d218: b007 add sp, #28 802d21a: bdf0 pop {r4, r5, r6, r7, pc} 802d21c: 080402c3 .word 0x080402c3 802d220: 080402c9 .word 0x080402c9 802d224: 20000d6c .word 0x20000d6c 802d228: 20000d60 .word 0x20000d60 802d22c: 20000d78 .word 0x20000d78 802d230: 080402cd .word 0x080402cd 802d234: 0803b85c .word 0x0803b85c 0802d238 : */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d238: b5f0 push {r4, r5, r6, r7, lr} uint8_t i, valueLen = 0; 802d23a: 2500 movs r5, #0 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d23c: b087 sub sp, #28 802d23e: 4607 mov r7, r0 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802d240: f44f 727a mov.w r2, #1000 ; 0x3e8 802d244: 4608 mov r0, r1 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d246: 460c mov r4, r1 char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802d248: 4629 mov r1, r5 */ } } int HTTP_HistoryPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d24a: 461e mov r6, r3 uint8_t i, valueLen = 0; 802d24c: f88d 5003 strb.w r5, [sp, #3] char value[20]; uint32_t nbytes = 0; (void)lenBufIn; memset(bufOut, 0, FILE_BUF_MAX_LEN); 802d250: f7f4 fde2 bl 8021e18 ClearParamString(bufIn); 802d254: 4638 mov r0, r7 802d256: f7ff ff47 bl 802d0e8 memset(value, 0, 20); 802d25a: 4629 mov r1, r5 802d25c: 2214 movs r2, #20 802d25e: a801 add r0, sp, #4 802d260: f7f4 fdda bl 8021e18 GetParamValue(bufIn, "page=", value, &valueLen); 802d264: 491e ldr r1, [pc, #120] ; (802d2e0 ) 802d266: 4638 mov r0, r7 802d268: aa01 add r2, sp, #4 802d26a: f10d 0303 add.w r3, sp, #3 802d26e: f7ff fad5 bl 802c81c if (strcmp(value, "all") == 0) 802d272: a801 add r0, sp, #4 802d274: 491b ldr r1, [pc, #108] ; (802d2e4 ) 802d276: f7f4 fe5b bl 8021f30 802d27a: b9f0 cbnz r0, 802d2ba { if (!LOG_IsInit()) { 802d27c: f7fd f838 bl 802a2f0 802d280: b908 cbnz r0, 802d286 return SEND_REQUIRED_NO; 802d282: 2001 movs r0, #1 802d284: e029 b.n 802d2da } if (fLogTransInprog == false) { 802d286: 4d18 ldr r5, [pc, #96] ; (802d2e8 ) 802d288: 782b ldrb r3, [r5, #0] 802d28a: 2b00 cmp r3, #0 802d28c: d1f9 bne.n 802d282 // Send log as raw data log_ptr = 0; 802d28e: 4a17 ldr r2, [pc, #92] ; (802d2ec ) 802d290: 6013 str r3, [r2, #0] log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY + sizeof(UTF8_BOM)-1; 802d292: f7fd f92b bl 802a4ec 802d296: 2264 movs r2, #100 ; 0x64 802d298: 4350 muls r0, r2 802d29a: 4b15 ldr r3, [pc, #84] ; (802d2f0 ) sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); 802d29c: 4915 ldr r1, [pc, #84] ; (802d2f4 ) if (fLogTransInprog == false) { // Send log as raw data log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY + sizeof(UTF8_BOM)-1; 802d29e: 1cc2 adds r2, r0, #3 802d2a0: 601a str r2, [r3, #0] sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); 802d2a2: 4620 mov r0, r4 802d2a4: 4b14 ldr r3, [pc, #80] ; (802d2f8 ) 802d2a6: f7fa fd1f bl 8027ce8 *lenBufOut = strlen(bufOut); 802d2aa: 4620 mov r0, r4 802d2ac: f7f4 ff8c bl 80221c8 // Set file transfer in progress flag fLogTransInprog = true; 802d2b0: 2301 movs r3, #1 log_ptr = 0; log_size = History_GetTotalSTRCount() * STRING_SIZE_HISTORY + sizeof(UTF8_BOM)-1; sprintf(bufOut, "HTTP/1.1 200 OK\r\nContent-Length:%lu\r\n\r\n%s", log_size, UTF8_BOM); *lenBufOut = strlen(bufOut); 802d2b2: 8030 strh r0, [r6, #0] // Set file transfer in progress flag fLogTransInprog = true; 802d2b4: 702b strb r3, [r5, #0] return SEND_REQUIRED_FILE; 802d2b6: 2002 movs r0, #2 802d2b8: e00f b.n 802d2da // We send nothing if file transfer already in progress return SEND_REQUIRED_NO; } } else { if (!LOG_IsInit()) { 802d2ba: f7fd f819 bl 802a2f0 802d2be: 2800 cmp r0, #0 802d2c0: d0df beq.n 802d282 return SEND_REQUIRED_NO; } else { HTTP_GetHistoryPage(bufOut, atoi(value)); 802d2c2: a801 add r0, sp, #4 802d2c4: f7f4 fc88 bl 8021bd8 802d2c8: 4601 mov r1, r0 802d2ca: 4620 mov r0, r4 802d2cc: f001 f9f4 bl 802e6b8 *lenBufOut = strlen(bufOut); 802d2d0: 4620 mov r0, r4 802d2d2: f7f4 ff79 bl 80221c8 802d2d6: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; 802d2d8: 4628 mov r0, r5 } } } 802d2da: b007 add sp, #28 802d2dc: bdf0 pop {r4, r5, r6, r7, pc} 802d2de: bf00 nop 802d2e0: 080402c3 .word 0x080402c3 802d2e4: 080402c9 .word 0x080402c9 802d2e8: 20000d6c .word 0x20000d6c 802d2ec: 20000d60 .word 0x20000d60 802d2f0: 20000d78 .word 0x20000d78 802d2f4: 080402cd .word 0x080402cd 802d2f8: 0803b85c .word 0x0803b85c 0802d2fc : /** * @brief Смена пароля пользователя * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d2fc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802d300: b0b0 sub sp, #192 ; 0xc0 802d302: 4605 mov r5, r0 802d304: 460c mov r4, r1 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802d306: 2214 movs r2, #20 802d308: 2100 movs r1, #0 802d30a: a80a add r0, sp, #40 ; 0x28 /** * @brief Смена пароля пользователя * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802d30c: 461e mov r6, r3 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802d30e: f7f4 fd83 bl 8021e18 memset(password, 0, 20); 802d312: 2100 movs r1, #0 802d314: 2214 movs r2, #20 802d316: a80f add r0, sp, #60 ; 0x3c 802d318: f7f4 fd7e bl 8021e18 memset(tempStr, 0, 50); memset(value, 0, 20); 802d31c: af05 add r7, sp, #20 (void)lenBufIn; memset(login, 0, 20); memset(password, 0, 20); memset(tempStr, 0, 50); 802d31e: 2100 movs r1, #0 802d320: 2232 movs r2, #50 ; 0x32 802d322: a814 add r0, sp, #80 ; 0x50 802d324: f7f4 fd78 bl 8021e18 memset(value, 0, 20); 802d328: 2100 movs r1, #0 802d32a: 2214 movs r2, #20 802d32c: 4638 mov r0, r7 802d32e: f7f4 fd73 bl 8021e18 ClearParamString(bufIn); 802d332: 4628 mov r0, r5 802d334: f7ff fed8 bl 802d0e8 strncpy(tempStr, bufIn, 110); 802d338: 226e movs r2, #110 ; 0x6e 802d33a: 4629 mov r1, r5 802d33c: a814 add r0, sp, #80 ; 0x50 802d33e: f7f4 fffb bl 8022338 strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802d342: f10d 0806 add.w r8, sp, #6 ClearParamString(bufIn); strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); 802d346: 4933 ldr r1, [pc, #204] ; (802d414 ) 802d348: 4620 mov r0, r4 802d34a: f7f4 fedf bl 802210c if (GetParamValue(tempStr, "username=", login, &valueLen) && 802d34e: a814 add r0, sp, #80 ; 0x50 802d350: 4931 ldr r1, [pc, #196] ; (802d418 ) 802d352: aa0a add r2, sp, #40 ; 0x28 802d354: 4643 mov r3, r8 802d356: f7ff fa61 bl 802c81c 802d35a: 2800 cmp r0, #0 802d35c: d04e beq.n 802d3fc GetParamValue(tempStr, "oldpass=", password, &valueLen)) 802d35e: a814 add r0, sp, #80 ; 0x50 802d360: 492e ldr r1, [pc, #184] ; (802d41c ) 802d362: aa0f add r2, sp, #60 ; 0x3c 802d364: 4643 mov r3, r8 802d366: f7ff fa59 bl 802c81c strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802d36a: 2800 cmp r0, #0 802d36c: d046 beq.n 802d3fc 802d36e: 2500 movs r5, #0 GetParamValue(tempStr, "oldpass=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { memset(value, 0, 20); 802d370: 2100 movs r1, #0 802d372: 2214 movs r2, #20 802d374: 4638 mov r0, r7 802d376: f7f4 fd4f bl 8021e18 memset(WebLogin, 0, MAX_WEB_LOGIN_LEN); 802d37a: 2100 movs r1, #0 802d37c: 220b movs r2, #11 802d37e: a802 add r0, sp, #8 802d380: f7f4 fd4a bl 8021e18 GetUserLogin(user_id, WebLogin, &valueLen); 802d384: 4628 mov r0, r5 802d386: a902 add r1, sp, #8 802d388: 4642 mov r2, r8 802d38a: f7fa ff97 bl 80282bc GetUserPassword(user_id, value, &valueLen2); 802d38e: 4628 mov r0, r5 802d390: 4639 mov r1, r7 802d392: f10d 0207 add.w r2, sp, #7 802d396: f7fa ffa7 bl 80282e8 /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802d39a: a802 add r0, sp, #8 802d39c: a90a add r1, sp, #40 ; 0x28 802d39e: 220b movs r2, #11 802d3a0: f7f4 ff74 bl 802228c 802d3a4: bb18 cbnz r0, 802d3ee (memcmp(password, value, 11) == 0)) 802d3a6: 4639 mov r1, r7 802d3a8: a80f add r0, sp, #60 ; 0x3c 802d3aa: 220b movs r2, #11 802d3ac: f7f4 fc48 bl 8021c40 memset(value, 0, 20); memset(WebLogin, 0, MAX_WEB_LOGIN_LEN); GetUserLogin(user_id, WebLogin, &valueLen); GetUserPassword(user_id, value, &valueLen2); /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802d3b0: 4601 mov r1, r0 802d3b2: b9e0 cbnz r0, 802d3ee (memcmp(password, value, 11) == 0)) { memset(password, 0, 20); 802d3b4: 2214 movs r2, #20 802d3b6: a80f add r0, sp, #60 ; 0x3c 802d3b8: f7f4 fd2e bl 8021e18 if (GetParamValue(tempStr, "newpass=", password, &valueLen)) 802d3bc: a814 add r0, sp, #80 ; 0x50 802d3be: 4918 ldr r1, [pc, #96] ; (802d420 ) 802d3c0: aa0f add r2, sp, #60 ; 0x3c 802d3c2: 4643 mov r3, r8 802d3c4: f7ff fa2a bl 802c81c 802d3c8: b1c0 cbz r0, 802d3fc { memcpy(sSettings.sAuth[user_id].password, password, 11); 802d3ca: 4b16 ldr r3, [pc, #88] ; (802d424 ) 802d3cc: 2217 movs r2, #23 802d3ce: fb02 3005 mla r0, r2, r5, r3 802d3d2: a90f add r1, sp, #60 ; 0x3c 802d3d4: 220b movs r2, #11 802d3d6: 3005 adds r0, #5 802d3d8: f7f4 fc64 bl 8021ca4 HTTP_SaveSettings(); 802d3dc: f001 fa44 bl 802e868 log_event_data(LOG_PSW_CHANGE, "Администратор"); 802d3e0: 2003 movs r0, #3 802d3e2: 4911 ldr r1, [pc, #68] ; (802d428 ) 802d3e4: f7fc ff3e bl 802a264 strcat(bufOut, "Пароль успешно изменён"); 802d3e8: 4620 mov r0, r4 802d3ea: 4910 ldr r1, [pc, #64] ; (802d42c ) 802d3ec: e008 b.n 802d400 strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && GetParamValue(tempStr, "oldpass=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) 802d3ee: 3501 adds r5, #1 802d3f0: b2ed uxtb r5, r5 802d3f2: 2d02 cmp r5, #2 802d3f4: d1bc bne.n 802d370 *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } } } strcat(bufOut, "Введён неверный пароль!"); 802d3f6: 4620 mov r0, r4 802d3f8: 490d ldr r1, [pc, #52] ; (802d430 ) 802d3fa: e001 b.n 802d400 *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } else { strcat(bufOut, "Введены некорректные данные!"); 802d3fc: 490d ldr r1, [pc, #52] ; (802d434 ) 802d3fe: 4620 mov r0, r4 802d400: f7f4 fd70 bl 8021ee4 *lenBufOut = strlen(bufOut); 802d404: 4620 mov r0, r4 802d406: f7f4 fedf bl 80221c8 802d40a: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; } } 802d40c: 2000 movs r0, #0 802d40e: b030 add sp, #192 ; 0xc0 802d410: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802d414: 08041928 .word 0x08041928 802d418: 080402f7 .word 0x080402f7 802d41c: 08040301 .word 0x08040301 802d420: 0804030a .word 0x0804030a 802d424: 2000d72c .word 0x2000d72c 802d428: 0803928f .word 0x0803928f 802d42c: 08040313 .word 0x08040313 802d430: 08040374 .word 0x08040374 802d434: 0804033e .word 0x0804033e 0802d438 : * @param p: pointer to a packet buffer * @param err: LwIP error code * @retval err */ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { 802d438: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802d43c: b09b sub sp, #108 ; 0x6c 802d43e: 4617 mov r7, r2 struct http_state *hs; char CookieBuf[50]; char *CookiePtr = NULL; char name[MAX_WEB_COOKIE_LEN]; char id[MAX_WEB_COOKIE_LEN]; uint8_t nameLen = 0, idLen = 0; 802d440: 2200 movs r2, #0 * @param p: pointer to a packet buffer * @param err: LwIP error code * @retval err */ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { 802d442: 4604 mov r4, r0 802d444: 460d mov r5, r1 struct http_state *hs; char CookieBuf[50]; char *CookiePtr = NULL; char name[MAX_WEB_COOKIE_LEN]; char id[MAX_WEB_COOKIE_LEN]; uint8_t nameLen = 0, idLen = 0; 802d446: f88d 200a strb.w r2, [sp, #10] 802d44a: f88d 200b strb.w r2, [sp, #11] uint32_t DataOffset; struct fs_file file = {0, 0}; 802d44e: 9203 str r2, [sp, #12] 802d450: 9204 str r2, [sp, #16] uint32_t i; hs = arg; if (err == ERR_OK && p != NULL) 802d452: 2b00 cmp r3, #0 802d454: f040 852b bne.w 802deae 802d458: 2f00 cmp r7, #0 802d45a: f000 8528 beq.w 802deae { tcp_recved(pcb, p->tot_len); 802d45e: 4608 mov r0, r1 802d460: 8939 ldrh r1, [r7, #8] 802d462: f002 fea3 bl 80301ac if (hs->file == NULL) 802d466: f8d4 9000 ldr.w r9, [r4] 802d46a: f1b9 0f00 cmp.w r9, #0 802d46e: f040 851b bne.w 802dea8 printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); 802d472: f8df b2e8 ldr.w fp, [pc, #744] ; 802d75c { tcp_recved(pcb, p->tot_len); if (hs->file == NULL) { data = p->payload; 802d476: 687e ldr r6, [r7, #4] /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802d478: 893a ldrh r2, [r7, #8] 802d47a: f8df a2dc ldr.w sl, [pc, #732] ; 802d758 memcpy(receiveBuf, p->payload , receivedBufLen); 802d47e: 4658 mov r0, fp 802d480: 4631 mov r1, r6 /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802d482: f8aa 2000 strh.w r2, [sl] memcpy(receiveBuf, p->payload , receivedBufLen); 802d486: f7f4 fc0d bl 8021ca4 receiveBuf[receivedBufLen] = '\0'; 802d48a: f8ba 3000 ldrh.w r3, [sl] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802d48e: 49a0 ldr r1, [pc, #640] ; (802d710 ) printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); receiveBuf[receivedBufLen] = '\0'; 802d490: f80b 9003 strb.w r9, [fp, r3] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802d494: 4658 mov r0, fp 802d496: f7f5 f917 bl 80226c8 strncpy(CookieBuf, CookiePtr, 50); 802d49a: f10d 0a34 add.w sl, sp, #52 ; 0x34 memcpy(receiveBuf, p->payload , receivedBufLen); receiveBuf[receivedBufLen] = '\0'; // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802d49e: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802d4a0: 2232 movs r2, #50 ; 0x32 802d4a2: 4650 mov r0, sl 802d4a4: f7f4 ff48 bl 8022338 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(name, 0, MAX_WEB_COOKIE_LEN); 802d4a8: 4649 mov r1, r9 802d4aa: 2210 movs r2, #16 802d4ac: a805 add r0, sp, #20 802d4ae: f7f4 fcb3 bl 8021e18 GetCookieValue(CookieBuf, "uname=", name, &nameLen); 802d4b2: f10d 030a add.w r3, sp, #10 802d4b6: aa05 add r2, sp, #20 802d4b8: 4995 ldr r1, [pc, #596] ; (802d710 ) 802d4ba: 4650 mov r0, sl 802d4bc: f7ff fde6 bl 802d08c //printf("********CookieBuf2= %s\r\n", CookieBuf); //printf("********uname= %s\r\n", name); /* Get cookie "id" value */ CookiePtr = strstr(receiveBuf, "id="); 802d4c0: 4658 mov r0, fp 802d4c2: 4994 ldr r1, [pc, #592] ; (802d714 ) 802d4c4: f7f5 f900 bl 80226c8 strncpy(CookieBuf, CookiePtr, 50); //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802d4c8: f10d 0b24 add.w fp, sp, #36 ; 0x24 GetCookieValue(CookieBuf, "uname=", name, &nameLen); //printf("********CookieBuf2= %s\r\n", CookieBuf); //printf("********uname= %s\r\n", name); /* Get cookie "id" value */ CookiePtr = strstr(receiveBuf, "id="); 802d4cc: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802d4ce: 2232 movs r2, #50 ; 0x32 802d4d0: 4650 mov r0, sl 802d4d2: f7f4 ff31 bl 8022338 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802d4d6: 4649 mov r1, r9 802d4d8: 2210 movs r2, #16 802d4da: 4658 mov r0, fp 802d4dc: f7f4 fc9c bl 8021e18 GetCookieValue(CookieBuf, "id=", id, &idLen); 802d4e0: f10d 030b add.w r3, sp, #11 802d4e4: 4650 mov r0, sl 802d4e6: 498b ldr r1, [pc, #556] ; (802d714 ) 802d4e8: 465a mov r2, fp 802d4ea: f7ff fdcf bl 802d08c /* Id of currently logged-in user */ uint8_t user_id; if( DataFlag == 0 && DataFlag2 == 0 ){ 802d4ee: 4b8a ldr r3, [pc, #552] ; (802d718 ) 802d4f0: 681b ldr r3, [r3, #0] 802d4f2: 2b00 cmp r3, #0 802d4f4: d134 bne.n 802d560 802d4f6: 4b89 ldr r3, [pc, #548] ; (802d71c ) 802d4f8: 681b ldr r3, [r3, #0] 802d4fa: 2b00 cmp r3, #0 802d4fc: d130 bne.n 802d560 /* Level of currently logged-in user */ seclevel = 0xFF; 802d4fe: 4a88 ldr r2, [pc, #544] ; (802d720 ) 802d500: 21ff movs r1, #255 ; 0xff 802d502: 4699 mov r9, r3 /** * @brief Чтение Cookie пользователя */ static void HTTP_GetUserCookie(uint8_t user_id, char *str, uint8_t *len) { sprintf(str, "%s", users[user_id].cookie); 802d504: 4b87 ldr r3, [pc, #540] ; (802d724 ) /* Id of currently logged-in user */ uint8_t user_id; if( DataFlag == 0 && DataFlag2 == 0 ){ /* Level of currently logged-in user */ seclevel = 0xFF; 802d506: 7011 strb r1, [r2, #0] /** * @brief Чтение Cookie пользователя */ static void HTTP_GetUserCookie(uint8_t user_id, char *str, uint8_t *len) { sprintf(str, "%s", users[user_id].cookie); 802d508: 2214 movs r2, #20 802d50a: fb02 3209 mla r2, r2, r9, r3 802d50e: 4986 ldr r1, [pc, #536] ; (802d728 ) 802d510: 9301 str r3, [sp, #4] 802d512: 4650 mov r0, sl 802d514: f7fa fbe8 bl 8027ce8 *len = strlen(str); 802d518: 4650 mov r0, sl 802d51a: f7f4 fe55 bl 80221c8 802d51e: 4602 mov r2, r0 802d520: f88d 000b strb.w r0, [sp, #11] if( DataFlag == 0 && DataFlag2 == 0 ){ /* Level of currently logged-in user */ seclevel = 0xFF; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { HTTP_GetUserCookie(user_id, CookieBuf, &idLen); if (strncmp(id, CookieBuf, idLen) == 0 ) { 802d524: b2d2 uxtb r2, r2 802d526: 4658 mov r0, fp 802d528: 4651 mov r1, sl 802d52a: f7f4 feaf bl 802228c 802d52e: fa5f f889 uxtb.w r8, r9 802d532: 4a7e ldr r2, [pc, #504] ; (802d72c ) 802d534: 9b01 ldr r3, [sp, #4] 802d536: b940 cbnz r0, 802d54a GetUserLevelInt(user_id, &seclevel); 802d538: 4640 mov r0, r8 802d53a: 4979 ldr r1, [pc, #484] ; (802d720 ) 802d53c: 9201 str r2, [sp, #4] 802d53e: f7fa fee9 bl 8028314 Authenticated = true; 802d542: 9a01 ldr r2, [sp, #4] 802d544: 2301 movs r3, #1 802d546: 7013 strb r3, [r2, #0] break; 802d548: e00a b.n 802d560 } Authenticated = false; 802d54a: 2100 movs r1, #0 802d54c: 7011 strb r1, [r2, #0] 802d54e: f109 0901 add.w r9, r9, #1 seclevel = 0xFF; 802d552: 4a73 ldr r2, [pc, #460] ; (802d720 ) 802d554: 21ff movs r1, #255 ; 0xff uint8_t user_id; if( DataFlag == 0 && DataFlag2 == 0 ){ /* Level of currently logged-in user */ seclevel = 0xFF; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802d556: f1b9 0f02 cmp.w r9, #2 GetUserLevelInt(user_id, &seclevel); Authenticated = true; break; } Authenticated = false; seclevel = 0xFF; 802d55a: 7011 strb r1, [r2, #0] uint8_t user_id; if( DataFlag == 0 && DataFlag2 == 0 ){ /* Level of currently logged-in user */ seclevel = 0xFF; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802d55c: d1d4 bne.n 802d508 802d55e: 46c8 mov r8, r9 } Authenticated = false; seclevel = 0xFF; } } if (DataFlag >= 1) 802d560: 4b6d ldr r3, [pc, #436] ; (802d718 ) 802d562: 681a ldr r2, [r3, #0] 802d564: 4b71 ldr r3, [pc, #452] ; (802d72c ) 802d566: b102 cbz r2, 802d56a 802d568: e002 b.n 802d570 Authenticated = true; else if(DataFlag2 >= 1) 802d56a: 4a6c ldr r2, [pc, #432] ; (802d71c ) 802d56c: 6812 ldr r2, [r2, #0] 802d56e: b10a cbz r2, 802d574 Authenticated = true; 802d570: 2201 movs r2, #1 802d572: 701a strb r2, [r3, #0] if ( Authenticated == false && sSettings.sRADIUS.Auth_enable == false) 802d574: 781b ldrb r3, [r3, #0] 802d576: 2b00 cmp r3, #0 802d578: f040 8114 bne.w 802d7a4 802d57c: 4b6c ldr r3, [pc, #432] ; (802d730 ) 802d57e: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 802d582: b943 cbnz r3, 802d596 { HTTP_LOGIN(sendBuf, &sendBufLoadLen); 802d584: f8df 81e8 ldr.w r8, [pc, #488] ; 802d770 802d588: 4e6a ldr r6, [pc, #424] ; (802d734 ) 802d58a: 4640 mov r0, r8 802d58c: 4631 mov r1, r6 802d58e: f7ff f8ed bl 802c76c 802d592: f000 bc72 b.w 802de7a tcp_sent(pcb, http_sent); } else if ( Authenticated == false )//&& sSettings.sRADIUS.Auth_enable == true { if (strncmp(data, "GET /main.css", 13) == 0) // + 802d596: 4630 mov r0, r6 802d598: 4967 ldr r1, [pc, #412] ; (802d738 ) 802d59a: 220d movs r2, #13 802d59c: f7f4 fe76 bl 802228c 802d5a0: b900 cbnz r0, 802d5a4 802d5a2: e105 b.n 802d7b0 hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /rotek.png", 14) == 0) // + 802d5a4: 4630 mov r0, r6 802d5a6: 4965 ldr r1, [pc, #404] ; (802d73c ) 802d5a8: 220e movs r2, #14 802d5aa: f7f4 fe6f bl 802228c 802d5ae: b900 cbnz r0, 802d5b2 802d5b0: e106 b.n 802d7c0 hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /favicon.ico", 16) == 0) // ? 802d5b2: 4630 mov r0, r6 802d5b4: 4962 ldr r1, [pc, #392] ; (802d740 ) 802d5b6: 2210 movs r2, #16 802d5b8: f7f4 fe68 bl 802228c 802d5bc: b900 cbnz r0, 802d5c0 802d5be: e107 b.n 802d7d0 hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /role.js", 12) == 0) 802d5c0: 4630 mov r0, r6 802d5c2: 4960 ldr r1, [pc, #384] ; (802d744 ) 802d5c4: 220c movs r2, #12 802d5c6: f7f4 fe61 bl 802228c 802d5ca: b900 cbnz r0, 802d5ce 802d5cc: e110 b.n 802d7f0 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if ((strncmp(data, "POST /login.cgi", 15) == 0) || (log_post_reqn > 0)) 802d5ce: 4630 mov r0, r6 802d5d0: 495d ldr r1, [pc, #372] ; (802d748 ) 802d5d2: 220f movs r2, #15 802d5d4: f7f4 fe5a bl 802228c 802d5d8: b118 cbz r0, 802d5e2 802d5da: 4b5c ldr r3, [pc, #368] ; (802d74c ) 802d5dc: 681b ldr r3, [r3, #0] 802d5de: 2b00 cmp r3, #0 802d5e0: d07e beq.n 802d6e0 uint32_t i, offset = 0, req_data_received = 0; //printf("request 1: %d\r\n", receivedBufLen); /* parse packet for Content-length field */ post_data_count = Parse_Content_Length(data, p->tot_len); 802d5e2: 4630 mov r0, r6 802d5e4: 8939 ldrh r1, [r7, #8] 802d5e6: f8df 8180 ldr.w r8, [pc, #384] ; 802d768 802d5ea: f7fe fe9b bl 802c324 //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802d5ee: 28ff cmp r0, #255 ; 0xff uint32_t i, offset = 0, req_data_received = 0; //printf("request 1: %d\r\n", receivedBufLen); /* parse packet for Content-length field */ post_data_count = Parse_Content_Length(data, p->tot_len); 802d5f0: f8c8 0000 str.w r0, [r8] //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802d5f4: d86b bhi.n 802d6ce memset(post_req_data, 0, MAX_POST_REQ_LEN); 802d5f6: 4856 ldr r0, [pc, #344] ; (802d750 ) /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802d5f8: f8df 915c ldr.w r9, [pc, #348] ; 802d758 post_data_count = Parse_Content_Length(data, p->tot_len); //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { memset(post_req_data, 0, MAX_POST_REQ_LEN); 802d5fc: 2100 movs r1, #0 802d5fe: f44f 7280 mov.w r2, #256 ; 0x100 802d602: f7f4 fc09 bl 8021e18 /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802d606: f04f 0800 mov.w r8, #0 802d60a: e00b b.n 802d624 { if (strncmp ((char*)(data+i), "\r\n\r\n", 4) == 0) 802d60c: eb06 0008 add.w r0, r6, r8 802d610: 4950 ldr r1, [pc, #320] ; (802d754 ) 802d612: 2204 movs r2, #4 802d614: f7f4 fe3a bl 802228c 802d618: b910 cbnz r0, 802d620 { offset = i+4; 802d61a: f108 0804 add.w r8, r8, #4 //printf("offset: %d\r\n", (int)offset); break; 802d61e: e007 b.n 802d630 if (post_data_count < MAX_POST_REQ_LEN) { memset(post_req_data, 0, MAX_POST_REQ_LEN); /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802d620: f108 0801 add.w r8, r8, #1 802d624: f8b9 3000 ldrh.w r3, [r9] 802d628: 4598 cmp r8, r3 802d62a: d3ef bcc.n 802d60c tcp_sent(pcb, http_sent); } else if ((strncmp(data, "POST /login.cgi", 15) == 0) || (log_post_reqn > 0)) { uint32_t i, offset = 0, req_data_received = 0; 802d62c: f04f 0800 mov.w r8, #0 //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802d630: 4b49 ldr r3, [pc, #292] ; (802d758 ) 802d632: f8b3 a000 ldrh.w sl, [r3] //printf("req data received: %d\r\n", (int)req_data_received); /* Check if "\r\n\r\n" was found */ if (offset != 0) { 802d636: f1b8 0f00 cmp.w r8, #0 802d63a: d02b beq.n 802d694 /* if data was splited in two packets */ if (req_data_received < post_data_count) { 802d63c: f8df 9128 ldr.w r9, [pc, #296] ; 802d768 /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802d640: 4843 ldr r0, [pc, #268] ; (802d750 ) /* Check if "\r\n\r\n" was found */ if (offset != 0) { /* if data was splited in two packets */ if (req_data_received < post_data_count) { 802d642: f8d9 2000 ldr.w r2, [r9] //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802d646: ebc8 0a0a rsb sl, r8, sl /* Check if "\r\n\r\n" was found */ if (offset != 0) { /* if data was splited in two packets */ if (req_data_received < post_data_count) { 802d64a: 4592 cmp sl, r2 802d64c: d20c bcs.n 802d668 /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802d64e: 4b43 ldr r3, [pc, #268] ; (802d75c ) 802d650: 4a35 ldr r2, [pc, #212] ; (802d728 ) 802d652: 4651 mov r1, sl 802d654: f7fa fb2a bl 8027cac //printf("copied: %d\r\n", (int)req_data_received); post_data_count -= req_data_received; 802d658: f8d9 3000 ldr.w r3, [r9] 802d65c: ebca 0303 rsb r3, sl, r3 802d660: f8c9 3000 str.w r3, [r9] 802d664: f000 bc20 b.w 802dea8 } /* if data received completely */ else { strncat(post_req_data, (char *)(data + offset), post_data_count); 802d668: eb06 0108 add.w r1, r6, r8 802d66c: f7f4 fddc bl 8022228 //printf("post_req_data: %s\r\n", post_req_data); if (HTTP_ConfirmWebPwd(post_req_data, sendBuf, strlen(post_req_data), &sendBufLoadLen) == SEND_REQUIRED_YES) { 802d670: 4837 ldr r0, [pc, #220] ; (802d750 ) 802d672: f8df 80fc ldr.w r8, [pc, #252] ; 802d770 802d676: 4e2f ldr r6, [pc, #188] ; (802d734 ) 802d678: f7f4 fda6 bl 80221c8 802d67c: 4641 mov r1, r8 802d67e: b282 uxth r2, r0 802d680: 4633 mov r3, r6 802d682: 4833 ldr r0, [pc, #204] ; (802d750 ) 802d684: f7ff f8f8 bl 802c878 802d688: 2800 cmp r0, #0 802d68a: d173 bne.n 802d774 hs->file = sendBuf; 802d68c: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; 802d690: 8833 ldrh r3, [r6, #0] 802d692: e076 b.n 802d782 /* request was fragmented before "\r\n\r\n" */ else { //printf("no data found!\r\n"); /* wait next packet */ log_post_reqn++; 802d694: 4e2d ldr r6, [pc, #180] ; (802d74c ) 802d696: 6833 ldr r3, [r6, #0] 802d698: 3301 adds r3, #1 /* wait max 2 requests */ if (log_post_reqn > 1) { 802d69a: 2b01 cmp r3, #1 /* request was fragmented before "\r\n\r\n" */ else { //printf("no data found!\r\n"); /* wait next packet */ log_post_reqn++; 802d69c: 6033 str r3, [r6, #0] /* wait max 2 requests */ if (log_post_reqn > 1) { 802d69e: f240 8403 bls.w 802dea8 /* Redirect to login page */ fs_open("/login.html", &file); 802d6a2: a903 add r1, sp, #12 802d6a4: 482e ldr r0, [pc, #184] ; (802d760 ) 802d6a6: f7fe fe8b bl 802c3c0 hs->file = file.data; 802d6aa: 9b03 ldr r3, [sp, #12] 802d6ac: 6023 str r3, [r4, #0] hs->left = file.len; 802d6ae: 9b04 ldr r3, [sp, #16] send_data(pcb, hs); 802d6b0: 4628 mov r0, r5 /* wait max 2 requests */ if (log_post_reqn > 1) { /* Redirect to login page */ fs_open("/login.html", &file); hs->file = file.data; hs->left = file.len; 802d6b2: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d6b4: 4621 mov r1, r4 802d6b6: f7fe febf bl 802c438 tcp_sent(pcb, http_sent); 802d6ba: 4628 mov r0, r5 802d6bc: 4929 ldr r1, [pc, #164] ; (802d764 ) 802d6be: f002 fdab bl 8030218 /* End reqest */ post_data_count = 0; 802d6c2: 4b29 ldr r3, [pc, #164] ; (802d768 ) log_post_reqn = 0; 802d6c4: f8c6 8000 str.w r8, [r6] hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); /* End reqest */ post_data_count = 0; 802d6c8: f8c3 8000 str.w r8, [r3] 802d6cc: e3ec b.n 802dea8 log_post_reqn = 0; } } } else { printf("Too long POST request!\r\n"); 802d6ce: 4827 ldr r0, [pc, #156] ; (802d76c ) 802d6d0: f7fa fabe bl 8027c50 /* Ignore request */ post_data_count = 0; log_post_reqn = 0; 802d6d4: 4a1d ldr r2, [pc, #116] ; (802d74c ) } } else { printf("Too long POST request!\r\n"); /* Ignore request */ post_data_count = 0; 802d6d6: 2300 movs r3, #0 802d6d8: f8c8 3000 str.w r3, [r8] log_post_reqn = 0; 802d6dc: 6013 str r3, [r2, #0] 802d6de: e05f b.n 802d7a0 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (post_data_count > 0) 802d6e0: 4b21 ldr r3, [pc, #132] ; (802d768 ) 802d6e2: 681a ldr r2, [r3, #0] 802d6e4: 2a00 cmp r2, #0 802d6e6: d05b beq.n 802d7a0 { strncat(post_req_data, data, post_data_count); 802d6e8: 4631 mov r1, r6 802d6ea: 4819 ldr r0, [pc, #100] ; (802d750 ) 802d6ec: f7f4 fd9c bl 8022228 //printf("copied: %d\r\n", (int)post_data_count); //printf("post_req_data: %s\r\n", post_req_data); if (HTTP_ConfirmWebPwd(post_req_data, sendBuf, strlen(post_req_data), &sendBufLoadLen) == SEND_REQUIRED_YES) { 802d6f0: 4817 ldr r0, [pc, #92] ; (802d750 ) 802d6f2: f7f4 fd69 bl 80221c8 802d6f6: 491e ldr r1, [pc, #120] ; (802d770 ) 802d6f8: 4b0e ldr r3, [pc, #56] ; (802d734 ) 802d6fa: b282 uxth r2, r0 802d6fc: 4814 ldr r0, [pc, #80] ; (802d750 ) 802d6fe: f7ff f8bb bl 802c878 802d702: bbb8 cbnz r0, 802d774 hs->file = sendBuf; 802d704: 4b1a ldr r3, [pc, #104] ; (802d770 ) 802d706: 6023 str r3, [r4, #0] hs->left = sendBufLoadLen; 802d708: 4b0a ldr r3, [pc, #40] ; (802d734 ) 802d70a: 881b ldrh r3, [r3, #0] 802d70c: e039 b.n 802d782 802d70e: bf00 nop 802d710: 0803fe82 .word 0x0803fe82 802d714: 0803fe97 .word 0x0803fe97 802d718: 20000d70 .word 0x20000d70 802d71c: 20000d84 .word 0x20000d84 802d720: 20000721 .word 0x20000721 802d724: 2000eaa0 .word 0x2000eaa0 802d728: 080402f4 .word 0x080402f4 802d72c: 20000d5f .word 0x20000d5f 802d730: 2000d414 .word 0x2000d414 802d734: 20000d5c .word 0x20000d5c 802d738: 080403a0 .word 0x080403a0 802d73c: 080403ae .word 0x080403ae 802d740: 080403bd .word 0x080403bd 802d744: 080403ce .word 0x080403ce 802d748: 080403db .word 0x080403db 802d74c: 2000ea9c .word 0x2000ea9c 802d750: 2000e99c .word 0x2000e99c 802d754: 080405bd .word 0x080405bd 802d758: 20000d88 .word 0x20000d88 802d75c: 2000e3c0 .word 0x2000e3c0 802d760: 080403eb .word 0x080403eb 802d764: 0802c4ab .word 0x0802c4ab 802d768: 2000eac8 .word 0x2000eac8 802d76c: 080403f7 .word 0x080403f7 802d770: 2000dbf0 .word 0x2000dbf0 tcp_sent(pcb, http_sent); } else { /* Redirect to login page */ fs_open("/login.html", &file); 802d774: 488f ldr r0, [pc, #572] ; (802d9b4 ) 802d776: a903 add r1, sp, #12 802d778: f7fe fe22 bl 802c3c0 hs->file = file.data; 802d77c: 9b03 ldr r3, [sp, #12] 802d77e: 6023 str r3, [r4, #0] hs->left = file.len; 802d780: 9b04 ldr r3, [sp, #16] 802d782: 6063 str r3, [r4, #4] send_data(pcb, hs); 802d784: 4628 mov r0, r5 802d786: 4621 mov r1, r4 802d788: f7fe fe56 bl 802c438 tcp_sent(pcb, http_sent); 802d78c: 4628 mov r0, r5 802d78e: 498a ldr r1, [pc, #552] ; (802d9b8 ) 802d790: f002 fd42 bl 8030218 } /* End reqest */ post_data_count = 0; 802d794: 4a89 ldr r2, [pc, #548] ; (802d9bc ) 802d796: 2300 movs r3, #0 802d798: 6013 str r3, [r2, #0] log_post_reqn = 0; 802d79a: 4a89 ldr r2, [pc, #548] ; (802d9c0 ) 802d79c: 6013 str r3, [r2, #0] 802d79e: e383 b.n 802dea8 } else { fs_open("/login.html", &file); 802d7a0: 4884 ldr r0, [pc, #528] ; (802d9b4 ) 802d7a2: e372 b.n 802de8a } else if ( Authenticated == true ) { if (strncmp(data, "GET /main.css", 13) == 0) // + 802d7a4: 4630 mov r0, r6 802d7a6: 4987 ldr r1, [pc, #540] ; (802d9c4 ) 802d7a8: 220d movs r2, #13 802d7aa: f7f4 fd6f bl 802228c 802d7ae: b908 cbnz r0, 802d7b4 { fs_open("/main.css", &file); 802d7b0: 4885 ldr r0, [pc, #532] ; (802d9c8 ) 802d7b2: e36a b.n 802de8a hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /rotek.png", 14) == 0) // + 802d7b4: 4630 mov r0, r6 802d7b6: 4985 ldr r1, [pc, #532] ; (802d9cc ) 802d7b8: 220e movs r2, #14 802d7ba: f7f4 fd67 bl 802228c 802d7be: b908 cbnz r0, 802d7c4 { fs_open("/rotek.png", &file); 802d7c0: 4883 ldr r0, [pc, #524] ; (802d9d0 ) 802d7c2: e362 b.n 802de8a hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /favicon.ico", 16) == 0) // ? 802d7c4: 4630 mov r0, r6 802d7c6: 4983 ldr r1, [pc, #524] ; (802d9d4 ) 802d7c8: 2210 movs r2, #16 802d7ca: f7f4 fd5f bl 802228c 802d7ce: b908 cbnz r0, 802d7d4 { fs_open("/favicon.ico", &file); 802d7d0: 4881 ldr r0, [pc, #516] ; (802d9d8 ) 802d7d2: e35a b.n 802de8a hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /main.js", 12) == 0) // + 802d7d4: 4630 mov r0, r6 802d7d6: 4981 ldr r1, [pc, #516] ; (802d9dc ) 802d7d8: 220c movs r2, #12 802d7da: f7f4 fd57 bl 802228c 802d7de: b908 cbnz r0, 802d7e4 { fs_open("/main.js", &file); 802d7e0: 487f ldr r0, [pc, #508] ; (802d9e0 ) 802d7e2: e352 b.n 802de8a hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /role.js", 12) == 0) 802d7e4: 4630 mov r0, r6 802d7e6: 497f ldr r1, [pc, #508] ; (802d9e4 ) 802d7e8: 220c movs r2, #12 802d7ea: f7f4 fd4f bl 802228c 802d7ee: b908 cbnz r0, 802d7f4 { fs_open("/role.js", &file); 802d7f0: 487d ldr r0, [pc, #500] ; (802d9e8 ) 802d7f2: e34a b.n 802de8a hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.html", 18) == 0) // + 802d7f4: 4630 mov r0, r6 802d7f6: 497d ldr r1, [pc, #500] ; (802d9ec ) 802d7f8: 2212 movs r2, #18 802d7fa: f7f4 fd47 bl 802228c 802d7fe: b940 cbnz r0, 802d812 { HTTP_UpdateUserLoginTime(user_id); 802d800: 4640 mov r0, r8 802d802: f7fe fdcb bl 802c39c if (seclevel == 0){ 802d806: 4b7a ldr r3, [pc, #488] ; (802d9f0 ) 802d808: 781b ldrb r3, [r3, #0] 802d80a: 2b00 cmp r3, #0 802d80c: f040 833c bne.w 802de88 802d810: e2eb b.n 802ddea hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /info.html", 14) == 0) // + 802d812: 4630 mov r0, r6 802d814: 4977 ldr r1, [pc, #476] ; (802d9f4 ) 802d816: 220e movs r2, #14 802d818: f7f4 fd38 bl 802228c 802d81c: b920 cbnz r0, 802d828 { HTTP_UpdateUserLoginTime(user_id); 802d81e: 4640 mov r0, r8 802d820: f7fe fdbc bl 802c39c fs_open("/info.html", &file); 802d824: 4874 ldr r0, [pc, #464] ; (802d9f8 ) 802d826: e330 b.n 802de8a hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /history.html", 17) == 0) 802d828: 4630 mov r0, r6 802d82a: 4974 ldr r1, [pc, #464] ; (802d9fc ) 802d82c: 2211 movs r2, #17 802d82e: f7f4 fd2d bl 802228c 802d832: b920 cbnz r0, 802d83e { HTTP_UpdateUserLoginTime(user_id); 802d834: 4640 mov r0, r8 802d836: f7fe fdb1 bl 802c39c fs_open("/history.html", &file); 802d83a: 4871 ldr r0, [pc, #452] ; (802da00 ) 802d83c: e325 b.n 802de8a hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /ups_history.html", 21) == 0) 802d83e: 4630 mov r0, r6 802d840: 4970 ldr r1, [pc, #448] ; (802da04 ) 802d842: 2215 movs r2, #21 802d844: f7f4 fd22 bl 802228c 802d848: b920 cbnz r0, 802d854 { HTTP_UpdateUserLoginTime(user_id); 802d84a: 4640 mov r0, r8 802d84c: f7fe fda6 bl 802c39c fs_open("/ups_history.html", &file); 802d850: 486d ldr r0, [pc, #436] ; (802da08 ) 802d852: e31a b.n 802de8a hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /getJson.cgi", 16) == 0) // + 802d854: 4630 mov r0, r6 802d856: 496d ldr r1, [pc, #436] ; (802da0c ) 802d858: 2210 movs r2, #16 802d85a: f7f4 fd17 bl 802228c 802d85e: b940 cbnz r0, 802d872 { HTTP_GetParamsPage1(sendBuf); 802d860: 4e6b ldr r6, [pc, #428] ; (802da10 ) 802d862: 4630 mov r0, r6 802d864: f000 fb50 bl 802df08 hs->file = sendBuf; 802d868: 6026 str r6, [r4, #0] hs->left = strlen(sendBuf); 802d86a: 4630 mov r0, r6 802d86c: f7f4 fcac bl 80221c8 802d870: e131 b.n 802dad6 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + 802d872: 4630 mov r0, r6 802d874: 4967 ldr r1, [pc, #412] ; (802da14 ) 802d876: 2211 movs r2, #17 802d878: f7f4 fd08 bl 802228c 802d87c: b990 cbnz r0, 802d8a4 { if (seclevel == 0) { 802d87e: 4b5c ldr r3, [pc, #368] ; (802d9f0 ) 802d880: 781b ldrb r3, [r3, #0] 802d882: 2b00 cmp r3, #0 802d884: f040 8310 bne.w 802dea8 SET_PAGE = SET_PAGE_PAGE2; 802d888: 4b63 ldr r3, [pc, #396] ; (802da18 ) if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802d88a: f8df 8184 ldr.w r8, [pc, #388] ; 802da10 802d88e: 4e63 ldr r6, [pc, #396] ; (802da1c ) 802d890: 4863 ldr r0, [pc, #396] ; (802da20 ) tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + { if (seclevel == 0) { SET_PAGE = SET_PAGE_PAGE2; 802d892: 2202 movs r2, #2 802d894: 701a strb r2, [r3, #0] if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802d896: 4b63 ldr r3, [pc, #396] ; (802da24 ) 802d898: 4641 mov r1, r8 802d89a: 881a ldrh r2, [r3, #0] 802d89c: 4633 mov r3, r6 802d89e: f7fe ff0b bl 802c6b8 802d8a2: e12a b.n 802dafa send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } } else if (strncmp(data, "POST /settings.cgi", 18) == 0 || (DataFlag2 >= 1)) 802d8a4: 4630 mov r0, r6 802d8a6: 4960 ldr r1, [pc, #384] ; (802da28 ) 802d8a8: 2212 movs r2, #18 802d8aa: f7f4 fcef bl 802228c 802d8ae: b120 cbz r0, 802d8ba 802d8b0: 4b5e ldr r3, [pc, #376] ; (802da2c ) 802d8b2: 681b ldr r3, [r3, #0] 802d8b4: 2b00 cmp r3, #0 802d8b6: f000 8110 beq.w 802dada { if (seclevel == 0) { 802d8ba: 4b4d ldr r3, [pc, #308] ; (802d9f0 ) 802d8bc: 781a ldrb r2, [r3, #0] 802d8be: 2a00 cmp r2, #0 802d8c0: f040 82f2 bne.w 802dea8 DataOffset = 0; /* POST Packet received */ if (DataFlag2 == 0) 802d8c4: 4b59 ldr r3, [pc, #356] ; (802da2c ) 802d8c6: f8d3 8000 ldr.w r8, [r3] 802d8ca: f1b8 0f00 cmp.w r8, #0 802d8ce: d12f bne.n 802d930 { BrowserFlag = 0; 802d8d0: 4b57 ldr r3, [pc, #348] ; (802da30 ) TotalReceived = 0; memset(sendBuf, 0, strlen(sendBuf)); 802d8d2: 484f ldr r0, [pc, #316] ; (802da10 ) DataOffset = 0; /* POST Packet received */ if (DataFlag2 == 0) { BrowserFlag = 0; 802d8d4: f8c3 8000 str.w r8, [r3] TotalReceived = 0; 802d8d8: 4b56 ldr r3, [pc, #344] ; (802da34 ) /* parse packet for Content-length field */ size = Parse_Content_Length(data, p->tot_len); /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802d8da: f8df 9148 ldr.w r9, [pc, #328] ; 802da24 /* POST Packet received */ if (DataFlag2 == 0) { BrowserFlag = 0; TotalReceived = 0; 802d8de: f8c3 8000 str.w r8, [r3] memset(sendBuf, 0, strlen(sendBuf)); 802d8e2: f7f4 fc71 bl 80221c8 802d8e6: 4641 mov r1, r8 802d8e8: 4602 mov r2, r0 802d8ea: 4849 ldr r0, [pc, #292] ; (802da10 ) 802d8ec: f7f4 fa94 bl 8021e18 /* parse packet for Content-length field */ size = Parse_Content_Length(data, p->tot_len); 802d8f0: 4630 mov r0, r6 802d8f2: 8939 ldrh r1, [r7, #8] 802d8f4: f7fe fd16 bl 802c324 802d8f8: 4b4f ldr r3, [pc, #316] ; (802da38 ) 802d8fa: 6018 str r0, [r3, #0] /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802d8fc: e008 b.n 802d910 { if (strncmp ((char*)(data+i), "managerIP", 8)==0) 802d8fe: eb06 0008 add.w r0, r6, r8 802d902: 494e ldr r1, [pc, #312] ; (802da3c ) 802d904: 2208 movs r2, #8 802d906: f7f4 fcc1 bl 802228c 802d90a: b138 cbz r0, 802d91c /* parse packet for Content-length field */ size = Parse_Content_Length(data, p->tot_len); /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802d90c: f108 0801 add.w r8, r8, #1 802d910: f8b9 3000 ldrh.w r3, [r9] 802d914: 4598 cmp r8, r3 802d916: d3f2 bcc.n 802d8fe } } /* case of MSIE8 : we do not receive data in the POST packet*/ if (DataOffset == 0) { DataFlag2++; 802d918: 4b44 ldr r3, [pc, #272] ; (802da2c ) 802d91a: e12d b.n 802db78 DataOffset = i; break; } } /* case of MSIE8 : we do not receive data in the POST packet*/ if (DataOffset == 0) 802d91c: f1b8 0f00 cmp.w r8, #0 802d920: d0fa beq.n 802d918 } /* case of Mozilla Firefox v3.6 : we receive data in the POST packet*/ else { //TotalReceived = receivedBufLen - (ContentLengthOffset + 4); TotalReceived = receivedBufLen - DataOffset; 802d922: 4b40 ldr r3, [pc, #256] ; (802da24 ) 802d924: 881a ldrh r2, [r3, #0] 802d926: 4b43 ldr r3, [pc, #268] ; (802da34 ) 802d928: ebc8 0202 rsb r2, r8, r2 802d92c: 601a str r2, [r3, #0] 802d92e: e000 b.n 802d932 } } else if (strncmp(data, "POST /settings.cgi", 18) == 0 || (DataFlag2 >= 1)) { if (seclevel == 0) { DataOffset = 0; 802d930: 4690 mov r8, r2 { //TotalReceived = receivedBufLen - (ContentLengthOffset + 4); TotalReceived = receivedBufLen - DataOffset; } } if (((DataFlag2 ==1)&&(BrowserFlag==1)) || ((DataFlag2 ==0)&&(BrowserFlag==0))) 802d932: 4b3e ldr r3, [pc, #248] ; (802da2c ) 802d934: 681a ldr r2, [r3, #0] 802d936: 2a01 cmp r2, #1 802d938: d103 bne.n 802d942 802d93a: 4a3d ldr r2, [pc, #244] ; (802da30 ) 802d93c: 6812 ldr r2, [r2, #0] 802d93e: 2a01 cmp r2, #1 802d940: d006 beq.n 802d950 802d942: 681b ldr r3, [r3, #0] 802d944: 2b00 cmp r3, #0 802d946: d17d bne.n 802da44 802d948: 4b39 ldr r3, [pc, #228] ; (802da30 ) 802d94a: 681b ldr r3, [r3, #0] 802d94c: 2b00 cmp r3, #0 802d94e: d179 bne.n 802da44 { if ((DataFlag2 ==0)&&(BrowserFlag==0)) 802d950: 4b36 ldr r3, [pc, #216] ; (802da2c ) 802d952: 6819 ldr r1, [r3, #0] 802d954: 461a mov r2, r3 802d956: b919 cbnz r1, 802d960 802d958: 4935 ldr r1, [pc, #212] ; (802da30 ) 802d95a: 6809 ldr r1, [r1, #0] 802d95c: b901 cbnz r1, 802d960 802d95e: e022 b.n 802d9a6 { DataFlag2++; } else if ((DataFlag2 ==1)&&(BrowserFlag==1)) 802d960: 6813 ldr r3, [r2, #0] 802d962: 2b01 cmp r3, #1 802d964: d122 bne.n 802d9ac 802d966: 4b32 ldr r3, [pc, #200] ; (802da30 ) 802d968: 681b ldr r3, [r3, #0] 802d96a: 2b01 cmp r3, #1 802d96c: d11e bne.n 802d9ac 802d96e: e009 b.n 802d984 { /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) { if (strncmp ((char*)(data+i), "managerIP", 8)==0) 802d970: eb06 0009 add.w r0, r6, r9 802d974: 4931 ldr r1, [pc, #196] ; (802da3c ) 802d976: 2208 movs r2, #8 802d978: f7f4 fc88 bl 802228c 802d97c: b158 cbz r0, 802d996 DataFlag2++; } else if ((DataFlag2 ==1)&&(BrowserFlag==1)) { /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802d97e: f109 0901 add.w r9, r9, #1 802d982: e003 b.n 802d98c 802d984: f8df a09c ldr.w sl, [pc, #156] ; 802da24 { if ((DataFlag2 ==0)&&(BrowserFlag==0)) { DataFlag2++; } else if ((DataFlag2 ==1)&&(BrowserFlag==1)) 802d988: f04f 0900 mov.w r9, #0 { /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802d98c: f8ba 3000 ldrh.w r3, [sl] 802d990: 4599 cmp r9, r3 802d992: d3ed bcc.n 802d970 802d994: e000 b.n 802d998 { if (strncmp ((char*)(data+i), "managerIP", 8)==0) 802d996: 46c8 mov r8, r9 { DataOffset = i; break; } } TotalReceived += receivedBufLen; 802d998: 4b26 ldr r3, [pc, #152] ; (802da34 ) 802d99a: 4a22 ldr r2, [pc, #136] ; (802da24 ) 802d99c: 8811 ldrh r1, [r2, #0] 802d99e: 681a ldr r2, [r3, #0] 802d9a0: 188a adds r2, r1, r2 802d9a2: 601a str r2, [r3, #0] DataFlag2++; 802d9a4: 4b21 ldr r3, [pc, #132] ; (802da2c ) 802d9a6: 681a ldr r2, [r3, #0] 802d9a8: 3201 adds r2, #1 802d9aa: 601a str r2, [r3, #0] } TotalData =0 ; 802d9ac: 2200 movs r2, #0 802d9ae: 4b24 ldr r3, [pc, #144] ; (802da40 ) 802d9b0: e04d b.n 802da4e 802d9b2: bf00 nop 802d9b4: 080403eb .word 0x080403eb 802d9b8: 0802c4ab .word 0x0802c4ab 802d9bc: 2000eac8 .word 0x2000eac8 802d9c0: 2000ea9c .word 0x2000ea9c 802d9c4: 080403a0 .word 0x080403a0 802d9c8: 080403a4 .word 0x080403a4 802d9cc: 080403ae .word 0x080403ae 802d9d0: 080403b2 .word 0x080403b2 802d9d4: 080403bd .word 0x080403bd 802d9d8: 080403c1 .word 0x080403c1 802d9dc: 08040410 .word 0x08040410 802d9e0: 08040414 .word 0x08040414 802d9e4: 080403ce .word 0x080403ce 802d9e8: 080403d2 .word 0x080403d2 802d9ec: 0804041d .word 0x0804041d 802d9f0: 20000721 .word 0x20000721 802d9f4: 0804043c .word 0x0804043c 802d9f8: 08040440 .word 0x08040440 802d9fc: 0804044b .word 0x0804044b 802da00: 0804044f .word 0x0804044f 802da04: 0804045d .word 0x0804045d 802da08: 08040461 .word 0x08040461 802da0c: 08040473 .word 0x08040473 802da10: 2000dbf0 .word 0x2000dbf0 802da14: 08040484 .word 0x08040484 802da18: 20000d5e .word 0x20000d5e 802da1c: 20000d5c .word 0x20000d5c 802da20: 2000e3c0 .word 0x2000e3c0 802da24: 20000d88 .word 0x20000d88 802da28: 08040496 .word 0x08040496 802da2c: 20000d84 .word 0x20000d84 802da30: 20000d64 .word 0x20000d64 802da34: 20000d7c .word 0x20000d7c 802da38: 20000d80 .word 0x20000d80 802da3c: 080404a9 .word 0x080404a9 802da40: 20000d74 .word 0x20000d74 } /* DataFlag >1 => the packet is data only */ else { TotalReceived +=receivedBufLen; 802da44: 4a99 ldr r2, [pc, #612] ; (802dcac ) 802da46: 4b9a ldr r3, [pc, #616] ; (802dcb0 ) 802da48: 8811 ldrh r1, [r2, #0] 802da4a: 681a ldr r2, [r3, #0] 802da4c: 188a adds r2, r1, r2 802da4e: 601a str r2, [r3, #0] } ptr = (char*)(data + DataOffset); receivedBufLen-= DataOffset; 802da50: 4b96 ldr r3, [pc, #600] ; (802dcac ) 802da52: 881a ldrh r2, [r3, #0] else { TotalReceived +=receivedBufLen; } ptr = (char*)(data + DataOffset); 802da54: eb06 0108 add.w r1, r6, r8 receivedBufLen-= DataOffset; 802da58: ebc8 0802 rsb r8, r8, r2 802da5c: fa1f f288 uxth.w r2, r8 802da60: 801a strh r2, [r3, #0] /* update Total data received counter */ TotalData +=receivedBufLen; 802da62: 4b94 ldr r3, [pc, #592] ; (802dcb4 ) /* check if last data packet */ if (TotalReceived == size) 802da64: f8df 8284 ldr.w r8, [pc, #644] ; 802dcec ptr = (char*)(data + DataOffset); receivedBufLen-= DataOffset; /* update Total data received counter */ TotalData +=receivedBufLen; 802da68: 6818 ldr r0, [r3, #0] 802da6a: 1810 adds r0, r2, r0 802da6c: 6018 str r0, [r3, #0] /* check if last data packet */ if (TotalReceived == size) 802da6e: 4890 ldr r0, [pc, #576] ; (802dcb0 ) 802da70: f8d8 3000 ldr.w r3, [r8] 802da74: 6800 ldr r0, [r0, #0] 802da76: 4298 cmp r0, r3 802da78: f040 8110 bne.w 802dc9c { //DBG printf("State: Received %d bytes\r\n", (int)TotalReceived); strncat(&sendBuf, ptr, receivedBufLen); 802da7c: 4e8e ldr r6, [pc, #568] ; (802dcb8 ) 802da7e: 4630 mov r0, r6 802da80: f7f4 fbd2 bl 8022228 strncat(&sendBuf, " ", 1); 802da84: 2201 movs r2, #1 802da86: 498d ldr r1, [pc, #564] ; (802dcbc ) 802da88: 4630 mov r0, r6 802da8a: f7f4 fbcd bl 8022228 //ВBG printf("receive %s /r/n", sendBuf); HTTP_SetSettings(sendBuf, strlen(&sendBuf)); 802da8e: 4630 mov r0, r6 802da90: f7f4 fb9a bl 80221c8 802da94: b281 uxth r1, r0 802da96: 4630 mov r0, r6 802da98: f7ff f8f4 bl 802cc84 DataFlag2=0; 802da9c: 4b88 ldr r3, [pc, #544] ; (802dcc0 ) 802da9e: 2100 movs r1, #0 802daa0: 6019 str r1, [r3, #0] BrowserFlag = 0; 802daa2: 4b88 ldr r3, [pc, #544] ; (802dcc4 ) memset(sendBuf, 0, size); 802daa4: f8d8 2000 ldr.w r2, [r8] strncat(&sendBuf, " ", 1); //ВBG printf("receive %s /r/n", sendBuf); HTTP_SetSettings(sendBuf, strlen(&sendBuf)); DataFlag2=0; BrowserFlag = 0; 802daa8: 6019 str r1, [r3, #0] memset(sendBuf, 0, size); 802daaa: 4630 mov r0, r6 802daac: f7f4 f9b4 bl 8021e18 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802dab0: 4985 ldr r1, [pc, #532] ; (802dcc8 ) 802dab2: 4630 mov r0, r6 802dab4: f7f4 fb2a bl 802210c strcat(sendBuf, "\r\n\r\n"); 802dab8: 4984 ldr r1, [pc, #528] ; (802dccc ) 802daba: 4630 mov r0, r6 802dabc: f7f4 fa12 bl 8021ee4 strcat(sendBuf,"\r\n\r\n"); 802dac0: 4983 ldr r1, [pc, #524] ; (802dcd0 ) 802dac2: 4630 mov r0, r6 802dac4: f7f4 fa0e bl 8021ee4 sendBufLoadLen = strlen(sendBuf); 802dac8: 4630 mov r0, r6 802daca: f7f4 fb7d bl 80221c8 802dace: 4b81 ldr r3, [pc, #516] ; (802dcd4 ) 802dad0: 8018 strh r0, [r3, #0] hs->file = sendBuf; 802dad2: 6026 str r6, [r4, #0] hs->left = sendBufLoadLen; 802dad4: b280 uxth r0, r0 802dad6: 6060 str r0, [r4, #4] 802dad8: e1de b.n 802de98 //memcpy(receiveBufTemp, ptr, receivedBufLen); } } } } else if (strncmp(data, "GET /info.cgi", 13) == 0) // + 802dada: 4630 mov r0, r6 802dadc: 497e ldr r1, [pc, #504] ; (802dcd8 ) 802dade: 220d movs r2, #13 802dae0: f7f4 fbd4 bl 802228c 802dae4: b968 cbnz r0, 802db02 { if (HTTP_InfoPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802dae6: 4b71 ldr r3, [pc, #452] ; (802dcac ) 802dae8: f8df 81cc ldr.w r8, [pc, #460] ; 802dcb8 802daec: 4e79 ldr r6, [pc, #484] ; (802dcd4 ) 802daee: 881a ldrh r2, [r3, #0] 802daf0: 487a ldr r0, [pc, #488] ; (802dcdc ) 802daf2: 4641 mov r1, r8 802daf4: 4633 mov r3, r6 802daf6: f7fe fe03 bl 802c700 802dafa: 2800 cmp r0, #0 802dafc: f040 81d4 bne.w 802dea8 802db00: e1bb b.n 802de7a hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } else if (strncmp(data, "POST /info.cgi", 14) == 0 || (DataFlag >= 1)) 802db02: 4630 mov r0, r6 802db04: 4976 ldr r1, [pc, #472] ; (802dce0 ) 802db06: 220e movs r2, #14 802db08: f7f4 fbc0 bl 802228c 802db0c: b120 cbz r0, 802db18 802db0e: 4b75 ldr r3, [pc, #468] ; (802dce4 ) 802db10: 681b ldr r3, [r3, #0] 802db12: 2b00 cmp r3, #0 802db14: f000 80f0 beq.w 802dcf8 { if (seclevel == 0) { 802db18: 4b73 ldr r3, [pc, #460] ; (802dce8 ) 802db1a: 781a ldrb r2, [r3, #0] 802db1c: 2a00 cmp r2, #0 802db1e: f040 81c3 bne.w 802dea8 DataOffset = 0; /* POST Packet received */ if (DataFlag == 0) 802db22: 4b70 ldr r3, [pc, #448] ; (802dce4 ) 802db24: f8d3 8000 ldr.w r8, [r3] 802db28: f1b8 0f00 cmp.w r8, #0 802db2c: d135 bne.n 802db9a { BrowserFlag = 0; 802db2e: 4b65 ldr r3, [pc, #404] ; (802dcc4 ) TotalReceived = 0; memset(sendBuf, 0, strlen(sendBuf)); 802db30: 4861 ldr r0, [pc, #388] ; (802dcb8 ) DataOffset = 0; /* POST Packet received */ if (DataFlag == 0) { BrowserFlag = 0; 802db32: f8c3 8000 str.w r8, [r3] TotalReceived = 0; 802db36: 4b5e ldr r3, [pc, #376] ; (802dcb0 ) /* parse packet for Content-length field */ size = Parse_Content_Length(data, p->tot_len); /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802db38: f8df 9170 ldr.w r9, [pc, #368] ; 802dcac /* POST Packet received */ if (DataFlag == 0) { BrowserFlag = 0; TotalReceived = 0; 802db3c: f8c3 8000 str.w r8, [r3] memset(sendBuf, 0, strlen(sendBuf)); 802db40: f7f4 fb42 bl 80221c8 802db44: 4641 mov r1, r8 802db46: 4602 mov r2, r0 802db48: 485b ldr r0, [pc, #364] ; (802dcb8 ) 802db4a: f7f4 f965 bl 8021e18 /* parse packet for Content-length field */ size = Parse_Content_Length(data, p->tot_len); 802db4e: 4630 mov r0, r6 802db50: 8939 ldrh r1, [r7, #8] 802db52: f7fe fbe7 bl 802c324 802db56: 4b65 ldr r3, [pc, #404] ; (802dcec ) 802db58: 6018 str r0, [r3, #0] /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802db5a: e008 b.n 802db6e { if (strncmp ((char*)(data+i), "owner", 5)==0) 802db5c: eb06 0008 add.w r0, r6, r8 802db60: 4963 ldr r1, [pc, #396] ; (802dcf0 ) 802db62: 2205 movs r2, #5 802db64: f7f4 fb92 bl 802228c 802db68: b168 cbz r0, 802db86 /* parse packet for Content-length field */ size = Parse_Content_Length(data, p->tot_len); /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802db6a: f108 0801 add.w r8, r8, #1 802db6e: f8b9 3000 ldrh.w r3, [r9] 802db72: 4598 cmp r8, r3 802db74: d3f2 bcc.n 802db5c } } /* case of MSIE8 : we do not receive data in the POST packet*/ if (DataOffset == 0) { DataFlag++; 802db76: 4b5b ldr r3, [pc, #364] ; (802dce4 ) 802db78: 681a ldr r2, [r3, #0] 802db7a: 3201 adds r2, #1 802db7c: 601a str r2, [r3, #0] BrowserFlag = 1; 802db7e: 4b51 ldr r3, [pc, #324] ; (802dcc4 ) 802db80: 2201 movs r2, #1 802db82: 601a str r2, [r3, #0] 802db84: e190 b.n 802dea8 DataOffset = i; break; } } /* case of MSIE8 : we do not receive data in the POST packet*/ if (DataOffset == 0) 802db86: f1b8 0f00 cmp.w r8, #0 802db8a: d0f4 beq.n 802db76 } /* case of Mozilla Firefox v3.6 : we receive data in the POST packet*/ else { //TotalReceived = receivedBufLen - (ContentLengthOffset + 4); TotalReceived = receivedBufLen - DataOffset; 802db8c: 4b47 ldr r3, [pc, #284] ; (802dcac ) 802db8e: 881a ldrh r2, [r3, #0] 802db90: 4b47 ldr r3, [pc, #284] ; (802dcb0 ) 802db92: ebc8 0202 rsb r2, r8, r2 802db96: 601a str r2, [r3, #0] 802db98: e000 b.n 802db9c }*/ } else if (strncmp(data, "POST /info.cgi", 14) == 0 || (DataFlag >= 1)) { if (seclevel == 0) { DataOffset = 0; 802db9a: 4690 mov r8, r2 { //TotalReceived = receivedBufLen - (ContentLengthOffset + 4); TotalReceived = receivedBufLen - DataOffset; } } if (((DataFlag ==1)&&(BrowserFlag==1)) || ((DataFlag ==0)&&(BrowserFlag==0))) 802db9c: 4b51 ldr r3, [pc, #324] ; (802dce4 ) 802db9e: 681a ldr r2, [r3, #0] 802dba0: 2a01 cmp r2, #1 802dba2: d103 bne.n 802dbac 802dba4: 4a47 ldr r2, [pc, #284] ; (802dcc4 ) 802dba6: 6812 ldr r2, [r2, #0] 802dba8: 2a01 cmp r2, #1 802dbaa: d006 beq.n 802dbba 802dbac: 681b ldr r3, [r3, #0] 802dbae: 2b00 cmp r3, #0 802dbb0: d134 bne.n 802dc1c 802dbb2: 4b44 ldr r3, [pc, #272] ; (802dcc4 ) 802dbb4: 681b ldr r3, [r3, #0] 802dbb6: 2b00 cmp r3, #0 802dbb8: d130 bne.n 802dc1c { if ((DataFlag ==0)&&(BrowserFlag==0)) 802dbba: 4b4a ldr r3, [pc, #296] ; (802dce4 ) 802dbbc: 6819 ldr r1, [r3, #0] 802dbbe: 461a mov r2, r3 802dbc0: b919 cbnz r1, 802dbca 802dbc2: 4940 ldr r1, [pc, #256] ; (802dcc4 ) 802dbc4: 6809 ldr r1, [r1, #0] 802dbc6: b901 cbnz r1, 802dbca 802dbc8: e022 b.n 802dc10 { DataFlag++; } else if ((DataFlag ==1)&&(BrowserFlag==1)) 802dbca: 6813 ldr r3, [r2, #0] 802dbcc: 2b01 cmp r3, #1 802dbce: d122 bne.n 802dc16 802dbd0: 4b3c ldr r3, [pc, #240] ; (802dcc4 ) 802dbd2: 681b ldr r3, [r3, #0] 802dbd4: 2b01 cmp r3, #1 802dbd6: d11e bne.n 802dc16 802dbd8: e009 b.n 802dbee { /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) { if (strncmp ((char*)(data+i), "owner", 5)==0) 802dbda: eb06 0009 add.w r0, r6, r9 802dbde: 4944 ldr r1, [pc, #272] ; (802dcf0 ) 802dbe0: 2205 movs r2, #5 802dbe2: f7f4 fb53 bl 802228c 802dbe6: b158 cbz r0, 802dc00 DataFlag++; } else if ((DataFlag ==1)&&(BrowserFlag==1)) { /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802dbe8: f109 0901 add.w r9, r9, #1 802dbec: e003 b.n 802dbf6 802dbee: f8df a0bc ldr.w sl, [pc, #188] ; 802dcac { if ((DataFlag ==0)&&(BrowserFlag==0)) { DataFlag++; } else if ((DataFlag ==1)&&(BrowserFlag==1)) 802dbf2: f04f 0900 mov.w r9, #0 { /* parse packet for the octet-stream field */ for (i = 0; i < receivedBufLen; i++) 802dbf6: f8ba 3000 ldrh.w r3, [sl] 802dbfa: 4599 cmp r9, r3 802dbfc: d3ed bcc.n 802dbda 802dbfe: e000 b.n 802dc02 { if (strncmp ((char*)(data+i), "owner", 5)==0) 802dc00: 46c8 mov r8, r9 { DataOffset = i; break; } } TotalReceived += receivedBufLen; 802dc02: 4b2b ldr r3, [pc, #172] ; (802dcb0 ) 802dc04: 4a29 ldr r2, [pc, #164] ; (802dcac ) 802dc06: 8811 ldrh r1, [r2, #0] 802dc08: 681a ldr r2, [r3, #0] 802dc0a: 188a adds r2, r1, r2 802dc0c: 601a str r2, [r3, #0] DataFlag++; 802dc0e: 4b35 ldr r3, [pc, #212] ; (802dce4 ) 802dc10: 681a ldr r2, [r3, #0] 802dc12: 3201 adds r2, #1 802dc14: 601a str r2, [r3, #0] } TotalData =0 ; 802dc16: 2200 movs r2, #0 802dc18: 4b26 ldr r3, [pc, #152] ; (802dcb4 ) 802dc1a: e004 b.n 802dc26 } /* DataFlag >1 => the packet is data only */ else { TotalReceived +=receivedBufLen; 802dc1c: 4a23 ldr r2, [pc, #140] ; (802dcac ) 802dc1e: 4b24 ldr r3, [pc, #144] ; (802dcb0 ) 802dc20: 8811 ldrh r1, [r2, #0] 802dc22: 681a ldr r2, [r3, #0] 802dc24: 188a adds r2, r1, r2 802dc26: 601a str r2, [r3, #0] } ptr = (char*)(data + DataOffset); receivedBufLen-= DataOffset; 802dc28: 4b20 ldr r3, [pc, #128] ; (802dcac ) 802dc2a: 881a ldrh r2, [r3, #0] else { TotalReceived +=receivedBufLen; } ptr = (char*)(data + DataOffset); 802dc2c: eb06 0108 add.w r1, r6, r8 receivedBufLen-= DataOffset; 802dc30: ebc8 0802 rsb r8, r8, r2 802dc34: fa1f f288 uxth.w r2, r8 802dc38: 801a strh r2, [r3, #0] /* update Total data received counter */ TotalData +=receivedBufLen; 802dc3a: 4b1e ldr r3, [pc, #120] ; (802dcb4 ) /* check if last data packet */ if (TotalReceived == size) 802dc3c: f8df 80ac ldr.w r8, [pc, #172] ; 802dcec ptr = (char*)(data + DataOffset); receivedBufLen-= DataOffset; /* update Total data received counter */ TotalData +=receivedBufLen; 802dc40: 6818 ldr r0, [r3, #0] 802dc42: 1810 adds r0, r2, r0 802dc44: 6018 str r0, [r3, #0] /* check if last data packet */ if (TotalReceived == size) 802dc46: 481a ldr r0, [pc, #104] ; (802dcb0 ) 802dc48: f8d8 3000 ldr.w r3, [r8] 802dc4c: 6800 ldr r0, [r0, #0] 802dc4e: 4298 cmp r0, r3 802dc50: d124 bne.n 802dc9c { strncat(&sendBuf, ptr, receivedBufLen); 802dc52: 4e19 ldr r6, [pc, #100] ; (802dcb8 ) 802dc54: 4630 mov r0, r6 802dc56: f7f4 fae7 bl 8022228 strncat(&sendBuf, " ", 1); 802dc5a: 2201 movs r2, #1 802dc5c: 4917 ldr r1, [pc, #92] ; (802dcbc ) 802dc5e: 4630 mov r0, r6 802dc60: f7f4 fae2 bl 8022228 HTTP_SetInfo(sendBuf, strlen(&sendBuf)); 802dc64: 4630 mov r0, r6 802dc66: f7f4 faaf bl 80221c8 802dc6a: b281 uxth r1, r0 802dc6c: 4630 mov r0, r6 802dc6e: f7fe ffb7 bl 802cbe0 DataFlag=0; 802dc72: 4b1c ldr r3, [pc, #112] ; (802dce4 ) 802dc74: 2100 movs r1, #0 802dc76: 6019 str r1, [r3, #0] BrowserFlag = 0; 802dc78: 4b12 ldr r3, [pc, #72] ; (802dcc4 ) memset(sendBuf, 0, size); 802dc7a: f8d8 2000 ldr.w r2, [r8] strncat(&sendBuf, ptr, receivedBufLen); strncat(&sendBuf, " ", 1); HTTP_SetInfo(sendBuf, strlen(&sendBuf)); DataFlag=0; BrowserFlag = 0; 802dc7e: 6019 str r1, [r3, #0] memset(sendBuf, 0, size); 802dc80: 4630 mov r0, r6 802dc82: f7f4 f8c9 bl 8021e18 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802dc86: 4910 ldr r1, [pc, #64] ; (802dcc8 ) 802dc88: 4630 mov r0, r6 802dc8a: f7f4 fa3f bl 802210c strcat(sendBuf, "\r\n\r\n"); 802dc8e: 490f ldr r1, [pc, #60] ; (802dccc ) 802dc90: 4630 mov r0, r6 802dc92: f7f4 f927 bl 8021ee4 strcat(sendBuf,"\r\n\r\n"); 802dc96: 4630 mov r0, r6 802dc98: 4916 ldr r1, [pc, #88] ; (802dcf4 ) 802dc9a: e713 b.n 802dac4 } /* not last data packet */ else { /* write data in flash */ if(receivedBufLen) 802dc9c: 2a00 cmp r2, #0 802dc9e: f000 8103 beq.w 802dea8 { strncat(&sendBuf, ptr, receivedBufLen); 802dca2: 4805 ldr r0, [pc, #20] ; (802dcb8 ) 802dca4: f7f4 fac0 bl 8022228 802dca8: e0fe b.n 802dea8 802dcaa: bf00 nop 802dcac: 20000d88 .word 0x20000d88 802dcb0: 20000d7c .word 0x20000d7c 802dcb4: 20000d74 .word 0x20000d74 802dcb8: 2000dbf0 .word 0x2000dbf0 802dcbc: 080392c9 .word 0x080392c9 802dcc0: 20000d84 .word 0x20000d84 802dcc4: 20000d64 .word 0x20000d64 802dcc8: 080404b3 .word 0x080404b3 802dccc: 080405bd .word 0x080405bd 802dcd0: 080404c5 .word 0x080404c5 802dcd4: 20000d5c .word 0x20000d5c 802dcd8: 08040534 .word 0x08040534 802dcdc: 2000e3c0 .word 0x2000e3c0 802dce0: 08040542 .word 0x08040542 802dce4: 20000d70 .word 0x20000d70 802dce8: 20000721 .word 0x20000721 802dcec: 20000d80 .word 0x20000d80 802dcf0: 08040551 .word 0x08040551 802dcf4: 08040557 .word 0x08040557 } } } } else if (strncmp(data, "GET /history.cgi", 16) == 0) 802dcf8: 4630 mov r0, r6 802dcfa: 496f ldr r1, [pc, #444] ; (802deb8 ) 802dcfc: 2210 movs r2, #16 802dcfe: f7f4 fac5 bl 802228c 802dd02: b9e8 cbnz r0, 802dd40 { int res; res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802dd04: 4e6d ldr r6, [pc, #436] ; (802debc ) 802dd06: 4b6e ldr r3, [pc, #440] ; (802dec0 ) 802dd08: f8df 81c4 ldr.w r8, [pc, #452] ; 802ded0 802dd0c: 881a ldrh r2, [r3, #0] 802dd0e: 486d ldr r0, [pc, #436] ; (802dec4 ) 802dd10: 4633 mov r3, r6 802dd12: 4641 mov r1, r8 802dd14: f7ff fa90 bl 802d238 if (res == SEND_REQUIRED_FILE) 802dd18: 2802 cmp r0, #2 802dd1a: 4633 mov r3, r6 802dd1c: d10a bne.n 802dd34 { hs->file = sendBuf; hs->left = sendBufLoadLen; 802dd1e: 8833 ldrh r3, [r6, #0] res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; 802dd20: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; send_data(pcb, hs); 802dd24: 4628 mov r0, r5 802dd26: 4621 mov r1, r4 res = HTTP_HistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; hs->left = sendBufLoadLen; 802dd28: 6063 str r3, [r4, #4] send_data(pcb, hs); 802dd2a: f7fe fb85 bl 802c438 tcp_sent(pcb, http_sent_history); 802dd2e: 4628 mov r0, r5 802dd30: 4965 ldr r1, [pc, #404] ; (802dec8 ) 802dd32: e01f b.n 802dd74 tcp_err(pcb, http_sent_log_err); } else if (res == SEND_REQUIRED_YES) { 802dd34: 2800 cmp r0, #0 802dd36: f040 80b7 bne.w 802dea8 hs->file = sendBuf; 802dd3a: f8c4 8000 str.w r8, [r4] 802dd3e: e026 b.n 802dd8e hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /ups_history.cgi", 19) == 0) 802dd40: 4630 mov r0, r6 802dd42: 4962 ldr r1, [pc, #392] ; (802decc ) 802dd44: 2213 movs r2, #19 802dd46: f7f4 faa1 bl 802228c 802dd4a: bb10 cbnz r0, 802dd92 { int res; res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802dd4c: 4b5c ldr r3, [pc, #368] ; (802dec0 ) 802dd4e: 485d ldr r0, [pc, #372] ; (802dec4 ) 802dd50: 881a ldrh r2, [r3, #0] 802dd52: 495f ldr r1, [pc, #380] ; (802ded0 ) 802dd54: 4b59 ldr r3, [pc, #356] ; (802debc ) 802dd56: f7ff fa0f bl 802d178 if (res == SEND_REQUIRED_FILE) 802dd5a: 2802 cmp r0, #2 802dd5c: d111 bne.n 802dd82 { hs->file = sendBuf; 802dd5e: 4b5c ldr r3, [pc, #368] ; (802ded0 ) 802dd60: 6023 str r3, [r4, #0] hs->left = sendBufLoadLen; 802dd62: 4b56 ldr r3, [pc, #344] ; (802debc ) 802dd64: 881b ldrh r3, [r3, #0] send_data(pcb, hs); 802dd66: 4628 mov r0, r5 802dd68: 4621 mov r1, r4 res = HTTP_UpsHistoryPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); if (res == SEND_REQUIRED_FILE) { hs->file = sendBuf; hs->left = sendBufLoadLen; 802dd6a: 6063 str r3, [r4, #4] send_data(pcb, hs); 802dd6c: f7fe fb64 bl 802c438 tcp_sent(pcb, http_sent_log); 802dd70: 4958 ldr r1, [pc, #352] ; (802ded4 ) 802dd72: 4628 mov r0, r5 802dd74: f002 fa50 bl 8030218 tcp_err(pcb, http_sent_log_err); 802dd78: 4628 mov r0, r5 802dd7a: 4957 ldr r1, [pc, #348] ; (802ded8 ) 802dd7c: f002 fa4e bl 803021c 802dd80: e092 b.n 802dea8 } else if (res == SEND_REQUIRED_YES) { 802dd82: 2800 cmp r0, #0 802dd84: f040 8090 bne.w 802dea8 hs->file = sendBuf; 802dd88: 4b51 ldr r3, [pc, #324] ; (802ded0 ) 802dd8a: 6023 str r3, [r4, #0] hs->left = sendBufLoadLen; 802dd8c: 4b4b ldr r3, [pc, #300] ; (802debc ) 802dd8e: 881b ldrh r3, [r3, #0] 802dd90: e081 b.n 802de96 send_data(pcb, hs); tcp_sent(pcb, http_sent); } } /* Тест АКБ ИБП */ else if (strncmp(data, "GET /bat_test.cgi", 17) == 0) 802dd92: 4630 mov r0, r6 802dd94: 4951 ldr r1, [pc, #324] ; (802dedc ) 802dd96: 2211 movs r2, #17 802dd98: f7f4 fa78 bl 802228c 802dd9c: b950 cbnz r0, 802ddb4 { HTTP_UPSTest(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802dd9e: f8df 8130 ldr.w r8, [pc, #304] ; 802ded0 802dda2: 4e46 ldr r6, [pc, #280] ; (802debc ) 802dda4: 4b46 ldr r3, [pc, #280] ; (802dec0 ) 802dda6: 4847 ldr r0, [pc, #284] ; (802dec4 ) 802dda8: 881a ldrh r2, [r3, #0] 802ddaa: 4641 mov r1, r8 802ddac: 4633 mov r3, r6 802ddae: f7fe fe93 bl 802cad8 802ddb2: e062 b.n 802de7a hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Выключение ИБП */ else if (strncmp(data, "GET /ups_power.cgi", 18) == 0) 802ddb4: 4630 mov r0, r6 802ddb6: 494a ldr r1, [pc, #296] ; (802dee0 ) 802ddb8: 2212 movs r2, #18 802ddba: f7f4 fa67 bl 802228c 802ddbe: b950 cbnz r0, 802ddd6 { HTTP_UPSshutdown(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802ddc0: f8df 810c ldr.w r8, [pc, #268] ; 802ded0 802ddc4: 4e3d ldr r6, [pc, #244] ; (802debc ) 802ddc6: 4b3e ldr r3, [pc, #248] ; (802dec0 ) 802ddc8: 483e ldr r0, [pc, #248] ; (802dec4 ) 802ddca: 881a ldrh r2, [r3, #0] 802ddcc: 4641 mov r1, r8 802ddce: 4633 mov r3, r6 802ddd0: f7fe fe0c bl 802c9ec 802ddd4: e051 b.n 802de7a hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Сброс настроек и сохранине */ else if (strncmp(data, "GET /reset.cgi", 14) == 0) 802ddd6: 4630 mov r0, r6 802ddd8: 4942 ldr r1, [pc, #264] ; (802dee4 ) 802ddda: 220e movs r2, #14 802dddc: f7f4 fa56 bl 802228c 802dde0: b928 cbnz r0, 802ddee { HTTP_ResetSettings(); 802dde2: f000 fd2d bl 802e840 HTTP_SaveSettings(); 802dde6: f000 fd3f bl 802e868 fs_open("/settings.html", &file); 802ddea: 483f ldr r0, [pc, #252] ; (802dee8 ) 802ddec: e04d b.n 802de8a hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Перезагрузка контроллера */ else if (strncmp(data, "GET /reboot.cgi", 15) == 0) 802ddee: 4630 mov r0, r6 802ddf0: 493e ldr r1, [pc, #248] ; (802deec ) 802ddf2: 220f movs r2, #15 802ddf4: f7f4 fa4a bl 802228c 802ddf8: b910 cbnz r0, 802de00 { HTTP_Reboot(); 802ddfa: f000 fd61 bl 802e8c0 802ddfe: e053 b.n 802dea8 } /* Подтверждение новых сетевых настроек */ else if (strncmp(data, "GET /confirm.cgi", 16) == 0) 802de00: 4630 mov r0, r6 802de02: 493b ldr r1, [pc, #236] ; (802def0 ) 802de04: 2210 movs r2, #16 802de06: f7f4 fa41 bl 802228c 802de0a: b920 cbnz r0, 802de16 { SetWebReinitFlag(false); 802de0c: f7fa fbd8 bl 80285c0 SetConfirmWebParamsFlag(); 802de10: f7fa fbdc bl 80285cc 802de14: e038 b.n 802de88 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Проверка пароля, переход в bootloader */ else if (strncmp(data, "GET /fw_update.cgi", 18) == 0) 802de16: 4630 mov r0, r6 802de18: 4936 ldr r1, [pc, #216] ; (802def4 ) 802de1a: 2212 movs r2, #18 802de1c: f7f4 fa36 bl 802228c 802de20: b950 cbnz r0, 802de38 { HTTP_ConfirmBootPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802de22: f8df 80ac ldr.w r8, [pc, #172] ; 802ded0 802de26: 4e25 ldr r6, [pc, #148] ; (802debc ) 802de28: 4b25 ldr r3, [pc, #148] ; (802dec0 ) 802de2a: 4826 ldr r0, [pc, #152] ; (802dec4 ) 802de2c: 881a ldrh r2, [r3, #0] 802de2e: 4641 mov r1, r8 802de30: 4633 mov r3, r6 802de32: f7fe fc89 bl 802c748 802de36: e020 b.n 802de7a hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Смена пароля пользователя */ else if (strncmp(data, "GET /changepwd.cgi", 18) == 0) 802de38: 4630 mov r0, r6 802de3a: 492f ldr r1, [pc, #188] ; (802def8 ) 802de3c: 2212 movs r2, #18 802de3e: f7f4 fa25 bl 802228c 802de42: b950 cbnz r0, 802de5a { HTTP_ChangeUserPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802de44: f8df 8088 ldr.w r8, [pc, #136] ; 802ded0 802de48: 4e1c ldr r6, [pc, #112] ; (802debc ) 802de4a: 4b1d ldr r3, [pc, #116] ; (802dec0 ) 802de4c: 481d ldr r0, [pc, #116] ; (802dec4 ) 802de4e: 881a ldrh r2, [r3, #0] 802de50: 4641 mov r1, r8 802de52: 4633 mov r3, r6 802de54: f7ff fa52 bl 802d2fc 802de58: e00f b.n 802de7a hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } // На производстве else if (strncmp(data, "GET /setProdate.cgi", 19) == 0) 802de5a: 4630 mov r0, r6 802de5c: 4927 ldr r1, [pc, #156] ; (802defc ) 802de5e: 2213 movs r2, #19 802de60: f7f4 fa14 bl 802228c 802de64: b968 cbnz r0, 802de82 { HTTP_Prodate(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802de66: 4b16 ldr r3, [pc, #88] ; (802dec0 ) 802de68: f8df 8064 ldr.w r8, [pc, #100] ; 802ded0 802de6c: 4e13 ldr r6, [pc, #76] ; (802debc ) 802de6e: 881a ldrh r2, [r3, #0] 802de70: 4814 ldr r0, [pc, #80] ; (802dec4 ) 802de72: 4641 mov r1, r8 802de74: 4633 mov r3, r6 802de76: f7ff f94b bl 802d110 hs->file = sendBuf; 802de7a: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; 802de7e: 8833 ldrh r3, [r6, #0] 802de80: e009 b.n 802de96 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else { HTTP_UpdateUserLoginTime(user_id); 802de82: 4640 mov r0, r8 802de84: f7fe fa8a bl 802c39c fs_open("/index.html", &file); // + 802de88: 481d ldr r0, [pc, #116] ; (802df00 ) 802de8a: a903 add r1, sp, #12 802de8c: f7fe fa98 bl 802c3c0 hs->file = file.data; 802de90: 9b03 ldr r3, [sp, #12] 802de92: 6023 str r3, [r4, #0] hs->left = file.len; 802de94: 9b04 ldr r3, [sp, #16] 802de96: 6063 str r3, [r4, #4] send_data(pcb, hs); 802de98: 4628 mov r0, r5 802de9a: 4621 mov r1, r4 802de9c: f7fe facc bl 802c438 tcp_sent(pcb, http_sent); 802dea0: 4628 mov r0, r5 802dea2: 4918 ldr r1, [pc, #96] ; (802df04 ) 802dea4: f002 f9b8 bl 8030218 } } } pbuf_free(p); 802dea8: 4638 mov r0, r7 802deaa: f001 feed bl 802fc88 /* if (err == ERR_OK && p == NULL) { close_conn(pcb, hs); }*/ return ERR_OK; } 802deae: 2000 movs r0, #0 802deb0: b01b add sp, #108 ; 0x6c 802deb2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802deb6: bf00 nop 802deb8: 080405c2 .word 0x080405c2 802debc: 20000d5c .word 0x20000d5c 802dec0: 20000d88 .word 0x20000d88 802dec4: 2000e3c0 .word 0x2000e3c0 802dec8: 0802c565 .word 0x0802c565 802decc: 080405d3 .word 0x080405d3 802ded0: 2000dbf0 .word 0x2000dbf0 802ded4: 0802c4c5 .word 0x0802c4c5 802ded8: 0802c319 .word 0x0802c319 802dedc: 080405e8 .word 0x080405e8 802dee0: 080405fa .word 0x080405fa 802dee4: 0804060d .word 0x0804060d 802dee8: 08040421 .word 0x08040421 802deec: 0804061c .word 0x0804061c 802def0: 0804062c .word 0x0804062c 802def4: 0804063d .word 0x0804063d 802def8: 08040650 .word 0x08040650 802defc: 08040663 .word 0x08040663 802df00: 08040430 .word 0x08040430 802df04: 0802c4ab .word 0x0802c4ab 0802df08 : /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802df08: b510 push {r4, lr} char str[40]; uint8_t len; memset(buf, 0, 1000); 802df0a: f44f 727a mov.w r2, #1000 ; 0x3e8 /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802df0e: b08c sub sp, #48 ; 0x30 802df10: 4604 mov r4, r0 char str[40]; uint8_t len; memset(buf, 0, 1000); 802df12: 2100 movs r1, #0 802df14: f7f3 ff80 bl 8021e18 // Headers для поддержки saffari strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802df18: 4620 mov r0, r4 802df1a: 496f ldr r1, [pc, #444] ; (802e0d8 ) 802df1c: f7f4 f8f6 bl 802210c // Параметры UPS GetInputVoltageStr(str, &len); 802df20: a802 add r0, sp, #8 802df22: f10d 0107 add.w r1, sp, #7 802df26: f7f9 ff17 bl 8027d58 strcat(buf, "{\"AC\":\""); 802df2a: 4620 mov r0, r4 802df2c: 496b ldr r1, [pc, #428] ; (802e0dc ) 802df2e: f7f3 ffd9 bl 8021ee4 strncat(buf, str, len); 802df32: f89d 2007 ldrb.w r2, [sp, #7] 802df36: a902 add r1, sp, #8 802df38: 4620 mov r0, r4 802df3a: f7f4 f975 bl 8022228 GetOutputVoltageStr(str, &len); 802df3e: a802 add r0, sp, #8 802df40: f10d 0107 add.w r1, sp, #7 802df44: f7f9 ff1e bl 8027d84 strcat(buf, "\",\"DC\":\""); 802df48: 4620 mov r0, r4 802df4a: 4965 ldr r1, [pc, #404] ; (802e0e0 ) 802df4c: f7f3 ffca bl 8021ee4 strncat(buf, str, len); 802df50: f89d 2007 ldrb.w r2, [sp, #7] 802df54: a902 add r1, sp, #8 802df56: 4620 mov r0, r4 802df58: f7f4 f966 bl 8022228 GetInputFreqStr(str, &len); 802df5c: a802 add r0, sp, #8 802df5e: f10d 0107 add.w r1, sp, #7 802df62: f7f9 fecd bl 8027d00 strcat(buf, "\",\"in_freq\":\""); 802df66: 4620 mov r0, r4 802df68: 495e ldr r1, [pc, #376] ; (802e0e4 ) 802df6a: f7f3 ffbb bl 8021ee4 strncat(buf, str, len); 802df6e: f89d 2007 ldrb.w r2, [sp, #7] 802df72: a902 add r1, sp, #8 802df74: 4620 mov r0, r4 802df76: f7f4 f957 bl 8022228 GetOutputFreqStr(str, &len); 802df7a: a802 add r0, sp, #8 802df7c: f10d 0107 add.w r1, sp, #7 802df80: f7f9 fed4 bl 8027d2c strcat(buf, "\",\"out_freq\":\""); 802df84: 4620 mov r0, r4 802df86: 4958 ldr r1, [pc, #352] ; (802e0e8 ) 802df88: f7f3 ffac bl 8021ee4 strncat(buf, str, len); 802df8c: f89d 2007 ldrb.w r2, [sp, #7] 802df90: a902 add r1, sp, #8 802df92: 4620 mov r0, r4 802df94: f7f4 f948 bl 8022228 GetPowerStr(str, &len); 802df98: a802 add r0, sp, #8 802df9a: f10d 0107 add.w r1, sp, #7 802df9e: f7f9 ff07 bl 8027db0 strcat(buf, "\",\"pwr\":\""); 802dfa2: 4620 mov r0, r4 802dfa4: 4951 ldr r1, [pc, #324] ; (802e0ec ) 802dfa6: f7f3 ff9d bl 8021ee4 strncat(buf, str, len); 802dfaa: f89d 2007 ldrb.w r2, [sp, #7] 802dfae: a902 add r1, sp, #8 802dfb0: 4620 mov r0, r4 802dfb2: f7f4 f939 bl 8022228 GetBatCapacityStr(str, &len); 802dfb6: a802 add r0, sp, #8 802dfb8: f10d 0107 add.w r1, sp, #7 802dfbc: f7f9 ff0a bl 8027dd4 strcat(buf, "\",\"bat_cap\":\""); 802dfc0: 4620 mov r0, r4 802dfc2: 494b ldr r1, [pc, #300] ; (802e0f0 ) 802dfc4: f7f3 ff8e bl 8021ee4 strncat(buf, str, len); 802dfc8: f89d 2007 ldrb.w r2, [sp, #7] 802dfcc: a902 add r1, sp, #8 802dfce: 4620 mov r0, r4 802dfd0: f7f4 f92a bl 8022228 GetInternalTempStr(str, &len); 802dfd4: a802 add r0, sp, #8 802dfd6: f10d 0107 add.w r1, sp, #7 802dfda: f7f9 ff1f bl 8027e1c strcat(buf, "\",\"inner_temp\":\""); 802dfde: 4620 mov r0, r4 802dfe0: 4944 ldr r1, [pc, #272] ; (802e0f4 ) 802dfe2: f7f3 ff7f bl 8021ee4 strncat(buf, str, len); 802dfe6: f89d 2007 ldrb.w r2, [sp, #7] 802dfea: a902 add r1, sp, #8 802dfec: 4620 mov r0, r4 802dfee: f7f4 f91b bl 8022228 GetRuntimeStr(str, &len); 802dff2: a802 add r0, sp, #8 802dff4: f10d 0107 add.w r1, sp, #7 802dff8: f7f9 fefe bl 8027df8 strcat(buf, "\",\"bat_time_left\":\""); 802dffc: 4620 mov r0, r4 802dffe: 493e ldr r1, [pc, #248] ; (802e0f8 ) 802e000: f7f3 ff70 bl 8021ee4 strncat(buf, str, len); 802e004: a902 add r1, sp, #8 802e006: f89d 2007 ldrb.w r2, [sp, #7] 802e00a: 4620 mov r0, r4 802e00c: f7f4 f90c bl 8022228 GetDINStatusStr(str, &len, 0); 802e010: 2200 movs r2, #0 802e012: a802 add r0, sp, #8 802e014: f10d 0107 add.w r1, sp, #7 802e018: f7fa f804 bl 8028024 strcat(buf, "\",\"di1\":\""); 802e01c: 4620 mov r0, r4 802e01e: 4937 ldr r1, [pc, #220] ; (802e0fc ) 802e020: f7f3 ff60 bl 8021ee4 strncat(buf, str, len); 802e024: a902 add r1, sp, #8 802e026: f89d 2007 ldrb.w r2, [sp, #7] 802e02a: 4620 mov r0, r4 802e02c: f7f4 f8fc bl 8022228 GetDOUTStatusStr(str, &len, 0); 802e030: a802 add r0, sp, #8 802e032: f10d 0107 add.w r1, sp, #7 802e036: 2200 movs r2, #0 802e038: f7fa f82e bl 8028098 strcat(buf, "\",\"ro1\":\""); 802e03c: 4620 mov r0, r4 802e03e: 4930 ldr r1, [pc, #192] ; (802e100 ) 802e040: f7f3 ff50 bl 8021ee4 strncat(buf, str, len); 802e044: a902 add r1, sp, #8 802e046: f89d 2007 ldrb.w r2, [sp, #7] 802e04a: 4620 mov r0, r4 802e04c: f7f4 f8ec bl 8022228 GetDOUTStatusStr(str, &len, 1); 802e050: 2201 movs r2, #1 802e052: a802 add r0, sp, #8 802e054: f10d 0107 add.w r1, sp, #7 802e058: f7fa f81e bl 8028098 strcat(buf, "\",\"ro2\":\""); 802e05c: 4620 mov r0, r4 802e05e: 4929 ldr r1, [pc, #164] ; (802e104 ) 802e060: f7f3 ff40 bl 8021ee4 strncat(buf, str, len); 802e064: f89d 2007 ldrb.w r2, [sp, #7] 802e068: a902 add r1, sp, #8 802e06a: 4620 mov r0, r4 802e06c: f7f4 f8dc bl 8022228 // Мониторинг // load_monitor (нагрузка, 0 - норма, 1 - fail) // temp_monitor (внутренняя температура, 0 - норма, 1 - fail) // connect_monitor (связь с UPSом, 0 - норма, 1 - fail) GetAlarmMonitorStr(str, &len); 802e070: a802 add r0, sp, #8 802e072: f10d 0107 add.w r1, sp, #7 802e076: f7f9 fee7 bl 8027e48 strcat(buf, "\",\"m_alarm\":\""); 802e07a: 4620 mov r0, r4 802e07c: 4922 ldr r1, [pc, #136] ; (802e108 ) 802e07e: f7f3 ff31 bl 8021ee4 strncat(buf, str, len); 802e082: f89d 2007 ldrb.w r2, [sp, #7] 802e086: a902 add r1, sp, #8 802e088: 4620 mov r0, r4 802e08a: f7f4 f8cd bl 8022228 GetAlarmStr(str, &len); 802e08e: a802 add r0, sp, #8 802e090: f10d 0107 add.w r1, sp, #7 802e094: f7f9 ff02 bl 8027e9c strcat(buf, "\",\"u_alarm\":\""); 802e098: 4620 mov r0, r4 802e09a: 491c ldr r1, [pc, #112] ; (802e10c ) 802e09c: f7f3 ff22 bl 8021ee4 strncat(buf, str, len); 802e0a0: f89d 2007 ldrb.w r2, [sp, #7] 802e0a4: a902 add r1, sp, #8 802e0a6: 4620 mov r0, r4 802e0a8: f7f4 f8be bl 8022228 // Признак изменения сетевых настроек GetWebReinitFlag(str, &len); 802e0ac: a802 add r0, sp, #8 802e0ae: f10d 0107 add.w r1, sp, #7 802e0b2: f7fa fa5f bl 8028574 strcat(buf, "\",\"netsettings_changed\":\""); 802e0b6: 4620 mov r0, r4 802e0b8: 4915 ldr r1, [pc, #84] ; (802e110 ) 802e0ba: f7f3 ff13 bl 8021ee4 strncat(buf, str, len); 802e0be: a902 add r1, sp, #8 802e0c0: f89d 2007 ldrb.w r2, [sp, #7] 802e0c4: 4620 mov r0, r4 802e0c6: f7f4 f8af bl 8022228 strncat(buf, "\"}", 2); 802e0ca: 4620 mov r0, r4 802e0cc: 4911 ldr r1, [pc, #68] ; (802e114 ) 802e0ce: 2202 movs r2, #2 802e0d0: f7f4 f8aa bl 8022228 //printf(buf); } 802e0d4: b00c add sp, #48 ; 0x30 802e0d6: bd10 pop {r4, pc} 802e0d8: 0804439c .word 0x0804439c 802e0dc: 080443c8 .word 0x080443c8 802e0e0: 080443d0 .word 0x080443d0 802e0e4: 080443d9 .word 0x080443d9 802e0e8: 080443e7 .word 0x080443e7 802e0ec: 080443f6 .word 0x080443f6 802e0f0: 08044400 .word 0x08044400 802e0f4: 0804440e .word 0x0804440e 802e0f8: 0804441f .word 0x0804441f 802e0fc: 08044433 .word 0x08044433 802e100: 0804443d .word 0x0804443d 802e104: 08044447 .word 0x08044447 802e108: 08044451 .word 0x08044451 802e10c: 0804445f .word 0x0804445f 802e110: 0804446d .word 0x0804446d 802e114: 08044487 .word 0x08044487 0802e118 : /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 802e118: b510 push {r4, lr} char str[30]; uint8_t len; /* Headers для поддержки saffari */ strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802e11a: 49bf ldr r1, [pc, #764] ; (802e418 ) /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 802e11c: b08a sub sp, #40 ; 0x28 802e11e: 4604 mov r4, r0 char str[30]; uint8_t len; /* Headers для поддержки saffari */ strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802e120: f7f3 fff4 bl 802210c /* SNMP */ GetReadCommunity(str, &len); 802e124: a802 add r0, sp, #8 802e126: f10d 0107 add.w r1, sp, #7 802e12a: f7fa f953 bl 80283d4 strcat(buf, "{\"read_community\":\""); 802e12e: 4620 mov r0, r4 802e130: 49ba ldr r1, [pc, #744] ; (802e41c ) 802e132: f7f3 fed7 bl 8021ee4 strncat(buf, str, len); 802e136: f89d 2007 ldrb.w r2, [sp, #7] 802e13a: a902 add r1, sp, #8 802e13c: 4620 mov r0, r4 802e13e: f7f4 f873 bl 8022228 GetWriteCommunity(str, &len); 802e142: a802 add r0, sp, #8 802e144: f10d 0107 add.w r1, sp, #7 802e148: f7fa f954 bl 80283f4 strcat(buf, "\",\"write_community\":\""); 802e14c: 4620 mov r0, r4 802e14e: 49b4 ldr r1, [pc, #720] ; (802e420 ) 802e150: f7f3 fec8 bl 8021ee4 strncat(buf, str, len); 802e154: f89d 2007 ldrb.w r2, [sp, #7] 802e158: a902 add r1, sp, #8 802e15a: 4620 mov r0, r4 802e15c: f7f4 f864 bl 8022228 GetManagerIp(str, &len); 802e160: a802 add r0, sp, #8 802e162: f10d 0107 add.w r1, sp, #7 802e166: f7fa f955 bl 8028414 strcat(buf, "\",\"managerIP\":\""); 802e16a: 4620 mov r0, r4 802e16c: 49ad ldr r1, [pc, #692] ; (802e424 ) 802e16e: f7f3 feb9 bl 8021ee4 strncat(buf, str, len); 802e172: f89d 2007 ldrb.w r2, [sp, #7] 802e176: a902 add r1, sp, #8 802e178: 4620 mov r0, r4 802e17a: f7f4 f855 bl 8022228 GetManagerIp2(str, &len); 802e17e: a802 add r0, sp, #8 802e180: f10d 0107 add.w r1, sp, #7 802e184: f7fa f956 bl 8028434 strcat(buf, "\",\"managerIP2\":\""); 802e188: 4620 mov r0, r4 802e18a: 49a7 ldr r1, [pc, #668] ; (802e428 ) 802e18c: f7f3 feaa bl 8021ee4 strncat(buf, str, len); 802e190: f89d 2007 ldrb.w r2, [sp, #7] 802e194: a902 add r1, sp, #8 802e196: 4620 mov r0, r4 802e198: f7f4 f846 bl 8022228 GetManagerIp3(str, &len); 802e19c: a802 add r0, sp, #8 802e19e: f10d 0107 add.w r1, sp, #7 802e1a2: f7fa f957 bl 8028454 strcat(buf, "\",\"managerIP3\":\""); 802e1a6: 4620 mov r0, r4 802e1a8: 49a0 ldr r1, [pc, #640] ; (802e42c ) 802e1aa: f7f3 fe9b bl 8021ee4 strncat(buf, str, len); 802e1ae: f89d 2007 ldrb.w r2, [sp, #7] 802e1b2: a902 add r1, sp, #8 802e1b4: 4620 mov r0, r4 802e1b6: f7f4 f837 bl 8022228 GetManagerIp4(str, &len); 802e1ba: a802 add r0, sp, #8 802e1bc: f10d 0107 add.w r1, sp, #7 802e1c0: f7fa f958 bl 8028474 strcat(buf, "\",\"managerIP4\":\""); 802e1c4: 4620 mov r0, r4 802e1c6: 499a ldr r1, [pc, #616] ; (802e430 ) 802e1c8: f7f3 fe8c bl 8021ee4 strncat(buf, str, len); 802e1cc: f89d 2007 ldrb.w r2, [sp, #7] 802e1d0: a902 add r1, sp, #8 802e1d2: 4620 mov r0, r4 802e1d4: f7f4 f828 bl 8022228 GetManagerIp5(str, &len); 802e1d8: a802 add r0, sp, #8 802e1da: f10d 0107 add.w r1, sp, #7 802e1de: f7fa f959 bl 8028494 strcat(buf, "\",\"managerIP5\":\""); 802e1e2: 4620 mov r0, r4 802e1e4: 4993 ldr r1, [pc, #588] ; (802e434 ) 802e1e6: f7f3 fe7d bl 8021ee4 strncat(buf, str, len); 802e1ea: a902 add r1, sp, #8 802e1ec: f89d 2007 ldrb.w r2, [sp, #7] 802e1f0: 4620 mov r0, r4 802e1f2: f7f4 f819 bl 8022228 /*Параметры реле и сухих контактов*/ GetDINTypeActStr(str, &len, 0); 802e1f6: 2200 movs r2, #0 802e1f8: a802 add r0, sp, #8 802e1fa: f10d 0107 add.w r1, sp, #7 802e1fe: f7f9 fefd bl 8027ffc strcat(buf, "\",\"di1\":\""); 802e202: 4620 mov r0, r4 802e204: 498c ldr r1, [pc, #560] ; (802e438 ) 802e206: f7f3 fe6d bl 8021ee4 strncat(buf, str, len); 802e20a: a902 add r1, sp, #8 802e20c: f89d 2007 ldrb.w r2, [sp, #7] 802e210: 4620 mov r0, r4 802e212: f7f4 f809 bl 8022228 GetROTypeActStr(str, &len, 0); 802e216: 2200 movs r2, #0 802e218: a802 add r0, sp, #8 802e21a: f10d 0107 add.w r1, sp, #7 802e21e: f7f9 ff27 bl 8028070 strcat(buf, "\",\"ro1\":\""); 802e222: 4620 mov r0, r4 802e224: 4985 ldr r1, [pc, #532] ; (802e43c ) 802e226: f7f3 fe5d bl 8021ee4 strncat(buf, str, len); 802e22a: a902 add r1, sp, #8 802e22c: f89d 2007 ldrb.w r2, [sp, #7] 802e230: 4620 mov r0, r4 802e232: f7f3 fff9 bl 8022228 GetROTypeActStr(str, &len, 1); 802e236: 2201 movs r2, #1 802e238: a802 add r0, sp, #8 802e23a: f10d 0107 add.w r1, sp, #7 802e23e: f7f9 ff17 bl 8028070 strcat(buf, "\",\"ro2\":\""); 802e242: 4620 mov r0, r4 802e244: 497e ldr r1, [pc, #504] ; (802e440 ) 802e246: f7f3 fe4d bl 8021ee4 strncat(buf, str, len); 802e24a: f89d 2007 ldrb.w r2, [sp, #7] 802e24e: a902 add r1, sp, #8 802e250: 4620 mov r0, r4 802e252: f7f3 ffe9 bl 8022228 /* WEB */ GetIpStr(str, &len); 802e256: a802 add r0, sp, #8 802e258: f10d 0107 add.w r1, sp, #7 802e25c: f7fa f864 bl 8028328 strcat(buf, "\",\"ipaddr\":\""); 802e260: 4620 mov r0, r4 802e262: 4978 ldr r1, [pc, #480] ; (802e444 ) 802e264: f7f3 fe3e bl 8021ee4 strncat(buf, str, len); 802e268: f89d 2007 ldrb.w r2, [sp, #7] 802e26c: a902 add r1, sp, #8 802e26e: 4620 mov r0, r4 802e270: f7f3 ffda bl 8022228 GetGatewayStr(str, &len); 802e274: a802 add r0, sp, #8 802e276: f10d 0107 add.w r1, sp, #7 802e27a: f7fa f86b bl 8028354 strcat(buf, "\",\"gw\":\""); 802e27e: 4620 mov r0, r4 802e280: 4971 ldr r1, [pc, #452] ; (802e448 ) 802e282: f7f3 fe2f bl 8021ee4 strncat(buf, str, len); 802e286: f89d 2007 ldrb.w r2, [sp, #7] 802e28a: a902 add r1, sp, #8 802e28c: 4620 mov r0, r4 802e28e: f7f3 ffcb bl 8022228 GetMaskStr(str, &len); 802e292: a802 add r0, sp, #8 802e294: f10d 0107 add.w r1, sp, #7 802e298: f7fa f872 bl 8028380 strcat(buf, "\",\"mask\":\""); 802e29c: 4620 mov r0, r4 802e29e: 496b ldr r1, [pc, #428] ; (802e44c ) 802e2a0: f7f3 fe20 bl 8021ee4 strncat(buf, str, len); 802e2a4: f89d 2007 ldrb.w r2, [sp, #7] 802e2a8: a902 add r1, sp, #8 802e2aa: 4620 mov r0, r4 802e2ac: f7f3 ffbc bl 8022228 GetDhcpStateStr(str, &len); 802e2b0: a802 add r0, sp, #8 802e2b2: f10d 0107 add.w r1, sp, #7 802e2b6: f7fa f879 bl 80283ac strcat(buf, "\",\"dhcp\":"); 802e2ba: 4620 mov r0, r4 802e2bc: 4964 ldr r1, [pc, #400] ; (802e450 ) 802e2be: f7f3 fe11 bl 8021ee4 strncat(buf, str, len); 802e2c2: f89d 2007 ldrb.w r2, [sp, #7] 802e2c6: a902 add r1, sp, #8 802e2c8: 4620 mov r0, r4 802e2ca: f7f3 ffad bl 8022228 GetAuthEnableStateStr(str, &len); 802e2ce: a802 add r0, sp, #8 802e2d0: f10d 0107 add.w r1, sp, #7 802e2d4: f7fa f940 bl 8028558 strcat(buf, ",\"swauth\":"); 802e2d8: 4620 mov r0, r4 802e2da: 495e ldr r1, [pc, #376] ; (802e454 ) 802e2dc: f7f3 fe02 bl 8021ee4 strncat(buf, str, len); 802e2e0: f89d 2007 ldrb.w r2, [sp, #7] 802e2e4: a902 add r1, sp, #8 802e2e6: 4620 mov r0, r4 802e2e8: f7f3 ff9e bl 8022228 /* RADIUS */ GetRDSIpStr(str, &len); 802e2ec: a802 add r0, sp, #8 802e2ee: f10d 0107 add.w r1, sp, #7 802e2f2: f7fa f8df bl 80284b4 strcat(buf, ",\"rs_server\":\""); 802e2f6: 4620 mov r0, r4 802e2f8: 4957 ldr r1, [pc, #348] ; (802e458 ) 802e2fa: f7f3 fdf3 bl 8021ee4 strncat(buf, str, len); 802e2fe: f89d 2007 ldrb.w r2, [sp, #7] 802e302: a902 add r1, sp, #8 802e304: 4620 mov r0, r4 802e306: f7f3 ff8f bl 8022228 GetRDSPortStr(str, &len); 802e30a: a802 add r0, sp, #8 802e30c: f10d 0107 add.w r1, sp, #7 802e310: f7fa f8e0 bl 80284d4 strcat(buf, "\",\"rs_port\":\""); 802e314: 4620 mov r0, r4 802e316: 4951 ldr r1, [pc, #324] ; (802e45c ) 802e318: f7f3 fde4 bl 8021ee4 strncat(buf, str, len); 802e31c: f89d 2007 ldrb.w r2, [sp, #7] 802e320: a902 add r1, sp, #8 802e322: 4620 mov r0, r4 802e324: f7f3 ff80 bl 8022228 GetRDSPasswordkStr(str, &len); 802e328: a802 add r0, sp, #8 802e32a: f10d 0107 add.w r1, sp, #7 802e32e: f7fa f8f5 bl 802851c strcat(buf, "\",\"rs_pwd\":\""); 802e332: 4620 mov r0, r4 802e334: 494a ldr r1, [pc, #296] ; (802e460 ) 802e336: f7f3 fdd5 bl 8021ee4 strncat(buf, str, len); 802e33a: f89d 2007 ldrb.w r2, [sp, #7] 802e33e: a902 add r1, sp, #8 802e340: 4620 mov r0, r4 802e342: f7f3 ff71 bl 8022228 GetRDSKeyAccesstStr(str, &len); 802e346: a802 add r0, sp, #8 802e348: f10d 0107 add.w r1, sp, #7 802e34c: f7fa f8d4 bl 80284f8 strcat(buf, "\",\"rs_key\":\""); 802e350: 4620 mov r0, r4 802e352: 4944 ldr r1, [pc, #272] ; (802e464 ) 802e354: f7f3 fdc6 bl 8021ee4 strncat(buf, str, len); 802e358: f89d 2007 ldrb.w r2, [sp, #7] 802e35c: a902 add r1, sp, #8 802e35e: 4620 mov r0, r4 802e360: f7f3 ff62 bl 8022228 GetRDSEnableStateStr(str, &len); 802e364: a802 add r0, sp, #8 802e366: f10d 0107 add.w r1, sp, #7 802e36a: f7fa f8e7 bl 802853c strcat(buf, "\",\"rs_enabled\":"); 802e36e: 4620 mov r0, r4 802e370: 493d ldr r1, [pc, #244] ; (802e468 ) 802e372: f7f3 fdb7 bl 8021ee4 strncat(buf, str, len); 802e376: f89d 2007 ldrb.w r2, [sp, #7] 802e37a: a902 add r1, sp, #8 802e37c: 4620 mov r0, r4 802e37e: f7f3 ff53 bl 8022228 /* Параметры даты и времени */ GetDateStr(str, &len); 802e382: a802 add r0, sp, #8 802e384: f10d 0107 add.w r1, sp, #7 802e388: f7f9 fd9a bl 8027ec0 strcat(buf, ",\"date\":\""); 802e38c: 4620 mov r0, r4 802e38e: 4937 ldr r1, [pc, #220] ; (802e46c ) 802e390: f7f3 fda8 bl 8021ee4 strncat(buf, str, len); 802e394: f89d 2007 ldrb.w r2, [sp, #7] 802e398: a902 add r1, sp, #8 802e39a: 4620 mov r0, r4 802e39c: f7f3 ff44 bl 8022228 GetTimeStr(str, &len); 802e3a0: a802 add r0, sp, #8 802e3a2: f10d 0107 add.w r1, sp, #7 802e3a6: f7f9 fda9 bl 8027efc strcat(buf, "\",\"time\":\""); 802e3aa: 4620 mov r0, r4 802e3ac: 4930 ldr r1, [pc, #192] ; (802e470 ) 802e3ae: f7f3 fd99 bl 8021ee4 strncat(buf, str, len); 802e3b2: f89d 2007 ldrb.w r2, [sp, #7] 802e3b6: a902 add r1, sp, #8 802e3b8: 4620 mov r0, r4 802e3ba: f7f3 ff35 bl 8022228 /* Параметры SNTP */ GetSntpStateStr(str, &len); 802e3be: a802 add r0, sp, #8 802e3c0: f10d 0107 add.w r1, sp, #7 802e3c4: f7f9 fdc8 bl 8027f58 strcat(buf, "\",\"ntp\":\""); 802e3c8: 4620 mov r0, r4 802e3ca: 492a ldr r1, [pc, #168] ; (802e474 ) 802e3cc: f7f3 fd8a bl 8021ee4 strncat(buf, str, len); 802e3d0: f89d 2007 ldrb.w r2, [sp, #7] 802e3d4: a902 add r1, sp, #8 802e3d6: 4620 mov r0, r4 802e3d8: f7f3 ff26 bl 8022228 GetSntpServerIpStr(str, &len); 802e3dc: a802 add r0, sp, #8 802e3de: f10d 0107 add.w r1, sp, #7 802e3e2: f7f9 fdd3 bl 8027f8c strcat(buf, "\",\"ntpservip\":\""); 802e3e6: 4620 mov r0, r4 802e3e8: 4923 ldr r1, [pc, #140] ; (802e478 ) 802e3ea: f7f3 fd7b bl 8021ee4 strncat(buf, str, len); 802e3ee: f89d 2007 ldrb.w r2, [sp, #7] 802e3f2: a902 add r1, sp, #8 802e3f4: 4620 mov r0, r4 802e3f6: f7f3 ff17 bl 8022228 GetSntpTimeZoneStr(str, &len); 802e3fa: a802 add r0, sp, #8 802e3fc: f10d 0107 add.w r1, sp, #7 802e400: f7f9 fdd4 bl 8027fac strcat(buf, "\",\"utc\":\""); 802e404: 4620 mov r0, r4 802e406: 491d ldr r1, [pc, #116] ; (802e47c ) 802e408: f7f3 fd6c bl 8021ee4 strncat(buf, str, len); 802e40c: f89d 2007 ldrb.w r2, [sp, #7] 802e410: a902 add r1, sp, #8 802e412: 4620 mov r0, r4 802e414: e034 b.n 802e480 802e416: bf00 nop 802e418: 0804439c .word 0x0804439c 802e41c: 0804448a .word 0x0804448a 802e420: 0804449e .word 0x0804449e 802e424: 080444b4 .word 0x080444b4 802e428: 080444c4 .word 0x080444c4 802e42c: 080444d5 .word 0x080444d5 802e430: 080444e6 .word 0x080444e6 802e434: 080444f7 .word 0x080444f7 802e438: 08044433 .word 0x08044433 802e43c: 0804443d .word 0x0804443d 802e440: 08044447 .word 0x08044447 802e444: 08044508 .word 0x08044508 802e448: 08044515 .word 0x08044515 802e44c: 0804451e .word 0x0804451e 802e450: 08044529 .word 0x08044529 802e454: 08044533 .word 0x08044533 802e458: 0804453e .word 0x0804453e 802e45c: 0804454d .word 0x0804454d 802e460: 0804455b .word 0x0804455b 802e464: 08044568 .word 0x08044568 802e468: 08044575 .word 0x08044575 802e46c: 08044585 .word 0x08044585 802e470: 0804458f .word 0x0804458f 802e474: 0804459a .word 0x0804459a 802e478: 080445a4 .word 0x080445a4 802e47c: 080445b4 .word 0x080445b4 802e480: f7f3 fed2 bl 8022228 GetUnixTimeStr(str, &len); 802e484: a802 add r0, sp, #8 802e486: f10d 0107 add.w r1, sp, #7 802e48a: f7f9 fd4f bl 8027f2c strcat(buf, "\",\"utm\":\""); 802e48e: 4620 mov r0, r4 802e490: 4916 ldr r1, [pc, #88] ; (802e4ec ) 802e492: f7f3 fd27 bl 8021ee4 strncat(buf, str, len); 802e496: f89d 2007 ldrb.w r2, [sp, #7] 802e49a: a902 add r1, sp, #8 802e49c: 4620 mov r0, r4 802e49e: f7f3 fec3 bl 8022228 GetSntpLastDataStr(str, &len); 802e4a2: a802 add r0, sp, #8 802e4a4: f10d 0107 add.w r1, sp, #7 802e4a8: f7f9 fd98 bl 8027fdc strcat(buf, "\",\"lastsynctime\":\""); 802e4ac: 4620 mov r0, r4 802e4ae: 4910 ldr r1, [pc, #64] ; (802e4f0 ) 802e4b0: f7f3 fd18 bl 8021ee4 strncat(buf, str, len); 802e4b4: f89d 2007 ldrb.w r2, [sp, #7] 802e4b8: a902 add r1, sp, #8 802e4ba: 4620 mov r0, r4 802e4bc: f7f3 feb4 bl 8022228 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 802e4c0: a802 add r0, sp, #8 802e4c2: f10d 0107 add.w r1, sp, #7 802e4c6: f7fa f855 bl 8028574 strcat(buf, "\",\"netsettings_changed\":\""); 802e4ca: 4620 mov r0, r4 802e4cc: 4909 ldr r1, [pc, #36] ; (802e4f4 ) 802e4ce: f7f3 fd09 bl 8021ee4 strncat(buf, str, len); 802e4d2: a902 add r1, sp, #8 802e4d4: f89d 2007 ldrb.w r2, [sp, #7] 802e4d8: 4620 mov r0, r4 802e4da: f7f3 fea5 bl 8022228 strncat(buf, "\"}", 2); 802e4de: 4620 mov r0, r4 802e4e0: 4905 ldr r1, [pc, #20] ; (802e4f8 ) 802e4e2: 2202 movs r2, #2 802e4e4: f7f3 fea0 bl 8022228 //printf(buf); } 802e4e8: b00a add sp, #40 ; 0x28 802e4ea: bd10 pop {r4, pc} 802e4ec: 080445be .word 0x080445be 802e4f0: 080445c8 .word 0x080445c8 802e4f4: 0804446d .word 0x0804446d 802e4f8: 08044487 .word 0x08044487 0802e4fc : * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 802e4fc: b510 push {r4, lr} char str[40]; uint8_t len; /* Headers для поддержки saffari */ strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802e4fe: 4960 ldr r1, [pc, #384] ; (802e680 ) * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 802e500: b08c sub sp, #48 ; 0x30 802e502: 4604 mov r4, r0 char str[40]; uint8_t len; /* Headers для поддержки saffari */ strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802e504: f7f3 fe02 bl 802210c GetWorkTimeStr(str, &len); 802e508: a802 add r0, sp, #8 802e50a: f10d 0107 add.w r1, sp, #7 802e50e: f7f9 fdfb bl 8028108 strcat(buf, "{\"uptime\":\""); 802e512: 4620 mov r0, r4 802e514: 495b ldr r1, [pc, #364] ; (802e684 ) 802e516: f7f3 fce5 bl 8021ee4 strncat(buf, str, len); 802e51a: f89d 2007 ldrb.w r2, [sp, #7] 802e51e: a902 add r1, sp, #8 802e520: 4620 mov r0, r4 802e522: f7f3 fe81 bl 8022228 GetModelStr(str, &len); 802e526: a802 add r0, sp, #8 802e528: f10d 0107 add.w r1, sp, #7 802e52c: f7f9 fe12 bl 8028154 strcat(buf, "\",\"model\":\""); 802e530: 4620 mov r0, r4 802e532: 4955 ldr r1, [pc, #340] ; (802e688 ) 802e534: f7f3 fcd6 bl 8021ee4 strncat(buf, str, len); 802e538: f89d 2007 ldrb.w r2, [sp, #7] 802e53c: a902 add r1, sp, #8 802e53e: 4620 mov r0, r4 802e540: f7f3 fe72 bl 8022228 GetProductionDataStr(str, &len); 802e544: a802 add r0, sp, #8 802e546: f10d 0107 add.w r1, sp, #7 802e54a: f7f9 fe15 bl 8028178 strcat(buf, "\",\"prodate\":\""); 802e54e: 4620 mov r0, r4 802e550: 494e ldr r1, [pc, #312] ; (802e68c ) 802e552: f7f3 fcc7 bl 8021ee4 strncat(buf, str, len); 802e556: f89d 2007 ldrb.w r2, [sp, #7] 802e55a: a902 add r1, sp, #8 802e55c: 4620 mov r0, r4 802e55e: f7f3 fe63 bl 8022228 GetVersionStr(str, &len); 802e562: a802 add r0, sp, #8 802e564: f10d 0107 add.w r1, sp, #7 802e568: f7f9 fe18 bl 802819c strcat(buf, "\",\"fwversion\":\""); 802e56c: 4620 mov r0, r4 802e56e: 4948 ldr r1, [pc, #288] ; (802e690 ) 802e570: f7f3 fcb8 bl 8021ee4 strncat(buf, str, len); 802e574: f89d 2007 ldrb.w r2, [sp, #7] 802e578: a902 add r1, sp, #8 802e57a: 4620 mov r0, r4 802e57c: f7f3 fe54 bl 8022228 GetMacStr(str, &len); 802e580: a802 add r0, sp, #8 802e582: f10d 0107 add.w r1, sp, #7 802e586: f7f9 fe1b bl 80281c0 strcat(buf, "\",\"macaddr\":\""); 802e58a: 4620 mov r0, r4 802e58c: 4941 ldr r1, [pc, #260] ; (802e694 ) 802e58e: f7f3 fca9 bl 8021ee4 strncat(buf, str, len); 802e592: f89d 2007 ldrb.w r2, [sp, #7] 802e596: a902 add r1, sp, #8 802e598: 4620 mov r0, r4 802e59a: f7f3 fe45 bl 8022228 GetSerialNumberStr(str, &len); 802e59e: a802 add r0, sp, #8 802e5a0: f10d 0107 add.w r1, sp, #7 802e5a4: f7f9 fe1e bl 80281e4 strcat(buf, "\",\"serno\":\""); 802e5a8: 4620 mov r0, r4 802e5aa: 493b ldr r1, [pc, #236] ; (802e698 ) 802e5ac: f7f3 fc9a bl 8021ee4 strncat(buf, str, len); 802e5b0: f89d 2007 ldrb.w r2, [sp, #7] 802e5b4: a902 add r1, sp, #8 802e5b6: 4620 mov r0, r4 802e5b8: f7f3 fe36 bl 8022228 GetOwnerStr(str, &len); 802e5bc: a802 add r0, sp, #8 802e5be: f10d 0107 add.w r1, sp, #7 802e5c2: f7f9 fe21 bl 8028208 strcat(buf, "\",\"owner\":\""); 802e5c6: 4620 mov r0, r4 802e5c8: 4934 ldr r1, [pc, #208] ; (802e69c ) 802e5ca: f7f3 fc8b bl 8021ee4 strncat(buf, str, len); 802e5ce: f89d 2007 ldrb.w r2, [sp, #7] 802e5d2: a902 add r1, sp, #8 802e5d4: 4620 mov r0, r4 802e5d6: f7f3 fe27 bl 8022228 GetLocationStr(str, &len); 802e5da: a802 add r0, sp, #8 802e5dc: f10d 0107 add.w r1, sp, #7 802e5e0: f7f9 fe24 bl 802822c strcat(buf, "\",\"sysLocation\":\""); 802e5e4: 4620 mov r0, r4 802e5e6: 492e ldr r1, [pc, #184] ; (802e6a0 ) 802e5e8: f7f3 fc7c bl 8021ee4 strncat(buf, str, len); 802e5ec: f89d 2007 ldrb.w r2, [sp, #7] 802e5f0: a902 add r1, sp, #8 802e5f2: 4620 mov r0, r4 802e5f4: f7f3 fe18 bl 8022228 GetCommentsStr(str, &len); 802e5f8: a802 add r0, sp, #8 802e5fa: f10d 0107 add.w r1, sp, #7 802e5fe: f7f9 fe27 bl 8028250 strcat(buf, "\",\"comment\":\""); 802e602: 4620 mov r0, r4 802e604: 4927 ldr r1, [pc, #156] ; (802e6a4 ) 802e606: f7f3 fc6d bl 8021ee4 strncat(buf, str, len); 802e60a: f89d 2007 ldrb.w r2, [sp, #7] 802e60e: a902 add r1, sp, #8 802e610: 4620 mov r0, r4 802e612: f7f3 fe09 bl 8022228 GetUPSModelStr(str, &len); 802e616: a802 add r0, sp, #8 802e618: f10d 0107 add.w r1, sp, #7 802e61c: f7f9 fe2a bl 8028274 strcat(buf, "\",\"ups_model\":\""); 802e620: 4620 mov r0, r4 802e622: 4921 ldr r1, [pc, #132] ; (802e6a8 ) 802e624: f7f3 fc5e bl 8021ee4 strncat(buf, str, len); 802e628: f89d 2007 ldrb.w r2, [sp, #7] 802e62c: a902 add r1, sp, #8 802e62e: 4620 mov r0, r4 802e630: f7f3 fdfa bl 8022228 GetUPSVersionStr(str, &len); 802e634: a802 add r0, sp, #8 802e636: f10d 0107 add.w r1, sp, #7 802e63a: f7f9 fe2d bl 8028298 strcat(buf, "\",\"ups_fwversion\":\""); 802e63e: 4620 mov r0, r4 802e640: 491a ldr r1, [pc, #104] ; (802e6ac ) 802e642: f7f3 fc4f bl 8021ee4 strncat(buf, str, len); 802e646: f89d 2007 ldrb.w r2, [sp, #7] 802e64a: a902 add r1, sp, #8 802e64c: 4620 mov r0, r4 802e64e: f7f3 fdeb bl 8022228 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 802e652: a802 add r0, sp, #8 802e654: f10d 0107 add.w r1, sp, #7 802e658: f7f9 ff8c bl 8028574 strcat(buf, "\",\"netsettings_changed\":\""); 802e65c: 4620 mov r0, r4 802e65e: 4914 ldr r1, [pc, #80] ; (802e6b0 ) 802e660: f7f3 fc40 bl 8021ee4 strncat(buf, str, len); 802e664: a902 add r1, sp, #8 802e666: f89d 2007 ldrb.w r2, [sp, #7] 802e66a: 4620 mov r0, r4 802e66c: f7f3 fddc bl 8022228 strncat(buf, "\"}", 2); 802e670: 4620 mov r0, r4 802e672: 4910 ldr r1, [pc, #64] ; (802e6b4 ) 802e674: 2202 movs r2, #2 802e676: f7f3 fdd7 bl 8022228 } 802e67a: b00c add sp, #48 ; 0x30 802e67c: bd10 pop {r4, pc} 802e67e: bf00 nop 802e680: 0804439c .word 0x0804439c 802e684: 080445db .word 0x080445db 802e688: 080445e7 .word 0x080445e7 802e68c: 080445f3 .word 0x080445f3 802e690: 08044601 .word 0x08044601 802e694: 08044611 .word 0x08044611 802e698: 0804461f .word 0x0804461f 802e69c: 0804462b .word 0x0804462b 802e6a0: 08044637 .word 0x08044637 802e6a4: 08044649 .word 0x08044649 802e6a8: 08044657 .word 0x08044657 802e6ac: 08044667 .word 0x08044667 802e6b0: 0804446d .word 0x0804446d 802e6b4: 08044487 .word 0x08044487 0802e6b8 : void HTTP_GetHistoryPage(char* buf, uint32_t pageNumber) { 802e6b8: b530 push {r4, r5, lr} 802e6ba: 4605 mov r5, r0 802e6bc: b087 sub sp, #28 802e6be: 460c mov r4, r1 char str[16]; uint16_t len; strcpy(buf, "HTTP/1.1 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802e6c0: 4927 ldr r1, [pc, #156] ; (802e760 ) 802e6c2: f7f3 fd23 bl 802210c strcat(buf, "{\"page\": ["); 802e6c6: 4628 mov r0, r5 802e6c8: 4926 ldr r1, [pc, #152] ; (802e764 ) 802e6ca: f7f3 fc0b bl 8021ee4 History_GetPage(buf, pageNumber); 802e6ce: 4621 mov r1, r4 802e6d0: 4628 mov r0, r5 802e6d2: f7fb ff11 bl 802a4f8 len = strlen(buf); 802e6d6: 4628 mov r0, r5 802e6d8: f7f3 fd76 bl 80221c8 802e6dc: f8ad 0006 strh.w r0, [sp, #6] buf +=len-1; 802e6e0: b280 uxth r0, r0 802e6e2: 1e43 subs r3, r0, #1 802e6e4: 18ec adds r4, r5, r3 *buf = 0; 802e6e6: 2100 movs r1, #0 buf -=len-1; 802e6e8: f1c0 0001 rsb r0, r0, #1 strcat(buf, "{\"page\": ["); History_GetPage(buf, pageNumber); len = strlen(buf); buf +=len-1; *buf = 0; 802e6ec: 54e9 strb r1, [r5, r3] buf -=len-1; 802e6ee: 1824 adds r4, r4, r0 /* Количество страниц */ memset(str, 0, 16); 802e6f0: 2210 movs r2, #16 802e6f2: a802 add r0, sp, #8 802e6f4: f7f3 fb90 bl 8021e18 sprintf(str, "%i", History_GetPageCount()); 802e6f8: f7fb feec bl 802a4d4 802e6fc: 491a ldr r1, [pc, #104] ; (802e768 ) 802e6fe: 4602 mov r2, r0 802e700: a802 add r0, sp, #8 802e702: f7f9 faf1 bl 8027ce8 strcat(buf, "],\"pages\":\""); 802e706: 4620 mov r0, r4 802e708: 4918 ldr r1, [pc, #96] ; (802e76c ) 802e70a: f7f3 fbeb bl 8021ee4 strcat(buf, str); 802e70e: a902 add r1, sp, #8 802e710: 4620 mov r0, r4 802e712: f7f3 fbe7 bl 8021ee4 /* Часовой пояс */ GetSntpTimeZoneStr(str, (uint8_t*)&len); 802e716: a802 add r0, sp, #8 802e718: f10d 0106 add.w r1, sp, #6 802e71c: f7f9 fc46 bl 8027fac strcat(buf, "\",\"utc\":\""); 802e720: 4620 mov r0, r4 802e722: 4913 ldr r1, [pc, #76] ; (802e770 ) 802e724: f7f3 fbde bl 8021ee4 strncat(buf, str, len); 802e728: f8bd 2006 ldrh.w r2, [sp, #6] 802e72c: a902 add r1, sp, #8 802e72e: 4620 mov r0, r4 802e730: f7f3 fd7a bl 8022228 GetUnixTimeStr(str, (uint8_t*)&len); 802e734: a802 add r0, sp, #8 802e736: f10d 0106 add.w r1, sp, #6 802e73a: f7f9 fbf7 bl 8027f2c strcat(buf, "\",\"utm\":\""); 802e73e: 4620 mov r0, r4 802e740: 490c ldr r1, [pc, #48] ; (802e774 ) 802e742: f7f3 fbcf bl 8021ee4 strncat(buf, str, len); 802e746: a902 add r1, sp, #8 802e748: 4620 mov r0, r4 802e74a: f8bd 2006 ldrh.w r2, [sp, #6] 802e74e: f7f3 fd6b bl 8022228 strcat(buf, "\"}"); 802e752: 4620 mov r0, r4 802e754: 4908 ldr r1, [pc, #32] ; (802e778 ) 802e756: f7f3 fbc5 bl 8021ee4 //printf(buf); } 802e75a: b007 add sp, #28 802e75c: bd30 pop {r4, r5, pc} 802e75e: bf00 nop 802e760: 0804467b .word 0x0804467b 802e764: 080446a7 .word 0x080446a7 802e768: 080446b2 .word 0x080446b2 802e76c: 080446b5 .word 0x080446b5 802e770: 080445b4 .word 0x080445b4 802e774: 080445be .word 0x080445be 802e778: 08044487 .word 0x08044487 0802e77c : void HTTP_GetUpsHistoryPage(char* buf, uint32_t pageNumber) { 802e77c: b530 push {r4, r5, lr} 802e77e: 4605 mov r5, r0 802e780: b087 sub sp, #28 802e782: 460c mov r4, r1 char str[16]; uint16_t len; strcpy(buf, "HTTP/1.1 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802e784: 4927 ldr r1, [pc, #156] ; (802e824 ) 802e786: f7f3 fcc1 bl 802210c strcat(buf, "{\"page\": ["); 802e78a: 4628 mov r0, r5 802e78c: 4926 ldr r1, [pc, #152] ; (802e828 ) 802e78e: f7f3 fba9 bl 8021ee4 LOG_GetPage(buf, pageNumber); 802e792: 4621 mov r1, r4 802e794: 4628 mov r0, r5 802e796: f7fb fdc3 bl 802a320 len = strlen(buf); 802e79a: 4628 mov r0, r5 802e79c: f7f3 fd14 bl 80221c8 802e7a0: f8ad 0006 strh.w r0, [sp, #6] buf +=len-1; 802e7a4: b280 uxth r0, r0 802e7a6: 1e43 subs r3, r0, #1 802e7a8: 18ec adds r4, r5, r3 *buf = 0; 802e7aa: 2100 movs r1, #0 buf -=len-1; 802e7ac: f1c0 0001 rsb r0, r0, #1 strcat(buf, "{\"page\": ["); LOG_GetPage(buf, pageNumber); len = strlen(buf); buf +=len-1; *buf = 0; 802e7b0: 54e9 strb r1, [r5, r3] buf -=len-1; 802e7b2: 1824 adds r4, r4, r0 /* Количество страниц */ memset(str, 0, 16); 802e7b4: 2210 movs r2, #16 802e7b6: a802 add r0, sp, #8 802e7b8: f7f3 fb2e bl 8021e18 sprintf(str, "%i", LOG_GetPageCount()); 802e7bc: f7fb fd9e bl 802a2fc 802e7c0: 491a ldr r1, [pc, #104] ; (802e82c ) 802e7c2: 4602 mov r2, r0 802e7c4: a802 add r0, sp, #8 802e7c6: f7f9 fa8f bl 8027ce8 strcat(buf, "],\"pages\":\""); 802e7ca: 4620 mov r0, r4 802e7cc: 4918 ldr r1, [pc, #96] ; (802e830 ) 802e7ce: f7f3 fb89 bl 8021ee4 strcat(buf, str); 802e7d2: a902 add r1, sp, #8 802e7d4: 4620 mov r0, r4 802e7d6: f7f3 fb85 bl 8021ee4 /* Часовой пояс */ GetSntpTimeZoneStr(str, (uint8_t*)&len); 802e7da: a802 add r0, sp, #8 802e7dc: f10d 0106 add.w r1, sp, #6 802e7e0: f7f9 fbe4 bl 8027fac strcat(buf, "\",\"utc\":\""); 802e7e4: 4620 mov r0, r4 802e7e6: 4913 ldr r1, [pc, #76] ; (802e834 ) 802e7e8: f7f3 fb7c bl 8021ee4 strncat(buf, str, len); 802e7ec: f8bd 2006 ldrh.w r2, [sp, #6] 802e7f0: a902 add r1, sp, #8 802e7f2: 4620 mov r0, r4 802e7f4: f7f3 fd18 bl 8022228 GetUnixTimeStr(str, (uint8_t*)&len); 802e7f8: a802 add r0, sp, #8 802e7fa: f10d 0106 add.w r1, sp, #6 802e7fe: f7f9 fb95 bl 8027f2c strcat(buf, "\",\"utm\":\""); 802e802: 4620 mov r0, r4 802e804: 490c ldr r1, [pc, #48] ; (802e838 ) 802e806: f7f3 fb6d bl 8021ee4 strncat(buf, str, len); 802e80a: a902 add r1, sp, #8 802e80c: 4620 mov r0, r4 802e80e: f8bd 2006 ldrh.w r2, [sp, #6] 802e812: f7f3 fd09 bl 8022228 strcat(buf, "\"}"); 802e816: 4620 mov r0, r4 802e818: 4908 ldr r1, [pc, #32] ; (802e83c ) 802e81a: f7f3 fb63 bl 8021ee4 //printf(buf); } 802e81e: b007 add sp, #28 802e820: bd30 pop {r4, r5, pc} 802e822: bf00 nop 802e824: 0804467b .word 0x0804467b 802e828: 080446a7 .word 0x080446a7 802e82c: 080446b2 .word 0x080446b2 802e830: 080446b5 .word 0x080446b5 802e834: 080445b4 .word 0x080445b4 802e838: 080445be .word 0x080445be 802e83c: 08044487 .word 0x08044487 0802e840 : /** * @brief Сброс настроек (всё кроме сетевых параметров) */ void HTTP_ResetSettings(void) { 802e840: b508 push {r3, lr} //taskENTER_CRITICAL(); SNMP_SendUserTrap(DEVICE_RESTORED); 802e842: 2003 movs r0, #3 802e844: f009 fa4c bl 8037ce0 log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); 802e848: 4906 ldr r1, [pc, #24] ; (802e864 ) 802e84a: 2001 movs r0, #1 802e84c: f7fb fd0a bl 802a264 vTaskDelay(500); 802e850: f44f 70fa mov.w r0, #500 ; 0x1f4 802e854: f7fd f92c bl 802bab0 SETTINGS_SetPartDefault(); 802e858: f7fa fac8 bl 8028dec SETTINGS_Save(); //taskEXIT_CRITICAL(); } 802e85c: e8bd 4008 ldmia.w sp!, {r3, lr} SNMP_SendUserTrap(DEVICE_RESTORED); log_event_data(LOG_SYSTEM_DEFCONFIG, "Администратор"); vTaskDelay(500); SETTINGS_SetPartDefault(); SETTINGS_Save(); 802e860: f7fa ba58 b.w 8028d14 802e864: 0803928f .word 0x0803928f 0802e868 : /** * @brief Сохранение настроек */ void HTTP_SaveSettings(void) { 802e868: b508 push {r3, lr} // taskENTER_CRITICAL(); SETTINGS_Save(); 802e86a: f7fa fa53 bl 8028d14 log_event_data(LOG_SETTING_SAVE, "Администратор"); 802e86e: 4903 ldr r1, [pc, #12] ; (802e87c ) 802e870: 2004 movs r0, #4 // taskEXIT_CRITICAL(); } 802e872: e8bd 4008 ldmia.w sp!, {r3, lr} { // taskENTER_CRITICAL(); SETTINGS_Save(); log_event_data(LOG_SETTING_SAVE, "Администратор"); 802e876: f7fb bcf5 b.w 802a264 802e87a: bf00 nop 802e87c: 0803928f .word 0x0803928f 0802e880 : /** * @brief */ void vTaskReboot(void * pvParameters) { 802e880: b510 push {r4, lr} 802e882: 4604 mov r4, r0 for (;;) { mode = *(bool*)pvParameters; if (mode) 802e884: 7823 ldrb r3, [r4, #0] 802e886: b16b cbz r3, 802e8a4 { SNMP_SendUserTrap(FW_VERSION_UPDATE); 802e888: 2001 movs r0, #1 802e88a: f009 fa29 bl 8037ce0 log_event_data(LOG_UPDATE_SOFT, "Администратор"); 802e88e: 2002 movs r0, #2 802e890: 490a ldr r1, [pc, #40] ; (802e8bc ) 802e892: f7fb fce7 bl 802a264 SetLoadMode(); 802e896: f7f9 fe87 bl 80285a8 HTTP_SaveSettings(); 802e89a: f7ff ffe5 bl 802e868 vTaskDelay(2000); 802e89e: f44f 60fa mov.w r0, #2000 ; 0x7d0 802e8a2: e001 b.n 802e8a8 vTaskDelay(1010); Reboot(); } else { vTaskDelay(1000); 802e8a4: f44f 707a mov.w r0, #1000 ; 0x3e8 802e8a8: f7fd f902 bl 802bab0 /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802e8ac: f240 30f2 movw r0, #1010 ; 0x3f2 802e8b0: f7fd f8fe bl 802bab0 Reboot(); 802e8b4: f7fa ffdc bl 8029870 802e8b8: e7e4 b.n 802e884 802e8ba: bf00 nop 802e8bc: 0803928f .word 0x0803928f 0802e8c0 : /** * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { 802e8c0: b508 push {r3, lr} vTaskDelay(1010); 802e8c2: f240 30f2 movw r0, #1010 ; 0x3f2 802e8c6: f7fd f8f3 bl 802bab0 Reboot(); } 802e8ca: e8bd 4008 ldmia.w sp!, {r3, lr} * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { vTaskDelay(1010); Reboot(); 802e8ce: f7fa bfcf b.w 8029870 802e8d2: 0000 movs r0, r0 0802e8d4 : * bootloader и перезаписаны настройки * * false - обычная перезагрузка */ void HTTP_StartResetTask(bool fBootMode) { 802e8d4: b51f push {r0, r1, r2, r3, r4, lr} static bool temp; temp = fBootMode; 802e8d6: 4b07 ldr r3, [pc, #28] ; (802e8f4 ) xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802e8d8: 4907 ldr r1, [pc, #28] ; (802e8f8 ) */ void HTTP_StartResetTask(bool fBootMode) { static bool temp; temp = fBootMode; 802e8da: 7018 strb r0, [r3, #0] xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802e8dc: 2200 movs r2, #0 802e8de: 9200 str r2, [sp, #0] 802e8e0: 9201 str r2, [sp, #4] 802e8e2: 9202 str r2, [sp, #8] 802e8e4: 9203 str r2, [sp, #12] 802e8e6: 4805 ldr r0, [pc, #20] ; (802e8fc ) 802e8e8: 2280 movs r2, #128 ; 0x80 802e8ea: f7fc fe47 bl 802b57c (void*)&temp, tskIDLE_PRIORITY, NULL); } 802e8ee: b005 add sp, #20 802e8f0: bd00 pop {pc} 802e8f2: bf00 nop 802e8f4: 20000d8a .word 0x20000d8a 802e8f8: 080446c1 .word 0x080446c1 802e8fc: 0802e881 .word 0x0802e881 0802e900 : tcpip_thread(void *arg) { struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802e900: 4b1e ldr r3, [pc, #120] ; (802e97c ) 802e902: 681b ldr r3, [r3, #0] * * @param arg unused argument */ static void tcpip_thread(void *arg) { 802e904: b507 push {r0, r1, r2, lr} struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802e906: b113 cbz r3, 802e90e tcpip_init_done(tcpip_init_done_arg); 802e908: 4a1d ldr r2, [pc, #116] ; (802e980 ) 802e90a: 6810 ldr r0, [r2, #0] 802e90c: 4798 blx r3 LOCK_TCPIP_CORE(); while (1) { /* MAIN Loop */ UNLOCK_TCPIP_CORE(); LWIP_TCPIP_THREAD_ALIVE(); /* wait for a message, timeouts are processed while waiting */ sys_timeouts_mbox_fetch(&mbox, (void **)&msg); 802e90e: 481d ldr r0, [pc, #116] ; (802e984 ) 802e910: a901 add r1, sp, #4 802e912: f003 fd0d bl 8032330 LOCK_TCPIP_CORE(); switch (msg->type) { 802e916: 9b01 ldr r3, [sp, #4] 802e918: 781a ldrb r2, [r3, #0] 802e91a: 2a05 cmp r2, #5 802e91c: d8f7 bhi.n 802e90e 802e91e: e8df f002 tbb [pc, r2] 802e922: 0703 .short 0x0703 802e924: 28201b15 .word 0x28201b15 #if LWIP_NETCONN case TCPIP_MSG_API: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg)); msg->msg.apimsg->function(&(msg->msg.apimsg->msg)); 802e928: 6898 ldr r0, [r3, #8] 802e92a: 6803 ldr r3, [r0, #0] 802e92c: 3004 adds r0, #4 802e92e: e7ed b.n 802e90c #if !LWIP_TCPIP_CORE_LOCKING_INPUT case TCPIP_MSG_INPKT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); #if LWIP_ETHERNET if (msg->msg.inp.netif->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { 802e930: 68d9 ldr r1, [r3, #12] ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802e932: 6898 ldr r0, [r3, #8] #if !LWIP_TCPIP_CORE_LOCKING_INPUT case TCPIP_MSG_INPKT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); #if LWIP_ETHERNET if (msg->msg.inp.netif->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { 802e934: f891 202d ldrb.w r2, [r1, #45] ; 0x2d 802e938: f012 0f60 tst.w r2, #96 ; 0x60 802e93c: d002 beq.n 802e944 ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802e93e: f008 fb71 bl 8037024 802e942: e001 b.n 802e948 } else #endif /* LWIP_ETHERNET */ { ip_input(msg->msg.inp.p, msg->msg.inp.netif); 802e944: f004 f94e bl 8032be4 } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802e948: 2008 movs r0, #8 802e94a: e00e b.n 802e96a #endif /* LWIP_NETIF_API */ #if LWIP_TCPIP_TIMEOUT case TCPIP_MSG_TIMEOUT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: TIMEOUT %p\n", (void *)msg)); sys_timeout(msg->msg.tmo.msecs, msg->msg.tmo.h, msg->msg.tmo.arg); 802e94c: f103 0008 add.w r0, r3, #8 802e950: c807 ldmia r0, {r0, r1, r2} 802e952: f003 fc1f bl 8032194 802e956: e007 b.n 802e968 memp_free(MEMP_TCPIP_MSG_API, msg); break; case TCPIP_MSG_UNTIMEOUT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: UNTIMEOUT %p\n", (void *)msg)); sys_untimeout(msg->msg.tmo.h, msg->msg.tmo.arg); 802e958: 68d8 ldr r0, [r3, #12] 802e95a: 6919 ldr r1, [r3, #16] 802e95c: f003 fcc4 bl 80322e8 802e960: e002 b.n 802e968 break; #endif /* LWIP_TCPIP_TIMEOUT */ case TCPIP_MSG_CALLBACK: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg)); msg->msg.cb.function(msg->msg.cb.ctx); 802e962: 689a ldr r2, [r3, #8] 802e964: 68d8 ldr r0, [r3, #12] 802e966: 4790 blx r2 memp_free(MEMP_TCPIP_MSG_API, msg); 802e968: 2007 movs r0, #7 802e96a: 9901 ldr r1, [sp, #4] 802e96c: f001 f882 bl 802fa74 break; 802e970: e7cd b.n 802e90e case TCPIP_MSG_CALLBACK_STATIC: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK_STATIC %p\n", (void *)msg)); msg->msg.cb.function(msg->msg.cb.ctx); 802e972: 689a ldr r2, [r3, #8] 802e974: 68d8 ldr r0, [r3, #12] 802e976: 4790 blx r2 break; 802e978: e7c9 b.n 802e90e 802e97a: bf00 nop 802e97c: 20000d94 .word 0x20000d94 802e980: 20000d90 .word 0x20000d90 802e984: 20000d8c .word 0x20000d8c 0802e988 : * NETIF_FLAG_ETHERNET flags) * @param inp the network interface on which the packet was received */ err_t tcpip_input(struct pbuf *p, struct netif *inp) { 802e988: b5f8 push {r3, r4, r5, r6, r7, lr} UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { 802e98a: 4d0e ldr r5, [pc, #56] ; (802e9c4 ) 802e98c: 682b ldr r3, [r5, #0] * NETIF_FLAG_ETHERNET flags) * @param inp the network interface on which the packet was received */ err_t tcpip_input(struct pbuf *p, struct netif *inp) { 802e98e: 4606 mov r6, r0 802e990: 460f mov r7, r1 UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { 802e992: b193 cbz r3, 802e9ba return ERR_VAL; } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 802e994: 2008 movs r0, #8 802e996: f001 f857 bl 802fa48 if (msg == NULL) { 802e99a: 4604 mov r4, r0 802e99c: b178 cbz r0, 802e9be return ERR_MEM; } msg->type = TCPIP_MSG_INPKT; 802e99e: 2301 movs r3, #1 802e9a0: 7003 strb r3, [r0, #0] msg->msg.inp.p = p; 802e9a2: 6086 str r6, [r0, #8] msg->msg.inp.netif = inp; 802e9a4: 60c7 str r7, [r0, #12] if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { 802e9a6: 4621 mov r1, r4 802e9a8: 4628 mov r0, r5 802e9aa: f008 fd89 bl 80374c0 802e9ae: b138 cbz r0, 802e9c0 memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802e9b0: 2008 movs r0, #8 802e9b2: 4621 mov r1, r4 802e9b4: f001 f85e bl 802fa74 802e9b8: e001 b.n 802e9be return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { return ERR_VAL; 802e9ba: 20fa movs r0, #250 ; 0xfa 802e9bc: e000 b.n 802e9c0 } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); if (msg == NULL) { return ERR_MEM; 802e9be: 20ff movs r0, #255 ; 0xff memp_free(MEMP_TCPIP_MSG_INPKT, msg); return ERR_MEM; } return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 802e9c0: b240 sxtb r0, r0 802e9c2: bdf8 pop {r3, r4, r5, r6, r7, pc} 802e9c4: 20000d8c .word 0x20000d8c 0802e9c8 : * @param initfunc a function to call when tcpip_thread is running and finished initializing * @param arg argument to pass to initfunc */ void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { 802e9c8: b537 push {r0, r1, r2, r4, r5, lr} 802e9ca: 4604 mov r4, r0 802e9cc: 460d mov r5, r1 lwip_init(); 802e9ce: f000 feb3 bl 802f738 tcpip_init_done = initfunc; 802e9d2: 4b09 ldr r3, [pc, #36] ; (802e9f8 ) tcpip_init_done_arg = arg; if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802e9d4: 4809 ldr r0, [pc, #36] ; (802e9fc ) void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { lwip_init(); tcpip_init_done = initfunc; 802e9d6: 601c str r4, [r3, #0] tcpip_init_done_arg = arg; 802e9d8: 4b09 ldr r3, [pc, #36] ; (802ea00 ) if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802e9da: 2132 movs r1, #50 ; 0x32 tcpip_init(tcpip_init_done_fn initfunc, void *arg) { lwip_init(); tcpip_init_done = initfunc; tcpip_init_done_arg = arg; 802e9dc: 601d str r5, [r3, #0] if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802e9de: f008 fd61 bl 80374a4 if(sys_mutex_new(&lock_tcpip_core) != ERR_OK) { LWIP_ASSERT("failed to create lock_tcpip_core", 0); } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO); 802e9e2: 2303 movs r3, #3 802e9e4: 9300 str r3, [sp, #0] 802e9e6: 4907 ldr r1, [pc, #28] ; (802ea04 ) 802e9e8: 4807 ldr r0, [pc, #28] ; (802ea08 ) 802e9ea: 2200 movs r2, #0 802e9ec: f44f 73c8 mov.w r3, #400 ; 0x190 802e9f0: f008 fdd7 bl 80375a2 } 802e9f4: bd3e pop {r1, r2, r3, r4, r5, pc} 802e9f6: bf00 nop 802e9f8: 20000d94 .word 0x20000d94 802e9fc: 20000d8c .word 0x20000d8c 802ea00: 20000d90 .word 0x20000d90 802ea04: 0802e901 .word 0x0802e901 802ea08: 080446cc .word 0x080446cc 0802ea0c : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802ea0c: 0a03 lsrs r3, r0, #8 802ea0e: ea43 2000 orr.w r0, r3, r0, lsl #8 } 802ea12: b280 uxth r0, r0 802ea14: 4770 bx lr 0802ea16 : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802ea16: 0a03 lsrs r3, r0, #8 802ea18: ea43 2000 orr.w r0, r3, r0, lsl #8 */ u16_t lwip_ntohs(u16_t n) { return lwip_htons(n); } 802ea1c: b280 uxth r0, r0 802ea1e: 4770 bx lr 0802ea20 : { return ((n & 0xff) << 24) | ((n & 0xff00) << 8) | ((n & 0xff0000UL) >> 8) | ((n & 0xff000000UL) >> 24); } 802ea20: ba00 rev r0, r0 802ea22: 4770 bx lr 0802ea24 : * @return n in host byte order */ u32_t lwip_ntohl(u32_t n) { return lwip_htonl(n); 802ea24: f7ff bffc b.w 802ea20 0802ea28 : * If the state changed, reset the number of tries. */ static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state) { if (new_state != dhcp->state) { 802ea28: 7b03 ldrb r3, [r0, #12] 802ea2a: 428b cmp r3, r1 802ea2c: d003 beq.n 802ea36 dhcp->state = new_state; dhcp->tries = 0; 802ea2e: 2300 movs r3, #0 */ static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state) { if (new_state != dhcp->state) { dhcp->state = new_state; 802ea30: 7301 strb r1, [r0, #12] dhcp->tries = 0; 802ea32: 7343 strb r3, [r0, #13] dhcp->request_timeout = 0; 802ea34: 8343 strh r3, [r0, #26] 802ea36: 4770 bx lr 0802ea38 : */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = option_type; 802ea38: 8b03 ldrh r3, [r0, #24] * DHCP message. * */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { 802ea3a: b510 push {r4, lr} LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = option_type; 802ea3c: 6944 ldr r4, [r0, #20] 802ea3e: 18e4 adds r4, r4, r3 802ea40: f884 10f0 strb.w r1, [r4, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802ea44: 6941 ldr r1, [r0, #20] */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = option_type; 802ea46: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802ea48: fa11 f184 uxtah r1, r1, r4 802ea4c: 3302 adds r3, #2 802ea4e: f881 20f0 strb.w r2, [r1, #240] ; 0xf0 802ea52: 8303 strh r3, [r0, #24] 802ea54: bd10 pop {r4, pc} 0802ea56 : */ static void dhcp_option_byte(struct dhcp *dhcp, u8_t value) { LWIP_ASSERT("dhcp_option_byte: dhcp->options_out_len < DHCP_OPTIONS_LEN", dhcp->options_out_len < DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = value; 802ea56: 8b03 ldrh r3, [r0, #24] 802ea58: 6942 ldr r2, [r0, #20] 802ea5a: 18d2 adds r2, r2, r3 802ea5c: 3301 adds r3, #1 802ea5e: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802ea62: 8303 strh r3, [r0, #24] 802ea64: 4770 bx lr 0802ea66 : static void dhcp_option_short(struct dhcp *dhcp, u16_t value) { LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 802ea66: 8b03 ldrh r3, [r0, #24] 802ea68: 6942 ldr r2, [r0, #20] 802ea6a: 18d2 adds r2, r2, r3 dhcp->msg_out->options[dhcp->options_out_len++] = value; } static void dhcp_option_short(struct dhcp *dhcp, u16_t value) { 802ea6c: b510 push {r4, lr} LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 802ea6e: 0a0c lsrs r4, r1, #8 802ea70: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802ea74: 6942 ldr r2, [r0, #20] static void dhcp_option_short(struct dhcp *dhcp, u16_t value) { LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 802ea76: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802ea78: fa12 f284 uxtah r2, r2, r4 802ea7c: 3302 adds r3, #2 802ea7e: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802ea82: 8303 strh r3, [r0, #24] 802ea84: bd10 pop {r4, pc} 0802ea86 : static void dhcp_option_long(struct dhcp *dhcp, u32_t value) { LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 802ea86: 8b03 ldrh r3, [r0, #24] 802ea88: 6942 ldr r2, [r0, #20] 802ea8a: 18d2 adds r2, r2, r3 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); } static void dhcp_option_long(struct dhcp *dhcp, u32_t value) { 802ea8c: b510 push {r4, lr} LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 802ea8e: 0e0c lsrs r4, r1, #24 802ea90: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802ea94: 6942 ldr r2, [r0, #20] static void dhcp_option_long(struct dhcp *dhcp, u32_t value) { LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 802ea96: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802ea98: fa12 f284 uxtah r2, r2, r4 802ea9c: f3c1 4407 ubfx r4, r1, #16, #8 802eaa0: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802eaa4: 6942 ldr r2, [r0, #20] static void dhcp_option_long(struct dhcp *dhcp, u32_t value) { LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802eaa6: 1c9c adds r4, r3, #2 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802eaa8: fa12 f284 uxtah r2, r2, r4 802eaac: f3c1 2407 ubfx r4, r1, #8, #8 802eab0: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802eab4: 6942 ldr r2, [r0, #20] dhcp_option_long(struct dhcp *dhcp, u32_t value) { LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802eab6: 1cdc adds r4, r3, #3 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802eab8: fa12 f284 uxtah r2, r2, r4 802eabc: 3304 adds r3, #4 802eabe: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802eac2: 8303 strh r3, [r0, #24] 802eac4: bd10 pop {r4, pc} 0802eac6 : * @param dhcp DHCP state structure */ static void dhcp_option_trailer(struct dhcp *dhcp) { LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); 802eac6: b190 cbz r0, 802eaee LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; 802eac8: 8b03 ldrh r3, [r0, #24] 802eaca: 6942 ldr r2, [r0, #20] 802eacc: 18d2 adds r2, r2, r3 802eace: 21ff movs r1, #255 ; 0xff 802ead0: 3301 adds r3, #1 802ead2: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802ead6: 8303 strh r3, [r0, #24] /* packet is too small, or not 4 byte aligned? */ while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ dhcp->msg_out->options[dhcp->options_out_len++] = 0; 802ead8: 2100 movs r1, #0 LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; /* packet is too small, or not 4 byte aligned? */ while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && 802eada: e005 b.n 802eae8 (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ dhcp->msg_out->options[dhcp->options_out_len++] = 0; 802eadc: 6942 ldr r2, [r0, #20] 802eade: 18d2 adds r2, r2, r3 802eae0: 3301 adds r3, #1 802eae2: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802eae6: 8303 strh r3, [r0, #24] LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; /* packet is too small, or not 4 byte aligned? */ while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && 802eae8: 8b03 ldrh r3, [r0, #24] 802eaea: 2b43 cmp r3, #67 ; 0x43 802eaec: d9f6 bls.n 802eadc 802eaee: 4770 bx lr 0802eaf0 : * @param dhcp dhcp control struct * @param message_type message type of the request */ static err_t dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) { 802eaf0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802eaf4: 460c mov r4, r1 802eaf6: 4617 mov r7, r2 if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); 802eaf8: 4606 mov r6, r0 802eafa: 2800 cmp r0, #0 802eafc: f000 808e beq.w 802ec1c LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802eb00: 2900 cmp r1, #0 802eb02: f000 808d beq.w 802ec20 LWIP_ASSERT("dhcp_create_msg: dhcp->p_out == NULL", dhcp->p_out == NULL); LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); 802eb06: 2000 movs r0, #0 802eb08: f44f 719a mov.w r1, #308 ; 0x134 802eb0c: 4602 mov r2, r0 802eb0e: f001 f908 bl 802fd22 802eb12: 6120 str r0, [r4, #16] if (dhcp->p_out == NULL) { 802eb14: 2800 cmp r0, #0 802eb16: f000 8085 beq.w 802ec24 } LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", (dhcp->p_out->len >= sizeof(struct dhcp_msg))); /* reuse transaction identifier in retransmissions */ if (dhcp->tries == 0) { 802eb1a: 7b62 ldrb r2, [r4, #13] 802eb1c: 4b43 ldr r3, [pc, #268] ; (802ec2c ) 802eb1e: b912 cbnz r2, 802eb26 #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; 802eb20: 681a ldr r2, [r3, #0] 802eb22: 3201 adds r2, #1 802eb24: 601a str r2, [r3, #0] #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 802eb26: 681b ldr r3, [r3, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("transaction id xid(%"X32_F")\n", xid)); dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; 802eb28: 6842 ldr r2, [r0, #4] xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 802eb2a: 6023 str r3, [r4, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("transaction id xid(%"X32_F")\n", xid)); dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; dhcp->msg_out->op = DHCP_BOOTREQUEST; 802eb2c: 2301 movs r3, #1 } dhcp->xid = xid; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("transaction id xid(%"X32_F")\n", xid)); dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; 802eb2e: 6162 str r2, [r4, #20] dhcp->msg_out->op = DHCP_BOOTREQUEST; 802eb30: 7013 strb r3, [r2, #0] /* TODO: make link layer independent */ dhcp->msg_out->htype = DHCP_HTYPE_ETH; 802eb32: 6962 ldr r2, [r4, #20] 802eb34: 7053 strb r3, [r2, #1] dhcp->msg_out->hlen = netif->hwaddr_len; 802eb36: 6963 ldr r3, [r4, #20] 802eb38: f896 2026 ldrb.w r2, [r6, #38] ; 0x26 802eb3c: 709a strb r2, [r3, #2] dhcp->msg_out->hops = 0; 802eb3e: 6963 ldr r3, [r4, #20] 802eb40: 2500 movs r5, #0 802eb42: 70dd strb r5, [r3, #3] dhcp->msg_out->xid = htonl(dhcp->xid); 802eb44: 6820 ldr r0, [r4, #0] 802eb46: f8d4 8014 ldr.w r8, [r4, #20] 802eb4a: f7ff ff69 bl 802ea20 802eb4e: f8c8 0004 str.w r0, [r8, #4] dhcp->msg_out->secs = 0; 802eb52: 6963 ldr r3, [r4, #20] /* we don't need the broadcast flag since we can receive unicast traffic before being fully configured! */ dhcp->msg_out->flags = 0; ip_addr_set_zero(&dhcp->msg_out->ciaddr); /* set ciaddr to netif->ip_addr based on message_type and state */ if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || 802eb54: 2f08 cmp r7, #8 /* TODO: make link layer independent */ dhcp->msg_out->htype = DHCP_HTYPE_ETH; dhcp->msg_out->hlen = netif->hwaddr_len; dhcp->msg_out->hops = 0; dhcp->msg_out->xid = htonl(dhcp->xid); dhcp->msg_out->secs = 0; 802eb56: 721d strb r5, [r3, #8] 802eb58: 725d strb r5, [r3, #9] /* we don't need the broadcast flag since we can receive unicast traffic before being fully configured! */ dhcp->msg_out->flags = 0; 802eb5a: 729d strb r5, [r3, #10] 802eb5c: 72dd strb r5, [r3, #11] ip_addr_set_zero(&dhcp->msg_out->ciaddr); 802eb5e: 731d strb r5, [r3, #12] 802eb60: 735d strb r5, [r3, #13] 802eb62: 739d strb r5, [r3, #14] 802eb64: 73dd strb r5, [r3, #15] /* set ciaddr to netif->ip_addr based on message_type and state */ if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || 802eb66: d007 beq.n 802eb78 802eb68: 2f04 cmp r7, #4 802eb6a: d005 beq.n 802eb78 802eb6c: 2f03 cmp r7, #3 802eb6e: d105 bne.n 802eb7c ((message_type == DHCP_REQUEST) && /* DHCP_BOUND not used for sending! */ ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { 802eb70: 7b22 ldrb r2, [r4, #12] before being fully configured! */ dhcp->msg_out->flags = 0; ip_addr_set_zero(&dhcp->msg_out->ciaddr); /* set ciaddr to netif->ip_addr based on message_type and state */ if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || ((message_type == DHCP_REQUEST) && /* DHCP_BOUND not used for sending! */ 802eb72: 3a04 subs r2, #4 802eb74: 2a01 cmp r2, #1 802eb76: d801 bhi.n 802eb7c ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); 802eb78: 6872 ldr r2, [r6, #4] 802eb7a: 60da str r2, [r3, #12] } ip_addr_set_zero(&dhcp->msg_out->yiaddr); 802eb7c: 2500 movs r5, #0 802eb7e: 741d strb r5, [r3, #16] 802eb80: 745d strb r5, [r3, #17] 802eb82: 749d strb r5, [r3, #18] 802eb84: 74dd strb r5, [r3, #19] ip_addr_set_zero(&dhcp->msg_out->siaddr); 802eb86: 751d strb r5, [r3, #20] 802eb88: 755d strb r5, [r3, #21] 802eb8a: 759d strb r5, [r3, #22] 802eb8c: 75dd strb r5, [r3, #23] ip_addr_set_zero(&dhcp->msg_out->giaddr); 802eb8e: 761d strb r5, [r3, #24] 802eb90: 765d strb r5, [r3, #25] 802eb92: 769d strb r5, [r3, #26] 802eb94: 76dd strb r5, [r3, #27] for (i = 0; i < DHCP_CHADDR_LEN; i++) { /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; 802eb96: f896 1026 ldrb.w r1, [r6, #38] ; 0x26 802eb9a: 6962 ldr r2, [r4, #20] 802eb9c: b2ab uxth r3, r5 802eb9e: 4299 cmp r1, r3 * @param netif the netif under DHCP control * @param dhcp dhcp control struct * @param message_type message type of the request */ static err_t dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) 802eba0: bf88 it hi 802eba2: 1973 addhi r3, r6, r5 ip_addr_set_zero(&dhcp->msg_out->yiaddr); ip_addr_set_zero(&dhcp->msg_out->siaddr); ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; 802eba4: 442a add r2, r5 802eba6: bf8c ite hi 802eba8: f893 3027 ldrbhi.w r3, [r3, #39] ; 0x27 802ebac: 2300 movls r3, #0 802ebae: 3501 adds r5, #1 ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); } ip_addr_set_zero(&dhcp->msg_out->yiaddr); ip_addr_set_zero(&dhcp->msg_out->siaddr); ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { 802ebb0: 2d10 cmp r5, #16 /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; 802ebb2: 7713 strb r3, [r2, #28] ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); } ip_addr_set_zero(&dhcp->msg_out->yiaddr); ip_addr_set_zero(&dhcp->msg_out->siaddr); ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { 802ebb4: d1ef bne.n 802eb96 802ebb6: 2300 movs r3, #0 /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { dhcp->msg_out->sname[i] = 0; 802ebb8: 4619 mov r1, r3 802ebba: 6962 ldr r2, [r4, #20] 802ebbc: 18d2 adds r2, r2, r3 802ebbe: 3301 adds r3, #1 ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { 802ebc0: 2b40 cmp r3, #64 ; 0x40 dhcp->msg_out->sname[i] = 0; 802ebc2: f882 102c strb.w r1, [r2, #44] ; 0x2c ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { 802ebc6: d1f8 bne.n 802ebba 802ebc8: 2200 movs r2, #0 dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { dhcp->msg_out->file[i] = 0; 802ebca: 4610 mov r0, r2 802ebcc: 6963 ldr r3, [r4, #20] 802ebce: 1899 adds r1, r3, r2 802ebd0: 3201 adds r2, #1 802ebd2: 2300 movs r3, #0 dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { 802ebd4: 2a80 cmp r2, #128 ; 0x80 dhcp->msg_out->file[i] = 0; 802ebd6: f881 006c strb.w r0, [r1, #108] ; 0x6c dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { 802ebda: d1f7 bne.n 802ebcc dhcp->msg_out->file[i] = 0; } dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 802ebdc: 6962 ldr r2, [r4, #20] 802ebde: f06f 007d mvn.w r0, #125 ; 0x7d 802ebe2: 2163 movs r1, #99 ; 0x63 802ebe4: f882 00ed strb.w r0, [r2, #237] ; 0xed 802ebe8: 2053 movs r0, #83 ; 0x53 802ebea: f882 10ec strb.w r1, [r2, #236] ; 0xec 802ebee: f882 00ee strb.w r0, [r2, #238] ; 0xee 802ebf2: f882 10ef strb.w r1, [r2, #239] ; 0xef dhcp->options_out_len = 0; 802ebf6: 8323 strh r3, [r4, #24] /* fill options field with an incrementing array (for debugging purposes) */ for (i = 0; i < DHCP_OPTIONS_LEN; i++) { dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ 802ebf8: 6962 ldr r2, [r4, #20] 802ebfa: 18d2 adds r2, r2, r3 802ebfc: f882 30f0 strb.w r3, [r2, #240] ; 0xf0 802ec00: 3301 adds r3, #1 dhcp->msg_out->file[i] = 0; } dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); dhcp->options_out_len = 0; /* fill options field with an incrementing array (for debugging purposes) */ for (i = 0; i < DHCP_OPTIONS_LEN; i++) { 802ec02: 2b44 cmp r3, #68 ; 0x44 802ec04: d1f8 bne.n 802ebf8 dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ } /* Add option MESSAGE_TYPE */ dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); 802ec06: 4620 mov r0, r4 802ec08: 2135 movs r1, #53 ; 0x35 802ec0a: 2201 movs r2, #1 802ec0c: f7ff ff14 bl 802ea38 dhcp_option_byte(dhcp, message_type); 802ec10: 4620 mov r0, r4 802ec12: 4639 mov r1, r7 802ec14: f7ff ff1f bl 802ea56 return ERR_OK; 802ec18: 2000 movs r0, #0 802ec1a: e004 b.n 802ec26 if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); 802ec1c: 20f2 movs r0, #242 ; 0xf2 802ec1e: e002 b.n 802ec26 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802ec20: 20fa movs r0, #250 ; 0xfa 802ec22: e000 b.n 802ec26 LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); if (dhcp->p_out == NULL) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_create_msg(): could not allocate pbuf\n")); return ERR_MEM; 802ec24: 20ff movs r0, #255 ; 0xff } /* Add option MESSAGE_TYPE */ dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); dhcp_option_byte(dhcp, message_type); return ERR_OK; } 802ec26: b240 sxtb r0, r0 802ec28: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802ec2c: 20000724 .word 0x20000724 0802ec30 : * * @param dhcp the dhcp struct to free the request from */ static void dhcp_delete_msg(struct dhcp *dhcp) { 802ec30: b510 push {r4, lr} LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); 802ec32: 4604 mov r4, r0 802ec34: b130 cbz r0, 802ec44 LWIP_ASSERT("dhcp_delete_msg: dhcp->p_out != NULL", dhcp->p_out != NULL); LWIP_ASSERT("dhcp_delete_msg: dhcp->msg_out != NULL", dhcp->msg_out != NULL); if (dhcp->p_out != NULL) { 802ec36: 6900 ldr r0, [r0, #16] 802ec38: b108 cbz r0, 802ec3e pbuf_free(dhcp->p_out); 802ec3a: f001 f825 bl 802fc88 } dhcp->p_out = NULL; 802ec3e: 2300 movs r3, #0 802ec40: 6123 str r3, [r4, #16] dhcp->msg_out = NULL; 802ec42: 6163 str r3, [r4, #20] 802ec44: bd10 pop {r4, pc} 802ec46: 0000 movs r0, r0 0802ec48 : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802ec48: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ec4a: 6a04 ldr r4, [r0, #32] err_t result = ERR_OK; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); ip_addr_set_any(&dhcp->offered_ip_addr); 802ec4c: 2300 movs r3, #0 * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802ec4e: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result = ERR_OK; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); ip_addr_set_any(&dhcp->offered_ip_addr); 802ec50: 6263 str r3, [r4, #36] ; 0x24 dhcp_set_state(dhcp, DHCP_SELECTING); 802ec52: 4620 mov r0, r4 802ec54: 2106 movs r1, #6 802ec56: f7ff fee7 bl 802ea28 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); 802ec5a: 4628 mov r0, r5 802ec5c: 4621 mov r1, r4 802ec5e: 2201 movs r2, #1 802ec60: f7ff ff46 bl 802eaf0 if (result == ERR_OK) { 802ec64: 4606 mov r6, r0 802ec66: 2800 cmp r0, #0 802ec68: d130 bne.n 802eccc LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n")); dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802ec6a: 2202 movs r2, #2 802ec6c: 4620 mov r0, r4 802ec6e: 2139 movs r1, #57 ; 0x39 802ec70: f7ff fee2 bl 802ea38 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802ec74: 4620 mov r0, r4 802ec76: 8ca9 ldrh r1, [r5, #36] ; 0x24 802ec78: f7ff fef5 bl 802ea66 dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802ec7c: 2204 movs r2, #4 802ec7e: 4620 mov r0, r4 802ec80: 2137 movs r1, #55 ; 0x37 802ec82: f7ff fed9 bl 802ea38 dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802ec86: 4620 mov r0, r4 802ec88: 2101 movs r1, #1 802ec8a: f7ff fee4 bl 802ea56 dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802ec8e: 4620 mov r0, r4 802ec90: 2103 movs r1, #3 802ec92: f7ff fee0 bl 802ea56 dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802ec96: 4620 mov r0, r4 802ec98: 211c movs r1, #28 802ec9a: f7ff fedc bl 802ea56 dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802ec9e: 2106 movs r1, #6 802eca0: 4620 mov r0, r4 802eca2: f7ff fed8 bl 802ea56 dhcp_option_trailer(dhcp); 802eca6: 4620 mov r0, r4 802eca8: f7ff ff0d bl 802eac6 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: realloc()ing\n")); pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802ecac: 8b21 ldrh r1, [r4, #24] 802ecae: 6920 ldr r0, [r4, #16] 802ecb0: 31f0 adds r1, #240 ; 0xf0 802ecb2: b289 uxth r1, r1 802ecb4: f001 f80f bl 802fcd6 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)\n")); udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802ecb8: 9500 str r5, [sp, #0] 802ecba: 6860 ldr r0, [r4, #4] 802ecbc: 6921 ldr r1, [r4, #16] 802ecbe: 4a0f ldr r2, [pc, #60] ; (802ecfc ) 802ecc0: 2343 movs r3, #67 ; 0x43 802ecc2: f003 fc81 bl 80325c8 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); dhcp_delete_msg(dhcp); 802ecc6: 4620 mov r0, r4 802ecc8: f7ff ffb2 bl 802ec30 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); } dhcp->tries++; 802eccc: 7b63 ldrb r3, [r4, #13] 802ecce: 3301 adds r3, #1 802ecd0: b2db uxtb r3, r3 if(dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) { dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON; autoip_start(netif); } #endif /* LWIP_DHCP_AUTOIP_COOP */ msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802ecd2: 2b05 cmp r3, #5 802ecd4: bf98 it ls 802ecd6: f44f 727a movls.w r2, #1000 ; 0x3e8 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); } dhcp->tries++; 802ecda: 7363 strb r3, [r4, #13] if(dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) { dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON; autoip_start(netif); } #endif /* LWIP_DHCP_AUTOIP_COOP */ msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802ecdc: bf9a itte ls 802ecde: fa02 f303 lslls.w r3, r2, r3 802ece2: b29b uxthls r3, r3 802ece4: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ece8: f44f 72fa mov.w r2, #500 ; 0x1f4 802ecec: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ecf0: fb93 f3f2 sdiv r3, r3, r2 802ecf4: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802ecf6: 4630 mov r0, r6 802ecf8: bd7c pop {r2, r3, r4, r5, r6, pc} 802ecfa: bf00 nop 802ecfc: 08044740 .word 0x08044740 0802ed00 : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802ed00: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ed02: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802ed04: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n")); dhcp_set_state(dhcp, DHCP_REBINDING); 802ed06: 2104 movs r1, #4 802ed08: 4620 mov r0, r4 802ed0a: f7ff fe8d bl 802ea28 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802ed0e: 4628 mov r0, r5 802ed10: 4621 mov r1, r4 802ed12: 2203 movs r2, #3 802ed14: f7ff feec bl 802eaf0 if (result == ERR_OK) { 802ed18: 4606 mov r6, r0 802ed1a: b9d8 cbnz r0, 802ed54 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802ed1c: 2202 movs r2, #2 802ed1e: 4620 mov r0, r4 802ed20: 2139 movs r1, #57 ; 0x39 802ed22: f7ff fe89 bl 802ea38 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802ed26: 8ca9 ldrh r1, [r5, #36] ; 0x24 802ed28: 4620 mov r0, r4 802ed2a: f7ff fe9c bl 802ea66 dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); dhcp_option_long(dhcp, ntohl(dhcp->server_ip_addr.addr)); #endif dhcp_option_trailer(dhcp); 802ed2e: 4620 mov r0, r4 802ed30: f7ff fec9 bl 802eac6 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802ed34: 8b21 ldrh r1, [r4, #24] 802ed36: 6920 ldr r0, [r4, #16] 802ed38: 31f0 adds r1, #240 ; 0xf0 802ed3a: b289 uxth r1, r1 802ed3c: f000 ffcb bl 802fcd6 /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802ed40: 9500 str r5, [sp, #0] 802ed42: 6860 ldr r0, [r4, #4] 802ed44: 6921 ldr r1, [r4, #16] 802ed46: 4a0e ldr r2, [pc, #56] ; (802ed80 ) 802ed48: 2343 movs r3, #67 ; 0x43 802ed4a: f003 fc3d bl 80325c8 dhcp_delete_msg(dhcp); 802ed4e: 4620 mov r0, r4 802ed50: f7ff ff6e bl 802ec30 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); } dhcp->tries++; 802ed54: 7b63 ldrb r3, [r4, #13] 802ed56: 3301 adds r3, #1 802ed58: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802ed5a: 2b09 cmp r3, #9 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); } dhcp->tries++; 802ed5c: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802ed5e: d804 bhi.n 802ed6a 802ed60: f44f 727a mov.w r2, #1000 ; 0x3e8 802ed64: 4353 muls r3, r2 802ed66: b29b uxth r3, r3 802ed68: e001 b.n 802ed6e 802ed6a: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ed6e: f44f 72fa mov.w r2, #500 ; 0x1f4 802ed72: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ed76: fb93 f3f2 sdiv r3, r3, r2 802ed7a: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802ed7c: 4630 mov r0, r6 802ed7e: bd7c pop {r2, r3, r4, r5, r6, pc} 802ed80: 08044740 .word 0x08044740 0802ed84 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802ed84: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ed86: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802ed88: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n")); dhcp_set_state(dhcp, DHCP_REBOOTING); 802ed8a: 2103 movs r1, #3 802ed8c: 4620 mov r0, r4 802ed8e: f7ff fe4b bl 802ea28 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802ed92: 4628 mov r0, r5 802ed94: 4621 mov r1, r4 802ed96: 2203 movs r2, #3 802ed98: f7ff feaa bl 802eaf0 if (result == ERR_OK) { 802ed9c: 4606 mov r6, r0 802ed9e: bb40 cbnz r0, 802edf2 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802eda0: 2202 movs r2, #2 802eda2: 4620 mov r0, r4 802eda4: 2139 movs r1, #57 ; 0x39 802eda6: f7ff fe47 bl 802ea38 dhcp_option_short(dhcp, 576); 802edaa: 4620 mov r0, r4 802edac: f44f 7110 mov.w r1, #576 ; 0x240 802edb0: f7ff fe59 bl 802ea66 dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802edb4: 2204 movs r2, #4 802edb6: 2132 movs r1, #50 ; 0x32 802edb8: 4620 mov r0, r4 802edba: f7ff fe3d bl 802ea38 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802edbe: 6a60 ldr r0, [r4, #36] ; 0x24 802edc0: f7ff fe30 bl 802ea24 802edc4: 4601 mov r1, r0 802edc6: 4620 mov r0, r4 802edc8: f7ff fe5d bl 802ea86 dhcp_option_trailer(dhcp); 802edcc: 4620 mov r0, r4 802edce: f7ff fe7a bl 802eac6 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802edd2: 8b21 ldrh r1, [r4, #24] 802edd4: 6920 ldr r0, [r4, #16] 802edd6: 31f0 adds r1, #240 ; 0xf0 802edd8: b289 uxth r1, r1 802edda: f000 ff7c bl 802fcd6 /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802edde: 9500 str r5, [sp, #0] 802ede0: 6860 ldr r0, [r4, #4] 802ede2: 6921 ldr r1, [r4, #16] 802ede4: 4a0e ldr r2, [pc, #56] ; (802ee20 ) 802ede6: 2343 movs r3, #67 ; 0x43 802ede8: f003 fbee bl 80325c8 dhcp_delete_msg(dhcp); 802edec: 4620 mov r0, r4 802edee: f7ff ff1f bl 802ec30 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); } dhcp->tries++; 802edf2: 7b63 ldrb r3, [r4, #13] 802edf4: 3301 adds r3, #1 802edf6: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802edf8: 2b09 cmp r3, #9 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); } dhcp->tries++; 802edfa: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802edfc: d804 bhi.n 802ee08 802edfe: f44f 727a mov.w r2, #1000 ; 0x3e8 802ee02: 4353 muls r3, r2 802ee04: b29b uxth r3, r3 802ee06: e001 b.n 802ee0c 802ee08: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ee0c: f44f 72fa mov.w r2, #500 ; 0x1f4 802ee10: f203 13f3 addw r3, r3, #499 ; 0x1f3 802ee14: fb93 f3f2 sdiv r3, r3, r2 802ee18: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802ee1a: 4630 mov r0, r6 802ee1c: bd7c pop {r2, r3, r4, r5, r6, pc} 802ee1e: bf00 nop 802ee20: 08044740 .word 0x08044740 0802ee24 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 802ee24: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ee26: 6a04 ldr r4, [r0, #32] * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 802ee28: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); dhcp_set_state(dhcp, DHCP_REQUESTING); 802ee2a: 2101 movs r1, #1 802ee2c: 4620 mov r0, r4 802ee2e: f7ff fdfb bl 802ea28 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802ee32: 4628 mov r0, r5 802ee34: 4621 mov r1, r4 802ee36: 2203 movs r2, #3 802ee38: f7ff fe5a bl 802eaf0 if (result == ERR_OK) { 802ee3c: 4606 mov r6, r0 802ee3e: 2800 cmp r0, #0 802ee40: d148 bne.n 802eed4 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802ee42: 2202 movs r2, #2 802ee44: 4620 mov r0, r4 802ee46: 2139 movs r1, #57 ; 0x39 802ee48: f7ff fdf6 bl 802ea38 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802ee4c: 4620 mov r0, r4 802ee4e: 8ca9 ldrh r1, [r5, #36] ; 0x24 802ee50: f7ff fe09 bl 802ea66 /* MUST request the offered IP address */ dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802ee54: 2204 movs r2, #4 802ee56: 2132 movs r1, #50 ; 0x32 802ee58: 4620 mov r0, r4 802ee5a: f7ff fded bl 802ea38 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802ee5e: 6a60 ldr r0, [r4, #36] ; 0x24 802ee60: f7ff fde0 bl 802ea24 802ee64: 4601 mov r1, r0 802ee66: 4620 mov r0, r4 802ee68: f7ff fe0d bl 802ea86 dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); 802ee6c: 2204 movs r2, #4 802ee6e: 2136 movs r1, #54 ; 0x36 802ee70: 4620 mov r0, r4 802ee72: f7ff fde1 bl 802ea38 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->server_ip_addr))); 802ee76: 6a20 ldr r0, [r4, #32] 802ee78: f7ff fdd4 bl 802ea24 802ee7c: 4601 mov r1, r0 802ee7e: 4620 mov r0, r4 802ee80: f7ff fe01 bl 802ea86 dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802ee84: 2204 movs r2, #4 802ee86: 4620 mov r0, r4 802ee88: 2137 movs r1, #55 ; 0x37 802ee8a: f7ff fdd5 bl 802ea38 dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802ee8e: 4620 mov r0, r4 802ee90: 2101 movs r1, #1 802ee92: f7ff fde0 bl 802ea56 dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802ee96: 4620 mov r0, r4 802ee98: 2103 movs r1, #3 802ee9a: f7ff fddc bl 802ea56 dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802ee9e: 4620 mov r0, r4 802eea0: 211c movs r1, #28 802eea2: f7ff fdd8 bl 802ea56 dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802eea6: 2106 movs r1, #6 802eea8: 4620 mov r0, r4 802eeaa: f7ff fdd4 bl 802ea56 #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ dhcp_option_trailer(dhcp); 802eeae: 4620 mov r0, r4 802eeb0: f7ff fe09 bl 802eac6 /* shrink the pbuf to the actual content length */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802eeb4: 8b21 ldrh r1, [r4, #24] 802eeb6: 6920 ldr r0, [r4, #16] 802eeb8: 31f0 adds r1, #240 ; 0xf0 802eeba: b289 uxth r1, r1 802eebc: f000 ff0b bl 802fcd6 /* send broadcast to any DHCP server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802eec0: 9500 str r5, [sp, #0] 802eec2: 6860 ldr r0, [r4, #4] 802eec4: 6921 ldr r1, [r4, #16] 802eec6: 4a0f ldr r2, [pc, #60] ; (802ef04 ) 802eec8: 2343 movs r3, #67 ; 0x43 802eeca: f003 fb7d bl 80325c8 dhcp_delete_msg(dhcp); 802eece: 4620 mov r0, r4 802eed0: f7ff feae bl 802ec30 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); } dhcp->tries++; 802eed4: 7b63 ldrb r3, [r4, #13] 802eed6: 3301 adds r3, #1 802eed8: b2db uxtb r3, r3 msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802eeda: 2b05 cmp r3, #5 802eedc: bf98 it ls 802eede: f44f 727a movls.w r2, #1000 ; 0x3e8 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); } dhcp->tries++; 802eee2: 7363 strb r3, [r4, #13] msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802eee4: bf9a itte ls 802eee6: fa02 f303 lslls.w r3, r2, r3 802eeea: b29b uxthls r3, r3 802eeec: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802eef0: f44f 72fa mov.w r2, #500 ; 0x1f4 802eef4: f203 13f3 addw r3, r3, #499 ; 0x1f3 802eef8: fb93 f3f2 sdiv r3, r3, r2 802eefc: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802eefe: 4630 mov r0, r6 802ef00: bd7c pop {r2, r3, r4, r5, r6, pc} 802ef02: bf00 nop 802ef04: 08044740 .word 0x08044740 0802ef08 : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802ef08: b538 push {r3, r4, r5, lr} struct dhcp *dhcp = netif->dhcp; 802ef0a: 6a04 ldr r4, [r0, #32] * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802ef0c: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0], (s16_t)netif->name[1])); dhcp_set_state(dhcp, DHCP_CHECKING); 802ef0e: 2108 movs r1, #8 802ef10: 4620 mov r0, r4 802ef12: f7ff fd89 bl 802ea28 /* create an ARP query for the offered IP address, expecting that no host responds, as the IP address should not be in use. */ result = etharp_query(netif, &dhcp->offered_ip_addr, NULL); 802ef16: 4628 mov r0, r5 802ef18: f104 0124 add.w r1, r4, #36 ; 0x24 802ef1c: 2200 movs r2, #0 802ef1e: f007 ff61 bl 8036de4 if (result != ERR_OK) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_check: could not perform ARP query\n")); } dhcp->tries++; 802ef22: 7b63 ldrb r3, [r4, #13] 802ef24: 3301 adds r3, #1 802ef26: 7363 strb r3, [r4, #13] msecs = 500; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ef28: 2301 movs r3, #1 802ef2a: 8363 strh r3, [r4, #26] 802ef2c: bd38 pop {r3, r4, r5, pc} 0802ef2e : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 802ef2e: b537 push {r0, r1, r2, r4, r5, lr} u32_t timeout; struct dhcp *dhcp; ip_addr_t sn_mask, gw_addr; LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); 802ef30: 4605 mov r5, r0 802ef32: 2800 cmp r0, #0 802ef34: d059 beq.n 802efea dhcp = netif->dhcp; 802ef36: 6a04 ldr r4, [r0, #32] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 802ef38: 2c00 cmp r4, #0 802ef3a: d056 beq.n 802efea LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* temporary DHCP lease? */ if (dhcp->offered_t1_renew != 0xffffffffUL) { 802ef3c: 6b63 ldr r3, [r4, #52] ; 0x34 802ef3e: 1c58 adds r0, r3, #1 802ef40: d00d beq.n 802ef5e /* set renewal period timer */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t1 renewal timer %"U32_F" secs\n", dhcp->offered_t1_renew)); timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; 802ef42: 223c movs r2, #60 ; 0x3c 802ef44: 331e adds r3, #30 802ef46: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t1_timeout = (u16_t)timeout; 802ef4a: f64f 72ff movw r2, #65535 ; 0xffff 802ef4e: 4293 cmp r3, r2 802ef50: bf28 it cs 802ef52: 4613 movcs r3, r2 802ef54: b29b uxth r3, r3 802ef56: 83a3 strh r3, [r4, #28] if (dhcp->t1_timeout == 0) { 802ef58: b90b cbnz r3, 802ef5e dhcp->t1_timeout = 1; 802ef5a: 2301 movs r3, #1 802ef5c: 83a3 strh r3, [r4, #28] } LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew*1000)); } /* set renewal period timer */ if (dhcp->offered_t2_rebind != 0xffffffffUL) { 802ef5e: 6ba3 ldr r3, [r4, #56] ; 0x38 802ef60: 1c59 adds r1, r3, #1 802ef62: d00d beq.n 802ef80 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t2 rebind timer %"U32_F" secs\n", dhcp->offered_t2_rebind)); timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; 802ef64: 223c movs r2, #60 ; 0x3c 802ef66: 331e adds r3, #30 802ef68: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t2_timeout = (u16_t)timeout; 802ef6c: f64f 72ff movw r2, #65535 ; 0xffff 802ef70: 4293 cmp r3, r2 802ef72: bf28 it cs 802ef74: 4613 movcs r3, r2 802ef76: b29b uxth r3, r3 802ef78: 83e3 strh r3, [r4, #30] if (dhcp->t2_timeout == 0) { 802ef7a: b90b cbnz r3, 802ef80 dhcp->t2_timeout = 1; 802ef7c: 2301 movs r3, #1 802ef7e: 83e3 strh r3, [r4, #30] } LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind*1000)); } /* If we have sub 1 minute lease, t2 and t1 will kick in at the same time. */ if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) { 802ef80: 8be3 ldrh r3, [r4, #30] 802ef82: 8ba2 ldrh r2, [r4, #28] 802ef84: 429a cmp r2, r3 802ef86: d302 bcc.n 802ef8e 802ef88: b10b cbz r3, 802ef8e dhcp->t1_timeout = 0; 802ef8a: 2300 movs r3, #0 802ef8c: 83a3 strh r3, [r4, #28] } if (dhcp->subnet_mask_given) { 802ef8e: 7ba3 ldrb r3, [r4, #14] 802ef90: b10b cbz r3, 802ef96 /* copy offered network mask */ ip_addr_copy(sn_mask, dhcp->offered_sn_mask); 802ef92: 6aa3 ldr r3, [r4, #40] ; 0x28 802ef94: e00b b.n 802efae } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 802ef96: f894 3024 ldrb.w r3, [r4, #36] ; 0x24 if (first_octet <= 127) { 802ef9a: 061a lsls r2, r3, #24 802ef9c: d401 bmi.n 802efa2 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 802ef9e: 23ff movs r3, #255 ; 0xff 802efa0: e005 b.n 802efae } else if (first_octet >= 192) { 802efa2: 2bbf cmp r3, #191 ; 0xbf ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 802efa4: bf8c ite hi 802efa6: f06f 437f mvnhi.w r3, #4278190080 ; 0xff000000 } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 802efaa: f64f 73ff movwls r3, #65535 ; 0xffff 802efae: 9300 str r3, [sp, #0] } } ip_addr_copy(gw_addr, dhcp->offered_gw_addr); 802efb0: 6ae3 ldr r3, [r4, #44] ; 0x2c 802efb2: 9301 str r3, [sp, #4] /* gateway address not given? */ if (ip_addr_isany(&gw_addr)) { 802efb4: b92b cbnz r3, 802efc2 /* copy network address */ ip_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 802efb6: 6a63 ldr r3, [r4, #36] ; 0x24 802efb8: 9a00 ldr r2, [sp, #0] 802efba: 4013 ands r3, r2 /* use first host address on network as gateway */ ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL)); 802efbc: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 802efc0: 9301 str r3, [sp, #4] } #endif /* LWIP_DHCP_AUTOIP_COOP */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->offered_ip_addr))); netif_set_ipaddr(netif, &dhcp->offered_ip_addr); 802efc2: 4628 mov r0, r5 802efc4: f104 0124 add.w r1, r4, #36 ; 0x24 802efc8: f000 fd6a bl 802faa0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): SN: 0x%08"X32_F"\n", ip4_addr_get_u32(&sn_mask))); netif_set_netmask(netif, &sn_mask); 802efcc: 4628 mov r0, r5 802efce: 4669 mov r1, sp 802efd0: f000 fda6 bl 802fb20 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): GW: 0x%08"X32_F"\n", ip4_addr_get_u32(&gw_addr))); netif_set_gw(netif, &gw_addr); 802efd4: a901 add r1, sp, #4 802efd6: 4628 mov r0, r5 802efd8: f000 fd9e bl 802fb18 /* bring the interface up */ netif_set_up(netif); 802efdc: 4628 mov r0, r5 802efde: f000 fdf5 bl 802fbcc /* netif is now bound to DHCP leased address */ dhcp_set_state(dhcp, DHCP_BOUND); 802efe2: 4620 mov r0, r4 802efe4: 210a movs r1, #10 802efe6: f7ff fd1f bl 802ea28 } 802efea: bd3e pop {r1, r2, r3, r4, r5, pc} 0802efec : /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 802efec: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802eff0: 4692 mov sl, r2 802eff2: b08b sub sp, #44 ; 0x2c LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); if (p->len < DHCP_MIN_REPLY_LEN) { 802eff4: f8ba 300a ldrh.w r3, [sl, #10] */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { struct netif *netif = (struct netif *)arg; struct dhcp *dhcp = netif->dhcp; 802eff8: f8d0 8020 ldr.w r8, [r0, #32] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802effc: 6852 ldr r2, [r2, #4] LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); if (p->len < DHCP_MIN_REPLY_LEN) { 802effe: 2b2b cmp r3, #43 ; 0x2b /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 802f000: 4605 mov r5, r0 LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); if (p->len < DHCP_MIN_REPLY_LEN) { 802f002: f240 81b8 bls.w 802f376 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n")); goto free_pbuf_and_return; } if (reply_msg->op != DHCP_BOOTREPLY) { 802f006: 7813 ldrb r3, [r2, #0] 802f008: 2b02 cmp r3, #2 802f00a: f040 81b4 bne.w 802f376 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); goto free_pbuf_and_return; } /* iterate through hardware address and match against DHCP message */ for (i = 0; i < netif->hwaddr_len; i++) { 802f00e: f890 1026 ldrb.w r1, [r0, #38] ; 0x26 802f012: 2300 movs r3, #0 802f014: e008 b.n 802f028 /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 802f016: 18e8 adds r0, r5, r3 802f018: 3301 adds r3, #1 802f01a: 18d4 adds r4, r2, r3 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); goto free_pbuf_and_return; } /* iterate through hardware address and match against DHCP message */ for (i = 0; i < netif->hwaddr_len; i++) { if (netif->hwaddr[i] != reply_msg->chaddr[i]) { 802f01c: f890 0027 ldrb.w r0, [r0, #39] ; 0x27 802f020: 7ee4 ldrb r4, [r4, #27] 802f022: 4284 cmp r4, r0 802f024: f040 81a7 bne.w 802f376 if (reply_msg->op != DHCP_BOOTREPLY) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); goto free_pbuf_and_return; } /* iterate through hardware address and match against DHCP message */ for (i = 0; i < netif->hwaddr_len; i++) { 802f028: b2d8 uxtb r0, r3 802f02a: 4288 cmp r0, r1 802f02c: d3f3 bcc.n 802f016 (u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i])); goto free_pbuf_and_return; } } /* match transaction ID against what we expected */ if (ntohl(reply_msg->xid) != dhcp->xid) { 802f02e: 6850 ldr r0, [r2, #4] 802f030: f7ff fcf8 bl 802ea24 802f034: f8d8 3000 ldr.w r3, [r8] 802f038: 4298 cmp r0, r3 802f03a: f040 819c bne.w 802f376 struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; /* clear received options */ dhcp_clear_all_options(dhcp); 802f03e: 2100 movs r1, #0 802f040: 220a movs r2, #10 802f042: 489d ldr r0, [pc, #628] ; (802f2b8 ) 802f044: f7f2 fee8 bl 8021e18 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 802f048: f8ba 300a ldrh.w r3, [sl, #10] 802f04c: 2b2b cmp r3, #43 ; 0x2b 802f04e: f240 8192 bls.w 802f376 return ERR_BUF; } dhcp->msg_in = (struct dhcp_msg *)p->payload; 802f052: f8da 3004 ldr.w r3, [sl, #4] /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; /* parse options to the end of the received packet */ options_idx_max = p->tot_len; 802f056: f8ba 9008 ldrh.w r9, [sl, #8] dhcp_clear_all_options(dhcp); /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { return ERR_BUF; } dhcp->msg_in = (struct dhcp_msg *)p->payload; 802f05a: f8c8 3008 str.w r3, [r8, #8] u16_t offset_max; u16_t options_idx; u16_t options_idx_max; struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; 802f05e: f04f 0b00 mov.w fp, #0 #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802f062: 22f0 movs r2, #240 ; 0xf0 802f064: e004 b.n 802f070 parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; goto again; } else if (parse_sname_as_options) { parse_sname_as_options = 0; 802f066: f04f 0b00 mov.w fp, #0 options_idx = DHCP_SNAME_OFS; options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 802f06a: f04f 096c mov.w r9, #108 ; 0x6c options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; goto again; } else if (parse_sname_as_options) { parse_sname_as_options = 0; options_idx = DHCP_SNAME_OFS; 802f06e: 222c movs r2, #44 ; 0x2c #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802f070: 4657 mov r7, sl 802f072: e009 b.n 802f088 again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; options_idx_max -= q->len; q = q->next; 802f074: 683f ldr r7, [r7, #0] /* parse options to the end of the received packet */ options_idx_max = p->tot_len; again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; 802f076: 1ad2 subs r2, r2, r3 options_idx_max -= q->len; 802f078: ebc3 0909 rsb r9, r3, r9 /* parse options to the end of the received packet */ options_idx_max = p->tot_len; again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; 802f07c: b292 uxth r2, r2 options_idx_max -= q->len; 802f07e: fa1f f989 uxth.w r9, r9 options_idx = DHCP_OPTIONS_OFS; /* parse options to the end of the received packet */ options_idx_max = p->tot_len; again: q = p; while((q != NULL) && (options_idx >= q->len)) { 802f082: 2f00 cmp r7, #0 802f084: f000 8177 beq.w 802f376 802f088: 897b ldrh r3, [r7, #10] 802f08a: 429a cmp r2, r3 802f08c: d2f2 bcs.n 802f074 if (q == NULL) { return ERR_BUF; } offset = options_idx; offset_max = options_idx_max; options = (u8_t*)q->payload; 802f08e: 6878 ldr r0, [r7, #4] 802f090: 9003 str r0, [sp, #12] 802f092: e0db b.n 802f24c u8_t len; u8_t decode_len = 0; int decode_idx = -1; u16_t val_offset = offset + 2; /* len byte might be in the next pbuf */ if (offset + 1 < q->len) { 802f094: 897b ldrh r3, [r7, #10] 802f096: 1c50 adds r0, r2, #1 802f098: 4298 cmp r0, r3 802f09a: da03 bge.n 802f0a4 len = options[offset + 1]; 802f09c: 9803 ldr r0, [sp, #12] 802f09e: 1883 adds r3, r0, r2 802f0a0: 785b ldrb r3, [r3, #1] 802f0a2: e003 b.n 802f0ac } else { len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); 802f0a4: 683b ldr r3, [r7, #0] 802f0a6: b10b cbz r3, 802f0ac 802f0a8: 685b ldr r3, [r3, #4] 802f0aa: 781b ldrb r3, [r3, #0] } /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ decode_len = len; switch(op) { 802f0ac: 2933 cmp r1, #51 ; 0x33 802f0ae: d038 beq.n 802f122 802f0b0: d807 bhi.n 802f0c2 802f0b2: 2901 cmp r1, #1 802f0b4: d019 beq.n 802f0ea 802f0b6: d311 bcc.n 802f0dc 802f0b8: 2903 cmp r1, #3 802f0ba: d01d beq.n 802f0f8 802f0bc: 2906 cmp r1, #6 802f0be: d155 bne.n 802f16c 802f0c0: e021 b.n 802f106 802f0c2: 2936 cmp r1, #54 ; 0x36 802f0c4: d03d beq.n 802f142 802f0c6: d804 bhi.n 802f0d2 802f0c8: 2934 cmp r1, #52 ; 0x34 802f0ca: d031 beq.n 802f130 802f0cc: 2935 cmp r1, #53 ; 0x35 802f0ce: d14d bne.n 802f16c 802f0d0: e035 b.n 802f13e 802f0d2: 293a cmp r1, #58 ; 0x3a 802f0d4: d03c beq.n 802f150 802f0d6: 293b cmp r1, #59 ; 0x3b 802f0d8: d148 bne.n 802f16c 802f0da: e040 b.n 802f15e /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; /* will be increased below */ offset--; 802f0dc: 1e51 subs r1, r2, #1 decode_len = len; switch(op) { /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; 802f0de: 2300 movs r3, #0 /* will be increased below */ offset--; 802f0e0: b289 uxth r1, r1 /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; 802f0e2: f04f 34ff mov.w r4, #4294967295 decode_len = len; switch(op) { /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; 802f0e6: 461e mov r6, r3 802f0e8: e044 b.n 802f174 /* will be increased below */ offset--; break; case(DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f0ea: 2b04 cmp r3, #4 802f0ec: f040 8143 bne.w 802f376 802f0f0: 461e mov r6, r3 802f0f2: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 802f0f4: 2406 movs r4, #6 802f0f6: e03d b.n 802f174 break; case(DHCP_OPTION_ROUTER): decode_len = 4; /* only copy the first given router */ LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 802f0f8: 2b03 cmp r3, #3 802f0fa: f240 813c bls.w 802f376 802f0fe: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_ROUTER; 802f100: 2407 movs r4, #7 case(DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; break; case(DHCP_OPTION_ROUTER): decode_len = 4; /* only copy the first given router */ 802f102: 2604 movs r6, #4 802f104: e036 b.n 802f174 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_ROUTER; break; case(DHCP_OPTION_DNS_SERVER): /* special case: there might be more than one server */ LWIP_ERROR("len % 4 == 0", len % 4 == 0, return ERR_VAL;); 802f106: 0799 lsls r1, r3, #30 802f108: f040 8135 bne.w 802f376 /* limit number of DNS servers */ decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS); 802f10c: 2b08 cmp r3, #8 802f10e: bf34 ite cc 802f110: 461e movcc r6, r3 802f112: 2608 movcs r6, #8 802f114: b2f6 uxtb r6, r6 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 802f116: 42b3 cmp r3, r6 802f118: f0c0 812d bcc.w 802f376 802f11c: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_DNS_SERVER; 802f11e: 2408 movs r4, #8 802f120: e028 b.n 802f174 break; case(DHCP_OPTION_LEASE_TIME): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f122: 2b04 cmp r3, #4 802f124: f040 8127 bne.w 802f376 802f128: 461e mov r6, r3 802f12a: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 802f12c: 2403 movs r4, #3 802f12e: e021 b.n 802f174 break; case(DHCP_OPTION_OVERLOAD): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802f130: 2b01 cmp r3, #1 802f132: f040 8120 bne.w 802f376 802f136: 461e mov r6, r3 802f138: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 802f13a: 2400 movs r4, #0 802f13c: e01a b.n 802f174 break; case(DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802f13e: 2b01 cmp r3, #1 802f140: e007 b.n 802f152 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; break; case(DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f142: 2b04 cmp r3, #4 802f144: f040 8117 bne.w 802f376 802f148: 461e mov r6, r3 802f14a: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 802f14c: 2402 movs r4, #2 802f14e: e011 b.n 802f174 break; case(DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f150: 2b04 cmp r3, #4 802f152: f040 8110 bne.w 802f376 802f156: 461e mov r6, r3 802f158: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T1; 802f15a: 461c mov r4, r3 802f15c: e00a b.n 802f174 break; case(DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802f15e: 2b04 cmp r3, #4 802f160: f040 8109 bne.w 802f376 802f164: 461e mov r6, r3 802f166: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T2; 802f168: 2405 movs r4, #5 802f16a: e003 b.n 802f174 } else { len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); } /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ decode_len = len; switch(op) { 802f16c: 4611 mov r1, r2 /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; 802f16e: f04f 34ff mov.w r4, #4294967295 case(DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_T2; break; default: decode_len = 0; 802f172: 2600 movs r6, #0 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; 802f174: 3102 adds r1, #2 802f176: fa13 f381 uxtah r3, r3, r1 802f17a: b29b uxth r3, r3 802f17c: 9301 str r3, [sp, #4] if (decode_len > 0) { 802f17e: 2e00 cmp r6, #0 802f180: d04f beq.n 802f222 while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; u16_t val_offset = offset + 2; 802f182: 3202 adds r2, #2 802f184: b292 uxth r2, r2 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 802f186: a90a add r1, sp, #40 ; 0x28 while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; u16_t val_offset = offset + 2; 802f188: 9205 str r2, [sp, #20] LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 802f18a: 2300 movs r3, #0 /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 802f18c: 4a4b ldr r2, [pc, #300] ; (802f2bc ) LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 802f18e: f841 3d04 str.w r3, [r1, #-4]! /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 802f192: eb02 0284 add.w r2, r2, r4, lsl #2 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 802f196: 9104 str r1, [sp, #16] /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 802f198: 9206 str r2, [sp, #24] 802f19a: 9302 str r3, [sp, #8] 802f19c: 9805 ldr r0, [sp, #20] 802f19e: 9902 ldr r1, [sp, #8] if (decode_len > 0) { u32_t value = 0; u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); if (!dhcp_option_given(dhcp, decode_idx)) { 802f1a0: 4a45 ldr r2, [pc, #276] ; (802f2b8 ) /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 802f1a2: 1843 adds r3, r0, r1 if (decode_len > 0) { u32_t value = 0; u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); if (!dhcp_option_given(dhcp, decode_idx)) { 802f1a4: 4844 ldr r0, [pc, #272] ; (802f2b8 ) 802f1a6: 18a2 adds r2, r4, r2 802f1a8: 9207 str r2, [sp, #28] 802f1aa: 5c22 ldrb r2, [r4, r0] /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 802f1ac: ebc1 0c06 rsb ip, r1, r6 802f1b0: b29b uxth r3, r3 802f1b2: fa5f fc8c uxtb.w ip, ip if (decode_len > 0) { u32_t value = 0; u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); if (!dhcp_option_given(dhcp, decode_idx)) { 802f1b6: 2a00 cmp r2, #0 802f1b8: d133 bne.n 802f222 copy_len = LWIP_MIN(decode_len, 4); pbuf_copy_partial(q, &value, copy_len, val_offset); 802f1ba: f1bc 0f03 cmp.w ip, #3 802f1be: bf94 ite ls 802f1c0: 4662 movls r2, ip 802f1c2: 2204 movhi r2, #4 802f1c4: 4638 mov r0, r7 802f1c6: 9904 ldr r1, [sp, #16] 802f1c8: f8cd c000 str.w ip, [sp] 802f1cc: f000 feaa bl 802ff24 if (decode_len > 4) { 802f1d0: f8dd c000 ldr.w ip, [sp] 802f1d4: f1bc 0f04 cmp.w ip, #4 802f1d8: d90f bls.n 802f1fa /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 802f1da: f01c 0f03 tst.w ip, #3 802f1de: f040 80ca bne.w 802f376 dhcp_got_option(dhcp, decode_idx); 802f1e2: 9907 ldr r1, [sp, #28] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802f1e4: 9809 ldr r0, [sp, #36] ; 0x24 copy_len = LWIP_MIN(decode_len, 4); pbuf_copy_partial(q, &value, copy_len, val_offset); if (decode_len > 4) { /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); dhcp_got_option(dhcp, decode_idx); 802f1e6: 2201 movs r2, #1 802f1e8: 700a strb r2, [r1, #0] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802f1ea: f7ff fc19 bl 802ea20 802f1ee: 9b02 ldr r3, [sp, #8] 802f1f0: 9906 ldr r1, [sp, #24] decode_len -= 4; val_offset += 4; decode_idx++; 802f1f2: 3401 adds r4, #1 pbuf_copy_partial(q, &value, copy_len, val_offset); if (decode_len > 4) { /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); dhcp_got_option(dhcp, decode_idx); dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802f1f4: 50c8 str r0, [r1, r3] 802f1f6: 3304 adds r3, #4 802f1f8: e7cf b.n 802f19a decode_len -= 4; val_offset += 4; decode_idx++; goto decode_next; } else if (decode_len == 4) { 802f1fa: d104 bne.n 802f206 value = ntohl(value); 802f1fc: 9809 ldr r0, [sp, #36] ; 0x24 802f1fe: f7ff fc11 bl 802ea24 802f202: 9009 str r0, [sp, #36] ; 0x24 802f204: e006 b.n 802f214 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 802f206: f1bc 0f01 cmp.w ip, #1 802f20a: f040 80b4 bne.w 802f376 value = ((u8_t*)&value)[0]; 802f20e: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 802f212: 9309 str r3, [sp, #36] ; 0x24 } dhcp_got_option(dhcp, decode_idx); 802f214: 4a28 ldr r2, [pc, #160] ; (802f2b8 ) dhcp_set_option_value(dhcp, decode_idx, value); 802f216: 4829 ldr r0, [pc, #164] ; (802f2bc ) value = ntohl(value); } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); value = ((u8_t*)&value)[0]; } dhcp_got_option(dhcp, decode_idx); 802f218: 2301 movs r3, #1 802f21a: 5513 strb r3, [r2, r4] dhcp_set_option_value(dhcp, decode_idx, value); 802f21c: 9b09 ldr r3, [sp, #36] ; 0x24 802f21e: f840 3024 str.w r3, [r0, r4, lsl #2] } } if (offset >= q->len) { 802f222: 897b ldrh r3, [r7, #10] 802f224: 9901 ldr r1, [sp, #4] 802f226: 4299 cmp r1, r3 802f228: d30f bcc.n 802f24a offset -= q->len; 802f22a: 1aca subs r2, r1, r3 offset_max -= q->len; 802f22c: ebc3 0909 rsb r9, r3, r9 dhcp_got_option(dhcp, decode_idx); dhcp_set_option_value(dhcp, decode_idx, value); } } if (offset >= q->len) { offset -= q->len; 802f230: b292 uxth r2, r2 offset_max -= q->len; 802f232: fa1f f989 uxth.w r9, r9 if ((offset < offset_max) && offset_max) { 802f236: 454a cmp r2, r9 dhcp_got_option(dhcp, decode_idx); dhcp_set_option_value(dhcp, decode_idx, value); } } if (offset >= q->len) { offset -= q->len; 802f238: 9201 str r2, [sp, #4] offset_max -= q->len; if ((offset < offset_max) && offset_max) { 802f23a: d303 bcc.n 802f244 break; } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 802f23c: 4a1e ldr r2, [pc, #120] ; (802f2b8 ) 802f23e: 7813 ldrb r3, [r2, #0] 802f240: b963 cbnz r3, 802f25c 802f242: e09f b.n 802f384 } if (offset >= q->len) { offset -= q->len; offset_max -= q->len; if ((offset < offset_max) && offset_max) { q = q->next; 802f244: 683f ldr r7, [r7, #0] LWIP_ASSERT("next pbuf was null", q); options = (u8_t*)q->payload; 802f246: 687b ldr r3, [r7, #4] 802f248: 9303 str r3, [sp, #12] u32_t value = 0; u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); if (!dhcp_option_given(dhcp, decode_idx)) { copy_len = LWIP_MIN(decode_len, 4); 802f24a: 9a01 ldr r2, [sp, #4] } offset = options_idx; offset_max = options_idx_max; options = (u8_t*)q->payload; /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { 802f24c: 9803 ldr r0, [sp, #12] 802f24e: 5c81 ldrb r1, [r0, r2] 802f250: 29ff cmp r1, #255 ; 0xff 802f252: d0f3 beq.n 802f23c 802f254: 454a cmp r2, r9 802f256: f4ff af1d bcc.w 802f094 802f25a: e7ef b.n 802f23c } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f25c: 4b17 ldr r3, [pc, #92] ; (802f2bc ) dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f25e: 4916 ldr r1, [pc, #88] ; (802f2b8 ) } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f260: 681b ldr r3, [r3, #0] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f262: 2200 movs r2, #0 if (overload == DHCP_OVERLOAD_FILE) { 802f264: 2b01 cmp r3, #1 } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802f266: 700a strb r2, [r1, #0] if (overload == DHCP_OVERLOAD_FILE) { 802f268: f000 8093 beq.w 802f392 parse_file_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 802f26c: 2b02 cmp r3, #2 802f26e: f43f aefa beq.w 802f066 parse_sname_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 802f272: 2b03 cmp r3, #3 802f274: f040 8086 bne.w 802f384 802f278: e089 b.n 802f38e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP_OPTION_MESSAGE_TYPE option not found\n")); goto free_pbuf_and_return; } /* read DHCP message type */ msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); 802f27a: 4a10 ldr r2, [pc, #64] ; (802f2bc ) 802f27c: 7911 ldrb r1, [r2, #4] /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 802f27e: 2905 cmp r1, #5 802f280: d140 bne.n 802f304 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_REQUESTING) { 802f282: f898 100c ldrb.w r1, [r8, #12] 802f286: 2901 cmp r1, #1 802f288: d135 bne.n 802f2f6 * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802f28a: 6a2c ldr r4, [r5, #32] #if LWIP_DHCP_BOOTP_FILE ip_addr_set_zero(&dhcp->offered_si_addr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* lease time given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { 802f28c: 78db ldrb r3, [r3, #3] #if LWIP_DNS u8_t n; #endif /* LWIP_DNS */ /* clear options we might not get from the ACK */ ip_addr_set_zero(&dhcp->offered_sn_mask); 802f28e: f8c4 b028 str.w fp, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802f292: f8c4 b02c str.w fp, [r4, #44] ; 0x2c #if LWIP_DHCP_BOOTP_FILE ip_addr_set_zero(&dhcp->offered_si_addr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* lease time given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { 802f296: b10b cbz r3, 802f29c /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 802f298: 68d3 ldr r3, [r2, #12] 802f29a: 6323 str r3, [r4, #48] ; 0x30 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 802f29c: 4b06 ldr r3, [pc, #24] ; (802f2b8 ) 802f29e: 791a ldrb r2, [r3, #4] 802f2a0: b112 cbz r2, 802f2a8 /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 802f2a2: 4a06 ldr r2, [pc, #24] ; (802f2bc ) 802f2a4: 6912 ldr r2, [r2, #16] 802f2a6: e001 b.n 802f2ac } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 802f2a8: 6b22 ldr r2, [r4, #48] ; 0x30 802f2aa: 0852 lsrs r2, r2, #1 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802f2ac: 795b ldrb r3, [r3, #5] if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 802f2ae: 6362 str r2, [r4, #52] ; 0x34 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802f2b0: b133 cbz r3, 802f2c0 /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 802f2b2: 4b02 ldr r3, [pc, #8] ; (802f2bc ) 802f2b4: 695b ldr r3, [r3, #20] 802f2b6: e004 b.n 802f2c2 802f2b8: 2000eacc .word 0x2000eacc 802f2bc: 2000ead8 .word 0x2000ead8 } else { /* calculate safe periods for rebinding */ dhcp->offered_t2_rebind = dhcp->offered_t0_lease; 802f2c0: 6b23 ldr r3, [r4, #48] ; 0x30 802f2c2: 63a3 str r3, [r4, #56] ; 0x38 } /* (y)our internet address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802f2c4: 68a3 ldr r3, [r4, #8] boot file name copied in dhcp_parse_reply if not overloaded */ ip_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* subnet mask given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { 802f2c6: 4a39 ldr r2, [pc, #228] ; (802f3ac ) /* calculate safe periods for rebinding */ dhcp->offered_t2_rebind = dhcp->offered_t0_lease; } /* (y)our internet address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802f2c8: 691b ldr r3, [r3, #16] 802f2ca: 6263 str r3, [r4, #36] ; 0x24 boot file name copied in dhcp_parse_reply if not overloaded */ ip_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* subnet mask given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { 802f2cc: 7993 ldrb r3, [r2, #6] 802f2ce: 4616 mov r6, r2 802f2d0: b12b cbz r3, 802f2de /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 802f2d2: 4b37 ldr r3, [pc, #220] ; (802f3b0 ) 802f2d4: 6998 ldr r0, [r3, #24] 802f2d6: f7ff fba3 bl 802ea20 dhcp->subnet_mask_given = 1; 802f2da: 2301 movs r3, #1 #endif /* LWIP_DHCP_BOOTP_FILE */ /* subnet mask given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 802f2dc: 62a0 str r0, [r4, #40] ; 0x28 dhcp->subnet_mask_given = 1; } else { dhcp->subnet_mask_given = 0; 802f2de: 73a3 strb r3, [r4, #14] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 802f2e0: 79f3 ldrb r3, [r6, #7] 802f2e2: b123 cbz r3, 802f2ee ip4_addr_set_u32(&dhcp->offered_gw_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 802f2e4: 4b32 ldr r3, [pc, #200] ; (802f3b0 ) 802f2e6: 69d8 ldr r0, [r3, #28] 802f2e8: f7ff fb9a bl 802ea20 802f2ec: 62e0 str r0, [r4, #44] ; 0x2c /* in requesting state? */ if (dhcp->state == DHCP_REQUESTING) { dhcp_handle_ack(netif); #if DHCP_DOES_ARP_CHECK /* check if the acknowledged lease address is already in use */ dhcp_check(netif); 802f2ee: 4628 mov r0, r5 802f2f0: f7ff fe0a bl 802ef08 802f2f4: e03f b.n 802f376 /* bind interface to the acknowledged lease address */ dhcp_bind(netif); #endif } /* already bound to the given lease address? */ else if ((dhcp->state == DHCP_REBOOTING) || (dhcp->state == DHCP_REBINDING) || (dhcp->state == DHCP_RENEWING)) { 802f2f6: 3903 subs r1, #3 802f2f8: 2902 cmp r1, #2 802f2fa: d83c bhi.n 802f376 dhcp_bind(netif); 802f2fc: 4628 mov r0, r5 802f2fe: f7ff fe16 bl 802ef2e 802f302: e038 b.n 802f376 } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 802f304: 2906 cmp r1, #6 802f306: d121 bne.n 802f34c 802f308: f898 300c ldrb.w r3, [r8, #12] 802f30c: 2b05 cmp r3, #5 802f30e: d832 bhi.n 802f376 802f310: f998 300c ldrsb.w r3, [r8, #12] 802f314: f04f 42b8 mov.w r2, #1543503872 ; 0x5c000000 802f318: 409a lsls r2, r3 802f31a: d52c bpl.n 802f376 { struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Set the interface down since the address must no longer be used, as per RFC2131 */ netif_set_down(netif); 802f31c: 4628 mov r0, r5 * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802f31e: 6a2c ldr r4, [r5, #32] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Set the interface down since the address must no longer be used, as per RFC2131 */ netif_set_down(netif); 802f320: f000 fc6e bl 802fc00 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802f324: 4628 mov r0, r5 802f326: 4923 ldr r1, [pc, #140] ; (802f3b4 ) 802f328: f000 fbba bl 802faa0 netif_set_gw(netif, IP_ADDR_ANY); 802f32c: 4628 mov r0, r5 802f32e: 4921 ldr r1, [pc, #132] ; (802f3b4 ) 802f330: f000 fbf2 bl 802fb18 netif_set_netmask(netif, IP_ADDR_ANY); 802f334: 4628 mov r0, r5 802f336: 491f ldr r1, [pc, #124] ; (802f3b4 ) 802f338: f000 fbf2 bl 802fb20 /* Change to a defined state */ dhcp_set_state(dhcp, DHCP_BACKING_OFF); 802f33c: 4620 mov r0, r4 802f33e: 210c movs r1, #12 802f340: f7ff fb72 bl 802ea28 /* We can immediately restart discovery */ dhcp_discover(netif); 802f344: 4628 mov r0, r5 802f346: f7ff fc7f bl 802ec48 802f34a: e014 b.n 802f376 (dhcp->state == DHCP_REBINDING) || (dhcp->state == DHCP_RENEWING ))) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); dhcp_handle_nak(netif); } /* received a DHCP_OFFER in DHCP_SELECTING state? */ else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_SELECTING)) { 802f34c: 2902 cmp r1, #2 802f34e: d112 bne.n 802f376 802f350: f898 100c ldrb.w r1, [r8, #12] 802f354: 2906 cmp r1, #6 802f356: d10e bne.n 802f376 { struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* obtain the server address */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { 802f358: 789b ldrb r3, [r3, #2] dhcp_handle_nak(netif); } /* received a DHCP_OFFER in DHCP_SELECTING state? */ else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_SELECTING)) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_SELECTING state\n")); dhcp->request_timeout = 0; 802f35a: f8a8 b01a strh.w fp, [r8, #26] * @param netif the netif under DHCP control */ static void dhcp_handle_offer(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802f35e: 6a2c ldr r4, [r5, #32] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* obtain the server address */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { 802f360: b14b cbz r3, 802f376 ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 802f362: 6890 ldr r0, [r2, #8] 802f364: f7ff fb5c bl 802ea20 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->server_ip_addr))); /* remember offered address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802f368: 68a3 ldr r3, [r4, #8] struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* obtain the server address */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 802f36a: 6220 str r0, [r4, #32] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->server_ip_addr))); /* remember offered address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802f36c: 691b ldr r3, [r3, #16] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->offered_ip_addr))); dhcp_select(netif); 802f36e: 4628 mov r0, r5 if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->server_ip_addr))); /* remember offered address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802f370: 6263 str r3, [r4, #36] ; 0x24 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->offered_ip_addr))); dhcp_select(netif); 802f372: f7ff fd57 bl 802ee24 dhcp->request_timeout = 0; /* remember offered lease */ dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; 802f376: 2300 movs r3, #0 802f378: f8c8 3008 str.w r3, [r8, #8] pbuf_free(p); 802f37c: 4650 mov r0, sl 802f37e: f000 fc83 bl 802fc88 802f382: e010 b.n 802f3a6 /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; goto again; } else if (parse_sname_as_options) { 802f384: f1bb 0f00 cmp.w fp, #0 802f388: f47f ae6d bne.w 802f066 802f38c: e005 b.n 802f39a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { parse_sname_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { parse_sname_as_options = 1; 802f38e: f04f 0b01 mov.w fp, #1 } if (parse_file_as_options) { /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; 802f392: f04f 09ec mov.w r9, #236 ; 0xec #endif /* LWIP_DHCP_BOOTP_FILE */ } if (parse_file_as_options) { /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; 802f396: 226c movs r2, #108 ; 0x6c 802f398: e66a b.n 802f070 goto free_pbuf_and_return; } LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("searching DHCP_OPTION_MESSAGE_TYPE\n")); /* obtain pointer to DHCP message type */ if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) { 802f39a: 4b04 ldr r3, [pc, #16] ; (802f3ac ) 802f39c: 785a ldrb r2, [r3, #1] 802f39e: 2a00 cmp r2, #0 802f3a0: f47f af6b bne.w 802f27a 802f3a4: e7e7 b.n 802f376 dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; pbuf_free(p); } 802f3a6: b00b add sp, #44 ; 0x2c 802f3a8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802f3ac: 2000eacc .word 0x2000eacc 802f3b0: 2000ead8 .word 0x2000ead8 802f3b4: 08044744 .word 0x08044744 0802f3b8 : * * @param netif the network interface on which the reply was received * @param addr The IP address we received a reply from */ void dhcp_arp_reply(struct netif *netif, ip_addr_t *addr) { 802f3b8: b537 push {r0, r1, r2, r4, r5, lr} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 802f3ba: 4605 mov r5, r0 802f3bc: 2800 cmp r0, #0 802f3be: d037 beq.n 802f430 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_arp_reply()\n")); /* is a DHCP client doing an ARP check? */ if ((netif->dhcp != NULL) && (netif->dhcp->state == DHCP_CHECKING)) { 802f3c0: 6a04 ldr r4, [r0, #32] 802f3c2: 2c00 cmp r4, #0 802f3c4: d034 beq.n 802f430 802f3c6: 7b23 ldrb r3, [r4, #12] 802f3c8: 2b08 cmp r3, #8 802f3ca: d131 bne.n 802f430 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n", ip4_addr_get_u32(addr))); /* did a host respond with the address we were offered by the DHCP server? */ if (ip_addr_cmp(addr, &netif->dhcp->offered_ip_addr)) { 802f3cc: 680a ldr r2, [r1, #0] 802f3ce: 6a63 ldr r3, [r4, #36] ; 0x24 802f3d0: 429a cmp r2, r3 802f3d2: d12d bne.n 802f430 { struct dhcp *dhcp = netif->dhcp; err_t result = ERR_OK; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n")); dhcp_set_state(dhcp, DHCP_BACKING_OFF); 802f3d4: 4620 mov r0, r4 802f3d6: 210c movs r1, #12 802f3d8: f7ff fb26 bl 802ea28 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); 802f3dc: 4628 mov r0, r5 802f3de: 4621 mov r1, r4 802f3e0: 2204 movs r2, #4 802f3e2: f7ff fb85 bl 802eaf0 if (result == ERR_OK) { 802f3e6: b9f0 cbnz r0, 802f426 dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802f3e8: 2204 movs r2, #4 802f3ea: 2132 movs r1, #50 ; 0x32 802f3ec: 4620 mov r0, r4 802f3ee: f7ff fb23 bl 802ea38 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802f3f2: 6a60 ldr r0, [r4, #36] ; 0x24 802f3f4: f7ff fb16 bl 802ea24 802f3f8: 4601 mov r1, r0 802f3fa: 4620 mov r0, r4 802f3fc: f7ff fb43 bl 802ea86 dhcp_option_trailer(dhcp); 802f400: 4620 mov r0, r4 802f402: f7ff fb60 bl 802eac6 /* resize pbuf to reflect true size of options */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f406: 8b21 ldrh r1, [r4, #24] 802f408: 6920 ldr r0, [r4, #16] 802f40a: 31f0 adds r1, #240 ; 0xf0 802f40c: b289 uxth r1, r1 802f40e: f000 fc62 bl 802fcd6 /* per section 4.4.4, broadcast DECLINE messages */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802f412: 9500 str r5, [sp, #0] 802f414: 6860 ldr r0, [r4, #4] 802f416: 6921 ldr r1, [r4, #16] 802f418: 4a06 ldr r2, [pc, #24] ; (802f434 ) 802f41a: 2343 movs r3, #67 ; 0x43 802f41c: f003 f8d4 bl 80325c8 dhcp_delete_msg(dhcp); 802f420: 4620 mov r0, r4 802f422: f7ff fc05 bl 802ec30 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_decline: could not allocate DHCP request\n")); } dhcp->tries++; 802f426: 7b63 ldrb r3, [r4, #13] 802f428: 3301 adds r3, #1 802f42a: 7363 strb r3, [r4, #13] msecs = 10*1000; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f42c: 2314 movs r3, #20 802f42e: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, ("dhcp_arp_reply(): arp reply matched with offered address, declining\n")); dhcp_decline(netif); } } } 802f430: bd3e pop {r1, r2, r3, r4, r5, pc} 802f432: bf00 nop 802f434: 08044740 .word 0x08044740 0802f438 : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802f438: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802f43a: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802f43c: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); dhcp_set_state(dhcp, DHCP_RENEWING); 802f43e: 2105 movs r1, #5 802f440: 4620 mov r0, r4 802f442: f7ff faf1 bl 802ea28 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802f446: 4628 mov r0, r5 802f448: 4621 mov r1, r4 802f44a: 2203 movs r2, #3 802f44c: f7ff fb50 bl 802eaf0 if (result == ERR_OK) { 802f450: 4606 mov r6, r0 802f452: b9e0 cbnz r0, 802f48e dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802f454: 2202 movs r2, #2 802f456: 4620 mov r0, r4 802f458: 2139 movs r1, #57 ; 0x39 802f45a: f7ff faed bl 802ea38 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802f45e: 8ca9 ldrh r1, [r5, #36] ; 0x24 802f460: 4620 mov r0, r4 802f462: f7ff fb00 bl 802ea66 #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ /* append DHCP message trailer */ dhcp_option_trailer(dhcp); 802f466: 4620 mov r0, r4 802f468: f7ff fb2d bl 802eac6 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f46c: 8b21 ldrh r1, [r4, #24] 802f46e: 6920 ldr r0, [r4, #16] 802f470: 31f0 adds r1, #240 ; 0xf0 802f472: b289 uxth r1, r1 802f474: f000 fc2f bl 802fcd6 udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802f478: 9500 str r5, [sp, #0] 802f47a: 6860 ldr r0, [r4, #4] 802f47c: 6921 ldr r1, [r4, #16] 802f47e: f104 0220 add.w r2, r4, #32 802f482: 2343 movs r3, #67 ; 0x43 802f484: f003 f8a0 bl 80325c8 dhcp_delete_msg(dhcp); 802f488: 4620 mov r0, r4 802f48a: f7ff fbd1 bl 802ec30 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); } dhcp->tries++; 802f48e: 7b63 ldrb r3, [r4, #13] 802f490: 3301 adds r3, #1 802f492: b2db uxtb r3, r3 /* back-off on retries, but to a maximum of 20 seconds */ msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; 802f494: 2b09 cmp r3, #9 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); } dhcp->tries++; 802f496: 7363 strb r3, [r4, #13] /* back-off on retries, but to a maximum of 20 seconds */ msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; 802f498: d804 bhi.n 802f4a4 802f49a: f44f 62fa mov.w r2, #2000 ; 0x7d0 802f49e: 4353 muls r3, r2 802f4a0: b29b uxth r3, r3 802f4a2: e001 b.n 802f4a8 802f4a4: f644 6320 movw r3, #20000 ; 0x4e20 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f4a8: f44f 72fa mov.w r2, #500 ; 0x1f4 802f4ac: f203 13f3 addw r3, r3, #499 ; 0x1f3 802f4b0: fb93 f3f2 sdiv r3, r3, r2 802f4b4: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802f4b6: 4630 mov r0, r6 802f4b8: bd7c pop {r2, r3, r4, r5, r6, pc} 802f4ba: 0000 movs r0, r0 0802f4bc : /** * The DHCP timer that checks for lease renewal/rebind timeouts. */ void dhcp_coarse_tmr() { 802f4bc: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802f4be: 4b15 ldr r3, [pc, #84] ; (802f514 ) 802f4c0: 4d15 ldr r5, [pc, #84] ; (802f518 ) 802f4c2: 681c ldr r4, [r3, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ while (netif != NULL) { 802f4c4: e023 b.n 802f50e /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802f4c6: 6a23 ldr r3, [r4, #32] 802f4c8: b303 cbz r3, 802f50c /* timer is active (non zero), and triggers (zeroes) now? */ if (netif->dhcp->t2_timeout-- == 1) { 802f4ca: 8bda ldrh r2, [r3, #30] 802f4cc: 1e51 subs r1, r2, #1 802f4ce: 2a01 cmp r2, #1 802f4d0: 83d9 strh r1, [r3, #30] 802f4d2: d10b bne.n 802f4ec 802f4d4: 7b1a ldrb r2, [r3, #12] 802f4d6: 2a0a cmp r2, #10 802f4d8: d818 bhi.n 802f50c 802f4da: f993 300c ldrsb.w r3, [r3, #12] 802f4de: fa15 f303 lsls.w r3, r5, r3 802f4e2: d513 bpl.n 802f50c /* just retry to rebind */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t2_timeout(): must rebind\n")); /* This slightly different to RFC2131: DHCPREQUEST will be sent from state DHCP_REBINDING, not DHCP_BOUND */ dhcp_rebind(netif); 802f4e4: 4620 mov r0, r4 802f4e6: f7ff fc0b bl 802ed00 802f4ea: e00f b.n 802f50c if (netif->dhcp->t2_timeout-- == 1) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n")); /* this clients' rebind timeout triggered */ dhcp_t2_timeout(netif); /* timer is active (non zero), and triggers (zeroes) now */ } else if (netif->dhcp->t1_timeout-- == 1) { 802f4ec: 8b9a ldrh r2, [r3, #28] 802f4ee: 1e51 subs r1, r2, #1 802f4f0: 2a01 cmp r2, #1 802f4f2: 8399 strh r1, [r3, #28] 802f4f4: d10a bne.n 802f50c 802f4f6: 7b1a ldrb r2, [r3, #12] 802f4f8: 2a0a cmp r2, #10 802f4fa: d807 bhi.n 802f50c 802f4fc: f993 300c ldrsb.w r3, [r3, #12] 802f500: fa15 f303 lsls.w r3, r5, r3 802f504: d502 bpl.n 802f50c * eventually time-out if renew tries fail. */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t1_timeout(): must renew\n")); /* This slightly different to RFC2131: DHCPREQUEST will be sent from state DHCP_RENEWING, not DHCP_BOUND */ dhcp_renew(netif); 802f506: 4620 mov r0, r4 802f508: f7ff ff96 bl 802f438 /* this clients' renewal timeout triggered */ dhcp_t1_timeout(netif); } } /* proceed to next netif */ netif = netif->next; 802f50c: 6824 ldr r4, [r4, #0] dhcp_coarse_tmr() { struct netif *netif = netif_list; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ while (netif != NULL) { 802f50e: 2c00 cmp r4, #0 802f510: d1d9 bne.n 802f4c6 } } /* proceed to next netif */ netif = netif->next; } } 802f512: bd38 pop {r3, r4, r5, pc} 802f514: 2000ff14 .word 0x2000ff14 802f518: 44200000 .word 0x44200000 0802f51c : * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802f51c: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802f51e: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802f520: 4605 mov r5, r0 err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release()\n")); /* idle DHCP client */ dhcp_set_state(dhcp, DHCP_OFF); 802f522: 2100 movs r1, #0 802f524: 4620 mov r0, r4 802f526: f7ff fa7f bl 802ea28 /* clean old DHCP offer */ ip_addr_set_zero(&dhcp->server_ip_addr); 802f52a: 2300 movs r3, #0 802f52c: 6223 str r3, [r4, #32] ip_addr_set_zero(&dhcp->offered_ip_addr); 802f52e: 6263 str r3, [r4, #36] ; 0x24 ip_addr_set_zero(&dhcp->offered_sn_mask); 802f530: 62a3 str r3, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802f532: 62e3 str r3, [r4, #44] ; 0x2c #if LWIP_DHCP_BOOTP_FILE ip_addr_set_zero(&dhcp->offered_si_addr); #endif /* LWIP_DHCP_BOOTP_FILE */ dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0; 802f534: 63a3 str r3, [r4, #56] ; 0x38 802f536: 6363 str r3, [r4, #52] ; 0x34 802f538: 6323 str r3, [r4, #48] ; 0x30 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); 802f53a: 4628 mov r0, r5 802f53c: 4621 mov r1, r4 802f53e: 2207 movs r2, #7 802f540: f7ff fad6 bl 802eaf0 if (result == ERR_OK) { 802f544: 4606 mov r6, r0 802f546: b998 cbnz r0, 802f570 dhcp_option_trailer(dhcp); 802f548: 4620 mov r0, r4 802f54a: f7ff fabc bl 802eac6 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802f54e: 8b21 ldrh r1, [r4, #24] 802f550: 6920 ldr r0, [r4, #16] 802f552: 31f0 adds r1, #240 ; 0xf0 802f554: b289 uxth r1, r1 802f556: f000 fbbe bl 802fcd6 udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802f55a: 9500 str r5, [sp, #0] 802f55c: 6860 ldr r0, [r4, #4] 802f55e: 6921 ldr r1, [r4, #16] 802f560: f104 0220 add.w r2, r4, #32 802f564: 2343 movs r3, #67 ; 0x43 802f566: f003 f82f bl 80325c8 dhcp_delete_msg(dhcp); 802f56a: 4620 mov r0, r4 802f56c: f7ff fb60 bl 802ec30 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release: RELEASED, DHCP_OFF\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); } dhcp->tries++; 802f570: 7b63 ldrb r3, [r4, #13] 802f572: 3301 adds r3, #1 802f574: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802f576: 2b09 cmp r3, #9 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release: RELEASED, DHCP_OFF\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); } dhcp->tries++; 802f578: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802f57a: d804 bhi.n 802f586 802f57c: f44f 727a mov.w r2, #1000 ; 0x3e8 802f580: 4353 muls r3, r2 802f582: b29b uxth r3, r3 802f584: e001 b.n 802f58a 802f586: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802f58a: f44f 72fa mov.w r2, #500 ; 0x1f4 802f58e: f203 13f3 addw r3, r3, #499 ; 0x1f3 802f592: fb93 f3f2 sdiv r3, r3, r2 802f596: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release(): set request timeout %"U16_F" msecs\n", msecs)); /* bring the interface down */ netif_set_down(netif); 802f598: 4628 mov r0, r5 802f59a: f000 fb31 bl 802fc00 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802f59e: 4628 mov r0, r5 802f5a0: 4906 ldr r1, [pc, #24] ; (802f5bc ) 802f5a2: f000 fa7d bl 802faa0 netif_set_gw(netif, IP_ADDR_ANY); 802f5a6: 4628 mov r0, r5 802f5a8: 4904 ldr r1, [pc, #16] ; (802f5bc ) 802f5aa: f000 fab5 bl 802fb18 netif_set_netmask(netif, IP_ADDR_ANY); 802f5ae: 4628 mov r0, r5 802f5b0: 4902 ldr r1, [pc, #8] ; (802f5bc ) 802f5b2: f000 fab5 bl 802fb20 return result; } 802f5b6: 4630 mov r0, r6 802f5b8: bd7c pop {r2, r3, r4, r5, r6, pc} 802f5ba: bf00 nop 802f5bc: 08044744 .word 0x08044744 0802f5c0 : * A DHCP server is expected to respond within a short period of time. * This timer checks whether an outstanding DHCP request is timed out. */ void dhcp_fine_tmr() { 802f5c0: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802f5c2: 4b26 ldr r3, [pc, #152] ; (802f65c ) /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { netif->dhcp->request_timeout--; } else if (netif->dhcp->request_timeout == 1) { netif->dhcp->request_timeout--; 802f5c4: 2500 movs r5, #0 * This timer checks whether an outstanding DHCP request is timed out. */ void dhcp_fine_tmr() { struct netif *netif = netif_list; 802f5c6: 681c ldr r4, [r3, #0] /* loop through netif's */ while (netif != NULL) { 802f5c8: e044 b.n 802f654 /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802f5ca: 6a23 ldr r3, [r4, #32] 802f5cc: 2b00 cmp r3, #0 802f5ce: d040 beq.n 802f652 /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { 802f5d0: 8b5a ldrh r2, [r3, #26] 802f5d2: 2a01 cmp r2, #1 802f5d4: d902 bls.n 802f5dc netif->dhcp->request_timeout--; 802f5d6: 3a01 subs r2, #1 802f5d8: 835a strh r2, [r3, #26] 802f5da: e03a b.n 802f652 } else if (netif->dhcp->request_timeout == 1) { 802f5dc: d139 bne.n 802f652 dhcp_timeout(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n")); /* back-off period has passed, or server selection timed out */ if ((dhcp->state == DHCP_BACKING_OFF) || (dhcp->state == DHCP_SELECTING)) { 802f5de: 7b1a ldrb r2, [r3, #12] /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { netif->dhcp->request_timeout--; } else if (netif->dhcp->request_timeout == 1) { netif->dhcp->request_timeout--; 802f5e0: 835d strh r5, [r3, #26] dhcp_timeout(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n")); /* back-off period has passed, or server selection timed out */ if ((dhcp->state == DHCP_BACKING_OFF) || (dhcp->state == DHCP_SELECTING)) { 802f5e2: 2a0c cmp r2, #12 802f5e4: d028 beq.n 802f638 802f5e6: 2a06 cmp r2, #6 802f5e8: d100 bne.n 802f5ec 802f5ea: e025 b.n 802f638 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); dhcp_discover(netif); /* receiving the requested lease timed out */ } else if (dhcp->state == DHCP_REQUESTING) { 802f5ec: 2a01 cmp r2, #1 802f5ee: d106 bne.n 802f5fe LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { 802f5f0: 7b5b ldrb r3, [r3, #13] 802f5f2: 2b05 cmp r3, #5 dhcp_select(netif); 802f5f4: 4620 mov r0, r4 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); dhcp_discover(netif); /* receiving the requested lease timed out */ } else if (dhcp->state == DHCP_REQUESTING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { 802f5f6: d81d bhi.n 802f634 dhcp_select(netif); 802f5f8: f7ff fc14 bl 802ee24 802f5fc: e029 b.n 802f652 dhcp_release(netif); dhcp_discover(netif); } #if DHCP_DOES_ARP_CHECK /* received no ARP reply for the offered address (which is good) */ } else if (dhcp->state == DHCP_CHECKING) { 802f5fe: 2a08 cmp r2, #8 802f600: d109 bne.n 802f616 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { 802f602: 7b5b ldrb r3, [r3, #13] 802f604: 2b01 cmp r3, #1 dhcp_check(netif); 802f606: 4620 mov r0, r4 } #if DHCP_DOES_ARP_CHECK /* received no ARP reply for the offered address (which is good) */ } else if (dhcp->state == DHCP_CHECKING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { 802f608: d802 bhi.n 802f610 dhcp_check(netif); 802f60a: f7ff fc7d bl 802ef08 802f60e: e020 b.n 802f652 /* no ARP replies on the offered address, looks like the IP address is indeed free */ } else { /* bind the interface to the offered address */ dhcp_bind(netif); 802f610: f7ff fc8d bl 802ef2e 802f614: e01d b.n 802f652 } #endif /* DHCP_DOES_ARP_CHECK */ } /* did not get response to renew request? */ else if (dhcp->state == DHCP_RENEWING) { 802f616: 2a05 cmp r2, #5 802f618: d103 bne.n 802f622 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RENEWING, DHCP request timed out\n")); /* just retry renewal */ /* note that the rebind timer will eventually time-out if renew does not work */ dhcp_renew(netif); 802f61a: 4620 mov r0, r4 802f61c: f7ff ff0c bl 802f438 802f620: e017 b.n 802f652 /* did not get response to rebind request? */ } else if (dhcp->state == DHCP_REBINDING) { 802f622: 2a04 cmp r2, #4 802f624: d10a bne.n 802f63c LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REBINDING, DHCP request timed out\n")); if (dhcp->tries <= 8) { 802f626: 7b5b ldrb r3, [r3, #13] 802f628: 2b08 cmp r3, #8 dhcp_rebind(netif); 802f62a: 4620 mov r0, r4 /* note that the rebind timer will eventually time-out if renew does not work */ dhcp_renew(netif); /* did not get response to rebind request? */ } else if (dhcp->state == DHCP_REBINDING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REBINDING, DHCP request timed out\n")); if (dhcp->tries <= 8) { 802f62c: d802 bhi.n 802f634 dhcp_rebind(netif); 802f62e: f7ff fb67 bl 802ed00 802f632: e00e b.n 802f652 } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RELEASING, DISCOVERING\n")); dhcp_release(netif); 802f634: f7ff ff72 bl 802f51c dhcp_discover(netif); 802f638: 4620 mov r0, r4 802f63a: e008 b.n 802f64e } } else if (dhcp->state == DHCP_REBOOTING) { 802f63c: 2a03 cmp r2, #3 802f63e: d108 bne.n 802f652 if (dhcp->tries < REBOOT_TRIES) { 802f640: 7b5b ldrb r3, [r3, #13] 802f642: 2b01 cmp r3, #1 dhcp_reboot(netif); 802f644: 4620 mov r0, r4 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RELEASING, DISCOVERING\n")); dhcp_release(netif); dhcp_discover(netif); } } else if (dhcp->state == DHCP_REBOOTING) { if (dhcp->tries < REBOOT_TRIES) { 802f646: d802 bhi.n 802f64e dhcp_reboot(netif); 802f648: f7ff fb9c bl 802ed84 802f64c: e001 b.n 802f652 } else { dhcp_discover(netif); 802f64e: f7ff fafb bl 802ec48 /* this client's request timeout triggered */ dhcp_timeout(netif); } } /* proceed to next network interface */ netif = netif->next; 802f652: 6824 ldr r4, [r4, #0] void dhcp_fine_tmr() { struct netif *netif = netif_list; /* loop through netif's */ while (netif != NULL) { 802f654: 2c00 cmp r4, #0 802f656: d1b8 bne.n 802f5ca } } /* proceed to next network interface */ netif = netif->next; } } 802f658: bd38 pop {r3, r4, r5, pc} 802f65a: bf00 nop 802f65c: 2000ff14 .word 0x2000ff14 0802f660 : * * @param netif The network interface to stop DHCP on */ void dhcp_stop(struct netif *netif) { 802f660: b510 push {r4, lr} struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); 802f662: b198 cbz r0, 802f68c dhcp = netif->dhcp; /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f664: f890 302d ldrb.w r3, [r0, #45] ; 0x2d void dhcp_stop(struct netif *netif) { struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); dhcp = netif->dhcp; 802f668: 6a04 ldr r4, [r0, #32] /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f66a: f023 0308 bic.w r3, r3, #8 802f66e: f880 302d strb.w r3, [r0, #45] ; 0x2d LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n")); /* netif is DHCP configured? */ if (dhcp != NULL) { 802f672: b15c cbz r4, 802f68c autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ if (dhcp->pcb != NULL) { 802f674: 6860 ldr r0, [r4, #4] 802f676: b118 cbz r0, 802f680 udp_remove(dhcp->pcb); 802f678: f003 f852 bl 8032720 dhcp->pcb = NULL; 802f67c: 2300 movs r3, #0 802f67e: 6063 str r3, [r4, #4] } LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); dhcp_set_state(dhcp, DHCP_OFF); 802f680: 4620 mov r0, r4 802f682: 2100 movs r1, #0 } } 802f684: e8bd 4010 ldmia.w sp!, {r4, lr} if (dhcp->pcb != NULL) { udp_remove(dhcp->pcb); dhcp->pcb = NULL; } LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); dhcp_set_state(dhcp, DHCP_OFF); 802f688: f7ff b9ce b.w 802ea28 802f68c: bd10 pop {r4, pc} 802f68e: 0000 movs r0, r0 0802f690 : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 802f690: b538 push {r3, r4, r5, lr} struct dhcp *dhcp; err_t result = ERR_OK; LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 802f692: 4604 mov r4, r0 802f694: b908 cbnz r0, 802f69a 802f696: 20f2 movs r0, #242 ; 0xf2 802f698: e047 b.n 802f72a dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Remove the flag that says this netif is handled by DHCP, it is set when we succeeded starting. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f69a: f890 302d ldrb.w r3, [r0, #45] ; 0x2d { struct dhcp *dhcp; err_t result = ERR_OK; LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); dhcp = netif->dhcp; 802f69e: 6a05 ldr r5, [r0, #32] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Remove the flag that says this netif is handled by DHCP, it is set when we succeeded starting. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f6a0: f023 0208 bic.w r2, r3, #8 /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802f6a4: f003 0320 and.w r3, r3, #32 802f6a8: b2db uxtb r3, r3 LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Remove the flag that says this netif is handled by DHCP, it is set when we succeeded starting. */ netif->flags &= ~NETIF_FLAG_DHCP; 802f6aa: f880 202d strb.w r2, [r0, #45] ; 0x2d /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802f6ae: 2b00 cmp r3, #0 802f6b0: d0f1 beq.n 802f696 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): No ETHARP netif\n")); return ERR_ARG; } /* check MTU of the netif */ if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) { 802f6b2: 8c83 ldrh r3, [r0, #36] ; 0x24 802f6b4: f5b3 7f10 cmp.w r3, #576 ; 0x240 802f6b8: d200 bcs.n 802f6bc 802f6ba: e02e b.n 802f71a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); return ERR_MEM; } /* no DHCP client attached yet? */ if (dhcp == NULL) { 802f6bc: b935 cbnz r5, 802f6cc LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 802f6be: 203c movs r0, #60 ; 0x3c 802f6c0: f000 f938 bl 802f934 if (dhcp == NULL) { 802f6c4: 4605 mov r5, r0 802f6c6: b340 cbz r0, 802f71a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); return ERR_MEM; } /* store this dhcp client in the netif */ netif->dhcp = dhcp; 802f6c8: 6220 str r0, [r4, #32] 802f6ca: e003 b.n 802f6d4 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp")); /* already has DHCP client attached */ } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n")); if (dhcp->pcb != NULL) { 802f6cc: 6868 ldr r0, [r5, #4] 802f6ce: b108 cbz r0, 802f6d4 udp_remove(dhcp->pcb); 802f6d0: f003 f826 bl 8032720 LWIP_ASSERT("pbuf p_out wasn't freed", dhcp->p_out == NULL); LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL ); } /* clear data structure */ memset(dhcp, 0, sizeof(struct dhcp)); 802f6d4: 2100 movs r1, #0 802f6d6: 223c movs r2, #60 ; 0x3c 802f6d8: 4628 mov r0, r5 802f6da: f7f2 fb9d bl 8021e18 /* dhcp_set_state(&dhcp, DHCP_OFF); */ /* allocate UDP PCB */ dhcp->pcb = udp_new(); 802f6de: f003 f83b bl 8032758 802f6e2: 6068 str r0, [r5, #4] if (dhcp->pcb == NULL) { 802f6e4: b1c8 cbz r0, 802f71a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); return ERR_MEM; } ip_set_option(dhcp->pcb, SOF_BROADCAST); 802f6e6: 7a03 ldrb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802f6e8: 4911 ldr r1, [pc, #68] ; (802f730 ) dhcp->pcb = udp_new(); if (dhcp->pcb == NULL) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); return ERR_MEM; } ip_set_option(dhcp->pcb, SOF_BROADCAST); 802f6ea: f043 0320 orr.w r3, r3, #32 802f6ee: 7203 strb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802f6f0: 2244 movs r2, #68 ; 0x44 802f6f2: 6868 ldr r0, [r5, #4] 802f6f4: f002 ff18 bl 8032528 udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); 802f6f8: 490d ldr r1, [pc, #52] ; (802f730 ) 802f6fa: 6868 ldr r0, [r5, #4] 802f6fc: 2243 movs r2, #67 ; 0x43 802f6fe: f002 ffdd bl 80326bc /* set up the recv callback and argument */ udp_recv(dhcp->pcb, dhcp_recv, netif); 802f702: 6868 ldr r0, [r5, #4] 802f704: 490b ldr r1, [pc, #44] ; (802f734 ) 802f706: 4622 mov r2, r4 802f708: f003 f806 bl 8032718 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 802f70c: 4620 mov r0, r4 802f70e: f7ff fa9b bl 802ec48 if (result != ERR_OK) { 802f712: b120 cbz r0, 802f71e /* free resources allocated above */ dhcp_stop(netif); 802f714: 4620 mov r0, r4 802f716: f7ff ffa3 bl 802f660 return ERR_MEM; 802f71a: 20ff movs r0, #255 ; 0xff 802f71c: e005 b.n 802f72a } /* Set the flag that says this netif is handled by DHCP. */ netif->flags |= NETIF_FLAG_DHCP; 802f71e: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802f722: f043 0308 orr.w r3, r3, #8 802f726: f884 302d strb.w r3, [r4, #45] ; 0x2d return result; } 802f72a: b240 sxtb r0, r0 802f72c: bd38 pop {r3, r4, r5, pc} 802f72e: bf00 nop 802f730: 08044744 .word 0x08044744 802f734: 0802efed .word 0x0802efed 0802f738 : /** * Perform Sanity check of user-configurable values, and initialize all modules. */ void lwip_init(void) { 802f738: b508 push {r3, lr} /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 802f73a: f007 ff2f bl 803759c #endif /* !NO_SYS */ mem_init(); 802f73e: f000 f80f bl 802f760 memp_init(); 802f742: f000 f95b bl 802f9fc pbuf_init(); netif_init(); 802f746: f000 f9a9 bl 802fa9c #endif /* LWIP_ARP */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 802f74a: f002 fe27 bl 803239c #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 802f74e: f000 fc8b bl 8030068 #endif /* LWIP_TCP */ #if LWIP_SNMP snmp_init(); 802f752: f005 fde1 bl 8035318 #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); #endif /* LWIP_TIMERS */ } 802f756: e8bd 4008 ldmia.w sp!, {r3, lr} #if LWIP_DNS dns_init(); #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); 802f75a: f002 bd49 b.w 80321f0 802f75e: 0000 movs r0, r0 0802f760 : LWIP_ASSERT("Sanity check alignment", (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); /* align the heap */ ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); 802f760: 4b0b ldr r3, [pc, #44] ; (802f790 ) 802f762: 4a0c ldr r2, [pc, #48] ; (802f794 ) mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; mem->prev = 0; mem->used = 0; /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; 802f764: 480c ldr r0, [pc, #48] ; (802f798 ) LWIP_ASSERT("Sanity check alignment", (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); /* align the heap */ ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); 802f766: f023 0303 bic.w r3, r3, #3 802f76a: 6013 str r3, [r2, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; 802f76c: f44f 51a0 mov.w r1, #5120 ; 0x1400 mem->prev = 0; 802f770: 2200 movs r2, #0 802f772: 805a strh r2, [r3, #2] mem->used = 0; 802f774: 711a strb r2, [r3, #4] /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; 802f776: 185a adds r2, r3, r1 802f778: 6002 str r2, [r0, #0] ram_end->used = 1; 802f77a: 2001 movs r0, #1 802f77c: 7110 strb r0, [r2, #4] ram_end->next = MEM_SIZE_ALIGNED; ram_end->prev = MEM_SIZE_ALIGNED; 802f77e: 8051 strh r1, [r2, #2] /* align the heap */ ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; 802f780: 8019 strh r1, [r3, #0] /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if(sys_mutex_new(&mem_mutex) != ERR_OK) { 802f782: 4806 ldr r0, [pc, #24] ; (802f79c ) mem->prev = 0; mem->used = 0; /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; ram_end->used = 1; ram_end->next = MEM_SIZE_ALIGNED; 802f784: 8011 strh r1, [r2, #0] ram_end->prev = MEM_SIZE_ALIGNED; /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; 802f786: 4a06 ldr r2, [pc, #24] ; (802f7a0 ) 802f788: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if(sys_mutex_new(&mem_mutex) != ERR_OK) { 802f78a: f007 bee9 b.w 8037560 802f78e: bf00 nop 802f790: 2000eb03 .word 0x2000eb03 802f794: 20000da4 .word 0x20000da4 802f798: 20000d9c .word 0x20000d9c 802f79c: 20000da0 .word 0x20000da0 802f7a0: 20000d98 .word 0x20000d98 0802f7a4 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 802f7a4: b570 push {r4, r5, r6, lr} struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 802f7a6: 4604 mov r4, r0 802f7a8: 2800 cmp r0, #0 802f7aa: d04c beq.n 802f846 LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0); LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram && (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 802f7ac: 4b26 ldr r3, [pc, #152] ; (802f848 ) 802f7ae: 681b ldr r3, [r3, #0] 802f7b0: 4298 cmp r0, r3 802f7b2: d303 bcc.n 802f7bc 802f7b4: 4b25 ldr r3, [pc, #148] ; (802f84c ) 802f7b6: 681b ldr r3, [r3, #0] 802f7b8: 4298 cmp r0, r3 802f7ba: d305 bcc.n 802f7c8 SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); /* protect mem stats from concurrent access */ SYS_ARCH_PROTECT(lev); 802f7bc: f007 ff08 bl 80375d0 plug_holes(mem); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); } 802f7c0: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); /* protect mem stats from concurrent access */ SYS_ARCH_PROTECT(lev); MEM_STATS_INC(illegal); SYS_ARCH_UNPROTECT(lev); 802f7c4: f007 bf0e b.w 80375e4 return; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802f7c8: 4821 ldr r0, [pc, #132] ; (802f850 ) 802f7ca: f007 fed5 bl 8037578 /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); /* ... which has to be in a used state ... */ LWIP_ASSERT("mem_free: mem->used", mem->used); /* ... and is now unused. */ mem->used = 0; 802f7ce: 2300 movs r3, #0 802f7d0: f804 3c04 strb.w r3, [r4, #-4] if (mem < lfree) { 802f7d4: 4b1f ldr r3, [pc, #124] ; (802f854 ) LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); nmem = (struct mem *)(void *)&ram[mem->next]; 802f7d6: f834 0c08 ldrh.w r0, [r4, #-8] /* ... which has to be in a used state ... */ LWIP_ASSERT("mem_free: mem->used", mem->used); /* ... and is now unused. */ mem->used = 0; if (mem < lfree) { 802f7da: 6819 ldr r1, [r3, #0] return; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); 802f7dc: f1a4 0208 sub.w r2, r4, #8 /* ... which has to be in a used state ... */ LWIP_ASSERT("mem_free: mem->used", mem->used); /* ... and is now unused. */ mem->used = 0; if (mem < lfree) { 802f7e0: 428a cmp r2, r1 /* the newly freed struct is now the lowest */ lfree = mem; 802f7e2: bf38 it cc 802f7e4: 601a strcc r2, [r3, #0] LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); nmem = (struct mem *)(void *)&ram[mem->next]; 802f7e6: 4b18 ldr r3, [pc, #96] ; (802f848 ) 802f7e8: 681b ldr r3, [r3, #0] 802f7ea: 1819 adds r1, r3, r0 if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 802f7ec: 428a cmp r2, r1 802f7ee: d011 beq.n 802f814 802f7f0: 790d ldrb r5, [r1, #4] 802f7f2: b97d cbnz r5, 802f814 802f7f4: 4d15 ldr r5, [pc, #84] ; (802f84c ) 802f7f6: 682d ldr r5, [r5, #0] 802f7f8: 42a9 cmp r1, r5 802f7fa: d00b beq.n 802f814 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 802f7fc: 4d15 ldr r5, [pc, #84] ; (802f854 ) 802f7fe: 682e ldr r6, [r5, #0] 802f800: 428e cmp r6, r1 lfree = mem; } mem->next = nmem->next; 802f802: 5a19 ldrh r1, [r3, r0] nmem = (struct mem *)(void *)&ram[mem->next]; if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { lfree = mem; 802f804: bf08 it eq 802f806: 602a streq r2, [r5, #0] } mem->next = nmem->next; 802f808: f824 1c08 strh.w r1, [r4, #-8] ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); 802f80c: 5a19 ldrh r1, [r3, r0] 802f80e: 1859 adds r1, r3, r1 802f810: 1ad0 subs r0, r2, r3 802f812: 8048 strh r0, [r1, #2] } /* plug hole backward */ pmem = (struct mem *)(void *)&ram[mem->prev]; 802f814: f834 0c06 ldrh.w r0, [r4, #-6] 802f818: 1819 adds r1, r3, r0 if (pmem != mem && pmem->used == 0) { 802f81a: 4291 cmp r1, r2 802f81c: d00e beq.n 802f83c 802f81e: 790d ldrb r5, [r1, #4] 802f820: b965 cbnz r5, 802f83c /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 802f822: 4d0c ldr r5, [pc, #48] ; (802f854 ) 802f824: 682e ldr r6, [r5, #0] 802f826: 4296 cmp r6, r2 lfree = pmem; } pmem->next = mem->next; 802f828: f834 2c08 ldrh.w r2, [r4, #-8] /* plug hole backward */ pmem = (struct mem *)(void *)&ram[mem->prev]; if (pmem != mem && pmem->used == 0) { /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { lfree = pmem; 802f82c: bf08 it eq 802f82e: 6029 streq r1, [r5, #0] } pmem->next = mem->next; 802f830: 521a strh r2, [r3, r0] ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); 802f832: f834 2c08 ldrh.w r2, [r4, #-8] 802f836: 189a adds r2, r3, r2 802f838: 1acb subs r3, r1, r3 802f83a: 8053 strh r3, [r2, #2] /* finally, see if prev or next are free also */ plug_holes(mem); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); 802f83c: 4804 ldr r0, [pc, #16] ; (802f850 ) } 802f83e: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} /* finally, see if prev or next are free also */ plug_holes(mem); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); 802f842: f007 bea5 b.w 8037590 802f846: bd70 pop {r4, r5, r6, pc} 802f848: 20000da4 .word 0x20000da4 802f84c: 20000d9c .word 0x20000d9c 802f850: 20000da0 .word 0x20000da0 802f854: 20000d98 .word 0x20000d98 0802f858 : * or NULL if newsize is > old size, in which case rmem is NOT touched * or freed! */ void * mem_trim(void *rmem, mem_size_t newsize) { 802f858: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} /* use the FREE_PROTECT here: it protects with sem OR SYS_ARCH_PROTECT */ LWIP_MEM_FREE_DECL_PROTECT(); /* Expand the size of the allocated memory region so that we can adjust for alignment. */ newsize = LWIP_MEM_ALIGN_SIZE(newsize); 802f85c: 3103 adds r1, #3 802f85e: f64f 75fc movw r5, #65532 ; 0xfffc 802f862: 400d ands r5, r1 if(newsize < MIN_SIZE_ALIGNED) { 802f864: 2d0b cmp r5, #11 * or NULL if newsize is > old size, in which case rmem is NOT touched * or freed! */ void * mem_trim(void *rmem, mem_size_t newsize) { 802f866: 4604 mov r4, r0 /* Expand the size of the allocated memory region so that we can adjust for alignment. */ newsize = LWIP_MEM_ALIGN_SIZE(newsize); if(newsize < MIN_SIZE_ALIGNED) { 802f868: d903 bls.n 802f872 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { 802f86a: f5b5 5fa0 cmp.w r5, #5120 ; 0x1400 802f86e: d901 bls.n 802f874 802f870: e053 b.n 802f91a adjust for alignment. */ newsize = LWIP_MEM_ALIGN_SIZE(newsize); if(newsize < MIN_SIZE_ALIGNED) { /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; 802f872: 250c movs r5, #12 } LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 802f874: f8df 80b8 ldr.w r8, [pc, #184] ; 802f930 802f878: f8d8 3000 ldr.w r3, [r8] 802f87c: 429c cmp r4, r3 802f87e: d303 bcc.n 802f888 802f880: 4a28 ldr r2, [pc, #160] ; (802f924 ) 802f882: 6812 ldr r2, [r2, #0] 802f884: 4294 cmp r4, r2 802f886: d304 bcc.n 802f892 SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); /* protect mem stats from concurrent access */ SYS_ARCH_PROTECT(lev); 802f888: f007 fea2 bl 80375d0 MEM_STATS_INC(illegal); SYS_ARCH_UNPROTECT(lev); 802f88c: f007 feaa bl 80375e4 return rmem; 802f890: e044 b.n 802f91c } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); 802f892: f1a4 0608 sub.w r6, r4, #8 /* ... and its offset pointer */ ptr = (mem_size_t)((u8_t *)mem - ram); size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802f896: f834 7c08 ldrh.w r7, [r4, #-8] return rmem; } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); /* ... and its offset pointer */ ptr = (mem_size_t)((u8_t *)mem - ram); 802f89a: 1af6 subs r6, r6, r3 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802f89c: 3f08 subs r7, #8 return rmem; } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); /* ... and its offset pointer */ ptr = (mem_size_t)((u8_t *)mem - ram); 802f89e: b2b6 uxth r6, r6 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802f8a0: 1bbf subs r7, r7, r6 802f8a2: b2bf uxth r7, r7 LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); if (newsize > size) { 802f8a4: 42bd cmp r5, r7 802f8a6: d838 bhi.n 802f91a /* not supported */ return NULL; } if (newsize == size) { 802f8a8: d038 beq.n 802f91c /* No change in size, simply return */ return rmem; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802f8aa: 481f ldr r0, [pc, #124] ; (802f928 ) 802f8ac: f007 fe64 bl 8037578 mem2 = (struct mem *)(void *)&ram[mem->next]; 802f8b0: f8d8 3000 ldr.w r3, [r8] 802f8b4: f834 1c08 ldrh.w r1, [r4, #-8] 802f8b8: 185a adds r2, r3, r1 if(mem2->used == 0) { 802f8ba: 7910 ldrb r0, [r2, #4] 802f8bc: b978 cbnz r0, 802f8de /* The next struct is unused, we can simply move it at little */ mem_size_t next; /* remember the old next pointer */ next = mem2->next; 802f8be: 5a5f ldrh r7, [r3, r1] /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 802f8c0: f106 0108 add.w r1, r6, #8 802f8c4: 186d adds r5, r5, r1 if (lfree == mem2) { 802f8c6: 4919 ldr r1, [pc, #100] ; (802f92c ) 802f8c8: 6808 ldr r0, [r1, #0] /* The next struct is unused, we can simply move it at little */ mem_size_t next; /* remember the old next pointer */ next = mem2->next; /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 802f8ca: b2ad uxth r5, r5 if (lfree == mem2) { 802f8cc: 4290 cmp r0, r2 802f8ce: eb03 0205 add.w r2, r3, r5 lfree = (struct mem *)(void *)&ram[ptr2]; 802f8d2: bf08 it eq 802f8d4: 600a streq r2, [r1, #0] } mem2 = (struct mem *)(void *)&ram[ptr2]; mem2->used = 0; 802f8d6: 2100 movs r1, #0 802f8d8: 7111 strb r1, [r2, #4] /* restore the next pointer */ mem2->next = next; 802f8da: 535f strh r7, [r3, r5] 802f8dc: e010 b.n 802f900 if (mem2->next != MEM_SIZE_ALIGNED) { ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; } MEM_STATS_DEC_USED(used, (size - newsize)); /* no need to plug holes, we've already done that */ } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) { 802f8de: f105 0214 add.w r2, r5, #20 802f8e2: 42ba cmp r2, r7 802f8e4: d815 bhi.n 802f912 * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { 802f8e6: 4811 ldr r0, [pc, #68] ; (802f92c ) * Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem * ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED'). * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 802f8e8: f106 0208 add.w r2, r6, #8 802f8ec: 18ad adds r5, r5, r2 mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { 802f8ee: 6807 ldr r7, [r0, #0] * Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem * ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED'). * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 802f8f0: b2ad uxth r5, r5 mem2 = (struct mem *)(void *)&ram[ptr2]; 802f8f2: 195a adds r2, r3, r5 if (mem2 < lfree) { 802f8f4: 42ba cmp r2, r7 lfree = mem2; 802f8f6: bf38 it cc 802f8f8: 6002 strcc r2, [r0, #0] } mem2->used = 0; mem2->next = mem->next; 802f8fa: 5359 strh r1, [r3, r5] ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { lfree = mem2; } mem2->used = 0; 802f8fc: 2000 movs r0, #0 802f8fe: 7110 strb r0, [r2, #4] mem2->next = mem->next; mem2->prev = ptr; 802f900: 8056 strh r6, [r2, #2] mem->next = ptr2; 802f902: f824 5c08 strh.w r5, [r4, #-8] if (mem2->next != MEM_SIZE_ALIGNED) { 802f906: 5b5a ldrh r2, [r3, r5] 802f908: f5b2 5fa0 cmp.w r2, #5120 ; 0x1400 ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802f90c: bf1c itt ne 802f90e: 189b addne r3, r3, r2 802f910: 805d strhne r5, [r3, #2] -> the remaining space stays unused since it is too small } */ #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); 802f912: 4805 ldr r0, [pc, #20] ; (802f928 ) 802f914: f007 fe3c bl 8037590 return rmem; 802f918: e000 b.n 802f91c /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { return NULL; 802f91a: 2400 movs r4, #0 #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); return rmem; } 802f91c: 4620 mov r0, r4 802f91e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802f922: bf00 nop 802f924: 20000d9c .word 0x20000d9c 802f928: 20000da0 .word 0x20000da0 802f92c: 20000d98 .word 0x20000d98 802f930: 20000da4 .word 0x20000da4 0802f934 : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size) { 802f934: b5f8 push {r3, r4, r5, r6, r7, lr} #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT u8_t local_mem_free_count = 0; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_ALLOC_DECL_PROTECT(); if (size == 0) { 802f936: 2800 cmp r0, #0 802f938: d056 beq.n 802f9e8 return NULL; } /* Expand the size of the allocated memory region so that we can adjust for alignment. */ size = LWIP_MEM_ALIGN_SIZE(size); 802f93a: 3003 adds r0, #3 802f93c: f64f 74fc movw r4, #65532 ; 0xfffc 802f940: 4004 ands r4, r0 if(size < MIN_SIZE_ALIGNED) { 802f942: 2c0b cmp r4, #11 802f944: d903 bls.n 802f94e /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; } if (size > MEM_SIZE_ALIGNED) { 802f946: f5b4 5fa0 cmp.w r4, #5120 ; 0x1400 802f94a: d901 bls.n 802f950 802f94c: e04b b.n 802f9e6 adjust for alignment. */ size = LWIP_MEM_ALIGN_SIZE(size); if(size < MIN_SIZE_ALIGNED) { /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; 802f94e: 240c movs r4, #12 if (size > MEM_SIZE_ALIGNED) { return NULL; } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 802f950: 4826 ldr r0, [pc, #152] ; (802f9ec ) 802f952: f007 fe11 bl 8037578 #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ /* Scan through the heap searching for a free block that is big enough, * beginning with the lowest free block. */ for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; 802f956: 4b26 ldr r3, [pc, #152] ; (802f9f0 ) 802f958: 6819 ldr r1, [r3, #0] 802f95a: 4b26 ldr r3, [pc, #152] ; (802f9f4 ) 802f95c: 681a ldr r2, [r3, #0] 802f95e: 1a8b subs r3, r1, r2 802f960: b29b uxth r3, r3 802f962: f5c4 5ea0 rsb lr, r4, #5120 ; 0x1400 802f966: e039 b.n 802f9dc ptr = ((struct mem *)(void *)&ram[ptr])->next) { mem = (struct mem *)(void *)&ram[ptr]; 802f968: 18d5 adds r5, r2, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802f96a: 792f ldrb r7, [r5, #4] 802f96c: 2f00 cmp r7, #0 802f96e: d134 bne.n 802f9da (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 802f970: 5ad6 ldrh r6, [r2, r3] 802f972: f1a6 0008 sub.w r0, r6, #8 802f976: 1ac0 subs r0, r0, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802f978: 42a0 cmp r0, r4 802f97a: d32e bcc.n 802f9da (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { /* mem is not used and at least perfect fit is possible: * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */ if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) { 802f97c: f104 0e14 add.w lr, r4, #20 802f980: 4570 cmp r0, lr 802f982: d310 bcc.n 802f9a6 * struct mem would fit in but no data between mem2 and mem2->next * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + size; 802f984: 3408 adds r4, #8 802f986: 191c adds r4, r3, r4 802f988: b2a4 uxth r4, r4 /* create mem2 struct */ mem2 = (struct mem *)(void *)&ram[ptr2]; 802f98a: 1910 adds r0, r2, r4 mem2->used = 0; mem2->next = mem->next; 802f98c: 5316 strh r6, [r2, r4] mem2->prev = ptr; 802f98e: 8043 strh r3, [r0, #2] /* and insert it between mem and mem->next */ mem->next = ptr2; 802f990: 802c strh r4, [r5, #0] mem->used = 1; 802f992: 2301 movs r3, #1 * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + size; /* create mem2 struct */ mem2 = (struct mem *)(void *)&ram[ptr2]; mem2->used = 0; 802f994: 7107 strb r7, [r0, #4] mem2->next = mem->next; mem2->prev = ptr; /* and insert it between mem and mem->next */ mem->next = ptr2; mem->used = 1; 802f996: 712b strb r3, [r5, #4] if (mem2->next != MEM_SIZE_ALIGNED) { 802f998: 5b13 ldrh r3, [r2, r4] 802f99a: f5b3 5fa0 cmp.w r3, #5120 ; 0x1400 802f99e: d004 beq.n 802f9aa ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802f9a0: 18d2 adds r2, r2, r3 802f9a2: 8054 strh r4, [r2, #2] 802f9a4: e001 b.n 802f9aa * take care of this). * -> near fit or excact fit: do not split, no mem2 creation * also can't move mem->next directly behind mem, since mem->next * will always be used at this point! */ mem->used = 1; 802f9a6: 2301 movs r3, #1 802f9a8: 712b strb r3, [r5, #4] MEM_STATS_INC_USED(used, mem->next - (mem_size_t)((u8_t *)mem - ram)); } #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_malloc_adjust_lfree: #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if (mem == lfree) { 802f9aa: 428d cmp r5, r1 802f9ac: d10f bne.n 802f9ce struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 802f9ae: 4b12 ldr r3, [pc, #72] ; (802f9f8 ) 802f9b0: 681a ldr r2, [r3, #0] /* If mem_free or mem_trim have run, we have to restart since they could have altered our current struct mem or lfree. */ goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ cur = (struct mem *)(void *)&ram[cur->next]; 802f9b2: 4b10 ldr r3, [pc, #64] ; (802f9f4 ) 802f9b4: 6819 ldr r1, [r3, #0] 802f9b6: 462b mov r3, r5 802f9b8: e001 b.n 802f9be 802f9ba: 881b ldrh r3, [r3, #0] 802f9bc: 18cb adds r3, r1, r3 mem_malloc_adjust_lfree: #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if (mem == lfree) { struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 802f9be: 7918 ldrb r0, [r3, #4] 802f9c0: b910 cbnz r0, 802f9c8 goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ cur = (struct mem *)(void *)&ram[cur->next]; } lfree = cur; 802f9c2: 4a0b ldr r2, [pc, #44] ; (802f9f0 ) 802f9c4: 6013 str r3, [r2, #0] 802f9c6: e002 b.n 802f9ce mem_malloc_adjust_lfree: #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if (mem == lfree) { struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 802f9c8: 4293 cmp r3, r2 802f9ca: d1f6 bne.n 802f9ba 802f9cc: e7f9 b.n 802f9c2 } lfree = cur; LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 802f9ce: 4807 ldr r0, [pc, #28] ; (802f9ec ) 802f9d0: f007 fdde bl 8037590 LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); LWIP_ASSERT("mem_malloc: sanity check alignment", (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0); return (u8_t *)mem + SIZEOF_STRUCT_MEM; 802f9d4: f105 0008 add.w r0, r5, #8 802f9d8: bdf8 pop {r3, r4, r5, r6, r7, pc} /* Scan through the heap searching for a free block that is big enough, * beginning with the lowest free block. */ for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; ptr = ((struct mem *)(void *)&ram[ptr])->next) { 802f9da: 882b ldrh r3, [r5, #0] #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ /* Scan through the heap searching for a free block that is big enough, * beginning with the lowest free block. */ for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; 802f9dc: 4573 cmp r3, lr 802f9de: dbc3 blt.n 802f968 } while(local_mem_free_count != 0); #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); MEM_STATS_INC(err); LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 802f9e0: 4802 ldr r0, [pc, #8] ; (802f9ec ) 802f9e2: f007 fdd5 bl 8037590 u8_t local_mem_free_count = 0; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_ALLOC_DECL_PROTECT(); if (size == 0) { return NULL; 802f9e6: 2000 movs r0, #0 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); MEM_STATS_INC(err); LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); return NULL; } 802f9e8: bdf8 pop {r3, r4, r5, r6, r7, pc} 802f9ea: bf00 nop 802f9ec: 20000da0 .word 0x20000da0 802f9f0: 20000d98 .word 0x20000d98 802f9f4: 20000da4 .word 0x20000da4 802f9f8: 20000d9c .word 0x20000d9c 0802f9fc : MEMP_STATS_AVAIL(err, i, 0); MEMP_STATS_AVAIL(avail, i, memp_num[i]); } #if !MEMP_SEPARATE_POOLS memp = (struct memp *)LWIP_MEM_ALIGN(memp_memory); 802f9fc: 4a0e ldr r2, [pc, #56] ; (802fa38 ) 802f9fe: 490f ldr r1, [pc, #60] ; (802fa3c ) * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 802fa00: b5f0 push {r4, r5, r6, r7, lr} MEMP_STATS_AVAIL(err, i, 0); MEMP_STATS_AVAIL(avail, i, memp_num[i]); } #if !MEMP_SEPARATE_POOLS memp = (struct memp *)LWIP_MEM_ALIGN(memp_memory); 802fa02: 2300 movs r3, #0 memp_tab[i] = NULL; #if MEMP_SEPARATE_POOLS memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { 802fa04: 4e0e ldr r6, [pc, #56] ; (802fa40 ) memp->next = memp_tab[i]; memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802fa06: 4f0f ldr r7, [pc, #60] ; (802fa44 ) MEMP_STATS_AVAIL(err, i, 0); MEMP_STATS_AVAIL(avail, i, memp_num[i]); } #if !MEMP_SEPARATE_POOLS memp = (struct memp *)LWIP_MEM_ALIGN(memp_memory); 802fa08: f022 0203 bic.w r2, r2, #3 #endif /* !MEMP_SEPARATE_POOLS */ /* for every pool: */ for (i = 0; i < MEMP_MAX; ++i) { memp_tab[i] = NULL; 802fa0c: 461d mov r5, r3 802fa0e: f841 5b04 str.w r5, [r1], #4 #if MEMP_SEPARATE_POOLS memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { 802fa12: f833 c006 ldrh.w ip, [r3, r6] 802fa16: 2000 movs r0, #0 802fa18: e008 b.n 802fa2c memp->next = memp_tab[i]; 802fa1a: f851 4c04 ldr.w r4, [r1, #-4] 802fa1e: 6014 str r4, [r2, #0] memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802fa20: 5bdc ldrh r4, [r3, r7] memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { memp->next = memp_tab[i]; memp_tab[i] = memp; 802fa22: f841 2c04 str.w r2, [r1, #-4] memp_tab[i] = NULL; #if MEMP_SEPARATE_POOLS memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { 802fa26: 3001 adds r0, #1 memp->next = memp_tab[i]; memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802fa28: 1912 adds r2, r2, r4 memp_tab[i] = NULL; #if MEMP_SEPARATE_POOLS memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { 802fa2a: b280 uxth r0, r0 802fa2c: 4560 cmp r0, ip 802fa2e: d1f4 bne.n 802fa1a 802fa30: 3302 adds r3, #2 #if !MEMP_SEPARATE_POOLS memp = (struct memp *)LWIP_MEM_ALIGN(memp_memory); #endif /* !MEMP_SEPARATE_POOLS */ /* for every pool: */ for (i = 0; i < MEMP_MAX; ++i) { 802fa32: 2b20 cmp r3, #32 802fa34: d1eb bne.n 802fa0e #if MEMP_OVERFLOW_CHECK memp_overflow_init(); /* check everything a first time to see if it worked */ memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK */ } 802fa36: bdf0 pop {r4, r5, r6, r7, pc} 802fa38: 20000dab .word 0x20000dab 802fa3c: 2000c3e8 .word 0x2000c3e8 802fa40: 080446da .word 0x080446da 802fa44: 080446fa .word 0x080446fa 0802fa48 : #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802fa48: 280f cmp r0, #15 #if !MEMP_OVERFLOW_CHECK memp_malloc(memp_t type) #else memp_malloc_fn(memp_t type, const char* file, const int line) #endif { 802fa4a: b538 push {r3, r4, r5, lr} 802fa4c: 4605 mov r5, r0 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802fa4e: d80b bhi.n 802fa68 SYS_ARCH_PROTECT(old_level); 802fa50: f007 fdbe bl 80375d0 #if MEMP_OVERFLOW_CHECK >= 2 memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ memp = memp_tab[type]; 802fa54: 4b06 ldr r3, [pc, #24] ; (802fa70 ) 802fa56: f853 4025 ldr.w r4, [r3, r5, lsl #2] if (memp != NULL) { 802fa5a: b114 cbz r4, 802fa62 memp_tab[type] = memp->next; 802fa5c: 6822 ldr r2, [r4, #0] 802fa5e: f843 2025 str.w r2, [r3, r5, lsl #2] } else { LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", memp_desc[type])); MEMP_STATS_INC(err, type); } SYS_ARCH_UNPROTECT(old_level); 802fa62: f007 fdbf bl 80375e4 return memp; 802fa66: e000 b.n 802fa6a #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802fa68: 2400 movs r4, #0 } SYS_ARCH_UNPROTECT(old_level); return memp; } 802fa6a: 4620 mov r0, r4 802fa6c: bd38 pop {r3, r4, r5, pc} 802fa6e: bf00 nop 802fa70: 2000c3e8 .word 0x2000c3e8 0802fa74 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 802fa74: b538 push {r3, r4, r5, lr} 802fa76: 4605 mov r5, r0 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); if (mem == NULL) { 802fa78: 460c mov r4, r1 802fa7a: b159 cbz r1, 802fa94 LWIP_ASSERT("memp_free: mem properly aligned", ((mem_ptr_t)mem % MEM_ALIGNMENT) == 0); memp = (struct memp *)(void *)((u8_t*)mem - MEMP_SIZE); SYS_ARCH_PROTECT(old_level); 802fa7c: f007 fda8 bl 80375d0 #endif /* MEMP_OVERFLOW_CHECK >= 2 */ #endif /* MEMP_OVERFLOW_CHECK */ MEMP_STATS_DEC(used, type); memp->next = memp_tab[type]; 802fa80: 4b05 ldr r3, [pc, #20] ; (802fa98 ) 802fa82: f853 2025 ldr.w r2, [r3, r5, lsl #2] 802fa86: 6022 str r2, [r4, #0] memp_tab[type] = memp; 802fa88: f843 4025 str.w r4, [r3, r5, lsl #2] #if MEMP_SANITY_CHECK LWIP_ASSERT("memp sanity", memp_sanity()); #endif /* MEMP_SANITY_CHECK */ SYS_ARCH_UNPROTECT(old_level); } 802fa8c: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} #if MEMP_SANITY_CHECK LWIP_ASSERT("memp sanity", memp_sanity()); #endif /* MEMP_SANITY_CHECK */ SYS_ARCH_UNPROTECT(old_level); 802fa90: f007 bda8 b.w 80375e4 802fa94: bd38 pop {r3, r4, r5, pc} 802fa96: bf00 nop 802fa98: 2000c3e8 .word 0x2000c3e8 0802fa9c : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 802fa9c: 4770 bx lr 802fa9e: 0000 movs r0, r0 0802faa0 : * @note call netif_set_addr() if you also want to change netmask and * default gateway */ void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr) { 802faa0: b570 push {r4, r5, r6, lr} 802faa2: 4604 mov r4, r0 #if LWIP_TCP struct tcp_pcb *pcb; struct tcp_pcb_listen *lpcb; /* address is actually being changed? */ if (ipaddr && (ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) { 802faa4: 460d mov r5, r1 802faa6: b941 cbnz r1, 802faba ip_addr_set(&(lpcb->local_ip), ipaddr); } } } #endif snmp_delete_ipaddridx_tree(netif); 802faa8: 4620 mov r0, r4 802faaa: f004 fdb5 bl 8034618 snmp_delete_iprteidx_tree(0,netif); 802faae: 2000 movs r0, #0 802fab0: 4621 mov r1, r4 802fab2: f004 fe47 bl 8034744 /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 802fab6: b9fd cbnz r5, 802faf8 802fab8: e01f b.n 802fafa #if LWIP_TCP struct tcp_pcb *pcb; struct tcp_pcb_listen *lpcb; /* address is actually being changed? */ if (ipaddr && (ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) { 802faba: 680a ldr r2, [r1, #0] 802fabc: 6843 ldr r3, [r0, #4] 802fabe: 429a cmp r2, r3 802fac0: d0f2 beq.n 802faa8 /* extern struct tcp_pcb *tcp_active_pcbs; defined by tcp.h */ LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); pcb = tcp_active_pcbs; 802fac2: 4b13 ldr r3, [pc, #76] ; (802fb10 ) 802fac4: 6818 ldr r0, [r3, #0] while (pcb != NULL) { 802fac6: e007 b.n 802fad8 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr)) 802fac8: 6802 ldr r2, [r0, #0] 802faca: 6863 ldr r3, [r4, #4] 802facc: 68c6 ldr r6, [r0, #12] 802face: 429a cmp r2, r3 802fad0: d101 bne.n 802fad6 #endif /* LWIP_AUTOIP */ ) { /* this connection must be aborted */ struct tcp_pcb *next = pcb->next; LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb)); tcp_abort(pcb); 802fad2: f000 fd89 bl 80305e8 pcb = next; } else { pcb = pcb->next; 802fad6: 4630 mov r0, r6 /* address is actually being changed? */ if (ipaddr && (ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) { /* extern struct tcp_pcb *tcp_active_pcbs; defined by tcp.h */ LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); pcb = tcp_active_pcbs; while (pcb != NULL) { 802fad8: 2800 cmp r0, #0 802fada: d1f5 bne.n 802fac8 pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802fadc: 4b0d ldr r3, [pc, #52] ; (802fb14 ) 802fade: 681b ldr r3, [r3, #0] 802fae0: e007 b.n 802faf2 /* PCB bound to current local interface address? */ if ((!(ip_addr_isany(&(lpcb->local_ip)))) && 802fae2: 681a ldr r2, [r3, #0] 802fae4: b122 cbz r2, 802faf0 802fae6: 6861 ldr r1, [r4, #4] 802fae8: 428a cmp r2, r1 (ip_addr_cmp(&(lpcb->local_ip), &(netif->ip_addr)))) { /* The PCB is listening to the old ipaddr and * is set to listen to the new one instead */ ip_addr_set(&(lpcb->local_ip), ipaddr); 802faea: bf04 itt eq 802faec: 682a ldreq r2, [r5, #0] 802faee: 601a streq r2, [r3, #0] pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802faf0: 68db ldr r3, [r3, #12] 802faf2: 2b00 cmp r3, #0 802faf4: d1f5 bne.n 802fae2 802faf6: e7d7 b.n 802faa8 } #endif snmp_delete_ipaddridx_tree(netif); snmp_delete_iprteidx_tree(0,netif); /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 802faf8: 682d ldr r5, [r5, #0] snmp_insert_ipaddridx_tree(netif); 802fafa: 4620 mov r0, r4 } #endif snmp_delete_ipaddridx_tree(netif); snmp_delete_iprteidx_tree(0,netif); /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 802fafc: 6065 str r5, [r4, #4] snmp_insert_ipaddridx_tree(netif); 802fafe: f004 fd49 bl 8034594 snmp_insert_iprteidx_tree(0,netif); 802fb02: 2000 movs r0, #0 802fb04: 4621 mov r1, r4 netif->name[0], netif->name[1], ip4_addr1_16(&netif->ip_addr), ip4_addr2_16(&netif->ip_addr), ip4_addr3_16(&netif->ip_addr), ip4_addr4_16(&netif->ip_addr))); } 802fb06: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} snmp_delete_ipaddridx_tree(netif); snmp_delete_iprteidx_tree(0,netif); /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); snmp_insert_ipaddridx_tree(netif); snmp_insert_iprteidx_tree(0,netif); 802fb0a: f004 bdcf b.w 80346ac 802fb0e: bf00 nop 802fb10: 2000ff20 .word 0x2000ff20 802fb14: 2000ff28 .word 0x2000ff28 0802fb18 : * @note call netif_set_addr() if you also want to change ip address and netmask */ void netif_set_gw(struct netif *netif, ip_addr_t *gw) { ip_addr_set(&(netif->gw), gw); 802fb18: b101 cbz r1, 802fb1c 802fb1a: 6809 ldr r1, [r1, #0] 802fb1c: 60c1 str r1, [r0, #12] 802fb1e: 4770 bx lr 0802fb20 : * @note call netif_set_addr() if you also want to change ip address and * default gateway */ void netif_set_netmask(struct netif *netif, ip_addr_t *netmask) { 802fb20: b538 push {r3, r4, r5, lr} 802fb22: 4604 mov r4, r0 802fb24: 460d mov r5, r1 snmp_delete_iprteidx_tree(0, netif); 802fb26: 2000 movs r0, #0 802fb28: 4621 mov r1, r4 802fb2a: f004 fe0b bl 8034744 /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); 802fb2e: b105 cbz r5, 802fb32 802fb30: 682d ldr r5, [r5, #0] snmp_insert_iprteidx_tree(0, netif); 802fb32: 2000 movs r0, #0 802fb34: 4621 mov r1, r4 void netif_set_netmask(struct netif *netif, ip_addr_t *netmask) { snmp_delete_iprteidx_tree(0, netif); /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); 802fb36: 60a5 str r5, [r4, #8] netif->name[0], netif->name[1], ip4_addr1_16(&netif->netmask), ip4_addr2_16(&netif->netmask), ip4_addr3_16(&netif->netmask), ip4_addr4_16(&netif->netmask))); } 802fb38: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} netif_set_netmask(struct netif *netif, ip_addr_t *netmask) { snmp_delete_iprteidx_tree(0, netif); /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); snmp_insert_iprteidx_tree(0, netif); 802fb3c: f004 bdb6 b.w 80346ac 0802fb40 : * @param gw the new default gateway */ void netif_set_addr(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw) { 802fb40: b570 push {r4, r5, r6, lr} 802fb42: 4605 mov r5, r0 802fb44: 4616 mov r6, r2 802fb46: 461c mov r4, r3 netif_set_ipaddr(netif, ipaddr); 802fb48: f7ff ffaa bl 802faa0 netif_set_netmask(netif, netmask); 802fb4c: 4628 mov r0, r5 802fb4e: 4631 mov r1, r6 802fb50: f7ff ffe6 bl 802fb20 * @note call netif_set_addr() if you also want to change ip address and netmask */ void netif_set_gw(struct netif *netif, ip_addr_t *gw) { ip_addr_set(&(netif->gw), gw); 802fb54: b104 cbz r4, 802fb58 802fb56: 6824 ldr r4, [r4, #0] 802fb58: 60ec str r4, [r5, #12] 802fb5a: bd70 pop {r4, r5, r6, pc} 0802fb5c : * @return netif, or NULL if failed. */ struct netif * netif_add(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input) { 802fb5c: b5f8 push {r3, r4, r5, r6, r7, lr} netif->loop_first = NULL; netif->loop_last = NULL; #endif /* ENABLE_LOOPBACK */ /* remember netif specific state information data */ netif->state = state; 802fb5e: 9e06 ldr r6, [sp, #24] 802fb60: 61c6 str r6, [r0, #28] netif->num = netif_num++; 802fb62: 4e10 ldr r6, [pc, #64] ; (802fba4 ) 802fb64: 7837 ldrb r7, [r6, #0] 802fb66: f880 7030 strb.w r7, [r0, #48] ; 0x30 802fb6a: 3701 adds r7, #1 802fb6c: 7037 strb r7, [r6, #0] netif->input = input; 802fb6e: 9e08 ldr r6, [sp, #32] { LWIP_ASSERT("No init function given", init != NULL); /* reset new interface configuration state */ ip_addr_set_zero(&netif->ip_addr); 802fb70: 2500 movs r5, #0 * @return netif, or NULL if failed. */ struct netif * netif_add(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input) { 802fb72: 4604 mov r4, r0 LWIP_ASSERT("No init function given", init != NULL); /* reset new interface configuration state */ ip_addr_set_zero(&netif->ip_addr); 802fb74: 6045 str r5, [r0, #4] ip_addr_set_zero(&netif->netmask); 802fb76: 6085 str r5, [r0, #8] ip_addr_set_zero(&netif->gw); 802fb78: 60c5 str r5, [r0, #12] netif->flags = 0; 802fb7a: f880 502d strb.w r5, [r0, #45] ; 0x2d #if LWIP_DHCP /* netif not under DHCP control by default */ netif->dhcp = NULL; 802fb7e: 6205 str r5, [r0, #32] #endif /* ENABLE_LOOPBACK */ /* remember netif specific state information data */ netif->state = state; netif->num = netif_num++; netif->input = input; 802fb80: 6106 str r6, [r0, #16] NETIF_SET_HWADDRHINT(netif, NULL); #if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS netif->loop_cnt_current = 0; #endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */ netif_set_addr(netif, ipaddr, netmask, gw); 802fb82: f7ff ffdd bl 802fb40 /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 802fb86: 4620 mov r0, r4 802fb88: 9b07 ldr r3, [sp, #28] 802fb8a: 4798 blx r3 802fb8c: b930 cbnz r0, 802fb9c return NULL; } /* add this netif to the list */ netif->next = netif_list; 802fb8e: 4b06 ldr r3, [pc, #24] ; (802fba8 ) 802fb90: 681a ldr r2, [r3, #0] 802fb92: 6022 str r2, [r4, #0] netif_list = netif; 802fb94: 601c str r4, [r3, #0] snmp_inc_iflist(); 802fb96: f004 fbe1 bl 803435c LWIP_DEBUGF(NETIF_DEBUG, (" netmask ")); ip_addr_debug_print(NETIF_DEBUG, netmask); LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); ip_addr_debug_print(NETIF_DEBUG, gw); LWIP_DEBUGF(NETIF_DEBUG, ("\n")); return netif; 802fb9a: e000 b.n 802fb9e netif_set_addr(netif, ipaddr, netmask, gw); /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { return NULL; 802fb9c: 462c mov r4, r5 ip_addr_debug_print(NETIF_DEBUG, netmask); LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); ip_addr_debug_print(NETIF_DEBUG, gw); LWIP_DEBUGF(NETIF_DEBUG, ("\n")); return netif; } 802fb9e: 4620 mov r0, r4 802fba0: bdf8 pop {r3, r4, r5, r6, r7, pc} 802fba2: bf00 nop 802fba4: 2000c428 .word 0x2000c428 802fba8: 2000ff14 .word 0x2000ff14 0802fbac : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 802fbac: b510 push {r4, lr} if (netif == NULL) { 802fbae: 4604 mov r4, r0 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802fbb0: 4621 mov r1, r4 802fbb2: 2001 movs r0, #1 * @param netif the default network interface */ void netif_set_default(struct netif *netif) { if (netif == NULL) { 802fbb4: b914 cbnz r4, 802fbbc /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802fbb6: f004 fdc5 bl 8034744 802fbba: e001 b.n 802fbc0 } else { /* install default route */ snmp_insert_iprteidx_tree(1, netif); 802fbbc: f004 fd76 bl 80346ac } netif_default = netif; 802fbc0: 4b01 ldr r3, [pc, #4] ; (802fbc8 ) 802fbc2: 601c str r4, [r3, #0] 802fbc4: bd10 pop {r4, pc} 802fbc6: bf00 nop 802fbc8: 2000ff18 .word 0x2000ff18 0802fbcc : * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802fbcc: b510 push {r4, lr} if (!(netif->flags & NETIF_FLAG_UP)) { 802fbce: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802fbd2: 07da lsls r2, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802fbd4: 4604 mov r4, r0 if (!(netif->flags & NETIF_FLAG_UP)) { 802fbd6: d412 bmi.n 802fbfe netif->flags |= NETIF_FLAG_UP; 802fbd8: f043 0301 orr.w r3, r3, #1 802fbdc: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802fbe0: 3038 adds r0, #56 ; 0x38 802fbe2: f004 fb55 bl 8034290 * @note: Enabling DHCP on a down interface will make it come * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) 802fbe6: f894 302d ldrb.w r3, [r4, #45] ; 0x2d NETIF_STATUS_CALLBACK(netif); if (netif->flags & NETIF_FLAG_LINK_UP) { #if LWIP_ARP /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ if (netif->flags & (NETIF_FLAG_ETHARP)) { 802fbea: f003 0330 and.w r3, r3, #48 ; 0x30 802fbee: 2b30 cmp r3, #48 ; 0x30 802fbf0: d105 bne.n 802fbfe etharp_gratuitous(netif); 802fbf2: 4620 mov r0, r4 802fbf4: 1d21 adds r1, r4, #4 igmp_report_groups( netif); } #endif /* LWIP_IGMP */ } } } 802fbf6: e8bd 4010 ldmia.w sp!, {r4, lr} if (netif->flags & NETIF_FLAG_LINK_UP) { #if LWIP_ARP /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ if (netif->flags & (NETIF_FLAG_ETHARP)) { etharp_gratuitous(netif); 802fbfa: f007 b89d b.w 8036d38 802fbfe: bd10 pop {r4, pc} 0802fc00 : * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802fc00: b510 push {r4, lr} if (netif->flags & NETIF_FLAG_UP) { 802fc02: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802fc06: 07d9 lsls r1, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802fc08: 4604 mov r4, r0 if (netif->flags & NETIF_FLAG_UP) { 802fc0a: d511 bpl.n 802fc30 netif->flags &= ~NETIF_FLAG_UP; 802fc0c: f023 0301 bic.w r3, r3, #1 802fc10: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802fc14: 3038 adds r0, #56 ; 0x38 802fc16: f004 fb3b bl 8034290 #endif #if LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { 802fc1a: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802fc1e: f003 0320 and.w r3, r3, #32 802fc22: b2db uxtb r3, r3 802fc24: b123 cbz r3, 802fc30 etharp_cleanup_netif(netif); 802fc26: 4620 mov r0, r4 } #endif /* LWIP_ARP */ NETIF_STATUS_CALLBACK(netif); } } 802fc28: e8bd 4010 ldmia.w sp!, {r4, lr} snmp_get_sysuptime(&netif->ts); #endif #if LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { etharp_cleanup_netif(netif); 802fc2c: f007 b854 b.w 8036cd8 802fc30: bd10 pop {r4, pc} 0802fc32 : * @return non-zero on failure, zero on success. * */ u8_t pbuf_header(struct pbuf *p, s16_t header_size_increment) { 802fc32: b510 push {r4, lr} u16_t type; void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); if ((header_size_increment == 0) || (p == NULL)) { 802fc34: b321 cbz r1, 802fc80 802fc36: b330 cbz r0, 802fc86 return 0; } if (header_size_increment < 0){ 802fc38: 2900 cmp r1, #0 802fc3a: da05 bge.n 802fc48 increment_magnitude = -header_size_increment; 802fc3c: 424b negs r3, r1 /* Check that we aren't going to move off the end of the pbuf */ LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); 802fc3e: 8942 ldrh r2, [r0, #10] if ((header_size_increment == 0) || (p == NULL)) { return 0; } if (header_size_increment < 0){ increment_magnitude = -header_size_increment; 802fc40: b29b uxth r3, r3 /* Check that we aren't going to move off the end of the pbuf */ LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); 802fc42: 429a cmp r2, r3 802fc44: d201 bcs.n 802fc4a 802fc46: e01d b.n 802fc84 } else { increment_magnitude = header_size_increment; 802fc48: b28b uxth r3, r1 LWIP_ASSERT("p->payload - increment_magnitude >= p + SIZEOF_STRUCT_PBUF", (u8_t *)p->payload - increment_magnitude >= (u8_t *)p + SIZEOF_STRUCT_PBUF); #endif } type = p->type; 802fc4a: 7b02 ldrb r2, [r0, #12] /* remember current payload pointer */ payload = p->payload; 802fc4c: 6844 ldr r4, [r0, #4] /* pbuf types containing payloads? */ if (type == PBUF_RAM || type == PBUF_POOL) { 802fc4e: b10a cbz r2, 802fc54 802fc50: 2a03 cmp r2, #3 802fc52: d105 bne.n 802fc60 /* set new payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802fc54: 1a64 subs r4, r4, r1 /* boundary check fails? */ if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 802fc56: f100 0310 add.w r3, r0, #16 802fc5a: 429c cmp r4, r3 802fc5c: d312 bcc.n 802fc84 802fc5e: e008 b.n 802fc72 p->payload = payload; /* bail out unsuccesfully */ return 1; } /* pbuf types refering to external payloads? */ } else if (type == PBUF_REF || type == PBUF_ROM) { 802fc60: 3a01 subs r2, #1 802fc62: 2a01 cmp r2, #1 802fc64: d80e bhi.n 802fc84 /* hide a header in the payload? */ if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { 802fc66: 2900 cmp r1, #0 802fc68: da0c bge.n 802fc84 802fc6a: 8942 ldrh r2, [r0, #10] 802fc6c: 429a cmp r2, r3 802fc6e: d309 bcc.n 802fc84 /* increase payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802fc70: 1a64 subs r4, r4, r1 /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802fc72: 8943 ldrh r3, [r0, #10] /* pbuf types refering to external payloads? */ } else if (type == PBUF_REF || type == PBUF_ROM) { /* hide a header in the payload? */ if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { /* increase payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802fc74: 6044 str r4, [r0, #4] /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802fc76: 18cb adds r3, r1, r3 802fc78: 8143 strh r3, [r0, #10] p->tot_len += header_size_increment; 802fc7a: 8903 ldrh r3, [r0, #8] 802fc7c: 18c9 adds r1, r1, r3 802fc7e: 8101 strh r1, [r0, #8] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", (void *)payload, (void *)p->payload, header_size_increment)); return 0; 802fc80: 2000 movs r0, #0 802fc82: bd10 pop {r4, pc} } if (header_size_increment < 0){ increment_magnitude = -header_size_increment; /* Check that we aren't going to move off the end of the pbuf */ LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); 802fc84: 2001 movs r0, #1 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", (void *)payload, (void *)p->payload, header_size_increment)); return 0; } 802fc86: bd10 pop {r4, pc} 0802fc88 : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 802fc88: b570 push {r4, r5, r6, lr} u16_t type; struct pbuf *q; u8_t count; if (p == NULL) { 802fc8a: 4604 mov r4, r0 802fc8c: b300 cbz r0, 802fcd0 802fc8e: 2500 movs r5, #0 u16_t ref; SYS_ARCH_DECL_PROTECT(old_level); /* Since decrementing ref cannot be guaranteed to be a single machine operation * we must protect it. We put the new ref into a local variable to prevent * further protection. */ SYS_ARCH_PROTECT(old_level); 802fc90: f007 fc9e bl 80375d0 /* all pbufs in a chain are referenced at least once */ LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); /* decrease reference count (number of pointers to pbuf) */ ref = --(p->ref); 802fc94: 89e6 ldrh r6, [r4, #14] 802fc96: 3e01 subs r6, #1 802fc98: b2b6 uxth r6, r6 802fc9a: 81e6 strh r6, [r4, #14] SYS_ARCH_UNPROTECT(old_level); 802fc9c: f007 fca2 bl 80375e4 /* this pbuf is no longer referenced to? */ if (ref == 0) { 802fca0: b9be cbnz r6, 802fcd2 /* remember next pbuf in chain for next iteration */ q = p->next; LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p)); type = p->type; 802fca2: 7b23 ldrb r3, [r4, #12] ref = --(p->ref); SYS_ARCH_UNPROTECT(old_level); /* this pbuf is no longer referenced to? */ if (ref == 0) { /* remember next pbuf in chain for next iteration */ q = p->next; 802fca4: 6826 ldr r6, [r4, #0] pc->custom_free_function(p); } else #endif /* LWIP_SUPPORT_CUSTOM_PBUF */ { /* is this a pbuf from the pool? */ if (type == PBUF_POOL) { 802fca6: 2b03 cmp r3, #3 802fca8: d101 bne.n 802fcae memp_free(MEMP_PBUF_POOL, p); 802fcaa: 200f movs r0, #15 802fcac: e003 b.n 802fcb6 /* is this a ROM or RAM referencing pbuf? */ } else if (type == PBUF_ROM || type == PBUF_REF) { 802fcae: 3b01 subs r3, #1 802fcb0: 2b01 cmp r3, #1 802fcb2: d804 bhi.n 802fcbe memp_free(MEMP_PBUF, p); 802fcb4: 200e movs r0, #14 802fcb6: 4621 mov r1, r4 802fcb8: f7ff fedc bl 802fa74 802fcbc: e002 b.n 802fcc4 /* type == PBUF_RAM */ } else { mem_free(p); 802fcbe: 4620 mov r0, r4 802fcc0: f7ff fd70 bl 802f7a4 } } count++; 802fcc4: 3501 adds r5, #1 802fcc6: b2ed uxtb r5, r5 p->type == PBUF_REF || p->type == PBUF_POOL); count = 0; /* de-allocate all consecutive pbufs from the head of the chain that * obtain a zero reference count after decrementing*/ while (p != NULL) { 802fcc8: 4634 mov r4, r6 802fcca: 2e00 cmp r6, #0 802fccc: d1e0 bne.n 802fc90 802fcce: e000 b.n 802fcd2 if (p == NULL) { LWIP_ASSERT("p != NULL", p != NULL); /* if assertions are disabled, proceed with debug output */ LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("pbuf_free(p == NULL) was called.\n")); return 0; 802fcd0: 4605 mov r5, r0 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; } 802fcd2: 4628 mov r0, r5 802fcd4: bd70 pop {r4, r5, r6, pc} 0802fcd6 : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 802fcd6: b538 push {r3, r4, r5, lr} p->type == PBUF_ROM || p->type == PBUF_RAM || p->type == PBUF_REF); /* desired length larger than current length? */ if (new_len >= p->tot_len) { 802fcd8: 8903 ldrh r3, [r0, #8] 802fcda: 4299 cmp r1, r3 802fcdc: d220 bcs.n 802fd20 return; } /* the pbuf chain grows by (new_len - p->tot_len) bytes * (which may be negative in case of shrinking) */ grow = new_len - p->tot_len; 802fcde: 1aca subs r2, r1, r3 /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; q = p; /* should this pbuf be kept? */ while (rem_len > q->len) { 802fce0: 460d mov r5, r1 802fce2: 4604 mov r4, r0 802fce4: e005 b.n 802fcf2 /* decrease remaining length by pbuf length */ rem_len -= q->len; 802fce6: 1aed subs r5, r5, r3 /* decrease total length indicator */ LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); q->tot_len += (u16_t)grow; 802fce8: 8923 ldrh r3, [r4, #8] 802fcea: 18d3 adds r3, r2, r3 802fcec: 8123 strh r3, [r4, #8] /* proceed to next pbuf in chain */ q = q->next; 802fcee: 6824 ldr r4, [r4, #0] rem_len = new_len; q = p; /* should this pbuf be kept? */ while (rem_len > q->len) { /* decrease remaining length by pbuf length */ rem_len -= q->len; 802fcf0: b2ad uxth r5, r5 /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; q = p; /* should this pbuf be kept? */ while (rem_len > q->len) { 802fcf2: 8963 ldrh r3, [r4, #10] 802fcf4: 429d cmp r5, r3 802fcf6: d8f6 bhi.n 802fce6 /* we have now reached the new last pbuf (in q) */ /* rem_len == desired length for pbuf q */ /* shrink allocated memory for PBUF_RAM */ /* (other types merely adjust their length fields */ if ((q->type == PBUF_RAM) && (rem_len != q->len)) { 802fcf8: 7b22 ldrb r2, [r4, #12] 802fcfa: b94a cbnz r2, 802fd10 802fcfc: 429d cmp r5, r3 802fcfe: d007 beq.n 802fd10 /* reallocate and adjust the length of the pbuf that will be split */ q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); 802fd00: 6863 ldr r3, [r4, #4] 802fd02: 1b1b subs r3, r3, r4 802fd04: 18e9 adds r1, r5, r3 802fd06: 4620 mov r0, r4 802fd08: b289 uxth r1, r1 802fd0a: f7ff fda5 bl 802f858 802fd0e: 4604 mov r4, r0 /* adjust length fields for new last pbuf */ q->len = rem_len; q->tot_len = q->len; /* any remaining pbufs in chain? */ if (q->next != NULL) { 802fd10: 6820 ldr r0, [r4, #0] /* reallocate and adjust the length of the pbuf that will be split */ q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); } /* adjust length fields for new last pbuf */ q->len = rem_len; 802fd12: 8165 strh r5, [r4, #10] q->tot_len = q->len; 802fd14: 8125 strh r5, [r4, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 802fd16: b108 cbz r0, 802fd1c /* free remaining pbufs in chain */ pbuf_free(q->next); 802fd18: f7ff ffb6 bl 802fc88 } /* q is last packet in chain */ q->next = NULL; 802fd1c: 2300 movs r3, #0 802fd1e: 6023 str r3, [r4, #0] 802fd20: bd38 pop {r3, r4, r5, pc} 0802fd22 : * @return the allocated pbuf. If multiple pbufs where allocated, this * is the first pbuf of a pbuf chain. */ struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) { 802fd22: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802fd26: 460d mov r5, r1 802fd28: 4617 mov r7, r2 u16_t offset; s32_t rem_len; /* remaining length */ LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); /* determine header offset */ switch (layer) { 802fd2a: 2803 cmp r0, #3 802fd2c: d87c bhi.n 802fe28 802fd2e: e8df f000 tbb [pc, r0] 802fd32: 0802 .short 0x0802 802fd34: 0604 .short 0x0604 case PBUF_TRANSPORT: /* add room for transport (often TCP) layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; 802fd36: 2636 movs r6, #54 ; 0x36 802fd38: e004 b.n 802fd44 /* add room for IP layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN; break; case PBUF_LINK: /* add room for link layer header */ offset = PBUF_LINK_HLEN; 802fd3a: 260e movs r6, #14 break; 802fd3c: e002 b.n 802fd44 case PBUF_RAW: offset = 0; 802fd3e: 2600 movs r6, #0 break; 802fd40: e000 b.n 802fd44 /* add room for transport (often TCP) layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; break; case PBUF_IP: /* add room for IP layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN; 802fd42: 2622 movs r6, #34 ; 0x22 default: LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); return NULL; } switch (type) { 802fd44: 2f03 cmp r7, #3 802fd46: d86f bhi.n 802fe28 802fd48: e8df f007 tbb [pc, r7] 802fd4c: 025e5e46 .word 0x025e5e46 case PBUF_POOL: /* allocate head of pbuf chain into p */ p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802fd50: 200f movs r0, #15 802fd52: f7ff fe79 bl 802fa48 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { 802fd56: 4604 mov r4, r0 802fd58: b900 cbnz r0, 802fd5c 802fd5a: e065 b.n 802fe28 } p->type = type; p->next = NULL; /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); 802fd5c: 1982 adds r2, r0, r6 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; /* set the length of the first pbuf in the chain */ p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); 802fd5e: 3603 adds r6, #3 802fd60: f026 0603 bic.w r6, r6, #3 } p->type = type; p->next = NULL; /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); 802fd64: 3213 adds r2, #19 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; /* set the length of the first pbuf in the chain */ p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); 802fd66: f5c6 66c0 rsb r6, r6, #1536 ; 0x600 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; 802fd6a: 2303 movs r3, #3 p->next = NULL; /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); 802fd6c: f022 0203 bic.w r2, r2, #3 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; /* set the length of the first pbuf in the chain */ p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); 802fd70: 3604 adds r6, #4 802fd72: 42ae cmp r6, r5 802fd74: bfa8 it ge 802fd76: 462e movge r6, r5 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; 802fd78: 7303 strb r3, [r0, #12] p->next = NULL; /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); 802fd7a: 6042 str r2, [r0, #4] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802fd7c: 2300 movs r3, #0 ((u8_t*)p->payload + p->len <= (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); /* set reference count (needed here in case we fail) */ p->ref = 1; 802fd7e: 2201 movs r2, #1 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; /* set the length of the first pbuf in the chain */ p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); 802fd80: 8146 strh r6, [r0, #10] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802fd82: 6003 str r3, [r0, #0] /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; 802fd84: 8105 strh r5, [r0, #8] ((u8_t*)p->payload + p->len <= (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); /* set reference count (needed here in case we fail) */ p->ref = 1; 802fd86: 81c2 strh r2, [r0, #14] /* now allocate the tail of the pbuf chain */ /* remember first pbuf for linkage in next iteration */ r = p; /* remaining length to be allocated */ rem_len = length - p->len; 802fd88: 1bae subs r6, r5, r6 /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 802fd8a: 4607 mov r7, r0 802fd8c: 4698 mov r8, r3 r->next = q; /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); 802fd8e: f240 6903 movw r9, #1539 ; 0x603 802fd92: f240 6a04 movw sl, #1540 ; 0x604 /* remember first pbuf for linkage in next iteration */ r = p; /* remaining length to be allocated */ rem_len = length - p->len; /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 802fd96: e01c b.n 802fdd2 q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802fd98: 200f movs r0, #15 802fd9a: f7ff fe55 bl 802fa48 if (q == NULL) { 802fd9e: 4605 mov r5, r0 802fda0: b918 cbnz r0, 802fdaa PBUF_POOL_IS_EMPTY(); /* free chain so far allocated */ pbuf_free(p); 802fda2: 4620 mov r0, r4 802fda4: f7ff ff70 bl 802fc88 802fda8: e03e b.n 802fe28 /* bail out unsuccesfully */ return NULL; } q->type = type; 802fdaa: 2303 movs r3, #3 /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); 802fdac: f100 0210 add.w r2, r0, #16 /* free chain so far allocated */ pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; 802fdb0: 7303 strb r3, [r0, #12] q->next = NULL; /* make previous pbuf point to this pbuf */ r->next = q; /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; 802fdb2: b2b3 uxth r3, r6 802fdb4: 8103 strh r3, [r0, #8] /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); 802fdb6: 6042 str r2, [r0, #4] r->next = q; /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); 802fdb8: 454b cmp r3, r9 802fdba: bf88 it hi 802fdbc: 4653 movhi r3, sl LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", ((u8_t*)p->payload + p->len <= (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); q->ref = 1; 802fdbe: 2201 movs r2, #1 /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; q->next = NULL; 802fdc0: f8c0 8000 str.w r8, [r0] pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; 802fdc4: f880 800d strb.w r8, [r0, #13] q->next = NULL; /* make previous pbuf point to this pbuf */ r->next = q; 802fdc8: 6038 str r0, [r7, #0] /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); 802fdca: 8143 strh r3, [r0, #10] LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", ((u8_t*)p->payload + p->len <= (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); q->ref = 1; 802fdcc: 81c2 strh r2, [r0, #14] /* calculate remaining length to be allocated */ rem_len -= q->len; 802fdce: 1af6 subs r6, r6, r3 802fdd0: 4607 mov r7, r0 /* remember first pbuf for linkage in next iteration */ r = p; /* remaining length to be allocated */ rem_len = length - p->len; /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 802fdd2: 2e00 cmp r6, #0 802fdd4: dce0 bgt.n 802fd98 802fdd6: e022 b.n 802fe1e /*r->next = NULL;*/ break; case PBUF_RAM: /* If pbuf is to be allocated in RAM, allocate memory for it. */ p = (struct pbuf*)mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length)); 802fdd8: f106 0013 add.w r0, r6, #19 802fddc: 1ceb adds r3, r5, #3 802fdde: f023 0303 bic.w r3, r3, #3 802fde2: f020 0003 bic.w r0, r0, #3 802fde6: 18c0 adds r0, r0, r3 802fde8: b280 uxth r0, r0 802fdea: f7ff fda3 bl 802f934 if (p == NULL) { 802fdee: 4604 mov r4, r0 802fdf0: b1d0 cbz r0, 802fe28 return NULL; } /* Set up internal structure of the pbuf. */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); 802fdf2: 1986 adds r6, r0, r6 802fdf4: 3613 adds r6, #19 p->len = p->tot_len = length; p->next = NULL; 802fdf6: 2300 movs r3, #0 p = (struct pbuf*)mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length)); if (p == NULL) { return NULL; } /* Set up internal structure of the pbuf. */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); 802fdf8: f026 0603 bic.w r6, r6, #3 802fdfc: 6046 str r6, [r0, #4] p->len = p->tot_len = length; 802fdfe: 8105 strh r5, [r0, #8] 802fe00: 8145 strh r5, [r0, #10] p->next = NULL; 802fe02: 6003 str r3, [r0, #0] p->type = type; 802fe04: 7303 strb r3, [r0, #12] 802fe06: e00a b.n 802fe1e /* pbuf references existing (non-volatile static constant) ROM payload? */ case PBUF_ROM: /* pbuf references existing (externally allocated) RAM payload? */ case PBUF_REF: /* only allocate memory for the pbuf structure */ p = (struct pbuf *)memp_malloc(MEMP_PBUF); 802fe08: 200e movs r0, #14 802fe0a: f7ff fe1d bl 802fa48 if (p == NULL) { 802fe0e: 4604 mov r4, r0 802fe10: b150 cbz r0, 802fe28 ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", (type == PBUF_ROM) ? "ROM" : "REF")); return NULL; } /* caller must set this field properly, afterwards */ p->payload = NULL; 802fe12: 2300 movs r3, #0 802fe14: 6043 str r3, [r0, #4] p->len = p->tot_len = length; 802fe16: 8105 strh r5, [r0, #8] 802fe18: 8145 strh r5, [r0, #10] p->next = NULL; 802fe1a: 6003 str r3, [r0, #0] p->type = type; 802fe1c: 7307 strb r7, [r0, #12] default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; } /* set reference count */ p->ref = 1; 802fe1e: 2301 movs r3, #1 802fe20: 81e3 strh r3, [r4, #14] /* set flags */ p->flags = 0; 802fe22: 2300 movs r3, #0 802fe24: 7363 strb r3, [r4, #13] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 802fe26: e000 b.n 802fe2a p->next = NULL; p->type = type; break; default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; 802fe28: 2400 movs r4, #0 p->ref = 1; /* set flags */ p->flags = 0; LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; } 802fe2a: 4620 mov r0, r4 802fe2c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802fe30 : * @return the number of pbufs in a chain */ u8_t pbuf_clen(struct pbuf *p) { 802fe30: 4603 mov r3, r0 u8_t len; len = 0; 802fe32: 2000 movs r0, #0 while (p != NULL) { 802fe34: e002 b.n 802fe3c ++len; 802fe36: 3001 adds r0, #1 p = p->next; 802fe38: 681b ldr r3, [r3, #0] { u8_t len; len = 0; while (p != NULL) { ++len; 802fe3a: b2c0 uxtb r0, r0 pbuf_clen(struct pbuf *p) { u8_t len; len = 0; while (p != NULL) { 802fe3c: 2b00 cmp r3, #0 802fe3e: d1fa bne.n 802fe36 ++len; p = p->next; } return len; } 802fe40: 4770 bx lr 0802fe42 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 802fe42: b510 push {r4, lr} SYS_ARCH_DECL_PROTECT(old_level); /* pbuf given? */ if (p != NULL) { 802fe44: 4604 mov r4, r0 802fe46: b140 cbz r0, 802fe5a SYS_ARCH_PROTECT(old_level); 802fe48: f007 fbc2 bl 80375d0 ++(p->ref); 802fe4c: 89e3 ldrh r3, [r4, #14] 802fe4e: 3301 adds r3, #1 802fe50: 81e3 strh r3, [r4, #14] SYS_ARCH_UNPROTECT(old_level); } } 802fe52: e8bd 4010 ldmia.w sp!, {r4, lr} SYS_ARCH_DECL_PROTECT(old_level); /* pbuf given? */ if (p != NULL) { SYS_ARCH_PROTECT(old_level); ++(p->ref); SYS_ARCH_UNPROTECT(old_level); 802fe56: f007 bbc5 b.w 80375e4 802fe5a: bd10 pop {r4, pc} 0802fe5c : * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 802fe5c: b510 push {r4, lr} struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 802fe5e: b168 cbz r0, 802fe7c 802fe60: b161 cbz r1, 802fe7c 802fe62: e003 b.n 802fe6c ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { /* add total length of second chain to all totals of first chain */ p->tot_len += t->tot_len; 802fe64: 8904 ldrh r4, [r0, #8] 802fe66: 191b adds r3, r3, r4 802fe68: 8103 strh r3, [r0, #8] LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { 802fe6a: 4610 mov r0, r2 802fe6c: 6802 ldr r2, [r0, #0] 802fe6e: 890b ldrh r3, [r1, #8] 802fe70: 2a00 cmp r2, #0 802fe72: d1f7 bne.n 802fe64 } /* { p is last pbuf of first h chain, p->next == NULL } */ LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len); LWIP_ASSERT("p->next == NULL", p->next == NULL); /* add total length of second chain to last pbuf total of first chain */ p->tot_len += t->tot_len; 802fe74: 8902 ldrh r2, [r0, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 802fe76: 6001 str r1, [r0, #0] } /* { p is last pbuf of first h chain, p->next == NULL } */ LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len); LWIP_ASSERT("p->next == NULL", p->next == NULL); /* add total length of second chain to last pbuf total of first chain */ p->tot_len += t->tot_len; 802fe78: 189b adds r3, r3, r2 802fe7a: 8103 strh r3, [r0, #8] 802fe7c: bd10 pop {r4, pc} 0802fe7e : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 802fe7e: b510 push {r4, lr} 802fe80: 460c mov r4, r1 pbuf_cat(h, t); 802fe82: f7ff ffeb bl 802fe5c /* t is now referenced by h */ pbuf_ref(t); 802fe86: 4620 mov r0, r4 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 802fe88: e8bd 4010 ldmia.w sp!, {r4, lr} void pbuf_chain(struct pbuf *h, struct pbuf *t) { pbuf_cat(h, t); /* t is now referenced by h */ pbuf_ref(t); 802fe8c: f7ff bfd9 b.w 802fe42 0802fe90 : * ERR_ARG if one of the pbufs is NULL or p_to is not big * enough to hold p_from */ err_t pbuf_copy(struct pbuf *p_to, struct pbuf *p_from) { 802fe90: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802fe94: 460c mov r4, r1 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy(%p, %p)\n", (void*)p_to, (void*)p_from)); /* is the target big enough to hold the source? */ LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) && 802fe96: 4605 mov r5, r0 802fe98: b908 cbnz r0, 802fe9e 802fe9a: 20f2 movs r0, #242 ; 0xf2 802fe9c: e03f b.n 802ff1e 802fe9e: 2900 cmp r1, #0 802fea0: d0fb beq.n 802fe9a 802fea2: 8902 ldrh r2, [r0, #8] 802fea4: 890b ldrh r3, [r1, #8] 802fea6: 429a cmp r2, r3 802fea8: d3f7 bcc.n 802fe9a 802feaa: 2600 movs r6, #0 802feac: 4637 mov r7, r6 /* iterate through pbuf chain */ do { /* copy one part of the original chain */ if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { 802feae: f8b4 800a ldrh.w r8, [r4, #10] 802feb2: 896b ldrh r3, [r5, #10] len = p_from->len - offset_from; } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); 802feb4: 6861 ldr r1, [r4, #4] 802feb6: 6868 ldr r0, [r5, #4] /* iterate through pbuf chain */ do { /* copy one part of the original chain */ if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { 802feb8: ebc6 0808 rsb r8, r6, r8 802febc: 1bdb subs r3, r3, r7 802febe: 4543 cmp r3, r8 /* complete current p_from fits into current p_to */ len = p_from->len - offset_from; } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; 802fec0: bfb4 ite lt 802fec2: fa1f f883 uxthlt.w r8, r3 do { /* copy one part of the original chain */ if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { /* complete current p_from fits into current p_to */ len = p_from->len - offset_from; 802fec6: fa1f f888 uxthge.w r8, r8 } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); 802feca: 19c0 adds r0, r0, r7 802fecc: 1989 adds r1, r1, r6 802fece: 4642 mov r2, r8 802fed0: f7f1 fee8 bl 8021ca4 offset_to += len; offset_from += len; 802fed4: 4446 add r6, r8 LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); if (offset_from >= p_from->len) { 802fed6: 8963 ldrh r3, [r4, #10] /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); offset_to += len; offset_from += len; 802fed8: b2b6 uxth r6, r6 LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); if (offset_from >= p_from->len) { 802feda: 42b3 cmp r3, r6 } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); offset_to += len; 802fedc: 4447 add r7, r8 if (offset_from >= p_from->len) { /* on to next p_from (if any) */ offset_from = 0; p_from = p_from->next; } if (offset_to == p_to->len) { 802fede: 896b ldrh r3, [r5, #10] LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); if (offset_from >= p_from->len) { /* on to next p_from (if any) */ offset_from = 0; p_from = p_from->next; 802fee0: bf98 it ls 802fee2: 6824 ldrls r4, [r4, #0] } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); offset_to += len; 802fee4: b2bf uxth r7, r7 offset_from += len; LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); if (offset_from >= p_from->len) { /* on to next p_from (if any) */ offset_from = 0; 802fee6: bf98 it ls 802fee8: 2600 movls r6, #0 p_from = p_from->next; } if (offset_to == p_to->len) { 802feea: 42bb cmp r3, r7 802feec: d105 bne.n 802fefa /* on to next p_to (if any) */ offset_to = 0; p_to = p_to->next; 802feee: 682d ldr r5, [r5, #0] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); 802fef0: b915 cbnz r5, 802fef8 802fef2: 2c00 cmp r4, #0 802fef4: d1d1 bne.n 802fe9a 802fef6: e00f b.n 802ff18 offset_from = 0; p_from = p_from->next; } if (offset_to == p_to->len) { /* on to next p_to (if any) */ offset_to = 0; 802fef8: 2700 movs r7, #0 p_to = p_to->next; LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); } if((p_from != NULL) && (p_from->len == p_from->tot_len)) { 802fefa: b12c cbz r4, 802ff08 802fefc: 8962 ldrh r2, [r4, #10] 802fefe: 8923 ldrh r3, [r4, #8] 802ff00: 429a cmp r2, r3 802ff02: d101 bne.n 802ff08 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802ff04: 6823 ldr r3, [r4, #0] 802ff06: b94b cbnz r3, 802ff1c (p_from->next == NULL), return ERR_VAL;); } if((p_to != NULL) && (p_to->len == p_to->tot_len)) { 802ff08: 896a ldrh r2, [r5, #10] 802ff0a: 892b ldrh r3, [r5, #8] 802ff0c: 429a cmp r2, r3 802ff0e: d101 bne.n 802ff14 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802ff10: 682b ldr r3, [r5, #0] 802ff12: b91b cbnz r3, 802ff1c (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 802ff14: 2c00 cmp r4, #0 802ff16: d1ca bne.n 802feae LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 802ff18: 4620 mov r0, r4 802ff1a: e000 b.n 802ff1e LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); } if((p_from != NULL) && (p_from->len == p_from->tot_len)) { /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802ff1c: 20fa movs r0, #250 ; 0xfa (p_to->next == NULL), return ERR_VAL;); } } while (p_from); LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; } 802ff1e: b240 sxtb r0, r0 802ff20: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802ff24 : * @param offset offset into the packet buffer from where to begin copying len bytes * @return the number of bytes copied, or 0 on failure */ u16_t pbuf_copy_partial(struct pbuf *buf, void *dataptr, u16_t len, u16_t offset) { 802ff24: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802ff28: 4688 mov r8, r1 802ff2a: 4616 mov r6, r2 struct pbuf *p; u16_t left; u16_t buf_copy_len; u16_t copied_total = 0; LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 802ff2c: b328 cbz r0, 802ff7a LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 802ff2e: b331 cbz r1, 802ff7e 802ff30: 2400 movs r4, #0 802ff32: 4605 mov r5, r0 802ff34: 46a1 mov r9, r4 802ff36: e01c b.n 802ff72 return 0; } /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ for(p = buf; len != 0 && p != NULL; p = p->next) { if ((offset != 0) && (offset >= p->len)) { 802ff38: b12b cbz r3, 802ff46 802ff3a: 896a ldrh r2, [r5, #10] 802ff3c: 4293 cmp r3, r2 802ff3e: d302 bcc.n 802ff46 /* don't copy from this buffer -> on to the next */ offset -= p->len; 802ff40: 1a9b subs r3, r3, r2 802ff42: b29b uxth r3, r3 802ff44: e014 b.n 802ff70 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; 802ff46: 896f ldrh r7, [r5, #10] if (buf_copy_len > len) buf_copy_len = len; /* copy the necessary parts of the buffer */ MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); 802ff48: 6869 ldr r1, [r5, #4] if ((offset != 0) && (offset >= p->len)) { /* don't copy from this buffer -> on to the next */ offset -= p->len; } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; 802ff4a: 1aff subs r7, r7, r3 802ff4c: b2bf uxth r7, r7 802ff4e: 42b7 cmp r7, r6 802ff50: bf28 it cs 802ff52: 4637 movcs r7, r6 if (buf_copy_len > len) buf_copy_len = len; /* copy the necessary parts of the buffer */ MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); 802ff54: eb08 0009 add.w r0, r8, r9 802ff58: 18c9 adds r1, r1, r3 802ff5a: 463a mov r2, r7 copied_total += buf_copy_len; 802ff5c: 193c adds r4, r7, r4 left += buf_copy_len; 802ff5e: 44b9 add r9, r7 len -= buf_copy_len; 802ff60: 1bf6 subs r6, r6, r7 /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; if (buf_copy_len > len) buf_copy_len = len; /* copy the necessary parts of the buffer */ MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); 802ff62: f7f1 fe9f bl 8021ca4 copied_total += buf_copy_len; 802ff66: b2a4 uxth r4, r4 left += buf_copy_len; 802ff68: fa1f f989 uxth.w r9, r9 len -= buf_copy_len; 802ff6c: b2b6 uxth r6, r6 offset = 0; 802ff6e: 2300 movs r3, #0 if((buf == NULL) || (dataptr == NULL)) { return 0; } /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ for(p = buf; len != 0 && p != NULL; p = p->next) { 802ff70: 682d ldr r5, [r5, #0] 802ff72: b12e cbz r6, 802ff80 802ff74: 2d00 cmp r5, #0 802ff76: d1df bne.n 802ff38 802ff78: e002 b.n 802ff80 struct pbuf *p; u16_t left; u16_t buf_copy_len; u16_t copied_total = 0; LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 802ff7a: 4604 mov r4, r0 802ff7c: e000 b.n 802ff80 802ff7e: 460c mov r4, r1 len -= buf_copy_len; offset = 0; } } return copied_total; } 802ff80: 4620 mov r0, r4 802ff82: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802ff86: 0000 movs r0, r0 0802ff88 : * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 802ff88: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} u8_t eaten = 0; LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); 802ff8c: 6843 ldr r3, [r0, #4] /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { if ((pcb->protocol == proto) && (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest))) { 802ff8e: f8df a074 ldr.w sl, [pc, #116] ; 8030004 u8_t eaten = 0; LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); 802ff92: f893 9009 ldrb.w r9, [r3, #9] prev = NULL; pcb = raw_pcbs; 802ff96: 4b19 ldr r3, [pc, #100] ; (802fffc ) * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 802ff98: 4606 mov r6, r0 iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; pcb = raw_pcbs; 802ff9a: 681c ldr r4, [r3, #0] LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; 802ff9c: 2500 movs r5, #0 eaten = 1; if (prev != NULL) { /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; pcb->next = raw_pcbs; 802ff9e: 4698 mov r8, r3 802ffa0: e023 b.n 802ffea prev = NULL; pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { if ((pcb->protocol == proto) && 802ffa2: 7c23 ldrb r3, [r4, #16] 802ffa4: 454b cmp r3, r9 802ffa6: d118 bne.n 802ffda (ip_addr_isany(&pcb->local_ip) || 802ffa8: 6823 ldr r3, [r4, #0] 802ffaa: b11b cbz r3, 802ffb4 802ffac: f8da 2000 ldr.w r2, [sl] 802ffb0: 4293 cmp r3, r2 802ffb2: d112 bne.n 802ffda /* broadcast filter? */ if (ip_get_option(pcb, SOF_BROADCAST) || !ip_addr_isbroadcast(¤t_iphdr_dest, inp)) #endif /* IP_SOF_BROADCAST_RECV */ { /* receive callback function available? */ if (pcb->recv != NULL) { 802ffb4: 6967 ldr r7, [r4, #20] 802ffb6: b187 cbz r7, 802ffda /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { 802ffb8: 69a0 ldr r0, [r4, #24] 802ffba: 4b11 ldr r3, [pc, #68] ; (8030000 ) 802ffbc: 4621 mov r1, r4 802ffbe: 4632 mov r2, r6 802ffc0: 47b8 blx r7 802ffc2: b150 cbz r0, 802ffda /* receive function ate the packet */ p = NULL; eaten = 1; if (prev != NULL) { 802ffc4: b15d cbz r5, 802ffde /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; 802ffc6: 68e3 ldr r3, [r4, #12] 802ffc8: 60eb str r3, [r5, #12] pcb->next = raw_pcbs; 802ffca: f8d8 3000 ldr.w r3, [r8] raw_pcbs = pcb; 802ffce: f8c8 4000 str.w r4, [r8] eaten = 1; if (prev != NULL) { /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; pcb->next = raw_pcbs; 802ffd2: 60e3 str r3, [r4, #12] /* receive callback function available? */ if (pcb->recv != NULL) { /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { /* receive function ate the packet */ p = NULL; 802ffd4: 2600 movs r6, #0 eaten = 1; 802ffd6: 2301 movs r3, #1 802ffd8: e003 b.n 802ffe2 pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { if ((pcb->protocol == proto) && (ip_addr_isany(&pcb->local_ip) || 802ffda: 2300 movs r3, #0 802ffdc: e001 b.n 802ffe2 if (pcb->recv != NULL) { /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { /* receive function ate the packet */ p = NULL; eaten = 1; 802ffde: 2301 movs r3, #1 /* receive callback function available? */ if (pcb->recv != NULL) { /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { /* receive function ate the packet */ p = NULL; 802ffe0: 462e mov r6, r5 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 802ffe2: 68e2 ldr r2, [r4, #12] 802ffe4: 4625 mov r5, r4 prev = NULL; pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { 802ffe6: b92b cbnz r3, 802fff4 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 802ffe8: 4614 mov r4, r2 prev = NULL; pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { 802ffea: 2c00 cmp r4, #0 802ffec: d1d9 bne.n 802ffa2 802ffee: 4620 mov r0, r4 802fff0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802fff4: 2001 movs r0, #1 } prev = pcb; pcb = pcb->next; } return eaten; } 802fff6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802fffa: bf00 nop 802fffc: 2000c42c .word 0x2000c42c 8030000: 2000ff40 .word 0x2000ff40 8030004: 2000ff48 .word 0x2000ff48 08030008 : LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(err); return ERR_ABRT; } 8030008: f06f 0009 mvn.w r0, #9 803000c: 4770 bx lr 803000e: 0000 movs r0, r0 08030010 : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 8030010: 4b13 ldr r3, [pc, #76] ; (8030060 ) 8030012: b570 push {r4, r5, r6, lr} 8030014: 8818 ldrh r0, [r3, #0] if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { tcp_port = TCP_LOCAL_PORT_RANGE_START; } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { for(pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 8030016: 4d13 ldr r5, [pc, #76] ; (8030064 ) * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 8030018: f44f 4280 mov.w r2, #16384 ; 0x4000 u8_t i; u16_t n = 0; struct tcp_pcb *pcb; again: if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { 803001c: f64f 74ff movw r4, #65535 ; 0xffff 8030020: 42a0 cmp r0, r4 8030022: d002 beq.n 803002a 8030024: 3001 adds r0, #1 8030026: b280 uxth r0, r0 8030028: e001 b.n 803002e tcp_port = TCP_LOCAL_PORT_RANGE_START; 803002a: f44f 4040 mov.w r0, #49152 ; 0xc000 803002e: 2300 movs r3, #0 } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { for(pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 8030030: 5959 ldr r1, [r3, r5] 8030032: 6809 ldr r1, [r1, #0] 8030034: e00b b.n 803004e if (pcb->local_port == tcp_port) { 8030036: 8b4e ldrh r6, [r1, #26] 8030038: 4286 cmp r6, r0 803003a: d107 bne.n 803004c 803003c: 3a01 subs r2, #1 803003e: b292 uxth r2, r2 if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 8030040: 2a00 cmp r2, #0 8030042: d1ed bne.n 8030020 8030044: 4b06 ldr r3, [pc, #24] ; (8030060 ) 8030046: 8018 strh r0, [r3, #0] return 0; 8030048: 4610 mov r0, r2 803004a: bd70 pop {r4, r5, r6, pc} if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { tcp_port = TCP_LOCAL_PORT_RANGE_START; } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { for(pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 803004c: 68c9 ldr r1, [r1, #12] 803004e: 2900 cmp r1, #0 8030050: d1f1 bne.n 8030036 8030052: 3304 adds r3, #4 again: if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { tcp_port = TCP_LOCAL_PORT_RANGE_START; } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 8030054: 2b10 cmp r3, #16 8030056: d1eb bne.n 8030030 8030058: 4b01 ldr r3, [pc, #4] ; (8030060 ) 803005a: 8018 strh r0, [r3, #0] goto again; } } } return tcp_port; } 803005c: bd70 pop {r4, r5, r6, pc} 803005e: bf00 nop 8030060: 2000072c .word 0x2000072c 8030064: 0804471c .word 0x0804471c 08030068 : /** * Initialize this module. */ void tcp_init(void) { 8030068: 4770 bx lr 803006a: 0000 movs r0, r0 0803006c : * ERR_VAL if bind failed because the PCB is not in a valid state * ERR_OK if bound */ err_t tcp_bind(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 803006c: b5f8 push {r3, r4, r5, r6, r7, lr} int i; int max_pcb_list = NUM_TCP_PCB_LISTS; struct tcp_pcb *cpcb; LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); 803006e: 7e03 ldrb r3, [r0, #24] * ERR_VAL if bind failed because the PCB is not in a valid state * ERR_OK if bound */ err_t tcp_bind(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8030070: 4604 mov r4, r0 8030072: 460d mov r5, r1 int i; int max_pcb_list = NUM_TCP_PCB_LISTS; struct tcp_pcb *cpcb; LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); 8030074: bb33 cbnz r3, 80300c4 if (ip_get_option(pcb, SOF_REUSEADDR)) { max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; } #endif /* SO_REUSE */ if (port == 0) { 8030076: b91a cbnz r2, 8030080 port = tcp_new_port(); 8030078: f7ff ffca bl 8030010 if (port == 0) { 803007c: 4602 mov r2, r0 803007e: b318 cbz r0, 80300c8 } } /* Check if the address already is in use (on all lists) */ for (i = 0; i < max_pcb_list; i++) { for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { 8030080: 4f14 ldr r7, [pc, #80] ; (80300d4 ) * ERR_VAL if bind failed because the PCB is not in a valid state * ERR_OK if bound */ err_t tcp_bind(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8030082: 2100 movs r1, #0 } } /* Check if the address already is in use (on all lists) */ for (i = 0; i < max_pcb_list; i++) { for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { 8030084: 59cb ldr r3, [r1, r7] 8030086: 681b ldr r3, [r3, #0] 8030088: e00a b.n 80300a0 if (cpcb->local_port == port) { 803008a: 8b58 ldrh r0, [r3, #26] 803008c: 4290 cmp r0, r2 803008e: d106 bne.n 803009e tcp_connect. */ if (!ip_get_option(pcb, SOF_REUSEADDR) || !ip_get_option(cpcb, SOF_REUSEADDR)) #endif /* SO_REUSE */ { if (ip_addr_isany(&(cpcb->local_ip)) || 8030090: 681e ldr r6, [r3, #0] 8030092: b1de cbz r6, 80300cc 8030094: b1d5 cbz r5, 80300cc ip_addr_isany(ipaddr) || 8030096: 6828 ldr r0, [r5, #0] 8030098: b1c0 cbz r0, 80300cc 803009a: 4286 cmp r6, r0 803009c: d016 beq.n 80300cc } } /* Check if the address already is in use (on all lists) */ for (i = 0; i < max_pcb_list; i++) { for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { 803009e: 68db ldr r3, [r3, #12] 80300a0: 2b00 cmp r3, #0 80300a2: d1f2 bne.n 803008a 80300a4: 3104 adds r1, #4 return ERR_BUF; } } /* Check if the address already is in use (on all lists) */ for (i = 0; i < max_pcb_list; i++) { 80300a6: 2910 cmp r1, #16 80300a8: d1ec bne.n 8030084 } } } } if (!ip_addr_isany(ipaddr)) { 80300aa: b115 cbz r5, 80300b2 80300ac: 682b ldr r3, [r5, #0] 80300ae: b103 cbz r3, 80300b2 pcb->local_ip = *ipaddr; 80300b0: 6023 str r3, [r4, #0] } pcb->local_port = port; TCP_REG(&tcp_bound_pcbs, pcb); 80300b2: 4b09 ldr r3, [pc, #36] ; (80300d8 ) } if (!ip_addr_isany(ipaddr)) { pcb->local_ip = *ipaddr; } pcb->local_port = port; 80300b4: 8362 strh r2, [r4, #26] TCP_REG(&tcp_bound_pcbs, pcb); 80300b6: 681a ldr r2, [r3, #0] 80300b8: 601c str r4, [r3, #0] 80300ba: 60e2 str r2, [r4, #12] 80300bc: f002 f8de bl 803227c LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; 80300c0: 2000 movs r0, #0 80300c2: e004 b.n 80300ce { int i; int max_pcb_list = NUM_TCP_PCB_LISTS; struct tcp_pcb *cpcb; LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); 80300c4: 20fa movs r0, #250 ; 0xfa 80300c6: e002 b.n 80300ce #endif /* SO_REUSE */ if (port == 0) { port = tcp_new_port(); if (port == 0) { return ERR_BUF; 80300c8: 20fe movs r0, #254 ; 0xfe 80300ca: e000 b.n 80300ce #endif /* SO_REUSE */ { if (ip_addr_isany(&(cpcb->local_ip)) || ip_addr_isany(ipaddr) || ip_addr_cmp(&(cpcb->local_ip), ipaddr)) { return ERR_USE; 80300cc: 20f8 movs r0, #248 ; 0xf8 } pcb->local_port = port; TCP_REG(&tcp_bound_pcbs, pcb); LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; } 80300ce: b240 sxtb r0, r0 80300d0: bdf8 pop {r3, r4, r5, r6, r7, pc} 80300d2: bf00 nop 80300d4: 0804471c .word 0x0804471c 80300d8: 2000ff30 .word 0x2000ff30 080300dc : * called like this: * tpcb = tcp_listen(tpcb); */ struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { 80300dc: b538 push {r3, r4, r5, lr} struct tcp_pcb_listen *lpcb; LWIP_UNUSED_ARG(backlog); LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, return NULL); 80300de: 7e03 ldrb r3, [r0, #24] * called like this: * tpcb = tcp_listen(tpcb); */ struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { 80300e0: 4604 mov r4, r0 struct tcp_pcb_listen *lpcb; LWIP_UNUSED_ARG(backlog); LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, return NULL); 80300e2: b10b cbz r3, 80300e8 80300e4: 2000 movs r0, #0 80300e6: bd38 pop {r3, r4, r5, pc} } } } } #endif /* SO_REUSE */ lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN); 80300e8: 2003 movs r0, #3 80300ea: f7ff fcad bl 802fa48 if (lpcb == NULL) { 80300ee: 4605 mov r5, r0 80300f0: 2800 cmp r0, #0 80300f2: d0f7 beq.n 80300e4 return NULL; } lpcb->callback_arg = pcb->callback_arg; 80300f4: 6923 ldr r3, [r4, #16] 80300f6: 6103 str r3, [r0, #16] lpcb->local_port = pcb->local_port; 80300f8: 8b63 ldrh r3, [r4, #26] 80300fa: 8343 strh r3, [r0, #26] lpcb->state = LISTEN; 80300fc: 2301 movs r3, #1 80300fe: 7603 strb r3, [r0, #24] lpcb->prio = pcb->prio; 8030100: 7e63 ldrb r3, [r4, #25] 8030102: 7643 strb r3, [r0, #25] lpcb->so_options = pcb->so_options; ip_set_option(lpcb, SOF_ACCEPTCONN); 8030104: 7a23 ldrb r3, [r4, #8] 8030106: f043 0302 orr.w r3, r3, #2 803010a: 7203 strb r3, [r0, #8] lpcb->ttl = pcb->ttl; 803010c: 7aa3 ldrb r3, [r4, #10] 803010e: 7283 strb r3, [r0, #10] lpcb->tos = pcb->tos; 8030110: 7a63 ldrb r3, [r4, #9] 8030112: 7243 strb r3, [r0, #9] ip_addr_copy(lpcb->local_ip, pcb->local_ip); 8030114: 6823 ldr r3, [r4, #0] 8030116: 6003 str r3, [r0, #0] if (pcb->local_port != 0) { 8030118: 8b63 ldrh r3, [r4, #26] 803011a: b1ab cbz r3, 8030148 TCP_RMV(&tcp_bound_pcbs, pcb); 803011c: 4a11 ldr r2, [pc, #68] ; (8030164 ) 803011e: 6813 ldr r3, [r2, #0] 8030120: 42a3 cmp r3, r4 8030122: d101 bne.n 8030128 8030124: 68e3 ldr r3, [r4, #12] 8030126: e00c b.n 8030142 8030128: 4a0f ldr r2, [pc, #60] ; (8030168 ) 803012a: 6013 str r3, [r2, #0] 803012c: e007 b.n 803013e 803012e: 68d9 ldr r1, [r3, #12] 8030130: 42a1 cmp r1, r4 8030132: d103 bne.n 803013c 8030134: 6013 str r3, [r2, #0] 8030136: 68e2 ldr r2, [r4, #12] 8030138: 60da str r2, [r3, #12] 803013a: e003 b.n 8030144 803013c: 460b mov r3, r1 803013e: 2b00 cmp r3, #0 8030140: d1f5 bne.n 803012e 8030142: 6013 str r3, [r2, #0] 8030144: 2300 movs r3, #0 8030146: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 8030148: 2002 movs r0, #2 803014a: 4621 mov r1, r4 803014c: f7ff fc92 bl 802fa74 #if LWIP_CALLBACK_API lpcb->accept = tcp_accept_null; 8030150: 4b06 ldr r3, [pc, #24] ; (803016c ) 8030152: 616b str r3, [r5, #20] #endif /* LWIP_CALLBACK_API */ #if TCP_LISTEN_BACKLOG lpcb->accepts_pending = 0; lpcb->backlog = (backlog ? backlog : 1); #endif /* TCP_LISTEN_BACKLOG */ TCP_REG(&tcp_listen_pcbs.pcbs, (struct tcp_pcb *)lpcb); 8030154: 4b06 ldr r3, [pc, #24] ; (8030170 ) 8030156: 681a ldr r2, [r3, #0] 8030158: 601d str r5, [r3, #0] 803015a: 60ea str r2, [r5, #12] 803015c: f002 f88e bl 803227c return (struct tcp_pcb *)lpcb; 8030160: 4628 mov r0, r5 } 8030162: bd38 pop {r3, r4, r5, pc} 8030164: 2000ff30 .word 0x2000ff30 8030168: 2000ff2c .word 0x2000ff2c 803016c: 08030009 .word 0x08030009 8030170: 2000ff28 .word 0x2000ff28 08030174 : * * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { 8030174: b530 push {r4, r5, lr} u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 8030176: 6b01 ldr r1, [r0, #48] ; 0x30 * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 8030178: 8d84 ldrh r4, [r0, #44] ; 0x2c if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 803017a: 8ec5 ldrh r5, [r0, #54] ; 0x36 * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 803017c: 6a82 ldr r2, [r0, #40] ; 0x28 * * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { 803017e: 4603 mov r3, r0 u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 8030180: f640 3068 movw r0, #2920 ; 0xb68 8030184: 4285 cmp r5, r0 8030186: bf28 it cs 8030188: 4605 movcs r5, r0 * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 803018a: 1a60 subs r0, r4, r1 if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 803018c: 1880 adds r0, r0, r2 803018e: 1b45 subs r5, r0, r5 8030190: 2d00 cmp r5, #0 8030192: db01 blt.n 8030198 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 8030194: 85dc strh r4, [r3, #46] ; 0x2e return new_right_edge - pcb->rcv_ann_right_edge; 8030196: bd30 pop {r4, r5, pc} } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 8030198: 1a50 subs r0, r2, r1 803019a: 2800 cmp r0, #0 803019c: f04f 0000 mov.w r0, #0 80301a0: dd01 ble.n 80301a6 /* Can happen due to other end sending out of advertised window, * but within actual available (but not yet advertised) window */ pcb->rcv_ann_wnd = 0; 80301a2: 85d8 strh r0, [r3, #46] ; 0x2e 80301a4: bd30 pop {r4, r5, pc} } else { /* keep the right edge of window constant */ u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; 80301a6: 1a8a subs r2, r1, r2 LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); pcb->rcv_ann_wnd = (u16_t)new_rcv_ann_wnd; 80301a8: 85da strh r2, [r3, #46] ; 0x2e } return 0; } } 80301aa: bd30 pop {r4, r5, pc} 080301ac : LWIP_ASSERT("don't call tcp_recved for listen-pcbs", pcb->state != LISTEN); LWIP_ASSERT("tcp_recved: len would wrap rcv_wnd\n", len <= 0xffff - pcb->rcv_wnd ); pcb->rcv_wnd += len; 80301ac: 8d83 ldrh r3, [r0, #44] ; 0x2c 80301ae: 18c9 adds r1, r1, r3 80301b0: b289 uxth r1, r1 if (pcb->rcv_wnd > TCP_WND) { 80301b2: f241 63d0 movw r3, #5840 ; 0x16d0 80301b6: 4299 cmp r1, r3 * @param pcb the tcp_pcb for which data is read * @param len the amount of bytes that have been read by the application */ void tcp_recved(struct tcp_pcb *pcb, u16_t len) { 80301b8: b510 push {r4, lr} LWIP_ASSERT("tcp_recved: len would wrap rcv_wnd\n", len <= 0xffff - pcb->rcv_wnd ); pcb->rcv_wnd += len; if (pcb->rcv_wnd > TCP_WND) { pcb->rcv_wnd = TCP_WND; 80301ba: bf8c ite hi 80301bc: 8583 strhhi r3, [r0, #44] ; 0x2c LWIP_ASSERT("don't call tcp_recved for listen-pcbs", pcb->state != LISTEN); LWIP_ASSERT("tcp_recved: len would wrap rcv_wnd\n", len <= 0xffff - pcb->rcv_wnd ); pcb->rcv_wnd += len; 80301be: 8581 strhls r1, [r0, #44] ; 0x2c * @param pcb the tcp_pcb for which data is read * @param len the amount of bytes that have been read by the application */ void tcp_recved(struct tcp_pcb *pcb, u16_t len) { 80301c0: 4604 mov r4, r0 pcb->rcv_wnd += len; if (pcb->rcv_wnd > TCP_WND) { pcb->rcv_wnd = TCP_WND; } wnd_inflation = tcp_update_rcv_ann_wnd(pcb); 80301c2: f7ff ffd7 bl 8030174 /* If the change in the right edge of window is significant (default * watermark is TCP_WND/4), then send an explicit update now. * Otherwise wait for a packet to be sent in the normal course of * events (or more window to be available later) */ if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { 80301c6: f240 53b3 movw r3, #1459 ; 0x5b3 80301ca: 4298 cmp r0, r3 80301cc: dd08 ble.n 80301e0 tcp_ack_now(pcb); 80301ce: 7fa3 ldrb r3, [r4, #30] tcp_output(pcb); 80301d0: 4620 mov r0, r4 /* If the change in the right edge of window is significant (default * watermark is TCP_WND/4), then send an explicit update now. * Otherwise wait for a packet to be sent in the normal course of * events (or more window to be available later) */ if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { tcp_ack_now(pcb); 80301d2: f043 0302 orr.w r3, r3, #2 80301d6: 77a3 strb r3, [r4, #30] tcp_output(pcb); } LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: recveived %"U16_F" bytes, wnd %"U16_F" (%"U16_F").\n", len, pcb->rcv_wnd, TCP_WND - pcb->rcv_wnd)); } 80301d8: e8bd 4010 ldmia.w sp!, {r4, lr} * watermark is TCP_WND/4), then send an explicit update now. * Otherwise wait for a packet to be sent in the normal course of * events (or more window to be available later) */ if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { tcp_ack_now(pcb); tcp_output(pcb); 80301dc: f001 bd90 b.w 8031d00 80301e0: bd10 pop {r4, pc} 080301e2 : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 80301e2: b510 push {r4, lr} if (seg != NULL) { 80301e4: 4604 mov r4, r0 80301e6: b148 cbz r0, 80301fc if (seg->p != NULL) { 80301e8: 6840 ldr r0, [r0, #4] 80301ea: b108 cbz r0, 80301f0 pbuf_free(seg->p); 80301ec: f7ff fd4c bl 802fc88 #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 80301f0: 2004 movs r0, #4 80301f2: 4621 mov r1, r4 } } 80301f4: e8bd 4010 ldmia.w sp!, {r4, lr} pbuf_free(seg->p); #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 80301f8: f7ff bc3c b.w 802fa74 80301fc: bd10 pop {r4, pc} 080301fe : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 80301fe: b510 push {r4, lr} while (seg != NULL) { 8030200: e003 b.n 803020a struct tcp_seg *next = seg->next; 8030202: 6804 ldr r4, [r0, #0] tcp_seg_free(seg); 8030204: f7ff ffed bl 80301e2 seg = next; 8030208: 4620 mov r0, r4 * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { while (seg != NULL) { 803020a: 2800 cmp r0, #0 803020c: d1f9 bne.n 8030202 struct tcp_seg *next = seg->next; tcp_seg_free(seg); seg = next; } } 803020e: bd10 pop {r4, pc} 08030210 : void tcp_arg(struct tcp_pcb *pcb, void *arg) { /* This function is allowed to be called for both listen pcbs and connection pcbs. */ pcb->callback_arg = arg; 8030210: 6101 str r1, [r0, #16] 8030212: 4770 bx lr 08030214 : */ void tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) { LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); pcb->recv = recv; 8030214: 67c1 str r1, [r0, #124] ; 0x7c 8030216: 4770 bx lr 08030218 : */ void tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) { LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); pcb->sent = sent; 8030218: 6781 str r1, [r0, #120] ; 0x78 803021a: 4770 bx lr 0803021c : */ void tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) { LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); pcb->errf = err; 803021c: f8c0 1088 str.w r1, [r0, #136] ; 0x88 8030220: 4770 bx lr 08030222 : void tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept) { /* This function is allowed to be called for both listen pcbs and connection pcbs. */ pcb->accept = accept; 8030222: 6141 str r1, [r0, #20] 8030224: 4770 bx lr 08030226 : void tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) { LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); #if LWIP_CALLBACK_API pcb->poll = poll; 8030226: f8c0 1084 str.w r1, [r0, #132] ; 0x84 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 803022a: f880 2020 strb.w r2, [r0, #32] 803022e: 4770 bx lr 08030230 : * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { if (pcb->state != CLOSED && 8030230: 7e03 ldrb r3, [r0, #24] * * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { 8030232: b510 push {r4, lr} 8030234: 4604 mov r4, r0 if (pcb->state != CLOSED && 8030236: b1bb cbz r3, 8030268 8030238: 2b0a cmp r3, #10 803023a: d015 beq.n 8030268 pcb->state != TIME_WAIT && 803023c: 2b01 cmp r3, #1 803023e: d013 beq.n 8030268 } } #endif /* TCP_LISTEN_BACKLOG */ if (pcb->refused_data != NULL) { 8030240: 6f40 ldr r0, [r0, #116] ; 0x74 8030242: b118 cbz r0, 803024c LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 8030244: f7ff fd20 bl 802fc88 pcb->refused_data = NULL; 8030248: 2300 movs r3, #0 803024a: 6763 str r3, [r4, #116] ; 0x74 pcb->ooseq = NULL; #endif /* TCP_QUEUE_OOSEQ */ /* Stop the retransmission timer as it will expect data on unacked queue if it fires */ pcb->rtime = -1; 803024c: f64f 73ff movw r3, #65535 ; 0xffff 8030250: 86a3 strh r3, [r4, #52] ; 0x34 tcp_segs_free(pcb->unsent); 8030252: 6ee0 ldr r0, [r4, #108] ; 0x6c 8030254: f7ff ffd3 bl 80301fe tcp_segs_free(pcb->unacked); 8030258: 6f20 ldr r0, [r4, #112] ; 0x70 803025a: f7ff ffd0 bl 80301fe pcb->unacked = pcb->unsent = NULL; 803025e: 2300 movs r3, #0 8030260: 66e3 str r3, [r4, #108] ; 0x6c 8030262: 6723 str r3, [r4, #112] ; 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 8030264: f8a4 306a strh.w r3, [r4, #106] ; 0x6a 8030268: bd10 pop {r4, pc} 803026a: 0000 movs r0, r0 0803026c : u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 803026c: 4b9c ldr r3, [pc, #624] ; (80304e0 ) * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 803026e: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 8030272: 681a ldr r2, [r3, #0] err_arg = pcb->callback_arg; pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); tcp_active_pcbs_changed = 0; 8030274: f8df 8284 ldr.w r8, [pc, #644] ; 80304fc u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 8030278: 3201 adds r2, #1 803027a: 601a str r2, [r3, #0] ++tcp_timer_ctr; 803027c: 4b99 ldr r3, [pc, #612] ; (80304e4 ) 803027e: 781a ldrb r2, [r3, #0] 8030280: 3201 adds r2, #1 8030282: 701a strb r2, [r3, #0] 8030284: 46c1 mov r9, r8 tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 8030286: 4b98 ldr r3, [pc, #608] ; (80304e8 ) while (pcb != NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); if (pcb->last_timer == tcp_timer_ctr) { 8030288: f8df a258 ldr.w sl, [pc, #600] ; 80304e4 ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 803028c: 681c ldr r4, [r3, #0] ++tcp_ticks; ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; 803028e: 2600 movs r6, #0 pcb = tcp_active_pcbs; if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 8030290: e0ff b.n 8030492 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); if (pcb->last_timer == tcp_timer_ctr) { 8030292: f89a 3000 ldrb.w r3, [sl] 8030296: f894 2021 ldrb.w r2, [r4, #33] ; 0x21 803029a: 429a cmp r2, r3 803029c: d101 bne.n 80302a2 /* skip this pcb, we have already processed it */ pcb = pcb->next; 803029e: 68e7 ldr r7, [r4, #12] continue; 80302a0: e0f6 b.n 8030490 pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 80302a2: 7e21 ldrb r1, [r4, #24] if (pcb->last_timer == tcp_timer_ctr) { /* skip this pcb, we have already processed it */ pcb = pcb->next; continue; } pcb->last_timer = tcp_timer_ctr; 80302a4: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 80302a8: 2902 cmp r1, #2 80302aa: f894 2046 ldrb.w r2, [r4, #70] ; 0x46 80302ae: d101 bne.n 80302b4 80302b0: 2a06 cmp r2, #6 80302b2: d051 beq.n 8030358 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); } else if (pcb->nrtx == TCP_MAXRTX) { 80302b4: 2a0c cmp r2, #12 80302b6: d04f beq.n 8030358 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { 80302b8: f894 3091 ldrb.w r3, [r4, #145] ; 0x91 80302bc: b1c3 cbz r3, 80302f0 /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 80302be: 498b ldr r1, [pc, #556] ; (80304ec ) LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; 80302c0: f894 2090 ldrb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 80302c4: 18c9 adds r1, r1, r3 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; 80302c6: 3201 adds r2, #1 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 80302c8: f811 1c01 ldrb.w r1, [r1, #-1] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; 80302cc: b2d2 uxtb r2, r2 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 80302ce: 4291 cmp r1, r2 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; 80302d0: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 80302d4: d900 bls.n 80302d8 80302d6: e03d b.n 8030354 pcb->persist_cnt = 0; 80302d8: 2200 movs r2, #0 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 80302da: 2b06 cmp r3, #6 if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { pcb->persist_cnt = 0; 80302dc: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 80302e0: d802 bhi.n 80302e8 pcb->persist_backoff++; 80302e2: 3301 adds r3, #1 80302e4: f884 3091 strb.w r3, [r4, #145] ; 0x91 } tcp_zero_window_probe(pcb); 80302e8: 4620 mov r0, r4 80302ea: f001 ff04 bl 80320f6 80302ee: e031 b.n 8030354 } } else { /* Increase the retransmission timer if it is running */ if(pcb->rtime >= 0) { 80302f0: 8ea3 ldrh r3, [r4, #52] ; 0x34 80302f2: 0418 lsls r0, r3, #16 80302f4: d401 bmi.n 80302fa ++pcb->rtime; 80302f6: 3301 adds r3, #1 80302f8: 86a3 strh r3, [r4, #52] ; 0x34 } if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { 80302fa: 6f23 ldr r3, [r4, #112] ; 0x70 80302fc: b353 cbz r3, 8030354 80302fe: f9b4 0034 ldrsh.w r0, [r4, #52] ; 0x34 8030302: f9b4 3044 ldrsh.w r3, [r4, #68] ; 0x44 8030306: 4298 cmp r0, r3 8030308: db24 blt.n 8030354 " pcb->rto %"S16_F"\n", pcb->rtime, pcb->rto)); /* Double retransmission time-out unless we are trying to * connect to somebody (i.e., we are in SYN_SENT). */ if (pcb->state != SYN_SENT) { 803030a: 2902 cmp r1, #2 803030c: d00b beq.n 8030326 pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx]; 803030e: f9b4 1040 ldrsh.w r1, [r4, #64] ; 0x40 8030312: f9b4 3042 ldrsh.w r3, [r4, #66] ; 0x42 8030316: eb03 03e1 add.w r3, r3, r1, asr #3 803031a: 4975 ldr r1, [pc, #468] ; (80304f0 ) 803031c: 5c8a ldrb r2, [r1, r2] 803031e: fa03 f302 lsl.w r3, r3, r2 8030322: f8a4 3044 strh.w r3, [r4, #68] ; 0x44 } /* Reset the retransmission timer. */ pcb->rtime = 0; 8030326: 2300 movs r3, #0 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 8030328: f8b4 104c ldrh.w r1, [r4, #76] ; 0x4c if (pcb->state != SYN_SENT) { pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx]; } /* Reset the retransmission timer. */ pcb->rtime = 0; 803032c: 86a3 strh r3, [r4, #52] ; 0x34 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 803032e: f8b4 3060 ldrh.w r3, [r4, #96] ; 0x60 pcb->ssthresh = eff_wnd >> 1; 8030332: 4299 cmp r1, r3 8030334: bf28 it cs 8030336: 4619 movcs r1, r3 if (pcb->ssthresh < (pcb->mss << 1)) { 8030338: 8ee3 ldrh r3, [r4, #54] ; 0x36 /* Reset the retransmission timer. */ pcb->rtime = 0; /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); pcb->ssthresh = eff_wnd >> 1; 803033a: 0849 lsrs r1, r1, #1 if (pcb->ssthresh < (pcb->mss << 1)) { 803033c: 005a lsls r2, r3, #1 803033e: 4291 cmp r1, r2 /* Reset the retransmission timer. */ pcb->rtime = 0; /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); pcb->ssthresh = eff_wnd >> 1; 8030340: f8a4 104e strh.w r1, [r4, #78] ; 0x4e if (pcb->ssthresh < (pcb->mss << 1)) { pcb->ssthresh = (pcb->mss << 1); } pcb->cwnd = pcb->mss; 8030344: f8a4 304c strh.w r3, [r4, #76] ; 0x4c /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); pcb->ssthresh = eff_wnd >> 1; if (pcb->ssthresh < (pcb->mss << 1)) { pcb->ssthresh = (pcb->mss << 1); 8030348: bfb8 it lt 803034a: f8a4 204e strhlt.w r2, [r4, #78] ; 0x4e " ssthresh %"U16_F"\n", pcb->cwnd, pcb->ssthresh)); /* The following needs to be called AFTER cwnd is set to one mss - STJ */ tcp_rexmit_rto(pcb); 803034e: 4620 mov r0, r4 8030350: f001 fe40 bl 8031fd4 pcb = pcb->next; continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; 8030354: 2500 movs r5, #0 8030356: e000 b.n 803035a pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { ++pcb_remove; 8030358: 2501 movs r5, #1 tcp_rexmit_rto(pcb); } } } /* Check if this PCB has stayed too long in FIN-WAIT-2 */ if (pcb->state == FIN_WAIT_2) { 803035a: 7e23 ldrb r3, [r4, #24] 803035c: 2b06 cmp r3, #6 803035e: d10c bne.n 803037a /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ if (pcb->flags & TF_RXCLOSED) { 8030360: 7fa2 ldrb r2, [r4, #30] 8030362: f002 0210 and.w r2, r2, #16 8030366: b2d2 uxtb r2, r2 8030368: b13a cbz r2, 803037a /* PCB was fully closed (either through close() or SHUT_RDWR): normal FIN-WAIT timeout handling. */ if ((u32_t)(tcp_ticks - pcb->tmr) > 803036a: 4a5d ldr r2, [pc, #372] ; (80304e0 ) 803036c: 6811 ldr r1, [r2, #0] 803036e: 6a62 ldr r2, [r4, #36] ; 0x24 8030370: 1a8a subs r2, r1, r2 8030372: 2a28 cmp r2, #40 ; 0x28 8030374: d901 bls.n 803037a TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 8030376: 3501 adds r5, #1 8030378: b2ed uxtb r5, r5 } } } /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && 803037a: 7a27 ldrb r7, [r4, #8] 803037c: f007 0708 and.w r7, r7, #8 8030380: b2ff uxtb r7, r7 8030382: b34f cbz r7, 80303d8 8030384: 2b04 cmp r3, #4 8030386: d001 beq.n 803038c ((pcb->state == ESTABLISHED) || 8030388: 2b07 cmp r3, #7 803038a: d124 bne.n 80303d6 (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 803038c: 4b54 ldr r3, [pc, #336] ; (80304e0 ) (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 803038e: f8d4 008c ldr.w r0, [r4, #140] ; 0x8c /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 8030392: 681a ldr r2, [r3, #0] 8030394: 6a63 ldr r3, [r4, #36] ; 0x24 8030396: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 8030398: f500 2324 add.w r3, r0, #671744 ; 0xa4000 803039c: f603 43b8 addw r3, r3, #3256 ; 0xcb8 80303a0: f44f 71fa mov.w r1, #500 ; 0x1f4 80303a4: fbb3 f3f1 udiv r3, r3, r1 /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 80303a8: 429a cmp r2, r3 80303aa: d903 bls.n 80303b4 { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to %"U16_F".%"U16_F".%"U16_F".%"U16_F".\n", ip4_addr1_16(&pcb->remote_ip), ip4_addr2_16(&pcb->remote_ip), ip4_addr3_16(&pcb->remote_ip), ip4_addr4_16(&pcb->remote_ip))); ++pcb_remove; 80303ac: 3501 adds r5, #1 80303ae: b2ed uxtb r5, r5 ++pcb_reset; 80303b0: 2701 movs r7, #1 80303b2: e011 b.n 80303d8 } else if((u32_t)(tcp_ticks - pcb->tmr) > (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 80303b4: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 80303b8: 4f4e ldr r7, [pc, #312] ; (80304f4 ) 80303ba: fb07 0003 mla r0, r7, r3, r0 / TCP_SLOW_INTERVAL) 80303be: fbb0 f1f1 udiv r1, r0, r1 ip4_addr3_16(&pcb->remote_ip), ip4_addr4_16(&pcb->remote_ip))); ++pcb_remove; ++pcb_reset; } else if((u32_t)(tcp_ticks - pcb->tmr) > 80303c2: 428a cmp r2, r1 80303c4: d907 bls.n 80303d6 (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) / TCP_SLOW_INTERVAL) { tcp_keepalive(pcb); 80303c6: 4620 mov r0, r4 80303c8: f001 fe76 bl 80320b8 pcb->keep_cnt_sent++; 80303cc: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 80303d0: 3301 adds r3, #1 80303d2: f884 3092 strb.w r3, [r4, #146] ; 0x92 continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; 80303d6: 2700 movs r7, #0 LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n")); } #endif /* TCP_QUEUE_OOSEQ */ /* Check if this PCB has stayed too long in SYN-RCVD */ if (pcb->state == SYN_RCVD) { 80303d8: 7e23 ldrb r3, [r4, #24] 80303da: 2b03 cmp r3, #3 80303dc: d108 bne.n 80303f0 if ((u32_t)(tcp_ticks - pcb->tmr) > 80303de: 4b40 ldr r3, [pc, #256] ; (80304e0 ) 80303e0: 681a ldr r2, [r3, #0] 80303e2: 6a63 ldr r3, [r4, #36] ; 0x24 80303e4: 1ad3 subs r3, r2, r3 80303e6: 2b28 cmp r3, #40 ; 0x28 80303e8: d90a bls.n 8030400 TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 80303ea: 3501 adds r5, #1 80303ec: b2ed uxtb r5, r5 80303ee: e007 b.n 8030400 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n")); } } /* Check if this PCB has stayed too long in LAST-ACK */ if (pcb->state == LAST_ACK) { 80303f0: 2b09 cmp r3, #9 80303f2: d105 bne.n 8030400 if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 80303f4: 4b3a ldr r3, [pc, #232] ; (80304e0 ) 80303f6: 681a ldr r2, [r3, #0] 80303f8: 6a63 ldr r3, [r4, #36] ; 0x24 80303fa: 1ad3 subs r3, r2, r3 80303fc: 2bf0 cmp r3, #240 ; 0xf0 80303fe: d800 bhi.n 8030402 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); } } /* If the PCB should be removed, do it. */ if (pcb_remove) { 8030400: b345 cbz r5, 8030454 struct tcp_pcb *pcb2; tcp_err_fn err_fn; void *err_arg; tcp_pcb_purge(pcb); 8030402: 4620 mov r0, r4 8030404: f7ff ff14 bl 8030230 8030408: 68e3 ldr r3, [r4, #12] /* Remove PCB from tcp_active_pcbs list. */ if (prev != NULL) { 803040a: b10e cbz r6, 8030410 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); prev->next = pcb->next; 803040c: 60f3 str r3, [r6, #12] 803040e: e001 b.n 8030414 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); tcp_active_pcbs = pcb->next; 8030410: 4a35 ldr r2, [pc, #212] ; (80304e8 ) 8030412: 6013 str r3, [r2, #0] } if (pcb_reset) { 8030414: b14f cbz r7, 803042a tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 8030416: 8b63 ldrh r3, [r4, #26] 8030418: 9300 str r3, [sp, #0] 803041a: 8ba3 ldrh r3, [r4, #28] 803041c: 9301 str r3, [sp, #4] 803041e: 6d20 ldr r0, [r4, #80] ; 0x50 8030420: 6aa1 ldr r1, [r4, #40] ; 0x28 8030422: 4622 mov r2, r4 8030424: 1d23 adds r3, r4, #4 8030426: f001 fd8f bl 8031f48 pcb->local_port, pcb->remote_port); } err_fn = pcb->errf; 803042a: f8d4 5088 ldr.w r5, [r4, #136] ; 0x88 err_arg = pcb->callback_arg; 803042e: f8d4 b010 ldr.w fp, [r4, #16] pcb2 = pcb; pcb = pcb->next; 8030432: 68e7 ldr r7, [r4, #12] memp_free(MEMP_TCP_PCB, pcb2); 8030434: 2002 movs r0, #2 8030436: 4621 mov r1, r4 8030438: f7ff fb1c bl 802fa74 tcp_active_pcbs_changed = 0; 803043c: 2300 movs r3, #0 803043e: f888 3000 strb.w r3, [r8] TCP_EVENT_ERR(err_fn, err_arg, ERR_ABRT); 8030442: b11d cbz r5, 803044c 8030444: 4658 mov r0, fp 8030446: f06f 0109 mvn.w r1, #9 803044a: 47a8 blx r5 if (tcp_active_pcbs_changed) { 803044c: f899 3000 ldrb.w r3, [r9] 8030450: b1f3 cbz r3, 8030490 8030452: e718 b.n 8030286 /* get the 'next' element now and work with 'prev' below (in case of abort) */ prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; 8030454: 7fe3 ldrb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 8030456: f894 2020 ldrb.w r2, [r4, #32] goto tcp_slowtmr_start; } } else { /* get the 'next' element now and work with 'prev' below (in case of abort) */ prev = pcb; pcb = pcb->next; 803045a: 68e7 ldr r7, [r4, #12] /* We check if we should poll the connection. */ ++prev->polltmr; 803045c: 3301 adds r3, #1 803045e: b2db uxtb r3, r3 if (prev->polltmr >= prev->pollinterval) { 8030460: 429a cmp r2, r3 /* get the 'next' element now and work with 'prev' below (in case of abort) */ prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; 8030462: 77e3 strb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 8030464: d813 bhi.n 803048e prev->polltmr = 0; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; TCP_EVENT_POLL(prev, err); 8030466: f8d4 3084 ldr.w r3, [r4, #132] ; 0x84 pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; if (prev->polltmr >= prev->pollinterval) { prev->polltmr = 0; 803046a: 77e5 strb r5, [r4, #31] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; 803046c: f888 5000 strb.w r5, [r8] TCP_EVENT_POLL(prev, err); 8030470: b11b cbz r3, 803047a 8030472: 6920 ldr r0, [r4, #16] 8030474: 4621 mov r1, r4 8030476: 4798 blx r3 8030478: e000 b.n 803047c 803047a: 4628 mov r0, r5 if (tcp_active_pcbs_changed) { 803047c: f899 3000 ldrb.w r3, [r9] 8030480: 2b00 cmp r3, #0 8030482: f47f af00 bne.w 8030286 goto tcp_slowtmr_start; } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 8030486: b910 cbnz r0, 803048e tcp_output(prev); 8030488: 4620 mov r0, r4 803048a: f001 fc39 bl 8031d00 TCP_EVENT_POLL(prev, err); if (tcp_active_pcbs_changed) { goto tcp_slowtmr_start; } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 803048e: 4626 mov r6, r4 prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; if (prev->polltmr >= prev->pollinterval) { 8030490: 463c mov r4, r7 prev = NULL; pcb = tcp_active_pcbs; if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 8030492: 2c00 cmp r4, #0 8030494: f47f aefd bne.w 8030292 } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 8030498: 4b17 ldr r3, [pc, #92] ; (80304f8 ) while (pcb != NULL) { LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); pcb_remove = 0; /* Check if this PCB has stayed long enough in TIME-WAIT */ if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 803049a: 4e11 ldr r6, [pc, #68] ; (80304e0 ) } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 803049c: 681d ldr r5, [r3, #0] LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); prev->next = pcb->next; } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; 803049e: 461f mov r7, r3 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 80304a0: e00f b.n 80304c2 LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); pcb_remove = 0; /* Check if this PCB has stayed long enough in TIME-WAIT */ if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 80304a2: 6832 ldr r2, [r6, #0] 80304a4: 6a6b ldr r3, [r5, #36] ; 0x24 80304a6: 1ad3 subs r3, r2, r3 80304a8: 2bf0 cmp r3, #240 ; 0xf0 80304aa: d810 bhi.n 80304ce 80304ac: e00c b.n 80304c8 struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); prev->next = pcb->next; 80304ae: 60e2 str r2, [r4, #12] 80304b0: e000 b.n 80304b4 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; 80304b2: 603a str r2, [r7, #0] } pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); 80304b4: 4629 mov r1, r5 80304b6: 2002 movs r0, #2 /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; } pcb2 = pcb; pcb = pcb->next; 80304b8: f8d5 800c ldr.w r8, [r5, #12] memp_free(MEMP_TCP_PCB, pcb2); 80304bc: f7ff fada bl 802fa74 /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; } pcb2 = pcb; pcb = pcb->next; 80304c0: 4645 mov r5, r8 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 80304c2: 2d00 cmp r5, #0 80304c4: d1ed bne.n 80304a2 80304c6: e009 b.n 80304dc pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); } else { prev = pcb; pcb = pcb->next; 80304c8: 462c mov r4, r5 80304ca: 68ed ldr r5, [r5, #12] 80304cc: e7f9 b.n 80304c2 /* If the PCB should be removed, do it. */ if (pcb_remove) { struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 80304ce: 4628 mov r0, r5 80304d0: f7ff feae bl 8030230 80304d4: 68ea ldr r2, [r5, #12] /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 80304d6: 2c00 cmp r4, #0 80304d8: d1e9 bne.n 80304ae 80304da: e7ea b.n 80304b2 } else { prev = pcb; pcb = pcb->next; } } } 80304dc: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 80304e0: 2000ff24 .word 0x2000ff24 80304e4: 2000c431 .word 0x2000c431 80304e8: 2000ff20 .word 0x2000ff20 80304ec: 08044739 .word 0x08044739 80304f0: 0804472c .word 0x0804472c 80304f4: 000124f8 .word 0x000124f8 80304f8: 2000ff34 .word 0x2000ff34 80304fc: 2000ff1c .word 0x2000ff1c 08030500 : * @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated! */ void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) { TCP_RMV(pcblist, pcb); 8030500: 6803 ldr r3, [r0, #0] 8030502: 428b cmp r3, r1 * @param pcblist PCB list to purge. * @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated! */ void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) { 8030504: b510 push {r4, lr} 8030506: 460c mov r4, r1 TCP_RMV(pcblist, pcb); 8030508: d102 bne.n 8030510 803050a: 68cb ldr r3, [r1, #12] 803050c: 6003 str r3, [r0, #0] 803050e: e00d b.n 803052c 8030510: 4a11 ldr r2, [pc, #68] ; (8030558 ) 8030512: 6013 str r3, [r2, #0] 8030514: e007 b.n 8030526 8030516: 68d9 ldr r1, [r3, #12] 8030518: 42a1 cmp r1, r4 803051a: d103 bne.n 8030524 803051c: 6013 str r3, [r2, #0] 803051e: 68e2 ldr r2, [r4, #12] 8030520: 60da str r2, [r3, #12] 8030522: e003 b.n 803052c 8030524: 460b mov r3, r1 8030526: 2b00 cmp r3, #0 8030528: d1f5 bne.n 8030516 803052a: 6013 str r3, [r2, #0] 803052c: 2300 movs r3, #0 803052e: 60e3 str r3, [r4, #12] tcp_pcb_purge(pcb); 8030530: 4620 mov r0, r4 8030532: f7ff fe7d bl 8030230 /* if there is an outstanding delayed ACKs, send it */ if (pcb->state != TIME_WAIT && 8030536: 7e23 ldrb r3, [r4, #24] 8030538: 2b0a cmp r3, #10 803053a: d00a beq.n 8030552 803053c: 2b01 cmp r3, #1 803053e: d008 beq.n 8030552 pcb->state != LISTEN && pcb->flags & TF_ACK_DELAY) { 8030540: 7fa3 ldrb r3, [r4, #30] tcp_pcb_purge(pcb); /* if there is an outstanding delayed ACKs, send it */ if (pcb->state != TIME_WAIT && pcb->state != LISTEN && 8030542: 07da lsls r2, r3, #31 8030544: d505 bpl.n 8030552 pcb->flags & TF_ACK_DELAY) { pcb->flags |= TF_ACK_NOW; 8030546: f043 0302 orr.w r3, r3, #2 803054a: 77a3 strb r3, [r4, #30] tcp_output(pcb); 803054c: 4620 mov r0, r4 803054e: f001 fbd7 bl 8031d00 #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 8030552: 2300 movs r3, #0 8030554: 7623 strb r3, [r4, #24] 8030556: bd10 pop {r4, pc} 8030558: 2000ff2c .word 0x2000ff2c 0803055c : LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", pcb->state != LISTEN); /* Figure out on which TCP PCB list we are, and remove us. If we are in an active state, call the receive function associated with the PCB with a NULL argument, and send an RST to the remote end. */ if (pcb->state == TIME_WAIT) { 803055c: 7e03 ldrb r3, [r0, #24] 803055e: 2b0a cmp r3, #10 * @param pcb the tcp_pcb to abort * @param reset boolean to indicate whether a reset should be sent */ void tcp_abandon(struct tcp_pcb *pcb, int reset) { 8030560: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 8030564: 4604 mov r4, r0 8030566: 4689 mov r9, r1 LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", pcb->state != LISTEN); /* Figure out on which TCP PCB list we are, and remove us. If we are in an active state, call the receive function associated with the PCB with a NULL argument, and send an RST to the remote end. */ if (pcb->state == TIME_WAIT) { 8030568: d10a bne.n 8030580 tcp_pcb_remove(&tcp_tw_pcbs, pcb); 803056a: 4621 mov r1, r4 803056c: 481b ldr r0, [pc, #108] ; (80305dc ) 803056e: f7ff ffc7 bl 8030500 memp_free(MEMP_TCP_PCB, pcb); 8030572: 2002 movs r0, #2 8030574: 4621 mov r1, r4 tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port); } memp_free(MEMP_TCP_PCB, pcb); TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT); } } 8030576: b003 add sp, #12 8030578: e8bd 43f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, lr} /* Figure out on which TCP PCB list we are, and remove us. If we are in an active state, call the receive function associated with the PCB with a NULL argument, and send an RST to the remote end. */ if (pcb->state == TIME_WAIT) { tcp_pcb_remove(&tcp_tw_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); 803057c: f7ff ba7a b.w 802fa74 } else { seqno = pcb->snd_nxt; 8030580: f8d0 8050 ldr.w r8, [r0, #80] ; 0x50 ackno = pcb->rcv_nxt; 8030584: 6a87 ldr r7, [r0, #40] ; 0x28 #if LWIP_CALLBACK_API errf = pcb->errf; 8030586: f8d0 5088 ldr.w r5, [r0, #136] ; 0x88 #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 803058a: 6906 ldr r6, [r0, #16] TCP_PCB_REMOVE_ACTIVE(pcb); 803058c: 4814 ldr r0, [pc, #80] ; (80305e0 ) 803058e: 4621 mov r1, r4 8030590: f7ff ffb6 bl 8030500 8030594: 4b13 ldr r3, [pc, #76] ; (80305e4 ) if (pcb->unacked != NULL) { 8030596: 6f20 ldr r0, [r4, #112] ; 0x70 ackno = pcb->rcv_nxt; #if LWIP_CALLBACK_API errf = pcb->errf; #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; TCP_PCB_REMOVE_ACTIVE(pcb); 8030598: 2201 movs r2, #1 803059a: 701a strb r2, [r3, #0] if (pcb->unacked != NULL) { 803059c: b108 cbz r0, 80305a2 tcp_segs_free(pcb->unacked); 803059e: f7ff fe2e bl 80301fe } if (pcb->unsent != NULL) { 80305a2: 6ee0 ldr r0, [r4, #108] ; 0x6c 80305a4: b108 cbz r0, 80305aa tcp_segs_free(pcb->unsent); 80305a6: f7ff fe2a bl 80301fe #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { tcp_segs_free(pcb->ooseq); } #endif /* TCP_QUEUE_OOSEQ */ if (reset) { 80305aa: f1b9 0f00 cmp.w r9, #0 80305ae: d009 beq.n 80305c4 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_abandon: sending RST\n")); tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port); 80305b0: 8b63 ldrh r3, [r4, #26] 80305b2: 9300 str r3, [sp, #0] 80305b4: 8ba3 ldrh r3, [r4, #28] 80305b6: 4640 mov r0, r8 80305b8: 9301 str r3, [sp, #4] 80305ba: 4639 mov r1, r7 80305bc: 4622 mov r2, r4 80305be: 1d23 adds r3, r4, #4 80305c0: f001 fcc2 bl 8031f48 } memp_free(MEMP_TCP_PCB, pcb); 80305c4: 2002 movs r0, #2 80305c6: 4621 mov r1, r4 80305c8: f7ff fa54 bl 802fa74 TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT); 80305cc: b11d cbz r5, 80305d6 80305ce: 4630 mov r0, r6 80305d0: f06f 0109 mvn.w r1, #9 80305d4: 47a8 blx r5 } } 80305d6: b003 add sp, #12 80305d8: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 80305dc: 2000ff34 .word 0x2000ff34 80305e0: 2000ff20 .word 0x2000ff20 80305e4: 2000ff1c .word 0x2000ff1c 080305e8 : * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { tcp_abandon(pcb, 1); 80305e8: 2101 movs r1, #1 80305ea: f7ff bfb7 b.w 803055c 80305ee: 0000 movs r0, r0 080305f0 : * @return ERR_OK if connection has been closed * another err_t if closing failed and pcb is not freed */ static err_t tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) { 80305f0: b537 push {r0, r1, r2, r4, r5, lr} 80305f2: 4604 mov r4, r0 err_t err; if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 80305f4: 2900 cmp r1, #0 80305f6: d043 beq.n 8030680 80305f8: 7e03 ldrb r3, [r0, #24] 80305fa: 2b04 cmp r3, #4 80305fc: d001 beq.n 8030602 80305fe: 2b07 cmp r3, #7 8030600: d13e bne.n 8030680 if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND)) { 8030602: 6f63 ldr r3, [r4, #116] ; 0x74 8030604: b923 cbnz r3, 8030610 8030606: 8da2 ldrh r2, [r4, #44] ; 0x2c 8030608: f241 63d0 movw r3, #5840 ; 0x16d0 803060c: 429a cmp r2, r3 803060e: d037 beq.n 8030680 side about this. */ LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED); /* don't call tcp_abort here: we must not deallocate the pcb since that might not be expected when calling tcp_close */ tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 8030610: 8b63 ldrh r3, [r4, #26] 8030612: 6d20 ldr r0, [r4, #80] ; 0x50 8030614: 9300 str r3, [sp, #0] 8030616: 8ba3 ldrh r3, [r4, #28] 8030618: 6aa1 ldr r1, [r4, #40] ; 0x28 803061a: 9301 str r3, [sp, #4] 803061c: 4622 mov r2, r4 803061e: 1d23 adds r3, r4, #4 8030620: f001 fc92 bl 8031f48 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 8030624: 4620 mov r0, r4 8030626: f7ff fe03 bl 8030230 TCP_RMV_ACTIVE(pcb); 803062a: 4a42 ldr r2, [pc, #264] ; (8030734 ) 803062c: 6813 ldr r3, [r2, #0] 803062e: 42a3 cmp r3, r4 8030630: d101 bne.n 8030636 8030632: 68e3 ldr r3, [r4, #12] 8030634: e00c b.n 8030650 8030636: 4a40 ldr r2, [pc, #256] ; (8030738 ) 8030638: 6013 str r3, [r2, #0] 803063a: e007 b.n 803064c 803063c: 68d9 ldr r1, [r3, #12] 803063e: 42a1 cmp r1, r4 8030640: d103 bne.n 803064a 8030642: 6013 str r3, [r2, #0] 8030644: 68e2 ldr r2, [r4, #12] 8030646: 60da str r2, [r3, #12] 8030648: e003 b.n 8030652 803064a: 460b mov r3, r1 803064c: 2b00 cmp r3, #0 803064e: d1f5 bne.n 803063c 8030650: 6013 str r3, [r2, #0] 8030652: 4b3a ldr r3, [pc, #232] ; (803073c ) 8030654: 2201 movs r2, #1 8030656: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { 8030658: 7e23 ldrb r3, [r4, #24] that might not be expected when calling tcp_close */ tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); TCP_RMV_ACTIVE(pcb); 803065a: 2500 movs r5, #0 if (pcb->state == ESTABLISHED) { 803065c: 2b04 cmp r3, #4 that might not be expected when calling tcp_close */ tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); TCP_RMV_ACTIVE(pcb); 803065e: 60e5 str r5, [r4, #12] if (pcb->state == ESTABLISHED) { 8030660: d108 bne.n 8030674 /* move to TIME_WAIT since we close actively */ pcb->state = TIME_WAIT; 8030662: 230a movs r3, #10 8030664: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 8030666: 4b36 ldr r3, [pc, #216] ; (8030740 ) 8030668: 681a ldr r2, [r3, #0] 803066a: 601c str r4, [r3, #0] 803066c: 60e2 str r2, [r4, #12] 803066e: f001 fe05 bl 803227c 8030672: e003 b.n 803067c } else { /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ memp_free(MEMP_TCP_PCB, pcb); 8030674: 2002 movs r0, #2 8030676: 4621 mov r1, r4 8030678: f7ff f9fc bl 802fa74 } return ERR_OK; 803067c: 4628 mov r0, r5 803067e: e051 b.n 8030724 } } switch (pcb->state) { 8030680: 7e23 ldrb r3, [r4, #24] 8030682: 2b07 cmp r3, #7 8030684: d853 bhi.n 803072e 8030686: e8df f003 tbb [pc, r3] 803068a: 1e04 .short 0x1e04 803068c: 523c3527 .word 0x523c3527 8030690: 4452 .short 0x4452 * Calling tcp_close() with a pcb that has already been closed, (i.e. twice) * or for a pcb that has been used and then entered the CLOSED state * is erroneous, but this should never happen as the pcb has in those cases * been freed, and so any remaining handles are bogus. */ err = ERR_OK; if (pcb->local_port != 0) { 8030692: 8b63 ldrh r3, [r4, #26] 8030694: b1ab cbz r3, 80306c2 TCP_RMV(&tcp_bound_pcbs, pcb); 8030696: 4a2b ldr r2, [pc, #172] ; (8030744 ) 8030698: 6813 ldr r3, [r2, #0] 803069a: 42a3 cmp r3, r4 803069c: d101 bne.n 80306a2 803069e: 68e3 ldr r3, [r4, #12] 80306a0: e00c b.n 80306bc 80306a2: 4a25 ldr r2, [pc, #148] ; (8030738 ) 80306a4: 6013 str r3, [r2, #0] 80306a6: e007 b.n 80306b8 80306a8: 68d9 ldr r1, [r3, #12] 80306aa: 42a1 cmp r1, r4 80306ac: d103 bne.n 80306b6 80306ae: 6013 str r3, [r2, #0] 80306b0: 68e2 ldr r2, [r4, #12] 80306b2: 60da str r2, [r3, #12] 80306b4: e003 b.n 80306be 80306b6: 460b mov r3, r1 80306b8: 2b00 cmp r3, #0 80306ba: d1f5 bne.n 80306a8 80306bc: 6013 str r3, [r2, #0] 80306be: 2300 movs r3, #0 80306c0: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 80306c2: 2002 movs r0, #2 80306c4: e004 b.n 80306d0 pcb = NULL; break; case LISTEN: err = ERR_OK; tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 80306c6: 4820 ldr r0, [pc, #128] ; (8030748 ) 80306c8: 4621 mov r1, r4 80306ca: f7ff ff19 bl 8030500 memp_free(MEMP_TCP_PCB_LISTEN, pcb); 80306ce: 2003 movs r0, #3 80306d0: 4621 mov r1, r4 80306d2: f7ff f9cf bl 802fa74 pcb = NULL; break; 80306d6: e02a b.n 803072e case SYN_SENT: err = ERR_OK; TCP_PCB_REMOVE_ACTIVE(pcb); 80306d8: 4621 mov r1, r4 80306da: 4816 ldr r0, [pc, #88] ; (8030734 ) 80306dc: f7ff ff10 bl 8030500 80306e0: 4b16 ldr r3, [pc, #88] ; (803073c ) 80306e2: 2201 movs r2, #1 memp_free(MEMP_TCP_PCB, pcb); 80306e4: 2002 movs r0, #2 80306e6: 4621 mov r1, r4 memp_free(MEMP_TCP_PCB_LISTEN, pcb); pcb = NULL; break; case SYN_SENT: err = ERR_OK; TCP_PCB_REMOVE_ACTIVE(pcb); 80306e8: 701a strb r2, [r3, #0] memp_free(MEMP_TCP_PCB, pcb); 80306ea: f7ff f9c3 bl 802fa74 pcb = NULL; snmp_inc_tcpattemptfails(); 80306ee: f004 f8af bl 8034850 break; 80306f2: e01c b.n 803072e case SYN_RCVD: err = tcp_send_fin(pcb); 80306f4: 4620 mov r0, r4 80306f6: f001 fabe bl 8031c76 if (err == ERR_OK) { 80306fa: b998 cbnz r0, 8030724 snmp_inc_tcpattemptfails(); 80306fc: f004 f8a8 bl 8034850 8030700: e005 b.n 803070e pcb->state = FIN_WAIT_1; } break; case ESTABLISHED: err = tcp_send_fin(pcb); 8030702: 4620 mov r0, r4 8030704: f001 fab7 bl 8031c76 if (err == ERR_OK) { 8030708: b960 cbnz r0, 8030724 snmp_inc_tcpestabresets(); 803070a: f004 f8a9 bl 8034860 pcb->state = FIN_WAIT_1; 803070e: 2305 movs r3, #5 8030710: e006 b.n 8030720 } break; case CLOSE_WAIT: err = tcp_send_fin(pcb); 8030712: 4620 mov r0, r4 8030714: f001 faaf bl 8031c76 if (err == ERR_OK) { 8030718: b920 cbnz r0, 8030724 snmp_inc_tcpestabresets(); 803071a: f004 f8a1 bl 8034860 pcb->state = LAST_ACK; 803071e: 2309 movs r3, #9 8030720: 7623 strb r3, [r4, #24] 8030722: e001 b.n 8030728 8030724: b240 sxtb r0, r0 8030726: e004 b.n 8030732 returns (unsent data is sent from tcp timer functions, also), we don't care for the return value of tcp_output for now. */ /* @todo: When implementing SO_LINGER, this must be changed somehow: If SOF_LINGER is set, the data should be sent and acked before close returns. This can only be valid for sequential APIs, not for the raw API. */ tcp_output(pcb); 8030728: 4620 mov r0, r4 803072a: f001 fae9 bl 8031d00 803072e: 2000 movs r0, #0 8030730: e7f8 b.n 8030724 } return err; } 8030732: bd3e pop {r1, r2, r3, r4, r5, pc} 8030734: 2000ff20 .word 0x2000ff20 8030738: 2000ff2c .word 0x2000ff2c 803073c: 2000ff1c .word 0x2000ff1c 8030740: 2000ff34 .word 0x2000ff34 8030744: 2000ff30 .word 0x2000ff30 8030748: 2000ff28 .word 0x2000ff28 0803074c : #if TCP_DEBUG LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ if (pcb->state != LISTEN) { 803074c: 7e03 ldrb r3, [r0, #24] 803074e: 2b01 cmp r3, #1 8030750: d003 beq.n 803075a /* Set a flag not to receive any more data... */ pcb->flags |= TF_RXCLOSED; 8030752: 7f83 ldrb r3, [r0, #30] 8030754: f043 0310 orr.w r3, r3, #16 8030758: 7783 strb r3, [r0, #30] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 803075a: 2101 movs r1, #1 803075c: f7ff bf48 b.w 80305f0 08030760 : * Default receive callback that is called if the user didn't register * a recv callback for the pcb. */ err_t tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { 8030760: b510 push {r4, lr} 8030762: 4608 mov r0, r1 LWIP_UNUSED_ARG(arg); if (p != NULL) { 8030764: 4614 mov r4, r2 8030766: b132 cbz r2, 8030776 tcp_recved(pcb, p->tot_len); 8030768: 8911 ldrh r1, [r2, #8] 803076a: f7ff fd1f bl 80301ac pbuf_free(p); 803076e: 4620 mov r0, r4 8030770: f7ff fa8a bl 802fc88 8030774: e004 b.n 8030780 } else if (err == ERR_OK) { 8030776: b91b cbnz r3, 8030780 return tcp_close(pcb); } return ERR_OK; } 8030778: e8bd 4010 ldmia.w sp!, {r4, lr} LWIP_UNUSED_ARG(arg); if (p != NULL) { tcp_recved(pcb, p->tot_len); pbuf_free(p); } else if (err == ERR_OK) { return tcp_close(pcb); 803077c: f7ff bfe6 b.w 803074c } return ERR_OK; } 8030780: 2000 movs r0, #0 8030782: bd10 pop {r4, pc} 08030784 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 8030784: b5f8 push {r3, r4, r5, r6, r7, lr} err_t err; u8_t refused_flags = pcb->refused_data->flags; 8030786: 6f45 ldr r5, [r0, #116] ; 0x74 closes the pcb */ struct pbuf *refused_data = pcb->refused_data; pcb->refused_data = NULL; /* Notify again application with data previously received. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n")); TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); 8030788: 6fc6 ldr r6, [r0, #124] ; 0x7c /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { err_t err; u8_t refused_flags = pcb->refused_data->flags; 803078a: 7b6f ldrb r7, [r5, #13] /* set pcb->refused_data to NULL in case the callback frees it and then closes the pcb */ struct pbuf *refused_data = pcb->refused_data; pcb->refused_data = NULL; 803078c: 2300 movs r3, #0 } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 803078e: 4604 mov r4, r0 err_t err; u8_t refused_flags = pcb->refused_data->flags; /* set pcb->refused_data to NULL in case the callback frees it and then closes the pcb */ struct pbuf *refused_data = pcb->refused_data; pcb->refused_data = NULL; 8030790: 6743 str r3, [r0, #116] ; 0x74 /* Notify again application with data previously received. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n")); TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); 8030792: b126 cbz r6, 803079e 8030794: 4621 mov r1, r4 8030796: 462a mov r2, r5 8030798: 6900 ldr r0, [r0, #16] 803079a: 47b0 blx r6 803079c: e005 b.n 80307aa 803079e: 4630 mov r0, r6 80307a0: 4621 mov r1, r4 80307a2: 462a mov r2, r5 80307a4: 4633 mov r3, r6 80307a6: f7ff ffdb bl 8030760 if (err == ERR_OK) { 80307aa: b9b0 cbnz r0, 80307da /* did refused_data include a FIN? */ if (refused_flags & PBUF_FLAG_TCP_FIN) { 80307ac: f007 0720 and.w r7, r7, #32 80307b0: b2ff uxtb r7, r7 80307b2: b1bf cbz r7, 80307e4 /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 80307b4: 8da3 ldrh r3, [r4, #44] ; 0x2c 80307b6: f241 62d0 movw r2, #5840 ; 0x16d0 80307ba: 4293 cmp r3, r2 80307bc: d001 beq.n 80307c2 pcb->rcv_wnd++; 80307be: 3301 adds r3, #1 80307c0: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 80307c2: 6fe5 ldr r5, [r4, #124] ; 0x7c 80307c4: b905 cbnz r5, 80307c8 80307c6: e00c b.n 80307e2 80307c8: 2200 movs r2, #0 80307ca: 6920 ldr r0, [r4, #16] 80307cc: 4621 mov r1, r4 80307ce: 4613 mov r3, r2 80307d0: 47a8 blx r5 if (err == ERR_ABRT) { 80307d2: 300a adds r0, #10 80307d4: d105 bne.n 80307e2 return ERR_ABRT; 80307d6: 20f6 movs r0, #246 ; 0xf6 80307d8: e004 b.n 80307e4 } } } else if (err == ERR_ABRT) { 80307da: b240 sxtb r0, r0 80307dc: 300a adds r0, #10 80307de: d0fa beq.n 80307d6 segment contains data). */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: drop incoming packets, because pcb is \"full\"\n")); return ERR_ABRT; } else { /* data is still refused, pbuf is still valid (go on for ACK-only packets) */ pcb->refused_data = refused_data; 80307e0: 6765 str r5, [r4, #116] ; 0x74 } return ERR_OK; 80307e2: 2000 movs r0, #0 } 80307e4: b240 sxtb r0, r0 80307e6: bdf8 pop {r3, r4, r5, r6, r7, pc} 080307e8 : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 80307e8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} struct tcp_pcb *pcb; ++tcp_timer_ctr; 80307ec: 4b18 ldr r3, [pc, #96] ; (8030850 ) tcp_fasttmr_start: pcb = tcp_active_pcbs; 80307ee: 4f19 ldr r7, [pc, #100] ; (8030854 ) void tcp_fasttmr(void) { struct tcp_pcb *pcb; ++tcp_timer_ctr; 80307f0: 781a ldrb r2, [r3, #0] 80307f2: 3201 adds r2, #1 80307f4: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { if (pcb->last_timer != tcp_timer_ctr) { 80307f6: 4698 mov r8, r3 struct tcp_pcb *pcb; ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; 80307f8: 683c ldr r4, [r7, #0] next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { tcp_active_pcbs_changed = 0; 80307fa: 4d17 ldr r5, [pc, #92] ; (8030858 ) 80307fc: 2600 movs r6, #0 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 80307fe: e022 b.n 8030846 if (pcb->last_timer != tcp_timer_ctr) { 8030800: f898 2000 ldrb.w r2, [r8] 8030804: f894 3021 ldrb.w r3, [r4, #33] ; 0x21 8030808: 4293 cmp r3, r2 803080a: d020 beq.n 803084e struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 803080c: f884 2021 strb.w r2, [r4, #33] ; 0x21 /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 8030810: 7fa2 ldrb r2, [r4, #30] 8030812: 07d1 lsls r1, r2, #31 8030814: d509 bpl.n 803082a LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 8030816: f042 0202 orr.w r2, r2, #2 803081a: 77a2 strb r2, [r4, #30] tcp_output(pcb); 803081c: 4620 mov r0, r4 803081e: f001 fa6f bl 8031d00 pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8030822: 7fa3 ldrb r3, [r4, #30] 8030824: f023 0303 bic.w r3, r3, #3 8030828: 77a3 strb r3, [r4, #30] } next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 803082a: 6f63 ldr r3, [r4, #116] ; 0x74 tcp_ack_now(pcb); tcp_output(pcb); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } next = pcb->next; 803082c: f8d4 900c ldr.w r9, [r4, #12] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8030830: b90b cbnz r3, 8030836 8030832: 464c mov r4, r9 8030834: e007 b.n 8030846 tcp_active_pcbs_changed = 0; tcp_process_refused_data(pcb); 8030836: 4620 mov r0, r4 next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { tcp_active_pcbs_changed = 0; 8030838: 702e strb r6, [r5, #0] tcp_process_refused_data(pcb); 803083a: f7ff ffa3 bl 8030784 if (tcp_active_pcbs_changed) { 803083e: 782b ldrb r3, [r5, #0] 8030840: 2b00 cmp r3, #0 8030842: d1d9 bne.n 80307f8 8030844: e7f5 b.n 8030832 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 8030846: 2c00 cmp r4, #0 8030848: d1da bne.n 8030800 803084a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 803084e: e7fe b.n 803084e 8030850: 2000c431 .word 0x2000c431 8030854: 2000ff20 .word 0x2000ff20 8030858: 2000ff1c .word 0x2000ff1c 0803085c : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 803085c: b508 push {r3, lr} /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 803085e: f7ff ffc3 bl 80307e8 if (++tcp_timer & 1) { 8030862: 4a06 ldr r2, [pc, #24] ; (803087c ) 8030864: 7813 ldrb r3, [r2, #0] 8030866: 3301 adds r3, #1 8030868: b2db uxtb r3, r3 803086a: 07d8 lsls r0, r3, #31 803086c: 7013 strb r3, [r2, #0] 803086e: d503 bpl.n 8030878 /* Call tcp_tmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); } } 8030870: e8bd 4008 ldmia.w sp!, {r3, lr} tcp_fasttmr(); if (++tcp_timer & 1) { /* Call tcp_tmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); 8030874: f7ff bcfa b.w 803026c 8030878: bd08 pop {r3, pc} 803087a: bf00 nop 803087c: 2000c430 .word 0x2000c430 08030880 : u32_t tcp_next_iss(void) { static u32_t iss = 6510; iss += tcp_ticks; /* XXX */ 8030880: 4b03 ldr r3, [pc, #12] ; (8030890 ) 8030882: 4a04 ldr r2, [pc, #16] ; (8030894 ) 8030884: 6810 ldr r0, [r2, #0] 8030886: 681a ldr r2, [r3, #0] 8030888: 1880 adds r0, r0, r2 803088a: 6018 str r0, [r3, #0] return iss; } 803088c: 4770 bx lr 803088e: bf00 nop 8030890: 20000728 .word 0x20000728 8030894: 2000ff24 .word 0x2000ff24 08030898 : * @param prio priority for the new pcb * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_alloc(u8_t prio) { 8030898: b5f8 push {r3, r4, r5, r6, r7, lr} 803089a: 4605 mov r5, r0 struct tcp_pcb *pcb; u32_t iss; pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 803089c: 2002 movs r0, #2 803089e: f7ff f8d3 bl 802fa48 if (pcb == NULL) { 80308a2: 4604 mov r4, r0 80308a4: 2800 cmp r0, #0 80308a6: d136 bne.n 8030916 u32_t inactivity; inactivity = 0; inactive = NULL; /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 80308a8: 4b39 ldr r3, [pc, #228] ; (8030990 ) if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 80308aa: 4a3a ldr r2, [pc, #232] ; (8030994 ) u32_t inactivity; inactivity = 0; inactive = NULL; /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 80308ac: 681b ldr r3, [r3, #0] if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 80308ae: 6811 ldr r1, [r2, #0] 80308b0: e007 b.n 80308c2 80308b2: 6a5a ldr r2, [r3, #36] ; 0x24 80308b4: 1a8a subs r2, r1, r2 80308b6: 42a2 cmp r2, r4 80308b8: bf34 ite cc 80308ba: 4622 movcc r2, r4 80308bc: 4618 movcs r0, r3 u32_t inactivity; inactivity = 0; inactive = NULL; /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 80308be: 68db ldr r3, [r3, #12] 80308c0: 4614 mov r4, r2 80308c2: 2b00 cmp r3, #0 80308c4: d1f5 bne.n 80308b2 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { inactivity = tcp_ticks - pcb->tmr; inactive = pcb; } } if (inactive != NULL) { 80308c6: b108 cbz r0, 80308cc LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 80308c8: f7ff fe8e bl 80305e8 if (pcb == NULL) { /* Try killing oldest connection in TIME-WAIT. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); tcp_kill_timewait(); /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 80308cc: 2002 movs r0, #2 80308ce: f7ff f8bb bl 802fa48 if (pcb == NULL) { 80308d2: 4604 mov r4, r0 80308d4: b9f8 cbnz r0, 8030916 inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 80308d6: 4a2f ldr r2, [pc, #188] ; (8030994 ) mprio = TCP_PRIO_MAX; /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 80308d8: 4b2f ldr r3, [pc, #188] ; (8030998 ) if (pcb->prio <= prio && pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 80308da: 6817 ldr r7, [r2, #0] mprio = TCP_PRIO_MAX; /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 80308dc: 681b ldr r3, [r3, #0] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = TCP_PRIO_MAX; 80308de: 207f movs r0, #127 ; 0x7f /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; 80308e0: 4622 mov r2, r4 80308e2: e00c b.n 80308fe for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && 80308e4: 7e59 ldrb r1, [r3, #25] 80308e6: 42a9 cmp r1, r5 80308e8: d808 bhi.n 80308fc 80308ea: 4281 cmp r1, r0 80308ec: d806 bhi.n 80308fc pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 80308ee: 6a5e ldr r6, [r3, #36] ; 0x24 80308f0: 1bbe subs r6, r7, r6 /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && pcb->prio <= mprio && 80308f2: 42a6 cmp r6, r4 80308f4: d302 bcc.n 80308fc 80308f6: 4608 mov r0, r1 80308f8: 4634 mov r4, r6 80308fa: 461a mov r2, r3 mprio = TCP_PRIO_MAX; /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 80308fc: 68db ldr r3, [r3, #12] 80308fe: 2b00 cmp r3, #0 8030900: d1f0 bne.n 80308e4 inactivity = tcp_ticks - pcb->tmr; inactive = pcb; mprio = pcb->prio; } } if (inactive != NULL) { 8030902: b112 cbz r2, 803090a LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8030904: 4610 mov r0, r2 8030906: f7ff fe6f bl 80305e8 if (pcb == NULL) { /* Try killing active connections with lower priority than the new one. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio)); tcp_kill_prio(prio); /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 803090a: 2002 movs r0, #2 803090c: f7ff f89c bl 802fa48 if (pcb != NULL) { /* adjust err stats: timewait PCB was freed above */ MEMP_STATS_DEC(err, MEMP_TCP_PCB); } } if (pcb != NULL) { 8030910: 4604 mov r4, r0 8030912: 2800 cmp r0, #0 8030914: d039 beq.n 803098a memset(pcb, 0, sizeof(struct tcp_pcb)); 8030916: 2100 movs r1, #0 8030918: 2294 movs r2, #148 ; 0x94 803091a: 4620 mov r0, r4 803091c: f7f1 fa7c bl 8021e18 pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 8030920: f241 62d0 movw r2, #5840 ; 0x16d0 } } if (pcb != NULL) { memset(pcb, 0, sizeof(struct tcp_pcb)); pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; 8030924: f246 63a8 movw r3, #26280 ; 0x66a8 8030928: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 803092c: 85a2 strh r2, [r4, #44] ; 0x2c } if (pcb != NULL) { memset(pcb, 0, sizeof(struct tcp_pcb)); pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; 803092e: 2300 movs r3, #0 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; 8030930: 85e2 strh r2, [r4, #46] ; 0x2e pcb->tos = 0; pcb->ttl = TCP_TTL; 8030932: 22ff movs r2, #255 ; 0xff MEMP_STATS_DEC(err, MEMP_TCP_PCB); } } if (pcb != NULL) { memset(pcb, 0, sizeof(struct tcp_pcb)); pcb->prio = prio; 8030934: 7665 strb r5, [r4, #25] pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; 8030936: f8a4 3068 strh.w r3, [r4, #104] ; 0x68 803093a: 461d mov r5, r3 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; 803093c: 7263 strb r3, [r4, #9] pcb->ttl = TCP_TTL; 803093e: 72a2 strb r2, [r4, #10] /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; 8030940: f8a4 3040 strh.w r3, [r4, #64] ; 0x40 pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; pcb->ttl = TCP_TTL; /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; 8030944: f44f 7206 mov.w r2, #536 ; 0x218 pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; 8030948: f64f 73ff movw r3, #65535 ; 0xffff pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; pcb->ttl = TCP_TTL; /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; 803094c: 86e2 strh r2, [r4, #54] ; 0x36 pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; 803094e: 86a3 strh r3, [r4, #52] ; 0x34 pcb->tos = 0; pcb->ttl = TCP_TTL; /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; pcb->rto = 3000 / TCP_SLOW_INTERVAL; 8030950: 2206 movs r2, #6 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; 8030952: 2301 movs r3, #1 8030954: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->tos = 0; pcb->ttl = TCP_TTL; /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; pcb->rto = 3000 / TCP_SLOW_INTERVAL; 8030958: f8a4 2044 strh.w r2, [r4, #68] ; 0x44 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; 803095c: f8a4 2042 strh.w r2, [r4, #66] ; 0x42 pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); 8030960: f7ff ff8e bl 8030880 pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8030964: 4b0b ldr r3, [pc, #44] ; (8030994 ) pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; 8030966: 65a0 str r0, [r4, #88] ; 0x58 pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8030968: 681b ldr r3, [r3, #0] pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; 803096a: 6520 str r0, [r4, #80] ; 0x50 pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 803096c: 6263 str r3, [r4, #36] ; 0x24 pcb->last_timer = tcp_timer_ctr; 803096e: 4b0b ldr r3, [pc, #44] ; (803099c ) pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; 8030970: 64a0 str r0, [r4, #72] ; 0x48 pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 8030972: 781b ldrb r3, [r3, #0] pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; 8030974: 65e0 str r0, [r4, #92] ; 0x5c pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 8030976: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb->polltmr = 0; #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 803097a: 4b09 ldr r3, [pc, #36] ; (80309a0 ) pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; pcb->polltmr = 0; 803097c: 77e5 strb r5, [r4, #31] #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 803097e: 67e3 str r3, [r4, #124] ; 0x7c #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 8030980: 4b08 ldr r3, [pc, #32] ; (80309a4 ) #if LWIP_TCP_KEEPALIVE pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT; pcb->keep_cnt = TCP_KEEPCNT_DEFAULT; #endif /* LWIP_TCP_KEEPALIVE */ pcb->keep_cnt_sent = 0; 8030982: f884 5092 strb.w r5, [r4, #146] ; 0x92 #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 8030986: f8c4 308c str.w r3, [r4, #140] ; 0x8c #endif /* LWIP_TCP_KEEPALIVE */ pcb->keep_cnt_sent = 0; } return pcb; } 803098a: 4620 mov r0, r4 803098c: bdf8 pop {r3, r4, r5, r6, r7, pc} 803098e: bf00 nop 8030990: 2000ff34 .word 0x2000ff34 8030994: 2000ff24 .word 0x2000ff24 8030998: 2000ff20 .word 0x2000ff20 803099c: 2000c431 .word 0x2000c431 80309a0: 08030761 .word 0x08030761 80309a4: 006ddd00 .word 0x006ddd00 080309a8 : * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_new(void) { return tcp_alloc(TCP_PRIO_NORMAL); 80309a8: 2040 movs r0, #64 ; 0x40 80309aa: f7ff bf75 b.w 8030898 080309ae : * by using ip_route to determin the netif used to send to the address and * calculating the minimum of TCP_MSS and that netif's mtu (if set). */ u16_t tcp_eff_send_mss(u16_t sendmss, ip_addr_t *addr) { 80309ae: b510 push {r4, lr} 80309b0: 4604 mov r4, r0 u16_t mss_s; struct netif *outif; outif = ip_route(addr); 80309b2: 4608 mov r0, r1 80309b4: f002 f8f2 bl 8032b9c if ((outif != NULL) && (outif->mtu != 0)) { 80309b8: b130 cbz r0, 80309c8 80309ba: 8c83 ldrh r3, [r0, #36] ; 0x24 80309bc: b123 cbz r3, 80309c8 mss_s = outif->mtu - IP_HLEN - TCP_HLEN; 80309be: 3b28 subs r3, #40 ; 0x28 /* RFC 1122, chap 4.2.2.6: * Eff.snd.MSS = min(SendMSS+20, MMS_S) - TCPhdrsize - IPoptionsize * We correct for TCP options in tcp_write(), and don't support IP options. */ sendmss = LWIP_MIN(sendmss, mss_s); 80309c0: b29b uxth r3, r3 80309c2: 429c cmp r4, r3 80309c4: bf28 it cs 80309c6: 461c movcs r4, r3 } return sendmss; } 80309c8: 4620 mov r0, r4 80309ca: bd10 pop {r4, pc} 080309cc : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 80309cc: b5f8 push {r3, r4, r5, r6, r7, lr} u8_t *opts, opt; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif opts = (u8_t *)tcphdr + TCP_HLEN; 80309ce: 4d1e ldr r5, [pc, #120] ; (8030a48 ) 80309d0: 682c ldr r4, [r5, #0] * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 80309d2: 4606 mov r6, r0 #endif opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { 80309d4: 89a0 ldrh r0, [r4, #12] 80309d6: f7fe f81e bl 802ea16 80309da: f3c0 300f ubfx r0, r0, #12, #16 80309de: 2805 cmp r0, #5 80309e0: d931 bls.n 8030a46 max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 80309e2: 682b ldr r3, [r5, #0] 80309e4: 8998 ldrh r0, [r3, #12] 80309e6: f7fe f816 bl 802ea16 80309ea: 0b00 lsrs r0, r0, #12 80309ec: 1f41 subs r1, r0, #5 80309ee: 0089 lsls r1, r1, #2 u8_t *opts, opt; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif opts = (u8_t *)tcphdr + TCP_HLEN; 80309f0: 3414 adds r4, #20 /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 80309f2: b289 uxth r1, r1 for (c = 0; c < max_c; ) { 80309f4: 2300 movs r3, #0 return; } /* An MSS option with the right option length. */ mss = (opts[c + 2] << 8) | opts[c + 3]; /* Limit the mss to the configured TCP_MSS and prevent division by zero */ pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; 80309f6: f240 50b3 movw r0, #1459 ; 0x5b3 80309fa: f240 55b4 movw r5, #1460 ; 0x5b4 opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; for (c = 0; c < max_c; ) { 80309fe: e020 b.n 8030a42 opt = opts[c]; switch (opt) { 8030a00: 5ce2 ldrb r2, [r4, r3] 8030a02: 2a01 cmp r2, #1 8030a04: d005 beq.n 8030a12 8030a06: d31e bcc.n 8030a46 8030a08: 2a02 cmp r2, #2 8030a0a: eb04 0203 add.w r2, r4, r3 8030a0e: d114 bne.n 8030a3a 8030a10: e001 b.n 8030a16 /* End of options. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); return; case 0x01: /* NOP option. */ ++c; 8030a12: 3301 adds r3, #1 8030a14: e014 b.n 8030a40 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n")); break; case 0x02: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n")); if (opts[c + 1] != 0x04 || c + 0x04 > max_c) { 8030a16: 7857 ldrb r7, [r2, #1] 8030a18: 2f04 cmp r7, #4 8030a1a: d114 bne.n 8030a46 8030a1c: 1cdf adds r7, r3, #3 8030a1e: 428f cmp r7, r1 8030a20: da11 bge.n 8030a46 /* Bad length */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); return; } /* An MSS option with the right option length. */ mss = (opts[c + 2] << 8) | opts[c + 3]; 8030a22: 7897 ldrb r7, [r2, #2] 8030a24: 78d2 ldrb r2, [r2, #3] 8030a26: ea42 2207 orr.w r2, r2, r7, lsl #8 /* Limit the mss to the configured TCP_MSS and prevent division by zero */ pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; 8030a2a: 1e57 subs r7, r2, #1 8030a2c: b2bf uxth r7, r7 8030a2e: 4287 cmp r7, r0 8030a30: bf88 it hi 8030a32: 462a movhi r2, r5 8030a34: 86f2 strh r2, [r6, #54] ; 0x36 /* Advance to next option */ c += 0x04; 8030a36: 3304 adds r3, #4 8030a38: e002 b.n 8030a40 c += 0x0A; break; #endif default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); if (opts[c + 1] == 0) { 8030a3a: 7852 ldrb r2, [r2, #1] 8030a3c: b11a cbz r2, 8030a46 and we don't process them further. */ return; } /* All other options have a length field, so that we easily can skip past them. */ c += opts[c + 1]; 8030a3e: 18d3 adds r3, r2, r3 8030a40: b29b uxth r3, r3 opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; for (c = 0; c < max_c; ) { 8030a42: 428b cmp r3, r1 8030a44: d3dc bcc.n 8030a00 8030a46: bdf8 pop {r3, r4, r5, r6, r7, pc} 8030a48: 2000c434 .word 0x2000c434 08030a4c : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 8030a4c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t ooseq_qlen; #endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { 8030a50: 4ba0 ldr r3, [pc, #640] ; (8030cd4 ) 8030a52: 781b ldrb r3, [r3, #0] 8030a54: f003 0310 and.w r3, r3, #16 8030a58: b2db uxtb r3, r3 * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 8030a5a: 4604 mov r4, r0 u16_t ooseq_qlen; #endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { 8030a5c: 2b00 cmp r3, #0 8030a5e: f000 816b beq.w 8030d38 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 8030a62: 4a9d ldr r2, [pc, #628] ; (8030cd8 ) 8030a64: 6d43 ldr r3, [r0, #84] ; 0x54 8030a66: 6812 ldr r2, [r2, #0] #endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 8030a68: f8b0 5060 ldrh.w r5, [r0, #96] ; 0x60 8030a6c: 6d81 ldr r1, [r0, #88] ; 0x58 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 8030a6e: 1a98 subs r0, r3, r2 8030a70: 2800 cmp r0, #0 8030a72: db0e blt.n 8030a92 8030a74: 4293 cmp r3, r2 8030a76: 4b99 ldr r3, [pc, #612] ; (8030cdc ) 8030a78: d103 bne.n 8030a82 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 8030a7a: 6818 ldr r0, [r3, #0] 8030a7c: 1a08 subs r0, r1, r0 8030a7e: 2800 cmp r0, #0 8030a80: db07 blt.n 8030a92 8030a82: 681b ldr r3, [r3, #0] 8030a84: 4299 cmp r1, r3 8030a86: d11f bne.n 8030ac8 (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { 8030a88: 4b95 ldr r3, [pc, #596] ; (8030ce0 ) 8030a8a: 681b ldr r3, [r3, #0] 8030a8c: 89db ldrh r3, [r3, #14] 8030a8e: 42ab cmp r3, r5 8030a90: d91a bls.n 8030ac8 pcb->snd_wnd = tcphdr->wnd; 8030a92: 4b93 ldr r3, [pc, #588] ; (8030ce0 ) /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { 8030a94: f8b4 6062 ldrh.w r6, [r4, #98] ; 0x62 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { pcb->snd_wnd = tcphdr->wnd; 8030a98: 681b ldr r3, [r3, #0] 8030a9a: 89d8 ldrh r0, [r3, #14] /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; 8030a9c: 6562 str r2, [r4, #84] ; 0x54 pcb->snd_wl2 = ackno; 8030a9e: 4a8f ldr r2, [pc, #572] ; (8030cdc ) /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { pcb->snd_wnd = tcphdr->wnd; 8030aa0: f8a4 0060 strh.w r0, [r4, #96] ; 0x60 the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; 8030aa4: 6812 ldr r2, [r2, #0] (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { pcb->snd_wnd = tcphdr->wnd; /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { 8030aa6: 4286 cmp r6, r0 pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; 8030aa8: 65a2 str r2, [r4, #88] ; 0x58 (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { pcb->snd_wnd = tcphdr->wnd; /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { pcb->snd_wnd_max = tcphdr->wnd; 8030aaa: bf38 it cc 8030aac: f8a4 0062 strhcc.w r0, [r4, #98] ; 0x62 8030ab0: f894 2091 ldrb.w r2, [r4, #145] ; 0x91 } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; if (pcb->snd_wnd == 0) { 8030ab4: b920 cbnz r0, 8030ac0 if (pcb->persist_backoff == 0) { 8030ab6: b93a cbnz r2, 8030ac8 /* start persist timer */ pcb->persist_cnt = 0; 8030ab8: f884 0090 strb.w r0, [r4, #144] ; 0x90 pcb->persist_backoff = 1; 8030abc: 2301 movs r3, #1 8030abe: e001 b.n 8030ac4 } } else if (pcb->persist_backoff > 0) { 8030ac0: b112 cbz r2, 8030ac8 /* stop persist timer */ pcb->persist_backoff = 0; 8030ac2: 2300 movs r3, #0 8030ac4: f884 3091 strb.w r3, [r4, #145] ; 0x91 * If it only passes 1, should reset dupack counter * */ /* Clause 1 */ if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { 8030ac8: 4b84 ldr r3, [pc, #528] ; (8030cdc ) 8030aca: 6ca2 ldr r2, [r4, #72] ; 0x48 8030acc: 681b ldr r3, [r3, #0] 8030ace: 1a98 subs r0, r3, r2 8030ad0: 2800 cmp r0, #0 8030ad2: dc34 bgt.n 8030b3e pcb->acked = 0; 8030ad4: 2000 movs r0, #0 8030ad6: f8a4 0064 strh.w r0, [r4, #100] ; 0x64 /* Clause 2 */ if (tcplen == 0) { 8030ada: 4882 ldr r0, [pc, #520] ; (8030ce4 ) 8030adc: 8800 ldrh r0, [r0, #0] 8030ade: 2800 cmp r0, #0 8030ae0: f040 81f4 bne.w 8030ecc /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){ 8030ae4: f8b4 6060 ldrh.w r6, [r4, #96] ; 0x60 8030ae8: 6da0 ldr r0, [r4, #88] ; 0x58 #endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 8030aea: 1869 adds r1, r5, r1 if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { pcb->acked = 0; /* Clause 2 */ if (tcplen == 0) { /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){ 8030aec: 1830 adds r0, r6, r0 8030aee: 4288 cmp r0, r1 8030af0: f040 81ec bne.w 8030ecc /* Clause 4 */ if (pcb->rtime >= 0) { 8030af4: f9b4 1034 ldrsh.w r1, [r4, #52] ; 0x34 8030af8: 2900 cmp r1, #0 8030afa: f2c0 81e7 blt.w 8030ecc /* Clause 5 */ if (pcb->lastack == ackno) { 8030afe: 429a cmp r2, r3 8030b00: f040 81e4 bne.w 8030ecc found_dupack = 1; if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 8030b04: f894 2047 ldrb.w r2, [r4, #71] ; 0x47 8030b08: 1c53 adds r3, r2, #1 8030b0a: b2db uxtb r3, r3 8030b0c: 4293 cmp r3, r2 ++pcb->dupacks; 8030b0e: bf88 it hi 8030b10: f884 3047 strbhi.w r3, [r4, #71] ; 0x47 } if (pcb->dupacks > 3) { 8030b14: f894 3047 ldrb.w r3, [r4, #71] ; 0x47 8030b18: 2b03 cmp r3, #3 8030b1a: d90a bls.n 8030b32 /* Inflate the congestion window, but not if it means that the value overflows. */ if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 8030b1c: f8b4 204c ldrh.w r2, [r4, #76] ; 0x4c 8030b20: 8ee3 ldrh r3, [r4, #54] ; 0x36 8030b22: 18d3 adds r3, r2, r3 8030b24: b29b uxth r3, r3 8030b26: 4293 cmp r3, r2 8030b28: f240 80b2 bls.w 8030c90 pcb->cwnd += pcb->mss; 8030b2c: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 8030b30: e0ae b.n 8030c90 } } else if (pcb->dupacks == 3) { 8030b32: f040 80ad bne.w 8030c90 /* Do fast retransmit */ tcp_rexmit_fast(pcb); 8030b36: 4620 mov r0, r4 8030b38: f001 fa92 bl 8032060 8030b3c: e0a8 b.n 8030c90 /* If Clause (1) or more is true, but not a duplicate ack, reset * count of consecutive duplicate acks */ if (!found_dupack) { pcb->dupacks = 0; } } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)){ 8030b3e: 43d1 mvns r1, r2 8030b40: 42d9 cmn r1, r3 8030b42: d47e bmi.n 8030c42 8030b44: 6d21 ldr r1, [r4, #80] ; 0x50 8030b46: 1a59 subs r1, r3, r1 8030b48: 2900 cmp r1, #0 8030b4a: dc7a bgt.n 8030c42 /* We come here when the ACK acknowledges new data. */ /* Reset the "IN Fast Retransmit" flag, since we are no longer in fast retransmit. Also reset the congestion window to the slow start threshold. */ if (pcb->flags & TF_INFR) { 8030b4c: 7fa1 ldrb r1, [r4, #30] 8030b4e: f001 0004 and.w r0, r1, #4 8030b52: b2c0 uxtb r0, r0 8030b54: b130 cbz r0, 8030b64 pcb->flags &= ~TF_INFR; 8030b56: f021 0104 bic.w r1, r1, #4 8030b5a: 77a1 strb r1, [r4, #30] pcb->cwnd = pcb->ssthresh; 8030b5c: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 8030b60: f8a4 104c strh.w r1, [r4, #76] ; 0x4c /* Reset the number of retransmissions. */ pcb->nrtx = 0; /* Reset the retransmission time-out. */ pcb->rto = (pcb->sa >> 3) + pcb->sv; 8030b64: f9b4 5040 ldrsh.w r5, [r4, #64] ; 0x40 8030b68: f8b4 0042 ldrh.w r0, [r4, #66] ; 0x42 pcb->snd_buf += pcb->acked; /* Reset the fast retransmit variables. */ pcb->dupacks = 0; pcb->lastack = ackno; 8030b6c: 64a3 str r3, [r4, #72] ; 0x48 /* Reset the number of retransmissions. */ pcb->nrtx = 0; /* Reset the retransmission time-out. */ pcb->rto = (pcb->sa >> 3) + pcb->sv; 8030b6e: eb00 00e5 add.w r0, r0, r5, asr #3 /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); 8030b72: 1a9a subs r2, r3, r2 /* Reset the number of retransmissions. */ pcb->nrtx = 0; /* Reset the retransmission time-out. */ pcb->rto = (pcb->sa >> 3) + pcb->sv; 8030b74: f8a4 0044 strh.w r0, [r4, #68] ; 0x44 pcb->dupacks = 0; pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 8030b78: 7e23 ldrb r3, [r4, #24] pcb->rto = (pcb->sa >> 3) + pcb->sv; /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); pcb->snd_buf += pcb->acked; 8030b7a: f8b4 0066 ldrh.w r0, [r4, #102] ; 0x66 /* Reset the retransmission time-out. */ pcb->rto = (pcb->sa >> 3) + pcb->sv; /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); 8030b7e: f8a4 2064 strh.w r2, [r4, #100] ; 0x64 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 8030b82: 2100 movs r1, #0 pcb->rto = (pcb->sa >> 3) + pcb->sv; /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); pcb->snd_buf += pcb->acked; 8030b84: 1812 adds r2, r2, r0 pcb->dupacks = 0; pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 8030b86: 2b03 cmp r3, #3 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 8030b88: f884 1046 strb.w r1, [r4, #70] ; 0x46 pcb->rto = (pcb->sa >> 3) + pcb->sv; /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); pcb->snd_buf += pcb->acked; 8030b8c: f8a4 2066 strh.w r2, [r4, #102] ; 0x66 /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 8030b90: f884 1047 strb.w r1, [r4, #71] ; 0x47 pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 8030b94: d931 bls.n 8030bfa if (pcb->cwnd < pcb->ssthresh) { 8030b96: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 8030b9a: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 8030b9e: 429a cmp r2, r3 if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 8030ba0: 8ee2 ldrh r2, [r4, #54] ; 0x36 pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { if (pcb->cwnd < pcb->ssthresh) { 8030ba2: d900 bls.n 8030ba6 8030ba4: e002 b.n 8030bac if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { pcb->cwnd += pcb->mss; } LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"U16_F"\n", pcb->cwnd)); } else { u16_t new_cwnd = (pcb->cwnd + pcb->mss * pcb->mss / pcb->cwnd); 8030ba6: 4352 muls r2, r2 8030ba8: fb92 f2f3 sdiv r2, r2, r3 8030bac: 189a adds r2, r3, r2 8030bae: b292 uxth r2, r2 if (new_cwnd > pcb->cwnd) { 8030bb0: 429a cmp r2, r3 8030bb2: d922 bls.n 8030bfa pcb->cwnd = new_cwnd; 8030bb4: f8a4 204c strh.w r2, [r4, #76] ; 0x4c 8030bb8: e01f b.n 8030bfa LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unacked\n", ntohl(pcb->unacked->tcphdr->seqno), ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked))); next = pcb->unacked; 8030bba: 6f25 ldr r5, [r4, #112] ; 0x70 pcb->unacked = pcb->unacked->next; 8030bbc: 682b ldr r3, [r5, #0] LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"U16_F" ... ", (u16_t)pcb->snd_queuelen)); LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); 8030bbe: 6868 ldr r0, [r5, #4] ntohl(pcb->unacked->tcphdr->seqno), ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked))); next = pcb->unacked; pcb->unacked = pcb->unacked->next; 8030bc0: 6723 str r3, [r4, #112] ; 0x70 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"U16_F" ... ", (u16_t)pcb->snd_queuelen)); LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); 8030bc2: f7ff f935 bl 802fe30 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 8030bc6: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030bca: b153 cbz r3, 8030be2 8030bcc: 68eb ldr r3, [r5, #12] 8030bce: 8998 ldrh r0, [r3, #12] 8030bd0: f7fd ff21 bl 802ea16 8030bd4: 07c3 lsls r3, r0, #31 8030bd6: d504 bpl.n 8030be2 pcb->acked--; 8030bd8: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030bdc: 3b01 subs r3, #1 8030bde: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 8030be2: 6868 ldr r0, [r5, #4] 8030be4: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 8030be8: f7ff f922 bl 802fe30 8030bec: 1a38 subs r0, r7, r0 8030bee: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 8030bf2: 4628 mov r0, r5 8030bf4: f7ff faf5 bl 80301e2 8030bf8: e000 b.n 8030bfc ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowlegdes them. */ while (pcb->unacked != NULL && TCP_SEQ_LEQ(ntohl(pcb->unacked->tcphdr->seqno) + 8030bfa: 4e38 ldr r6, [pc, #224] ; (8030cdc ) pcb->unacked != NULL? ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowlegdes them. */ while (pcb->unacked != NULL && 8030bfc: 6f23 ldr r3, [r4, #112] ; 0x70 8030bfe: b91b cbnz r3, 8030c08 } } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 8030c00: 6f22 ldr r2, [r4, #112] ; 0x70 8030c02: 2300 movs r3, #0 8030c04: b9d2 cbnz r2, 8030c3c 8030c06: e015 b.n 8030c34 ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowlegdes them. */ while (pcb->unacked != NULL && TCP_SEQ_LEQ(ntohl(pcb->unacked->tcphdr->seqno) + 8030c08: 68db ldr r3, [r3, #12] 8030c0a: 6858 ldr r0, [r3, #4] 8030c0c: f7fd ff0a bl 802ea24 8030c10: 6f23 ldr r3, [r4, #112] ; 0x70 8030c12: 891d ldrh r5, [r3, #8] 8030c14: 68db ldr r3, [r3, #12] 8030c16: 4607 mov r7, r0 8030c18: 8998 ldrh r0, [r3, #12] 8030c1a: f7fd fefc bl 802ea16 8030c1e: 6833 ldr r3, [r6, #0] 8030c20: f010 0003 ands.w r0, r0, #3 8030c24: bf18 it ne 8030c26: 2001 movne r0, #1 8030c28: 1afb subs r3, r7, r3 8030c2a: 1828 adds r0, r5, r0 8030c2c: 181b adds r3, r3, r0 pcb->unacked != NULL? ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowlegdes them. */ while (pcb->unacked != NULL && 8030c2e: 2b00 cmp r3, #0 8030c30: ddc3 ble.n 8030bba 8030c32: e7e5 b.n 8030c00 } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) pcb->rtime = -1; 8030c34: f64f 72ff movw r2, #65535 ; 0xffff 8030c38: 86a2 strh r2, [r4, #52] ; 0x34 8030c3a: e000 b.n 8030c3e else pcb->rtime = 0; 8030c3c: 86a3 strh r3, [r4, #52] ; 0x34 pcb->polltmr = 0; 8030c3e: 77e3 strb r3, [r4, #31] 8030c40: e026 b.n 8030c90 } else { /* Fix bug bug #21582: out of sequence ACK, didn't really ack anything */ pcb->acked = 0; 8030c42: 2300 movs r3, #0 8030c44: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 8030c48: e022 b.n 8030c90 TCP_TCPLEN(pcb->unsent), pcb->snd_nxt)) { LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unsent\n", ntohl(pcb->unsent->tcphdr->seqno), ntohl(pcb->unsent->tcphdr->seqno) + TCP_TCPLEN(pcb->unsent))); next = pcb->unsent; 8030c4a: 6ee5 ldr r5, [r4, #108] ; 0x6c pcb->unsent = pcb->unsent->next; 8030c4c: 682b ldr r3, [r5, #0] 8030c4e: 66e3 str r3, [r4, #108] ; 0x6c #if TCP_OVERSIZE if (pcb->unsent == NULL) { 8030c50: b90b cbnz r3, 8030c56 pcb->unsent_oversize = 0; 8030c52: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"U16_F" ... ", (u16_t)pcb->snd_queuelen)); LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); 8030c56: 6868 ldr r0, [r5, #4] 8030c58: f7ff f8ea bl 802fe30 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 8030c5c: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030c60: b153 cbz r3, 8030c78 8030c62: 68eb ldr r3, [r5, #12] 8030c64: 8998 ldrh r0, [r3, #12] 8030c66: f7fd fed6 bl 802ea16 8030c6a: 07c7 lsls r7, r0, #31 8030c6c: d504 bpl.n 8030c78 pcb->acked--; 8030c6e: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 8030c72: 3b01 subs r3, #1 8030c74: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 8030c78: 6868 ldr r0, [r5, #4] 8030c7a: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 8030c7e: f7ff f8d7 bl 802fe30 8030c82: 1a38 subs r0, r7, r0 8030c84: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 8030c88: 4628 mov r0, r5 8030c8a: f7ff faaa bl 80301e2 8030c8e: e000 b.n 8030c92 strange since an "unsent" segment shouldn't be acked. The rationale is that lwIP puts all outstanding segments on the ->unsent list after a retransmission, so these segments may in fact have been sent once. */ while (pcb->unsent != NULL && TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 8030c90: 4e12 ldr r6, [pc, #72] ; (8030cdc ) on the list are acknowledged by the ACK. This may seem strange since an "unsent" segment shouldn't be acked. The rationale is that lwIP puts all outstanding segments on the ->unsent list after a retransmission, so these segments may in fact have been sent once. */ while (pcb->unsent != NULL && 8030c92: 6ee3 ldr r3, [r4, #108] ; 0x6c 8030c94: b913 cbnz r3, 8030c9c pcb->rttest, pcb->rtseq, ackno)); /* RTT estimation calculations. This is done by checking if the incoming segment acknowledges the segment we use to take a round-trip time measurement. */ if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { 8030c96: 6ba3 ldr r3, [r4, #56] ; 0x38 8030c98: bb33 cbnz r3, 8030ce8 8030c9a: e04d b.n 8030d38 strange since an "unsent" segment shouldn't be acked. The rationale is that lwIP puts all outstanding segments on the ->unsent list after a retransmission, so these segments may in fact have been sent once. */ while (pcb->unsent != NULL && TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 8030c9c: 68db ldr r3, [r3, #12] 8030c9e: 6835 ldr r5, [r6, #0] 8030ca0: 6858 ldr r0, [r3, #4] 8030ca2: f7fd febf bl 802ea24 8030ca6: 6ee3 ldr r3, [r4, #108] ; 0x6c 8030ca8: 891f ldrh r7, [r3, #8] 8030caa: 68db ldr r3, [r3, #12] 8030cac: 4680 mov r8, r0 8030cae: 8998 ldrh r0, [r3, #12] 8030cb0: f7fd feb1 bl 802ea16 8030cb4: f010 0003 ands.w r0, r0, #3 8030cb8: bf18 it ne 8030cba: 2001 movne r0, #1 8030cbc: ebc8 0505 rsb r5, r8, r5 8030cc0: 1838 adds r0, r7, r0 8030cc2: 1a2d subs r5, r5, r0 on the list are acknowledged by the ACK. This may seem strange since an "unsent" segment shouldn't be acked. The rationale is that lwIP puts all outstanding segments on the ->unsent list after a retransmission, so these segments may in fact have been sent once. */ while (pcb->unsent != NULL && 8030cc4: 2d00 cmp r5, #0 8030cc6: dbe6 blt.n 8030c96 TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 8030cc8: 6832 ldr r2, [r6, #0] 8030cca: 6d23 ldr r3, [r4, #80] ; 0x50 8030ccc: 1ad3 subs r3, r2, r3 8030cce: 2b00 cmp r3, #0 8030cd0: ddbb ble.n 8030c4a 8030cd2: e7e0 b.n 8030c96 8030cd4: 2000c444 .word 0x2000c444 8030cd8: 2000c438 .word 0x2000c438 8030cdc: 2000c440 .word 0x2000c440 8030ce0: 2000c434 .word 0x2000c434 8030ce4: 2000c43c .word 0x2000c43c pcb->rttest, pcb->rtseq, ackno)); /* RTT estimation calculations. This is done by checking if the incoming segment acknowledges the segment we use to take a round-trip time measurement. */ if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { 8030ce8: 497b ldr r1, [pc, #492] ; (8030ed8 ) 8030cea: 6be2 ldr r2, [r4, #60] ; 0x3c 8030cec: 6809 ldr r1, [r1, #0] 8030cee: 1a52 subs r2, r2, r1 8030cf0: 2a00 cmp r2, #0 8030cf2: da21 bge.n 8030d38 /* diff between this shouldn't exceed 32K since this are tcp timer ticks and a round-trip shouldn't be that long... */ m = (s16_t)(tcp_ticks - pcb->rttest); 8030cf4: 4a79 ldr r2, [pc, #484] ; (8030edc ) LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", m, m * TCP_SLOW_INTERVAL)); /* This is taken directly from VJs original code in his paper */ m = m - (pcb->sa >> 3); 8030cf6: f8b4 1040 ldrh.w r1, [r4, #64] ; 0x40 incoming segment acknowledges the segment we use to take a round-trip time measurement. */ if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { /* diff between this shouldn't exceed 32K since this are tcp timer ticks and a round-trip shouldn't be that long... */ m = (s16_t)(tcp_ticks - pcb->rttest); 8030cfa: 6812 ldr r2, [r2, #0] LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", m, m * TCP_SLOW_INTERVAL)); /* This is taken directly from VJs original code in his paper */ m = m - (pcb->sa >> 3); 8030cfc: f341 00cc sbfx r0, r1, #3, #13 incoming segment acknowledges the segment we use to take a round-trip time measurement. */ if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { /* diff between this shouldn't exceed 32K since this are tcp timer ticks and a round-trip shouldn't be that long... */ m = (s16_t)(tcp_ticks - pcb->rttest); 8030d00: 1ad2 subs r2, r2, r3 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", m, m * TCP_SLOW_INTERVAL)); /* This is taken directly from VJs original code in his paper */ m = m - (pcb->sa >> 3); 8030d02: 1a12 subs r2, r2, r0 8030d04: b292 uxth r2, r2 8030d06: b293 uxth r3, r2 pcb->sa += m; 8030d08: 1851 adds r1, r2, r1 8030d0a: b289 uxth r1, r1 if (m < 0) { 8030d0c: 0418 lsls r0, r3, #16 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", m, m * TCP_SLOW_INTERVAL)); /* This is taken directly from VJs original code in his paper */ m = m - (pcb->sa >> 3); pcb->sa += m; 8030d0e: f8a4 1040 strh.w r1, [r4, #64] ; 0x40 if (m < 0) { 8030d12: d501 bpl.n 8030d18 m = -m; 8030d14: 4253 negs r3, r2 8030d16: b29b uxth r3, r3 } m = m - (pcb->sv >> 2); 8030d18: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 8030d1c: f342 008d sbfx r0, r2, #2, #14 8030d20: 1a12 subs r2, r2, r0 pcb->sv += m; 8030d22: 18d3 adds r3, r2, r3 8030d24: b29b uxth r3, r3 pcb->rto = (pcb->sa >> 3) + pcb->sv; 8030d26: f341 01cc sbfx r1, r1, #3, #13 pcb->sa += m; if (m < 0) { m = -m; } m = m - (pcb->sv >> 2); pcb->sv += m; 8030d2a: f8a4 3042 strh.w r3, [r4, #66] ; 0x42 pcb->rto = (pcb->sa >> 3) + pcb->sv; 8030d2e: 185b adds r3, r3, r1 8030d30: f8a4 3044 strh.w r3, [r4, #68] ; 0x44 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n", pcb->rto, pcb->rto * TCP_SLOW_INTERVAL)); pcb->rttest = 0; 8030d34: 2300 movs r3, #0 8030d36: 63a3 str r3, [r4, #56] ; 0x38 /* If the incoming segment contains data, we must process it further unless the pcb already received a FIN. (RFC 793, chapeter 3.9, "SEGMENT ARRIVES" in states CLOSE-WAIT, CLOSING, LAST-ACK and TIME-WAIT: "Ignore the segment text.") */ if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) { 8030d38: 4b69 ldr r3, [pc, #420] ; (8030ee0 ) 8030d3a: 4a6a ldr r2, [pc, #424] ; (8030ee4 ) 8030d3c: 8818 ldrh r0, [r3, #0] 8030d3e: 2800 cmp r0, #0 8030d40: f000 80b3 beq.w 8030eaa 8030d44: 7e23 ldrb r3, [r4, #24] 8030d46: 2b06 cmp r3, #6 8030d48: f200 80af bhi.w 8030eaa this if the sequence number of the incoming segment is less than rcv_nxt, and the sequence number plus the length of the segment is larger than rcv_nxt. */ /* if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)){ if (TCP_SEQ_LT(pcb->rcv_nxt, seqno + tcplen)) {*/ if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)){ 8030d4c: 6811 ldr r1, [r2, #0] 8030d4e: 6aa3 ldr r3, [r4, #40] ; 0x28 8030d50: 43ca mvns r2, r1 8030d52: 42da cmn r2, r3 8030d54: d425 bmi.n 8030da2 8030d56: 1c5a adds r2, r3, #1 8030d58: 1a52 subs r2, r2, r1 8030d5a: 1a10 subs r0, r2, r0 8030d5c: 2800 cmp r0, #0 8030d5e: dc20 bgt.n 8030da2 After we are done with adjusting the pbuf pointers we must adjust the ->data pointer in the seg and the segment length.*/ off = pcb->rcv_nxt - seqno; 8030d60: 1a59 subs r1, r3, r1 p = inseg.p; 8030d62: 4b61 ldr r3, [pc, #388] ; (8030ee8 ) 8030d64: 6858 ldr r0, [r3, #4] LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { 8030d66: 8943 ldrh r3, [r0, #10] 8030d68: 428b cmp r3, r1 8030d6a: da0a bge.n 8030d82 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); 8030d6c: 8902 ldrh r2, [r0, #8] off -= p->len; /* KJM following line changed (with addition of new_tot_len var) to fix bug #9076 inseg.p->tot_len -= p->len; */ p->tot_len = new_tot_len; p->len = 0; 8030d6e: 2500 movs r5, #0 p = inseg.p; LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); 8030d70: 1a52 subs r2, r2, r1 while (p->len < off) { 8030d72: e003 b.n 8030d7c off -= p->len; /* KJM following line changed (with addition of new_tot_len var) to fix bug #9076 inseg.p->tot_len -= p->len; */ p->tot_len = new_tot_len; 8030d74: 8102 strh r2, [r0, #8] p->len = 0; 8030d76: 8145 strh r5, [r0, #10] p = p->next; 8030d78: 6800 ldr r0, [r0, #0] LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); while (p->len < off) { off -= p->len; 8030d7a: 1ac9 subs r1, r1, r3 LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); while (p->len < off) { 8030d7c: 8943 ldrh r3, [r0, #10] 8030d7e: 428b cmp r3, r1 8030d80: dbf8 blt.n 8030d74 if(pbuf_header(p, (s16_t)-off)) { /* Do we need to cope with this failing? Assert for now */ LWIP_ASSERT("pbuf_header failed", 0); } } else { if(pbuf_header(inseg.p, (s16_t)-off)) { 8030d82: 4249 negs r1, r1 8030d84: b209 sxth r1, r1 8030d86: f7fe ff54 bl 802fc32 /* Do we need to cope with this failing? Assert for now */ LWIP_ASSERT("pbuf_header failed", 0); } } inseg.len -= (u16_t)(pcb->rcv_nxt - seqno); 8030d8a: 4a57 ldr r2, [pc, #348] ; (8030ee8 ) 8030d8c: 4955 ldr r1, [pc, #340] ; (8030ee4 ) 8030d8e: 8915 ldrh r5, [r2, #8] 8030d90: 6808 ldr r0, [r1, #0] 8030d92: 6aa3 ldr r3, [r4, #40] ; 0x28 8030d94: 1940 adds r0, r0, r5 8030d96: 1ac0 subs r0, r0, r3 8030d98: 8110 strh r0, [r2, #8] inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 8030d9a: 68d2 ldr r2, [r2, #12] 8030d9c: 600b str r3, [r1, #0] 8030d9e: 6053 str r3, [r2, #4] 8030da0: e006 b.n 8030db0 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)){ 8030da2: 1ac9 subs r1, r1, r3 8030da4: 2900 cmp r1, #0 8030da6: da03 bge.n 8030db0 /* the whole segment is < rcv_nxt */ /* must be a duplicate of a packet that has already been correctly handled */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: duplicate seqno %"U32_F"\n", seqno)); tcp_ack_now(pcb); 8030da8: 7fa3 ldrb r3, [r4, #30] 8030daa: f043 0302 orr.w r3, r3, #2 8030dae: 77a3 strb r3, [r4, #30] } /* The sequence number must be within the window (above rcv_nxt and below rcv_nxt + rcv_wnd) in order to be further processed. */ if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 8030db0: 4b4c ldr r3, [pc, #304] ; (8030ee4 ) 8030db2: 6aa2 ldr r2, [r4, #40] ; 0x28 8030db4: 681b ldr r3, [r3, #0] 8030db6: 1a99 subs r1, r3, r2 8030db8: 2900 cmp r1, #0 8030dba: db71 blt.n 8030ea0 8030dbc: 1c59 adds r1, r3, #1 8030dbe: 8da0 ldrh r0, [r4, #44] ; 0x2c 8030dc0: 1a89 subs r1, r1, r2 8030dc2: 1a09 subs r1, r1, r0 8030dc4: 2900 cmp r1, #0 8030dc6: dc6b bgt.n 8030ea0 pcb->rcv_nxt + pcb->rcv_wnd - 1)){ if (pcb->rcv_nxt == seqno) { 8030dc8: 429a cmp r2, r3 8030dca: d169 bne.n 8030ea0 /* The incoming segment is the next in sequence. We check if we have to trim the end of the segment and update rcv_nxt and pass the data to the application. */ tcplen = TCP_TCPLEN(&inseg); 8030dcc: 4d46 ldr r5, [pc, #280] ; (8030ee8 ) 8030dce: 68eb ldr r3, [r5, #12] 8030dd0: 892e ldrh r6, [r5, #8] 8030dd2: 8998 ldrh r0, [r3, #12] 8030dd4: f7fd fe1f bl 802ea16 8030dd8: f010 0003 ands.w r0, r0, #3 8030ddc: bf18 it ne 8030dde: 2001 movne r0, #1 8030de0: 4b3f ldr r3, [pc, #252] ; (8030ee0 ) 8030de2: 1830 adds r0, r6, r0 8030de4: b280 uxth r0, r0 8030de6: 8018 strh r0, [r3, #0] if (tcplen > pcb->rcv_wnd) { 8030de8: 8da3 ldrh r3, [r4, #44] ; 0x2c 8030dea: 4283 cmp r3, r0 8030dec: d230 bcs.n 8030e50 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: other end overran receive window" "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 8030dee: 68eb ldr r3, [r5, #12] 8030df0: 8998 ldrh r0, [r3, #12] 8030df2: f7fd fe10 bl 802ea16 8030df6: 07c0 lsls r0, r0, #31 8030df8: d50c bpl.n 8030e14 /* Must remove the FIN from the header as we're trimming * that byte of sequence-space from the packet */ TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) &~ TCP_FIN); 8030dfa: 68ed ldr r5, [r5, #12] 8030dfc: 89ae ldrh r6, [r5, #12] 8030dfe: 4630 mov r0, r6 8030e00: f7fd fe09 bl 802ea16 8030e04: f000 003e and.w r0, r0, #62 ; 0x3e 8030e08: f7fd fe00 bl 802ea0c 8030e0c: f426 567c bic.w r6, r6, #16128 ; 0x3f00 8030e10: 4330 orrs r0, r6 8030e12: 81a8 strh r0, [r5, #12] } /* Adjust length of segment to fit in the window. */ inseg.len = pcb->rcv_wnd; 8030e14: 8da3 ldrh r3, [r4, #44] ; 0x2c 8030e16: 4d34 ldr r5, [pc, #208] ; (8030ee8 ) 8030e18: 812b strh r3, [r5, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 8030e1a: 68eb ldr r3, [r5, #12] 8030e1c: 8998 ldrh r0, [r3, #12] 8030e1e: f7fd fdfa bl 802ea16 8030e22: f000 0002 and.w r0, r0, #2 8030e26: b280 uxth r0, r0 8030e28: b110 cbz r0, 8030e30 inseg.len -= 1; 8030e2a: 892b ldrh r3, [r5, #8] 8030e2c: 3b01 subs r3, #1 8030e2e: 812b strh r3, [r5, #8] } pbuf_realloc(inseg.p, inseg.len); 8030e30: 6868 ldr r0, [r5, #4] 8030e32: 8929 ldrh r1, [r5, #8] 8030e34: f7fe ff4f bl 802fcd6 tcplen = TCP_TCPLEN(&inseg); 8030e38: 68eb ldr r3, [r5, #12] 8030e3a: 892e ldrh r6, [r5, #8] 8030e3c: 8998 ldrh r0, [r3, #12] 8030e3e: f7fd fdea bl 802ea16 8030e42: f010 0003 ands.w r0, r0, #3 8030e46: bf18 it ne 8030e48: 2001 movne r0, #1 8030e4a: 4b25 ldr r3, [pc, #148] ; (8030ee0 ) 8030e4c: 1830 adds r0, r6, r0 8030e4e: 8018 strh r0, [r3, #0] pcb->ooseq = next; } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 8030e50: 4b23 ldr r3, [pc, #140] ; (8030ee0 ) 8030e52: 4a24 ldr r2, [pc, #144] ; (8030ee4 ) 8030e54: 881b ldrh r3, [r3, #0] 8030e56: 6812 ldr r2, [r2, #0] 8030e58: 189a adds r2, r3, r2 8030e5a: 62a2 str r2, [r4, #40] ; 0x28 /* Update the receiver's (our) window. */ LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); pcb->rcv_wnd -= tcplen; 8030e5c: 8da2 ldrh r2, [r4, #44] ; 0x2c 8030e5e: 1ad3 subs r3, r2, r3 8030e60: 85a3 strh r3, [r4, #44] ; 0x2c tcp_update_rcv_ann_wnd(pcb); 8030e62: 4620 mov r0, r4 8030e64: f7ff f986 bl 8030174 chains its data on this pbuf as well. If the segment was a FIN, we set the TF_GOT_FIN flag that will be used to indicate to the application that the remote side has closed its end of the connection. */ if (inseg.p->tot_len > 0) { 8030e68: 4b1f ldr r3, [pc, #124] ; (8030ee8 ) 8030e6a: 685a ldr r2, [r3, #4] 8030e6c: 8911 ldrh r1, [r2, #8] 8030e6e: b119 cbz r1, 8030e78 recv_data = inseg.p; 8030e70: 491e ldr r1, [pc, #120] ; (8030eec ) 8030e72: 600a str r2, [r1, #0] /* Since this pbuf now is the responsibility of the application, we delete our reference to it so that we won't (mistakingly) deallocate it. */ inseg.p = NULL; 8030e74: 2200 movs r2, #0 8030e76: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 8030e78: 68db ldr r3, [r3, #12] 8030e7a: 8998 ldrh r0, [r3, #12] 8030e7c: f7fd fdcb bl 802ea16 8030e80: 07c1 lsls r1, r0, #31 8030e82: d504 bpl.n 8030e8e LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 8030e84: 4b1a ldr r3, [pc, #104] ; (8030ef0 ) 8030e86: 781a ldrb r2, [r3, #0] 8030e88: f042 0220 orr.w r2, r2, #32 8030e8c: 701a strb r2, [r3, #0] } #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 8030e8e: 7fa3 ldrb r3, [r4, #30] 8030e90: 07da lsls r2, r3, #31 8030e92: d502 bpl.n 8030e9a 8030e94: f023 0301 bic.w r3, r3, #1 8030e98: e013 b.n 8030ec2 8030e9a: f043 0301 orr.w r3, r3, #1 8030e9e: e012 b.n 8030ec6 } else { /* We get here if the incoming segment is out-of-sequence. */ tcp_send_empty_ack(pcb); 8030ea0: 4620 mov r0, r4 TCP_SEQ_GEQ(seqno, pcb->rcv_nxt + pcb->rcv_wnd)) {*/ if(!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd-1)){ tcp_ack_now(pcb); } } } 8030ea2: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} /* Acknowledge the segment(s). */ tcp_ack(pcb); } else { /* We get here if the incoming segment is out-of-sequence. */ tcp_send_empty_ack(pcb); 8030ea6: f000 bf09 b.w 8031cbc } else { /* Segments with length 0 is taken care of here. Segments that fall out of the window are ACKed. */ /*if (TCP_SEQ_GT(pcb->rcv_nxt, seqno) || TCP_SEQ_GEQ(seqno, pcb->rcv_nxt + pcb->rcv_wnd)) {*/ if(!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd-1)){ 8030eaa: 6812 ldr r2, [r2, #0] 8030eac: 6aa3 ldr r3, [r4, #40] ; 0x28 8030eae: 1ad1 subs r1, r2, r3 8030eb0: 2900 cmp r1, #0 8030eb2: db05 blt.n 8030ec0 8030eb4: 3201 adds r2, #1 8030eb6: 8da1 ldrh r1, [r4, #44] ; 0x2c 8030eb8: 1ad3 subs r3, r2, r3 8030eba: 1a5b subs r3, r3, r1 8030ebc: 2b00 cmp r3, #0 8030ebe: dd09 ble.n 8030ed4 tcp_ack_now(pcb); 8030ec0: 7fa3 ldrb r3, [r4, #30] 8030ec2: f043 0302 orr.w r3, r3, #2 8030ec6: 77a3 strb r3, [r4, #30] 8030ec8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } } /* If Clause (1) or more is true, but not a duplicate ack, reset * count of consecutive duplicate acks */ if (!found_dupack) { pcb->dupacks = 0; 8030ecc: 2300 movs r3, #0 8030ece: f884 3047 strb.w r3, [r4, #71] ; 0x47 8030ed2: e6dd b.n 8030c90 8030ed4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8030ed8: 2000c440 .word 0x2000c440 8030edc: 2000ff24 .word 0x2000ff24 8030ee0: 2000c43c .word 0x2000c43c 8030ee4: 2000c438 .word 0x2000c438 8030ee8: 2000c450 .word 0x2000c450 8030eec: 2000c448 .word 0x2000c448 8030ef0: 2000c445 .word 0x2000c445 08030ef4 : * @param p received TCP segment to process (p->payload pointing to the IP header) * @param inp network interface on which this segment was received */ void tcp_input(struct pbuf *p, struct netif *inp) { 8030ef4: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8030ef8: 4606 mov r6, r0 8030efa: 460f mov r7, r1 err_t err; PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); 8030efc: f003 fcb8 bl 8034870 iphdr = (struct ip_hdr *)p->payload; 8030f00: 6873 ldr r3, [r6, #4] 8030f02: 4aa7 ldr r2, [pc, #668] ; (80311a0 ) tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8030f04: 4ca7 ldr r4, [pc, #668] ; (80311a4 ) PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; 8030f06: 6013 str r3, [r2, #0] tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8030f08: 781a ldrb r2, [r3, #0] 8030f0a: f002 020f and.w r2, r2, #15 #if TCP_INPUT_DEBUG tcp_debug_print(tcphdr); #endif /* remove header from payload */ if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))) || (p->tot_len < sizeof(struct tcp_hdr))) { 8030f0e: 0091 lsls r1, r2, #2 TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8030f10: eb03 0382 add.w r3, r3, r2, lsl #2 #if TCP_INPUT_DEBUG tcp_debug_print(tcphdr); #endif /* remove header from payload */ if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))) || (p->tot_len < sizeof(struct tcp_hdr))) { 8030f14: 4630 mov r0, r6 8030f16: 4249 negs r1, r1 TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8030f18: 6023 str r3, [r4, #0] #if TCP_INPUT_DEBUG tcp_debug_print(tcphdr); #endif /* remove header from payload */ if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))) || (p->tot_len < sizeof(struct tcp_hdr))) { 8030f1a: f7fe fe8a bl 802fc32 8030f1e: 2800 cmp r0, #0 8030f20: f040 83ce bne.w 80316c0 8030f24: 8933 ldrh r3, [r6, #8] 8030f26: 2b13 cmp r3, #19 8030f28: f240 83ca bls.w 80316c0 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp) || 8030f2c: 4d9e ldr r5, [pc, #632] ; (80311a8 ) 8030f2e: 4639 mov r1, r7 8030f30: 6828 ldr r0, [r5, #0] 8030f32: f001 fd43 bl 80329bc 8030f36: 2800 cmp r0, #0 8030f38: f040 83c2 bne.w 80316c0 ip_addr_ismulticast(¤t_iphdr_dest)) { 8030f3c: 682b ldr r3, [r5, #0] 8030f3e: f003 03f0 and.w r3, r3, #240 ; 0xf0 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp) || 8030f42: 2be0 cmp r3, #224 ; 0xe0 8030f44: f000 83bc beq.w 80316c0 } #endif /* Move the payload pointer in the pbuf so that it points to the TCP data instead of the TCP header. */ hdrlen = TCPH_HDRLEN(tcphdr); 8030f48: 6823 ldr r3, [r4, #0] 8030f4a: 8998 ldrh r0, [r3, #12] 8030f4c: f7fd fd63 bl 802ea16 if(pbuf_header(p, -(hdrlen * 4))){ 8030f50: f06f 0103 mvn.w r1, #3 8030f54: f3c0 3307 ubfx r3, r0, #12, #8 8030f58: 4359 muls r1, r3 8030f5a: 4630 mov r0, r6 8030f5c: f7fe fe69 bl 802fc32 8030f60: 4683 mov fp, r0 8030f62: 2800 cmp r0, #0 8030f64: f040 83ac bne.w 80316c0 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); 8030f68: 6827 ldr r7, [r4, #0] 8030f6a: 8838 ldrh r0, [r7, #0] 8030f6c: f7fd fd53 bl 802ea16 8030f70: 8038 strh r0, [r7, #0] tcphdr->dest = ntohs(tcphdr->dest); 8030f72: 6827 ldr r7, [r4, #0] 8030f74: 8878 ldrh r0, [r7, #2] 8030f76: f7fd fd4e bl 802ea16 8030f7a: 8078 strh r0, [r7, #2] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); 8030f7c: 6827 ldr r7, [r4, #0] 8030f7e: 6878 ldr r0, [r7, #4] 8030f80: f7fd fd50 bl 802ea24 8030f84: 4b89 ldr r3, [pc, #548] ; (80311ac ) 8030f86: 6078 str r0, [r7, #4] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 8030f88: 6827 ldr r7, [r4, #0] } /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); 8030f8a: 6018 str r0, [r3, #0] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 8030f8c: 68b8 ldr r0, [r7, #8] 8030f8e: f7fd fd49 bl 802ea24 8030f92: 4b87 ldr r3, [pc, #540] ; (80311b0 ) 8030f94: 60b8 str r0, [r7, #8] tcphdr->wnd = ntohs(tcphdr->wnd); 8030f96: 6827 ldr r7, [r4, #0] /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 8030f98: 6018 str r0, [r3, #0] tcphdr->wnd = ntohs(tcphdr->wnd); 8030f9a: 89f8 ldrh r0, [r7, #14] 8030f9c: f7fd fd3b bl 802ea16 8030fa0: 81f8 strh r0, [r7, #14] flags = TCPH_FLAGS(tcphdr); 8030fa2: 6823 ldr r3, [r4, #0] 8030fa4: 8998 ldrh r0, [r3, #12] 8030fa6: f7fd fd36 bl 802ea16 8030faa: 4b82 ldr r3, [pc, #520] ; (80311b4 ) tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8030fac: f8b6 8008 ldrh.w r8, [r6, #8] for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && 8030fb0: 6827 ldr r7, [r4, #0] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8030fb2: f010 0c03 ands.w ip, r0, #3 tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); 8030fb6: f000 013f and.w r1, r0, #63 ; 0x3f tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8030fba: bf18 it ne 8030fbc: f04f 0c01 movne.w ip, #1 tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); 8030fc0: 7019 strb r1, [r3, #0] tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8030fc2: 44c4 add ip, r8 8030fc4: 4b7c ldr r3, [pc, #496] ; (80311b8 ) LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && pcb->local_port == tcphdr->dest && ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest)) { 8030fc6: 6829 ldr r1, [r5, #0] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8030fc8: fa1f fc8c uxth.w ip, ip 8030fcc: f8a3 c000 strh.w ip, [r3] /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8030fd0: 4b7a ldr r3, [pc, #488] ; (80311bc ) 8030fd2: f8d3 a000 ldr.w sl, [r3] LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && pcb->local_port == tcphdr->dest && ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 8030fd6: 4b7a ldr r3, [pc, #488] ; (80311c0 ) tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); 8030fd8: 4602 mov r2, r0 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && pcb->local_port == tcphdr->dest && ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 8030fda: f8d3 9000 ldr.w r9, [r3] /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8030fde: 4654 mov r4, sl flags = TCPH_FLAGS(tcphdr); tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; 8030fe0: 4658 mov r0, fp for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8030fe2: e019 b.n 8031018 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && 8030fe4: 8ba5 ldrh r5, [r4, #28] 8030fe6: 883b ldrh r3, [r7, #0] 8030fe8: 429d cmp r5, r3 8030fea: d113 bne.n 8031014 8030fec: 8b65 ldrh r5, [r4, #26] 8030fee: 887b ldrh r3, [r7, #2] 8030ff0: 429d cmp r5, r3 8030ff2: d10f bne.n 8031014 pcb->local_port == tcphdr->dest && 8030ff4: 6863 ldr r3, [r4, #4] 8030ff6: 454b cmp r3, r9 8030ff8: d10c bne.n 8031014 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 8030ffa: 6823 ldr r3, [r4, #0] 8030ffc: 428b cmp r3, r1 8030ffe: d109 bne.n 8031014 /* Move this PCB to the front of the list so that subsequent lookups will be faster (we exploit locality in TCP segment arrivals). */ LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); if (prev != NULL) { 8031000: 2800 cmp r0, #0 8031002: f000 8382 beq.w 803170a prev->next = pcb->next; 8031006: 68e3 ldr r3, [r4, #12] 8031008: 60c3 str r3, [r0, #12] pcb->next = tcp_active_pcbs; tcp_active_pcbs = pcb; 803100a: 4b6c ldr r3, [pc, #432] ; (80311bc ) lookups will be faster (we exploit locality in TCP segment arrivals). */ LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); if (prev != NULL) { prev->next = pcb->next; pcb->next = tcp_active_pcbs; 803100c: f8c4 a00c str.w sl, [r4, #12] tcp_active_pcbs = pcb; 8031010: 601c str r4, [r3, #0] 8031012: e37a b.n 803170a 8031014: 4620 mov r0, r4 /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8031016: 68e4 ldr r4, [r4, #12] 8031018: 2c00 cmp r4, #0 803101a: d1e3 bne.n 8030fe4 803101c: e372 b.n 8031704 if (pcb == NULL) { /* If it did not go to an active connection, we check the connections in the TIME-WAIT state. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); if (pcb->remote_port == tcphdr->src && 803101e: 8b98 ldrh r0, [r3, #28] 8031020: 883c ldrh r4, [r7, #0] 8031022: 4284 cmp r4, r0 8031024: d130 bne.n 8031088 pcb->local_port == tcphdr->dest && 8031026: 8b58 ldrh r0, [r3, #26] if (pcb == NULL) { /* If it did not go to an active connection, we check the connections in the TIME-WAIT state. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); if (pcb->remote_port == tcphdr->src && 8031028: 887d ldrh r5, [r7, #2] 803102a: 4285 cmp r5, r0 803102c: d12c bne.n 8031088 pcb->local_port == tcphdr->dest && 803102e: 6858 ldr r0, [r3, #4] 8031030: 4548 cmp r0, r9 8031032: d129 bne.n 8031088 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 8031034: 6818 ldr r0, [r3, #0] 8031036: 4288 cmp r0, r1 8031038: d126 bne.n 8031088 /* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */ /* RFC 793 3.9 Event Processing - Segment Arrives: * - first check sequence number - we skip that one in TIME_WAIT (always * acceptable since we only send ACKs) * - second check the RST bit (... return) */ if (flags & TCP_RST) { 803103a: f002 0104 and.w r1, r2, #4 803103e: b2c9 uxtb r1, r1 8031040: 2900 cmp r1, #0 8031042: f040 833f bne.w 80316c4 return ERR_OK; } /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 8031046: f002 0102 and.w r1, r2, #2 803104a: b2c9 uxtb r1, r1 803104c: b159 cbz r1, 8031066 /* If an incoming segment is not acceptable, an acknowledgment should be sent in reply */ if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt+pcb->rcv_wnd)) { 803104e: 4a57 ldr r2, [pc, #348] ; (80311ac ) 8031050: 6811 ldr r1, [r2, #0] 8031052: 6a9a ldr r2, [r3, #40] ; 0x28 8031054: 1a8a subs r2, r1, r2 8031056: d40b bmi.n 8031070 8031058: 8d98 ldrh r0, [r3, #44] ; 0x2c 803105a: 1a12 subs r2, r2, r0 803105c: 2a00 cmp r2, #0 803105e: dc07 bgt.n 8031070 /* If the SYN is in the window it is an error, send a reset */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 8031060: 9500 str r5, [sp, #0] 8031062: 9401 str r4, [sp, #4] 8031064: e041 b.n 80310ea tcphdr->dest, tcphdr->src); return ERR_OK; } } else if (flags & TCP_FIN) { 8031066: 07d2 lsls r2, r2, #31 8031068: d502 bpl.n 8031070 /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 803106a: 4a56 ldr r2, [pc, #344] ; (80311c4 ) 803106c: 6812 ldr r2, [r2, #0] 803106e: 625a str r2, [r3, #36] ; 0x24 } if ((tcplen > 0)) { 8031070: f1bc 0f00 cmp.w ip, #0 8031074: f000 8326 beq.w 80316c4 /* Acknowledge data, FIN or out-of-window SYN */ pcb->flags |= TF_ACK_NOW; 8031078: 7f9a ldrb r2, [r3, #30] 803107a: f042 0202 orr.w r2, r2, #2 803107e: 779a strb r2, [r3, #30] return tcp_output(pcb); 8031080: 4618 mov r0, r3 8031082: f000 fe3d bl 8031d00 8031086: e31d b.n 80316c4 } if (pcb == NULL) { /* If it did not go to an active connection, we check the connections in the TIME-WAIT state. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 8031088: 68db ldr r3, [r3, #12] 803108a: 2b00 cmp r3, #0 803108c: d1c7 bne.n 803101e } /* Finally, if we still did not get a match, we check all PCBs that are LISTENing for incoming connections. */ prev = NULL; for(lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 803108e: 484e ldr r0, [pc, #312] ; (80311c8 ) 8031090: 6804 ldr r4, [r0, #0] 8031092: 4625 mov r5, r4 8031094: e00f b.n 80310b6 if (lpcb->local_port == tcphdr->dest) { 8031096: 8b68 ldrh r0, [r5, #26] 8031098: f8b7 8002 ldrh.w r8, [r7, #2] 803109c: 4580 cmp r8, r0 803109e: d108 bne.n 80310b2 /* found an ANY-match */ lpcb_any = lpcb; lpcb_prev = prev; } #else /* SO_REUSE */ if (ip_addr_cmp(&(lpcb->local_ip), ¤t_iphdr_dest) || 80310a0: f8d5 8000 ldr.w r8, [r5] 80310a4: 4588 cmp r8, r1 80310a6: f000 8342 beq.w 803172e ip_addr_isany(&(lpcb->local_ip))) { 80310aa: f1b8 0f00 cmp.w r8, #0 80310ae: f000 833e beq.w 803172e 80310b2: 462b mov r3, r5 } /* Finally, if we still did not get a match, we check all PCBs that are LISTENing for incoming connections. */ prev = NULL; for(lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 80310b4: 68ed ldr r5, [r5, #12] 80310b6: 2d00 cmp r5, #0 80310b8: d1ed bne.n 8031096 80310ba: e33c b.n 8031736 if (lpcb != NULL) { /* Move this PCB to the front of the list so that subsequent lookups will be faster (we exploit locality in TCP segment arrivals). */ if (prev != NULL) { ((struct tcp_pcb_listen *)prev)->next = lpcb->next; 80310bc: 68e9 ldr r1, [r5, #12] 80310be: 60d9 str r1, [r3, #12] /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 80310c0: 4b41 ldr r3, [pc, #260] ; (80311c8 ) lookups will be faster (we exploit locality in TCP segment arrivals). */ if (prev != NULL) { ((struct tcp_pcb_listen *)prev)->next = lpcb->next; /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; 80310c2: 60ec str r4, [r5, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 80310c4: 601d str r5, [r3, #0] tcp_listen_input(struct tcp_pcb_listen *pcb) { struct tcp_pcb *npcb; err_t rc; if (flags & TCP_RST) { 80310c6: f002 0304 and.w r3, r2, #4 80310ca: b2db uxtb r3, r3 80310cc: 2b00 cmp r3, #0 80310ce: f040 82f9 bne.w 80316c4 return ERR_OK; } /* In the LISTEN state, we check for incoming SYN segments, creates a new PCB, and responds with a SYN|ACK. */ if (flags & TCP_ACK) { 80310d2: f002 0810 and.w r8, r2, #16 80310d6: fa5f f888 uxtb.w r8, r8 80310da: f1b8 0f00 cmp.w r8, #0 80310de: d00c beq.n 80310fa /* For incoming segments with the ACK flag set, respond with a RST. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n")); tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), 80310e0: 4b32 ldr r3, [pc, #200] ; (80311ac ) 80310e2: 6819 ldr r1, [r3, #0] 80310e4: 9000 str r0, [sp, #0] 80310e6: 883b ldrh r3, [r7, #0] 80310e8: 9301 str r3, [sp, #4] 80310ea: 4b31 ldr r3, [pc, #196] ; (80311b0 ) 80310ec: 6818 ldr r0, [r3, #0] 80310ee: 4461 add r1, ip 80310f0: 4a2d ldr r2, [pc, #180] ; (80311a8 ) 80310f2: 4b33 ldr r3, [pc, #204] ; (80311c0 ) 80310f4: f000 ff28 bl 8031f48 80310f8: e2e4 b.n 80316c4 ip_current_src_addr(), tcphdr->dest, tcphdr->src); } else if (flags & TCP_SYN) { 80310fa: f002 0202 and.w r2, r2, #2 80310fe: b2d2 uxtb r2, r2 8031100: 2a00 cmp r2, #0 8031102: f000 82df beq.w 80316c4 if (pcb->accepts_pending >= pcb->backlog) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_listen_input: listen backlog exceeded for port %"U16_F"\n", tcphdr->dest)); return ERR_ABRT; } #endif /* TCP_LISTEN_BACKLOG */ npcb = tcp_alloc(pcb->prio); 8031106: 7e68 ldrb r0, [r5, #25] 8031108: f7ff fbc6 bl 8030898 /* If a new PCB could not be created (probably due to lack of memory), we don't do anything, but rely on the sender will retransmit the SYN at a time when we have more memory available. */ if (npcb == NULL) { 803110c: 4604 mov r4, r0 803110e: 2800 cmp r0, #0 8031110: f000 82d8 beq.w 80316c4 } #if TCP_LISTEN_BACKLOG pcb->accepts_pending++; #endif /* TCP_LISTEN_BACKLOG */ /* Set up the new PCB. */ ip_addr_copy(npcb->local_ip, current_iphdr_dest); 8031114: 4b24 ldr r3, [pc, #144] ; (80311a8 ) 8031116: 681b ldr r3, [r3, #0] 8031118: 6003 str r3, [r0, #0] npcb->local_port = pcb->local_port; 803111a: 8b6b ldrh r3, [r5, #26] 803111c: 8343 strh r3, [r0, #26] ip_addr_copy(npcb->remote_ip, current_iphdr_src); 803111e: 4b28 ldr r3, [pc, #160] ; (80311c0 ) 8031120: 681b ldr r3, [r3, #0] 8031122: 6043 str r3, [r0, #4] npcb->remote_port = tcphdr->src; 8031124: 4b1f ldr r3, [pc, #124] ; (80311a4 ) 8031126: 681b ldr r3, [r3, #0] 8031128: 7859 ldrb r1, [r3, #1] 803112a: 781a ldrb r2, [r3, #0] 803112c: ea42 2201 orr.w r2, r2, r1, lsl #8 8031130: 8382 strh r2, [r0, #28] npcb->state = SYN_RCVD; 8031132: 2203 movs r2, #3 8031134: 7602 strb r2, [r0, #24] npcb->rcv_nxt = seqno + 1; 8031136: 4a1d ldr r2, [pc, #116] ; (80311ac ) 8031138: 6812 ldr r2, [r2, #0] 803113a: 1c51 adds r1, r2, #1 803113c: 6281 str r1, [r0, #40] ; 0x28 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 803113e: 6301 str r1, [r0, #48] ; 0x30 npcb->snd_wnd = tcphdr->wnd; 8031140: 89db ldrh r3, [r3, #14] 8031142: f8a0 3060 strh.w r3, [r0, #96] ; 0x60 npcb->snd_wnd_max = tcphdr->wnd; 8031146: f8a0 3062 strh.w r3, [r0, #98] ; 0x62 npcb->ssthresh = npcb->snd_wnd; 803114a: f8a0 304e strh.w r3, [r0, #78] ; 0x4e npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ npcb->callback_arg = pcb->callback_arg; 803114e: 692b ldr r3, [r5, #16] 8031150: 6103 str r3, [r0, #16] #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 8031152: 696b ldr r3, [r5, #20] npcb->rcv_nxt = seqno + 1; npcb->rcv_ann_right_edge = npcb->rcv_nxt; npcb->snd_wnd = tcphdr->wnd; npcb->snd_wnd_max = tcphdr->wnd; npcb->ssthresh = npcb->snd_wnd; npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ 8031154: 3a01 subs r2, #1 8031156: 6542 str r2, [r0, #84] ; 0x54 npcb->callback_arg = pcb->callback_arg; #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 8031158: 6143 str r3, [r0, #20] #endif /* LWIP_CALLBACK_API */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; 803115a: 7a2b ldrb r3, [r5, #8] 803115c: f023 0373 bic.w r3, r3, #115 ; 0x73 8031160: 7203 strb r3, [r0, #8] /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); 8031162: 4b16 ldr r3, [pc, #88] ; (80311bc ) 8031164: 681a ldr r2, [r3, #0] 8031166: 6018 str r0, [r3, #0] 8031168: 60c2 str r2, [r0, #12] 803116a: f001 f887 bl 803227c 803116e: 4b17 ldr r3, [pc, #92] ; (80311cc ) 8031170: 2201 movs r2, #1 /* Parse any options in the SYN. */ tcp_parseopt(npcb); 8031172: 4620 mov r0, r4 #endif /* LWIP_CALLBACK_API */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); 8031174: 701a strb r2, [r3, #0] /* Parse any options in the SYN. */ tcp_parseopt(npcb); 8031176: f7ff fc29 bl 80309cc #if TCP_CALCULATE_EFF_SEND_MSS npcb->mss = tcp_eff_send_mss(npcb->mss, &(npcb->remote_ip)); 803117a: 1d21 adds r1, r4, #4 803117c: 8ee0 ldrh r0, [r4, #54] ; 0x36 803117e: f7ff fc16 bl 80309ae 8031182: 86e0 strh r0, [r4, #54] ; 0x36 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ snmp_inc_tcppassiveopens(); 8031184: f003 fb5c bl 8034840 /* Send a SYN|ACK together with the MSS option. */ rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 8031188: 4620 mov r0, r4 803118a: 2112 movs r1, #18 803118c: f000 fd28 bl 8031be0 if (rc != ERR_OK) { 8031190: b120 cbz r0, 803119c tcp_abandon(npcb, 0); 8031192: 4620 mov r0, r4 8031194: 4641 mov r1, r8 8031196: f7ff f9e1 bl 803055c 803119a: e293 b.n 80316c4 return rc; } return tcp_output(npcb); 803119c: 4620 mov r0, r4 803119e: e770 b.n 8031082 80311a0: 2000c44c .word 0x2000c44c 80311a4: 2000c434 .word 0x2000c434 80311a8: 2000ff48 .word 0x2000ff48 80311ac: 2000c438 .word 0x2000c438 80311b0: 2000c440 .word 0x2000c440 80311b4: 2000c444 .word 0x2000c444 80311b8: 2000c43c .word 0x2000c43c 80311bc: 2000ff20 .word 0x2000ff20 80311c0: 2000ff40 .word 0x2000ff40 80311c4: 2000ff24 .word 0x2000ff24 80311c8: 2000ff28 .word 0x2000ff28 80311cc: 2000ff1c .word 0x2000ff1c recv_data = NULL; recv_flags = 0; if (flags & TCP_PSH) { p->flags |= PBUF_FLAG_PUSH; 80311d0: 7b73 ldrb r3, [r6, #13] 80311d2: f043 0301 orr.w r3, r3, #1 80311d6: 7373 strb r3, [r6, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 80311d8: 6f63 ldr r3, [r4, #116] ; 0x74 80311da: b163 cbz r3, 80311f6 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 80311dc: 4620 mov r0, r4 80311de: f7ff fad1 bl 8030784 80311e2: 300a adds r0, #10 80311e4: d004 beq.n 80311f0 80311e6: 6f63 ldr r3, [r4, #116] ; 0x74 80311e8: b12b cbz r3, 80311f6 ((pcb->refused_data != NULL) && (tcplen > 0))) { 80311ea: 4b9f ldr r3, [pc, #636] ; (8031468 ) 80311ec: 881b ldrh r3, [r3, #0] 80311ee: b113 cbz r3, 80311f6 /* pcb has been aborted or refused data is still refused and the new segment contains data */ TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 80311f0: f003 fb56 bl 80348a0 goto aborted; 80311f4: e249 b.n 803168a } } tcp_input_pcb = pcb; 80311f6: 4b9d ldr r3, [pc, #628] ; (803146c ) 80311f8: 601c str r4, [r3, #0] err_t err; err = ERR_OK; /* Process incoming RST segments. */ if (flags & TCP_RST) { 80311fa: 4b9d ldr r3, [pc, #628] ; (8031470 ) 80311fc: 781b ldrb r3, [r3, #0] 80311fe: f003 0204 and.w r2, r3, #4 8031202: b2d2 uxtb r2, r2 8031204: b1aa cbz r2, 8031232 /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 8031206: 7e23 ldrb r3, [r4, #24] 8031208: 2b02 cmp r3, #2 803120a: d106 bne.n 803121a if (ackno == pcb->snd_nxt) { 803120c: 4b99 ldr r3, [pc, #612] ; (8031474 ) 803120e: 681a ldr r2, [r3, #0] 8031210: 6d23 ldr r3, [r4, #80] ; 0x50 8031212: 429a cmp r2, r3 8031214: f040 82a1 bne.w 803175a 8031218: e296 b.n 8031748 acceptable = 1; } } else { if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 803121a: 4b97 ldr r3, [pc, #604] ; (8031478 ) 803121c: 681a ldr r2, [r3, #0] 803121e: 6aa3 ldr r3, [r4, #40] ; 0x28 8031220: 1ad3 subs r3, r2, r3 8031222: f100 829a bmi.w 803175a 8031226: 8da1 ldrh r1, [r4, #44] ; 0x2c 8031228: 1a5b subs r3, r3, r1 803122a: 2b00 cmp r3, #0 803122c: f300 8295 bgt.w 803175a 8031230: e28a b.n 8031748 seqno, pcb->rcv_nxt)); return ERR_OK; } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 8031232: f003 0302 and.w r3, r3, #2 8031236: b2db uxtb r3, r3 8031238: b123 cbz r3, 8031244 803123a: 7e23 ldrb r3, [r4, #24] 803123c: 3b02 subs r3, #2 803123e: 2b01 cmp r3, #1 8031240: d900 bls.n 8031244 8031242: e06b b.n 803131c /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); return ERR_OK; } if ((pcb->flags & TF_RXCLOSED) == 0) { 8031244: 7fa3 ldrb r3, [r4, #30] 8031246: f003 0310 and.w r3, r3, #16 803124a: b2db uxtb r3, r3 803124c: b913 cbnz r3, 8031254 /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 803124e: 4b8b ldr r3, [pc, #556] ; (803147c ) 8031250: 681b ldr r3, [r3, #0] 8031252: 6263 str r3, [r4, #36] ; 0x24 } pcb->keep_cnt_sent = 0; 8031254: 2300 movs r3, #0 8031256: f884 3092 strb.w r3, [r4, #146] ; 0x92 tcp_parseopt(pcb); 803125a: 4620 mov r0, r4 803125c: f7ff fbb6 bl 80309cc /* Do different things depending on the TCP state. */ switch (pcb->state) { 8031260: 7e23 ldrb r3, [r4, #24] 8031262: 3b02 subs r3, #2 8031264: 2b07 cmp r3, #7 8031266: f200 8278 bhi.w 803175a 803126a: e8df f013 tbh [pc, r3, lsl #1] 803126e: 0008 .short 0x0008 8031270: 00c90077 .word 0x00c90077 8031274: 013000da .word 0x013000da 8031278: 015200c9 .word 0x015200c9 803127c: 0186 .short 0x0186 case SYN_SENT: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, pcb->snd_nxt, ntohl(pcb->unacked->tcphdr->seqno))); /* received SYN ACK with expected sequence number? */ if ((flags & TCP_ACK) && (flags & TCP_SYN) 803127e: 4b7c ldr r3, [pc, #496] ; (8031470 ) 8031280: 781b ldrb r3, [r3, #0] 8031282: f003 0312 and.w r3, r3, #18 8031286: 2b12 cmp r3, #18 8031288: d153 bne.n 8031332 && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { 803128a: 6f23 ldr r3, [r4, #112] ; 0x70 803128c: 4d79 ldr r5, [pc, #484] ; (8031474 ) 803128e: 68db ldr r3, [r3, #12] 8031290: 682e ldr r6, [r5, #0] 8031292: 6858 ldr r0, [r3, #4] 8031294: f7fd fbc6 bl 802ea24 8031298: 3001 adds r0, #1 803129a: 4286 cmp r6, r0 803129c: d149 bne.n 8031332 pcb->snd_buf++; 803129e: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ pcb->state = ESTABLISHED; #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 80312a2: 8ee0 ldrh r0, [r4, #54] ; 0x36 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, pcb->snd_nxt, ntohl(pcb->unacked->tcphdr->seqno))); /* received SYN ACK with expected sequence number? */ if ((flags & TCP_ACK) && (flags & TCP_SYN) && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { pcb->snd_buf++; 80312a4: 3301 adds r3, #1 80312a6: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->rcv_nxt = seqno + 1; 80312aa: 4b73 ldr r3, [pc, #460] ; (8031478 ) 80312ac: 681b ldr r3, [r3, #0] 80312ae: 1c5a adds r2, r3, #1 80312b0: 62a2 str r2, [r4, #40] ; 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 80312b2: 6322 str r2, [r4, #48] ; 0x30 pcb->lastack = ackno; 80312b4: 682a ldr r2, [r5, #0] 80312b6: 64a2 str r2, [r4, #72] ; 0x48 pcb->snd_wnd = tcphdr->wnd; 80312b8: 4a71 ldr r2, [pc, #452] ; (8031480 ) 80312ba: 6812 ldr r2, [r2, #0] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 80312bc: 3b01 subs r3, #1 && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { pcb->snd_buf++; pcb->rcv_nxt = seqno + 1; pcb->rcv_ann_right_edge = pcb->rcv_nxt; pcb->lastack = ackno; pcb->snd_wnd = tcphdr->wnd; 80312be: 89d2 ldrh r2, [r2, #14] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 80312c0: 6563 str r3, [r4, #84] ; 0x54 pcb->state = ESTABLISHED; 80312c2: 2304 movs r3, #4 80312c4: 7623 strb r3, [r4, #24] #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 80312c6: 18e1 adds r1, r4, r3 && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { pcb->snd_buf++; pcb->rcv_nxt = seqno + 1; pcb->rcv_ann_right_edge = pcb->rcv_nxt; pcb->lastack = ackno; pcb->snd_wnd = tcphdr->wnd; 80312c8: f8a4 2060 strh.w r2, [r4, #96] ; 0x60 pcb->snd_wnd_max = tcphdr->wnd; 80312cc: f8a4 2062 strh.w r2, [r4, #98] ; 0x62 pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ pcb->state = ESTABLISHED; #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 80312d0: f7ff fb6d bl 80309ae #endif /* TCP_CALCULATE_EFF_SEND_MSS */ /* Set ssthresh again after changing pcb->mss (already set in tcp_connect * but for the default value of pcb->mss) */ pcb->ssthresh = pcb->mss * 10; 80312d4: 230a movs r3, #10 80312d6: 4343 muls r3, r0 80312d8: f8a4 304e strh.w r3, [r4, #78] ; 0x4e pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 80312dc: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ pcb->state = ESTABLISHED; #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 80312e0: 86e0 strh r0, [r4, #54] ; 0x36 /* Set ssthresh again after changing pcb->mss (already set in tcp_connect * but for the default value of pcb->mss) */ pcb->ssthresh = pcb->mss * 10; pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 80312e2: 2b01 cmp r3, #1 80312e4: d101 bne.n 80312ea 80312e6: 0040 lsls r0, r0, #1 80312e8: b280 uxth r0, r0 LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; 80312ea: f8b4 3068 ldrh.w r3, [r4, #104] ; 0x68 /* Set ssthresh again after changing pcb->mss (already set in tcp_connect * but for the default value of pcb->mss) */ pcb->ssthresh = pcb->mss * 10; pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 80312ee: f8a4 004c strh.w r0, [r4, #76] ; 0x4c LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"U16_F"\n", (u16_t)pcb->snd_queuelen)); rseg = pcb->unacked; 80312f2: 6f20 ldr r0, [r4, #112] ; 0x70 * but for the default value of pcb->mss) */ pcb->ssthresh = pcb->mss * 10; pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; 80312f4: 3b01 subs r3, #1 80312f6: f8a4 3068 strh.w r3, [r4, #104] ; 0x68 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"U16_F"\n", (u16_t)pcb->snd_queuelen)); rseg = pcb->unacked; pcb->unacked = rseg->next; 80312fa: 6803 ldr r3, [r0, #0] 80312fc: 6723 str r3, [r4, #112] ; 0x70 tcp_seg_free(rseg); 80312fe: f7fe ff70 bl 80301e2 /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 8031302: 6f23 ldr r3, [r4, #112] ; 0x70 8031304: b91b cbnz r3, 803130e pcb->rtime = -1; 8031306: f64f 73ff movw r3, #65535 ; 0xffff 803130a: 86a3 strh r3, [r4, #52] ; 0x34 803130c: e003 b.n 8031316 else { pcb->rtime = 0; 803130e: 2300 movs r3, #0 8031310: 86a3 strh r3, [r4, #52] ; 0x34 pcb->nrtx = 0; 8031312: f884 3046 strb.w r3, [r4, #70] ; 0x46 } /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 8031316: f8d4 3080 ldr.w r3, [r4, #128] ; 0x80 803131a: b91b cbnz r3, 8031324 if (err == ERR_ABRT) { return ERR_ABRT; } tcp_ack_now(pcb); 803131c: 7fa3 ldrb r3, [r4, #30] 803131e: f043 0302 orr.w r3, r3, #2 8031322: e219 b.n 8031758 pcb->nrtx = 0; } /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 8031324: 2200 movs r2, #0 8031326: 6920 ldr r0, [r4, #16] 8031328: 4621 mov r1, r4 803132a: 4798 blx r3 if (err == ERR_ABRT) { 803132c: 300a adds r0, #10 803132e: d1f5 bne.n 803131c 8031330: e1ab b.n 803168a return ERR_ABRT; } tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { 8031332: 4b4f ldr r3, [pc, #316] ; (8031470 ) 8031334: 781b ldrb r3, [r3, #0] 8031336: f003 0310 and.w r3, r3, #16 803133a: b2db uxtb r3, r3 803133c: 2b00 cmp r3, #0 803133e: f000 820c beq.w 803175a /* send a RST to bring the other side in a non-synchronized state. */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8031342: 4b4f ldr r3, [pc, #316] ; (8031480 ) tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { /* send a RST to bring the other side in a non-synchronized state. */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 8031344: 4a48 ldr r2, [pc, #288] ; (8031468 ) tcphdr->dest, tcphdr->src); 8031346: 681b ldr r3, [r3, #0] tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { /* send a RST to bring the other side in a non-synchronized state. */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 8031348: 8811 ldrh r1, [r2, #0] 803134a: 8858 ldrh r0, [r3, #2] 803134c: 4a4a ldr r2, [pc, #296] ; (8031478 ) 803134e: 6812 ldr r2, [r2, #0] 8031350: 9000 str r0, [sp, #0] 8031352: 881b ldrh r3, [r3, #0] 8031354: 9301 str r3, [sp, #4] 8031356: 4b47 ldr r3, [pc, #284] ; (8031474 ) 8031358: 6818 ldr r0, [r3, #0] 803135a: e03a b.n 80313d2 tcphdr->dest, tcphdr->src); } break; case SYN_RCVD: if (flags & TCP_ACK) { 803135c: 4b44 ldr r3, [pc, #272] ; (8031470 ) 803135e: 781b ldrb r3, [r3, #0] 8031360: f003 0210 and.w r2, r3, #16 8031364: b2d2 uxtb r2, r2 8031366: 2a00 cmp r2, #0 8031368: d039 beq.n 80313de /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { 803136a: 4b42 ldr r3, [pc, #264] ; (8031474 ) 803136c: 6818 ldr r0, [r3, #0] 803136e: 6ca3 ldr r3, [r4, #72] ; 0x48 8031370: 43db mvns r3, r3 8031372: 42c3 cmn r3, r0 8031374: d423 bmi.n 80313be 8031376: 6d23 ldr r3, [r4, #80] ; 0x50 8031378: 1ac3 subs r3, r0, r3 803137a: 2b00 cmp r3, #0 803137c: dc1f bgt.n 80313be u16_t old_cwnd; pcb->state = ESTABLISHED; 803137e: 2304 movs r3, #4 8031380: 7623 strb r3, [r4, #24] LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); #if LWIP_CALLBACK_API LWIP_ASSERT("pcb->accept != NULL", pcb->accept != NULL); #endif /* Call the accept function. */ TCP_EVENT_ACCEPT(pcb, ERR_OK, err); 8031382: 6963 ldr r3, [r4, #20] 8031384: b903 cbnz r3, 8031388 8031386: e147 b.n 8031618 8031388: 6920 ldr r0, [r4, #16] 803138a: 4621 mov r1, r4 803138c: 2200 movs r2, #0 803138e: 4798 blx r3 if (err != ERR_OK) { 8031390: b118 cbz r0, 803139a /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 8031392: 300a adds r0, #10 8031394: f040 8140 bne.w 8031618 8031398: e177 b.n 803168a return ERR_ABRT; } old_cwnd = pcb->cwnd; /* If there was any data contained within this ACK, * we'd better pass it on to the application as well. */ tcp_receive(pcb); 803139a: 4620 mov r0, r4 if (err != ERR_ABRT) { tcp_abort(pcb); } return ERR_ABRT; } old_cwnd = pcb->cwnd; 803139c: f8b4 504c ldrh.w r5, [r4, #76] ; 0x4c /* If there was any data contained within this ACK, * we'd better pass it on to the application as well. */ tcp_receive(pcb); 80313a0: f7ff fb54 bl 8030a4c /* Prevent ACK for SYN to generate a sent event */ if (pcb->acked != 0) { 80313a4: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 80313a8: b113 cbz r3, 80313b0 pcb->acked--; 80313aa: 3b01 subs r3, #1 80313ac: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->cwnd = ((old_cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 80313b0: 8ee3 ldrh r3, [r4, #54] ; 0x36 80313b2: 2d01 cmp r5, #1 80313b4: bf08 it eq 80313b6: 005b lsleq r3, r3, #1 80313b8: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 80313bc: e023 b.n 8031406 pcb->state = CLOSE_WAIT; } } else { /* incorrect ACK number, send RST */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 80313be: 4b30 ldr r3, [pc, #192] ; (8031480 ) tcp_ack_now(pcb); pcb->state = CLOSE_WAIT; } } else { /* incorrect ACK number, send RST */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 80313c0: 4a29 ldr r2, [pc, #164] ; (8031468 ) tcphdr->dest, tcphdr->src); 80313c2: 681b ldr r3, [r3, #0] tcp_ack_now(pcb); pcb->state = CLOSE_WAIT; } } else { /* incorrect ACK number, send RST */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 80313c4: 8811 ldrh r1, [r2, #0] 80313c6: 885d ldrh r5, [r3, #2] 80313c8: 4a2b ldr r2, [pc, #172] ; (8031478 ) 80313ca: 6812 ldr r2, [r2, #0] 80313cc: 9500 str r5, [sp, #0] 80313ce: 881b ldrh r3, [r3, #0] 80313d0: 9301 str r3, [sp, #4] 80313d2: 1889 adds r1, r1, r2 80313d4: 4b2b ldr r3, [pc, #172] ; (8031484 ) 80313d6: 4a2c ldr r2, [pc, #176] ; (8031488 ) 80313d8: f000 fdb6 bl 8031f48 80313dc: e1bd b.n 803175a tcphdr->dest, tcphdr->src); } } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 80313de: f003 0302 and.w r3, r3, #2 80313e2: b2db uxtb r3, r3 80313e4: 2b00 cmp r3, #0 80313e6: f000 81b8 beq.w 803175a 80313ea: 4a23 ldr r2, [pc, #140] ; (8031478 ) 80313ec: 6aa3 ldr r3, [r4, #40] ; 0x28 80313ee: 6812 ldr r2, [r2, #0] 80313f0: 3b01 subs r3, #1 80313f2: 429a cmp r2, r3 80313f4: f040 81b1 bne.w 803175a /* Looks like another copy of the SYN - retransmit our SYN-ACK */ tcp_rexmit(pcb); 80313f8: 4620 mov r0, r4 80313fa: f000 fe03 bl 8032004 80313fe: e1ac b.n 803175a } break; case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 8031400: 4620 mov r0, r4 8031402: f7ff fb23 bl 8030a4c if (recv_flags & TF_GOT_FIN) { /* passive close */ 8031406: 4b21 ldr r3, [pc, #132] ; (803148c ) 8031408: 781b ldrb r3, [r3, #0] 803140a: f003 0320 and.w r3, r3, #32 803140e: b2db uxtb r3, r3 8031410: 2b00 cmp r3, #0 8031412: f000 81a2 beq.w 803175a tcp_ack_now(pcb); 8031416: 7fa3 ldrb r3, [r4, #30] 8031418: f043 0302 orr.w r3, r3, #2 803141c: 77a3 strb r3, [r4, #30] pcb->state = CLOSE_WAIT; 803141e: 2307 movs r3, #7 8031420: e053 b.n 80314ca } break; case FIN_WAIT_1: tcp_receive(pcb); 8031422: 4620 mov r0, r4 8031424: f7ff fb12 bl 8030a4c if (recv_flags & TF_GOT_FIN) { 8031428: 4b18 ldr r3, [pc, #96] ; (803148c ) 803142a: 781a ldrb r2, [r3, #0] 803142c: 4b10 ldr r3, [pc, #64] ; (8031470 ) if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 803142e: 781b ldrb r3, [r3, #0] pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8031430: f002 0220 and.w r2, r2, #32 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8031434: f003 0310 and.w r3, r3, #16 pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8031438: b2d2 uxtb r2, r2 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 803143a: b2db uxtb r3, r3 pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 803143c: 2a00 cmp r2, #0 803143e: d03a beq.n 80314b6 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8031440: 2b00 cmp r3, #0 8031442: d032 beq.n 80314aa 8031444: 4b0b ldr r3, [pc, #44] ; (8031474 ) 8031446: 681a ldr r2, [r3, #0] 8031448: 6d23 ldr r3, [r4, #80] ; 0x50 803144a: 429a cmp r2, r3 803144c: d12d bne.n 80314aa LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_ack_now(pcb); 803144e: 7fa3 ldrb r3, [r4, #30] 8031450: f043 0302 orr.w r3, r3, #2 8031454: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 8031456: 4620 mov r0, r4 8031458: f7fe feea bl 8030230 TCP_RMV_ACTIVE(pcb); 803145c: 4a0c ldr r2, [pc, #48] ; (8031490 ) 803145e: 6813 ldr r3, [r2, #0] 8031460: 42a3 cmp r3, r4 8031462: d117 bne.n 8031494 8031464: e06d b.n 8031542 8031466: bf00 nop 8031468: 2000c43c .word 0x2000c43c 803146c: 2000ff38 .word 0x2000ff38 8031470: 2000c444 .word 0x2000c444 8031474: 2000c440 .word 0x2000c440 8031478: 2000c438 .word 0x2000c438 803147c: 2000ff24 .word 0x2000ff24 8031480: 2000c434 .word 0x2000c434 8031484: 2000ff40 .word 0x2000ff40 8031488: 2000ff48 .word 0x2000ff48 803148c: 2000c445 .word 0x2000c445 8031490: 2000ff20 .word 0x2000ff20 8031494: 4a8e ldr r2, [pc, #568] ; (80316d0 ) 8031496: 6013 str r3, [r2, #0] 8031498: e004 b.n 80314a4 803149a: 68d9 ldr r1, [r3, #12] 803149c: 42a1 cmp r1, r4 803149e: d100 bne.n 80314a2 80314a0: e057 b.n 8031552 80314a2: 460b mov r3, r1 80314a4: 2b00 cmp r3, #0 80314a6: d1f8 bne.n 803149a 80314a8: e05a b.n 8031560 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } else { tcp_ack_now(pcb); 80314aa: 7fa3 ldrb r3, [r4, #30] 80314ac: f043 0302 orr.w r3, r3, #2 80314b0: 77a3 strb r3, [r4, #30] pcb->state = CLOSING; 80314b2: 2308 movs r3, #8 80314b4: e009 b.n 80314ca } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 80314b6: 2b00 cmp r3, #0 80314b8: f000 814f beq.w 803175a 80314bc: 4b85 ldr r3, [pc, #532] ; (80316d4 ) 80314be: 681a ldr r2, [r3, #0] 80314c0: 6d23 ldr r3, [r4, #80] ; 0x50 80314c2: 429a cmp r2, r3 80314c4: f040 8149 bne.w 803175a pcb->state = FIN_WAIT_2; 80314c8: 2306 movs r3, #6 80314ca: 7623 strb r3, [r4, #24] 80314cc: e145 b.n 803175a } break; case FIN_WAIT_2: tcp_receive(pcb); 80314ce: 4620 mov r0, r4 80314d0: f7ff fabc bl 8030a4c if (recv_flags & TF_GOT_FIN) { 80314d4: 4b80 ldr r3, [pc, #512] ; (80316d8 ) 80314d6: 781b ldrb r3, [r3, #0] 80314d8: f003 0320 and.w r3, r3, #32 80314dc: b2db uxtb r3, r3 80314de: 2b00 cmp r3, #0 80314e0: f000 813b beq.w 803175a LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_ack_now(pcb); 80314e4: 7fa3 ldrb r3, [r4, #30] 80314e6: f043 0302 orr.w r3, r3, #2 80314ea: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 80314ec: 4620 mov r0, r4 80314ee: f7fe fe9f bl 8030230 TCP_RMV_ACTIVE(pcb); 80314f2: 4a7a ldr r2, [pc, #488] ; (80316dc ) 80314f4: 6813 ldr r3, [r2, #0] 80314f6: 42a3 cmp r3, r4 80314f8: d100 bne.n 80314fc 80314fa: e022 b.n 8031542 80314fc: 4a74 ldr r2, [pc, #464] ; (80316d0 ) 80314fe: 6013 str r3, [r2, #0] 8031500: e004 b.n 803150c 8031502: 68d9 ldr r1, [r3, #12] 8031504: 42a1 cmp r1, r4 8031506: d100 bne.n 803150a 8031508: e023 b.n 8031552 803150a: 460b mov r3, r1 803150c: 2b00 cmp r3, #0 803150e: d1f8 bne.n 8031502 8031510: e026 b.n 8031560 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } break; case CLOSING: tcp_receive(pcb); 8031512: 4620 mov r0, r4 8031514: f7ff fa9a bl 8030a4c if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 8031518: 4b71 ldr r3, [pc, #452] ; (80316e0 ) 803151a: 781b ldrb r3, [r3, #0] 803151c: f003 0310 and.w r3, r3, #16 8031520: b2db uxtb r3, r3 8031522: 2b00 cmp r3, #0 8031524: f000 8119 beq.w 803175a 8031528: 4b6a ldr r3, [pc, #424] ; (80316d4 ) 803152a: 681a ldr r2, [r3, #0] 803152c: 6d23 ldr r3, [r4, #80] ; 0x50 803152e: 429a cmp r2, r3 8031530: f040 8113 bne.w 803175a LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 8031534: 4620 mov r0, r4 8031536: f7fe fe7b bl 8030230 TCP_RMV_ACTIVE(pcb); 803153a: 4a68 ldr r2, [pc, #416] ; (80316dc ) 803153c: 6813 ldr r3, [r2, #0] 803153e: 42a3 cmp r3, r4 8031540: d101 bne.n 8031546 8031542: 68e3 ldr r3, [r4, #12] 8031544: e00c b.n 8031560 8031546: 4a62 ldr r2, [pc, #392] ; (80316d0 ) 8031548: 6013 str r3, [r2, #0] 803154a: e007 b.n 803155c 803154c: 68d9 ldr r1, [r3, #12] 803154e: 42a1 cmp r1, r4 8031550: d103 bne.n 803155a 8031552: 6013 str r3, [r2, #0] 8031554: 68e2 ldr r2, [r4, #12] 8031556: 60da str r2, [r3, #12] 8031558: e003 b.n 8031562 803155a: 460b mov r3, r1 803155c: 2b00 cmp r3, #0 803155e: d1f5 bne.n 803154c 8031560: 6013 str r3, [r2, #0] 8031562: 4b60 ldr r3, [pc, #384] ; (80316e4 ) 8031564: 2201 movs r2, #1 8031566: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 8031568: 230a movs r3, #10 803156a: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 803156c: 4b5e ldr r3, [pc, #376] ; (80316e8 ) 803156e: 681a ldr r2, [r3, #0] 8031570: 601c str r4, [r3, #0] 8031572: 60e2 str r2, [r4, #12] 8031574: f000 fe82 bl 803227c 8031578: e0ef b.n 803175a } break; case LAST_ACK: tcp_receive(pcb); 803157a: 4620 mov r0, r4 803157c: f7ff fa66 bl 8030a4c if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 8031580: 4b57 ldr r3, [pc, #348] ; (80316e0 ) 8031582: 781b ldrb r3, [r3, #0] 8031584: f003 0310 and.w r3, r3, #16 8031588: b2db uxtb r3, r3 803158a: 2b00 cmp r3, #0 803158c: f000 80e5 beq.w 803175a 8031590: 4b50 ldr r3, [pc, #320] ; (80316d4 ) 8031592: 681a ldr r2, [r3, #0] 8031594: 6d23 ldr r3, [r4, #80] ; 0x50 8031596: 429a cmp r2, r3 8031598: f040 80df bne.w 803175a LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */ recv_flags |= TF_CLOSED; 803159c: 4b4e ldr r3, [pc, #312] ; (80316d8 ) 803159e: 781a ldrb r2, [r3, #0] 80315a0: f042 0210 orr.w r2, r2, #16 80315a4: 701a strb r2, [r3, #0] 80315a6: e0d8 b.n 803175a if (recv_flags & TF_RESET) { /* TF_RESET means that the connection was reset by the other end. We then call the error callback to inform the application that the connection is dead before we deallocate the PCB. */ TCP_EVENT_ERR(pcb->errf, pcb->callback_arg, ERR_RST); 80315a8: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 80315ac: b19b cbz r3, 80315d6 80315ae: 6920 ldr r0, [r4, #16] 80315b0: f06f 010a mvn.w r1, #10 80315b4: e00e b.n 80315d4 tcp_pcb_remove(&tcp_active_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); } else if (recv_flags & TF_CLOSED) { 80315b6: f003 0310 and.w r3, r3, #16 80315ba: b2db uxtb r3, r3 80315bc: b1a3 cbz r3, 80315e8 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 80315be: 7fa3 ldrb r3, [r4, #30] 80315c0: f003 0310 and.w r3, r3, #16 80315c4: b2db uxtb r3, r3 80315c6: b933 cbnz r3, 80315d6 /* Connection closed although the application has only shut down the tx side: call the PCB's err callback and indicate the closure to ensure the application doesn't continue using the PCB. */ TCP_EVENT_ERR(pcb->errf, pcb->callback_arg, ERR_CLSD); 80315c8: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 80315cc: b11b cbz r3, 80315d6 80315ce: 6920 ldr r0, [r4, #16] 80315d0: f06f 010b mvn.w r1, #11 80315d4: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 80315d6: 4621 mov r1, r4 80315d8: 4840 ldr r0, [pc, #256] ; (80316dc ) 80315da: f7fe ff91 bl 8030500 memp_free(MEMP_TCP_PCB, pcb); 80315de: 2002 movs r0, #2 80315e0: 4621 mov r1, r4 80315e2: f7fe fa47 bl 802fa74 80315e6: e050 b.n 803168a } else { err = ERR_OK; /* If the application has registered a "sent" function to be called when new send buffer space is available, we call it now. */ if (pcb->acked > 0) { 80315e8: f8b4 2064 ldrh.w r2, [r4, #100] ; 0x64 80315ec: b91a cbnz r2, 80315f6 if (err == ERR_ABRT) { goto aborted; } } if (recv_data != NULL) { 80315ee: 4b3f ldr r3, [pc, #252] ; (80316ec ) 80315f0: 681a ldr r2, [r3, #0] 80315f2: b94a cbnz r2, 8031608 80315f4: e026 b.n 8031644 err = ERR_OK; /* If the application has registered a "sent" function to be called when new send buffer space is available, we call it now. */ if (pcb->acked > 0) { TCP_EVENT_SENT(pcb, pcb->acked, err); 80315f6: 6fa3 ldr r3, [r4, #120] ; 0x78 80315f8: 2b00 cmp r3, #0 80315fa: d0f8 beq.n 80315ee 80315fc: 6920 ldr r0, [r4, #16] 80315fe: 4621 mov r1, r4 8031600: 4798 blx r3 if (err == ERR_ABRT) { 8031602: 300a adds r0, #10 8031604: d1f3 bne.n 80315ee 8031606: e040 b.n 803168a } } if (recv_data != NULL) { LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); if (pcb->flags & TF_RXCLOSED) { 8031608: 7fa3 ldrb r3, [r4, #30] 803160a: f003 0310 and.w r3, r3, #16 803160e: b2db uxtb r3, r3 8031610: b133 cbz r3, 8031620 /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 8031612: 4610 mov r0, r2 8031614: f7fe fb38 bl 802fc88 tcp_abort(pcb); 8031618: 4620 mov r0, r4 803161a: f7fe ffe5 bl 80305e8 goto aborted; 803161e: e034 b.n 803168a } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 8031620: 6fe5 ldr r5, [r4, #124] ; 0x7c 8031622: b11d cbz r5, 803162c 8031624: 6920 ldr r0, [r4, #16] 8031626: 4621 mov r1, r4 8031628: 47a8 blx r5 803162a: e004 b.n 8031636 803162c: 4628 mov r0, r5 803162e: 4621 mov r1, r4 8031630: 462b mov r3, r5 8031632: f7ff f895 bl 8030760 if (err == ERR_ABRT) { 8031636: b243 sxtb r3, r0 8031638: 330a adds r3, #10 803163a: d026 beq.n 803168a goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 803163c: b110 cbz r0, 8031644 pcb->refused_data = recv_data; 803163e: 4b2b ldr r3, [pc, #172] ; (80316ec ) 8031640: 681b ldr r3, [r3, #0] 8031642: 6763 str r3, [r4, #116] ; 0x74 } } /* If a FIN segment was received, we call the callback function with a NULL buffer to indicate EOF. */ if (recv_flags & TF_GOT_FIN) { 8031644: 4b24 ldr r3, [pc, #144] ; (80316d8 ) 8031646: 781b ldrb r3, [r3, #0] 8031648: f003 0320 and.w r3, r3, #32 803164c: b2db uxtb r3, r3 803164e: b1b3 cbz r3, 803167e if (pcb->refused_data != NULL) { 8031650: 6f63 ldr r3, [r4, #116] ; 0x74 8031652: b123 cbz r3, 803165e /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 8031654: 7b5a ldrb r2, [r3, #13] 8031656: f042 0220 orr.w r2, r2, #32 803165a: 735a strb r2, [r3, #13] 803165c: e00f b.n 803167e } else { /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 803165e: 8da3 ldrh r3, [r4, #44] ; 0x2c 8031660: f241 62d0 movw r2, #5840 ; 0x16d0 8031664: 4293 cmp r3, r2 8031666: d001 beq.n 803166c pcb->rcv_wnd++; 8031668: 3301 adds r3, #1 803166a: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 803166c: 6fe5 ldr r5, [r4, #124] ; 0x7c 803166e: b135 cbz r5, 803167e 8031670: 2200 movs r2, #0 8031672: 6920 ldr r0, [r4, #16] 8031674: 4621 mov r1, r4 8031676: 4613 mov r3, r2 8031678: 47a8 blx r5 if (err == ERR_ABRT) { 803167a: 300a adds r0, #10 803167c: d005 beq.n 803168a goto aborted; } } } tcp_input_pcb = NULL; 803167e: 4b1c ldr r3, [pc, #112] ; (80316f0 ) 8031680: 2200 movs r2, #0 /* Try to send something out. */ tcp_output(pcb); 8031682: 4620 mov r0, r4 goto aborted; } } } tcp_input_pcb = NULL; 8031684: 601a str r2, [r3, #0] /* Try to send something out. */ tcp_output(pcb); 8031686: f000 fb3b bl 8031d00 } } /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). Below this line, 'pcb' may not be dereferenced! */ aborted: tcp_input_pcb = NULL; 803168a: 4b19 ldr r3, [pc, #100] ; (80316f0 ) recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 803168c: 4d19 ldr r5, [pc, #100] ; (80316f4 ) } } /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). Below this line, 'pcb' may not be dereferenced! */ aborted: tcp_input_pcb = NULL; 803168e: 2400 movs r4, #0 8031690: 601c str r4, [r3, #0] recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 8031692: 6868 ldr r0, [r5, #4] } /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). Below this line, 'pcb' may not be dereferenced! */ aborted: tcp_input_pcb = NULL; recv_data = NULL; 8031694: 4b15 ldr r3, [pc, #84] ; (80316ec ) 8031696: 601c str r4, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) 8031698: 2800 cmp r0, #0 803169a: d067 beq.n 803176c { pbuf_free(inseg.p); 803169c: f7fe faf4 bl 802fc88 inseg.p = NULL; 80316a0: 606c str r4, [r5, #4] 80316a2: e063 b.n 803176c if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { TCP_STATS_INC(tcp.proterr); TCP_STATS_INC(tcp.drop); tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 80316a4: 4b14 ldr r3, [pc, #80] ; (80316f8 ) sender. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { TCP_STATS_INC(tcp.proterr); TCP_STATS_INC(tcp.drop); tcp_rst(ackno, seqno + tcplen, 80316a6: 4a15 ldr r2, [pc, #84] ; (80316fc ) ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 80316a8: 681b ldr r3, [r3, #0] sender. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { TCP_STATS_INC(tcp.proterr); TCP_STATS_INC(tcp.drop); tcp_rst(ackno, seqno + tcplen, 80316aa: 8811 ldrh r1, [r2, #0] 80316ac: 8858 ldrh r0, [r3, #2] 80316ae: 4a14 ldr r2, [pc, #80] ; (8031700 ) 80316b0: 6812 ldr r2, [r2, #0] 80316b2: 9000 str r0, [sp, #0] 80316b4: 881b ldrh r3, [r3, #0] 80316b6: 9301 str r3, [sp, #4] 80316b8: 4b06 ldr r3, [pc, #24] ; (80316d4 ) 80316ba: 1889 adds r1, r1, r2 80316bc: 6818 ldr r0, [r3, #0] 80316be: e517 b.n 80310f0 LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 80316c0: f003 f8ee bl 80348a0 pbuf_free(p); 80316c4: 4630 mov r0, r6 } 80316c6: b003 add sp, #12 80316c8: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} PERF_STOP("tcp_input"); return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); 80316cc: f7fe badc b.w 802fc88 80316d0: 2000ff2c .word 0x2000ff2c 80316d4: 2000c440 .word 0x2000c440 80316d8: 2000c445 .word 0x2000c445 80316dc: 2000ff20 .word 0x2000ff20 80316e0: 2000c444 .word 0x2000c444 80316e4: 2000ff1c .word 0x2000ff1c 80316e8: 2000ff34 .word 0x2000ff34 80316ec: 2000c448 .word 0x2000c448 80316f0: 2000ff38 .word 0x2000ff38 80316f4: 2000c450 .word 0x2000c450 80316f8: 2000c434 .word 0x2000c434 80316fc: 2000c43c .word 0x2000c43c 8031700: 2000c438 .word 0x2000c438 } if (pcb == NULL) { /* If it did not go to an active connection, we check the connections in the TIME-WAIT state. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 8031704: 4b1b ldr r3, [pc, #108] ; (8031774 ) 8031706: 681b ldr r3, [r3, #0] 8031708: e4bf b.n 803108a tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 803170a: 4b1b ldr r3, [pc, #108] ; (8031778 ) 803170c: 2100 movs r1, #0 803170e: 6019 str r1, [r3, #0] inseg.len = p->tot_len; 8031710: f8a3 8008 strh.w r8, [r3, #8] inseg.p = p; 8031714: 605e str r6, [r3, #4] inseg.tcphdr = tcphdr; 8031716: 60df str r7, [r3, #12] recv_data = NULL; 8031718: 4b18 ldr r3, [pc, #96] ; (803177c ) recv_flags = 0; if (flags & TCP_PSH) { 803171a: f002 0208 and.w r2, r2, #8 inseg.next = NULL; inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; 803171e: 6019 str r1, [r3, #0] recv_flags = 0; 8031720: 4b17 ldr r3, [pc, #92] ; (8031780 ) if (flags & TCP_PSH) { 8031722: b2d2 uxtb r2, r2 inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; recv_flags = 0; 8031724: 7019 strb r1, [r3, #0] if (flags & TCP_PSH) { 8031726: 2a00 cmp r2, #0 8031728: f47f ad52 bne.w 80311d0 803172c: e554 b.n 80311d8 #endif /* SO_REUSE */ if (lpcb != NULL) { /* Move this PCB to the front of the list so that subsequent lookups will be faster (we exploit locality in TCP segment arrivals). */ if (prev != NULL) { 803172e: 2b00 cmp r3, #0 8031730: f47f acc4 bne.w 80310bc 8031734: e4c7 b.n 80310c6 } else { /* If no matching PCB was found, send a TCP RST (reset) to the sender. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { 8031736: 89b8 ldrh r0, [r7, #12] 8031738: f7fd f96d bl 802ea16 803173c: f000 0004 and.w r0, r0, #4 8031740: b280 uxth r0, r0 8031742: 2800 cmp r0, #0 8031744: d1be bne.n 80316c4 8031746: e7ad b.n 80316a4 } if (acceptable) { LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); recv_flags |= TF_RESET; 8031748: 4b0d ldr r3, [pc, #52] ; (8031780 ) 803174a: 781a ldrb r2, [r3, #0] 803174c: f042 0208 orr.w r2, r2, #8 8031750: 701a strb r2, [r3, #0] pcb->flags &= ~TF_ACK_DELAY; 8031752: 7fa3 ldrb r3, [r4, #30] 8031754: f023 0301 bic.w r3, r3, #1 8031758: 77a3 strb r3, [r4, #30] tcp_input_pcb = pcb; err = tcp_process(pcb); /* A return value of ERR_ABRT means that tcp_abort() was called and that the pcb has been freed. If so, we don't do anything. */ if (err != ERR_ABRT) { if (recv_flags & TF_RESET) { 803175a: 4b09 ldr r3, [pc, #36] ; (8031780 ) 803175c: 781b ldrb r3, [r3, #0] 803175e: f003 0208 and.w r2, r3, #8 8031762: b2d2 uxtb r2, r2 8031764: 2a00 cmp r2, #0 8031766: f47f af1f bne.w 80315a8 803176a: e724 b.n 80315b6 return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); } 803176c: b003 add sp, #12 803176e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8031772: bf00 nop 8031774: 2000ff34 .word 0x2000ff34 8031778: 2000c450 .word 0x2000c450 803177c: 2000c448 .word 0x2000c448 8031780: 2000c445 .word 0x2000c445 08031784 : #if TCP_OVERSIZE static struct pbuf * tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, u16_t *oversize, struct tcp_pcb *pcb, u8_t apiflags, u8_t first_seg) { 8031784: b570 push {r4, r5, r6, lr} LWIP_UNUSED_ARG(apiflags); LWIP_UNUSED_ARG(first_seg); /* always create MSS-sized pbufs */ alloc = max_length; #else /* LWIP_NETIF_TX_SINGLE_PBUF */ if (length < max_length) { 8031786: 4291 cmp r1, r2 #if TCP_OVERSIZE static struct pbuf * tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, u16_t *oversize, struct tcp_pcb *pcb, u8_t apiflags, u8_t first_seg) { 8031788: 460c mov r4, r1 803178a: 461e mov r6, r3 803178c: 9d04 ldr r5, [sp, #16] LWIP_UNUSED_ARG(apiflags); LWIP_UNUSED_ARG(first_seg); /* always create MSS-sized pbufs */ alloc = max_length; #else /* LWIP_NETIF_TX_SINGLE_PBUF */ if (length < max_length) { 803178e: d21a bcs.n 80317c6 * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 8031790: f89d 3014 ldrb.w r3, [sp, #20] 8031794: f003 0302 and.w r3, r3, #2 8031798: b2db uxtb r3, r3 803179a: b95b cbnz r3, 80317b4 (!(pcb->flags & TF_NODELAY) && 803179c: 7fab ldrb r3, [r5, #30] * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 803179e: f003 0340 and.w r3, r3, #64 ; 0x40 80317a2: b2db uxtb r3, r3 80317a4: b97b cbnz r3, 80317c6 (!(pcb->flags & TF_NODELAY) && 80317a6: f89d 3018 ldrb.w r3, [sp, #24] 80317aa: b11b cbz r3, 80317b4 (!first_seg || 80317ac: 6ee9 ldr r1, [r5, #108] ; 0x6c 80317ae: b909 cbnz r1, 80317b4 pcb->unsent != NULL || 80317b0: 6f2b ldr r3, [r5, #112] ; 0x70 80317b2: b143 cbz r3, 80317c6 pcb->unacked != NULL))) { alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(length + TCP_OVERSIZE)); 80317b4: f204 51b7 addw r1, r4, #1463 ; 0x5b7 80317b8: f021 0103 bic.w r1, r1, #3 80317bc: 4291 cmp r1, r2 80317be: bfa8 it ge 80317c0: 4611 movge r1, r2 80317c2: b289 uxth r1, r1 80317c4: e000 b.n 80317c8 * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || (!(pcb->flags & TF_NODELAY) && (!first_seg || pcb->unsent != NULL || 80317c6: 4621 mov r1, r4 pcb->unacked != NULL))) { alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(length + TCP_OVERSIZE)); } } #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ p = pbuf_alloc(layer, alloc, PBUF_RAM); 80317c8: 2200 movs r2, #0 80317ca: f7fe faaa bl 802fd22 if (p == NULL) { 80317ce: b120 cbz r0, 80317da return NULL; } LWIP_ASSERT("need unchained pbuf", p->next == NULL); *oversize = p->len - length; 80317d0: 8943 ldrh r3, [r0, #10] 80317d2: 1b1b subs r3, r3, r4 80317d4: 8033 strh r3, [r6, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 80317d6: 8104 strh r4, [r0, #8] 80317d8: 8144 strh r4, [r0, #10] return p; } 80317da: bd70 pop {r4, r5, r6, pc} 080317dc : * The TCP header is filled in except ackno and wnd. * p is freed on failure. */ static struct tcp_seg * tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) { 80317dc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 80317e0: f89d 6020 ldrb.w r6, [sp, #32] struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 80317e4: f006 0702 and.w r7, r6, #2 80317e8: f016 0f01 tst.w r6, #1 80317ec: b2ff uxtb r7, r7 * The TCP header is filled in except ackno and wnd. * p is freed on failure. */ static struct tcp_seg * tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) { 80317ee: 4680 mov r8, r0 80317f0: 469a mov sl, r3 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 80317f2: bf0c ite eq 80317f4: 2300 moveq r3, #0 80317f6: 2304 movne r3, #4 80317f8: 2f00 cmp r7, #0 80317fa: bf14 ite ne 80317fc: 270c movne r7, #12 80317fe: 2700 moveq r7, #0 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8031800: 2004 movs r0, #4 * The TCP header is filled in except ackno and wnd. * p is freed on failure. */ static struct tcp_seg * tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) { 8031802: 460d mov r5, r1 8031804: 4691 mov r9, r2 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031806: 18ff adds r7, r7, r3 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8031808: f7fe f91e bl 802fa48 803180c: 4604 mov r4, r0 803180e: b918 cbnz r0, 8031818 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 8031810: 4628 mov r0, r5 8031812: f7fe fa39 bl 802fc88 return NULL; 8031816: e030 b.n 803187a } seg->flags = optflags; 8031818: 7286 strb r6, [r0, #10] seg->next = NULL; seg->p = p; seg->len = p->tot_len - optlen; 803181a: 892b ldrh r3, [r5, #8] pbuf_free(p); return NULL; } seg->flags = optflags; seg->next = NULL; seg->p = p; 803181c: 6045 str r5, [r0, #4] seg->len = p->tot_len - optlen; 803181e: 1bdb subs r3, r3, r7 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no memory.\n")); pbuf_free(p); return NULL; } seg->flags = optflags; seg->next = NULL; 8031820: 2600 movs r6, #0 8031822: 6006 str r6, [r0, #0] seg->p = p; seg->len = p->tot_len - optlen; 8031824: 8103 strh r3, [r0, #8] LWIP_ASSERT("invalid optflags passed: TF_SEG_DATA_CHECKSUMMED", (optflags & TF_SEG_DATA_CHECKSUMMED) == 0); #endif /* TCP_CHECKSUM_ON_COPY */ /* build TCP header */ if (pbuf_header(p, TCP_HLEN)) { 8031826: 2114 movs r1, #20 8031828: 4628 mov r0, r5 803182a: f7fe fa02 bl 802fc32 803182e: 4605 mov r5, r0 8031830: b120 cbz r0, 803183c LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no room for TCP header in pbuf.\n")); TCP_STATS_INC(tcp.err); tcp_seg_free(seg); 8031832: 4620 mov r0, r4 8031834: f7fe fcd5 bl 80301e2 return NULL; 8031838: 4634 mov r4, r6 803183a: e01e b.n 803187a } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 803183c: 6863 ldr r3, [r4, #4] seg->tcphdr->src = htons(pcb->local_port); 803183e: f8b8 001a ldrh.w r0, [r8, #26] LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no room for TCP header in pbuf.\n")); TCP_STATS_INC(tcp.err); tcp_seg_free(seg); return NULL; } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 8031842: 685e ldr r6, [r3, #4] 8031844: 60e6 str r6, [r4, #12] seg->tcphdr->src = htons(pcb->local_port); 8031846: f7fd f8e1 bl 802ea0c 803184a: 8030 strh r0, [r6, #0] seg->tcphdr->dest = htons(pcb->remote_port); 803184c: f8b8 001c ldrh.w r0, [r8, #28] 8031850: 68e6 ldr r6, [r4, #12] 8031852: f7fd f8db bl 802ea0c 8031856: 8070 strh r0, [r6, #2] seg->tcphdr->seqno = htonl(seqno); 8031858: 4650 mov r0, sl 803185a: 68e6 ldr r6, [r4, #12] 803185c: f7fd f8e0 bl 802ea20 /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 8031860: 02bf lsls r7, r7, #10 return NULL; } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; seg->tcphdr->src = htons(pcb->local_port); seg->tcphdr->dest = htons(pcb->remote_port); seg->tcphdr->seqno = htonl(seqno); 8031862: 6070 str r0, [r6, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 8031864: f507 40a0 add.w r0, r7, #20480 ; 0x5000 8031868: ea40 0009 orr.w r0, r0, r9 803186c: 68e6 ldr r6, [r4, #12] 803186e: f7fd f8cd bl 802ea0c 8031872: 81b0 strh r0, [r6, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 8031874: 68e3 ldr r3, [r4, #12] 8031876: 749d strb r5, [r3, #18] 8031878: 74dd strb r5, [r3, #19] return seg; } 803187a: 4620 mov r0, r4 803187c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08031880 : static struct pbuf * tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, u32_t seqno_be /* already in network byte order */) { struct tcp_hdr *tcphdr; struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 8031880: 3114 adds r1, #20 * @param datalen length of tcp data to reserve in pbuf * @param seqno_be seqno in network byte order (big-endian) * @return pbuf with p->payload being the tcp_hdr */ static struct pbuf * tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, 8031882: b5f8 push {r3, r4, r5, r6, r7, lr} u32_t seqno_be /* already in network byte order */) { struct tcp_hdr *tcphdr; struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 8031884: b289 uxth r1, r1 * @param datalen length of tcp data to reserve in pbuf * @param seqno_be seqno in network byte order (big-endian) * @return pbuf with p->payload being the tcp_hdr */ static struct pbuf * tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, 8031886: 4605 mov r5, r0 8031888: 4617 mov r7, r2 u32_t seqno_be /* already in network byte order */) { struct tcp_hdr *tcphdr; struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 803188a: 2001 movs r0, #1 803188c: 2200 movs r2, #0 803188e: f7fe fa48 bl 802fd22 if (p != NULL) { 8031892: 4606 mov r6, r0 8031894: b1f8 cbz r0, 80318d6 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 8031896: 6844 ldr r4, [r0, #4] tcphdr->src = htons(pcb->local_port); 8031898: 8b68 ldrh r0, [r5, #26] 803189a: f7fd f8b7 bl 802ea0c 803189e: 8020 strh r0, [r4, #0] tcphdr->dest = htons(pcb->remote_port); 80318a0: 8ba8 ldrh r0, [r5, #28] 80318a2: f7fd f8b3 bl 802ea0c tcphdr->seqno = seqno_be; 80318a6: 6067 str r7, [r4, #4] if (p != NULL) { LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; tcphdr->src = htons(pcb->local_port); tcphdr->dest = htons(pcb->remote_port); 80318a8: 8060 strh r0, [r4, #2] tcphdr->seqno = seqno_be; tcphdr->ackno = htonl(pcb->rcv_nxt); 80318aa: 6aa8 ldr r0, [r5, #40] ; 0x28 80318ac: f7fd f8b8 bl 802ea20 80318b0: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); 80318b2: f245 0010 movw r0, #20496 ; 0x5010 80318b6: f7fd f8a9 bl 802ea0c 80318ba: 81a0 strh r0, [r4, #12] tcphdr->wnd = htons(pcb->rcv_ann_wnd); 80318bc: 8de8 ldrh r0, [r5, #46] ; 0x2e 80318be: f7fd f8a5 bl 802ea0c tcphdr->chksum = 0; 80318c2: 2300 movs r3, #0 tcphdr->src = htons(pcb->local_port); tcphdr->dest = htons(pcb->remote_port); tcphdr->seqno = seqno_be; tcphdr->ackno = htonl(pcb->rcv_nxt); TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); tcphdr->wnd = htons(pcb->rcv_ann_wnd); 80318c4: 81e0 strh r0, [r4, #14] tcphdr->chksum = 0; 80318c6: 7423 strb r3, [r4, #16] 80318c8: 7463 strb r3, [r4, #17] tcphdr->urgp = 0; 80318ca: 74a3 strb r3, [r4, #18] 80318cc: 74e3 strb r3, [r4, #19] /* If we're sending a packet, update the announced right window edge */ pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 80318ce: 8dea ldrh r2, [r5, #46] ; 0x2e 80318d0: 6aab ldr r3, [r5, #40] ; 0x28 80318d2: 18d3 adds r3, r2, r3 80318d4: 632b str r3, [r5, #48] ; 0x30 } return p; } 80318d6: 4630 mov r0, r6 80318d8: bdf8 pop {r3, r4, r5, r6, r7, pc} 080318da : * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will be set on last segment sent, * @return ERR_OK if enqueued, another err_t on error */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { 80318da: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80318de: b08f sub sp, #60 ; 0x3c 80318e0: 4691 mov r9, r2 80318e2: 9307 str r3, [sp, #28] u16_t pos = 0; /* position in 'arg' data */ u16_t queuelen; u8_t optlen = 0; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; 80318e4: 2300 movs r3, #0 80318e6: f8ad 3036 strh.w r3, [sp, #54] ; 0x36 * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will be set on last segment sent, * @return ERR_OK if enqueued, another err_t on error */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { 80318ea: 4604 mov r4, r0 u8_t concat_chksum_swapped = 0; u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; /* don't allocate segments bigger than half the maximum window we ever received */ u16_t mss_local = LWIP_MIN(pcb->mss, pcb->snd_wnd_max/2); 80318ec: f8b0 2062 ldrh.w r2, [r0, #98] ; 0x62 80318f0: 8ec3 ldrh r3, [r0, #54] ; 0x36 apiflags |= TCP_WRITE_FLAG_COPY; #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", (void *)pcb, arg, len, (u16_t)apiflags)); LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", 80318f2: 9106 str r1, [sp, #24] 80318f4: 2900 cmp r1, #0 80318f6: f000 8168 beq.w 8031bca 80318fa: 7e01 ldrb r1, [r0, #24] 80318fc: 2907 cmp r1, #7 80318fe: f200 8166 bhi.w 8031bce 8031902: f990 1018 ldrsb.w r1, [r0, #24] 8031906: f04f 5064 mov.w r0, #956301312 ; 0x39000000 803190a: 4088 lsls r0, r1 803190c: f140 815f bpl.w 8031bce (pcb->state != CLOSE_WAIT) && (pcb->state != SYN_SENT) && (pcb->state != SYN_RCVD)) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; } else if (len == 0) { 8031910: f1b9 0f00 cmp.w r9, #0 8031914: d00d beq.n 8031932 return ERR_OK; } /* fail on too much data */ if (len > pcb->snd_buf) { 8031916: f8b4 1066 ldrh.w r1, [r4, #102] ; 0x66 803191a: 4549 cmp r1, r9 803191c: d200 bcs.n 8031920 803191e: e003 b.n 8031928 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: queuelen: %"U16_F"\n", (u16_t)pcb->snd_queuelen)); /* If total number of pbufs on the unsent/unacked queues exceeds the * configured maximum, return an error */ /* check for configured max queuelen and possible overflow */ if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { 8031920: f8b4 1068 ldrh.w r1, [r4, #104] ; 0x68 8031924: 2947 cmp r1, #71 ; 0x47 8031926: d904 bls.n 8031932 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n", pcb->snd_queuelen, TCP_SND_QUEUELEN)); TCP_STATS_INC(tcp.memerr); pcb->flags |= TF_NAGLEMEMERR; 8031928: 7fa3 ldrb r3, [r4, #30] 803192a: f063 037f orn r3, r3, #127 ; 0x7f 803192e: 77a3 strb r3, [r4, #30] 8031930: e151 b.n 8031bd6 u8_t concat_chksum_swapped = 0; u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; /* don't allocate segments bigger than half the maximum window we ever received */ u16_t mss_local = LWIP_MIN(pcb->mss, pcb->snd_wnd_max/2); 8031932: 0852 lsrs r2, r2, #1 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 8031934: 6ee6 ldr r6, [r4, #108] ; 0x6c err = tcp_write_checks(pcb, len); if (err != ERR_OK) { return err; } queuelen = pcb->snd_queuelen; 8031936: f8b4 b068 ldrh.w fp, [r4, #104] ; 0x68 u8_t concat_chksum_swapped = 0; u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; /* don't allocate segments bigger than half the maximum window we ever received */ u16_t mss_local = LWIP_MIN(pcb->mss, pcb->snd_wnd_max/2); 803193a: 429a cmp r2, r3 803193c: bf28 it cs 803193e: 461a movcs r2, r3 8031940: 920a str r2, [sp, #40] ; 0x28 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 8031942: b90e cbnz r6, 8031948 8031944: e066 b.n 8031a14 u16_t space; u16_t unsent_optlen; /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); 8031946: 461e mov r6, r3 if (pcb->unsent != NULL) { u16_t space; u16_t unsent_optlen; /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; 8031948: 6833 ldr r3, [r6, #0] 803194a: 2b00 cmp r3, #0 803194c: d1fb bne.n 8031946 last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 803194e: 7ab3 ldrb r3, [r6, #10] space = mss_local - (last_unsent->len + unsent_optlen); 8031950: 8937 ldrh r7, [r6, #8] /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 8031952: 980a ldr r0, [sp, #40] ; 0x28 #if TCP_OVERSIZE_DBGCHECK /* check that pcb->unsent_oversize matches last_unsent->unsent_oversize */ LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; 8031954: f8b4 506a ldrh.w r5, [r4, #106] ; 0x6a /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 8031958: f013 0f01 tst.w r3, #1 803195c: f003 0302 and.w r3, r3, #2 8031960: bf0c ite eq 8031962: 2100 moveq r1, #0 8031964: 2104 movne r1, #4 8031966: b2db uxtb r3, r3 8031968: 1bc2 subs r2, r0, r7 803196a: 2b00 cmp r3, #0 803196c: bf14 ite ne 803196e: 230c movne r3, #12 8031970: 2300 moveq r3, #0 space = mss_local - (last_unsent->len + unsent_optlen); 8031972: 1a52 subs r2, r2, r1 8031974: 1ad2 subs r2, r2, r3 8031976: b292 uxth r2, r2 /* check that pcb->unsent_oversize matches last_unsent->unsent_oversize */ LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; if (oversize > 0) { 8031978: b91d cbnz r5, 8031982 #if TCP_OVERSIZE_DBGCHECK /* check that pcb->unsent_oversize matches last_unsent->unsent_oversize */ LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; 803197a: f8ad 5036 strh.w r5, [sp, #54] ; 0x36 */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 803197e: 462b mov r3, r5 8031980: e00a b.n 8031998 #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; if (oversize > 0) { LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space); seg = last_unsent; oversize_used = oversize < len ? oversize : len; 8031982: 45a9 cmp r9, r5 8031984: bf34 ite cc 8031986: 464b movcc r3, r9 8031988: 462b movcs r3, r5 pos += oversize_used; oversize -= oversize_used; 803198a: 1aed subs r5, r5, r3 space -= oversize_used; 803198c: 1ad2 subs r2, r2, r3 if (oversize > 0) { LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space); seg = last_unsent; oversize_used = oversize < len ? oversize : len; pos += oversize_used; oversize -= oversize_used; 803198e: f8ad 5036 strh.w r5, [sp, #54] ; 0x36 space -= oversize_used; 8031992: b292 uxth r2, r2 oversize = pcb->unsent_oversize; if (oversize > 0) { LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space); seg = last_unsent; oversize_used = oversize < len ? oversize : len; pos += oversize_used; 8031994: 461d mov r5, r3 oversize -= oversize_used; space -= oversize_used; 8031996: 4633 mov r3, r6 * * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 8031998: 454d cmp r5, r9 803199a: d23f bcs.n 8031a1c 803199c: 2a00 cmp r2, #0 803199e: d03d beq.n 8031a1c 80319a0: 2f00 cmp r7, #0 80319a2: d03e beq.n 8031a22 seg = last_unsent; /* Create a pbuf with a copy or reference to seglen bytes. We * can use PBUF_RAW here since the data appears in the middle of * a segment. A header will never be prepended. */ if (apiflags & TCP_WRITE_FLAG_COPY) { 80319a4: 9907 ldr r1, [sp, #28] * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { u16_t seglen = space < len - pos ? space : len - pos; 80319a6: ebc5 0a09 rsb sl, r5, r9 80319aa: 4592 cmp sl, r2 80319ac: bfa8 it ge 80319ae: 4692 movge sl, r2 seg = last_unsent; /* Create a pbuf with a copy or reference to seglen bytes. We * can use PBUF_RAW here since the data appears in the middle of * a segment. A header will never be prepended. */ if (apiflags & TCP_WRITE_FLAG_COPY) { 80319b0: 07cb lsls r3, r1, #31 * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { u16_t seglen = space < len - pos ? space : len - pos; 80319b2: fa1f f88a uxth.w r8, sl seg = last_unsent; /* Create a pbuf with a copy or reference to seglen bytes. We * can use PBUF_RAW here since the data appears in the middle of * a segment. A header will never be prepended. */ if (apiflags & TCP_WRITE_FLAG_COPY) { 80319b6: d514 bpl.n 80319e2 /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 80319b8: 2301 movs r3, #1 80319ba: 9101 str r1, [sp, #4] 80319bc: 9302 str r3, [sp, #8] 80319be: 9400 str r4, [sp, #0] 80319c0: 2003 movs r0, #3 80319c2: 4641 mov r1, r8 80319c4: f10d 0336 add.w r3, sp, #54 ; 0x36 80319c8: f7ff fedc bl 8031784 80319cc: 4607 mov r7, r0 80319ce: 2800 cmp r0, #0 80319d0: f000 80e9 beq.w 8031ba6 goto memerr; } #if TCP_OVERSIZE_DBGCHECK last_unsent->oversize_left += oversize; #endif /* TCP_OVERSIZE_DBGCHECK */ TCP_DATA_COPY2(concat_p->payload, (u8_t*)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); 80319d4: 9a06 ldr r2, [sp, #24] 80319d6: 6840 ldr r0, [r0, #4] 80319d8: 1951 adds r1, r2, r5 80319da: 4642 mov r2, r8 80319dc: f7f0 f962 bl 8021ca4 80319e0: e00b b.n 80319fa #if TCP_CHECKSUM_ON_COPY concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ } else { /* Data is not copied */ if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { 80319e2: 2003 movs r0, #3 80319e4: 4641 mov r1, r8 80319e6: 2201 movs r2, #1 80319e8: f7fe f99b bl 802fd22 80319ec: 4607 mov r7, r0 80319ee: 2800 cmp r0, #0 80319f0: f000 80d9 beq.w 8031ba6 tcp_seg_add_chksum(~inet_chksum((u8_t*)arg + pos, seglen), seglen, &concat_chksum, &concat_chksum_swapped); concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; 80319f4: 9806 ldr r0, [sp, #24] 80319f6: 1943 adds r3, r0, r5 80319f8: 607b str r3, [r7, #4] } pos += seglen; queuelen += pbuf_clen(concat_p); 80319fa: 4638 mov r0, r7 80319fc: f7fe fa18 bl 802fe30 #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; } pos += seglen; 8031a00: 44a8 add r8, r5 8031a02: fa1f f888 uxth.w r8, r8 queuelen += pbuf_clen(concat_p); 8031a06: 4458 add r0, fp 8031a08: 46aa mov sl, r5 8031a0a: fa1f fb80 uxth.w fp, r0 #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; } pos += seglen; 8031a0e: 4645 mov r5, r8 queuelen += pbuf_clen(concat_p); 8031a10: 4633 mov r3, r6 8031a12: e007 b.n 8031a24 u16_t queuelen; u8_t optlen = 0; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; u16_t oversize_used = 0; 8031a14: 46b2 mov sl, r6 err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; u16_t pos = 0; /* position in 'arg' data */ 8031a16: 4635 mov r5, r6 */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 8031a18: 4633 mov r3, r6 8031a1a: e000 b.n 8031a1e * * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 8031a1c: 46aa mov sl, r5 * @return ERR_OK if enqueued, another err_t on error */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; 8031a1e: 2700 movs r7, #0 8031a20: e000 b.n 8031a24 * * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 8031a22: 46aa mov sl, r5 #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 8031a24: 9907 ldr r1, [sp, #28] seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 8031a26: f04f 0800 mov.w r8, #0 #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 8031a2a: f001 0101 and.w r1, r1, #1 seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 8031a2e: f8cd 802c str.w r8, [sp, #44] ; 0x2c #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 8031a32: 9108 str r1, [sp, #32] 8031a34: e068 b.n 8031b08 * The new segments are chained together in the local 'queue' * variable, ready to be appended to pcb->unsent. */ while (pos < len) { struct pbuf *p; u16_t left = len - pos; 8031a36: ebc5 0309 rsb r3, r5, r9 u16_t max_len = mss_local - optlen; u16_t seglen = left > max_len ? max_len : left; 8031a3a: 9a0a ldr r2, [sp, #40] ; 0x28 8031a3c: b29b uxth r3, r3 8031a3e: 4293 cmp r3, r2 8031a40: bf38 it cc 8031a42: 461a movcc r2, r3 #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 8031a44: 9b08 ldr r3, [sp, #32] */ while (pos < len) { struct pbuf *p; u16_t left = len - pos; u16_t max_len = mss_local - optlen; u16_t seglen = left > max_len ? max_len : left; 8031a46: 9209 str r2, [sp, #36] ; 0x24 #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 8031a48: b1db cbz r3, 8031a82 /* If copy is set, memory should be allocated and data copied * into pbuf */ if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) { 8031a4a: f1d8 0301 rsbs r3, r8, #1 8031a4e: 9807 ldr r0, [sp, #28] 8031a50: 9400 str r4, [sp, #0] 8031a52: bf38 it cc 8031a54: 2300 movcc r3, #0 8031a56: 9001 str r0, [sp, #4] 8031a58: 9302 str r3, [sp, #8] 8031a5a: 4611 mov r1, r2 8031a5c: 2000 movs r0, #0 8031a5e: 9a0a ldr r2, [sp, #40] ; 0x28 8031a60: f10d 0336 add.w r3, sp, #54 ; 0x36 8031a64: f7ff fe8e bl 8031784 8031a68: 4684 mov ip, r0 8031a6a: 2800 cmp r0, #0 8031a6c: f000 809e beq.w 8031bac LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr; } LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", (p->len >= seglen)); TCP_DATA_COPY2((char *)p->payload + optlen, (u8_t*)arg + pos, seglen, &chksum, &chksum_swapped); 8031a70: 9a06 ldr r2, [sp, #24] 8031a72: 6840 ldr r0, [r0, #4] 8031a74: f8cd c014 str.w ip, [sp, #20] 8031a78: 1951 adds r1, r2, r5 8031a7a: 9a09 ldr r2, [sp, #36] ; 0x24 8031a7c: f7f0 f912 bl 8021ca4 8031a80: e019 b.n 8031ab6 */ struct pbuf *p2; #if TCP_OVERSIZE LWIP_ASSERT("oversize == 0", oversize == 0); #endif /* TCP_OVERSIZE */ if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { 8031a82: 9808 ldr r0, [sp, #32] 8031a84: 9909 ldr r1, [sp, #36] ; 0x24 8031a86: 2201 movs r2, #1 8031a88: f7fe f94b bl 802fd22 8031a8c: 4603 mov r3, r0 8031a8e: 2800 cmp r0, #0 8031a90: f000 808c beq.w 8031bac #if TCP_CHECKSUM_ON_COPY /* calculate the checksum of nocopy-data */ chksum = ~inet_chksum((u8_t*)arg + pos, seglen); #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ p2->payload = (u8_t*)arg + pos; 8031a94: 9806 ldr r0, [sp, #24] 8031a96: 1942 adds r2, r0, r5 /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8031a98: 9808 ldr r0, [sp, #32] #if TCP_CHECKSUM_ON_COPY /* calculate the checksum of nocopy-data */ chksum = ~inet_chksum((u8_t*)arg + pos, seglen); #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ p2->payload = (u8_t*)arg + pos; 8031a9a: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8031a9c: 4601 mov r1, r0 8031a9e: 4602 mov r2, r0 8031aa0: 9305 str r3, [sp, #20] 8031aa2: f7fe f93e bl 802fd22 8031aa6: 9b05 ldr r3, [sp, #20] 8031aa8: b908 cbnz r0, 8031aae /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 8031aaa: 4618 mov r0, r3 8031aac: e013 b.n 8031ad6 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: could not allocate memory for header pbuf\n")); goto memerr; } /* Concatenate the headers and data pbufs together. */ pbuf_cat(p/*header*/, p2/*data*/); 8031aae: 4619 mov r1, r3 8031ab0: 9005 str r0, [sp, #20] 8031ab2: f7fe f9d3 bl 802fe5c 8031ab6: f8dd c014 ldr.w ip, [sp, #20] } queuelen += pbuf_clen(p); 8031aba: 4660 mov r0, ip 8031abc: f8cd c014 str.w ip, [sp, #20] 8031ac0: f7fe f9b6 bl 802fe30 8031ac4: 4458 add r0, fp 8031ac6: fa1f fb80 uxth.w fp, r0 /* Now that there are more segments queued, we check again if the * length of the queue exceeds the configured maximum or * overflows. */ if ((queuelen > TCP_SND_QUEUELEN) || (queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { 8031aca: f1bb 0f48 cmp.w fp, #72 ; 0x48 8031ace: f8dd c014 ldr.w ip, [sp, #20] 8031ad2: d903 bls.n 8031adc LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: queue too long %"U16_F" (%"U16_F")\n", queuelen, TCP_SND_QUEUELEN)); pbuf_free(p); 8031ad4: 4660 mov r0, ip 8031ad6: f7fe f8d7 bl 802fc88 goto memerr; 8031ada: e067 b.n 8031bac } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 8031adc: 6de3 ldr r3, [r4, #92] ; 0x5c 8031ade: 2200 movs r2, #0 8031ae0: 18eb adds r3, r5, r3 8031ae2: 9200 str r2, [sp, #0] 8031ae4: 4620 mov r0, r4 8031ae6: 4661 mov r1, ip 8031ae8: f7ff fe78 bl 80317dc 8031aec: 4603 mov r3, r0 8031aee: 2800 cmp r0, #0 8031af0: d05c beq.n 8031bac seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 8031af2: f1b8 0f00 cmp.w r8, #0 8031af6: d002 beq.n 8031afe queue = seg; } else { /* Attach the segment to the end of the queued segments */ LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); prev_seg->next = seg; 8031af8: 990b ldr r1, [sp, #44] ; 0x2c 8031afa: 6008 str r0, [r1, #0] 8031afc: e000 b.n 8031b00 seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 8031afe: 4680 mov r8, r0 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, ("tcp_write: queueing %"U32_F":%"U32_F"\n", ntohl(seg->tcphdr->seqno), ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); pos += seglen; 8031b00: 9a09 ldr r2, [sp, #36] ; 0x24 8031b02: 930b str r3, [sp, #44] ; 0x2c 8031b04: 1955 adds r5, r2, r5 8031b06: b2ad uxth r5, r5 * Phase 3: Create new segments. * * The new segments are chained together in the local 'queue' * variable, ready to be appended to pcb->unsent. */ while (pos < len) { 8031b08: 454d cmp r5, r9 8031b0a: d394 bcc.n 8031a36 /* * Phase 1: If data has been added to the preallocated tail of * last_unsent, we update the length fields of the pbuf chain. */ #if TCP_OVERSIZE if (oversize_used > 0) { 8031b0c: f1ba 0f00 cmp.w sl, #0 8031b10: d019 beq.n 8031b46 struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 8031b12: 6875 ldr r5, [r6, #4] 8031b14: e011 b.n 8031b3a p->tot_len += oversize_used; 8031b16: 892a ldrh r2, [r5, #8] 8031b18: 4452 add r2, sl 8031b1a: 812a strh r2, [r5, #8] if (p->next == NULL) { 8031b1c: 682a ldr r2, [r5, #0] 8031b1e: b95a cbnz r2, 8031b38 TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 8031b20: 686a ldr r2, [r5, #4] 8031b22: 8968 ldrh r0, [r5, #10] 8031b24: 9906 ldr r1, [sp, #24] 8031b26: 9305 str r3, [sp, #20] 8031b28: 1810 adds r0, r2, r0 8031b2a: 4652 mov r2, sl 8031b2c: f7f0 f8ba bl 8021ca4 p->len += oversize_used; 8031b30: 896a ldrh r2, [r5, #10] 8031b32: 9b05 ldr r3, [sp, #20] 8031b34: 4452 add r2, sl 8031b36: 816a strh r2, [r5, #10] */ #if TCP_OVERSIZE if (oversize_used > 0) { struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 8031b38: 682d ldr r5, [r5, #0] 8031b3a: 2d00 cmp r5, #0 8031b3c: d1eb bne.n 8031b16 if (p->next == NULL) { TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); p->len += oversize_used; } } last_unsent->len += oversize_used; 8031b3e: 8932 ldrh r2, [r6, #8] 8031b40: 4492 add sl, r2 8031b42: f8a6 a008 strh.w sl, [r6, #8] LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", last_unsent->oversize_left >= oversize_used); last_unsent->oversize_left -= oversize_used; #endif /* TCP_OVERSIZE_DBGCHECK */ } pcb->unsent_oversize = oversize; 8031b46: f8bd 2036 ldrh.w r2, [sp, #54] ; 0x36 8031b4a: f8a4 206a strh.w r2, [r4, #106] ; 0x6a #endif /* TCP_OVERSIZE */ /* * Phase 2: concat_p can be concatenated onto last_unsent->p */ if (concat_p != NULL) { 8031b4e: b157 cbz r7, 8031b66 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 8031b50: 6870 ldr r0, [r6, #4] 8031b52: 9305 str r3, [sp, #20] 8031b54: 4639 mov r1, r7 8031b56: f7fe f981 bl 802fe5c last_unsent->len += concat_p->tot_len; 8031b5a: 8939 ldrh r1, [r7, #8] 8031b5c: 8932 ldrh r2, [r6, #8] 8031b5e: 9b05 ldr r3, [sp, #20] 8031b60: 188a adds r2, r1, r2 8031b62: 8132 strh r2, [r6, #8] 8031b64: e003 b.n 8031b6e /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 8031b66: b916 cbnz r6, 8031b6e pcb->unsent = queue; 8031b68: f8c4 806c str.w r8, [r4, #108] ; 0x6c 8031b6c: e001 b.n 8031b72 } else { last_unsent->next = queue; 8031b6e: f8c6 8000 str.w r8, [r6] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 8031b72: 6de2 ldr r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; pcb->snd_queuelen = queuelen; 8031b74: f8a4 b068 strh.w fp, [r4, #104] ; 0x68 } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 8031b78: 444a add r2, r9 8031b7a: 65e2 str r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; 8031b7c: f8b4 2066 ldrh.w r2, [r4, #102] ; 0x66 8031b80: ebc9 0902 rsb r9, r9, r2 8031b84: f8a4 9066 strh.w r9, [r4, #102] ; 0x66 LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } /* Set the PSH flag in the last segment that we enqueued. */ if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE)==0)) { 8031b88: b333 cbz r3, 8031bd8 8031b8a: 68dc ldr r4, [r3, #12] 8031b8c: b30c cbz r4, 8031bd2 8031b8e: 9b07 ldr r3, [sp, #28] 8031b90: f003 0502 and.w r5, r3, #2 8031b94: b2ed uxtb r5, r5 8031b96: b9e5 cbnz r5, 8031bd2 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 8031b98: 2008 movs r0, #8 8031b9a: 89a6 ldrh r6, [r4, #12] 8031b9c: f7fc ff36 bl 802ea0c 8031ba0: 4330 orrs r0, r6 8031ba2: 81a0 strh r0, [r4, #12] 8031ba4: e015 b.n 8031bd2 */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 8031ba6: f04f 0800 mov.w r8, #0 8031baa: 4647 mov r7, r8 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; memerr: pcb->flags |= TF_NAGLEMEMERR; 8031bac: 7fa3 ldrb r3, [r4, #30] 8031bae: f063 037f orn r3, r3, #127 ; 0x7f 8031bb2: 77a3 strb r3, [r4, #30] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 8031bb4: b117 cbz r7, 8031bbc pbuf_free(concat_p); 8031bb6: 4638 mov r0, r7 8031bb8: f7fe f866 bl 802fc88 } if (queue != NULL) { 8031bbc: f1b8 0f00 cmp.w r8, #0 8031bc0: d009 beq.n 8031bd6 tcp_segs_free(queue); 8031bc2: 4640 mov r0, r8 8031bc4: f7fe fb1b bl 80301fe 8031bc8: e005 b.n 8031bd6 apiflags |= TCP_WRITE_FLAG_COPY; #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", (void *)pcb, arg, len, (u16_t)apiflags)); LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", 8031bca: 23f2 movs r3, #242 ; 0xf2 8031bcc: e004 b.n 8031bd8 if ((pcb->state != ESTABLISHED) && (pcb->state != CLOSE_WAIT) && (pcb->state != SYN_SENT) && (pcb->state != SYN_RCVD)) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; 8031bce: 23f3 movs r3, #243 ; 0xf3 8031bd0: e002 b.n 8031bd8 /* Set the PSH flag in the last segment that we enqueued. */ if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE)==0)) { TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; 8031bd2: 2300 movs r3, #0 8031bd4: e000 b.n 8031bd8 if (pcb->snd_queuelen != 0) { LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } LWIP_DEBUGF(TCP_QLEN_DEBUG | LWIP_DBG_STATE, ("tcp_write: %"S16_F" (with mem err)\n", pcb->snd_queuelen)); return ERR_MEM; 8031bd6: 23ff movs r3, #255 ; 0xff 8031bd8: b258 sxtb r0, r3 } 8031bda: b00f add sp, #60 ; 0x3c 8031bdc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08031be0 : LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", (flags & (TCP_SYN | TCP_FIN)) != 0); /* check for configured max queuelen and possible overflow */ if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { 8031be0: f8b0 3068 ldrh.w r3, [r0, #104] ; 0x68 8031be4: 2b47 cmp r3, #71 ; 0x47 * @param optdata pointer to TCP options, or NULL. * @param optlen length of TCP options in bytes. */ err_t tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) { 8031be6: b573 push {r0, r1, r4, r5, r6, lr} 8031be8: 4604 mov r4, r0 8031bea: 460d mov r5, r1 LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", (flags & (TCP_SYN | TCP_FIN)) != 0); /* check for configured max queuelen and possible overflow */ if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { 8031bec: d900 bls.n 8031bf0 8031bee: e014 b.n 8031c1a /* tcp_enqueue_flags is always called with either SYN or FIN in flags. * We need one available snd_buf byte to do that. * This means we can't send FIN while snd_buf==0. A better fix would be to * not include SYN and FIN sequence numbers in the snd_buf count. */ if (pcb->snd_buf == 0) { 8031bf0: f8b0 3066 ldrh.w r3, [r0, #102] ; 0x66 err_t tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) { struct pbuf *p; struct tcp_seg *seg; u8_t optflags = 0; 8031bf4: f3c1 0640 ubfx r6, r1, #1, #1 #if LWIP_TCP_TIMESTAMPS if ((pcb->flags & TF_TIMESTAMP)) { optflags |= TF_SEG_OPTS_TS; } #endif /* LWIP_TCP_TIMESTAMPS */ optlen = LWIP_TCP_OPT_LENGTH(optflags); 8031bf8: 00b1 lsls r1, r6, #2 /* tcp_enqueue_flags is always called with either SYN or FIN in flags. * We need one available snd_buf byte to do that. * This means we can't send FIN while snd_buf==0. A better fix would be to * not include SYN and FIN sequence numbers in the snd_buf count. */ if (pcb->snd_buf == 0) { 8031bfa: 2b00 cmp r3, #0 8031bfc: d038 beq.n 8031c70 TCP_STATS_INC(tcp.memerr); return ERR_MEM; } /* Allocate pbuf with room for TCP header + options */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8031bfe: 2000 movs r0, #0 8031c00: 4602 mov r2, r0 8031c02: f7fe f88e bl 802fd22 8031c06: 4601 mov r1, r0 8031c08: b900 cbnz r0, 8031c0c 8031c0a: e006 b.n 8031c1a } LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", (p->len >= optlen)); /* Allocate memory for tcp_seg, and fill in fields. */ if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) { 8031c0c: 9600 str r6, [sp, #0] 8031c0e: 4620 mov r0, r4 8031c10: 462a mov r2, r5 8031c12: 6de3 ldr r3, [r4, #92] ; 0x5c 8031c14: f7ff fde2 bl 80317dc 8031c18: b920 cbnz r0, 8031c24 pcb->flags |= TF_NAGLEMEMERR; 8031c1a: 7fa3 ldrb r3, [r4, #30] 8031c1c: f063 037f orn r3, r3, #127 ; 0x7f 8031c20: 77a3 strb r3, [r4, #30] 8031c22: e025 b.n 8031c70 ntohl(seg->tcphdr->seqno), ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg), (u16_t)flags)); /* Now append seg to pcb->unsent queue */ if (pcb->unsent == NULL) { 8031c24: 6ee3 ldr r3, [r4, #108] ; 0x6c 8031c26: b913 cbnz r3, 8031c2e pcb->unsent = seg; 8031c28: 66e0 str r0, [r4, #108] ; 0x6c 8031c2a: e004 b.n 8031c36 } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 8031c2c: 4613 mov r3, r2 8031c2e: 681a ldr r2, [r3, #0] 8031c30: 2a00 cmp r2, #0 8031c32: d1fb bne.n 8031c2c useg->next = seg; 8031c34: 6018 str r0, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 8031c36: 2300 movs r3, #0 #endif /* TCP_OVERSIZE */ /* SYN and FIN bump the sequence number */ if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 8031c38: 07a9 lsls r1, r5, #30 for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); useg->next = seg; } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 8031c3a: f8a4 306a strh.w r3, [r4, #106] ; 0x6a #endif /* TCP_OVERSIZE */ /* SYN and FIN bump the sequence number */ if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 8031c3e: d007 beq.n 8031c50 pcb->snd_lbb++; 8031c40: 6de3 ldr r3, [r4, #92] ; 0x5c 8031c42: 3301 adds r3, #1 8031c44: 65e3 str r3, [r4, #92] ; 0x5c /* optlen does not influence snd_buf */ pcb->snd_buf--; 8031c46: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 8031c4a: 3b01 subs r3, #1 8031c4c: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 } if (flags & TCP_FIN) { 8031c50: 07ea lsls r2, r5, #31 8031c52: d503 bpl.n 8031c5c pcb->flags |= TF_FIN; 8031c54: 7fa3 ldrb r3, [r4, #30] 8031c56: f043 0320 orr.w r3, r3, #32 8031c5a: 77a3 strb r3, [r4, #30] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 8031c5c: 6840 ldr r0, [r0, #4] 8031c5e: f8b4 5068 ldrh.w r5, [r4, #104] ; 0x68 8031c62: f7fe f8e5 bl 802fe30 8031c66: 1940 adds r0, r0, r5 8031c68: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 if (pcb->snd_queuelen != 0) { LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; 8031c6c: 2000 movs r0, #0 8031c6e: e000 b.n 8031c72 * This means we can't send FIN while snd_buf==0. A better fix would be to * not include SYN and FIN sequence numbers in the snd_buf count. */ if (pcb->snd_buf == 0) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue_flags: no send buffer available\n")); TCP_STATS_INC(tcp.memerr); return ERR_MEM; 8031c70: 20ff movs r0, #255 ; 0xff LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; } 8031c72: b240 sxtb r0, r0 8031c74: bd7c pop {r2, r3, r4, r5, r6, pc} 08031c76 : * @param pcb the tcp_pcb over which to send a segment * @return ERR_OK if sent, another err_t otherwise */ err_t tcp_send_fin(struct tcp_pcb *pcb) { 8031c76: b5f8 push {r3, r4, r5, r6, r7, lr} /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 8031c78: 6ec4 ldr r4, [r0, #108] ; 0x6c * @param pcb the tcp_pcb over which to send a segment * @return ERR_OK if sent, another err_t otherwise */ err_t tcp_send_fin(struct tcp_pcb *pcb) { 8031c7a: 4605 mov r5, r0 /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 8031c7c: b90c cbnz r4, 8031c82 8031c7e: e00a b.n 8031c96 struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); 8031c80: 461c mov r4, r3 tcp_send_fin(struct tcp_pcb *pcb) { /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; 8031c82: 6823 ldr r3, [r4, #0] 8031c84: 2b00 cmp r3, #0 8031c86: d1fb bne.n 8031c80 last_unsent = last_unsent->next); if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 8031c88: 68e3 ldr r3, [r4, #12] 8031c8a: 8998 ldrh r0, [r3, #12] 8031c8c: f7fc fec3 bl 802ea16 8031c90: f010 0607 ands.w r6, r0, #7 8031c94: d005 beq.n 8031ca2 pcb->flags |= TF_FIN; return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 8031c96: 4628 mov r0, r5 8031c98: 2101 movs r1, #1 } 8031c9a: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} pcb->flags |= TF_FIN; return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 8031c9e: f7ff bf9f b.w 8031be0 for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); 8031ca2: 68e4 ldr r4, [r4, #12] 8031ca4: 2001 movs r0, #1 8031ca6: 89a7 ldrh r7, [r4, #12] 8031ca8: f7fc feb0 bl 802ea0c 8031cac: 4338 orrs r0, r7 8031cae: 81a0 strh r0, [r4, #12] pcb->flags |= TF_FIN; 8031cb0: 7fab ldrb r3, [r5, #30] 8031cb2: f043 0320 orr.w r3, r3, #32 8031cb6: 77ab strb r3, [r5, #30] return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); } 8031cb8: 4630 mov r0, r6 8031cba: bdf8 pop {r3, r4, r5, r6, r7, pc} 08031cbc : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 8031cbc: b537 push {r0, r1, r2, r4, r5, lr} 8031cbe: 4604 mov r4, r0 if (pcb->flags & TF_TIMESTAMP) { optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); } #endif p = tcp_output_alloc_header(pcb, optlen, 0, htonl(pcb->snd_nxt)); 8031cc0: 6d00 ldr r0, [r0, #80] ; 0x50 8031cc2: f7fc fead bl 802ea20 8031cc6: 2100 movs r1, #0 8031cc8: 4602 mov r2, r0 8031cca: 4620 mov r0, r4 8031ccc: f7ff fdd8 bl 8031880 if (p == NULL) { 8031cd0: 4605 mov r5, r0 8031cd2: b188 cbz r0, 8031cf8 } tcphdr = (struct tcp_hdr *)p->payload; LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); /* remove ACK flags from the PCB, as we send an empty ACK now */ pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8031cd4: 7fa3 ldrb r3, [r4, #30] #endif #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, 8031cd6: 7a62 ldrb r2, [r4, #9] } tcphdr = (struct tcp_hdr *)p->payload; LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); /* remove ACK flags from the PCB, as we send an empty ACK now */ pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8031cd8: f023 0303 bic.w r3, r3, #3 #endif #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, 8031cdc: 9200 str r2, [sp, #0] 8031cde: 2206 movs r2, #6 } tcphdr = (struct tcp_hdr *)p->payload; LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); /* remove ACK flags from the PCB, as we send an empty ACK now */ pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8031ce0: 77a3 strb r3, [r4, #30] #endif #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, 8031ce2: 9201 str r2, [sp, #4] 8031ce4: 7aa3 ldrb r3, [r4, #10] 8031ce6: 4621 mov r1, r4 8031ce8: 1d22 adds r2, r4, #4 8031cea: f001 f8ab bl 8032e44 IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 8031cee: 4628 mov r0, r5 8031cf0: f7fd ffca bl 802fc88 return ERR_OK; 8031cf4: 2000 movs r0, #0 8031cf6: e000 b.n 8031cfa #endif p = tcp_output_alloc_header(pcb, optlen, 0, htonl(pcb->snd_nxt)); if (p == NULL) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); return ERR_BUF; 8031cf8: 20fe movs r0, #254 ; 0xfe IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); return ERR_OK; } 8031cfa: b240 sxtb r0, r0 8031cfc: bd3e pop {r1, r2, r3, r4, r5, pc} 8031cfe: 0000 movs r0, r0 08031d00 : /* First, check if we are invoked by the TCP input processing code. If so, we do not output anything. Instead, we rely on the input processing code to call us when input processing is done with. */ if (tcp_input_pcb == pcb) { 8031d00: 4b8f ldr r3, [pc, #572] ; (8031f40 ) 8031d02: 681b ldr r3, [r3, #0] 8031d04: 4283 cmp r3, r0 * @return ERR_OK if data has been sent or nothing to send * another err_t on error */ err_t tcp_output(struct tcp_pcb *pcb) { 8031d06: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8031d0a: 4604 mov r4, r0 /* First, check if we are invoked by the TCP input processing code. If so, we do not output anything. Instead, we rely on the input processing code to call us when input processing is done with. */ if (tcp_input_pcb == pcb) { 8031d0c: f000 8113 beq.w 8031f36 return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 8031d10: f8b0 304c ldrh.w r3, [r0, #76] ; 0x4c 8031d14: f8b0 9060 ldrh.w r9, [r0, #96] ; 0x60 seg = pcb->unsent; 8031d18: 6ec5 ldr r5, [r0, #108] ; 0x6c with. */ if (tcp_input_pcb == pcb) { return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 8031d1a: 4599 cmp r9, r3 8031d1c: bf28 it cs 8031d1e: 4699 movcs r9, r3 * because the ->unsent queue is empty or because the window does * not allow it), construct an empty ACK segment and send it. * * If data is to be sent, we will just piggyback the ACK (see below). */ if (pcb->flags & TF_ACK_NOW && 8031d20: 7f83 ldrb r3, [r0, #30] 8031d22: f003 0302 and.w r3, r3, #2 8031d26: b2db uxtb r3, r3 8031d28: b183 cbz r3, 8031d4c 8031d2a: b92d cbnz r5, 8031d38 (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); 8031d2c: 4620 mov r0, r4 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 8031d2e: b003 add sp, #12 8031d30: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} * If data is to be sent, we will just piggyback the ACK (see below). */ if (pcb->flags & TF_ACK_NOW && (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); 8031d34: f7ff bfc2 b.w 8031cbc * * If data is to be sent, we will just piggyback the ACK (see below). */ if (pcb->flags & TF_ACK_NOW && (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { 8031d38: 68eb ldr r3, [r5, #12] 8031d3a: 6858 ldr r0, [r3, #4] 8031d3c: f7fc fe72 bl 802ea24 8031d40: 892a ldrh r2, [r5, #8] 8031d42: 6ca3 ldr r3, [r4, #72] ; 0x48 8031d44: 1ad3 subs r3, r2, r3 8031d46: 1818 adds r0, r3, r0 * not allow it), construct an empty ACK segment and send it. * * If data is to be sent, we will just piggyback the ACK (see below). */ if (pcb->flags & TF_ACK_NOW && (seg == NULL || 8031d48: 4548 cmp r0, r9 8031d4a: d8ef bhi.n 8031d2c ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); } /* useg should point to last segment on unacked queue */ useg = pcb->unacked; 8031d4c: 6f26 ldr r6, [r4, #112] ; 0x70 if (useg != NULL) { 8031d4e: b90e cbnz r6, 8031d54 8031d50: e0d1 b.n 8031ef6 for (; useg->next != NULL; useg = useg->next); 8031d52: 461e mov r6, r3 8031d54: 6833 ldr r3, [r6, #0] 8031d56: 2b00 cmp r3, #0 8031d58: d1fb bne.n 8031d52 8031d5a: e0cc b.n 8031ef6 } #endif /* TCP_CWND_DEBUG */ /* data available and window allows it to be sent? */ while (seg != NULL && ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { LWIP_ASSERT("RST not expected here!", 8031d5c: 68eb ldr r3, [r5, #12] 8031d5e: 8998 ldrh r0, [r3, #12] 8031d60: f7fc fe59 bl 802ea16 * - if tcp_write had a memory error before (prevent delayed ACK timeout) or * - if FIN was already enqueued for this PCB (SYN is always alone in a segment - * either seg->next != NULL or pcb->unacked == NULL; * RST is no sent using tcp_write/tcp_output. */ if((tcp_do_output_nagle(pcb) == 0) && 8031d64: 6f23 ldr r3, [r4, #112] ; 0x70 8031d66: b19b cbz r3, 8031d90 8031d68: 7fa2 ldrb r2, [r4, #30] 8031d6a: f012 0f44 tst.w r2, #68 ; 0x44 8031d6e: d10f bne.n 8031d90 8031d70: 6ee3 ldr r3, [r4, #108] ; 0x6c 8031d72: b12b cbz r3, 8031d80 8031d74: 6819 ldr r1, [r3, #0] 8031d76: b959 cbnz r1, 8031d90 8031d78: 8919 ldrh r1, [r3, #8] 8031d7a: 8ee3 ldrh r3, [r4, #54] ; 0x36 8031d7c: 4299 cmp r1, r3 8031d7e: d207 bcs.n 8031d90 8031d80: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 8031d84: b123 cbz r3, 8031d90 8031d86: f8b4 3068 ldrh.w r3, [r4, #104] ; 0x68 8031d8a: 2b47 cmp r3, #71 ; 0x47 8031d8c: f240 80ce bls.w 8031f2c pcb->lastack, ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ pcb->unsent = seg->next; 8031d90: 682b ldr r3, [r5, #0] 8031d92: 66e3 str r3, [r4, #108] ; 0x6c if (pcb->state != SYN_SENT) { 8031d94: 7e23 ldrb r3, [r4, #24] 8031d96: 2b02 cmp r3, #2 8031d98: d00c beq.n 8031db4 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 8031d9a: 68ef ldr r7, [r5, #12] 8031d9c: 2010 movs r0, #16 8031d9e: f8b7 b00c ldrh.w fp, [r7, #12] 8031da2: f7fc fe33 bl 802ea0c 8031da6: ea40 000b orr.w r0, r0, fp 8031daa: 81b8 strh r0, [r7, #12] pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8031dac: 7fa3 ldrb r3, [r4, #30] 8031dae: f023 0303 bic.w r3, r3, #3 8031db2: 77a3 strb r3, [r4, #30] u16_t len; struct netif *netif; u32_t *opts; /** @bug Exclude retransmitted segments from this count. */ snmp_inc_tcpoutsegs(); 8031db4: f002 fd64 bl 8034880 /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = htonl(pcb->rcv_nxt); 8031db8: 6aa0 ldr r0, [r4, #40] ; 0x28 8031dba: 68ef ldr r7, [r5, #12] 8031dbc: f7fc fe30 bl 802ea20 8031dc0: 60b8 str r0, [r7, #8] /* advertise our receive window size in this TCP segment */ seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); 8031dc2: 8de0 ldrh r0, [r4, #46] ; 0x2e 8031dc4: 68ef ldr r7, [r5, #12] 8031dc6: f7fc fe21 bl 802ea0c 8031dca: 81f8 strh r0, [r7, #14] pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8031dcc: 8de2 ldrh r2, [r4, #46] ; 0x2e 8031dce: 6aa3 ldr r3, [r4, #40] ; 0x28 /* Add any requested options. NB MSS option is only set on SYN packets, so ignore it here */ opts = (u32_t *)(void *)(seg->tcphdr + 1); 8031dd0: 68ef ldr r7, [r5, #12] seg->tcphdr->ackno = htonl(pcb->rcv_nxt); /* advertise our receive window size in this TCP segment */ seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8031dd2: 18d3 adds r3, r2, r3 8031dd4: 6323 str r3, [r4, #48] ; 0x30 /* Add any requested options. NB MSS option is only set on SYN packets, so ignore it here */ opts = (u32_t *)(void *)(seg->tcphdr + 1); if (seg->flags & TF_SEG_OPTS_MSS) { 8031dd6: 7aab ldrb r3, [r5, #10] 8031dd8: 07d8 lsls r0, r3, #31 8031dda: d509 bpl.n 8031df0 u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip); 8031ddc: 4641 mov r1, r8 8031dde: f240 50b4 movw r0, #1460 ; 0x5b4 8031de2: f7fe fde4 bl 80309ae #else /* TCP_CALCULATE_EFF_SEND_MSS */ mss = TCP_MSS; #endif /* TCP_CALCULATE_EFF_SEND_MSS */ *opts = TCP_BUILD_MSS_OPTION(mss); 8031de6: f040 7001 orr.w r0, r0, #33816576 ; 0x2040000 8031dea: f7fc fe19 bl 802ea20 8031dee: 6178 str r0, [r7, #20] } #endif /* Set retransmission timer running if it is not currently enabled This must be set before checking the route. */ if (pcb->rtime == -1) { 8031df0: f9b4 3034 ldrsh.w r3, [r4, #52] ; 0x34 8031df4: 3301 adds r3, #1 8031df6: d101 bne.n 8031dfc pcb->rtime = 0; 8031df8: 2300 movs r3, #0 8031dfa: 86a3 strh r3, [r4, #52] ; 0x34 } /* If we don't have a local IP address, we get one by calling ip_route(). */ if (ip_addr_isany(&(pcb->local_ip))) { 8031dfc: 6823 ldr r3, [r4, #0] 8031dfe: b92b cbnz r3, 8031e0c netif = ip_route(&(pcb->remote_ip)); 8031e00: 4640 mov r0, r8 8031e02: f000 fecb bl 8032b9c if (netif == NULL) { 8031e06: b310 cbz r0, 8031e4e return; } ip_addr_copy(pcb->local_ip, netif->ip_addr); 8031e08: 6843 ldr r3, [r0, #4] 8031e0a: 6023 str r3, [r4, #0] } if (pcb->rttest == 0) { 8031e0c: 6ba3 ldr r3, [r4, #56] ; 0x38 8031e0e: b93b cbnz r3, 8031e20 pcb->rttest = tcp_ticks; 8031e10: f8da 3000 ldr.w r3, [sl] 8031e14: 63a3 str r3, [r4, #56] ; 0x38 pcb->rtseq = ntohl(seg->tcphdr->seqno); 8031e16: 68eb ldr r3, [r5, #12] 8031e18: 6858 ldr r0, [r3, #4] 8031e1a: f7fc fe03 bl 802ea24 8031e1e: 63e0 str r0, [r4, #60] ; 0x3c } LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", htonl(seg->tcphdr->seqno), htonl(seg->tcphdr->seqno) + seg->len)); len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); 8031e20: 6868 ldr r0, [r5, #4] 8031e22: 68eb ldr r3, [r5, #12] 8031e24: 6842 ldr r2, [r0, #4] seg->p->len -= len; 8031e26: 8941 ldrh r1, [r0, #10] seg->p->tot_len -= len; seg->p->payload = seg->tcphdr; 8031e28: 6043 str r3, [r0, #4] } LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", htonl(seg->tcphdr->seqno), htonl(seg->tcphdr->seqno) + seg->len)); len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); 8031e2a: 1a9a subs r2, r3, r2 seg->p->len -= len; 8031e2c: 1a89 subs r1, r1, r2 8031e2e: 8141 strh r1, [r0, #10] seg->p->tot_len -= len; 8031e30: 8901 ldrh r1, [r0, #8] 8031e32: 1a8a subs r2, r1, r2 8031e34: 8102 strh r2, [r0, #8] seg->p->payload = seg->tcphdr; seg->tcphdr->chksum = 0; 8031e36: 2200 movs r2, #0 8031e38: 741a strb r2, [r3, #16] 8031e3a: 745a strb r2, [r3, #17] #if LWIP_NETIF_HWADDRHINT ip_output_hinted(seg->p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(seg->p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, 8031e3c: 7a62 ldrb r2, [r4, #9] 8031e3e: 7aa3 ldrb r3, [r4, #10] 8031e40: 9200 str r2, [sp, #0] 8031e42: 2206 movs r2, #6 8031e44: 9201 str r2, [sp, #4] 8031e46: 4621 mov r1, r4 8031e48: 4642 mov r2, r8 8031e4a: f000 fffb bl 8032e44 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } tcp_output_segment(seg, pcb); snd_nxt = ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 8031e4e: 68eb ldr r3, [r5, #12] 8031e50: 6858 ldr r0, [r3, #4] 8031e52: f7fc fde7 bl 802ea24 8031e56: 68ea ldr r2, [r5, #12] 8031e58: f8b5 b008 ldrh.w fp, [r5, #8] 8031e5c: 4607 mov r7, r0 8031e5e: 8990 ldrh r0, [r2, #12] 8031e60: f7fc fdd9 bl 802ea16 8031e64: f010 0003 ands.w r0, r0, #3 8031e68: bf18 it ne 8031e6a: 2001 movne r0, #1 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 8031e6c: 6d22 ldr r2, [r4, #80] ; 0x50 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } tcp_output_segment(seg, pcb); snd_nxt = ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 8031e6e: eb0b 0300 add.w r3, fp, r0 8031e72: 19db adds r3, r3, r7 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 8031e74: 1ad2 subs r2, r2, r3 8031e76: 2a00 cmp r2, #0 pcb->snd_nxt = snd_nxt; 8031e78: bfb8 it lt 8031e7a: 6523 strlt r3, [r4, #80] ; 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 8031e7c: 68eb ldr r3, [r5, #12] 8031e7e: 892f ldrh r7, [r5, #8] 8031e80: 8998 ldrh r0, [r3, #12] 8031e82: f7fc fdc8 bl 802ea16 8031e86: f010 0003 ands.w r0, r0, #3 8031e8a: bf18 it ne 8031e8c: 2001 movne r0, #1 8031e8e: 1838 adds r0, r7, r0 8031e90: b360 cbz r0, 8031eec seg->next = NULL; 8031e92: 2300 movs r3, #0 8031e94: 602b str r3, [r5, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 8031e96: 6f23 ldr r3, [r4, #112] ; 0x70 8031e98: b90b cbnz r3, 8031e9e pcb->unacked = seg; 8031e9a: 6725 str r5, [r4, #112] ; 0x70 8031e9c: e024 b.n 8031ee8 /* unacked list is not empty? */ } else { /* In the case of fast retransmit, the packet should not go to the tail * of the unacked queue, but rather somewhere before it. We need to check for * this case. -STJ Jul 27, 2004 */ if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) { 8031e9e: 68eb ldr r3, [r5, #12] 8031ea0: 6858 ldr r0, [r3, #4] 8031ea2: f7fc fdbf bl 802ea24 8031ea6: 68f3 ldr r3, [r6, #12] 8031ea8: 4607 mov r7, r0 8031eaa: 6858 ldr r0, [r3, #4] 8031eac: f7fc fdba bl 802ea24 8031eb0: 1a38 subs r0, r7, r0 8031eb2: 2800 cmp r0, #0 8031eb4: da17 bge.n 8031ee6 /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 8031eb6: f104 0770 add.w r7, r4, #112 ; 0x70 while (*cur_seg && 8031eba: e000 b.n 8031ebe TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 8031ebc: 683f ldr r7, [r7, #0] * of the unacked queue, but rather somewhere before it. We need to check for * this case. -STJ Jul 27, 2004 */ if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) { /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); while (*cur_seg && 8031ebe: 683b ldr r3, [r7, #0] 8031ec0: b91b cbnz r3, 8031eca TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = (*cur_seg); 8031ec2: 683b ldr r3, [r7, #0] 8031ec4: 602b str r3, [r5, #0] (*cur_seg) = seg; 8031ec6: 603d str r5, [r7, #0] 8031ec8: e013 b.n 8031ef2 * this case. -STJ Jul 27, 2004 */ if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) { /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); while (*cur_seg && TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { 8031eca: 68db ldr r3, [r3, #12] 8031ecc: 6858 ldr r0, [r3, #4] 8031ece: f7fc fda9 bl 802ea24 8031ed2: 68eb ldr r3, [r5, #12] 8031ed4: 4683 mov fp, r0 8031ed6: 6858 ldr r0, [r3, #4] 8031ed8: f7fc fda4 bl 802ea24 8031edc: ebc0 000b rsb r0, r0, fp * of the unacked queue, but rather somewhere before it. We need to check for * this case. -STJ Jul 27, 2004 */ if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) { /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); while (*cur_seg && 8031ee0: 2800 cmp r0, #0 8031ee2: dbeb blt.n 8031ebc 8031ee4: e7ed b.n 8031ec2 } seg->next = (*cur_seg); (*cur_seg) = seg; } else { /* add segment to tail of unacked list */ useg->next = seg; 8031ee6: 6035 str r5, [r6, #0] 8031ee8: 462e mov r6, r5 8031eea: e002 b.n 8031ef2 useg = useg->next; } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 8031eec: 4628 mov r0, r5 8031eee: f7fe f978 bl 80301e2 } seg = pcb->unsent; 8031ef2: 6ee5 ldr r5, [r4, #108] ; 0x6c 8031ef4: e003 b.n 8031efe } ip_addr_copy(pcb->local_ip, netif->ip_addr); } if (pcb->rttest == 0) { pcb->rttest = tcp_ticks; 8031ef6: f8df a04c ldr.w sl, [pc, #76] ; 8031f44 packets, so ignore it here */ opts = (u32_t *)(void *)(seg->tcphdr + 1); if (seg->flags & TF_SEG_OPTS_MSS) { u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip); 8031efa: f104 0804 add.w r8, r4, #4 ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len, ntohl(seg->tcphdr->seqno), pcb->lastack)); } #endif /* TCP_CWND_DEBUG */ /* data available and window allows it to be sent? */ while (seg != NULL && 8031efe: b915 cbnz r5, 8031f06 tcp_seg_free(seg); } seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 8031f00: 6ee3 ldr r3, [r4, #108] ; 0x6c 8031f02: b973 cbnz r3, 8031f22 8031f04: e00b b.n 8031f1e ntohl(seg->tcphdr->seqno), pcb->lastack)); } #endif /* TCP_CWND_DEBUG */ /* data available and window allows it to be sent? */ while (seg != NULL && ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { 8031f06: 68eb ldr r3, [r5, #12] 8031f08: 6858 ldr r0, [r3, #4] 8031f0a: f7fc fd8b bl 802ea24 8031f0e: 892a ldrh r2, [r5, #8] 8031f10: 6ca3 ldr r3, [r4, #72] ; 0x48 8031f12: 1ad3 subs r3, r2, r3 8031f14: 1818 adds r0, r3, r0 ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len, ntohl(seg->tcphdr->seqno), pcb->lastack)); } #endif /* TCP_CWND_DEBUG */ /* data available and window allows it to be sent? */ while (seg != NULL && 8031f16: 4548 cmp r0, r9 8031f18: f67f af20 bls.w 8031d5c 8031f1c: e7f0 b.n 8031f00 seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 8031f1e: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; 8031f22: 7fa3 ldrb r3, [r4, #30] 8031f24: f003 037f and.w r3, r3, #127 ; 0x7f 8031f28: 77a3 strb r3, [r4, #30] return ERR_OK; 8031f2a: e004 b.n 8031f36 * - if tcp_write had a memory error before (prevent delayed ACK timeout) or * - if FIN was already enqueued for this PCB (SYN is always alone in a segment - * either seg->next != NULL or pcb->unacked == NULL; * RST is no sent using tcp_write/tcp_output. */ if((tcp_do_output_nagle(pcb) == 0) && 8031f2c: f012 0fa0 tst.w r2, #160 ; 0xa0 8031f30: f47f af2e bne.w 8031d90 8031f34: e7e4 b.n 8031f00 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 8031f36: 2000 movs r0, #0 8031f38: b003 add sp, #12 8031f3a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8031f3e: bf00 nop 8031f40: 2000ff38 .word 0x2000ff38 8031f44: 2000ff24 .word 0x2000ff24 08031f48 : */ void tcp_rst(u32_t seqno, u32_t ackno, ip_addr_t *local_ip, ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port) { 8031f48: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8031f4c: 4681 mov r9, r0 8031f4e: 460d mov r5, r1 8031f50: 4690 mov r8, r2 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 8031f52: 2001 movs r0, #1 8031f54: 2114 movs r1, #20 8031f56: 2200 movs r2, #0 */ void tcp_rst(u32_t seqno, u32_t ackno, ip_addr_t *local_ip, ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port) { 8031f58: 461f mov r7, r3 8031f5a: f8bd b030 ldrh.w fp, [sp, #48] ; 0x30 8031f5e: f8bd a034 ldrh.w sl, [sp, #52] ; 0x34 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 8031f62: f7fd fede bl 802fd22 if (p == NULL) { 8031f66: 4606 mov r6, r0 8031f68: 2800 cmp r0, #0 8031f6a: d030 beq.n 8031fce return; } LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= sizeof(struct tcp_hdr))); tcphdr = (struct tcp_hdr *)p->payload; 8031f6c: 6844 ldr r4, [r0, #4] tcphdr->src = htons(local_port); 8031f6e: 4658 mov r0, fp 8031f70: f7fc fd4c bl 802ea0c 8031f74: 8020 strh r0, [r4, #0] tcphdr->dest = htons(remote_port); 8031f76: 4650 mov r0, sl 8031f78: f7fc fd48 bl 802ea0c 8031f7c: 8060 strh r0, [r4, #2] tcphdr->seqno = htonl(seqno); 8031f7e: 4648 mov r0, r9 8031f80: f7fc fd4e bl 802ea20 8031f84: 6060 str r0, [r4, #4] tcphdr->ackno = htonl(ackno); 8031f86: 4628 mov r0, r5 8031f88: f7fc fd4a bl 802ea20 8031f8c: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); 8031f8e: f245 0014 movw r0, #20500 ; 0x5014 8031f92: f7fc fd3b bl 802ea0c tcphdr->wnd = PP_HTONS(TCP_WND); 8031f96: 2316 movs r3, #22 8031f98: 2500 movs r5, #0 8031f9a: 73a3 strb r3, [r4, #14] 8031f9c: f06f 032f mvn.w r3, #47 ; 0x2f tcphdr = (struct tcp_hdr *)p->payload; tcphdr->src = htons(local_port); tcphdr->dest = htons(remote_port); tcphdr->seqno = htonl(seqno); tcphdr->ackno = htonl(ackno); TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); 8031fa0: 81a0 strh r0, [r4, #12] tcphdr->wnd = PP_HTONS(TCP_WND); 8031fa2: 73e3 strb r3, [r4, #15] tcphdr->chksum = 0; 8031fa4: 7425 strb r5, [r4, #16] 8031fa6: 7465 strb r5, [r4, #17] tcphdr->urgp = 0; 8031fa8: 74a5 strb r5, [r4, #18] 8031faa: 74e5 strb r5, [r4, #19] #if CHECKSUM_GEN_TCP tcphdr->chksum = inet_chksum_pseudo(p, local_ip, remote_ip, IP_PROTO_TCP, p->tot_len); #endif TCP_STATS_INC(tcp.xmit); snmp_inc_tcpoutrsts(); 8031fac: f002 fc80 bl 80348b0 /* Send output with hardcoded TTL since we have no access to the pcb */ ip_output(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP); 8031fb0: 2306 movs r3, #6 8031fb2: 9301 str r3, [sp, #4] 8031fb4: 9500 str r5, [sp, #0] 8031fb6: 4630 mov r0, r6 8031fb8: 4641 mov r1, r8 8031fba: 463a mov r2, r7 8031fbc: 23ff movs r3, #255 ; 0xff 8031fbe: f000 ff41 bl 8032e44 pbuf_free(p); 8031fc2: 4630 mov r0, r6 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 8031fc4: b003 add sp, #12 8031fc6: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} #endif TCP_STATS_INC(tcp.xmit); snmp_inc_tcpoutrsts(); /* Send output with hardcoded TTL since we have no access to the pcb */ ip_output(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP); pbuf_free(p); 8031fca: f7fd be5d b.w 802fc88 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 8031fce: b003 add sp, #12 8031fd0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08031fd4 : void tcp_rexmit_rto(struct tcp_pcb *pcb) { struct tcp_seg *seg; if (pcb->unacked == NULL) { 8031fd4: 6f02 ldr r2, [r0, #112] ; 0x70 * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto(struct tcp_pcb *pcb) { 8031fd6: b510 push {r4, lr} struct tcp_seg *seg; if (pcb->unacked == NULL) { 8031fd8: b19a cbz r2, 8032002 8031fda: 4611 mov r1, r2 8031fdc: e000 b.n 8031fe0 return; } /* Move all unacked segments to the head of the unsent queue */ for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); 8031fde: 4619 mov r1, r3 8031fe0: 680b ldr r3, [r1, #0] 8031fe2: 2b00 cmp r3, #0 8031fe4: d1fb bne.n 8031fde /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 8031fe6: 6ec4 ldr r4, [r0, #108] ; 0x6c 8031fe8: 600c str r4, [r1, #0] /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; 8031fea: 66c2 str r2, [r0, #108] ; 0x6c /* unacked queue is now empty */ pcb->unacked = NULL; /* last unsent hasn't changed, no need to reset unsent_oversize */ /* increment number of retransmissions */ ++pcb->nrtx; 8031fec: f890 2046 ldrb.w r2, [r0, #70] ; 0x46 /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; /* unacked queue is now empty */ pcb->unacked = NULL; 8031ff0: 6703 str r3, [r0, #112] ; 0x70 /* last unsent hasn't changed, no need to reset unsent_oversize */ /* increment number of retransmissions */ ++pcb->nrtx; 8031ff2: 3201 adds r2, #1 8031ff4: f880 2046 strb.w r2, [r0, #70] ; 0x46 /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 8031ff8: 6383 str r3, [r0, #56] ; 0x38 /* Do the actual retransmission */ tcp_output(pcb); } 8031ffa: e8bd 4010 ldmia.w sp!, {r4, lr} /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; /* Do the actual retransmission */ tcp_output(pcb); 8031ffe: f7ff be7f b.w 8031d00 8032002: bd10 pop {r4, pc} 08032004 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit(struct tcp_pcb *pcb) { 8032004: b5f8 push {r3, r4, r5, r6, r7, lr} struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 8032006: 6f05 ldr r5, [r0, #112] ; 0x70 * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit(struct tcp_pcb *pcb) { 8032008: 4604 mov r4, r0 struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 803200a: 2d00 cmp r5, #0 803200c: d027 beq.n 803205e } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; 803200e: 682b ldr r3, [r5, #0] cur_seg = &(pcb->unsent); 8032010: f100 066c add.w r6, r0, #108 ; 0x6c } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; 8032014: 6703 str r3, [r0, #112] ; 0x70 cur_seg = &(pcb->unsent); while (*cur_seg && 8032016: e000 b.n 803201a TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 8032018: 6836 ldr r6, [r6, #0] /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 803201a: 6833 ldr r3, [r6, #0] 803201c: b92b cbnz r3, 803202a TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = *cur_seg; 803201e: 6833 ldr r3, [r6, #0] 8032020: 602b str r3, [r5, #0] *cur_seg = seg; 8032022: 6035 str r5, [r6, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 8032024: 682b ldr r3, [r5, #0] 8032026: b97b cbnz r3, 8032048 8032028: e00c b.n 8032044 seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { 803202a: 68db ldr r3, [r3, #12] 803202c: 6858 ldr r0, [r3, #4] 803202e: f7fc fcf9 bl 802ea24 8032032: 68eb ldr r3, [r5, #12] 8032034: 4607 mov r7, r0 8032036: 6858 ldr r0, [r3, #4] 8032038: f7fc fcf4 bl 802ea24 803203c: 1a38 subs r0, r7, r0 /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 803203e: 2800 cmp r0, #0 8032040: dbea blt.n 8032018 8032042: e7ec b.n 803201e seg->next = *cur_seg; *cur_seg = seg; #if TCP_OVERSIZE if (seg->next == NULL) { /* the retransmitted segment is last in unsent, so reset unsent_oversize */ pcb->unsent_oversize = 0; 8032044: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ ++pcb->nrtx; 8032048: f894 3046 ldrb.w r3, [r4, #70] ; 0x46 803204c: 3301 adds r3, #1 803204e: f884 3046 strb.w r3, [r4, #70] ; 0x46 /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 8032052: 2300 movs r3, #0 8032054: 63a3 str r3, [r4, #56] ; 0x38 /* Do the actual retransmission. */ snmp_inc_tcpretranssegs(); /* No need to call tcp_output: we are always called from tcp_input() and thus tcp_output directly returns. */ } 8032056: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; /* Do the actual retransmission. */ snmp_inc_tcpretranssegs(); 803205a: f002 bc19 b.w 8034890 803205e: bdf8 pop {r3, r4, r5, r6, r7, pc} 08032060 : * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit_fast(struct tcp_pcb *pcb) { if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 8032060: 6f03 ldr r3, [r0, #112] ; 0x70 * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit_fast(struct tcp_pcb *pcb) { 8032062: b510 push {r4, lr} 8032064: 4604 mov r4, r0 if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 8032066: b333 cbz r3, 80320b6 8032068: 7f83 ldrb r3, [r0, #30] 803206a: f003 0304 and.w r3, r3, #4 803206e: b2db uxtb r3, r3 8032070: bb0b cbnz r3, 80320b6 LWIP_DEBUGF(TCP_FR_DEBUG, ("tcp_receive: dupacks %"U16_F" (%"U32_F "), fast retransmit %"U32_F"\n", (u16_t)pcb->dupacks, pcb->lastack, ntohl(pcb->unacked->tcphdr->seqno))); tcp_rexmit(pcb); 8032072: f7ff ffc7 bl 8032004 /* Set ssthresh to half of the minimum of the current * cwnd and the advertised window */ if (pcb->cwnd > pcb->snd_wnd) { 8032076: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 803207a: f8b4 2060 ldrh.w r2, [r4, #96] ; 0x60 803207e: 4293 cmp r3, r2 8032080: d903 bls.n 803208a pcb->ssthresh = pcb->snd_wnd / 2; 8032082: 0852 lsrs r2, r2, #1 8032084: f8a4 204e strh.w r2, [r4, #78] ; 0x4e 8032088: e002 b.n 8032090 } else { pcb->ssthresh = pcb->cwnd / 2; 803208a: 085b lsrs r3, r3, #1 803208c: f8a4 304e strh.w r3, [r4, #78] ; 0x4e } /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < 2*pcb->mss) { 8032090: 8ee3 ldrh r3, [r4, #54] ; 0x36 8032092: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 8032096: 005a lsls r2, r3, #1 8032098: 4291 cmp r1, r2 LWIP_DEBUGF(TCP_FR_DEBUG, ("tcp_receive: The minimum value for ssthresh %"U16_F " should be min 2 mss %"U16_F"...\n", pcb->ssthresh, 2*pcb->mss)); pcb->ssthresh = 2*pcb->mss; 803209a: bfb8 it lt 803209c: f8a4 204e strhlt.w r2, [r4, #78] ; 0x4e } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 80320a0: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 80320a4: 2103 movs r1, #3 80320a6: fb01 2303 mla r3, r1, r3, r2 80320aa: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->flags |= TF_INFR; 80320ae: 7fa3 ldrb r3, [r4, #30] 80320b0: f043 0304 orr.w r3, r3, #4 80320b4: 77a3 strb r3, [r4, #30] 80320b6: bd10 pop {r4, pc} 080320b8 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ void tcp_keepalive(struct tcp_pcb *pcb) { 80320b8: b537 push {r0, r1, r2, r4, r5, lr} 80320ba: 4604 mov r4, r0 ip4_addr3_16(&pcb->remote_ip), ip4_addr4_16(&pcb->remote_ip))); LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, pcb->keep_cnt_sent)); p = tcp_output_alloc_header(pcb, 0, 0, htonl(pcb->snd_nxt - 1)); 80320bc: 6d00 ldr r0, [r0, #80] ; 0x50 80320be: 3801 subs r0, #1 80320c0: f7fc fcae bl 802ea20 80320c4: 2100 movs r1, #0 80320c6: 4602 mov r2, r0 80320c8: 4620 mov r0, r4 80320ca: f7ff fbd9 bl 8031880 if(p == NULL) { 80320ce: 4605 mov r5, r0 80320d0: b178 cbz r0, 80320f2 /* Send output to IP */ #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP); 80320d2: 2200 movs r2, #0 80320d4: f04f 0e06 mov.w lr, #6 80320d8: e88d 4004 stmia.w sp, {r2, lr} 80320dc: 7aa3 ldrb r3, [r4, #10] 80320de: 4621 mov r1, r4 80320e0: 1d22 adds r2, r4, #4 80320e2: f000 feaf bl 8032e44 #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 80320e6: 4628 mov r0, r5 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 80320e8: b003 add sp, #12 80320ea: e8bd 4030 ldmia.w sp!, {r4, r5, lr} &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 80320ee: f7fd bdcb b.w 802fc88 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 80320f2: b003 add sp, #12 80320f4: bd30 pop {r4, r5, pc} 080320f6 : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ void tcp_zero_window_probe(struct tcp_pcb *pcb) { 80320f6: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: tcp_ticks %"U32_F " pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, pcb->keep_cnt_sent)); seg = pcb->unacked; 80320fa: 6f04 ldr r4, [r0, #112] ; 0x70 * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ void tcp_zero_window_probe(struct tcp_pcb *pcb) { 80320fc: 4605 mov r5, r0 " pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, pcb->keep_cnt_sent)); seg = pcb->unacked; if(seg == NULL) { 80320fe: b914 cbnz r4, 8032106 seg = pcb->unsent; 8032100: 6ec4 ldr r4, [r0, #108] ; 0x6c } if(seg == NULL) { 8032102: 2c00 cmp r4, #0 8032104: d042 beq.n 803218c return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 8032106: 68e3 ldr r3, [r4, #12] 8032108: 8998 ldrh r0, [r3, #12] 803210a: f7fc fc84 bl 802ea16 803210e: f010 0001 ands.w r0, r0, #1 8032112: d005 beq.n 8032120 8032114: 8921 ldrh r1, [r4, #8] 8032116: f1d1 0101 rsbs r1, r1, #1 803211a: bf38 it cc 803211c: 2100 movcc r1, #0 803211e: e000 b.n 8032122 8032120: 4601 mov r1, r0 /* we want to send one seqno: either FIN or data (no options) */ len = is_fin ? 0 : 1; p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); 8032122: 68e3 ldr r3, [r4, #12] } if(seg == NULL) { return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 8032124: fa5f f881 uxtb.w r8, r1 /* we want to send one seqno: either FIN or data (no options) */ len = is_fin ? 0 : 1; p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); 8032128: 4628 mov r0, r5 803212a: f081 0101 eor.w r1, r1, #1 803212e: 685a ldr r2, [r3, #4] 8032130: f7ff fba6 bl 8031880 if(p == NULL) { 8032134: 4606 mov r6, r0 8032136: 2800 cmp r0, #0 8032138: d028 beq.n 803218c LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return; } tcphdr = (struct tcp_hdr *)p->payload; 803213a: 6847 ldr r7, [r0, #4] if (is_fin) { 803213c: f1b8 0f00 cmp.w r8, #0 8032140: d009 beq.n 8032156 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 8032142: 89bc ldrh r4, [r7, #12] 8032144: 2011 movs r0, #17 8032146: f7fc fc61 bl 802ea0c 803214a: f424 547c bic.w r4, r4, #16128 ; 0x3f00 803214e: b2a4 uxth r4, r4 8032150: 4320 orrs r0, r4 8032152: 81b8 strh r0, [r7, #12] 8032154: e009 b.n 803216a /* Data segment, copy in one byte from the head of the unacked queue */ char *d = ((char *)p->payload + TCP_HLEN); /* Depending on whether the segment has already been sent (unacked) or not (unsent), seg->p->payload points to the IP header or TCP header. Ensure we copy the first TCP data byte: */ pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len); 8032156: 6860 ldr r0, [r4, #4] 8032158: 8923 ldrh r3, [r4, #8] 803215a: 8902 ldrh r2, [r0, #8] 803215c: 1ad3 subs r3, r2, r3 803215e: f107 0114 add.w r1, r7, #20 8032162: 2201 movs r2, #1 8032164: b29b uxth r3, r3 8032166: f7fd fedd bl 802ff24 /* Send output to IP */ #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP); 803216a: 2200 movs r2, #0 803216c: f04f 0c06 mov.w ip, #6 8032170: e88d 1004 stmia.w sp, {r2, ip} 8032174: 7aab ldrb r3, [r5, #10] 8032176: 4630 mov r0, r6 8032178: 4629 mov r1, r5 803217a: 1d2a adds r2, r5, #4 803217c: f000 fe62 bl 8032e44 #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 8032180: 4630 mov r0, r6 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 8032182: b002 add sp, #8 8032184: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 8032188: f7fd bd7e b.w 802fc88 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 803218c: b002 add sp, #8 803218e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8032192: 0000 movs r0, r0 08032194 : sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name) #else /* LWIP_DEBUG_TIMERNAMES */ void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg) #endif /* LWIP_DEBUG_TIMERNAMES */ { 8032194: b570 push {r4, r5, r6, lr} 8032196: 4604 mov r4, r0 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8032198: 2009 movs r0, #9 sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name) #else /* LWIP_DEBUG_TIMERNAMES */ void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg) #endif /* LWIP_DEBUG_TIMERNAMES */ { 803219a: 460d mov r5, r1 803219c: 4616 mov r6, r2 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 803219e: f7fd fc53 bl 802fa48 if (timeout == NULL) { 80321a2: 4603 mov r3, r0 80321a4: b308 cbz r0, 80321ea timeout->handler_name = handler_name; LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", (void *)timeout, msecs, handler_name, (void *)arg)); #endif /* LWIP_DEBUG_TIMERNAMES */ if (next_timeout == NULL) { 80321a6: 4911 ldr r1, [pc, #68] ; (80321ec ) timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); if (timeout == NULL) { LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); return; } timeout->next = NULL; 80321a8: 2200 movs r2, #0 timeout->h = handler; timeout->arg = arg; timeout->time = msecs; 80321aa: e880 0074 stmia.w r0, {r2, r4, r5, r6} timeout->handler_name = handler_name; LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", (void *)timeout, msecs, handler_name, (void *)arg)); #endif /* LWIP_DEBUG_TIMERNAMES */ if (next_timeout == NULL) { 80321ae: 680a ldr r2, [r1, #0] 80321b0: b902 cbnz r2, 80321b4 80321b2: e005 b.n 80321c0 next_timeout = timeout; return; } if (next_timeout->time > msecs) { 80321b4: 6850 ldr r0, [r2, #4] 80321b6: 42a0 cmp r0, r4 80321b8: d90c bls.n 80321d4 next_timeout->time -= msecs; 80321ba: 1b04 subs r4, r0, r4 80321bc: 6054 str r4, [r2, #4] timeout->next = next_timeout; 80321be: 601a str r2, [r3, #0] next_timeout = timeout; 80321c0: 600b str r3, [r1, #0] 80321c2: bd70 pop {r4, r5, r6, pc} } else { for(t = next_timeout; t != NULL; t = t->next) { timeout->time -= t->time; if (t->next == NULL || t->next->time > timeout->time) { 80321c4: 684c ldr r4, [r1, #4] 80321c6: 4284 cmp r4, r0 80321c8: d80c bhi.n 80321e4 80321ca: 460a mov r2, r1 80321cc: e002 b.n 80321d4 if (t->next != NULL) { t->next->time -= timeout->time; } timeout->next = t->next; 80321ce: 6019 str r1, [r3, #0] t->next = timeout; 80321d0: 6013 str r3, [r2, #0] break; 80321d2: bd70 pop {r4, r5, r6, pc} next_timeout->time -= msecs; timeout->next = next_timeout; next_timeout = timeout; } else { for(t = next_timeout; t != NULL; t = t->next) { timeout->time -= t->time; 80321d4: 6851 ldr r1, [r2, #4] 80321d6: 6858 ldr r0, [r3, #4] 80321d8: 1a40 subs r0, r0, r1 if (t->next == NULL || t->next->time > timeout->time) { 80321da: 6811 ldr r1, [r2, #0] next_timeout->time -= msecs; timeout->next = next_timeout; next_timeout = timeout; } else { for(t = next_timeout; t != NULL; t = t->next) { timeout->time -= t->time; 80321dc: 6058 str r0, [r3, #4] if (t->next == NULL || t->next->time > timeout->time) { 80321de: 2900 cmp r1, #0 80321e0: d1f0 bne.n 80321c4 80321e2: e7f4 b.n 80321ce if (t->next != NULL) { t->next->time -= timeout->time; 80321e4: 1a20 subs r0, r4, r0 80321e6: 6048 str r0, [r1, #4] 80321e8: e7f1 b.n 80321ce 80321ea: bd70 pop {r4, r5, r6, pc} 80321ec: 2000c464 .word 0x2000c464 080321f0 : } #endif /* LWIP_DNS */ /** Initialize this module */ void sys_timeouts_init(void) { 80321f0: b508 push {r3, lr} #if IP_REASSEMBLY sys_timeout(IP_TMR_INTERVAL, ip_reass_timer, NULL); #endif /* IP_REASSEMBLY */ #if LWIP_ARP sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 80321f2: 2200 movs r2, #0 80321f4: f241 3088 movw r0, #5000 ; 0x1388 80321f8: 4908 ldr r1, [pc, #32] ; (803221c ) 80321fa: f7ff ffcb bl 8032194 #endif /* LWIP_ARP */ #if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 80321fe: 2200 movs r2, #0 8032200: f64e 2060 movw r0, #60000 ; 0xea60 8032204: 4906 ldr r1, [pc, #24] ; (8032220 ) 8032206: f7ff ffc5 bl 8032194 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 803220a: 4906 ldr r1, [pc, #24] ; (8032224 ) 803220c: f44f 70fa mov.w r0, #500 ; 0x1f4 8032210: 2200 movs r2, #0 #if NO_SYS /* Initialise timestamp for sys_check_timeouts */ timeouts_last_time = sys_now(); #endif } 8032212: e8bd 4008 ldmia.w sp!, {r3, lr} #if LWIP_ARP sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); #endif /* LWIP_ARP */ #if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 8032216: f7ff bfbd b.w 8032194 803221a: bf00 nop 803221c: 08032261 .word 0x08032261 8032220: 08032245 .word 0x08032245 8032224: 08032229 .word 0x08032229 08032228 : * * @param arg unused argument */ static void dhcp_timer_fine(void *arg) { 8032228: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()\n")); dhcp_fine_tmr(); 803222a: f7fd f9c9 bl 802f5c0 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 803222e: 4904 ldr r1, [pc, #16] ; (8032240 ) 8032230: f44f 70fa mov.w r0, #500 ; 0x1f4 8032234: 2200 movs r2, #0 } 8032236: e8bd 4008 ldmia.w sp!, {r3, lr} dhcp_timer_fine(void *arg) { LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()\n")); dhcp_fine_tmr(); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 803223a: f7ff bfab b.w 8032194 803223e: bf00 nop 8032240: 08032229 .word 0x08032229 08032244 : * * @param arg unused argument */ static void dhcp_timer_coarse(void *arg) { 8032244: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()\n")); dhcp_coarse_tmr(); 8032246: f7fd f939 bl 802f4bc sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 803224a: 4904 ldr r1, [pc, #16] ; (803225c ) 803224c: f64e 2060 movw r0, #60000 ; 0xea60 8032250: 2200 movs r2, #0 } 8032252: e8bd 4008 ldmia.w sp!, {r3, lr} dhcp_timer_coarse(void *arg) { LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()\n")); dhcp_coarse_tmr(); sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 8032256: f7ff bf9d b.w 8032194 803225a: bf00 nop 803225c: 08032245 .word 0x08032245 08032260 : * * @param arg unused argument */ static void arp_timer(void *arg) { 8032260: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()\n")); etharp_tmr(); 8032262: f004 fd1b bl 8036c9c sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8032266: 4904 ldr r1, [pc, #16] ; (8032278 ) 8032268: f241 3088 movw r0, #5000 ; 0x1388 803226c: 2200 movs r2, #0 } 803226e: e8bd 4008 ldmia.w sp!, {r3, lr} arp_timer(void *arg) { LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()\n")); etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8032272: f7ff bf8f b.w 8032194 8032276: bf00 nop 8032278: 08032261 .word 0x08032261 0803227c : */ void tcp_timer_needed(void) { /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 803227c: 4b08 ldr r3, [pc, #32] ; (80322a0 ) 803227e: 681b ldr r3, [r3, #0] 8032280: b96b cbnz r3, 803229e 8032282: 4b08 ldr r3, [pc, #32] ; (80322a4 ) 8032284: 681b ldr r3, [r3, #0] 8032286: b913 cbnz r3, 803228e 8032288: 4b07 ldr r3, [pc, #28] ; (80322a8 ) 803228a: 681b ldr r3, [r3, #0] 803228c: b13b cbz r3, 803229e /* enable and start timer */ tcpip_tcp_timer_active = 1; 803228e: 4b04 ldr r3, [pc, #16] ; (80322a0 ) sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8032290: 4906 ldr r1, [pc, #24] ; (80322ac ) tcp_timer_needed(void) { /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { /* enable and start timer */ tcpip_tcp_timer_active = 1; 8032292: 2201 movs r2, #1 8032294: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8032296: 20fa movs r0, #250 ; 0xfa 8032298: 2200 movs r2, #0 803229a: f7ff bf7b b.w 8032194 803229e: 4770 bx lr 80322a0: 2000c460 .word 0x2000c460 80322a4: 2000ff20 .word 0x2000ff20 80322a8: 2000ff34 .word 0x2000ff34 80322ac: 080322b1 .word 0x080322b1 080322b0 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 80322b0: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 80322b2: f7fe fad3 bl 803085c /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 80322b6: 4b08 ldr r3, [pc, #32] ; (80322d8 ) 80322b8: 681b ldr r3, [r3, #0] 80322ba: b913 cbnz r3, 80322c2 80322bc: 4b07 ldr r3, [pc, #28] ; (80322dc ) 80322be: 681b ldr r3, [r3, #0] 80322c0: b133 cbz r3, 80322d0 /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 80322c2: 4907 ldr r1, [pc, #28] ; (80322e0 ) 80322c4: 20fa movs r0, #250 ; 0xfa 80322c6: 2200 movs r2, #0 } else { /* disable timer */ tcpip_tcp_timer_active = 0; } } 80322c8: e8bd 4008 ldmia.w sp!, {r3, lr} /* call TCP timer handler */ tcp_tmr(); /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 80322cc: f7ff bf62 b.w 8032194 } else { /* disable timer */ tcpip_tcp_timer_active = 0; 80322d0: 4a04 ldr r2, [pc, #16] ; (80322e4 ) 80322d2: 6013 str r3, [r2, #0] 80322d4: bd08 pop {r3, pc} 80322d6: bf00 nop 80322d8: 2000ff20 .word 0x2000ff20 80322dc: 2000ff34 .word 0x2000ff34 80322e0: 080322b1 .word 0x080322b1 80322e4: 2000c460 .word 0x2000c460 080322e8 : void sys_untimeout(sys_timeout_handler handler, void *arg) { struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 80322e8: 4b10 ldr r3, [pc, #64] ; (803232c ) 80322ea: 681b ldr r3, [r3, #0] * @param handler callback function that would be called by the timeout * @param arg callback argument that would be passed to handler */ void sys_untimeout(sys_timeout_handler handler, void *arg) { 80322ec: b510 push {r4, lr} struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 80322ee: b1e3 cbz r3, 803232a 80322f0: 2200 movs r2, #0 80322f2: e000 b.n 80322f6 return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 80322f4: 4623 mov r3, r4 if ((t->h == handler) && (t->arg == arg)) { 80322f6: 689c ldr r4, [r3, #8] 80322f8: 4284 cmp r4, r0 80322fa: d112 bne.n 8032322 80322fc: 68dc ldr r4, [r3, #12] 80322fe: 428c cmp r4, r1 8032300: d10f bne.n 8032322 8032302: 6819 ldr r1, [r3, #0] /* We have a match */ /* Unlink from previous in list */ if (prev_t == NULL) { 8032304: b902 cbnz r2, 8032308 next_timeout = t->next; 8032306: 4a09 ldr r2, [pc, #36] ; (803232c ) } else { prev_t->next = t->next; 8032308: 6011 str r1, [r2, #0] } /* If not the last one, add time of this one back to next */ if (t->next != NULL) { 803230a: 681a ldr r2, [r3, #0] 803230c: b11a cbz r2, 8032316 t->next->time += t->time; 803230e: 6850 ldr r0, [r2, #4] 8032310: 6859 ldr r1, [r3, #4] 8032312: 1841 adds r1, r0, r1 8032314: 6051 str r1, [r2, #4] } memp_free(MEMP_SYS_TIMEOUT, t); 8032316: 2009 movs r0, #9 8032318: 4619 mov r1, r3 return; } } return; } 803231a: e8bd 4010 ldmia.w sp!, {r4, lr} } /* If not the last one, add time of this one back to next */ if (t->next != NULL) { t->next->time += t->time; } memp_free(MEMP_SYS_TIMEOUT, t); 803231e: f7fd bba9 b.w 802fa74 if (next_timeout == NULL) { return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 8032322: 681c ldr r4, [r3, #0] 8032324: 461a mov r2, r3 8032326: 2c00 cmp r4, #0 8032328: d1e4 bne.n 80322f4 803232a: bd10 pop {r4, pc} 803232c: 2000c464 .word 0x2000c464 08032330 : * @param mbox the mbox to fetch the message from * @param msg the place to store the message */ void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) { 8032330: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; again: if (!next_timeout) { 8032334: 4e18 ldr r6, [pc, #96] ; (8032398 ) * @param mbox the mbox to fetch the message from * @param msg the place to store the message */ void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) { 8032336: 4604 mov r4, r0 8032338: 460d mov r5, r1 803233a: 4637 mov r7, r6 struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; again: if (!next_timeout) { 803233c: 6832 ldr r2, [r6, #0] 803233e: b92a cbnz r2, 803234c time_needed = sys_arch_mbox_fetch(mbox, msg, 0); 8032340: 4620 mov r0, r4 8032342: 4629 mov r1, r5 } else { next_timeout->time = 0; } } } } 8032344: e8bd 43f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, lr} sys_timeout_handler handler; void *arg; again: if (!next_timeout) { time_needed = sys_arch_mbox_fetch(mbox, msg, 0); 8032348: f005 b8d4 b.w 80374f4 } else { if (next_timeout->time > 0) { 803234c: 6852 ldr r2, [r2, #4] 803234e: b96a cbnz r2, 803236c if (time_needed == SYS_ARCH_TIMEOUT) { /* If time == SYS_ARCH_TIMEOUT, a timeout occured before a message could be fetched. We should now call the timeout handler and deallocate the memory allocated for the timeout. */ tmptimeout = next_timeout; 8032350: 6839 ldr r1, [r7, #0] next_timeout = tmptimeout->next; 8032352: 680a ldr r2, [r1, #0] handler = tmptimeout->h; 8032354: f8d1 8008 ldr.w r8, [r1, #8] if (time_needed == SYS_ARCH_TIMEOUT) { /* If time == SYS_ARCH_TIMEOUT, a timeout occured before a message could be fetched. We should now call the timeout handler and deallocate the memory allocated for the timeout. */ tmptimeout = next_timeout; next_timeout = tmptimeout->next; 8032358: 603a str r2, [r7, #0] if (handler != NULL) { LWIP_DEBUGF(TIMERS_DEBUG, ("stmf calling h=%s arg=%p\n", tmptimeout->handler_name, arg)); } #endif /* LWIP_DEBUG_TIMERNAMES */ memp_free(MEMP_SYS_TIMEOUT, tmptimeout); 803235a: 2009 movs r0, #9 could be fetched. We should now call the timeout handler and deallocate the memory allocated for the timeout. */ tmptimeout = next_timeout; next_timeout = tmptimeout->next; handler = tmptimeout->h; arg = tmptimeout->arg; 803235c: f8d1 900c ldr.w r9, [r1, #12] if (handler != NULL) { LWIP_DEBUGF(TIMERS_DEBUG, ("stmf calling h=%s arg=%p\n", tmptimeout->handler_name, arg)); } #endif /* LWIP_DEBUG_TIMERNAMES */ memp_free(MEMP_SYS_TIMEOUT, tmptimeout); 8032360: f7fd fb88 bl 802fa74 if (handler != NULL) { 8032364: f1b8 0f00 cmp.w r8, #0 8032368: d0e8 beq.n 803233c 803236a: e006 b.n 803237a again: if (!next_timeout) { time_needed = sys_arch_mbox_fetch(mbox, msg, 0); } else { if (next_timeout->time > 0) { time_needed = sys_arch_mbox_fetch(mbox, msg, next_timeout->time); 803236c: 4620 mov r0, r4 803236e: 4629 mov r1, r5 8032370: f005 f8c0 bl 80374f4 } else { time_needed = SYS_ARCH_TIMEOUT; } if (time_needed == SYS_ARCH_TIMEOUT) { 8032374: 1c43 adds r3, r0, #1 8032376: d0eb beq.n 8032350 8032378: e002 b.n 8032380 memp_free(MEMP_SYS_TIMEOUT, tmptimeout); if (handler != NULL) { /* For LWIP_TCPIP_CORE_LOCKING, lock the core before calling the timeout handler function. */ LOCK_TCPIP_CORE(); handler(arg); 803237a: 4648 mov r0, r9 803237c: 47c0 blx r8 803237e: e7dd b.n 803233c goto again; } else { /* If time != SYS_ARCH_TIMEOUT, a message was received before the timeout occured. The time variable is set to the number of milliseconds we waited for the message. */ if (time_needed < next_timeout->time) { 8032380: 4b05 ldr r3, [pc, #20] ; (8032398 ) 8032382: 681b ldr r3, [r3, #0] 8032384: 6859 ldr r1, [r3, #4] 8032386: 4288 cmp r0, r1 next_timeout->time -= time_needed; 8032388: bf34 ite cc 803238a: ebc0 0201 rsbcc r2, r0, r1 } else { next_timeout->time = 0; 803238e: 2200 movcs r2, #0 8032390: 605a str r2, [r3, #4] 8032392: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8032396: bf00 nop 8032398: 2000c464 .word 0x2000c464 0803239c : /** * Initialize this module. */ void udp_init(void) { 803239c: 4770 bx lr 803239e: 0000 movs r0, r0 080323a0 : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 80323a0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} PERF_START; UDP_STATS_INC(udp.recv); iphdr = (struct ip_hdr *)p->payload; 80323a4: f8d0 9004 ldr.w r9, [r0, #4] /* Check minimum length (IP header + UDP header) * and move payload pointer to UDP header */ if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN) || pbuf_header(p, -(s16_t)(IPH_HL(iphdr) * 4))) { 80323a8: 8903 ldrh r3, [r0, #8] * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 80323aa: 460e mov r6, r1 iphdr = (struct ip_hdr *)p->payload; /* Check minimum length (IP header + UDP header) * and move payload pointer to UDP header */ if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN) || pbuf_header(p, -(s16_t)(IPH_HL(iphdr) * 4))) { 80323ac: f899 1000 ldrb.w r1, [r9] 80323b0: f001 010f and.w r1, r1, #15 80323b4: 1c8a adds r2, r1, #2 80323b6: ebb3 0f82 cmp.w r3, r2, lsl #2 * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 80323ba: b085 sub sp, #20 80323bc: 4605 mov r5, r0 iphdr = (struct ip_hdr *)p->payload; /* Check minimum length (IP header + UDP header) * and move payload pointer to UDP header */ if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN) || pbuf_header(p, -(s16_t)(IPH_HL(iphdr) * 4))) { 80323be: db05 blt.n 80323cc 80323c0: 0089 lsls r1, r1, #2 80323c2: 4249 negs r1, r1 80323c4: f7fd fc35 bl 802fc32 80323c8: 4683 mov fp, r0 80323ca: b110 cbz r0, 80323d2 /* drop short packets */ LWIP_DEBUGF(UDP_DEBUG, ("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len)); UDP_STATS_INC(udp.lenerr); UDP_STATS_INC(udp.drop); snmp_inc_udpinerrors(); 80323cc: f002 fa88 bl 80348e0 80323d0: e096 b.n 8032500 } udphdr = (struct udp_hdr *)p->payload; /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 80323d2: f8df a150 ldr.w sl, [pc, #336] ; 8032524 snmp_inc_udpinerrors(); pbuf_free(p); goto end; } udphdr = (struct udp_hdr *)p->payload; 80323d6: 686c ldr r4, [r5, #4] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 80323d8: f8da 0000 ldr.w r0, [sl] 80323dc: 4631 mov r1, r6 80323de: f000 faed bl 80329bc 80323e2: 4680 mov r8, r0 LWIP_DEBUGF(UDP_DEBUG, ("udp_input: received datagram of length %"U16_F"\n", p->tot_len)); /* convert src and dest ports to host byte order */ src = ntohs(udphdr->src); 80323e4: 8820 ldrh r0, [r4, #0] 80323e6: f7fc fb16 bl 802ea16 80323ea: 4607 mov r7, r0 dest = ntohs(udphdr->dest); 80323ec: 8860 ldrh r0, [r4, #2] 80323ee: f7fc fb12 bl 802ea16 #if LWIP_DHCP pcb = NULL; /* when LWIP_DHCP is active, packets to DHCP_CLIENT_PORT may only be processed by the dhcp module, no other UDP pcb may use the local UDP port DHCP_CLIENT_PORT */ if (dest == DHCP_CLIENT_PORT) { 80323f2: 2844 cmp r0, #68 ; 0x44 80323f4: d10f bne.n 8032416 /* all packets for DHCP_CLIENT_PORT not coming from DHCP_SERVER_PORT are dropped! */ if (src == DHCP_SERVER_PORT) { 80323f6: 2f43 cmp r7, #67 ; 0x43 80323f8: d14f bne.n 803249a if ((inp->dhcp != NULL) && (inp->dhcp->pcb != NULL)) { 80323fa: 6a33 ldr r3, [r6, #32] 80323fc: 2b00 cmp r3, #0 80323fe: d04c beq.n 803249a 8032400: 685c ldr r4, [r3, #4] 8032402: 2c00 cmp r4, #0 8032404: d049 beq.n 803249a /* accept the packe if (- broadcast or directed to us) -> DHCP is link-layer-addressed, local ip is always ANY! - inp->dhcp->pcb->remote == ANY or iphdr->src */ if ((ip_addr_isany(&inp->dhcp->pcb->remote_ip) || 8032406: 6863 ldr r3, [r4, #4] 8032408: 2b00 cmp r3, #0 803240a: d04e beq.n 80324aa ip_addr_cmp(&(inp->dhcp->pcb->remote_ip), ¤t_iphdr_src))) { 803240c: 4a43 ldr r2, [pc, #268] ; (803251c ) if (src == DHCP_SERVER_PORT) { if ((inp->dhcp != NULL) && (inp->dhcp->pcb != NULL)) { /* accept the packe if (- broadcast or directed to us) -> DHCP is link-layer-addressed, local ip is always ANY! - inp->dhcp->pcb->remote == ANY or iphdr->src */ if ((ip_addr_isany(&inp->dhcp->pcb->remote_ip) || 803240e: 6812 ldr r2, [r2, #0] 8032410: 4293 cmp r3, r2 8032412: d142 bne.n 803249a 8032414: e049 b.n 80324aa uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8032416: 4b42 ldr r3, [pc, #264] ; (8032520 ) /* compare PCB local addr+port to UDP destination addr+port */ if (pcb->local_port == dest) { if ( (!broadcast && ip_addr_isany(&pcb->local_ip)) || ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest) || 8032418: f8da a000 ldr.w sl, [sl] uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 803241c: f8d3 c000 ldr.w ip, [r3] } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { 8032420: 4b3e ldr r3, [pc, #248] ; (803251c ) 8032422: 681b ldr r3, [r3, #0] uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8032424: 4664 mov r4, ip } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { 8032426: 9303 str r3, [sp, #12] } } } else #endif /* LWIP_DHCP */ { prev = NULL; 8032428: 4659 mov r1, fp local_match = 0; uncon_pcb = NULL; 803242a: 465b mov r3, fp /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 803242c: e032 b.n 8032494 ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port, ip4_addr1_16(&pcb->remote_ip), ip4_addr2_16(&pcb->remote_ip), ip4_addr3_16(&pcb->remote_ip), ip4_addr4_16(&pcb->remote_ip), pcb->remote_port)); /* compare PCB local addr+port to UDP destination addr+port */ if (pcb->local_port == dest) { 803242e: 8a62 ldrh r2, [r4, #18] 8032430: 4282 cmp r2, r0 8032432: d12d bne.n 8032490 8032434: 6822 ldr r2, [r4, #0] if ( 8032436: f1b8 0f00 cmp.w r8, #0 803243a: d100 bne.n 803243e (!broadcast && ip_addr_isany(&pcb->local_ip)) || 803243c: b15a cbz r2, 8032456 803243e: 4552 cmp r2, sl 8032440: d009 beq.n 8032456 ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest) || 8032442: f1b8 0f00 cmp.w r8, #0 8032446: d023 beq.n 8032490 (broadcast && ip_get_option(pcb, SOF_BROADCAST) && (ip_addr_isany(&pcb->local_ip) || ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #else /* IP_SOF_BROADCAST_RECV */ (broadcast && (ip_addr_isany(&pcb->local_ip) || 8032448: b12a cbz r2, 8032456 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { 803244a: ea8a 0b02 eor.w fp, sl, r2 803244e: 68b2 ldr r2, [r6, #8] (broadcast && ip_get_option(pcb, SOF_BROADCAST) && (ip_addr_isany(&pcb->local_ip) || ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #else /* IP_SOF_BROADCAST_RECV */ (broadcast && (ip_addr_isany(&pcb->local_ip) || 8032450: ea1b 0f02 tst.w fp, r2 8032454: d11c bne.n 8032490 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #endif /* IP_SOF_BROADCAST_RECV */ local_match = 1; if ((uncon_pcb == NULL) && 8032456: 2b00 cmp r3, #0 8032458: d158 bne.n 803250c ((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) { 803245a: 7c23 ldrb r3, [r4, #16] (broadcast && (ip_addr_isany(&pcb->local_ip) || ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #endif /* IP_SOF_BROADCAST_RECV */ local_match = 1; if ((uncon_pcb == NULL) && 803245c: f003 0304 and.w r3, r3, #4 8032460: b2db uxtb r3, r3 8032462: 2b00 cmp r3, #0 8032464: bf0c ite eq 8032466: 4623 moveq r3, r4 8032468: 2300 movne r3, #0 803246a: e04f b.n 803250c } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 803246c: f8d4 b004 ldr.w fp, [r4, #4] 8032470: f1bb 0f00 cmp.w fp, #0 8032474: d101 bne.n 803247a ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { /* the first fully matching PCB */ if (prev != NULL) { 8032476: b921 cbnz r1, 8032482 8032478: e017 b.n 80324aa } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 803247a: 9a03 ldr r2, [sp, #12] 803247c: 4593 cmp fp, r2 803247e: d107 bne.n 8032490 8032480: e7f9 b.n 8032476 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { /* the first fully matching PCB */ if (prev != NULL) { /* move the pcb to the front of udp_pcbs so that is found faster next time */ prev->next = pcb->next; 8032482: 68e3 ldr r3, [r4, #12] 8032484: 60cb str r3, [r1, #12] pcb->next = udp_pcbs; udp_pcbs = pcb; 8032486: 4b26 ldr r3, [pc, #152] ; (8032520 ) /* the first fully matching PCB */ if (prev != NULL) { /* move the pcb to the front of udp_pcbs so that is found faster next time */ prev->next = pcb->next; pcb->next = udp_pcbs; 8032488: f8c4 c00c str.w ip, [r4, #12] udp_pcbs = pcb; 803248c: 601c str r4, [r3, #0] 803248e: e00c b.n 80324aa 8032490: 4621 mov r1, r4 uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8032492: 68e4 ldr r4, [r4, #12] 8032494: 2c00 cmp r4, #0 8032496: d1ca bne.n 803242e pcb = uncon_pcb; } } /* Check checksum if this is a match or if it was directed at us. */ if (pcb != NULL || ip_addr_cmp(&inp->ip_addr, ¤t_iphdr_dest)) { 8032498: b933 cbnz r3, 80324a8 803249a: 4b22 ldr r3, [pc, #136] ; (8032524 ) 803249c: 6872 ldr r2, [r6, #4] 803249e: 681b ldr r3, [r3, #0] 80324a0: 429a cmp r2, r3 80324a2: d12d bne.n 8032500 80324a4: 2400 movs r4, #0 80324a6: e000 b.n 80324aa 80324a8: 461c mov r4, r3 goto end; } } #endif /* CHECKSUM_CHECK_UDP */ } if(pbuf_header(p, -UDP_HLEN)) { 80324aa: 4628 mov r0, r5 80324ac: f06f 0107 mvn.w r1, #7 80324b0: f7fd fbbf bl 802fc32 80324b4: 2800 cmp r0, #0 80324b6: d189 bne.n 80323cc UDP_STATS_INC(udp.drop); snmp_inc_udpinerrors(); pbuf_free(p); goto end; } if (pcb != NULL) { 80324b8: b154 cbz r4, 80324d0 snmp_inc_udpindatagrams(); 80324ba: f002 fa01 bl 80348c0 pbuf_header(p, -(s16_t)((IPH_HL(iphdr) * 4) + UDP_HLEN)); } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 80324be: 69a6 ldr r6, [r4, #24] 80324c0: b1f6 cbz r6, 8032500 /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 80324c2: 9700 str r7, [sp, #0] 80324c4: 69e0 ldr r0, [r4, #28] 80324c6: 4b15 ldr r3, [pc, #84] ; (803251c ) 80324c8: 4621 mov r1, r4 80324ca: 462a mov r2, r5 80324cc: 47b0 blx r6 80324ce: e021 b.n 8032514 LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: not for us.\n")); #if LWIP_ICMP /* No match was found, send ICMP destination port unreachable unless destination address was broadcast/multicast. */ if (!broadcast && 80324d0: f1b8 0f00 cmp.w r8, #0 80324d4: d112 bne.n 80324fc !ip_addr_ismulticast(¤t_iphdr_dest)) { 80324d6: 4b13 ldr r3, [pc, #76] ; (8032524 ) 80324d8: 681b ldr r3, [r3, #0] 80324da: f003 03f0 and.w r3, r3, #240 ; 0xf0 LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: not for us.\n")); #if LWIP_ICMP /* No match was found, send ICMP destination port unreachable unless destination address was broadcast/multicast. */ if (!broadcast && 80324de: 2be0 cmp r3, #224 ; 0xe0 80324e0: d00c beq.n 80324fc !ip_addr_ismulticast(¤t_iphdr_dest)) { /* move payload pointer back to ip header */ pbuf_header(p, (IPH_HL(iphdr) * 4) + UDP_HLEN); 80324e2: f899 1000 ldrb.w r1, [r9] 80324e6: f001 010f and.w r1, r1, #15 80324ea: 3102 adds r1, #2 80324ec: 0089 lsls r1, r1, #2 80324ee: 4628 mov r0, r5 80324f0: f7fd fb9f bl 802fc32 LWIP_ASSERT("p->payload == iphdr", (p->payload == iphdr)); icmp_dest_unreach(p, ICMP_DUR_PORT); 80324f4: 4628 mov r0, r5 80324f6: 2103 movs r1, #3 80324f8: f000 f9d2 bl 80328a0 } #endif /* LWIP_ICMP */ UDP_STATS_INC(udp.proterr); UDP_STATS_INC(udp.drop); snmp_inc_udpnoports(); 80324fc: f002 f9e8 bl 80348d0 pbuf_free(p); 8032500: 4628 mov r0, r5 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 8032502: b005 add sp, #20 8032504: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} } #endif /* LWIP_ICMP */ UDP_STATS_INC(udp.proterr); UDP_STATS_INC(udp.drop); snmp_inc_udpnoports(); pbuf_free(p); 8032508: f7fd bbbe b.w 802fc88 uncon_pcb = pcb; } } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && 803250c: 8aa2 ldrh r2, [r4, #20] 803250e: 42ba cmp r2, r7 8032510: d1be bne.n 8032490 8032512: e7ab b.n 803246c } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 8032514: b005 add sp, #20 8032516: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 803251a: bf00 nop 803251c: 2000ff40 .word 0x2000ff40 8032520: 2000ff3c .word 0x2000ff3c 8032524: 2000ff48 .word 0x2000ff48 08032528 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8032528: b5f8 push {r3, r4, r5, r6, r7, lr} ip_addr_debug_print(UDP_DEBUG, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 803252a: 4b25 ldr r3, [pc, #148] ; (80325c0 ) * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 803252c: 4604 mov r4, r0 ip_addr_debug_print(UDP_DEBUG, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 803252e: 6818 ldr r0, [r3, #0] LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = ")); ip_addr_debug_print(UDP_DEBUG, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; 8032530: 2500 movs r5, #0 /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8032532: 4603 mov r3, r0 8032534: e012 b.n 803255c /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 8032536: 429c cmp r4, r3 8032538: d00e beq.n 8032558 !ip_get_option(ipcb, SOF_REUSEADDR)) { #else /* SO_REUSE */ /* port matches that of PCB in list and REUSEADDR not set -> reject */ else { #endif /* SO_REUSE */ if ((ipcb->local_port == port) && 803253a: 8a5e ldrh r6, [r3, #18] 803253c: 4296 cmp r6, r2 803253e: d10c bne.n 803255a /* IP address matches, or one is IP_ADDR_ANY? */ (ip_addr_isany(&(ipcb->local_ip)) || 8032540: 681f ldr r7, [r3, #0] 8032542: b90f cbnz r7, 8032548 ip_addr_isany(ipaddr) || ip_addr_cmp(&(ipcb->local_ip), ipaddr))) { /* other PCB already binds to this local IP and port */ LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: local port %"U16_F" already bound by another pcb\n", port)); return ERR_USE; 8032544: 20f8 movs r0, #248 ; 0xf8 8032546: e039 b.n 80325bc /* port matches that of PCB in list and REUSEADDR not set -> reject */ else { #endif /* SO_REUSE */ if ((ipcb->local_port == port) && /* IP address matches, or one is IP_ADDR_ANY? */ (ip_addr_isany(&(ipcb->local_ip)) || 8032548: 2900 cmp r1, #0 803254a: d0fb beq.n 8032544 ip_addr_isany(ipaddr) || 803254c: 680e ldr r6, [r1, #0] 803254e: 2e00 cmp r6, #0 8032550: d0f8 beq.n 8032544 8032552: 42b7 cmp r7, r6 8032554: d101 bne.n 803255a 8032556: e7f5 b.n 8032544 /* is this UDP PCB already on active list? */ if (pcb == ipcb) { /* pcb may occur at most once in active list */ LWIP_ASSERT("rebind == 0", rebind == 0); /* pcb already in list, just rebind */ rebind = 1; 8032558: 2501 movs r5, #1 ip_addr_debug_print(UDP_DEBUG, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 803255a: 68db ldr r3, [r3, #12] 803255c: 2b00 cmp r3, #0 803255e: d1ea bne.n 8032536 return ERR_USE; } } } ip_addr_set(&pcb->local_ip, ipaddr); 8032560: b101 cbz r1, 8032564 8032562: 6809 ldr r1, [r1, #0] 8032564: 6021 str r1, [r4, #0] /* no port specified? */ if (port == 0) { 8032566: b9fa cbnz r2, 80325a8 8032568: 4b16 ldr r3, [pc, #88] ; (80325c4 ) 803256a: 881a ldrh r2, [r3, #0] 803256c: f44f 4180 mov.w r1, #16384 ; 0x4000 { u16_t n = 0; struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 8032570: f64f 76ff movw r6, #65535 ; 0xffff 8032574: 42b2 cmp r2, r6 8032576: d002 beq.n 803257e 8032578: 3201 adds r2, #1 803257a: b292 uxth r2, r2 803257c: e001 b.n 8032582 udp_port = UDP_LOCAL_PORT_RANGE_START; 803257e: f44f 4240 mov.w r2, #49152 ; 0xc000 } /* Check all PCBs. */ for(pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8032582: 4603 mov r3, r0 8032584: e00a b.n 803259c if (pcb->local_port == udp_port) { 8032586: 8a5f ldrh r7, [r3, #18] 8032588: 4297 cmp r7, r2 803258a: d106 bne.n 803259a 803258c: 3901 subs r1, #1 803258e: b289 uxth r1, r1 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 8032590: 2900 cmp r1, #0 8032592: d1ef bne.n 8032574 8032594: 4b0b ldr r3, [pc, #44] ; (80325c4 ) 8032596: 801a strh r2, [r3, #0] 8032598: e7d4 b.n 8032544 again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { udp_port = UDP_LOCAL_PORT_RANGE_START; } /* Check all PCBs. */ for(pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 803259a: 68db ldr r3, [r3, #12] 803259c: 2b00 cmp r3, #0 803259e: d1f2 bne.n 8032586 80325a0: 4b08 ldr r3, [pc, #32] ; (80325c4 ) 80325a2: 801a strh r2, [r3, #0] ip_addr_set(&pcb->local_ip, ipaddr); /* no port specified? */ if (port == 0) { port = udp_new_port(); if (port == 0) { 80325a4: 2a00 cmp r2, #0 80325a6: d0cd beq.n 8032544 /* no more ports available in local range */ LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); return ERR_USE; } } pcb->local_port = port; 80325a8: 8262 strh r2, [r4, #18] snmp_insert_udpidx_tree(pcb); 80325aa: 4620 mov r0, r4 80325ac: f002 f9a8 bl 8034900 /* pcb not active yet? */ if (rebind == 0) { 80325b0: b91d cbnz r5, 80325ba /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 80325b2: 4b03 ldr r3, [pc, #12] ; (80325c0 ) 80325b4: 681a ldr r2, [r3, #0] udp_pcbs = pcb; 80325b6: 601c str r4, [r3, #0] pcb->local_port = port; snmp_insert_udpidx_tree(pcb); /* pcb not active yet? */ if (rebind == 0) { /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 80325b8: 60e2 str r2, [r4, #12] LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to %"U16_F".%"U16_F".%"U16_F".%"U16_F", port %"U16_F"\n", ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); return ERR_OK; 80325ba: 2000 movs r0, #0 } 80325bc: b240 sxtb r0, r0 80325be: bdf8 pop {r3, r4, r5, r6, r7, pc} 80325c0: 2000ff3c .word 0x2000ff3c 80325c4: 2000072e .word 0x2000072e 080325c8 : * @see udp_disconnect() udp_send() */ err_t udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) { 80325c8: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 80325cc: 4692 mov sl, r2 return ERR_VAL; } #endif /* IP_SOF_BROADCAST */ /* if the PCB is not yet bound to a port, bind it here */ if (pcb->local_port == 0) { 80325ce: 8a42 ldrh r2, [r0, #18] * @see udp_disconnect() udp_send() */ err_t udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) { 80325d0: f8dd 8030 ldr.w r8, [sp, #48] ; 0x30 80325d4: 4605 mov r5, r0 80325d6: 460e mov r6, r1 80325d8: 4699 mov r9, r3 return ERR_VAL; } #endif /* IP_SOF_BROADCAST */ /* if the PCB is not yet bound to a port, bind it here */ if (pcb->local_port == 0) { 80325da: b132 cbz r2, 80325ea return err; } } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_header(p, UDP_HLEN)) { 80325dc: 4630 mov r0, r6 80325de: 2108 movs r1, #8 80325e0: f7fd fb27 bl 802fc32 80325e4: b940 cbnz r0, 80325f8 80325e6: 4634 mov r4, r6 80325e8: e013 b.n 8032612 #endif /* IP_SOF_BROADCAST */ /* if the PCB is not yet bound to a port, bind it here */ if (pcb->local_port == 0) { LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send: not yet bound to a port, binding now\n")); err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 80325ea: 4601 mov r1, r0 80325ec: f7ff ff9c bl 8032528 if (err != ERR_OK) { 80325f0: 4607 mov r7, r0 80325f2: 2800 cmp r0, #0 80325f4: d0f2 beq.n 80325dc 80325f6: e044 b.n 8032682 } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_header(p, UDP_HLEN)) { /* allocate header in a separate new pbuf */ q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); 80325f8: 2001 movs r0, #1 80325fa: 2108 movs r1, #8 80325fc: 2200 movs r2, #0 80325fe: f7fd fb90 bl 802fd22 /* new header pbuf could not be allocated? */ if (q == NULL) { 8032602: 4604 mov r4, r0 8032604: 2800 cmp r0, #0 8032606: d039 beq.n 803267c LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); return ERR_MEM; } if (p->tot_len != 0) { 8032608: 8933 ldrh r3, [r6, #8] 803260a: b113 cbz r3, 8032612 /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 803260c: 4631 mov r1, r6 803260e: f7fd fc36 bl 802fe7e } LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; udphdr->src = htons(pcb->local_port); 8032612: 8a68 ldrh r0, [r5, #18] LWIP_DEBUGF(UDP_DEBUG, ("udp_send: added header in given pbuf %p\n", (void *)p)); } LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; 8032614: 6867 ldr r7, [r4, #4] udphdr->src = htons(pcb->local_port); 8032616: f7fc f9f9 bl 802ea0c 803261a: 8038 strh r0, [r7, #0] udphdr->dest = htons(dst_port); 803261c: 4648 mov r0, r9 803261e: f7fc f9f5 bl 802ea0c /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 8032622: 2300 movs r3, #0 LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; udphdr->src = htons(pcb->local_port); udphdr->dest = htons(dst_port); 8032624: 8078 strh r0, [r7, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 8032626: 71bb strb r3, [r7, #6] 8032628: 71fb strb r3, [r7, #7] } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 803262a: 682b ldr r3, [r5, #0] 803262c: b913 cbnz r3, 8032634 /* use outgoing network interface IP address as source address */ src_ip = &(netif->ip_addr); 803262e: f108 0904 add.w r9, r8, #4 8032632: e00a b.n 803264a } else { /* check if UDP PCB local IP address is correct * this could be an old address if netif->ip_addr has changed */ if (!ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr))) { 8032634: f8d8 2004 ldr.w r2, [r8, #4] 8032638: 4293 cmp r3, r2 803263a: d005 beq.n 8032648 /* local_ip doesn't match, drop the packet */ if (q != p) { 803263c: 42b4 cmp r4, r6 803263e: d01f beq.n 8032680 /* free the header pbuf */ pbuf_free(q); 8032640: 4620 mov r0, r4 8032642: f7fd fb21 bl 802fc88 8032646: e01b b.n 8032680 } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 8032648: 46a9 mov r9, r5 NETIF_SET_HWADDRHINT(netif, NULL); } else #endif /* LWIP_UDPLITE */ { /* UDP */ LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP packet length %"U16_F"\n", q->tot_len)); udphdr->len = htons(q->tot_len); 803264a: 8920 ldrh r0, [r4, #8] 803264c: f7fc f9de bl 802ea0c 8032650: 80b8 strh r0, [r7, #4] #endif /* CHECKSUM_GEN_UDP */ LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum)); LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,IP_PROTO_UDP,)\n")); /* output to IP */ NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); err = ip_output_if(q, src_ip, dst_ip, pcb->ttl, pcb->tos, IP_PROTO_UDP, netif); 8032652: 7a6a ldrb r2, [r5, #9] 8032654: 7aab ldrb r3, [r5, #10] 8032656: 9200 str r2, [sp, #0] 8032658: 2211 movs r2, #17 803265a: 9201 str r2, [sp, #4] 803265c: 4649 mov r1, r9 803265e: 4652 mov r2, sl 8032660: f8cd 8008 str.w r8, [sp, #8] 8032664: 4620 mov r0, r4 8032666: f000 fb9d bl 8032da4 803266a: 4607 mov r7, r0 NETIF_SET_HWADDRHINT(netif, NULL); } /* TODO: must this be increased even if error occured? */ snmp_inc_udpoutdatagrams(); 803266c: f002 f940 bl 80348f0 /* did we chain a separate header pbuf earlier? */ if (q != p) { 8032670: 42b4 cmp r4, r6 8032672: d006 beq.n 8032682 /* free the header pbuf */ pbuf_free(q); 8032674: 4620 mov r0, r4 8032676: f7fd fb07 bl 802fc88 803267a: e002 b.n 8032682 /* allocate header in a separate new pbuf */ q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); /* new header pbuf could not be allocated? */ if (q == NULL) { LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); return ERR_MEM; 803267c: 27ff movs r7, #255 ; 0xff 803267e: e000 b.n 8032682 /* free the header pbuf */ pbuf_free(q); q = NULL; /* p is still referenced by the caller, and will live on */ } return ERR_VAL; 8032680: 27fa movs r7, #250 ; 0xfa /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; } 8032682: b278 sxtb r0, r7 8032684: b004 add sp, #16 8032686: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0803268a : * @see udp_disconnect() udp_send() */ err_t udp_sendto(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port) { 803268a: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 803268c: 4605 mov r5, r0 /* find the outgoing network interface for this packet */ #if LWIP_IGMP netif = ip_route((ip_addr_ismulticast(dst_ip))?(&(pcb->multicast_ip)):(dst_ip)); #else netif = ip_route(dst_ip); 803268e: 4610 mov r0, r2 * @see udp_disconnect() udp_send() */ err_t udp_sendto(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port) { 8032690: 460f mov r7, r1 8032692: 4614 mov r4, r2 8032694: 461e mov r6, r3 /* find the outgoing network interface for this packet */ #if LWIP_IGMP netif = ip_route((ip_addr_ismulticast(dst_ip))?(&(pcb->multicast_ip)):(dst_ip)); #else netif = ip_route(dst_ip); 8032696: f000 fa81 bl 8032b9c #endif /* LWIP_IGMP */ /* no outgoing network interface could be found? */ if (netif == NULL) { 803269a: b138 cbz r0, 80326ac return ERR_RTE; } #if LWIP_CHECKSUM_ON_COPY return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum); #else /* LWIP_CHECKSUM_ON_COPY */ return udp_sendto_if(pcb, p, dst_ip, dst_port, netif); 803269c: 9000 str r0, [sp, #0] 803269e: 4639 mov r1, r7 80326a0: 4628 mov r0, r5 80326a2: 4622 mov r2, r4 80326a4: 4633 mov r3, r6 80326a6: f7ff ff8f bl 80325c8 80326aa: e000 b.n 80326ae /* no outgoing network interface could be found? */ if (netif == NULL) { LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", ip4_addr1_16(dst_ip), ip4_addr2_16(dst_ip), ip4_addr3_16(dst_ip), ip4_addr4_16(dst_ip))); UDP_STATS_INC(udp.rterr); return ERR_RTE; 80326ac: 20fc movs r0, #252 ; 0xfc #if LWIP_CHECKSUM_ON_COPY return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum); #else /* LWIP_CHECKSUM_ON_COPY */ return udp_sendto_if(pcb, p, dst_ip, dst_port, netif); #endif /* LWIP_CHECKSUM_ON_COPY */ } 80326ae: b240 sxtb r0, r0 80326b0: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 080326b2 : */ err_t udp_send(struct udp_pcb *pcb, struct pbuf *p) { /* send to the packet using remote ip and port stored in the pcb */ return udp_sendto(pcb, p, &pcb->remote_ip, pcb->remote_port); 80326b2: 8a83 ldrh r3, [r0, #20] 80326b4: 1d02 adds r2, r0, #4 80326b6: f7ff bfe8 b.w 803268a 80326ba: 0000 movs r0, r0 080326bc : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80326bc: b570 push {r4, r5, r6, lr} 80326be: 4616 mov r6, r2 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 80326c0: 8a42 ldrh r2, [r0, #18] * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80326c2: 4604 mov r4, r0 80326c4: 460d mov r5, r1 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 80326c6: b10a cbz r2, 80326cc if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 80326c8: b935 cbnz r5, 80326d8 80326ca: e006 b.n 80326da udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { struct udp_pcb *ipcb; if (pcb->local_port == 0) { err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 80326cc: 4601 mov r1, r0 80326ce: f7ff ff2b bl 8032528 if (err != ERR_OK) { 80326d2: 2800 cmp r0, #0 80326d4: d0f8 beq.n 80326c8 80326d6: e013 b.n 8032700 return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 80326d8: 682d ldr r5, [r5, #0] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 80326da: 7c23 ldrb r3, [r4, #16] ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80326dc: 4a09 ldr r2, [pc, #36] ; (8032704 ) if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 80326de: 6065 str r5, [r4, #4] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 80326e0: f043 0304 orr.w r3, r3, #4 80326e4: 7423 strb r3, [r4, #16] ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80326e6: 6813 ldr r3, [r2, #0] return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); pcb->remote_port = port; 80326e8: 82a6 strh r6, [r4, #20] ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80326ea: 4618 mov r0, r3 80326ec: e002 b.n 80326f4 if (pcb == ipcb) { 80326ee: 4284 cmp r4, r0 80326f0: d005 beq.n 80326fe ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80326f2: 68c0 ldr r0, [r0, #12] 80326f4: 2800 cmp r0, #0 80326f6: d1fa bne.n 80326ee /* already on the list, just return */ return ERR_OK; } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 80326f8: 60e3 str r3, [r4, #12] udp_pcbs = pcb; 80326fa: 6014 str r4, [r2, #0] return ERR_OK; 80326fc: e000 b.n 8032700 /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { if (pcb == ipcb) { /* already on the list, just return */ return ERR_OK; 80326fe: 2000 movs r0, #0 } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; udp_pcbs = pcb; return ERR_OK; } 8032700: b240 sxtb r0, r0 8032702: bd70 pop {r4, r5, r6, pc} 8032704: 2000ff3c .word 0x2000ff3c 08032708 : */ void udp_disconnect(struct udp_pcb *pcb) { /* reset remote address association */ ip_addr_set_any(&pcb->remote_ip); 8032708: 2300 movs r3, #0 803270a: 6043 str r3, [r0, #4] pcb->remote_port = 0; 803270c: 8283 strh r3, [r0, #20] /* mark PCB as unconnected */ pcb->flags &= ~UDP_FLAGS_CONNECTED; 803270e: 7c03 ldrb r3, [r0, #16] 8032710: f023 0304 bic.w r3, r3, #4 8032714: 7403 strb r3, [r0, #16] 8032716: 4770 bx lr 08032718 : */ void udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) { /* remember recv() callback and user data */ pcb->recv = recv; 8032718: 6181 str r1, [r0, #24] pcb->recv_arg = recv_arg; 803271a: 61c2 str r2, [r0, #28] 803271c: 4770 bx lr 803271e: 0000 movs r0, r0 08032720 : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 8032720: b510 push {r4, lr} 8032722: 4604 mov r4, r0 struct udp_pcb *pcb2; snmp_delete_udpidx_tree(pcb); 8032724: f002 f930 bl 8034988 /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 8032728: 4a0a ldr r2, [pc, #40] ; (8032754 ) 803272a: 6813 ldr r3, [r2, #0] 803272c: 42a3 cmp r3, r4 803272e: d109 bne.n 8032744 /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 8032730: 68e3 ldr r3, [r4, #12] 8032732: 6013 str r3, [r2, #0] 8032734: e008 b.n 8032748 /* pcb not 1st in list */ } else { for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { /* find pcb in udp_pcbs list */ if (pcb2->next != NULL && pcb2->next == pcb) { 8032736: 68da ldr r2, [r3, #12] 8032738: b11a cbz r2, 8032742 803273a: 42a2 cmp r2, r4 /* remove pcb from list */ pcb2->next = pcb->next; 803273c: bf04 itt eq 803273e: 68e2 ldreq r2, [r4, #12] 8032740: 60da streq r2, [r3, #12] if (udp_pcbs == pcb) { /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; /* pcb not 1st in list */ } else { for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 8032742: 68db ldr r3, [r3, #12] 8032744: 2b00 cmp r3, #0 8032746: d1f6 bne.n 8032736 /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8032748: 2001 movs r0, #1 803274a: 4621 mov r1, r4 } 803274c: e8bd 4010 ldmia.w sp!, {r4, lr} /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8032750: f7fd b990 b.w 802fa74 8032754: 2000ff3c .word 0x2000ff3c 08032758 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 8032758: b510 push {r4, lr} struct udp_pcb *pcb; pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 803275a: 2001 movs r0, #1 803275c: f7fd f974 bl 802fa48 /* could allocate UDP PCB? */ if (pcb != NULL) { 8032760: 4604 mov r4, r0 8032762: b128 cbz r0, 8032770 /* UDP Lite: by initializing to all zeroes, chksum_len is set to 0 * which means checksum is generated over the whole datagram per default * (recommended as default by RFC 3828). */ /* initialize PCB to all zeroes */ memset(pcb, 0, sizeof(struct udp_pcb)); 8032764: 2100 movs r1, #0 8032766: 2220 movs r2, #32 8032768: f7ef fb56 bl 8021e18 pcb->ttl = UDP_TTL; 803276c: 23ff movs r3, #255 ; 0xff 803276e: 72a3 strb r3, [r4, #10] } return pcb; } 8032770: 4620 mov r0, r4 8032772: bd10 pop {r4, pc} 08032774 : * @param p the icmp echo request packet, p->payload pointing to the ip header * @param inp the netif on which this packet was received */ void icmp_input(struct pbuf *p, struct netif *inp) { 8032774: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8032778: 4604 mov r4, r0 803277a: b085 sub sp, #20 803277c: 460f mov r7, r1 struct icmp_echo_hdr *iecho; struct ip_hdr *iphdr; s16_t hlen; ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); 803277e: f002 f837 bl 80347f0 iphdr = (struct ip_hdr *)p->payload; 8032782: 6865 ldr r5, [r4, #4] hlen = IPH_HL(iphdr) * 4; 8032784: f895 8000 ldrb.w r8, [r5] 8032788: f008 080f and.w r8, r8, #15 803278c: ea4f 0888 mov.w r8, r8, lsl #2 if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) { 8032790: f1c8 0900 rsb r9, r8, #0 8032794: 4620 mov r0, r4 8032796: fa0f f189 sxth.w r1, r9 803279a: f7fd fa4a bl 802fc32 803279e: 2800 cmp r0, #0 80327a0: d172 bne.n 8032888 80327a2: 8923 ldrh r3, [r4, #8] 80327a4: 2b03 cmp r3, #3 80327a6: d96f bls.n 8032888 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 80327a8: 6863 ldr r3, [r4, #4] #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload)+1); #endif /* LWIP_DEBUG */ switch (type) { 80327aa: 781b ldrb r3, [r3, #0] 80327ac: 2b08 cmp r3, #8 80327ae: d165 bne.n 803287c #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 80327b0: 4b39 ldr r3, [pc, #228] ; (8032898 ) 80327b2: 681e ldr r6, [r3, #0] accepted = 0; } #endif /* LWIP_MULTICAST_PING */ #if !LWIP_BROADCAST_PING /* broadcast destination address? */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp)) { 80327b4: 4639 mov r1, r7 80327b6: 4630 mov r0, r6 80327b8: f000 f900 bl 80329bc 80327bc: 2800 cmp r0, #0 80327be: d15d bne.n 803287c #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 80327c0: f006 06f0 and.w r6, r6, #240 ; 0xf0 if (ip_addr_isbroadcast(¤t_iphdr_dest, inp)) { accepted = 0; } #endif /* LWIP_BROADCAST_PING */ /* broadcast or multicast destination address not acceptd? */ if (!accepted) { 80327c4: 2ee0 cmp r6, #224 ; 0xe0 80327c6: d100 bne.n 80327ca 80327c8: e058 b.n 803287c return; } } #endif /* !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); if (p->tot_len < sizeof(struct icmp_echo_hdr)) { 80327ca: 8923 ldrh r3, [r4, #8] 80327cc: 2b07 cmp r3, #7 80327ce: d95b bls.n 8032888 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); goto lenerr; } if (inet_chksum_pbuf(p) != 0) { 80327d0: 4620 mov r0, r4 80327d2: f000 f8cf bl 8032974 80327d6: b100 cbz r0, 80327da 80327d8: e056 b.n 8032888 ICMP_STATS_INC(icmp.chkerr); snmp_inc_icmpinerrors(); return; } #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN if (pbuf_header(p, (PBUF_IP_HLEN + PBUF_LINK_HLEN))) { 80327da: 4620 mov r0, r4 80327dc: 2122 movs r1, #34 ; 0x22 ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); iphdr = (struct ip_hdr *)p->payload; hlen = IPH_HL(iphdr) * 4; 80327de: fa1f f888 uxth.w r8, r8 ICMP_STATS_INC(icmp.chkerr); snmp_inc_icmpinerrors(); return; } #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN if (pbuf_header(p, (PBUF_IP_HLEN + PBUF_LINK_HLEN))) { 80327e2: f7fd fa26 bl 802fc32 80327e6: b1f8 cbz r0, 8032828 /* p is not big enough to contain link headers * allocate a new one and copy p into it */ struct pbuf *r; /* switch p->payload to ip header */ if (pbuf_header(p, hlen)) { 80327e8: 4620 mov r0, r4 80327ea: 4641 mov r1, r8 80327ec: f7fd fa21 bl 802fc32 80327f0: 4602 mov r2, r0 80327f2: 2800 cmp r0, #0 80327f4: d148 bne.n 8032888 LWIP_ASSERT("icmp_input: moving p->payload to ip header failed\n", 0); goto memerr; } /* allocate new packet buffer with space for link headers */ r = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); 80327f6: 2002 movs r0, #2 80327f8: 8921 ldrh r1, [r4, #8] 80327fa: f7fd fa92 bl 802fd22 if (r == NULL) { 80327fe: 4606 mov r6, r0 8032800: 2800 cmp r0, #0 8032802: d041 beq.n 8032888 goto memerr; } LWIP_ASSERT("check that first pbuf can hold struct the ICMP header", (r->len >= hlen + sizeof(struct icmp_echo_hdr))); /* copy the whole packet including ip header */ if (pbuf_copy(r, p) != ERR_OK) { 8032804: 4621 mov r1, r4 8032806: f7fd fb43 bl 802fe90 803280a: 2800 cmp r0, #0 803280c: d13c bne.n 8032888 LWIP_ASSERT("icmp_input: copying to new pbuf failed\n", 0); goto memerr; } iphdr = (struct ip_hdr *)r->payload; /* switch r->payload back to icmp header */ if (pbuf_header(r, -hlen)) { 803280e: 4630 mov r0, r6 8032810: fa0f f189 sxth.w r1, r9 /* copy the whole packet including ip header */ if (pbuf_copy(r, p) != ERR_OK) { LWIP_ASSERT("icmp_input: copying to new pbuf failed\n", 0); goto memerr; } iphdr = (struct ip_hdr *)r->payload; 8032814: 6875 ldr r5, [r6, #4] /* switch r->payload back to icmp header */ if (pbuf_header(r, -hlen)) { 8032816: f7fd fa0c bl 802fc32 803281a: 2800 cmp r0, #0 803281c: d134 bne.n 8032888 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); goto memerr; } /* free the original p */ pbuf_free(p); 803281e: 4620 mov r0, r4 8032820: f7fd fa32 bl 802fc88 8032824: 4634 mov r4, r6 8032826: e006 b.n 8032836 /* we now have an identical copy of p that has room for link headers */ p = r; } else { /* restore p->payload to point to icmp header */ if (pbuf_header(p, -(s16_t)(PBUF_IP_HLEN + PBUF_LINK_HLEN))) { 8032828: 4620 mov r0, r4 803282a: f06f 0121 mvn.w r1, #33 ; 0x21 803282e: f7fd fa00 bl 802fc32 8032832: 2800 cmp r0, #0 8032834: d128 bne.n 8032888 #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ /* At this point, all checks are OK. */ /* We generate an answer by switching the dest and src ip addresses, * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ iecho = (struct icmp_echo_hdr *)p->payload; ip_addr_copy(iphdr->src, *ip_current_dest_addr()); 8032836: f8df 9060 ldr.w r9, [pc, #96] ; 8032898 } #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ /* At this point, all checks are OK. */ /* We generate an answer by switching the dest and src ip addresses, * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ iecho = (struct icmp_echo_hdr *)p->payload; 803283a: 6863 ldr r3, [r4, #4] ip_addr_copy(iphdr->src, *ip_current_dest_addr()); 803283c: f8d9 2000 ldr.w r2, [r9] 8032840: 60ea str r2, [r5, #12] ip_addr_copy(iphdr->dest, *ip_current_src_addr()); 8032842: 4a16 ldr r2, [pc, #88] ; (803289c ) 8032844: 6812 ldr r2, [r2, #0] #else // CHECKSUM_GEN_ICMP iecho->chksum = 0; #endif // CHECKSUM_GEN_ICMP */ /* Set the correct TTL and recalculate the header checksum. */ IPH_TTL_SET(iphdr, ICMP_TTL); 8032846: 26ff movs r6, #255 ; 0xff /* At this point, all checks are OK. */ /* We generate an answer by switching the dest and src ip addresses, * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ iecho = (struct icmp_echo_hdr *)p->payload; ip_addr_copy(iphdr->src, *ip_current_dest_addr()); ip_addr_copy(iphdr->dest, *ip_current_src_addr()); 8032848: 612a str r2, [r5, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 803284a: 2200 movs r2, #0 803284c: 701a strb r2, [r3, #0] //----------------------------------------------------------- // Добавил фикс 15.08.15. // Фикс исправляет баг с пингом. #ifdef CHECKSUM_BY_HARDWARE iecho->chksum = 0; 803284e: 709a strb r2, [r3, #2] 8032850: 70da strb r2, [r3, #3] iecho->chksum = 0; #endif // CHECKSUM_GEN_ICMP */ /* Set the correct TTL and recalculate the header checksum. */ IPH_TTL_SET(iphdr, ICMP_TTL); IPH_CHKSUM_SET(iphdr, 0); 8032852: 72aa strb r2, [r5, #10] 8032854: 72ea strb r2, [r5, #11] #else // CHECKSUM_GEN_ICMP iecho->chksum = 0; #endif // CHECKSUM_GEN_ICMP */ /* Set the correct TTL and recalculate the header checksum. */ IPH_TTL_SET(iphdr, ICMP_TTL); 8032856: 722e strb r6, [r5, #8] IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN)); #endif /* CHECKSUM_GEN_IP */ ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); 8032858: f001 ffda bl 8034810 /* increase number of echo replies attempted to send */ snmp_inc_icmpoutechoreps(); 803285c: f001 ffe8 bl 8034830 if(pbuf_header(p, hlen)) { 8032860: 4620 mov r0, r4 8032862: 4641 mov r1, r8 8032864: f7fd f9e5 bl 802fc32 8032868: 4602 mov r2, r0 803286a: b938 cbnz r0, 803287c LWIP_ASSERT("Can't move over header in packet", 0); } else { err_t ret; /* send an ICMP packet, src addr is the dest addr of the curren packet */ ret = ip_output_if(p, ip_current_dest_addr(), IP_HDRINCL, 803286c: 2301 movs r3, #1 803286e: e88d 0089 stmia.w sp, {r0, r3, r7} 8032872: 4620 mov r0, r4 8032874: 4649 mov r1, r9 8032876: 4633 mov r3, r6 8032878: f000 fa94 bl 8032da4 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", (s16_t)type, (s16_t)code)); ICMP_STATS_INC(icmp.proterr); ICMP_STATS_INC(icmp.drop); } pbuf_free(p); 803287c: 4620 mov r0, r4 pbuf_free(p); ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 803287e: b005 add sp, #20 8032880: e8bd 43f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, lr} LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", (s16_t)type, (s16_t)code)); ICMP_STATS_INC(icmp.proterr); ICMP_STATS_INC(icmp.drop); } pbuf_free(p); 8032884: f7fd ba00 b.w 802fc88 ICMP_STATS_INC(icmp.lenerr); snmp_inc_icmpinerrors(); return; #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN memerr: pbuf_free(p); 8032888: 4620 mov r0, r4 803288a: f7fd f9fd bl 802fc88 ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 803288e: b005 add sp, #20 8032890: e8bd 43f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, lr} return; #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN memerr: pbuf_free(p); ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); 8032894: f001 bfb4 b.w 8034800 8032898: 2000ff48 .word 0x2000ff48 803289c: 2000ff40 .word 0x2000ff40 080328a0 : * p->payload pointing to the IP header * @param t type of the 'unreachable' packet */ void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) { 80328a0: e92d 41ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} 80328a4: 4607 mov r7, r0 80328a6: 460d mov r5, r1 /* we can use the echo header here */ struct icmp_echo_hdr *icmphdr; ip_addr_t iphdr_src; /* ICMP header + IP header + 8 bytes of data */ q = pbuf_alloc(PBUF_IP, sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE, 80328a8: 2001 movs r0, #1 80328aa: 2124 movs r1, #36 ; 0x24 80328ac: 2200 movs r2, #0 80328ae: f7fd fa38 bl 802fd22 PBUF_RAM); if (q == NULL) { 80328b2: 4606 mov r6, r0 80328b4: b358 cbz r0, 803290e ip_addr_debug_print(ICMP_DEBUG, &(iphdr->src)); LWIP_DEBUGF(ICMP_DEBUG, (" to ")); ip_addr_debug_print(ICMP_DEBUG, &(iphdr->dest)); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; 80328b6: 6844 ldr r4, [r0, #4] return; } LWIP_ASSERT("check that first pbuf can hold icmp message", (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); iphdr = (struct ip_hdr *)p->payload; 80328b8: f8d7 8004 ldr.w r8, [r7, #4] ip_addr_debug_print(ICMP_DEBUG, &(iphdr->dest)); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; icmphdr->type = type; icmphdr->code = code; 80328bc: 7065 strb r5, [r4, #1] LWIP_DEBUGF(ICMP_DEBUG, (" to ")); ip_addr_debug_print(ICMP_DEBUG, &(iphdr->dest)); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; icmphdr->type = type; 80328be: 2303 movs r3, #3 icmphdr->code = code; icmphdr->id = 0; 80328c0: 2500 movs r5, #0 LWIP_DEBUGF(ICMP_DEBUG, (" to ")); ip_addr_debug_print(ICMP_DEBUG, &(iphdr->dest)); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; icmphdr->type = type; 80328c2: 7023 strb r3, [r4, #0] icmphdr->code = code; icmphdr->id = 0; 80328c4: 7125 strb r5, [r4, #4] 80328c6: 7165 strb r5, [r4, #5] icmphdr->seqno = 0; 80328c8: 71a5 strb r5, [r4, #6] 80328ca: 71e5 strb r5, [r4, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 80328cc: 6840 ldr r0, [r0, #4] 80328ce: 6879 ldr r1, [r7, #4] 80328d0: 221c movs r2, #28 80328d2: 3008 adds r0, #8 80328d4: f7ef f9e6 bl 8021ca4 IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); /* calculate checksum */ icmphdr->chksum = 0; 80328d8: 70a5 strb r5, [r4, #2] 80328da: 70e5 strb r5, [r4, #3] icmphdr->chksum = inet_chksum(icmphdr, q->len); 80328dc: 8971 ldrh r1, [r6, #10] 80328de: 4620 mov r0, r4 80328e0: f000 f842 bl 8032968 80328e4: 8060 strh r0, [r4, #2] ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); 80328e6: f001 ff93 bl 8034810 /* increase number of destination unreachable messages attempted to send */ snmp_inc_icmpouttimeexcds(); 80328ea: f001 ff99 bl 8034820 ip_addr_copy(iphdr_src, iphdr->src); 80328ee: f8d8 300c ldr.w r3, [r8, #12] 80328f2: aa04 add r2, sp, #16 ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 80328f4: 4630 mov r0, r6 ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); /* increase number of destination unreachable messages attempted to send */ snmp_inc_icmpouttimeexcds(); ip_addr_copy(iphdr_src, iphdr->src); 80328f6: f842 3d04 str.w r3, [r2, #-4]! ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 80328fa: 2301 movs r3, #1 80328fc: 9301 str r3, [sp, #4] 80328fe: 9500 str r5, [sp, #0] 8032900: 4629 mov r1, r5 8032902: 23ff movs r3, #255 ; 0xff 8032904: f000 fa9e bl 8032e44 pbuf_free(q); 8032908: 4630 mov r0, r6 803290a: f7fd f9bd bl 802fc88 */ void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) { icmp_send_response(p, ICMP_DUR, t); } 803290e: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 08032912 : * @return host order (!) lwip checksum (non-inverted Internet sum) */ static u16_t lwip_standard_chksum(void *dataptr, int len) { 8032912: b513 push {r0, r1, r4, lr} u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; 8032914: 2300 movs r3, #0 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { 8032916: f010 0201 ands.w r2, r0, #1 static u16_t lwip_standard_chksum(void *dataptr, int len) { u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; 803291a: f8ad 3006 strh.w r3, [sp, #6] u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { 803291e: d006 beq.n 803292e 8032920: 4299 cmp r1, r3 8032922: dd04 ble.n 803292e ((u8_t *)&t)[1] = *pb++; 8032924: f810 3b01 ldrb.w r3, [r0], #1 len--; 8032928: 3901 subs r1, #1 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { ((u8_t *)&t)[1] = *pb++; 803292a: f88d 3007 strb.w r3, [sp, #7] static u16_t lwip_standard_chksum(void *dataptr, int len) { u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; u32_t sum = 0; 803292e: 2300 movs r3, #0 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 8032930: e003 b.n 803293a sum += *ps++; 8032932: f830 4b02 ldrh.w r4, [r0], #2 len -= 2; 8032936: 3902 subs r1, #2 } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { sum += *ps++; 8032938: 191b adds r3, r3, r4 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 803293a: 2901 cmp r1, #1 803293c: dcf9 bgt.n 8032932 len -= 2; } /* Consume left-over byte, if any */ if (len > 0) { ((u8_t *)&t)[0] = *(u8_t *)ps; 803293e: bf04 itt eq 8032940: 7801 ldrbeq r1, [r0, #0] 8032942: f88d 1006 strbeq.w r1, [sp, #6] } /* Add end bytes */ sum += t; 8032946: f8bd 0006 ldrh.w r0, [sp, #6] 803294a: 181b adds r3, r3, r0 /* Fold 32-bit sum to 16 bits calling this twice is propably faster than if statements... */ sum = FOLD_U32T(sum); 803294c: b298 uxth r0, r3 803294e: eb00 4313 add.w r3, r0, r3, lsr #16 sum = FOLD_U32T(sum); 8032952: b298 uxth r0, r3 8032954: eb00 4013 add.w r0, r0, r3, lsr #16 /* Swap if alignment was odd */ if (odd) { 8032958: b122 cbz r2, 8032964 sum = SWAP_BYTES_IN_WORD(sum); 803295a: 0603 lsls r3, r0, #24 803295c: f3c0 2007 ubfx r0, r0, #8, #8 8032960: ea40 4013 orr.w r0, r0, r3, lsr #16 } return (u16_t)sum; } 8032964: b280 uxth r0, r0 8032966: bd1c pop {r2, r3, r4, pc} 08032968 : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(void *dataptr, u16_t len) { 8032968: b508 push {r3, lr} return ~LWIP_CHKSUM(dataptr, len); 803296a: f7ff ffd2 bl 8032912 803296e: 43c0 mvns r0, r0 } 8032970: b280 uxth r0, r0 8032972: bd08 pop {r3, pc} 08032974 : * @param p pbuf chain over that the checksum should be calculated * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum_pbuf(struct pbuf *p) { 8032974: b570 push {r4, r5, r6, lr} u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; swapped = 0; 8032976: 2600 movs r6, #0 * @param p pbuf chain over that the checksum should be calculated * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum_pbuf(struct pbuf *p) { 8032978: 4605 mov r5, r0 u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; 803297a: 4634 mov r4, r6 swapped = 0; for(q = p; q != NULL; q = q->next) { 803297c: e013 b.n 80329a6 acc += LWIP_CHKSUM(q->payload, q->len); 803297e: 8969 ldrh r1, [r5, #10] 8032980: 6868 ldr r0, [r5, #4] 8032982: f7ff ffc6 bl 8032912 acc = FOLD_U32T(acc); if (q->len % 2 != 0) { 8032986: 896b ldrh r3, [r5, #10] u8_t swapped; acc = 0; swapped = 0; for(q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); 8032988: 1900 adds r0, r0, r4 acc = FOLD_U32T(acc); 803298a: b284 uxth r4, r0 if (q->len % 2 != 0) { 803298c: 07d9 lsls r1, r3, #31 acc = 0; swapped = 0; for(q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); acc = FOLD_U32T(acc); 803298e: eb04 4410 add.w r4, r4, r0, lsr #16 if (q->len % 2 != 0) { 8032992: d507 bpl.n 80329a4 swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); 8032994: 0623 lsls r3, r4, #24 swapped = 0; for(q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); acc = FOLD_U32T(acc); if (q->len % 2 != 0) { swapped = 1 - swapped; 8032996: f1c6 0601 rsb r6, r6, #1 acc = SWAP_BYTES_IN_WORD(acc); 803299a: f3c4 2407 ubfx r4, r4, #8, #8 swapped = 0; for(q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); acc = FOLD_U32T(acc); if (q->len % 2 != 0) { swapped = 1 - swapped; 803299e: b2f6 uxtb r6, r6 acc = SWAP_BYTES_IN_WORD(acc); 80329a0: ea44 4413 orr.w r4, r4, r3, lsr #16 struct pbuf *q; u8_t swapped; acc = 0; swapped = 0; for(q = p; q != NULL; q = q->next) { 80329a4: 682d ldr r5, [r5, #0] 80329a6: 2d00 cmp r5, #0 80329a8: d1e9 bne.n 803297e swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); } } if (swapped) { 80329aa: b126 cbz r6, 80329b6 acc = SWAP_BYTES_IN_WORD(acc); 80329ac: 0623 lsls r3, r4, #24 80329ae: f3c4 2407 ubfx r4, r4, #8, #8 80329b2: ea44 4413 orr.w r4, r4, r3, lsr #16 } return (u16_t)~(acc & 0xffffUL); 80329b6: 43e0 mvns r0, r4 } 80329b8: b280 uxth r0, r0 80329ba: bd70 pop {r4, r5, r6, pc} 080329bc : { ip_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 80329bc: 1e43 subs r3, r0, #1 80329be: 3303 adds r3, #3 80329c0: d811 bhi.n 80329e6 (addr == IPADDR_ANY)) { return 1; /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 80329c2: f891 302d ldrb.w r3, [r1, #45] ; 0x2d 80329c6: f003 0302 and.w r3, r3, #2 80329ca: b2db uxtb r3, r3 80329cc: b16b cbz r3, 80329ea /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; /* address matches network interface address exactly? => no broadcast */ } else if (addr == ip4_addr_get_u32(&netif->ip_addr)) { 80329ce: 684a ldr r2, [r1, #4] 80329d0: 4290 cmp r0, r2 80329d2: d00a beq.n 80329ea return 0; /* on the same (sub) network... */ } else if (ip_addr_netcmp(&ipaddr, &(netif->ip_addr), &(netif->netmask)) 80329d4: 688b ldr r3, [r1, #8] 80329d6: 4042 eors r2, r0 80329d8: 421a tst r2, r3 80329da: d000 beq.n 80329de 80329dc: e005 b.n 80329ea /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(&netif->netmask)) == 80329de: 43db mvns r3, r3 80329e0: 4018 ands r0, r3 80329e2: 4298 cmp r0, r3 80329e4: d101 bne.n 80329ea ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || (addr == IPADDR_ANY)) { return 1; 80329e6: 2001 movs r0, #1 80329e8: 4770 bx lr /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; 80329ea: 2000 movs r0, #0 /* => network broadcast address */ return 1; } else { return 0; } } 80329ec: 4770 bx lr 080329ee : * @param addr pointer to which to save the ip address in network order * @return 1 if cp could be converted to addr, 0 on failure */ int ipaddr_aton(const char *cp, ip_addr_t *addr) { 80329ee: b5f0 push {r4, r5, r6, r7, lr} u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 80329f0: 7803 ldrb r3, [r0, #0] * @param addr pointer to which to save the ip address in network order * @return 1 if cp could be converted to addr, 0 on failure */ int ipaddr_aton(const char *cp, ip_addr_t *addr) { 80329f2: b085 sub sp, #20 80329f4: 460e mov r6, r1 u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 80329f6: 2400 movs r4, #0 * @param cp IP address in ascii represenation (e.g. "127.0.0.1") * @param addr pointer to which to save the ip address in network order * @return 1 if cp could be converted to addr, 0 on failure */ int ipaddr_aton(const char *cp, ip_addr_t *addr) 80329f8: aa00 add r2, sp, #0 80329fa: 18a7 adds r7, r4, r2 /* * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) 80329fc: f1a3 0230 sub.w r2, r3, #48 ; 0x30 8032a00: 2a09 cmp r2, #9 8032a02: d86d bhi.n 8032ae0 return (0); val = 0; base = 10; if (c == '0') { 8032a04: 2b30 cmp r3, #48 ; 0x30 8032a06: d10b bne.n 8032a20 c = *++cp; 8032a08: 7843 ldrb r3, [r0, #1] if (c == 'x' || c == 'X') { 8032a0a: 2b78 cmp r3, #120 ; 0x78 8032a0c: d004 beq.n 8032a18 8032a0e: 2b58 cmp r3, #88 ; 0x58 8032a10: d002 beq.n 8032a18 if (!isdigit(c)) return (0); val = 0; base = 10; if (c == '0') { c = *++cp; 8032a12: 3001 adds r0, #1 if (c == 'x' || c == 'X') { base = 16; c = *++cp; } else base = 8; 8032a14: 2508 movs r5, #8 8032a16: e004 b.n 8032a22 base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; c = *++cp; 8032a18: 7883 ldrb r3, [r0, #2] val = 0; base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8032a1a: 2510 movs r5, #16 c = *++cp; 8032a1c: 3002 adds r0, #2 8032a1e: e000 b.n 8032a22 * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); val = 0; base = 10; 8032a20: 250a movs r5, #10 8032a22: 4602 mov r2, r0 if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8032a24: 2000 movs r0, #0 8032a26: e000 b.n 8032a2a 8032a28: 3201 adds r2, #1 c = *++cp; } else base = 8; } for (;;) { if (isdigit(c)) { 8032a2a: f1a3 0130 sub.w r1, r3, #48 ; 0x30 8032a2e: 2909 cmp r1, #9 8032a30: d803 bhi.n 8032a3a val = (val * base) + (int)(c - '0'); 8032a32: fb05 3000 mla r0, r5, r0, r3 8032a36: 3830 subs r0, #48 ; 0x30 8032a38: e013 b.n 8032a62 c = *++cp; } else if (base == 16 && isxdigit(c)) { 8032a3a: 2d10 cmp r5, #16 8032a3c: d113 bne.n 8032a66 8032a3e: f1a3 0161 sub.w r1, r3, #97 ; 0x61 8032a42: b2c9 uxtb r1, r1 8032a44: 2905 cmp r1, #5 8032a46: d904 bls.n 8032a52 8032a48: f1a3 0c41 sub.w ip, r3, #65 ; 0x41 8032a4c: f1bc 0f05 cmp.w ip, #5 8032a50: d809 bhi.n 8032a66 val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A')); 8032a52: 330a adds r3, #10 8032a54: 2919 cmp r1, #25 8032a56: bf8c ite hi 8032a58: 2141 movhi r1, #65 ; 0x41 8032a5a: 2161 movls r1, #97 ; 0x61 8032a5c: 1a5b subs r3, r3, r1 8032a5e: ea43 1000 orr.w r0, r3, r0, lsl #4 c = *++cp; 8032a62: 7853 ldrb r3, [r2, #1] 8032a64: e7e0 b.n 8032a28 } else break; } if (c == '.') { 8032a66: 2b2e cmp r3, #46 ; 0x2e 8032a68: d107 bne.n 8032a7a * Internet format: * a.b.c.d * a.b.c (with c treated as 16 bits) * a.b (with b treated as 24 bits) */ if (pp >= parts + 3) { 8032a6a: 2c0c cmp r4, #12 8032a6c: d038 beq.n 8032ae0 return (0); } *pp++ = val; 8032a6e: f84d 0004 str.w r0, [sp, r4] c = *++cp; 8032a72: 7853 ldrb r3, [r2, #1] 8032a74: 1c50 adds r0, r2, #1 8032a76: 3404 adds r4, #4 } else break; } 8032a78: e7be b.n 80329f8 8032a7a: 2b0d cmp r3, #13 8032a7c: d803 bhi.n 8032a86 8032a7e: 2b09 cmp r3, #9 8032a80: d203 bcs.n 8032a8a 8032a82: b113 cbz r3, 8032a8a 8032a84: e02c b.n 8032ae0 8032a86: 2b20 cmp r3, #32 8032a88: d12a bne.n 8032ae0 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 8032a8a: 466b mov r3, sp 8032a8c: 1afb subs r3, r7, r3 8032a8e: 109b asrs r3, r3, #2 8032a90: 3301 adds r3, #1 8032a92: 2b04 cmp r3, #4 8032a94: d81f bhi.n 8032ad6 8032a96: e8df f003 tbb [pc, r3] 8032a9a: 1e23 .short 0x1e23 8032a9c: 0a03 .short 0x0a03 8032a9e: 13 .byte 0x13 8032a9f: 00 .byte 0x00 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 8032aa0: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 8032aa4: d21c bcs.n 8032ae0 return (0); } val |= parts[0] << 24; 8032aa6: 9b00 ldr r3, [sp, #0] 8032aa8: ea40 6003 orr.w r0, r0, r3, lsl #24 break; 8032aac: e013 b.n 8032ad6 case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 8032aae: f5b0 3f80 cmp.w r0, #65536 ; 0x10000 8032ab2: d215 bcs.n 8032ae0 return (0); } val |= (parts[0] << 24) | (parts[1] << 16); 8032ab4: 9b00 ldr r3, [sp, #0] 8032ab6: 061a lsls r2, r3, #24 8032ab8: 9b01 ldr r3, [sp, #4] 8032aba: ea42 4303 orr.w r3, r2, r3, lsl #16 8032abe: e009 b.n 8032ad4 break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 8032ac0: 28ff cmp r0, #255 ; 0xff 8032ac2: d80d bhi.n 8032ae0 return (0); } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 8032ac4: 9b00 ldr r3, [sp, #0] 8032ac6: 061a lsls r2, r3, #24 8032ac8: 9b01 ldr r3, [sp, #4] 8032aca: ea42 4203 orr.w r2, r2, r3, lsl #16 8032ace: 9b02 ldr r3, [sp, #8] 8032ad0: ea42 2303 orr.w r3, r2, r3, lsl #8 8032ad4: 4318 orrs r0, r3 break; default: LWIP_ASSERT("unhandled", 0); break; } if (addr) { 8032ad6: b12e cbz r6, 8032ae4 ip4_addr_set_u32(addr, htonl(val)); 8032ad8: f7fb ffa2 bl 802ea20 8032adc: 6030 str r0, [r6, #0] 8032ade: e001 b.n 8032ae4 * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); 8032ae0: 2000 movs r0, #0 8032ae2: e000 b.n 8032ae6 break; } if (addr) { ip4_addr_set_u32(addr, htonl(val)); } return (1); 8032ae4: 2001 movs r0, #1 } 8032ae6: b005 add sp, #20 8032ae8: bdf0 pop {r4, r5, r6, r7, pc} 08032aea : * @param cp IP address in ascii represenation (e.g. "127.0.0.1") * @return ip address in network order */ u32_t ipaddr_addr(const char *cp) { 8032aea: b507 push {r0, r1, r2, lr} ip_addr_t val; if (ipaddr_aton(cp, &val)) { 8032aec: a901 add r1, sp, #4 8032aee: f7ff ff7e bl 80329ee 8032af2: b108 cbz r0, 8032af8 return ip4_addr_get_u32(&val); 8032af4: 9801 ldr r0, [sp, #4] 8032af6: e001 b.n 8032afc } return (IPADDR_NONE); 8032af8: f04f 30ff mov.w r0, #4294967295 } 8032afc: bd0e pop {r1, r2, r3, pc} 08032afe : * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) { 8032afe: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} u8_t rem; u8_t n; u8_t i; int len = 0; s_addr = ip4_addr_get_u32(addr); 8032b02: 6803 ldr r3, [r0, #0] 8032b04: a802 add r0, sp, #8 * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 8032b06: f10d 0807 add.w r8, sp, #7 u8_t rem; u8_t n; u8_t i; int len = 0; s_addr = ip4_addr_get_u32(addr); 8032b0a: f840 3d04 str.w r3, [r0, #-4]! rp = buf; 8032b0e: 460c mov r4, r1 * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 8032b10: 3801 subs r0, #1 char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 8032b12: 2700 movs r7, #0 rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { i = 0; do { rem = *ap % (u8_t)10; 8032b14: f04f 0c0a mov.w ip, #10 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8032b18: f04f 092e mov.w r9, #46 ; 0x2e 8032b1c: 7843 ldrb r3, [r0, #1] * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 8032b1e: 2500 movs r5, #0 rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { i = 0; do { rem = *ap % (u8_t)10; 8032b20: fbb3 f6fc udiv r6, r3, ip *ap /= (u8_t)10; inv[i++] = '0' + rem; 8032b24: f10d 0b08 add.w fp, sp, #8 rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { i = 0; do { rem = *ap % (u8_t)10; 8032b28: fb0c 3a16 mls sl, ip, r6, r3 *ap /= (u8_t)10; inv[i++] = '0' + rem; 8032b2c: eb0b 0305 add.w r3, fp, r5 8032b30: f10a 0a30 add.w sl, sl, #48 ; 0x30 8032b34: 3501 adds r5, #1 8032b36: f803 ac08 strb.w sl, [r3, #-8] } while(*ap); 8032b3a: f016 03ff ands.w r3, r6, #255 ; 0xff for(n = 0; n < 4; n++) { i = 0; do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; 8032b3e: b2ed uxtb r5, r5 } while(*ap); 8032b40: d1ee bne.n 8032b20 8032b42: 3d01 subs r5, #1 * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 8032b44: 1be6 subs r6, r4, r7 8032b46: f800 3f01 strb.w r3, [r0, #1]! 8032b4a: b2ed uxtb r5, r5 8032b4c: 463b mov r3, r7 8032b4e: 4637 mov r7, r6 8032b50: e00b b.n 8032b6a 8032b52: 1e6c subs r4, r5, #1 rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { if (len++ >= buflen) { 8032b54: 4293 cmp r3, r2 8032b56: b2e4 uxtb r4, r4 8032b58: da16 bge.n 8032b88 return NULL; } *rp++ = inv[i]; 8032b5a: f10d 0a08 add.w sl, sp, #8 8032b5e: 4455 add r5, sl 8032b60: f815 5c08 ldrb.w r5, [r5, #-8] 8032b64: 54fd strb r5, [r7, r3] 8032b66: 3301 adds r3, #1 8032b68: 4625 mov r5, r4 do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { 8032b6a: 2dff cmp r5, #255 ; 0xff * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 8032b6c: eb06 0403 add.w r4, r6, r3 do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { 8032b70: d1ef bne.n 8032b52 if (len++ >= buflen) { return NULL; } *rp++ = inv[i]; } if (len++ >= buflen) { 8032b72: 1c5f adds r7, r3, #1 8032b74: 4293 cmp r3, r2 8032b76: da07 bge.n 8032b88 s_addr = ip4_addr_get_u32(addr); rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { 8032b78: 4540 cmp r0, r8 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8032b7a: f804 9b01 strb.w r9, [r4], #1 s_addr = ip4_addr_get_u32(addr); rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { 8032b7e: d1cd bne.n 8032b1c return NULL; } *rp++ = '.'; ap++; } *--rp = 0; 8032b80: 2300 movs r3, #0 8032b82: f804 3c01 strb.w r3, [r4, #-1] 8032b86: e000 b.n 8032b8a *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { if (len++ >= buflen) { return NULL; 8032b88: 2100 movs r1, #0 *rp++ = '.'; ap++; } *--rp = 0; return buf; } 8032b8a: 4608 mov r0, r1 8032b8c: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08032b90 : */ char * ipaddr_ntoa(const ip_addr_t *addr) { static char str[16]; return ipaddr_ntoa_r(addr, str, 16); 8032b90: 4901 ldr r1, [pc, #4] ; (8032b98 ) 8032b92: 2210 movs r2, #16 8032b94: f7ff bfb3 b.w 8032afe 8032b98: 2000c468 .word 0x2000c468 08032b9c : return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032b9c: 4b0f ldr r3, [pc, #60] ; (8032bdc ) * @param dest the destination IP address for which to find the route * @return the netif on which to send to reach dest */ struct netif * ip_route(ip_addr_t *dest) { 8032b9e: b510 push {r4, lr} return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032ba0: 681c ldr r4, [r3, #0] 8032ba2: e00a b.n 8032bba /* network mask matches? */ if (netif_is_up(netif)) { 8032ba4: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8032ba8: 07d9 lsls r1, r3, #31 8032baa: d505 bpl.n 8032bb8 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) { 8032bac: 6803 ldr r3, [r0, #0] 8032bae: 6862 ldr r2, [r4, #4] 8032bb0: 405a eors r2, r3 8032bb2: 68a3 ldr r3, [r4, #8] 8032bb4: 421a tst r2, r3 8032bb6: d00e beq.n 8032bd6 return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8032bb8: 6824 ldr r4, [r4, #0] 8032bba: 2c00 cmp r4, #0 8032bbc: d1f2 bne.n 8032ba4 /* return netif on which to forward IP packet */ return netif; } } } if ((netif_default == NULL) || (!netif_is_up(netif_default))) { 8032bbe: 4b08 ldr r3, [pc, #32] ; (8032be0 ) 8032bc0: 681b ldr r3, [r3, #0] 8032bc2: b12b cbz r3, 8032bd0 8032bc4: f893 202d ldrb.w r2, [r3, #45] ; 0x2d 8032bc8: 07d2 lsls r2, r2, #31 8032bca: bf48 it mi 8032bcc: 461c movmi r4, r3 8032bce: d402 bmi.n 8032bd6 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); snmp_inc_ipoutnoroutes(); 8032bd0: f001 fcd8 bl 8034584 return NULL; 8032bd4: e7ff b.n 8032bd6 } /* no matching netif found, use default netif */ return netif_default; } 8032bd6: 4620 mov r0, r4 8032bd8: bd10 pop {r4, pc} 8032bda: bf00 nop 8032bdc: 2000ff14 .word 0x2000ff14 8032be0: 2000ff18 .word 0x2000ff18 08032be4 : * @return ERR_OK if the packet was processed (could return ERR_* if it wasn't * processed, but currently always returns ERR_OK) */ err_t ip_input(struct pbuf *p, struct netif *inp) { 8032be4: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8032be8: 4604 mov r4, r0 8032bea: 460f mov r7, r1 #if IP_ACCEPT_LINK_LAYER_ADDRESSING int check_ip_src=1; #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ IP_STATS_INC(ip.recv); snmp_inc_ipinreceives(); 8032bec: f001 fc8a bl 8034504 /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 8032bf0: 6866 ldr r6, [r4, #4] if (IPH_V(iphdr) != 4) { 8032bf2: f896 8000 ldrb.w r8, [r6] 8032bf6: ea4f 1318 mov.w r3, r8, lsr #4 8032bfa: 2b04 cmp r3, #4 8032bfc: d005 beq.n 8032c0a LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IP packet dropped due to bad version number %"U16_F"\n", IPH_V(iphdr))); ip_debug_print(p); pbuf_free(p); 8032bfe: 4620 mov r0, r4 8032c00: f7fd f842 bl 802fc88 IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); snmp_inc_ipinhdrerrors(); 8032c04: f001 fc86 bl 8034514 return ERR_OK; 8032c08: e0be b.n 8032d88 /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); /* calculate IP header length in bytes */ iphdr_hlen *= 4; /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); 8032c0a: 8870 ldrh r0, [r6, #2] 8032c0c: f7fb ff03 bl 802ea16 return ERR_OK; } #endif /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); 8032c10: f008 080f and.w r8, r8, #15 iphdr_hlen *= 4; /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) { 8032c14: 8963 ldrh r3, [r4, #10] #endif /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); /* calculate IP header length in bytes */ iphdr_hlen *= 4; 8032c16: ea4f 0888 mov.w r8, r8, lsl #2 /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) { 8032c1a: 4543 cmp r3, r8 /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); /* calculate IP header length in bytes */ iphdr_hlen *= 4; /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); 8032c1c: 4601 mov r1, r0 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", iphdr_len, p->tot_len)); } /* free (drop) packet pbufs */ pbuf_free(p); 8032c1e: 4620 mov r0, r4 iphdr_hlen *= 4; /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) { 8032c20: d302 bcc.n 8032c28 8032c22: 8923 ldrh r3, [r4, #8] 8032c24: 428b cmp r3, r1 8032c26: d202 bcs.n 8032c2e LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", iphdr_len, p->tot_len)); } /* free (drop) packet pbufs */ pbuf_free(p); 8032c28: f7fd f82e bl 802fc88 8032c2c: e045 b.n 8032cba } #endif /* Trim pbuf. This should have been done at the netif layer, * but we'll do it anyway just to be sure that its done. */ pbuf_realloc(p, iphdr_len); 8032c2e: f7fd f852 bl 802fcd6 /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy(current_iphdr_dest, iphdr->dest); 8032c32: 6932 ldr r2, [r6, #16] 8032c34: 4b56 ldr r3, [pc, #344] ; (8032d90 ) } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 8032c36: f8df b168 ldr.w fp, [pc, #360] ; 8032da0 /* Trim pbuf. This should have been done at the netif layer, * but we'll do it anyway just to be sure that its done. */ pbuf_realloc(p, iphdr_len); /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy(current_iphdr_dest, iphdr->dest); 8032c3a: 601a str r2, [r3, #0] ip_addr_copy(current_iphdr_src, iphdr->src); 8032c3c: 68f1 ldr r1, [r6, #12] 8032c3e: 4a55 ldr r2, [pc, #340] ; (8032d94 ) 8032c40: 463d mov r5, r7 8032c42: 6011 str r1, [r2, #0] #endif /* LWIP_IGMP */ { /* start trying with inp. if that's not acceptable, start walking the list of configured netifs. 'first' is used as a boolean to mark whether we started walking the list */ int first = 1; 8032c44: f04f 0901 mov.w r9, #1 ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(&netif->netmask))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) { /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 8032c48: 469a mov sl, r3 ip4_addr_get_u32(&iphdr->dest) & ip4_addr_get_u32(&netif->netmask), ip4_addr_get_u32(&netif->ip_addr) & ip4_addr_get_u32(&netif->netmask), ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(&netif->netmask))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) { 8032c4a: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8032c4e: 07d8 lsls r0, r3, #31 8032c50: d403 bmi.n 8032c5a /* break out of for loop */ break; } #endif /* LWIP_AUTOIP */ } if (first) { 8032c52: f1b9 0f00 cmp.w r9, #0 8032c56: d10e bne.n 8032c76 8032c58: e010 b.n 8032c7c ip4_addr_get_u32(&iphdr->dest) & ip4_addr_get_u32(&netif->netmask), ip4_addr_get_u32(&netif->ip_addr) & ip4_addr_get_u32(&netif->netmask), ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(&netif->netmask))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) { 8032c5a: 686b ldr r3, [r5, #4] 8032c5c: 2b00 cmp r3, #0 8032c5e: d0f8 beq.n 8032c52 /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 8032c60: f8da 0000 ldr.w r0, [sl] 8032c64: 4298 cmp r0, r3 8032c66: f000 8088 beq.w 8032d7a /* or broadcast on this interface network address? */ ip_addr_isbroadcast(¤t_iphdr_dest, netif)) { 8032c6a: 4629 mov r1, r5 8032c6c: f7ff fea6 bl 80329bc ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(&netif->netmask))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) { /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 8032c70: 2800 cmp r0, #0 8032c72: d0ee beq.n 8032c52 8032c74: e081 b.n 8032d7a } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 8032c76: f8db 5000 ldr.w r5, [fp] 8032c7a: e000 b.n 8032c7e } else { netif = netif->next; 8032c7c: 682d ldr r5, [r5, #0] } if (netif == inp) { 8032c7e: 42bd cmp r5, r7 netif = netif->next; 8032c80: bf08 it eq 8032c82: 682d ldreq r5, [r5, #0] 8032c84: f04f 0900 mov.w r9, #0 } } while(netif != NULL); 8032c88: 2d00 cmp r5, #0 8032c8a: d1de bne.n 8032c4a 8032c8c: e072 b.n 8032d74 /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip_input: UDP packet to DHCP client port %"U16_F"\n", ntohs(udphdr->dest))); if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { 8032c8e: eb06 0308 add.w r3, r6, r8 8032c92: 885b ldrh r3, [r3, #2] 8032c94: f5b3 4f88 cmp.w r3, #17408 ; 0x4400 8032c98: d16f bne.n 8032d7a 8032c9a: e011 b.n 8032cc0 /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ #if IP_ACCEPT_LINK_LAYER_ADDRESSING /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ if (check_ip_src && !ip_addr_isany(¤t_iphdr_src)) #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ { if ((ip_addr_isbroadcast(¤t_iphdr_src, inp)) || 8032c9c: 4639 mov r1, r7 8032c9e: f7ff fe8d bl 80329bc 8032ca2: b928 cbnz r0, 8032cb0 (ip_addr_ismulticast(¤t_iphdr_src))) { 8032ca4: f8d8 3000 ldr.w r3, [r8] 8032ca8: f003 03f0 and.w r3, r3, #240 ; 0xf0 /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ #if IP_ACCEPT_LINK_LAYER_ADDRESSING /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ if (check_ip_src && !ip_addr_isany(¤t_iphdr_src)) #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ { if ((ip_addr_isbroadcast(¤t_iphdr_src, inp)) || 8032cac: 2be0 cmp r3, #224 ; 0xe0 8032cae: d108 bne.n 8032cc2 (ip_addr_ismulticast(¤t_iphdr_src))) { /* packet source is not valid */ LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip_input: packet source is not valid.\n")); /* free (drop) packet pbufs */ pbuf_free(p); 8032cb0: 4620 mov r0, r4 8032cb2: f7fc ffe9 bl 802fc88 IP_STATS_INC(ip.drop); snmp_inc_ipinaddrerrors(); 8032cb6: f001 fc35 bl 8034524 snmp_inc_ipindiscards(); 8032cba: f001 fc43 bl 8034544 return ERR_OK; 8032cbe: e063 b.n 8032d88 /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip_input: UDP packet to DHCP client port %"U16_F"\n", ntohs(udphdr->dest))); if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { 8032cc0: 463d mov r5, r7 return ERR_OK; } } /* packet not for us? */ if (netif == NULL) { 8032cc2: b93d cbnz r5, 8032cd4 /* try to forward IP packet on (other) interfaces */ ip_forward(p, iphdr, inp); } else #endif /* IP_FORWARD */ { snmp_inc_ipinaddrerrors(); 8032cc4: f001 fc2e bl 8034524 snmp_inc_ipindiscards(); 8032cc8: f001 fc3c bl 8034544 } pbuf_free(p); 8032ccc: 4620 mov r0, r4 8032cce: f7fc ffdb bl 802fc88 return ERR_OK; 8032cd2: e059 b.n 8032d88 } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 8032cd4: 88f3 ldrh r3, [r6, #6] 8032cd6: f023 03c0 bic.w r3, r3, #192 ; 0xc0 8032cda: b29b uxth r3, r3 8032cdc: b12b cbz r3, 8032cea if (p == NULL) { return ERR_OK; } iphdr = (struct ip_hdr *)p->payload; #else /* IP_REASSEMBLY == 0, no packet fragment reassembly code present */ pbuf_free(p); 8032cde: 4620 mov r0, r4 8032ce0: f7fc ffd2 bl 802fc88 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since it was fragmented (0x%"X16_F") (while IP_REASSEMBLY == 0).\n", ntohs(IPH_OFFSET(iphdr)))); IP_STATS_INC(ip.opterr); IP_STATS_INC(ip.drop); /* unsupported protocol feature */ snmp_inc_ipinunknownprotos(); 8032ce4: f001 fc26 bl 8034534 return ERR_OK; 8032ce8: e04e b.n 8032d88 /* send to upper layers */ LWIP_DEBUGF(IP_DEBUG, ("ip_input: \n")); ip_debug_print(p); LWIP_DEBUGF(IP_DEBUG, ("ip_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); current_netif = inp; 8032cea: 4b2b ldr r3, [pc, #172] ; (8032d98 ) 8032cec: 601f str r7, [r3, #0] current_header = iphdr; 8032cee: 4b2b ldr r3, [pc, #172] ; (8032d9c ) #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 8032cf0: 4620 mov r0, r4 8032cf2: 4639 mov r1, r7 LWIP_DEBUGF(IP_DEBUG, ("ip_input: \n")); ip_debug_print(p); LWIP_DEBUGF(IP_DEBUG, ("ip_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); current_netif = inp; current_header = iphdr; 8032cf4: 601e str r6, [r3, #0] #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 8032cf6: f7fd f947 bl 802ff88 8032cfa: bb88 cbnz r0, 8032d60 #endif /* LWIP_RAW */ { switch (IPH_PROTO(iphdr)) { 8032cfc: 7a73 ldrb r3, [r6, #9] 8032cfe: 2b06 cmp r3, #6 8032d00: d00b beq.n 8032d1a 8032d02: 2b11 cmp r3, #17 8032d04: d002 beq.n 8032d0c 8032d06: 2b01 cmp r3, #1 8032d08: d115 bne.n 8032d36 8032d0a: e00d b.n 8032d28 #if LWIP_UDP case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ snmp_inc_ipindelivers(); 8032d0c: f001 fc22 bl 8034554 udp_input(p, inp); 8032d10: 4620 mov r0, r4 8032d12: 4639 mov r1, r7 8032d14: f7ff fb44 bl 80323a0 break; 8032d18: e022 b.n 8032d60 #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: snmp_inc_ipindelivers(); 8032d1a: f001 fc1b bl 8034554 tcp_input(p, inp); 8032d1e: 4620 mov r0, r4 8032d20: 4639 mov r1, r7 8032d22: f7fe f8e7 bl 8030ef4 break; 8032d26: e01b b.n 8032d60 #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: snmp_inc_ipindelivers(); 8032d28: f001 fc14 bl 8034554 icmp_input(p, inp); 8032d2c: 4620 mov r0, r4 8032d2e: 4639 mov r1, r7 8032d30: f7ff fd20 bl 8032774 break; 8032d34: e014 b.n 8032d60 break; #endif /* LWIP_IGMP */ default: #if LWIP_ICMP /* send ICMP destination protocol unreachable unless is was a broadcast */ if (!ip_addr_isbroadcast(¤t_iphdr_dest, inp) && 8032d36: 4d16 ldr r5, [pc, #88] ; (8032d90 ) 8032d38: 4639 mov r1, r7 8032d3a: 6828 ldr r0, [r5, #0] 8032d3c: f7ff fe3e bl 80329bc 8032d40: b948 cbnz r0, 8032d56 !ip_addr_ismulticast(¤t_iphdr_dest)) { 8032d42: 682b ldr r3, [r5, #0] 8032d44: f003 03f0 and.w r3, r3, #240 ; 0xf0 break; #endif /* LWIP_IGMP */ default: #if LWIP_ICMP /* send ICMP destination protocol unreachable unless is was a broadcast */ if (!ip_addr_isbroadcast(¤t_iphdr_dest, inp) && 8032d48: 2be0 cmp r3, #224 ; 0xe0 8032d4a: d004 beq.n 8032d56 !ip_addr_ismulticast(¤t_iphdr_dest)) { p->payload = iphdr; 8032d4c: 6066 str r6, [r4, #4] icmp_dest_unreach(p, ICMP_DUR_PROTO); 8032d4e: 4620 mov r0, r4 8032d50: 2102 movs r1, #2 8032d52: f7ff fda5 bl 80328a0 } #endif /* LWIP_ICMP */ pbuf_free(p); 8032d56: 4620 mov r0, r4 8032d58: f7fc ff96 bl 802fc88 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Unsupported transport protocol %"U16_F"\n", IPH_PROTO(iphdr))); IP_STATS_INC(ip.proterr); IP_STATS_INC(ip.drop); snmp_inc_ipinunknownprotos(); 8032d5c: f001 fbea bl 8034534 } } current_netif = NULL; 8032d60: 4a0d ldr r2, [pc, #52] ; (8032d98 ) 8032d62: 2300 movs r3, #0 8032d64: 6013 str r3, [r2, #0] current_header = NULL; 8032d66: 4a0d ldr r2, [pc, #52] ; (8032d9c ) 8032d68: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_src); 8032d6a: 4a0a ldr r2, [pc, #40] ; (8032d94 ) 8032d6c: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_dest); 8032d6e: 4a08 ldr r2, [pc, #32] ; (8032d90 ) 8032d70: 6013 str r3, [r2, #0] return ERR_OK; 8032d72: e009 b.n 8032d88 * * #define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345)) */ if (netif == NULL) { /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { 8032d74: 7a73 ldrb r3, [r6, #9] 8032d76: 2b11 cmp r3, #17 8032d78: d089 beq.n 8032c8e #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ #if IP_ACCEPT_LINK_LAYER_ADDRESSING /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ if (check_ip_src && !ip_addr_isany(¤t_iphdr_src)) 8032d7a: f8df 8018 ldr.w r8, [pc, #24] ; 8032d94 8032d7e: f8d8 0000 ldr.w r0, [r8] 8032d82: 2800 cmp r0, #0 8032d84: d09d beq.n 8032cc2 8032d86: e789 b.n 8032c9c current_header = NULL; ip_addr_set_any(¤t_iphdr_src); ip_addr_set_any(¤t_iphdr_dest); return ERR_OK; } 8032d88: 2000 movs r0, #0 8032d8a: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8032d8e: bf00 nop 8032d90: 2000ff48 .word 0x2000ff48 8032d94: 2000ff40 .word 0x2000ff40 8032d98: 2000ff44 .word 0x2000ff44 8032d9c: 2000ff4c .word 0x2000ff4c 8032da0: 2000ff14 .word 0x2000ff14 08032da4 : */ err_t ip_output_if(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif) { 8032da4: e92d 47f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr} 8032da8: 4615 mov r5, r2 8032daa: 4606 mov r6, r0 8032dac: 4689 mov r9, r1 8032dae: 469a mov sl, r3 8032db0: 9f0c ldr r7, [sp, #48] ; 0x30 /* pbufs passed to IP must have a ref-count of 1 as their payload pointer gets altered as the packet is passed down the stack */ LWIP_ASSERT("p->ref == 1", p->ref == 1); snmp_inc_ipoutrequests(); 8032db2: f001 fbd7 bl 8034564 /* Should the IP header be generated or is it already included in p? */ if (dest != IP_HDRINCL) { 8032db6: b3b5 cbz r5, 8032e26 } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_header(p, IP_HLEN)) { 8032db8: 4630 mov r0, r6 8032dba: 2114 movs r1, #20 8032dbc: f7fc ff39 bl 802fc32 8032dc0: 4680 mov r8, r0 8032dc2: b118 cbz r0, 8032dcc LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip_output: not enough room for IP header in pbuf\n")); IP_STATS_INC(ip.err); snmp_inc_ipoutdiscards(); 8032dc4: f001 fbd6 bl 8034574 return ERR_BUF; 8032dc8: 20fe movs r0, #254 ; 0xfe 8032dca: e036 b.n 8032e3a } iphdr = (struct ip_hdr *)p->payload; 8032dcc: 6874 ldr r4, [r6, #4] LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); IPH_PROTO_SET(iphdr, proto); 8032dce: f89d 302c ldrb.w r3, [sp, #44] ; 0x2c iphdr = (struct ip_hdr *)p->payload; LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); 8032dd2: f884 a008 strb.w sl, [r4, #8] IPH_PROTO_SET(iphdr, proto); 8032dd6: 7263 strb r3, [r4, #9] #if CHECKSUM_GEN_IP_INLINE chk_sum += LWIP_MAKE_U16(proto, ttl); #endif /* CHECKSUM_GEN_IP_INLINE */ /* dest cannot be NULL here */ ip_addr_copy(iphdr->dest, *dest); 8032dd8: 682b ldr r3, [r5, #0] 8032dda: 6123 str r3, [r4, #16] #if CHECKSUM_GEN_IP_INLINE chk_sum += ip4_addr_get_u32(&iphdr->dest) & 0xFFFF; chk_sum += ip4_addr_get_u32(&iphdr->dest) >> 16; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_VHL_SET(iphdr, 4, ip_hlen / 4); 8032ddc: 2345 movs r3, #69 ; 0x45 8032dde: 7023 strb r3, [r4, #0] IPH_TOS_SET(iphdr, tos); 8032de0: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8032de4: 7063 strb r3, [r4, #1] #if CHECKSUM_GEN_IP_INLINE chk_sum += LWIP_MAKE_U16(tos, iphdr->_v_hl); #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_LEN_SET(iphdr, htons(p->tot_len)); 8032de6: 8930 ldrh r0, [r6, #8] 8032de8: f7fb fe10 bl 802ea0c #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 8032dec: f884 8006 strb.w r8, [r4, #6] 8032df0: f884 8007 strb.w r8, [r4, #7] IPH_ID_SET(iphdr, htons(ip_id)); 8032df4: f8df 8048 ldr.w r8, [pc, #72] ; 8032e40 IPH_VHL_SET(iphdr, 4, ip_hlen / 4); IPH_TOS_SET(iphdr, tos); #if CHECKSUM_GEN_IP_INLINE chk_sum += LWIP_MAKE_U16(tos, iphdr->_v_hl); #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_LEN_SET(iphdr, htons(p->tot_len)); 8032df8: 8060 strh r0, [r4, #2] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); IPH_ID_SET(iphdr, htons(ip_id)); 8032dfa: f8b8 0000 ldrh.w r0, [r8] 8032dfe: f7fb fe05 bl 802ea0c 8032e02: 80a0 strh r0, [r4, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 8032e04: f8b8 3000 ldrh.w r3, [r8] 8032e08: 3301 adds r3, #1 8032e0a: f8a8 3000 strh.w r3, [r8] if (ip_addr_isany(src)) { 8032e0e: f1b9 0f00 cmp.w r9, #0 8032e12: d002 beq.n 8032e1a 8032e14: f8d9 3000 ldr.w r3, [r9] 8032e18: b903 cbnz r3, 8032e1c ip_addr_copy(iphdr->src, netif->ip_addr); 8032e1a: 687b ldr r3, [r7, #4] } else { /* src cannot be NULL here */ ip_addr_copy(iphdr->src, *src); 8032e1c: 60e3 str r3, [r4, #12] chk_sum = (chk_sum >> 16) + (chk_sum & 0xFFFF); chk_sum = (chk_sum >> 16) + chk_sum; chk_sum = ~chk_sum; iphdr->_chksum = chk_sum; /* network order */ #else /* CHECKSUM_GEN_IP_INLINE */ IPH_CHKSUM_SET(iphdr, 0); 8032e1e: 2300 movs r3, #0 8032e20: 72a3 strb r3, [r4, #10] 8032e22: 72e3 strb r3, [r4, #11] 8032e24: e004 b.n 8032e30 #endif #endif /* CHECKSUM_GEN_IP_INLINE */ } else { /* IP header already included in p */ iphdr = (struct ip_hdr *)p->payload; ip_addr_copy(dest_addr, iphdr->dest); 8032e26: 6873 ldr r3, [r6, #4] 8032e28: ad02 add r5, sp, #8 8032e2a: 691b ldr r3, [r3, #16] 8032e2c: f845 3d04 str.w r3, [r5, #-4]! return ip_frag(p, netif, dest); } #endif /* IP_FRAG */ LWIP_DEBUGF(IP_DEBUG, ("netif->output()")); return netif->output(netif, p, dest); 8032e30: 697b ldr r3, [r7, #20] 8032e32: 4638 mov r0, r7 8032e34: 4631 mov r1, r6 8032e36: 462a mov r2, r5 8032e38: 4798 blx r3 } 8032e3a: b240 sxtb r0, r0 8032e3c: e8bd 87fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} 8032e40: 2000c478 .word 0x2000c478 08032e44 : * see ip_output_if() for more return values */ err_t ip_output(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto) { 8032e44: b5f0 push {r4, r5, r6, r7, lr} 8032e46: 4605 mov r5, r0 8032e48: b085 sub sp, #20 /* pbufs passed to IP must have a ref-count of 1 as their payload pointer gets altered as the packet is passed down the stack */ LWIP_ASSERT("p->ref == 1", p->ref == 1); if ((netif = ip_route(dest)) == NULL) { 8032e4a: 4610 mov r0, r2 * see ip_output_if() for more return values */ err_t ip_output(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto) { 8032e4c: 460f mov r7, r1 8032e4e: 4614 mov r4, r2 8032e50: 461e mov r6, r3 /* pbufs passed to IP must have a ref-count of 1 as their payload pointer gets altered as the packet is passed down the stack */ LWIP_ASSERT("p->ref == 1", p->ref == 1); if ((netif = ip_route(dest)) == NULL) { 8032e52: f7ff fea3 bl 8032b9c 8032e56: b168 cbz r0, 8032e74 ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); return ERR_RTE; } return ip_output_if(p, src, dest, ttl, tos, proto, netif); 8032e58: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8032e5c: 9002 str r0, [sp, #8] 8032e5e: 9300 str r3, [sp, #0] 8032e60: f89d 302c ldrb.w r3, [sp, #44] ; 0x2c 8032e64: 4628 mov r0, r5 8032e66: 9301 str r3, [sp, #4] 8032e68: 4639 mov r1, r7 8032e6a: 4622 mov r2, r4 8032e6c: 4633 mov r3, r6 8032e6e: f7ff ff99 bl 8032da4 8032e72: e000 b.n 8032e76 if ((netif = ip_route(dest)) == NULL) { LWIP_DEBUGF(IP_DEBUG, ("ip_output: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); return ERR_RTE; 8032e74: 20fc movs r0, #252 ; 0xfc } return ip_output_if(p, src, dest, ttl, tos, proto, netif); } 8032e76: b240 sxtb r0, r0 8032e78: b005 add sp, #20 8032e7a: bdf0 pop {r4, r5, r6, r7, pc} 08032e7c : * @param type return ASN1 type * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_type(struct pbuf *p, u16_t ofs, u8_t *type) { 8032e7c: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032e7e: 2300 movs r3, #0 while (p != NULL) 8032e80: e00c b.n 8032e9c { base = plen; plen += p->len; 8032e82: 8944 ldrh r4, [r0, #10] 8032e84: 191c adds r4, r3, r4 8032e86: b2a4 uxth r4, r4 if (ofs < plen) 8032e88: 42a1 cmp r1, r4 8032e8a: d205 bcs.n 8032e98 { msg_ptr = (u8_t*)p->payload; 8032e8c: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 8032e8e: 1acb subs r3, r1, r3 *type = *msg_ptr; 8032e90: 5cc3 ldrb r3, [r0, r3] return ERR_OK; 8032e92: 2000 movs r0, #0 plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; *type = *msg_ptr; 8032e94: 7013 strb r3, [r2, #0] return ERR_OK; 8032e96: e004 b.n 8032ea2 } p = p->next; 8032e98: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032e9a: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032e9c: 2800 cmp r0, #0 8032e9e: d1f0 bne.n 8032e82 return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 8032ea0: 20f2 movs r0, #242 ; 0xf2 } 8032ea2: b240 sxtb r0, r0 8032ea4: bd10 pop {r4, pc} 08032ea6 : * @param length return host order length, upto 64k * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_length(struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length) { 8032ea6: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032ea8: 2500 movs r5, #0 while (p != NULL) 8032eaa: e079 b.n 8032fa0 { base = plen; plen += p->len; 8032eac: 8944 ldrh r4, [r0, #10] 8032eae: 192c adds r4, r5, r4 8032eb0: b2a4 uxth r4, r4 if (ofs < plen) 8032eb2: 42a1 cmp r1, r4 8032eb4: d272 bcs.n 8032f9c { msg_ptr = (u8_t*)p->payload; 8032eb6: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; 8032eba: 1b4f subs r7, r1, r5 8032ebc: eb0c 0507 add.w r5, ip, r7 if (*msg_ptr < 0x80) 8032ec0: f81c 6007 ldrb.w r6, [ip, r7] 8032ec4: f016 0f80 tst.w r6, #128 ; 0x80 8032ec8: d105 bne.n 8032ed6 { /* primitive definite length format */ *octets_used = 1; 8032eca: 2101 movs r1, #1 8032ecc: 7011 strb r1, [r2, #0] *length = *msg_ptr; 8032ece: f81c 2007 ldrb.w r2, [ip, r7] 8032ed2: 801a strh r2, [r3, #0] 8032ed4: e05a b.n 8032f8c return ERR_OK; } else if (*msg_ptr == 0x80) 8032ed6: 2e80 cmp r6, #128 ; 0x80 8032ed8: d12a bne.n 8032f30 { /* constructed indefinite length format, termination with two zero octets */ u8_t zeros; u8_t i; *length = 0; 8032eda: 2600 movs r6, #0 8032edc: 801e strh r6, [r3, #0] 8032ede: e022 b.n 8032f26 { i = 2; while (i > 0) { i--; (*length) += 1; 8032ee0: f8b3 c000 ldrh.w ip, [r3] ofs += 1; 8032ee4: 3101 adds r1, #1 8032ee6: b289 uxth r1, r1 { i = 2; while (i > 0) { i--; (*length) += 1; 8032ee8: f10c 0c01 add.w ip, ip, #1 ofs += 1; if (ofs >= plen) 8032eec: 42a1 cmp r1, r4 { i = 2; while (i > 0) { i--; (*length) += 1; 8032eee: f8a3 c000 strh.w ip, [r3] ofs += 1; if (ofs >= plen) 8032ef2: d308 bcc.n 8032f06 { /* next octet in next pbuf */ p = p->next; 8032ef4: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032ef6: b900 cbnz r0, 8032efa 8032ef8: e04e b.n 8032f98 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032efa: f8b0 c00a ldrh.w ip, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 8032efe: 6845 ldr r5, [r0, #4] plen += p->len; 8032f00: 4464 add r4, ip 8032f02: b2a4 uxth r4, r4 8032f04: e000 b.n 8032f08 } else { /* next octet in same pbuf */ msg_ptr++; 8032f06: 3501 adds r5, #1 } if (*msg_ptr == 0) 8032f08: f895 c000 ldrb.w ip, [r5] 8032f0c: f1bc 0f00 cmp.w ip, #0 8032f10: d104 bne.n 8032f1c { zeros++; 8032f12: 3601 adds r6, #1 8032f14: b2f6 uxtb r6, r6 if (zeros == 2) 8032f16: 2e02 cmp r6, #2 8032f18: d101 bne.n 8032f1e 8032f1a: e007 b.n 8032f2c i = 0; } } else { zeros = 0; 8032f1c: 2600 movs r6, #0 *length = 0; zeros = 0; while (zeros != 2) { i = 2; while (i > 0) 8032f1e: 42b9 cmp r1, r7 8032f20: d1de bne.n 8032ee0 u8_t zeros; u8_t i; *length = 0; zeros = 0; while (zeros != 2) 8032f22: 2e02 cmp r6, #2 8032f24: d002 beq.n 8032f2c * @param octets_used returns number of octets used by the length code * @param length return host order length, upto 64k * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_length(struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length) 8032f26: 1c8f adds r7, r1, #2 8032f28: b2bf uxth r7, r7 8032f2a: e7d9 b.n 8032ee0 { zeros = 0; } } } *octets_used = 1; 8032f2c: 2301 movs r3, #1 8032f2e: e02c b.n 8032f8a return ERR_OK; } else if (*msg_ptr == 0x81) 8032f30: 2e81 cmp r6, #129 ; 0x81 8032f32: d10c bne.n 8032f4e { /* constructed definite length format, one octet */ ofs += 1; 8032f34: 3101 adds r1, #1 if (ofs >= plen) 8032f36: b289 uxth r1, r1 8032f38: 42a1 cmp r1, r4 8032f3a: d303 bcc.n 8032f44 { /* next octet in next pbuf */ p = p->next; 8032f3c: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032f3e: b359 cbz r1, 8032f98 msg_ptr = (u8_t*)p->payload; 8032f40: 684d ldr r5, [r1, #4] 8032f42: e000 b.n 8032f46 } else { /* next octet in same pbuf */ msg_ptr++; 8032f44: 3501 adds r5, #1 } *length = *msg_ptr; 8032f46: 7829 ldrb r1, [r5, #0] 8032f48: 8019 strh r1, [r3, #0] *octets_used = 2; 8032f4a: 2302 movs r3, #2 8032f4c: e01d b.n 8032f8a return ERR_OK; } else if (*msg_ptr == 0x82) 8032f4e: 2e82 cmp r6, #130 ; 0x82 8032f50: d11e bne.n 8032f90 /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 8032f52: 1c4e adds r6, r1, #1 if (ofs >= plen) 8032f54: b2b6 uxth r6, r6 8032f56: 42a6 cmp r6, r4 8032f58: d201 bcs.n 8032f5e plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8032f5a: 3501 adds r5, #1 8032f5c: e005 b.n 8032f6a i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8032f5e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032f60: b1d0 cbz r0, 8032f98 msg_ptr = (u8_t*)p->payload; plen += p->len; 8032f62: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 8032f64: 6845 ldr r5, [r0, #4] plen += p->len; 8032f66: 19a4 adds r4, r4, r6 8032f68: b2a4 uxth r4, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8032f6a: 782e ldrb r6, [r5, #0] /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 8032f6c: 3102 adds r1, #2 if (ofs >= plen) 8032f6e: b289 uxth r1, r1 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8032f70: 0236 lsls r6, r6, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8032f72: 42a1 cmp r1, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8032f74: 801e strh r6, [r3, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8032f76: d201 bcs.n 8032f7c plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8032f78: 3501 adds r5, #1 8032f7a: e002 b.n 8032f82 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8032f7c: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032f7e: b159 cbz r1, 8032f98 msg_ptr = (u8_t*)p->payload; 8032f80: 684d ldr r5, [r1, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *length |= *msg_ptr; 8032f82: 7829 ldrb r1, [r5, #0] 8032f84: 430e orrs r6, r1 8032f86: 801e strh r6, [r3, #0] { /* most significant length octet */ *length = (*msg_ptr) << 8; } } *octets_used = 3; 8032f88: 2303 movs r3, #3 8032f8a: 7013 strb r3, [r2, #0] return ERR_OK; 8032f8c: 2000 movs r0, #0 8032f8e: e00a b.n 8032fa6 } else { /* constructed definite length format 3..127 octets, this is too big (>64k) */ /** @todo: do we need to accept inefficient codings with many leading zero's? */ *octets_used = 1 + ((*msg_ptr) & 0x7f); 8032f90: f006 067f and.w r6, r6, #127 ; 0x7f 8032f94: 3601 adds r6, #1 8032f96: 7016 strb r6, [r2, #0] return ERR_ARG; 8032f98: 20f2 movs r0, #242 ; 0xf2 8032f9a: e004 b.n 8032fa6 } } p = p->next; 8032f9c: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8032f9e: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8032fa0: 2800 cmp r0, #0 8032fa2: d183 bne.n 8032eac 8032fa4: e7f8 b.n 8032f98 p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8032fa6: b240 sxtb r0, r0 8032fa8: bdf0 pop {r4, r5, r6, r7, pc} 08032faa : * as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value * of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!! */ err_t snmp_asn1_dec_u32t(struct pbuf *p, u16_t ofs, u16_t len, u32_t *value) { 8032faa: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8032fae: 2500 movs r5, #0 while (p != NULL) 8032fb0: e049 b.n 8033046 { base = plen; plen += p->len; 8032fb2: 8944 ldrh r4, [r0, #10] 8032fb4: 192c adds r4, r5, r4 8032fb6: b2a4 uxth r4, r4 if (ofs < plen) 8032fb8: 42a1 cmp r1, r4 8032fba: d242 bcs.n 8033042 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 8032fbc: 1e56 subs r6, r2, #1 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 8032fbe: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 8032fc2: b2b6 uxth r6, r6 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032fc4: 1b4f subs r7, r1, r5 if ((len > 0) && (len < 6)) 8032fc6: 2e04 cmp r6, #4 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8032fc8: eb0c 0507 add.w r5, ip, r7 if ((len > 0) && (len < 6)) 8032fcc: d901 bls.n 8032fd2 *value |= *msg_ptr; return ERR_OK; } else { return ERR_ARG; 8032fce: 20f2 movs r0, #242 ; 0xf2 8032fd0: e03c b.n 803304c msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) { /* start from zero */ *value = 0; 8032fd2: f04f 0800 mov.w r8, #0 8032fd6: f8c3 8000 str.w r8, [r3] if (*msg_ptr & 0x80) 8032fda: f81c 7007 ldrb.w r7, [ip, r7] 8032fde: f017 0f80 tst.w r7, #128 ; 0x80 8032fe2: d1f4 bne.n 8032fce return ERR_ARG; } else { /* positive */ if ((len > 1) && (*msg_ptr == 0)) 8032fe4: 2a01 cmp r2, #1 8032fe6: d00e beq.n 8033006 8032fe8: b96f cbnz r7, 8033006 { /* skip leading "sign byte" octet 0x00 */ len--; ofs += 1; 8032fea: 3101 adds r1, #1 8032fec: b289 uxth r1, r1 if (ofs >= plen) 8032fee: 42a1 cmp r1, r4 { /* positive */ if ((len > 1) && (*msg_ptr == 0)) { /* skip leading "sign byte" octet 0x00 */ len--; 8032ff0: 4632 mov r2, r6 ofs += 1; if (ofs >= plen) 8032ff2: d307 bcc.n 8033004 { /* next octet in next pbuf */ p = p->next; 8032ff4: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8032ff6: 2800 cmp r0, #0 8032ff8: d0e9 beq.n 8032fce msg_ptr = (u8_t*)p->payload; plen += p->len; 8032ffa: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 8032ffc: 6845 ldr r5, [r0, #4] plen += p->len; 8032ffe: 19a4 adds r4, r4, r6 8033000: b2a4 uxth r4, r4 8033002: e000 b.n 8033006 } else { /* next octet in same pbuf */ msg_ptr++; 8033004: 3501 adds r5, #1 8033006: 1c4e adds r6, r1, #1 * @note ASN coded integers are _always_ signed. E.g. +0xFFFF is coded * as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value * of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!! */ err_t snmp_asn1_dec_u32t(struct pbuf *p, u16_t ofs, u16_t len, u32_t *value) 8033008: 188a adds r2, r1, r2 803300a: b2b6 uxth r6, r6 803300c: b292 uxth r2, r2 803300e: e010 b.n 8033032 } /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; 8033010: 7829 ldrb r1, [r5, #0] 8033012: 430f orrs r7, r1 *value <<= 8; 8033014: 023f lsls r7, r7, #8 ofs += 1; if (ofs >= plen) 8033016: 42a6 cmp r6, r4 /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; *value <<= 8; 8033018: 601f str r7, [r3, #0] ofs += 1; if (ofs >= plen) 803301a: d307 bcc.n 803302c { /* next octet in next pbuf */ p = p->next; 803301c: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803301e: 2800 cmp r0, #0 8033020: d0d5 beq.n 8032fce msg_ptr = (u8_t*)p->payload; plen += p->len; 8033022: 8941 ldrh r1, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 8033024: 6845 ldr r5, [r0, #4] plen += p->len; 8033026: 1864 adds r4, r4, r1 8033028: b2a4 uxth r4, r4 803302a: e000 b.n 803302e } else { /* next octet in same pbuf */ msg_ptr++; 803302c: 3501 adds r5, #1 803302e: 3601 adds r6, #1 8033030: b2b6 uxth r6, r6 msg_ptr++; } } } /* OR octets with value */ while (len > 1) 8033032: 4296 cmp r6, r2 8033034: 681f ldr r7, [r3, #0] 8033036: d1eb bne.n 8033010 { /* next octet in same pbuf */ msg_ptr++; } } *value |= *msg_ptr; 8033038: 782a ldrb r2, [r5, #0] 803303a: 4317 orrs r7, r2 803303c: 601f str r7, [r3, #0] return ERR_OK; 803303e: 2000 movs r0, #0 8033040: e004 b.n 803304c else { return ERR_ARG; } } p = p->next; 8033042: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033044: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033046: 2800 cmp r0, #0 8033048: d1b3 bne.n 8032fb2 803304a: e7c0 b.n 8032fce } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 803304c: b240 sxtb r0, r0 803304e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 08033052 : * * @note ASN coded integers are _always_ signed! */ err_t snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value) { 8033052: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} #if BYTE_ORDER == BIG_ENDIAN u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; #endif u8_t sign; plen = 0; 8033056: 2500 movs r5, #0 while (p != NULL) 8033058: e04e b.n 80330f8 { base = plen; plen += p->len; 803305a: 8944 ldrh r4, [r0, #10] 803305c: 192c adds r4, r5, r4 803305e: b2a4 uxth r4, r4 if (ofs < plen) 8033060: 42a1 cmp r1, r4 8033062: d247 bcs.n 80330f4 { msg_ptr = (u8_t*)p->payload; 8033064: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 5)) 8033066: f102 3cff add.w ip, r2, #4294967295 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 803306a: 1b4e subs r6, r1, r5 if ((len > 0) && (len < 5)) 803306c: f1bc 0f03 cmp.w ip, #3 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033070: eb07 0506 add.w r5, r7, r6 if ((len > 0) && (len < 5)) 8033074: d901 bls.n 803307a } return ERR_OK; } else { return ERR_ARG; 8033076: 20f2 movs r0, #242 ; 0xf2 8033078: e041 b.n 80330fe { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 5)) { if (*msg_ptr & 0x80) 803307a: 57be ldrsb r6, [r7, r6] 803307c: 2e00 cmp r6, #0 803307e: da0b bge.n 8033098 { /* negative, start from -1 */ *value = -1; 8033080: f04f 36ff mov.w r6, #4294967295 8033084: 601e str r6, [r3, #0] sign = 1; 8033086: 2601 movs r6, #1 8033088: f101 0c01 add.w ip, r1, #1 * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode * * @note ASN coded integers are _always_ signed! */ err_t snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value) 803308c: 1852 adds r2, r2, r1 803308e: fa1f fc8c uxth.w ip, ip 8033092: b292 uxth r2, r2 len--; if (sign) { *lsb_ptr &= *msg_ptr; *value <<= 8; *lsb_ptr |= 255; 8033094: 21ff movs r1, #255 ; 0xff 8033096: e022 b.n 80330de sign = 1; } else { /* positive, start from 0 */ *value = 0; 8033098: 2600 movs r6, #0 803309a: 601e str r6, [r3, #0] 803309c: e7f4 b.n 8033088 803309e: f895 8000 ldrb.w r8, [r5] } /* OR/AND octets with value */ while (len > 1) { len--; if (sign) 80330a2: b13e cbz r6, 80330b4 { *lsb_ptr &= *msg_ptr; 80330a4: ea08 0707 and.w r7, r8, r7 80330a8: 701f strb r7, [r3, #0] *value <<= 8; 80330aa: 681f ldr r7, [r3, #0] 80330ac: 023f lsls r7, r7, #8 80330ae: 601f str r7, [r3, #0] *lsb_ptr |= 255; 80330b0: 7019 strb r1, [r3, #0] 80330b2: e005 b.n 80330c0 } else { *lsb_ptr |= *msg_ptr; 80330b4: ea48 0707 orr.w r7, r8, r7 80330b8: 701f strb r7, [r3, #0] *value <<= 8; 80330ba: 681f ldr r7, [r3, #0] 80330bc: 023f lsls r7, r7, #8 80330be: 601f str r7, [r3, #0] } ofs += 1; if (ofs >= plen) 80330c0: 45a4 cmp ip, r4 80330c2: d307 bcc.n 80330d4 { /* next octet in next pbuf */ p = p->next; 80330c4: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80330c6: 2800 cmp r0, #0 80330c8: d0d5 beq.n 8033076 msg_ptr = (u8_t*)p->payload; plen += p->len; 80330ca: 8947 ldrh r7, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 80330cc: 6845 ldr r5, [r0, #4] plen += p->len; 80330ce: 19e4 adds r4, r4, r7 80330d0: b2a4 uxth r4, r4 80330d2: e000 b.n 80330d6 } else { /* next octet in same pbuf */ msg_ptr++; 80330d4: 3501 adds r5, #1 80330d6: f10c 0c01 add.w ip, ip, #1 80330da: fa1f fc8c uxth.w ip, ip /* positive, start from 0 */ *value = 0; sign = 0; } /* OR/AND octets with value */ while (len > 1) 80330de: 4594 cmp ip, r2 80330e0: 781f ldrb r7, [r3, #0] 80330e2: d1dc bne.n 803309e 80330e4: 782a ldrb r2, [r5, #0] { /* next octet in same pbuf */ msg_ptr++; } } if (sign) 80330e6: b11e cbz r6, 80330f0 { *lsb_ptr &= *msg_ptr; 80330e8: 4017 ands r7, r2 80330ea: 701f strb r7, [r3, #0] } else { *lsb_ptr |= *msg_ptr; } return ERR_OK; 80330ec: 2000 movs r0, #0 80330ee: e006 b.n 80330fe { *lsb_ptr &= *msg_ptr; } else { *lsb_ptr |= *msg_ptr; 80330f0: 4317 orrs r7, r2 80330f2: e7fa b.n 80330ea else { return ERR_ARG; } } p = p->next; 80330f4: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80330f6: 4625 mov r5, r4 u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; #endif u8_t sign; plen = 0; while (p != NULL) 80330f8: 2800 cmp r0, #0 80330fa: d1ae bne.n 803305a 80330fc: e7bb b.n 8033076 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80330fe: b240 sxtb r0, r0 8033100: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 08033104 : * @param oid return object identifier struct * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_oid(struct pbuf *p, u16_t ofs, u16_t len, struct snmp_obj_id *oid) { 8033104: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; 8033108: 2600 movs r6, #0 while (p != NULL) 803310a: e08d b.n 8033228 { base = plen; plen += p->len; 803310c: 8944 ldrh r4, [r0, #10] 803310e: 1934 adds r4, r6, r4 8033110: b2a4 uxth r4, r4 if (ofs < plen) 8033112: 42a1 cmp r1, r4 8033114: f080 8086 bcs.w 8033224 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; oid->len = 0; 8033118: f04f 0800 mov.w r8, #0 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 803311c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; oid->len = 0; 803311e: f883 8000 strb.w r8, [r3] oid_ptr = &oid->id[0]; if (len > 0) 8033122: b90a cbnz r2, 8033128 } else { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; 8033124: 2000 movs r0, #0 8033126: e083 b.n 8033230 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033128: 1b8e subs r6, r1, r6 803312a: 19bd adds r5, r7, r6 oid->len = 0; oid_ptr = &oid->id[0]; if (len > 0) { /* first compressed octet */ if (*msg_ptr == 0x2B) 803312c: f817 c006 ldrb.w ip, [r7, r6] 8033130: f1bc 0f2b cmp.w ip, #43 ; 0x2b 8033134: d103 bne.n 803313e { /* (most) common case 1.3 (iso.org) */ *oid_ptr = 1; 8033136: 2601 movs r6, #1 8033138: 605e str r6, [r3, #4] oid_ptr++; *oid_ptr = 3; 803313a: 2603 movs r6, #3 803313c: e016 b.n 803316c oid_ptr++; } else if (*msg_ptr < 40) 803313e: f1bc 0f27 cmp.w ip, #39 ; 0x27 8033142: d803 bhi.n 803314c { *oid_ptr = 0; 8033144: f8c3 8004 str.w r8, [r3, #4] oid_ptr++; *oid_ptr = *msg_ptr; 8033148: 5dbe ldrb r6, [r7, r6] 803314a: e00f b.n 803316c oid_ptr++; } else if (*msg_ptr < 80) 803314c: f1bc 0f4f cmp.w ip, #79 ; 0x4f 8033150: d806 bhi.n 8033160 { *oid_ptr = 1; 8033152: f04f 0c01 mov.w ip, #1 8033156: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 40; 803315a: 5dbe ldrb r6, [r7, r6] 803315c: 3e28 subs r6, #40 ; 0x28 803315e: e005 b.n 803316c oid_ptr++; } else { *oid_ptr = 2; 8033160: f04f 0c02 mov.w ip, #2 8033164: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 8033168: 5dbe ldrb r6, [r7, r6] 803316a: 3e50 subs r6, #80 ; 0x50 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 803316c: 3a01 subs r2, #1 *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; } oid->len = 2; 803316e: 2702 movs r7, #2 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 8033170: b292 uxth r2, r2 } else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 8033172: 609e str r6, [r3, #8] oid_ptr++; } oid->len = 2; 8033174: 701f strb r7, [r3, #0] else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; 8033176: f103 060c add.w r6, r3, #12 /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; if (len > 0) 803317a: 2a00 cmp r2, #0 803317c: d04b beq.n 8033216 { ofs += 1; 803317e: 3101 adds r1, #1 8033180: b289 uxth r1, r1 if (ofs >= plen) 8033182: 42a1 cmp r1, r4 8033184: d308 bcc.n 8033198 { /* next octet in next pbuf */ p = p->next; 8033186: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033188: b908 cbnz r0, 803318e 803318a: 20f2 movs r0, #242 ; 0xf2 803318c: e050 b.n 8033230 msg_ptr = (u8_t*)p->payload; plen += p->len; 803318e: 8947 ldrh r7, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 8033190: 6845 ldr r5, [r0, #4] plen += p->len; 8033192: 19e4 adds r4, r4, r7 8033194: b2a4 uxth r4, r4 8033196: e03e b.n 8033216 } else { /* next octet in same pbuf */ msg_ptr++; 8033198: 3501 adds r5, #1 803319a: e03c b.n 8033216 } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 803319c: 782f ldrb r7, [r5, #0] 803319e: f017 0f80 tst.w r7, #128 ; 0x80 80331a2: d023 beq.n 80331ec 80331a4: e014 b.n 80331d0 while ((*msg_ptr & 0x80) && (len > 1)) { len--; sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); ofs += 1; 80331a6: 3101 adds r1, #1 80331a8: b289 uxth r1, r1 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 80331aa: 3a01 subs r2, #1 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 80331ac: f02c 0c80 bic.w ip, ip, #128 ; 0x80 ofs += 1; if (ofs >= plen) 80331b0: 42a1 cmp r1, r4 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 80331b2: b292 uxth r2, r2 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 80331b4: eb0c 17c7 add.w r7, ip, r7, lsl #7 ofs += 1; if (ofs >= plen) 80331b8: d308 bcc.n 80331cc { /* next octet in next pbuf */ p = p->next; 80331ba: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80331bc: 2800 cmp r0, #0 80331be: d0e4 beq.n 803318a msg_ptr = (u8_t*)p->payload; plen += p->len; 80331c0: f8b0 c00a ldrh.w ip, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 80331c4: 6845 ldr r5, [r0, #4] plen += p->len; 80331c6: 4464 add r4, ip 80331c8: b2a4 uxth r4, r4 80331ca: e002 b.n 80331d2 } else { /* next octet in same pbuf */ msg_ptr++; 80331cc: 3501 adds r5, #1 80331ce: e000 b.n 80331d2 } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 80331d0: 2700 movs r7, #0 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) 80331d2: f895 c000 ldrb.w ip, [r5] 80331d6: f01c 0f80 tst.w ip, #128 ; 0x80 80331da: d02c beq.n 8033236 80331dc: 2a01 cmp r2, #1 80331de: d1e2 bne.n 80331a6 80331e0: e009 b.n 80331f6 } } if (!(*msg_ptr & 0x80) && (len > 0)) { /* last octet sub-identifier */ len--; 80331e2: 3a01 subs r2, #1 80331e4: b292 uxth r2, r2 sub_id = (sub_id << 7) + *msg_ptr; 80331e6: eb0c 17c7 add.w r7, ip, r7, lsl #7 80331ea: e001 b.n 80331f0 } } else { /* !(*msg_ptr & 0x80) sub-identifier uses single octet */ len--; 80331ec: 3a01 subs r2, #1 80331ee: b292 uxth r2, r2 *oid_ptr = *msg_ptr; 80331f0: f846 7c04 str.w r7, [r6, #-4] } if (len > 0) 80331f4: b162 cbz r2, 8033210 { /* remaining oid bytes available ... */ ofs += 1; 80331f6: 3101 adds r1, #1 80331f8: b289 uxth r1, r1 if (ofs >= plen) 80331fa: 42a1 cmp r1, r4 80331fc: d307 bcc.n 803320e { /* next octet in next pbuf */ p = p->next; 80331fe: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033200: 2800 cmp r0, #0 8033202: d0c2 beq.n 803318a msg_ptr = (u8_t*)p->payload; plen += p->len; 8033204: 8947 ldrh r7, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 8033206: 6845 ldr r5, [r0, #4] plen += p->len; 8033208: 19e4 adds r4, r4, r7 803320a: b2a4 uxth r4, r4 803320c: e000 b.n 8033210 } else { /* next octet in same pbuf */ msg_ptr++; 803320e: 3501 adds r5, #1 } } oid_ptr++; oid->len++; 8033210: 781f ldrb r7, [r3, #0] 8033212: 3701 adds r7, #1 8033214: 701f strb r7, [r3, #0] 8033216: 3604 adds r6, #4 { /* next octet in same pbuf */ msg_ptr++; } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) 8033218: 2a00 cmp r2, #0 803321a: d083 beq.n 8033124 803321c: 781f ldrb r7, [r3, #0] 803321e: 2f1f cmp r7, #31 8033220: d9bc bls.n 803319c 8033222: e7b2 b.n 803318a /* len > 0, oid->len == LWIP_SNMP_OBJ_ID_LEN or malformed encoding */ return ERR_ARG; } } p = p->next; 8033224: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033226: 4626 mov r6, r4 u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; while (p != NULL) 8033228: 2800 cmp r0, #0 803322a: f47f af6f bne.w 803310c 803322e: e7ac b.n 803318a 8033230: b240 sxtb r0, r0 8033232: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} { /* next octet in same pbuf */ msg_ptr++; } } if (!(*msg_ptr & 0x80) && (len > 0)) 8033236: 2a00 cmp r2, #0 8033238: d1d3 bne.n 80331e2 803323a: e7e9 b.n 8033210 0803323c : * @param raw return raw bytes * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) { 803323c: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; if (len > 0) 803323e: 2a00 cmp r2, #0 8033240: d12d bne.n 803329e 8033242: e027 b.n 8033294 { plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033244: 8944 ldrh r4, [r0, #10] 8033246: 1934 adds r4, r6, r4 8033248: b2a4 uxth r4, r4 if (ofs < plen) 803324a: 42a1 cmp r1, r4 803324c: d224 bcs.n 8033298 { msg_ptr = (u8_t*)p->payload; 803324e: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 8033250: 1b8d subs r5, r1, r6 if (raw_len >= len) 8033252: 4293 cmp r3, r2 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033254: 443d add r5, r7 if (raw_len >= len) 8033256: d305 bcc.n 8033264 8033258: 9b05 ldr r3, [sp, #20] * @param raw_len length of the raw return value * @param raw return raw bytes * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) 803325a: b29e uxth r6, r3 803325c: 18b2 adds r2, r6, r2 803325e: b292 uxth r2, r2 8033260: 1b89 subs r1, r1, r6 8033262: e011 b.n 8033288 return ERR_OK; } else { /* raw_len < len, not enough dst space */ return ERR_ARG; 8033264: 20f2 movs r0, #242 ; 0xf2 8033266: e01e b.n 80332a6 { while (len > 1) { /* copy len - 1 octets */ len--; *raw = *msg_ptr; 8033268: 782e ldrb r6, [r5, #0] 803326a: f803 6b01 strb.w r6, [r3], #1 * @param raw_len length of the raw return value * @param raw return raw bytes * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) 803326e: 18ce adds r6, r1, r3 /* copy len - 1 octets */ len--; *raw = *msg_ptr; raw++; ofs += 1; if (ofs >= plen) 8033270: b2b6 uxth r6, r6 8033272: 42a6 cmp r6, r4 8033274: d307 bcc.n 8033286 { /* next octet in next pbuf */ p = p->next; 8033276: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033278: 2800 cmp r0, #0 803327a: d0f3 beq.n 8033264 msg_ptr = (u8_t*)p->payload; plen += p->len; 803327c: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 803327e: 6845 ldr r5, [r0, #4] plen += p->len; 8033280: 19a4 adds r4, r4, r6 8033282: b2a4 uxth r4, r4 8033284: e000 b.n 8033288 } else { /* next octet in same pbuf */ msg_ptr++; 8033286: 3501 adds r5, #1 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (raw_len >= len) { while (len > 1) 8033288: 1ad7 subs r7, r2, r3 803328a: b2bf uxth r7, r7 803328c: 2f01 cmp r7, #1 803328e: d8eb bhi.n 8033268 /* next octet in same pbuf */ msg_ptr++; } } /* copy last octet */ *raw = *msg_ptr; 8033290: 782a ldrb r2, [r5, #0] 8033292: 701a strb r2, [r3, #0] return ERR_OK; 8033294: 2000 movs r0, #0 8033296: e006 b.n 80332a6 { /* raw_len < len, not enough dst space */ return ERR_ARG; } } p = p->next; 8033298: 6800 ldr r0, [r0, #0] { plen = 0; while (p != NULL) { base = plen; plen += p->len; 803329a: 4626 mov r6, r4 803329c: e000 b.n 80332a0 snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) { u16_t plen, base; u8_t *msg_ptr; if (len > 0) 803329e: 2600 movs r6, #0 { plen = 0; while (p != NULL) 80332a0: 2800 cmp r0, #0 80332a2: d1cf bne.n 8033244 80332a4: e7de b.n 8033264 else { /* len == 0, empty string */ return ERR_OK; } } 80332a6: b240 sxtb r0, r0 80332a8: bdf0 pop {r4, r5, r6, r7, pc} 080332aa : * @param octets_needed points to the return value */ void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed) { if (length < 0x80U) 80332aa: 287f cmp r0, #127 ; 0x7f 80332ac: d801 bhi.n 80332b2 { *octets_needed = 1; 80332ae: 2301 movs r3, #1 80332b0: e004 b.n 80332bc } else if (length < 0x100U) 80332b2: 28ff cmp r0, #255 ; 0xff 80332b4: d801 bhi.n 80332ba { *octets_needed = 2; 80332b6: 2302 movs r3, #2 80332b8: e000 b.n 80332bc } else { *octets_needed = 3; 80332ba: 2303 movs r3, #3 80332bc: 700b strb r3, [r1, #0] 80332be: 4770 bx lr 080332c0 : * of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!! */ void snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed) { if (value < 0x80UL) 80332c0: 287f cmp r0, #127 ; 0x7f 80332c2: d801 bhi.n 80332c8 { *octets_needed = 1; 80332c4: 2301 movs r3, #1 80332c6: e00e b.n 80332e6 } else if (value < 0x8000UL) 80332c8: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 80332cc: d201 bcs.n 80332d2 { *octets_needed = 2; 80332ce: 2302 movs r3, #2 80332d0: e009 b.n 80332e6 } else if (value < 0x800000UL) 80332d2: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 80332d6: d201 bcs.n 80332dc { *octets_needed = 3; 80332d8: 2303 movs r3, #3 80332da: e004 b.n 80332e6 } else if (value < 0x80000000UL) 80332dc: 2800 cmp r0, #0 80332de: db01 blt.n 80332e4 { *octets_needed = 4; 80332e0: 2304 movs r3, #4 80332e2: e000 b.n 80332e6 } else { *octets_needed = 5; 80332e4: 2305 movs r3, #5 80332e6: 800b strh r3, [r1, #0] 80332e8: 4770 bx lr 080332ea : void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed) { if (value < 0) { value = ~value; 80332ea: 43c3 mvns r3, r0 80332ec: 4283 cmp r3, r0 80332ee: bfa8 it ge 80332f0: 4618 movge r0, r3 } if (value < 0x80L) 80332f2: 287f cmp r0, #127 ; 0x7f 80332f4: dc01 bgt.n 80332fa { *octets_needed = 1; 80332f6: 2301 movs r3, #1 80332f8: e00a b.n 8033310 } else if (value < 0x8000L) 80332fa: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 80332fe: da01 bge.n 8033304 { *octets_needed = 2; 8033300: 2302 movs r3, #2 8033302: e005 b.n 8033310 } else if (value < 0x800000L) 8033304: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 8033308: da01 bge.n 803330e { *octets_needed = 3; 803330a: 2303 movs r3, #3 803330c: e000 b.n 8033310 } else { *octets_needed = 4; 803330e: 2304 movs r3, #4 8033310: 800b strh r3, [r1, #0] 8033312: 4770 bx lr 08033314 : { s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 8033314: 2801 cmp r0, #1 * @param ident points to object identifier array * @param octets_needed points to the return value */ void snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed) { 8033316: b510 push {r4, lr} s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 8033318: d904 bls.n 8033324 { /* compressed prefix in one octet */ cnt++; ident_len -= 2; 803331a: 3802 subs r0, #2 803331c: b2c0 uxtb r0, r0 ident += 2; 803331e: 3108 adds r1, #8 cnt = 0; if (ident_len > 1) { /* compressed prefix in one octet */ cnt++; 8033320: 2301 movs r3, #1 8033322: e000 b.n 8033326 snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed) { s32_t sub_id; u8_t cnt; cnt = 0; 8033324: 2300 movs r3, #0 * @param ident_len object identifier array length * @param ident points to object identifier array * @param octets_needed points to the return value */ void snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed) 8033326: 3904 subs r1, #4 8033328: e008 b.n 803333c ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 803332a: 3801 subs r0, #1 sub_id = *ident; 803332c: f851 4f04 ldr.w r4, [r1, #4]! ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 8033330: b2c0 uxtb r0, r0 sub_id >>= 7; cnt++; while(sub_id > 0) { sub_id >>= 7; 8033332: 11e4 asrs r4, r4, #7 cnt++; 8033334: 3301 adds r3, #1 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 8033336: 2c00 cmp r4, #0 { sub_id >>= 7; cnt++; 8033338: b2db uxtb r3, r3 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 803333a: dcfa bgt.n 8033332 /* compressed prefix in one octet */ cnt++; ident_len -= 2; ident += 2; } while(ident_len > 0) 803333c: 2800 cmp r0, #0 803333e: d1f4 bne.n 803332a sub_id >>= 7; cnt++; } ident++; } *octets_needed = cnt; 8033340: 8013 strh r3, [r2, #0] 8033342: bd10 pop {r4, pc} 08033344 : * @param type input ASN1 type * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_type(struct pbuf *p, u16_t ofs, u8_t type) { 8033344: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8033346: 2300 movs r3, #0 while (p != NULL) 8033348: e00b b.n 8033362 { base = plen; plen += p->len; 803334a: 8944 ldrh r4, [r0, #10] 803334c: 191c adds r4, r3, r4 803334e: b2a4 uxth r4, r4 if (ofs < plen) 8033350: 42a1 cmp r1, r4 8033352: d204 bcs.n 803335e { msg_ptr = (u8_t*)p->payload; 8033354: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 8033356: 1acb subs r3, r1, r3 *msg_ptr = type; 8033358: 54c2 strb r2, [r0, r3] return ERR_OK; 803335a: 2000 movs r0, #0 803335c: e004 b.n 8033368 } p = p->next; 803335e: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033360: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033362: 2800 cmp r0, #0 8033364: d1f1 bne.n 803334a return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 8033366: 20f2 movs r0, #242 ; 0xf2 } 8033368: b240 sxtb r0, r0 803336a: bd10 pop {r4, pc} 0803336c : * @param length is the host order length to be encoded * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_length(struct pbuf *p, u16_t ofs, u16_t length) { 803336c: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 803336e: 2400 movs r4, #0 while (p != NULL) 8033370: e03f b.n 80333f2 { base = plen; plen += p->len; 8033372: 8943 ldrh r3, [r0, #10] 8033374: 18e3 adds r3, r4, r3 8033376: b29b uxth r3, r3 if (ofs < plen) 8033378: 4299 cmp r1, r3 803337a: d238 bcs.n 80333ee { msg_ptr = (u8_t*)p->payload; 803337c: 6845 ldr r5, [r0, #4] msg_ptr += ofs - base; 803337e: 1b0c subs r4, r1, r4 if (length < 0x80) 8033380: 2a7f cmp r2, #127 ; 0x7f base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033382: eb05 0604 add.w r6, r5, r4 if (length < 0x80) 8033386: d801 bhi.n 803338c { *msg_ptr = (u8_t)length; 8033388: 552a strb r2, [r5, r4] 803338a: e02e b.n 80333ea return ERR_OK; } else if (length < 0x100) 803338c: 2aff cmp r2, #255 ; 0xff 803338e: f101 0701 add.w r7, r1, #1 8033392: d80d bhi.n 80333b0 { *msg_ptr = 0x81; ofs += 1; if (ofs >= plen) 8033394: b2bf uxth r7, r7 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 8033396: 2181 movs r1, #129 ; 0x81 ofs += 1; if (ofs >= plen) 8033398: 429f cmp r7, r3 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 803339a: 5529 strb r1, [r5, r4] ofs += 1; if (ofs >= plen) 803339c: d305 bcc.n 80333aa { /* next octet in next pbuf */ p = p->next; 803339e: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 80333a0: b90b cbnz r3, 80333a6 80333a2: 20f2 movs r0, #242 ; 0xf2 80333a4: e028 b.n 80333f8 msg_ptr = (u8_t*)p->payload; 80333a6: 685e ldr r6, [r3, #4] 80333a8: e000 b.n 80333ac } else { /* next octet in same pbuf */ msg_ptr++; 80333aa: 3601 adds r6, #1 } *msg_ptr = (u8_t)length; 80333ac: 7032 strb r2, [r6, #0] 80333ae: e01c b.n 80333ea i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80333b0: b2bf uxth r7, r7 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 80333b2: f04f 0c82 mov.w ip, #130 ; 0x82 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80333b6: 429f cmp r7, r3 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 80333b8: f805 c004 strb.w ip, [r5, r4] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80333bc: d201 bcs.n 80333c2 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 80333be: 1c74 adds r4, r6, #1 80333c0: e006 b.n 80333d0 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 80333c2: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80333c4: 2800 cmp r0, #0 80333c6: d0ec beq.n 80333a2 msg_ptr = (u8_t*)p->payload; plen += p->len; 80333c8: 8945 ldrh r5, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 80333ca: 6844 ldr r4, [r0, #4] plen += p->len; 80333cc: 195b adds r3, r3, r5 80333ce: b29b uxth r3, r3 *msg_ptr = 0x82; i = 2; while (i > 0) { i--; ofs += 1; 80333d0: 3102 adds r1, #2 if (ofs >= plen) 80333d2: b289 uxth r1, r1 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 80333d4: 0a15 lsrs r5, r2, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80333d6: 4299 cmp r1, r3 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 80333d8: 7025 strb r5, [r4, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80333da: d201 bcs.n 80333e0 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 80333dc: 3401 adds r4, #1 80333de: e003 b.n 80333e8 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 80333e0: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 80333e2: 2b00 cmp r3, #0 80333e4: d0dd beq.n 80333a2 msg_ptr = (u8_t*)p->payload; 80333e6: 685c ldr r4, [r3, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *msg_ptr = (u8_t)length; 80333e8: 7022 strb r2, [r4, #0] { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); } } return ERR_OK; 80333ea: 2000 movs r0, #0 80333ec: e004 b.n 80333f8 } } p = p->next; 80333ee: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80333f0: 461c mov r4, r3 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80333f2: 2800 cmp r0, #0 80333f4: d1bd bne.n 8033372 80333f6: e7d4 b.n 80333a2 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80333f8: b240 sxtb r0, r0 80333fa: bdf0 pop {r4, r5, r6, r7, pc} 080333fc : * * @see snmp_asn1_enc_u32t_cnt() */ err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value) { 80333fc: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80333fe: 2500 movs r5, #0 while (p != NULL) 8033400: e037 b.n 8033472 { base = plen; plen += p->len; 8033402: 8944 ldrh r4, [r0, #10] 8033404: 192c adds r4, r5, r4 8033406: b2a4 uxth r4, r4 if (ofs < plen) 8033408: 42a1 cmp r1, r4 803340a: d230 bcs.n 803346e { msg_ptr = (u8_t*)p->payload; 803340c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 803340e: 1b4e subs r6, r1, r5 if (octets_needed == 5) 8033410: 2a05 cmp r2, #5 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8033412: eb07 0506 add.w r5, r7, r6 if (octets_needed == 5) 8033416: d110 bne.n 803343a { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; ofs += 1; 8033418: 3101 adds r1, #1 803341a: b289 uxth r1, r1 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 803341c: 2200 movs r2, #0 ofs += 1; if (ofs >= plen) 803341e: 42a1 cmp r1, r4 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 8033420: 55ba strb r2, [r7, r6] ofs += 1; if (ofs >= plen) 8033422: d308 bcc.n 8033436 { /* next octet in next pbuf */ p = p->next; 8033424: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033426: b908 cbnz r0, 803342c 8033428: 20f2 movs r0, #242 ; 0xf2 803342a: e025 b.n 8033478 msg_ptr = (u8_t*)p->payload; plen += p->len; 803342c: 8942 ldrh r2, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 803342e: 6845 ldr r5, [r0, #4] plen += p->len; 8033430: 18a4 adds r4, r4, r2 8033432: b2a4 uxth r4, r4 8033434: e000 b.n 8033438 } else { /* next octet in same pbuf */ msg_ptr++; 8033436: 3501 adds r5, #1 msg_ptr += ofs - base; if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; 8033438: 2204 movs r2, #4 * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode * * @see snmp_asn1_enc_u32t_cnt() */ err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value) 803343a: 1851 adds r1, r2, r1 803343c: e012 b.n 8033464 msg_ptr++; } } while (octets_needed > 1) { octets_needed--; 803343e: 3a01 subs r2, #1 8033440: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 8033442: 00d6 lsls r6, r2, #3 8033444: fa23 f606 lsr.w r6, r3, r6 8033448: 702e strb r6, [r5, #0] * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode * * @see snmp_asn1_enc_u32t_cnt() */ err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value) 803344a: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 803344c: b2b6 uxth r6, r6 803344e: 42a6 cmp r6, r4 8033450: d307 bcc.n 8033462 { /* next octet in next pbuf */ p = p->next; 8033452: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033454: 2800 cmp r0, #0 8033456: d0e7 beq.n 8033428 msg_ptr = (u8_t*)p->payload; plen += p->len; 8033458: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 803345a: 6845 ldr r5, [r0, #4] plen += p->len; 803345c: 19a4 adds r4, r4, r6 803345e: b2a4 uxth r4, r4 8033460: e000 b.n 8033464 } else { /* next octet in same pbuf */ msg_ptr++; 8033462: 3501 adds r5, #1 { /* next octet in same pbuf */ msg_ptr++; } } while (octets_needed > 1) 8033464: 2a01 cmp r2, #1 8033466: d8ea bhi.n 803343e /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 8033468: 702b strb r3, [r5, #0] return ERR_OK; 803346a: 2000 movs r0, #0 803346c: e004 b.n 8033478 } p = p->next; 803346e: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8033470: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8033472: 2800 cmp r0, #0 8033474: d1c5 bne.n 8033402 8033476: e7d7 b.n 8033428 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8033478: b240 sxtb r0, r0 803347a: bdf0 pop {r4, r5, r6, r7, pc} 0803347c : * * @see snmp_asn1_enc_s32t_cnt() */ err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value) { 803347c: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 803347e: 2600 movs r6, #0 while (p != NULL) 8033480: e024 b.n 80334cc { base = plen; plen += p->len; 8033482: 8944 ldrh r4, [r0, #10] 8033484: 1934 adds r4, r6, r4 8033486: b2a4 uxth r4, r4 if (ofs < plen) 8033488: 42a1 cmp r1, r4 803348a: d21d bcs.n 80334c8 { msg_ptr = (u8_t*)p->payload; 803348c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 803348e: 1b8d subs r5, r1, r6 8033490: 197d adds r5, r7, r5 * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode * * @see snmp_asn1_enc_s32t_cnt() */ err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value) 8033492: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 8033494: e013 b.n 80334be { octets_needed--; 8033496: 3a01 subs r2, #1 8033498: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 803349a: 00d6 lsls r6, r2, #3 803349c: fa43 f606 asr.w r6, r3, r6 80334a0: 702e strb r6, [r5, #0] * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode * * @see snmp_asn1_enc_s32t_cnt() */ err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value) 80334a2: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 80334a4: b2b6 uxth r6, r6 80334a6: 42a6 cmp r6, r4 80334a8: d308 bcc.n 80334bc { /* next octet in next pbuf */ p = p->next; 80334aa: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80334ac: b908 cbnz r0, 80334b2 80334ae: 20f2 movs r0, #242 ; 0xf2 80334b0: e00f b.n 80334d2 msg_ptr = (u8_t*)p->payload; plen += p->len; 80334b2: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 80334b4: 6845 ldr r5, [r0, #4] plen += p->len; 80334b6: 19a4 adds r4, r4, r6 80334b8: b2a4 uxth r4, r4 80334ba: e000 b.n 80334be } else { /* next octet in same pbuf */ msg_ptr++; 80334bc: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 80334be: 2a01 cmp r2, #1 80334c0: d8e9 bhi.n 8033496 /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 80334c2: 702b strb r3, [r5, #0] return ERR_OK; 80334c4: 2000 movs r0, #0 80334c6: e004 b.n 80334d2 } p = p->next; 80334c8: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80334ca: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80334cc: 2800 cmp r0, #0 80334ce: d1d8 bne.n 8033482 80334d0: e7ed b.n 80334ae } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80334d2: b240 sxtb r0, r0 80334d4: bdf0 pop {r4, r5, r6, r7, pc} 080334d6 : * @param ident points to object identifier array * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident) { 80334d6: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80334da: 2500 movs r5, #0 while (p != NULL) 80334dc: e068 b.n 80335b0 { base = plen; plen += p->len; 80334de: 8944 ldrh r4, [r0, #10] 80334e0: 192c adds r4, r5, r4 80334e2: b2a4 uxth r4, r4 if (ofs < plen) 80334e4: 42a1 cmp r1, r4 80334e6: d261 bcs.n 80335ac { msg_ptr = (u8_t*)p->payload; 80334e8: 6846 ldr r6, [r0, #4] msg_ptr += ofs - base; 80334ea: 1b4d subs r5, r1, r5 if (ident_len > 1) 80334ec: 2a01 cmp r2, #1 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80334ee: eb06 0805 add.w r8, r6, r5 if (ident_len > 1) 80334f2: d801 bhi.n 80334f8 } else { /* @bug: allow empty varbinds for symmetry (we must decode them for getnext), allow partial compression?? */ /* ident_len <= 1, at least we need zeroDotZero (0.0) (ident_len == 2) */ return ERR_ARG; 80334f4: 20f2 movs r0, #242 ; 0xf2 80334f6: e05e b.n 80335b6 msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (ident_len > 1) { if ((ident[0] == 1) && (ident[1] == 3)) 80334f8: f8d3 c000 ldr.w ip, [r3] 80334fc: f1bc 0f01 cmp.w ip, #1 8033500: d105 bne.n 803350e 8033502: 685f ldr r7, [r3, #4] 8033504: 2f03 cmp r7, #3 8033506: d102 bne.n 803350e { /* compressed (most common) prefix .iso.org */ *msg_ptr = 0x2b; 8033508: 272b movs r7, #43 ; 0x2b 803350a: 5577 strb r7, [r6, r5] 803350c: e006 b.n 803351c } else { /* calculate prefix */ *msg_ptr = (u8_t)((ident[0] * 40) + ident[1]); 803350e: 685f ldr r7, [r3, #4] 8033510: f04f 0928 mov.w r9, #40 ; 0x28 8033514: fb09 7c0c mla ip, r9, ip, r7 8033518: f806 c005 strb.w ip, [r6, r5] } ofs += 1; 803351c: 3101 adds r1, #1 803351e: b289 uxth r1, r1 if (ofs >= plen) 8033520: 42a1 cmp r1, r4 8033522: d307 bcc.n 8033534 { /* next octet in next pbuf */ p = p->next; 8033524: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033526: 2800 cmp r0, #0 8033528: d0e4 beq.n 80334f4 msg_ptr = (u8_t*)p->payload; plen += p->len; 803352a: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 803352c: 6845 ldr r5, [r0, #4] plen += p->len; 803352e: 19a4 adds r4, r4, r6 8033530: b2a4 uxth r4, r4 8033532: e001 b.n 8033538 } else { /* next octet in same pbuf */ msg_ptr++; 8033534: f108 0501 add.w r5, r8, #1 } ident_len -= 2; 8033538: 3a02 subs r2, #2 803353a: b2d2 uxtb r2, r2 * @param ident_len object identifier array length * @param ident points to object identifier array * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident) 803353c: 3304 adds r3, #4 { /* @bug: allow empty varbinds for symmetry (we must decode them for getnext), allow partial compression?? */ /* ident_len <= 1, at least we need zeroDotZero (0.0) (ident_len == 2) */ return ERR_ARG; } while (ident_len > 0) 803353e: e031 b.n 80335a4 { s32_t sub_id; u8_t shift, tail; ident_len--; 8033540: 3a01 subs r2, #1 sub_id = *ident; 8033542: f853 cf04 ldr.w ip, [r3, #4]! while (ident_len > 0) { s32_t sub_id; u8_t shift, tail; ident_len--; 8033546: b2d2 uxtb r2, r2 sub_id = *ident; 8033548: 261c movs r6, #28 tail = 0; 803354a: 2700 movs r7, #0 shift = 28; while(shift > 0) { u8_t code; code = (u8_t)(sub_id >> shift); 803354c: fa4c f806 asr.w r8, ip, r6 if ((code != 0) || (tail != 0)) 8033550: f018 0fff tst.w r8, #255 ; 0xff 8033554: d100 bne.n 8033558 8033556: b18f cbz r7, 803357c { tail = 1; *msg_ptr = code | 0x80; ofs += 1; 8033558: 3101 adds r1, #1 803355a: b289 uxth r1, r1 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 803355c: f048 0880 orr.w r8, r8, #128 ; 0x80 ofs += 1; if (ofs >= plen) 8033560: 42a1 cmp r1, r4 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 8033562: f885 8000 strb.w r8, [r5] ofs += 1; if (ofs >= plen) 8033566: d307 bcc.n 8033578 { /* next octet in next pbuf */ p = p->next; 8033568: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 803356a: 2800 cmp r0, #0 803356c: d0c2 beq.n 80334f4 msg_ptr = (u8_t*)p->payload; plen += p->len; 803356e: 8947 ldrh r7, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 8033570: 6845 ldr r5, [r0, #4] plen += p->len; 8033572: 19e4 adds r4, r4, r7 8033574: b2a4 uxth r4, r4 8033576: e000 b.n 803357a } else { /* next octet in same pbuf */ msg_ptr++; 8033578: 3501 adds r5, #1 u8_t code; code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; 803357a: 2701 movs r7, #1 ident_len--; sub_id = *ident; tail = 0; shift = 28; while(shift > 0) 803357c: 3e07 subs r6, #7 803357e: d1e5 bne.n 803354c msg_ptr++; } } shift -= 7; } *msg_ptr = (u8_t)sub_id & 0x7F; 8033580: f00c 0c7f and.w ip, ip, #127 ; 0x7f 8033584: f885 c000 strb.w ip, [r5] if (ident_len > 0) 8033588: b172 cbz r2, 80335a8 { ofs += 1; 803358a: 3101 adds r1, #1 803358c: b289 uxth r1, r1 if (ofs >= plen) 803358e: 42a1 cmp r1, r4 8033590: d307 bcc.n 80335a2 { /* next octet in next pbuf */ p = p->next; 8033592: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8033594: 2800 cmp r0, #0 8033596: d0ad beq.n 80334f4 msg_ptr = (u8_t*)p->payload; plen += p->len; 8033598: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 803359a: 6845 ldr r5, [r0, #4] plen += p->len; 803359c: 19a4 adds r4, r4, r6 803359e: b2a4 uxth r4, r4 80335a0: e000 b.n 80335a4 } else { /* next octet in same pbuf */ msg_ptr++; 80335a2: 3501 adds r5, #1 { /* @bug: allow empty varbinds for symmetry (we must decode them for getnext), allow partial compression?? */ /* ident_len <= 1, at least we need zeroDotZero (0.0) (ident_len == 2) */ return ERR_ARG; } while (ident_len > 0) 80335a4: 2a00 cmp r2, #0 80335a6: d1cb bne.n 8033540 } } /* proceed to next sub-identifier */ ident++; } return ERR_OK; 80335a8: 2000 movs r0, #0 80335aa: e004 b.n 80335b6 } p = p->next; 80335ac: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80335ae: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80335b0: 2800 cmp r0, #0 80335b2: d194 bne.n 80334de 80335b4: e79e b.n 80334f4 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80335b6: b240 sxtb r0, r0 80335b8: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 080335bc : * @param raw points raw data * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw) { 80335bc: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80335be: 2600 movs r6, #0 while (p != NULL) 80335c0: e025 b.n 803360e { base = plen; plen += p->len; 80335c2: 8944 ldrh r4, [r0, #10] 80335c4: 1934 adds r4, r6, r4 80335c6: b2a4 uxth r4, r4 if (ofs < plen) 80335c8: 42a1 cmp r1, r4 80335ca: d21e bcs.n 803360a { msg_ptr = (u8_t*)p->payload; 80335cc: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 80335ce: 1b8d subs r5, r1, r6 80335d0: 197d adds r5, r7, r5 * @param raw_len raw data length * @param raw points raw data * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw) 80335d2: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 80335d4: e012 b.n 80335fc { /* copy raw_len - 1 octets */ raw_len--; 80335d6: 3a01 subs r2, #1 *msg_ptr = *raw; 80335d8: f813 6b01 ldrb.w r6, [r3], #1 msg_ptr += ofs - base; while (raw_len > 1) { /* copy raw_len - 1 octets */ raw_len--; 80335dc: b292 uxth r2, r2 *msg_ptr = *raw; 80335de: 702e strb r6, [r5, #0] * @param raw_len raw data length * @param raw points raw data * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw) 80335e0: 1a8e subs r6, r1, r2 /* copy raw_len - 1 octets */ raw_len--; *msg_ptr = *raw; raw++; ofs += 1; if (ofs >= plen) 80335e2: b2b6 uxth r6, r6 80335e4: 42a6 cmp r6, r4 80335e6: d308 bcc.n 80335fa { /* next octet in next pbuf */ p = p->next; 80335e8: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80335ea: b908 cbnz r0, 80335f0 80335ec: 20f2 movs r0, #242 ; 0xf2 80335ee: e012 b.n 8033616 msg_ptr = (u8_t*)p->payload; plen += p->len; 80335f0: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 80335f2: 6845 ldr r5, [r0, #4] plen += p->len; 80335f4: 19a4 adds r4, r4, r6 80335f6: b2a4 uxth r4, r4 80335f8: e000 b.n 80335fc } else { /* next octet in same pbuf */ msg_ptr++; 80335fa: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 80335fc: 2a01 cmp r2, #1 80335fe: d8ea bhi.n 80335d6 { /* next octet in same pbuf */ msg_ptr++; } } if (raw_len > 0) 8033600: b142 cbz r2, 8033614 { /* copy last or single octet */ *msg_ptr = *raw; 8033602: 781b ldrb r3, [r3, #0] } return ERR_OK; 8033604: 2000 movs r0, #0 } } if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; 8033606: 702b strb r3, [r5, #0] 8033608: e005 b.n 8033616 } return ERR_OK; } p = p->next; 803360a: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 803360c: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803360e: 2800 cmp r0, #0 8033610: d1d7 bne.n 80335c2 8033612: e7eb b.n 80335ec if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; } return ERR_OK; 8033614: 4610 mov r0, r2 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8033616: b240 sxtb r0, r0 8033618: bdf0 pop {r4, r5, r6, r7, pc} 0803361a : void noleafs_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { LWIP_UNUSED_ARG(ident_len); LWIP_UNUSED_ARG(ident); od->instance = MIB_OBJECT_NONE; 803361a: 2300 movs r3, #0 803361c: 7013 strb r3, [r2, #0] 803361e: 4770 bx lr 08033620 : } void noleafs_get_value(struct obj_def *od, u16_t len, void *value) { 8033620: 4770 bx lr 08033622 : LWIP_UNUSED_ARG(od); LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value); /* can't set */ return 0; } 8033622: 2000 movs r0, #0 8033624: 4770 bx lr 08033626 : void noleafs_set_value(struct obj_def *od, u16_t len, void *value) { 8033626: 4770 bx lr 08033628 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033628: 2801 cmp r0, #1 803362a: d145 bne.n 80336b8 { od->id_inst_len = ident_len; 803362c: 2002 movs r0, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 803362e: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8033630: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 8033632: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def system.%"U16_F".0\n",(u16_t)id)); switch (id) 8033634: f811 3c04 ldrb.w r3, [r1, #-4] 8033638: 3b01 subs r3, #1 803363a: 2b06 cmp r3, #6 803363c: d83c bhi.n 80336b8 803363e: e8df f003 tbb [pc, r3] 8033642: 0b04 .short 0x0b04 8033644: 2a221a14 .word 0x2a221a14 8033648: 34 .byte 0x34 8033649: 00 .byte 0x00 { case 1: /* sysDescr */ od->instance = MIB_OBJECT_SCALAR; 803364a: 2301 movs r3, #1 803364c: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803364e: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033650: 2304 movs r3, #4 8033652: 7093 strb r3, [r2, #2] od->v_len = *sysdescr_len_ptr; 8033654: 4b1a ldr r3, [pc, #104] ; (80336c0 ) 8033656: e025 b.n 80336a4 break; case 2: /* sysObjectID */ od->instance = MIB_OBJECT_SCALAR; 8033658: 2301 movs r3, #1 803365a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803365c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 803365e: 2306 movs r3, #6 8033660: 7093 strb r3, [r2, #2] od->v_len = sysobjid.len * sizeof(s32_t); 8033662: 4b18 ldr r3, [pc, #96] ; (80336c4 ) 8033664: 781b ldrb r3, [r3, #0] 8033666: 009b lsls r3, r3, #2 8033668: e024 b.n 80336b4 break; case 3: /* sysUpTime */ od->instance = MIB_OBJECT_SCALAR; 803366a: 2301 movs r3, #1 803366c: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803366e: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8033670: 2343 movs r3, #67 ; 0x43 8033672: 7093 strb r3, [r2, #2] 8033674: e01d b.n 80336b2 od->v_len = sizeof(u32_t); break; case 4: /* sysContact */ od->instance = MIB_OBJECT_SCALAR; 8033676: 2301 movs r3, #1 8033678: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803367a: 2303 movs r3, #3 803367c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803367e: 2304 movs r3, #4 8033680: 7093 strb r3, [r2, #2] od->v_len = *syscontact_len_ptr; 8033682: 4b11 ldr r3, [pc, #68] ; (80336c8 ) 8033684: e00e b.n 80336a4 break; case 5: /* sysName */ od->instance = MIB_OBJECT_SCALAR; 8033686: 2301 movs r3, #1 8033688: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803368a: 2303 movs r3, #3 803368c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803368e: 2304 movs r3, #4 8033690: 7093 strb r3, [r2, #2] od->v_len = *sysname_len_ptr; 8033692: 4b0e ldr r3, [pc, #56] ; (80336cc ) 8033694: e006 b.n 80336a4 break; case 6: /* sysLocation */ od->instance = MIB_OBJECT_SCALAR; 8033696: 2301 movs r3, #1 8033698: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803369a: 2303 movs r3, #3 803369c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803369e: 2304 movs r3, #4 80336a0: 7093 strb r3, [r2, #2] od->v_len = *syslocation_len_ptr; 80336a2: 4b0b ldr r3, [pc, #44] ; (80336d0 ) 80336a4: 681b ldr r3, [r3, #0] 80336a6: 781b ldrb r3, [r3, #0] 80336a8: e004 b.n 80336b4 break; case 7: /* sysServices */ od->instance = MIB_OBJECT_SCALAR; 80336aa: 2301 movs r3, #1 80336ac: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80336ae: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 80336b0: 7090 strb r0, [r2, #2] od->v_len = sizeof(s32_t); 80336b2: 2304 movs r3, #4 80336b4: 8093 strh r3, [r2, #4] break; 80336b6: 4770 bx lr }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80336b8: 2300 movs r3, #0 80336ba: 7013 strb r3, [r2, #0] 80336bc: 4770 bx lr 80336be: bf00 nop 80336c0: 2000094c .word 0x2000094c 80336c4: 200007fc .word 0x200007fc 80336c8: 200007a8 .word 0x200007a8 80336cc: 200007a4 .word 0x200007a4 80336d0: 20000990 .word 0x20000990 080336d4 : interfaces_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 80336d4: 2801 cmp r0, #1 80336d6: d109 bne.n 80336ec { od->id_inst_len = ident_len; 80336d8: 2302 movs r3, #2 80336da: 7193 strb r3, [r2, #6] static void interfaces_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 80336dc: 3904 subs r1, #4 od->id_inst_len = ident_len; od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 80336de: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 80336e0: 2304 movs r3, #4 ident_len += 1; ident -= 1; if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 80336e2: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 80336e4: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80336e6: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); 80336e8: 8093 strh r3, [r2, #4] 80336ea: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("interfaces_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80336ec: 2300 movs r3, #0 80336ee: 7013 strb r3, [r2, #0] 80336f0: 4770 bx lr 80336f2: 0000 movs r0, r0 080336f4 : */ static void interfaces_get_value(struct obj_def *od, u16_t len, void *value) { LWIP_UNUSED_ARG(len); if (od->id_inst_ptr[0] == 1) 80336f4: 6883 ldr r3, [r0, #8] 80336f6: 681b ldr r3, [r3, #0] 80336f8: 2b01 cmp r3, #1 80336fa: d102 bne.n 8033702 { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = iflist_root.count; 80336fc: 4b01 ldr r3, [pc, #4] ; (8033704 ) 80336fe: 8b9b ldrh r3, [r3, #28] 8033700: 6013 str r3, [r2, #0] 8033702: 4770 bx lr 8033704: 200007dc .word 0x200007dc 08033708 : { u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033708: 6883 ldr r3, [r0, #8] switch (id) 803370a: 781b ldrb r3, [r3, #0] 803370c: 3b01 subs r3, #1 803370e: 2b16 cmp r3, #22 8033710: d836 bhi.n 8033780 8033712: e8df f003 tbb [pc, r3] 8033716: 0e0c .short 0x0e0c 8033718: 16141210 .word 0x16141210 803371c: 1e1c1a18 .word 0x1e1c1a18 8033720: 26242220 .word 0x26242220 8033724: 2e2c2a28 .word 0x2e2c2a28 8033728: 35353530 .word 0x35353530 803372c: 32 .byte 0x32 803372d: 00 .byte 0x00 #if IP_FORWARD /* forwarding */ *sint_ptr = 1; #else /* not-forwarding */ *sint_ptr = 2; 803372e: 2302 movs r3, #2 8033730: e025 b.n 803377e } break; case 2: /* ipDefaultTTL */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = IP_DEFAULT_TTL; 8033732: 23ff movs r3, #255 ; 0xff 8033734: e023 b.n 803377e } break; case 3: /* ipInReceives */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinreceives; 8033736: 4b13 ldr r3, [pc, #76] ; (8033784 ) 8033738: e020 b.n 803377c } break; case 4: /* ipInHdrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinhdrerrors; 803373a: 4b13 ldr r3, [pc, #76] ; (8033788 ) 803373c: e01e b.n 803377c } break; case 5: /* ipInAddrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinaddrerrors; 803373e: 4b13 ldr r3, [pc, #76] ; (803378c ) 8033740: e01c b.n 803377c } break; case 6: /* ipForwDatagrams */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipforwdatagrams; 8033742: 4b13 ldr r3, [pc, #76] ; (8033790 ) 8033744: e01a b.n 803377c } break; case 7: /* ipInUnknownProtos */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinunknownprotos; 8033746: 4b13 ldr r3, [pc, #76] ; (8033794 ) 8033748: e018 b.n 803377c } break; case 8: /* ipInDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindiscards; 803374a: 4b13 ldr r3, [pc, #76] ; (8033798 ) 803374c: e016 b.n 803377c } break; case 9: /* ipInDelivers */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindelivers; 803374e: 4b13 ldr r3, [pc, #76] ; (803379c ) 8033750: e014 b.n 803377c } break; case 10: /* ipOutRequests */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutrequests; 8033752: 4b13 ldr r3, [pc, #76] ; (80337a0 ) 8033754: e012 b.n 803377c } break; case 11: /* ipOutDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutdiscards; 8033756: 4b13 ldr r3, [pc, #76] ; (80337a4 ) 8033758: e010 b.n 803377c } break; case 12: /* ipOutNoRoutes */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutnoroutes; 803375a: 4b13 ldr r3, [pc, #76] ; (80337a8 ) 803375c: e00e b.n 803377c { s32_t *sint_ptr = (s32_t*)value; #if IP_REASSEMBLY *sint_ptr = IP_REASS_MAXAGE; #else *sint_ptr = 0; 803375e: 2300 movs r3, #0 8033760: e00d b.n 803377e } break; case 14: /* ipReasmReqds */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmreqds; 8033762: 4b12 ldr r3, [pc, #72] ; (80337ac ) 8033764: e00a b.n 803377c } break; case 15: /* ipReasmOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmoks; 8033766: 4b12 ldr r3, [pc, #72] ; (80337b0 ) 8033768: e008 b.n 803377c } break; case 16: /* ipReasmFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmfails; 803376a: 4b12 ldr r3, [pc, #72] ; (80337b4 ) 803376c: e006 b.n 803377c } break; case 17: /* ipFragOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragoks; 803376e: 4b12 ldr r3, [pc, #72] ; (80337b8 ) 8033770: e004 b.n 803377c } break; case 18: /* ipFragFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragfails; 8033772: 4b12 ldr r3, [pc, #72] ; (80337bc ) 8033774: e002 b.n 803377c } break; case 19: /* ipFragCreates */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragcreates; 8033776: 4b12 ldr r3, [pc, #72] ; (80337c0 ) 8033778: e000 b.n 803377c break; case 23: /* ipRoutingDiscards */ /** @todo can lwIP discard routes at all?? hardwire this to 0?? */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = iproutingdiscards; 803377a: 4b12 ldr r3, [pc, #72] ; (80337c4 ) 803377c: 681b ldr r3, [r3, #0] 803377e: 6013 str r3, [r2, #0] 8033780: 4770 bx lr 8033782: bf00 nop 8033784: 2000c528 .word 0x2000c528 8033788: 2000c4b0 .word 0x2000c4b0 803378c: 2000c494 .word 0x2000c494 8033790: 2000c5b0 .word 0x2000c5b0 8033794: 2000c4f0 .word 0x2000c4f0 8033798: 2000c57c .word 0x2000c57c 803379c: 2000c5b4 .word 0x2000c5b4 80337a0: 2000c59c .word 0x2000c59c 80337a4: 2000c540 .word 0x2000c540 80337a8: 2000c5c0 .word 0x2000c5c0 80337ac: 2000c510 .word 0x2000c510 80337b0: 2000c4bc .word 0x2000c4bc 80337b4: 2000c570 .word 0x2000c570 80337b8: 2000c480 .word 0x2000c480 80337bc: 2000c4ec .word 0x2000c4ec 80337c0: 2000c58c .word 0x2000c58c 80337c4: 2000c578 .word 0x2000c578 080337c8 : s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 80337c8: 6883 ldr r3, [r0, #8] switch (id) 80337ca: 781b ldrb r3, [r3, #0] 80337cc: 2b01 cmp r3, #1 80337ce: d002 beq.n 80337d6 80337d0: 2b02 cmp r3, #2 80337d2: d109 bne.n 80337e8 80337d4: e002 b.n 80337dc #if IP_FORWARD /* forwarding */ if (*sint_ptr == 1) #else /* not-forwarding */ if (*sint_ptr == 2) 80337d6: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 80337d8: 2802 cmp r0, #2 80337da: e001 b.n 80337e0 { set_ok = 1; } break; case 2: /* ipDefaultTTL */ if (*sint_ptr == IP_DEFAULT_TTL) 80337dc: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 80337de: 28ff cmp r0, #255 ; 0xff 80337e0: bf14 ite ne 80337e2: 2000 movne r0, #0 80337e4: 2001 moveq r0, #1 80337e6: 4770 bx lr 80337e8: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 80337ea: 4770 bx lr 080337ec : /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 80337ec: 2801 cmp r0, #1 80337ee: d12c bne.n 803384a { od->id_inst_len = ident_len; 80337f0: 2305 movs r3, #5 80337f2: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; 80337f4: f1a1 0310 sub.w r3, r1, #16 if (ident_len == 5) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 80337f8: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80337fa: f811 3c10 ldrb.w r3, [r1, #-16] 80337fe: 3b01 subs r3, #1 8033800: 2b0c cmp r3, #12 8033802: d822 bhi.n 803384a 8033804: e8df f003 tbb [pc, r3] 8033808: 0d0d0d07 .word 0x0d0d0d07 803380c: 0d070d0d .word 0x0d070d0d 8033810: 0d070d11 .word 0x0d070d11 8033814: 18 .byte 0x18 8033815: 00 .byte 0x00 { case 1: /* ipRouteDest */ case 7: /* ipRouteNextHop */ case 11: /* ipRouteMask */ od->instance = MIB_OBJECT_TAB; 8033816: 2302 movs r3, #2 8033818: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 803381a: 2303 movs r3, #3 803381c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803381e: 2340 movs r3, #64 ; 0x40 8033820: e007 b.n 8033832 case 5: /* ipRouteMetric3 */ case 6: /* ipRouteMetric4 */ case 8: /* ipRouteType */ case 10: /* ipRouteAge */ case 12: /* ipRouteMetric5 */ od->instance = MIB_OBJECT_TAB; 8033822: 2302 movs r3, #2 8033824: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033826: 2103 movs r1, #3 8033828: e002 b.n 8033830 od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 9: /* ipRouteProto */ od->instance = MIB_OBJECT_TAB; 803382a: 2302 movs r3, #2 803382c: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803382e: 2101 movs r1, #1 8033830: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033832: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033834: 2304 movs r3, #4 8033836: e006 b.n 8033846 break; case 13: /* ipRouteInfo */ /** @note returning zeroDotZero (0.0) no routing protocol specific MIB */ od->instance = MIB_OBJECT_TAB; 8033838: 2302 movs r3, #2 803383a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803383c: 2301 movs r3, #1 803383e: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8033840: 2306 movs r3, #6 8033842: 7093 strb r3, [r2, #2] od->v_len = iprouteinfo.len * sizeof(s32_t); 8033844: 2308 movs r3, #8 8033846: 8093 strh r3, [r2, #4] break; 8033848: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_rteentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 803384a: 2300 movs r3, #0 803384c: 7013 strb r3, [r2, #0] 803384e: 4770 bx lr 08033850 : icmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if ((ident_len == 2) && 8033850: 2801 cmp r0, #1 8033852: d110 bne.n 8033876 (ident[0] > 0) && (ident[0] < 27)) 8033854: f851 3c04 ldr.w r3, [r1, #-4] icmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if ((ident_len == 2) && 8033858: 2b00 cmp r3, #0 803385a: dd0c ble.n 8033876 (ident[0] > 0) && (ident[0] < 27)) 803385c: 2b1a cmp r3, #26 803385e: dc0a bgt.n 8033876 { od->id_inst_len = ident_len; 8033860: 2302 movs r3, #2 8033862: 7193 strb r3, [r2, #6] od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033864: 2341 movs r3, #65 ; 0x41 static void icmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033866: 3904 subs r1, #4 od->id_inst_len = ident_len; od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033868: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 803386a: 2304 movs r3, #4 ident -= 1; if ((ident_len == 2) && (ident[0] > 0) && (ident[0] < 27)) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 803386c: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 803386e: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033870: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 8033872: 8093 strh r3, [r2, #4] 8033874: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("icmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033876: 2300 movs r3, #0 8033878: 7013 strb r3, [r2, #0] 803387a: 4770 bx lr 0803387c : u32_t *uint_ptr = (u32_t*)value; u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 803387c: 6883 ldr r3, [r0, #8] switch (id) 803387e: 781b ldrb r3, [r3, #0] 8033880: 3b01 subs r3, #1 8033882: 2b19 cmp r3, #25 8033884: d843 bhi.n 803390e 8033886: e8df f003 tbb [pc, r3] 803388a: 0f0d .short 0x0f0d 803388c: 17151311 .word 0x17151311 8033890: 1f1d1b19 .word 0x1f1d1b19 8033894: 27252321 .word 0x27252321 8033898: 2f2d2b29 .word 0x2f2d2b29 803389c: 37353331 .word 0x37353331 80338a0: 3f3d3b39 .word 0x3f3d3b39 { case 1: /* icmpInMsgs */ *uint_ptr = icmpinmsgs; 80338a4: 4b1a ldr r3, [pc, #104] ; (8033910 ) 80338a6: e030 b.n 803390a break; case 2: /* icmpInErrors */ *uint_ptr = icmpinerrors; 80338a8: 4b1a ldr r3, [pc, #104] ; (8033914 ) 80338aa: e02e b.n 803390a break; case 3: /* icmpInDestUnreachs */ *uint_ptr = icmpindestunreachs; 80338ac: 4b1a ldr r3, [pc, #104] ; (8033918 ) 80338ae: e02c b.n 803390a break; case 4: /* icmpInTimeExcds */ *uint_ptr = icmpintimeexcds; 80338b0: 4b1a ldr r3, [pc, #104] ; (803391c ) 80338b2: e02a b.n 803390a break; case 5: /* icmpInParmProbs */ *uint_ptr = icmpinparmprobs; 80338b4: 4b1a ldr r3, [pc, #104] ; (8033920 ) 80338b6: e028 b.n 803390a break; case 6: /* icmpInSrcQuenchs */ *uint_ptr = icmpinsrcquenchs; 80338b8: 4b1a ldr r3, [pc, #104] ; (8033924 ) 80338ba: e026 b.n 803390a break; case 7: /* icmpInRedirects */ *uint_ptr = icmpinredirects; 80338bc: 4b1a ldr r3, [pc, #104] ; (8033928 ) 80338be: e024 b.n 803390a break; case 8: /* icmpInEchos */ *uint_ptr = icmpinechos; 80338c0: 4b1a ldr r3, [pc, #104] ; (803392c ) 80338c2: e022 b.n 803390a break; case 9: /* icmpInEchoReps */ *uint_ptr = icmpinechoreps; 80338c4: 4b1a ldr r3, [pc, #104] ; (8033930 ) 80338c6: e020 b.n 803390a break; case 10: /* icmpInTimestamps */ *uint_ptr = icmpintimestamps; 80338c8: 4b1a ldr r3, [pc, #104] ; (8033934 ) 80338ca: e01e b.n 803390a break; case 11: /* icmpInTimestampReps */ *uint_ptr = icmpintimestampreps; 80338cc: 4b1a ldr r3, [pc, #104] ; (8033938 ) 80338ce: e01c b.n 803390a break; case 12: /* icmpInAddrMasks */ *uint_ptr = icmpinaddrmasks; 80338d0: 4b1a ldr r3, [pc, #104] ; (803393c ) 80338d2: e01a b.n 803390a break; case 13: /* icmpInAddrMaskReps */ *uint_ptr = icmpinaddrmaskreps; 80338d4: 4b1a ldr r3, [pc, #104] ; (8033940 ) 80338d6: e018 b.n 803390a break; case 14: /* icmpOutMsgs */ *uint_ptr = icmpoutmsgs; 80338d8: 4b1a ldr r3, [pc, #104] ; (8033944 ) 80338da: e016 b.n 803390a break; case 15: /* icmpOutErrors */ *uint_ptr = icmpouterrors; 80338dc: 4b1a ldr r3, [pc, #104] ; (8033948 ) 80338de: e014 b.n 803390a break; case 16: /* icmpOutDestUnreachs */ *uint_ptr = icmpoutdestunreachs; 80338e0: 4b1a ldr r3, [pc, #104] ; (803394c ) 80338e2: e012 b.n 803390a break; case 17: /* icmpOutTimeExcds */ *uint_ptr = icmpouttimeexcds; 80338e4: 4b1a ldr r3, [pc, #104] ; (8033950 ) 80338e6: e010 b.n 803390a break; case 18: /* icmpOutParmProbs */ *uint_ptr = icmpoutparmprobs; 80338e8: 4b1a ldr r3, [pc, #104] ; (8033954 ) 80338ea: e00e b.n 803390a break; case 19: /* icmpOutSrcQuenchs */ *uint_ptr = icmpoutsrcquenchs; 80338ec: 4b1a ldr r3, [pc, #104] ; (8033958 ) 80338ee: e00c b.n 803390a break; case 20: /* icmpOutRedirects */ *uint_ptr = icmpoutredirects; 80338f0: 4b1a ldr r3, [pc, #104] ; (803395c ) 80338f2: e00a b.n 803390a break; case 21: /* icmpOutEchos */ *uint_ptr = icmpoutechos; 80338f4: 4b1a ldr r3, [pc, #104] ; (8033960 ) 80338f6: e008 b.n 803390a break; case 22: /* icmpOutEchoReps */ *uint_ptr = icmpoutechoreps; 80338f8: 4b1a ldr r3, [pc, #104] ; (8033964 ) 80338fa: e006 b.n 803390a break; case 23: /* icmpOutTimestamps */ *uint_ptr = icmpouttimestamps; 80338fc: 4b1a ldr r3, [pc, #104] ; (8033968 ) 80338fe: e004 b.n 803390a break; case 24: /* icmpOutTimestampReps */ *uint_ptr = icmpouttimestampreps; 8033900: 4b1a ldr r3, [pc, #104] ; (803396c ) 8033902: e002 b.n 803390a break; case 25: /* icmpOutAddrMasks */ *uint_ptr = icmpoutaddrmasks; 8033904: 4b1a ldr r3, [pc, #104] ; (8033970 ) 8033906: e000 b.n 803390a break; case 26: /* icmpOutAddrMaskReps */ *uint_ptr = icmpoutaddrmaskreps; 8033908: 4b1a ldr r3, [pc, #104] ; (8033974 ) 803390a: 681b ldr r3, [r3, #0] 803390c: 6013 str r3, [r2, #0] 803390e: 4770 bx lr 8033910: 2000c4b8 .word 0x2000c4b8 8033914: 2000c4b4 .word 0x2000c4b4 8033918: 2000c490 .word 0x2000c490 803391c: 2000c574 .word 0x2000c574 8033920: 2000c5a8 .word 0x2000c5a8 8033924: 2000c4a0 .word 0x2000c4a0 8033928: 2000c4cc .word 0x2000c4cc 803392c: 2000c56c .word 0x2000c56c 8033930: 2000c4e4 .word 0x2000c4e4 8033934: 2000c4d4 .word 0x2000c4d4 8033938: 2000c514 .word 0x2000c514 803393c: 2000c5ac .word 0x2000c5ac 8033940: 2000c548 .word 0x2000c548 8033944: 2000c538 .word 0x2000c538 8033948: 2000c5bc .word 0x2000c5bc 803394c: 2000c550 .word 0x2000c550 8033950: 2000c504 .word 0x2000c504 8033954: 2000c4c8 .word 0x2000c4c8 8033958: 2000c51c .word 0x2000c51c 803395c: 2000c4d8 .word 0x2000c4d8 8033960: 2000c5b8 .word 0x2000c5b8 8033964: 2000c558 .word 0x2000c558 8033968: 2000c524 .word 0x2000c524 803396c: 2000c508 .word 0x2000c508 8033970: 2000c4d0 .word 0x2000c4d0 8033974: 2000c530 .word 0x2000c530 08033978 : s32_t *sint_ptr = (s32_t*)value; u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033978: 6883 ldr r3, [r0, #8] switch (id) 803397a: 781b ldrb r3, [r3, #0] 803397c: 3b01 subs r3, #1 803397e: 2b0e cmp r3, #14 8033980: d836 bhi.n 80339f0 8033982: e8df f003 tbb [pc, r3] 8033986: 0a08 .short 0x0a08 8033988: 1412100d .word 0x1412100d 803398c: 2a1a1816 .word 0x2a1a1816 8033990: 30352e2c .word 0x30352e2c 8033994: 32 .byte 0x32 8033995: 00 .byte 0x00 { case 1: /* tcpRtoAlgorithm, vanj(4) */ *sint_ptr = 4; 8033996: 2304 movs r3, #4 8033998: e029 b.n 80339ee break; case 2: /* tcpRtoMin */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 1000; 803399a: f44f 737a mov.w r3, #1000 ; 0x3e8 803399e: e026 b.n 80339ee break; case 3: /* tcpRtoMax */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 60000; 80339a0: f64e 2360 movw r3, #60000 ; 0xea60 80339a4: e023 b.n 80339ee break; case 4: /* tcpMaxConn */ *sint_ptr = MEMP_NUM_TCP_PCB; 80339a6: 230c movs r3, #12 80339a8: e021 b.n 80339ee break; case 5: /* tcpActiveOpens */ *uint_ptr = tcpactiveopens; 80339aa: 4b12 ldr r3, [pc, #72] ; (80339f4 ) 80339ac: e01e b.n 80339ec break; case 6: /* tcpPassiveOpens */ *uint_ptr = tcppassiveopens; 80339ae: 4b12 ldr r3, [pc, #72] ; (80339f8 ) 80339b0: e01c b.n 80339ec break; case 7: /* tcpAttemptFails */ *uint_ptr = tcpattemptfails; 80339b2: 4b12 ldr r3, [pc, #72] ; (80339fc ) 80339b4: e01a b.n 80339ec break; case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; 80339b6: 4b12 ldr r3, [pc, #72] ; (8033a00 ) 80339b8: e018 b.n 80339ec break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; 80339ba: 4b12 ldr r3, [pc, #72] ; (8033a04 ) case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; 80339bc: 2100 movs r1, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 80339be: 681b ldr r3, [r3, #0] while (pcb != NULL) 80339c0: e007 b.n 80339d2 { if ((pcb->state == ESTABLISHED) || 80339c2: 7e18 ldrb r0, [r3, #24] 80339c4: 2804 cmp r0, #4 80339c6: d001 beq.n 80339cc 80339c8: 2807 cmp r0, #7 80339ca: d101 bne.n 80339d0 (pcb->state == CLOSE_WAIT)) { tcpcurrestab++; 80339cc: 3101 adds r1, #1 80339ce: b289 uxth r1, r1 } pcb = pcb->next; 80339d0: 68db ldr r3, [r3, #12] break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; while (pcb != NULL) 80339d2: 2b00 cmp r3, #0 80339d4: d1f5 bne.n 80339c2 { tcpcurrestab++; } pcb = pcb->next; } *uint_ptr = tcpcurrestab; 80339d6: 6011 str r1, [r2, #0] } break; 80339d8: 4770 bx lr case 10: /* tcpInSegs */ *uint_ptr = tcpinsegs; 80339da: 4b0b ldr r3, [pc, #44] ; (8033a08 ) 80339dc: e006 b.n 80339ec break; case 11: /* tcpOutSegs */ *uint_ptr = tcpoutsegs; 80339de: 4b0b ldr r3, [pc, #44] ; (8033a0c ) 80339e0: e004 b.n 80339ec break; case 12: /* tcpRetransSegs */ *uint_ptr = tcpretranssegs; 80339e2: 4b0b ldr r3, [pc, #44] ; (8033a10 ) 80339e4: e002 b.n 80339ec break; case 14: /* tcpInErrs */ *uint_ptr = tcpinerrs; 80339e6: 4b0b ldr r3, [pc, #44] ; (8033a14 ) 80339e8: e000 b.n 80339ec break; case 15: /* tcpOutRsts */ *uint_ptr = tcpoutrsts; 80339ea: 4b0b ldr r3, [pc, #44] ; (8033a18 ) 80339ec: 681b ldr r3, [r3, #0] 80339ee: 6013 str r3, [r2, #0] 80339f0: 4770 bx lr 80339f2: bf00 nop 80339f4: 2000c4ac .word 0x2000c4ac 80339f8: 2000c4e0 .word 0x2000c4e0 80339fc: 2000c52c .word 0x2000c52c 8033a00: 2000c4c0 .word 0x2000c4c0 8033a04: 2000ff20 .word 0x2000ff20 8033a08: 2000c53c .word 0x2000c53c 8033a0c: 2000c588 .word 0x2000c588 8033a10: 2000c55c .word 0x2000c55c 8033a14: 2000c4e8 .word 0x2000c4e8 8033a18: 2000c54c .word 0x2000c54c 08033a1c : udp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if ((ident_len == 2) && 8033a1c: 2801 cmp r0, #1 8033a1e: d110 bne.n 8033a42 (ident[0] > 0) && (ident[0] < 6)) 8033a20: f851 3c04 ldr.w r3, [r1, #-4] udp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if ((ident_len == 2) && 8033a24: 2b00 cmp r3, #0 8033a26: dd0c ble.n 8033a42 (ident[0] > 0) && (ident[0] < 6)) 8033a28: 2b05 cmp r3, #5 8033a2a: dc0a bgt.n 8033a42 { od->id_inst_len = ident_len; 8033a2c: 2302 movs r3, #2 8033a2e: 7193 strb r3, [r2, #6] od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033a30: 2341 movs r3, #65 ; 0x41 static void udp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033a32: 3904 subs r1, #4 od->id_inst_len = ident_len; od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033a34: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8033a36: 2304 movs r3, #4 ident -= 1; if ((ident_len == 2) && (ident[0] > 0) && (ident[0] < 6)) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033a38: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 8033a3a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033a3c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 8033a3e: 8093 strh r3, [r2, #4] 8033a40: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033a42: 2300 movs r3, #0 8033a44: 7013 strb r3, [r2, #0] 8033a46: 4770 bx lr 08033a48 : u32_t *uint_ptr = (u32_t*)value; u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033a48: 6883 ldr r3, [r0, #8] switch (id) 8033a4a: 781b ldrb r3, [r3, #0] 8033a4c: 3b01 subs r3, #1 8033a4e: 2b03 cmp r3, #3 8033a50: d80c bhi.n 8033a6c 8033a52: e8df f003 tbb [pc, r3] 8033a56: 0402 .short 0x0402 8033a58: 0806 .short 0x0806 { case 1: /* udpInDatagrams */ *uint_ptr = udpindatagrams; 8033a5a: 4b05 ldr r3, [pc, #20] ; (8033a70 ) 8033a5c: e004 b.n 8033a68 break; case 2: /* udpNoPorts */ *uint_ptr = udpnoports; 8033a5e: 4b05 ldr r3, [pc, #20] ; (8033a74 ) 8033a60: e002 b.n 8033a68 break; case 3: /* udpInErrors */ *uint_ptr = udpinerrors; 8033a62: 4b05 ldr r3, [pc, #20] ; (8033a78 ) 8033a64: e000 b.n 8033a68 break; case 4: /* udpOutDatagrams */ *uint_ptr = udpoutdatagrams; 8033a66: 4b05 ldr r3, [pc, #20] ; (8033a7c ) 8033a68: 681b ldr r3, [r3, #0] 8033a6a: 6013 str r3, [r2, #0] 8033a6c: 4770 bx lr 8033a6e: bf00 nop 8033a70: 2000c568 .word 0x2000c568 8033a74: 2000c520 .word 0x2000c520 8033a78: 2000c590 .word 0x2000c590 8033a7c: 2000c518 .word 0x2000c518 08033a80 : u32_t *uint_ptr = (u32_t*)value; u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033a80: 6883 ldr r3, [r0, #8] switch (id) 8033a82: 781b ldrb r3, [r3, #0] 8033a84: 3b01 subs r3, #1 8033a86: 2b1d cmp r3, #29 8033a88: d84b bhi.n 8033b22 8033a8a: e8df f003 tbb [pc, r3] 8033a8e: 110f .short 0x110f 8033a90: 19171513 .word 0x19171513 8033a94: 1f1d1b4a .word 0x1f1d1b4a 8033a98: 27252321 .word 0x27252321 8033a9c: 2f2d2b29 .word 0x2f2d2b29 8033aa0: 37353331 .word 0x37353331 8033aa4: 3d3b394a .word 0x3d3b394a 8033aa8: 4643413f .word 0x4643413f { case 1: /* snmpInPkts */ *uint_ptr = snmpinpkts; 8033aac: 4b1d ldr r3, [pc, #116] ; (8033b24 ) 8033aae: e032 b.n 8033b16 break; case 2: /* snmpOutPkts */ *uint_ptr = snmpoutpkts; 8033ab0: 4b1d ldr r3, [pc, #116] ; (8033b28 ) 8033ab2: e030 b.n 8033b16 break; case 3: /* snmpInBadVersions */ *uint_ptr = snmpinbadversions; 8033ab4: 4b1d ldr r3, [pc, #116] ; (8033b2c ) 8033ab6: e02e b.n 8033b16 break; case 4: /* snmpInBadCommunityNames */ *uint_ptr = snmpinbadcommunitynames; 8033ab8: 4b1d ldr r3, [pc, #116] ; (8033b30 ) 8033aba: e02c b.n 8033b16 break; case 5: /* snmpInBadCommunityUses */ *uint_ptr = snmpinbadcommunityuses; 8033abc: 4b1d ldr r3, [pc, #116] ; (8033b34 ) 8033abe: e02a b.n 8033b16 break; case 6: /* snmpInASNParseErrs */ *uint_ptr = snmpinasnparseerrs; 8033ac0: 4b1d ldr r3, [pc, #116] ; (8033b38 ) 8033ac2: e028 b.n 8033b16 break; case 8: /* snmpInTooBigs */ *uint_ptr = snmpintoobigs; 8033ac4: 4b1d ldr r3, [pc, #116] ; (8033b3c ) 8033ac6: e026 b.n 8033b16 break; case 9: /* snmpInNoSuchNames */ *uint_ptr = snmpinnosuchnames; 8033ac8: 4b1d ldr r3, [pc, #116] ; (8033b40 ) 8033aca: e024 b.n 8033b16 break; case 10: /* snmpInBadValues */ *uint_ptr = snmpinbadvalues; 8033acc: 4b1d ldr r3, [pc, #116] ; (8033b44 ) 8033ace: e022 b.n 8033b16 break; case 11: /* snmpInReadOnlys */ *uint_ptr = snmpinreadonlys; 8033ad0: 4b1d ldr r3, [pc, #116] ; (8033b48 ) 8033ad2: e020 b.n 8033b16 break; case 12: /* snmpInGenErrs */ *uint_ptr = snmpingenerrs; 8033ad4: 4b1d ldr r3, [pc, #116] ; (8033b4c ) 8033ad6: e01e b.n 8033b16 break; case 13: /* snmpInTotalReqVars */ *uint_ptr = snmpintotalreqvars; 8033ad8: 4b1d ldr r3, [pc, #116] ; (8033b50 ) 8033ada: e01c b.n 8033b16 break; case 14: /* snmpInTotalSetVars */ *uint_ptr = snmpintotalsetvars; 8033adc: 4b1d ldr r3, [pc, #116] ; (8033b54 ) 8033ade: e01a b.n 8033b16 break; case 15: /* snmpInGetRequests */ *uint_ptr = snmpingetrequests; 8033ae0: 4b1d ldr r3, [pc, #116] ; (8033b58 ) 8033ae2: e018 b.n 8033b16 break; case 16: /* snmpInGetNexts */ *uint_ptr = snmpingetnexts; 8033ae4: 4b1d ldr r3, [pc, #116] ; (8033b5c ) 8033ae6: e016 b.n 8033b16 break; case 17: /* snmpInSetRequests */ *uint_ptr = snmpinsetrequests; 8033ae8: 4b1d ldr r3, [pc, #116] ; (8033b60 ) 8033aea: e014 b.n 8033b16 break; case 18: /* snmpInGetResponses */ *uint_ptr = snmpingetresponses; 8033aec: 4b1d ldr r3, [pc, #116] ; (8033b64 ) 8033aee: e012 b.n 8033b16 break; case 19: /* snmpInTraps */ *uint_ptr = snmpintraps; 8033af0: 4b1d ldr r3, [pc, #116] ; (8033b68 ) 8033af2: e010 b.n 8033b16 break; case 20: /* snmpOutTooBigs */ *uint_ptr = snmpouttoobigs; 8033af4: 4b1d ldr r3, [pc, #116] ; (8033b6c ) 8033af6: e00e b.n 8033b16 break; case 21: /* snmpOutNoSuchNames */ *uint_ptr = snmpoutnosuchnames; 8033af8: 4b1d ldr r3, [pc, #116] ; (8033b70 ) 8033afa: e00c b.n 8033b16 break; case 22: /* snmpOutBadValues */ *uint_ptr = snmpoutbadvalues; 8033afc: 4b1d ldr r3, [pc, #116] ; (8033b74 ) 8033afe: e00a b.n 8033b16 break; case 24: /* snmpOutGenErrs */ *uint_ptr = snmpoutgenerrs; 8033b00: 4b1d ldr r3, [pc, #116] ; (8033b78 ) 8033b02: e008 b.n 8033b16 break; case 25: /* snmpOutGetRequests */ *uint_ptr = snmpoutgetrequests; 8033b04: 4b1d ldr r3, [pc, #116] ; (8033b7c ) 8033b06: e006 b.n 8033b16 break; case 26: /* snmpOutGetNexts */ *uint_ptr = snmpoutgetnexts; 8033b08: 4b1d ldr r3, [pc, #116] ; (8033b80 ) 8033b0a: e004 b.n 8033b16 break; case 27: /* snmpOutSetRequests */ *uint_ptr = snmpoutsetrequests; 8033b0c: 4b1d ldr r3, [pc, #116] ; (8033b84 ) 8033b0e: e002 b.n 8033b16 break; case 28: /* snmpOutGetResponses */ *uint_ptr = snmpoutgetresponses; 8033b10: 4b1d ldr r3, [pc, #116] ; (8033b88 ) 8033b12: e000 b.n 8033b16 break; case 29: /* snmpOutTraps */ *uint_ptr = snmpouttraps; 8033b14: 4b1d ldr r3, [pc, #116] ; (8033b8c ) 8033b16: 681b ldr r3, [r3, #0] 8033b18: e002 b.n 8033b20 break; case 30: /* snmpEnableAuthenTraps */ *uint_ptr = *snmpenableauthentraps_ptr; 8033b1a: 4b1d ldr r3, [pc, #116] ; (8033b90 ) 8033b1c: 681b ldr r3, [r3, #0] 8033b1e: 781b ldrb r3, [r3, #0] 8033b20: 6013 str r3, [r2, #0] 8033b22: 4770 bx lr 8033b24: 2000c4c4 .word 0x2000c4c4 8033b28: 2000c594 .word 0x2000c594 8033b2c: 2000c580 .word 0x2000c580 8033b30: 2000c498 .word 0x2000c498 8033b34: 2000c49c .word 0x2000c49c 8033b38: 2000c584 .word 0x2000c584 8033b3c: 2000c544 .word 0x2000c544 8033b40: 2000c5c4 .word 0x2000c5c4 8033b44: 2000c560 .word 0x2000c560 8033b48: 2000c534 .word 0x2000c534 8033b4c: 2000c50c .word 0x2000c50c 8033b50: 2000c564 .word 0x2000c564 8033b54: 2000c4a4 .word 0x2000c4a4 8033b58: 2000c4f8 .word 0x2000c4f8 8033b5c: 2000c47c .word 0x2000c47c 8033b60: 2000c5a0 .word 0x2000c5a0 8033b64: 2000c4f4 .word 0x2000c4f4 8033b68: 2000c48c .word 0x2000c48c 8033b6c: 2000c4dc .word 0x2000c4dc 8033b70: 2000c4a8 .word 0x2000c4a8 8033b74: 2000c488 .word 0x2000c488 8033b78: 2000c5c8 .word 0x2000c5c8 8033b7c: 2000c500 .word 0x2000c500 8033b80: 2000c598 .word 0x2000c598 8033b84: 2000c5a4 .word 0x2000c5a4 8033b88: 2000c484 .word 0x2000c484 8033b8c: 2000c4fc .word 0x2000c4fc 8033b90: 200008a8 .word 0x200008a8 08033b94 : { u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033b94: 6883 ldr r3, [r0, #8] if (id == 30) 8033b96: 781b ldrb r3, [r3, #0] 8033b98: 2b1e cmp r3, #30 8033b9a: d103 bne.n 8033ba4 { /* snmpEnableAuthenTraps */ /* @todo @fixme: which kind of pointer is 'value'? s32_t or u8_t??? */ u8_t *ptr = (u8_t*)value; *snmpenableauthentraps_ptr = *ptr; 8033b9c: 4b02 ldr r3, [pc, #8] ; (8033ba8 ) 8033b9e: 7812 ldrb r2, [r2, #0] 8033ba0: 681b ldr r3, [r3, #0] 8033ba2: 701a strb r2, [r3, #0] 8033ba4: 4770 bx lr 8033ba6: bf00 nop 8033ba8: 200008a8 .word 0x200008a8 08033bac : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033bac: 2801 cmp r0, #1 * @param ident points to objectname.index * @param od points to object definition. */ static void ifentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 8033bae: b513 push {r0, r1, r4, lr} 8033bb0: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033bb2: d149 bne.n 8033c48 { od->id_inst_len = ident_len; 8033bb4: 2302 movs r3, #2 8033bb6: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033bb8: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033bba: 60a2 str r2, [r4, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def ifentry.%"U16_F"\n",(u16_t)id)); switch (id) 8033bbc: f811 2c04 ldrb.w r2, [r1, #-4] 8033bc0: 3a01 subs r2, #1 8033bc2: 2a15 cmp r2, #21 8033bc4: d840 bhi.n 8033c48 8033bc6: e8df f002 tbb [pc, r2] 8033bca: 0e0b .short 0x0e0b 8033bcc: 19140b0b .word 0x19140b0b 8033bd0: 302b0b27 .word 0x302b0b27 8033bd4: 30303030 .word 0x30303030 8033bd8: 30303030 .word 0x30303030 8033bdc: 37143030 .word 0x37143030 { case 1: /* ifIndex */ case 3: /* ifType */ case 4: /* ifMtu */ case 8: /* ifOperStatus */ od->instance = MIB_OBJECT_TAB; 8033be0: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033be2: 2201 movs r2, #1 8033be4: e01a b.n 8033c1c od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 2: /* ifDescr */ od->instance = MIB_OBJECT_TAB; od->access = MIB_OBJECT_READ_ONLY; 8033be6: 2201 movs r2, #1 8033be8: 7062 strb r2, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033bea: 2204 movs r2, #4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 2: /* ifDescr */ od->instance = MIB_OBJECT_TAB; 8033bec: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033bee: 70a2 strb r2, [r4, #2] 8033bf0: e028 b.n 8033c44 /** @todo this should be some sort of sizeof(struct netif.name) */ od->v_len = 2; break; case 5: /* ifSpeed */ case 21: /* ifOutQLen */ od->instance = MIB_OBJECT_TAB; 8033bf2: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033bf4: 2301 movs r3, #1 8033bf6: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 8033bf8: 2342 movs r3, #66 ; 0x42 8033bfa: e01a b.n 8033c32 break; case 6: /* ifPhysAddress */ { struct netif *netif; snmp_ifindextonetif(ident[1], &netif); 8033bfc: 6808 ldr r0, [r1, #0] 8033bfe: a901 add r1, sp, #4 8033c00: f001 f81c bl 8034c3c od->instance = MIB_OBJECT_TAB; 8033c04: 2302 movs r3, #2 8033c06: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033c08: 2301 movs r3, #1 8033c0a: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033c0c: 2304 movs r3, #4 8033c0e: 70a3 strb r3, [r4, #2] od->v_len = netif->hwaddr_len; 8033c10: 9b01 ldr r3, [sp, #4] 8033c12: f893 3026 ldrb.w r3, [r3, #38] ; 0x26 8033c16: e015 b.n 8033c44 } break; case 7: /* ifAdminStatus */ od->instance = MIB_OBJECT_TAB; 8033c18: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 8033c1a: 2203 movs r2, #3 8033c1c: 7062 strb r2, [r4, #1] 8033c1e: e008 b.n 8033c32 od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 9: /* ifLastChange */ od->instance = MIB_OBJECT_TAB; 8033c20: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033c22: 2301 movs r3, #1 8033c24: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8033c26: 2343 movs r3, #67 ; 0x43 8033c28: e003 b.n 8033c32 case 16: /* ifOutOctets */ case 17: /* ifOutUcastPkts */ case 18: /* ifOutNUcastPkts */ case 19: /* ifOutDiscarts */ case 20: /* ifOutErrors */ od->instance = MIB_OBJECT_TAB; 8033c2a: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033c2c: 2301 movs r3, #1 8033c2e: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033c30: 2341 movs r3, #65 ; 0x41 8033c32: 70a3 strb r3, [r4, #2] od->v_len = sizeof(u32_t); 8033c34: 2304 movs r3, #4 8033c36: e005 b.n 8033c44 break; case 22: /* ifSpecific */ /** @note returning zeroDotZero (0.0) no media specific MIB support */ od->instance = MIB_OBJECT_TAB; 8033c38: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8033c3a: 2301 movs r3, #1 8033c3c: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8033c3e: 2306 movs r3, #6 8033c40: 70a3 strb r3, [r4, #2] od->v_len = ifspecific.len * sizeof(s32_t); 8033c42: 2308 movs r3, #8 8033c44: 80a3 strh r3, [r4, #4] break; 8033c46: e001 b.n 8033c4c }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ifentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033c48: 2300 movs r3, #0 8033c4a: 7023 strb r3, [r4, #0] } } 8033c4c: bd1c pop {r2, r3, r4, pc} 8033c4e: 0000 movs r0, r0 08033c50 : } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033c50: b537 push {r0, r1, r2, r4, r5, lr} 8033c52: 4604 mov r4, r0 struct udp_pcb *pcb; ip_addr_t ip; u16_t port; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8033c54: 6880 ldr r0, [r0, #8] 8033c56: a901 add r1, sp, #4 8033c58: 3004 adds r0, #4 } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033c5a: 4615 mov r5, r2 struct udp_pcb *pcb; ip_addr_t ip; u16_t port; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8033c5c: f001 f80c bl 8034c78 LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; 8033c60: 68a1 ldr r1, [r4, #8] pcb = udp_pcbs; 8033c62: 4b0c ldr r3, [pc, #48] ; (8033c94 ) u16_t port; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; 8033c64: 8a8a ldrh r2, [r1, #20] pcb = udp_pcbs; 8033c66: 681b ldr r3, [r3, #0] while ((pcb != NULL) && !(ip_addr_cmp(&pcb->local_ip, &ip) && 8033c68: 9801 ldr r0, [sp, #4] snmp_oidtoip(&od->id_inst_ptr[1], &ip); LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; pcb = udp_pcbs; while ((pcb != NULL) && 8033c6a: e000 b.n 8033c6e !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) { pcb = pcb->next; 8033c6c: 68db ldr r3, [r3, #12] snmp_oidtoip(&od->id_inst_ptr[1], &ip); LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; pcb = udp_pcbs; while ((pcb != NULL) && 8033c6e: b17b cbz r3, 8033c90 8033c70: 681c ldr r4, [r3, #0] 8033c72: 4284 cmp r4, r0 8033c74: d1fa bne.n 8033c6c !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) 8033c76: 8a5c ldrh r4, [r3, #18] LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; pcb = udp_pcbs; while ((pcb != NULL) && !(ip_addr_cmp(&pcb->local_ip, &ip) && 8033c78: 4294 cmp r4, r2 8033c7a: d1f7 bne.n 8033c6c 8033c7c: e003 b.n 8033c86 switch (id) { case 1: /* udpLocalAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = pcb->local_ip; 8033c7e: 6028 str r0, [r5, #0] } break; 8033c80: e006 b.n 8033c90 case 2: /* udpLocalPort */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = pcb->local_port; 8033c82: 602a str r2, [r5, #0] } break; 8033c84: e004 b.n 8033c90 if (pcb != NULL) { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; switch (id) 8033c86: 780b ldrb r3, [r1, #0] 8033c88: 2b01 cmp r3, #1 8033c8a: d0f8 beq.n 8033c7e 8033c8c: 2b02 cmp r3, #2 8033c8e: d0f8 beq.n 8033c82 *sint_ptr = pcb->local_port; } break; } } } 8033c90: bd3e pop {r1, r2, r3, r4, r5, pc} 8033c92: bf00 nop 8033c94: 2000ff3c .word 0x2000ff3c 08033c98 : } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033c98: b573 push {r0, r1, r4, r5, r6, lr} 8033c9a: 4606 mov r6, r0 u16_t ifidx; ip_addr_t ip; struct netif *netif = netif_list; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8033c9c: 6880 ldr r0, [r0, #8] ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { u8_t id; u16_t ifidx; ip_addr_t ip; struct netif *netif = netif_list; 8033c9e: 4b18 ldr r3, [pc, #96] ; (8033d00 ) LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8033ca0: a901 add r1, sp, #4 8033ca2: 3004 adds r0, #4 ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { u8_t id; u16_t ifidx; ip_addr_t ip; struct netif *netif = netif_list; 8033ca4: 681c ldr r4, [r3, #0] } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033ca6: 4615 mov r5, r2 u16_t ifidx; ip_addr_t ip; struct netif *netif = netif_list; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8033ca8: f000 ffe6 bl 8034c78 ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8033cac: 9901 ldr r1, [sp, #4] ip_addr_t ip; struct netif *netif = netif_list; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); ifidx = 0; 8033cae: 2300 movs r3, #0 while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8033cb0: e002 b.n 8033cb8 { netif = netif->next; ifidx++; 8033cb2: 3301 adds r3, #1 LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) { netif = netif->next; 8033cb4: 6824 ldr r4, [r4, #0] ifidx++; 8033cb6: b29b uxth r3, r3 struct netif *netif = netif_list; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8033cb8: b304 cbz r4, 8033cfc 8033cba: 6862 ldr r2, [r4, #4] 8033cbc: 4291 cmp r1, r2 8033cbe: d1f8 bne.n 8033cb2 8033cc0: e00a b.n 8033cd8 switch (id) { case 1: /* ipAdEntAddr */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->ip_addr; 8033cc2: 6863 ldr r3, [r4, #4] 8033cc4: e006 b.n 8033cd4 } break; case 2: /* ipAdEntIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = ifidx + 1; 8033cc6: 3301 adds r3, #1 8033cc8: e004 b.n 8033cd4 } break; case 3: /* ipAdEntNetMask */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->netmask; 8033cca: 68a3 ldr r3, [r4, #8] 8033ccc: e002 b.n 8033cd4 { s32_t *sint_ptr = (s32_t*)value; /* lwIP oddity, there's no broadcast address in the netif we can rely on */ *sint_ptr = IPADDR_BROADCAST & 1; 8033cce: 2301 movs r3, #1 8033cd0: e000 b.n 8033cd4 *sint_ptr = (IP_HLEN + ((IP_REASS_MAX_PBUFS/2) * (PBUF_POOL_BUFSIZE - PBUF_LINK_HLEN - IP_HLEN))); #else /** @todo returning MTU would be a bad thing and returning a wild guess like '576' isn't good either */ *sint_ptr = 0; 8033cd2: 2300 movs r3, #0 8033cd4: 602b str r3, [r5, #0] #endif } break; 8033cd6: e011 b.n 8033cfc } if (netif != NULL) { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033cd8: 68b2 ldr r2, [r6, #8] switch (id) 8033cda: 7812 ldrb r2, [r2, #0] 8033cdc: 3a01 subs r2, #1 8033cde: 2a04 cmp r2, #4 8033ce0: d80c bhi.n 8033cfc 8033ce2: a101 add r1, pc, #4 ; (adr r1, 8033ce8 ) 8033ce4: f851 f022 ldr.w pc, [r1, r2, lsl #2] 8033ce8: 08033cc3 .word 0x08033cc3 8033cec: 08033cc7 .word 0x08033cc7 8033cf0: 08033ccb .word 0x08033ccb 8033cf4: 08033ccf .word 0x08033ccf 8033cf8: 08033cd3 .word 0x08033cd3 #endif } break; } } } 8033cfc: bd7c pop {r2, r3, r4, r5, r6, pc} 8033cfe: bf00 nop 8033d00: 2000ff14 .word 0x2000ff14 08033d04 : } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033d04: b530 push {r4, r5, lr} struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8033d06: 6883 ldr r3, [r0, #8] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033d08: b085 sub sp, #20 8033d0a: 4605 mov r5, r0 struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8033d0c: a903 add r1, sp, #12 8033d0e: 6858 ldr r0, [r3, #4] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033d10: 4614 mov r4, r2 struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8033d12: f000 ff93 bl 8034c3c snmp_oidtoip(&od->id_inst_ptr[2], &ip); 8033d16: 68a8 ldr r0, [r5, #8] 8033d18: a902 add r1, sp, #8 8033d1a: 3008 adds r0, #8 8033d1c: f000 ffac bl 8034c78 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 8033d20: 9803 ldr r0, [sp, #12] 8033d22: a902 add r1, sp, #8 8033d24: 466a mov r2, sp 8033d26: ab01 add r3, sp, #4 8033d28: f002 ffea bl 8036d00 8033d2c: 2800 cmp r0, #0 8033d2e: db15 blt.n 8033d5c { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033d30: 68ab ldr r3, [r5, #8] switch (id) 8033d32: 781a ldrb r2, [r3, #0] 8033d34: 3a01 subs r2, #1 8033d36: 2a03 cmp r2, #3 8033d38: d810 bhi.n 8033d5c 8033d3a: e8df f002 tbb [pc, r2] 8033d3e: 0402 .short 0x0402 8033d40: 0d0a .short 0x0d0a { case 1: /* ipNetToMediaIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8033d42: 685b ldr r3, [r3, #4] 8033d44: e009 b.n 8033d5a break; case 2: /* ipNetToMediaPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 8033d46: 9b00 ldr r3, [sp, #0] 8033d48: 681a ldr r2, [r3, #0] 8033d4a: 6022 str r2, [r4, #0] 8033d4c: 889b ldrh r3, [r3, #4] 8033d4e: 80a3 strh r3, [r4, #4] } break; 8033d50: e004 b.n 8033d5c case 3: /* ipNetToMediaNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 8033d52: 9b01 ldr r3, [sp, #4] 8033d54: 681b ldr r3, [r3, #0] 8033d56: e000 b.n 8033d5a break; case 4: /* ipNetToMediaType */ { s32_t *sint_ptr = (s32_t*)value; /* dynamic (?) */ *sint_ptr = 3; 8033d58: 2303 movs r3, #3 8033d5a: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 8033d5c: b005 add sp, #20 8033d5e: bd30 pop {r4, r5, pc} 08033d60 : } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033d60: b530 push {r4, r5, lr} struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8033d62: 6883 ldr r3, [r0, #8] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033d64: b085 sub sp, #20 8033d66: 4605 mov r5, r0 struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8033d68: a903 add r1, sp, #12 8033d6a: 6858 ldr r0, [r3, #4] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8033d6c: 4614 mov r4, r2 struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8033d6e: f000 ff65 bl 8034c3c snmp_oidtoip(&od->id_inst_ptr[2], &ip); 8033d72: 68a8 ldr r0, [r5, #8] 8033d74: a902 add r1, sp, #8 8033d76: 3008 adds r0, #8 8033d78: f000 ff7e bl 8034c78 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 8033d7c: 9803 ldr r0, [sp, #12] 8033d7e: a902 add r1, sp, #8 8033d80: 466a mov r2, sp 8033d82: ab01 add r3, sp, #4 8033d84: f002 ffbc bl 8036d00 8033d88: 2800 cmp r0, #0 8033d8a: db12 blt.n 8033db2 { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033d8c: 68aa ldr r2, [r5, #8] switch (id) 8033d8e: 7813 ldrb r3, [r2, #0] 8033d90: 2b02 cmp r3, #2 8033d92: d005 beq.n 8033da0 8033d94: 2b03 cmp r3, #3 8033d96: d009 beq.n 8033dac 8033d98: 2b01 cmp r3, #1 8033d9a: d10a bne.n 8033db2 { case 1: /* atIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8033d9c: 6853 ldr r3, [r2, #4] 8033d9e: e007 b.n 8033db0 break; case 2: /* atPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 8033da0: 9b00 ldr r3, [sp, #0] 8033da2: 681a ldr r2, [r3, #0] 8033da4: 6022 str r2, [r4, #0] 8033da6: 889b ldrh r3, [r3, #4] 8033da8: 80a3 strh r3, [r4, #4] } break; 8033daa: e002 b.n 8033db2 case 3: /* atNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 8033dac: 9b01 ldr r3, [sp, #4] 8033dae: 681b ldr r3, [r3, #0] 8033db0: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 8033db2: b005 add sp, #20 8033db4: bd30 pop {r4, r5, pc} 8033db6: 0000 movs r0, r0 08033db8 : u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8033db8: 6883 ldr r3, [r0, #8] switch (id) 8033dba: 781b ldrb r3, [r3, #0] 8033dbc: 2b05 cmp r3, #5 8033dbe: d007 beq.n 8033dd0 8033dc0: 2b06 cmp r3, #6 8033dc2: d00f beq.n 8033de4 8033dc4: 2b04 cmp r3, #4 8033dc6: d111 bne.n 8033dec { case 4: /* sysContact */ if ((syscontact_ptr != syscontact_default) && 8033dc8: 4b09 ldr r3, [pc, #36] ; (8033df0 ) 8033dca: 681a ldr r2, [r3, #0] 8033dcc: 4b09 ldr r3, [pc, #36] ; (8033df4 ) 8033dce: e002 b.n 8033dd6 { set_ok = 1; } break; case 5: /* sysName */ if ((sysname_ptr != sysname_default) && 8033dd0: 4b09 ldr r3, [pc, #36] ; (8033df8 ) 8033dd2: 681a ldr r2, [r3, #0] 8033dd4: 4b09 ldr r3, [pc, #36] ; (8033dfc ) 8033dd6: 429a cmp r2, r3 8033dd8: d008 beq.n 8033dec system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 8033dda: 29ff cmp r1, #255 ; 0xff 8033ddc: bf8c ite hi 8033dde: 2000 movhi r0, #0 8033de0: 2001 movls r0, #1 8033de2: 4770 bx lr { set_ok = 1; } break; case 6: /* sysLocation */ if ((syslocation_ptr != syslocation_default) && 8033de4: 4b06 ldr r3, [pc, #24] ; (8033e00 ) 8033de6: 681a ldr r2, [r3, #0] 8033de8: 4b06 ldr r3, [pc, #24] ; (8033e04 ) 8033dea: e7f4 b.n 8033dd6 system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 8033dec: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 8033dee: 4770 bx lr 8033df0: 20000924 .word 0x20000924 8033df4: 08044b44 .word 0x08044b44 8033df8: 200008b0 .word 0x200008b0 8033dfc: 0804485c .word 0x0804485c 8033e00: 20000a3c .word 0x20000a3c 8033e04: 0804488c .word 0x0804488c 08033e08 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 8033e08: 2801 cmp r0, #1 8033e0a: d120 bne.n 8033e4e { od->id_inst_len = ident_len; 8033e0c: 2006 movs r0, #6 static void atentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; 8033e0e: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; 8033e12: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 8033e14: 6093 str r3, [r2, #8] switch (ident[0]) 8033e16: f851 3c14 ldr.w r3, [r1, #-20] 8033e1a: 2b02 cmp r3, #2 8033e1c: d008 beq.n 8033e30 8033e1e: 2b03 cmp r3, #3 8033e20: d00d beq.n 8033e3e 8033e22: 2b01 cmp r3, #1 8033e24: d113 bne.n 8033e4e { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 8033e26: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 8033e28: 2103 movs r1, #3 od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 8033e2a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033e2c: 7051 strb r1, [r2, #1] 8033e2e: e00a b.n 8033e46 od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 2: /* atPhysAddress */ od->instance = MIB_OBJECT_TAB; 8033e30: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033e32: 2303 movs r3, #3 8033e34: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033e36: 2304 movs r3, #4 8033e38: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 8033e3a: 8090 strh r0, [r2, #4] break; 8033e3c: 4770 bx lr case 3: /* atNetAddress */ od->instance = MIB_OBJECT_TAB; 8033e3e: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_WRITE; 8033e40: 7053 strb r3, [r2, #1] od->access = MIB_OBJECT_READ_WRITE; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); od->v_len = 6; /** @todo try to use netif::hwaddr_len */ break; case 3: /* atNetAddress */ od->instance = MIB_OBJECT_TAB; 8033e42: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8033e44: 2340 movs r3, #64 ; 0x40 8033e46: 7093 strb r3, [r2, #2] od->v_len = 4; 8033e48: 2304 movs r3, #4 8033e4a: 8093 strh r3, [r2, #4] break; 8033e4c: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("atentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033e4e: 2300 movs r3, #0 8033e50: 7013 strb r3, [r2, #0] 8033e52: 4770 bx lr 08033e54 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033e54: 2801 cmp r0, #1 #endif /* LWIP_ARP */ } static void ip_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 8033e56: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033e58: d121 bne.n 8033e9e { od->id_inst_len = ident_len; 8033e5a: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033e5c: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8033e5e: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 8033e60: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def ip.%"U16_F".0\n",(u16_t)id)); switch (id) 8033e62: f811 3c04 ldrb.w r3, [r1, #-4] 8033e66: 2b17 cmp r3, #23 8033e68: d819 bhi.n 8033e9e 8033e6a: 490e ldr r1, [pc, #56] ; (8033ea4 ) 8033e6c: 4099 lsls r1, r3 8033e6e: d40b bmi.n 8033e88 8033e70: f44f 2180 mov.w r1, #262144 ; 0x40000 8033e74: 4099 lsls r1, r3 8033e76: d40c bmi.n 8033e92 8033e78: f04f 41c0 mov.w r1, #1610612736 ; 0x60000000 8033e7c: 4099 lsls r1, r3 8033e7e: d50e bpl.n 8033e9e { case 1: /* ipForwarding */ case 2: /* ipDefaultTTL */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 8033e80: 2303 movs r3, #3 LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def ip.%"U16_F".0\n",(u16_t)id)); switch (id) { case 1: /* ipForwarding */ case 2: /* ipDefaultTTL */ od->instance = MIB_OBJECT_SCALAR; 8033e82: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033e84: 7053 strb r3, [r2, #1] 8033e86: e006 b.n 8033e96 case 18: /* ipFragFails */ case 19: /* ipFragCreates */ case 23: /* ipRoutingDiscards */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033e88: 2341 movs r3, #65 ; 0x41 case 16: /* ipReasmFails */ case 17: /* ipFragOKs */ case 18: /* ipFragFails */ case 19: /* ipFragCreates */ case 23: /* ipRoutingDiscards */ od->instance = MIB_OBJECT_SCALAR; 8033e8a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033e8c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033e8e: 7093 strb r3, [r2, #2] 8033e90: e002 b.n 8033e98 od->v_len = sizeof(u32_t); break; case 13: /* ipReasmTimeout */ od->instance = MIB_OBJECT_SCALAR; 8033e92: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033e94: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033e96: 7094 strb r4, [r2, #2] od->v_len = sizeof(s32_t); 8033e98: 2304 movs r3, #4 8033e9a: 8093 strh r3, [r2, #4] break; 8033e9c: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033e9e: 2300 movs r3, #0 8033ea0: 7013 strb r3, [r2, #0] 8033ea2: bd10 pop {r4, pc} 8033ea4: 1ffbf100 .word 0x1ffbf100 08033ea8 : { /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 8033ea8: 2801 cmp r0, #1 8033eaa: d11c bne.n 8033ee6 { u8_t id; od->id_inst_len = ident_len; 8033eac: 2305 movs r3, #5 8033eae: 7193 strb r3, [r2, #6] static void ip_addrentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; 8033eb0: f1a1 0310 sub.w r3, r1, #16 if (ident_len == 5) { u8_t id; od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033eb4: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8033eb6: f811 3c10 ldrb.w r3, [r1, #-16] 8033eba: 2b05 cmp r3, #5 8033ebc: d813 bhi.n 8033ee6 8033ebe: f04f 5130 mov.w r1, #738197504 ; 0x2c000000 8033ec2: 4099 lsls r1, r3 8033ec4: d408 bmi.n 8033ed8 8033ec6: f04f 41a0 mov.w r1, #1342177280 ; 0x50000000 8033eca: 4099 lsls r1, r3 8033ecc: d50b bpl.n 8033ee6 { case 1: /* ipAdEntAddr */ case 3: /* ipAdEntNetMask */ od->instance = MIB_OBJECT_TAB; 8033ece: 2302 movs r3, #2 8033ed0: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033ed2: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8033ed4: 2340 movs r3, #64 ; 0x40 8033ed6: e002 b.n 8033ede od->v_len = 4; break; case 2: /* ipAdEntIfIndex */ case 4: /* ipAdEntBcastAddr */ case 5: /* ipAdEntReasmMaxSize */ od->instance = MIB_OBJECT_TAB; 8033ed8: 2302 movs r3, #2 8033eda: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033edc: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033ede: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033ee0: 2304 movs r3, #4 8033ee2: 8093 strh r3, [r2, #4] break; 8033ee4: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_addrentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033ee6: 2300 movs r3, #0 8033ee8: 7013 strb r3, [r2, #0] 8033eea: 4770 bx lr 08033eec : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 8033eec: 2801 cmp r0, #1 8033eee: d123 bne.n 8033f38 { u8_t id; od->id_inst_len = ident_len; 8033ef0: 2306 movs r3, #6 8033ef2: 7193 strb r3, [r2, #6] static void ip_ntomentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; 8033ef4: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { u8_t id; od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033ef8: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8033efa: f811 3c14 ldrb.w r3, [r1, #-20] 8033efe: 3b01 subs r3, #1 8033f00: 2b03 cmp r3, #3 8033f02: d819 bhi.n 8033f38 8033f04: e8df f003 tbb [pc, r3] 8033f08: 020f0702 .word 0x020f0702 { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 8033f0c: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 8033f0e: 2103 movs r1, #3 id = (u8_t)ident[0]; switch (id) { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 8033f10: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033f12: 7051 strb r1, [r2, #1] 8033f14: e00c b.n 8033f30 od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 2: /* ipNetToMediaPhysAddress */ od->instance = MIB_OBJECT_TAB; 8033f16: 2302 movs r3, #2 8033f18: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033f1a: 2303 movs r3, #3 8033f1c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8033f1e: 2304 movs r3, #4 8033f20: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 8033f22: 2306 movs r3, #6 8033f24: e006 b.n 8033f34 break; case 3: /* ipNetToMediaNetAddress */ od->instance = MIB_OBJECT_TAB; 8033f26: 2302 movs r3, #2 8033f28: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033f2a: 2303 movs r3, #3 8033f2c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8033f2e: 2340 movs r3, #64 ; 0x40 8033f30: 7093 strb r3, [r2, #2] od->v_len = 4; 8033f32: 2304 movs r3, #4 8033f34: 8093 strh r3, [r2, #4] break; 8033f36: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_ntomentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033f38: 2300 movs r3, #0 8033f3a: 7013 strb r3, [r2, #0] 8033f3c: 4770 bx lr 8033f3e: 0000 movs r0, r0 08033f40 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033f40: 2801 cmp r0, #1 #if LWIP_TCP /** @todo tcp grp */ static void tcp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 8033f42: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033f44: d121 bne.n 8033f8a { od->id_inst_len = ident_len; 8033f46: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033f48: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8033f4a: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 8033f4c: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def tcp.%"U16_F".0\n",(u16_t)id)); switch (id) 8033f4e: f811 3c04 ldrb.w r3, [r1, #-4] 8033f52: 2b0f cmp r3, #15 8033f54: d819 bhi.n 8033f8a 8033f56: 490e ldr r1, [pc, #56] ; (8033f90 ) 8033f58: 4099 lsls r1, r3 8033f5a: d40b bmi.n 8033f74 8033f5c: f44f 0180 mov.w r1, #4194304 ; 0x400000 8033f60: 4099 lsls r1, r3 8033f62: d40b bmi.n 8033f7c 8033f64: f04f 41f0 mov.w r1, #2013265920 ; 0x78000000 8033f68: 4099 lsls r1, r3 8033f6a: d50e bpl.n 8033f8a { case 1: /* tcpRtoAlgorithm */ case 2: /* tcpRtoMin */ case 3: /* tcpRtoMax */ case 4: /* tcpMaxConn */ od->instance = MIB_OBJECT_SCALAR; 8033f6c: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033f6e: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033f70: 7094 strb r4, [r2, #2] 8033f72: e007 b.n 8033f84 case 10: /* tcpInSegs */ case 11: /* tcpOutSegs */ case 12: /* tcpRetransSegs */ case 14: /* tcpInErrs */ case 15: /* tcpOutRsts */ od->instance = MIB_OBJECT_SCALAR; 8033f74: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033f76: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033f78: 2341 movs r3, #65 ; 0x41 8033f7a: e002 b.n 8033f82 od->v_len = sizeof(u32_t); break; case 9: /* tcpCurrEstab */ od->instance = MIB_OBJECT_TAB; 8033f7c: 7014 strb r4, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033f7e: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 8033f80: 2342 movs r3, #66 ; 0x42 8033f82: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8033f84: 2304 movs r3, #4 8033f86: 8093 strh r3, [r2, #4] break; 8033f88: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("tcp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033f8a: 2300 movs r3, #0 8033f8c: 7013 strb r3, [r2, #0] 8033f8e: bd10 pop {r4, pc} 8033f90: 07bb0000 .word 0x07bb0000 08033f94 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 8033f94: 2801 cmp r0, #1 8033f96: d116 bne.n 8033fc6 { od->id_inst_len = ident_len; 8033f98: 2306 movs r3, #6 8033f9a: 7193 strb r3, [r2, #6] static void udpentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; 8033f9c: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033fa0: 6093 str r3, [r2, #8] switch (ident[0]) 8033fa2: f851 3c14 ldr.w r3, [r1, #-20] 8033fa6: 2b01 cmp r3, #1 8033fa8: d002 beq.n 8033fb0 8033faa: 2b02 cmp r3, #2 8033fac: d10b bne.n 8033fc6 8033fae: e004 b.n 8033fba { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 8033fb0: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_ONLY; 8033fb2: 7053 strb r3, [r2, #1] od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 8033fb4: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8033fb6: 2340 movs r3, #64 ; 0x40 8033fb8: e001 b.n 8033fbe od->v_len = 4; break; case 2: /* udpLocalPort */ od->instance = MIB_OBJECT_TAB; 8033fba: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033fbc: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033fbe: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8033fc0: 2304 movs r3, #4 8033fc2: 8093 strh r3, [r2, #4] break; 8033fc4: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udpentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8033fc6: 2300 movs r3, #0 8033fc8: 7013 strb r3, [r2, #0] 8033fca: 4770 bx lr 08033fcc : snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033fcc: 2801 cmp r0, #1 } } static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 8033fce: b510 push {r4, lr} /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8033fd0: d119 bne.n 8034006 { u8_t id; od->id_inst_len = ident_len; 8033fd2: 2302 movs r3, #2 8033fd4: 7193 strb r3, [r2, #6] static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8033fd6: 1f0c subs r4, r1, #4 od->id_inst_len = ident_len; od->id_inst_ptr = ident; LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8033fd8: f811 1c04 ldrb.w r1, [r1, #-4] if (ident_len == 2) { u8_t id; od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8033fdc: 6094 str r4, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8033fde: 291e cmp r1, #30 8033fe0: d811 bhi.n 8034006 8033fe2: 4c0a ldr r4, [pc, #40] ; (803400c ) 8033fe4: 408c lsls r4, r1 8033fe6: d403 bmi.n 8033ff0 8033fe8: fa13 f101 lsls.w r1, r3, r1 8033fec: d404 bmi.n 8033ff8 8033fee: e00a b.n 8034006 case 25: /* snmpOutGetRequests */ case 26: /* snmpOutGetNexts */ case 27: /* snmpOutSetRequests */ case 28: /* snmpOutGetResponses */ case 29: /* snmpOutTraps */ od->instance = MIB_OBJECT_SCALAR; 8033ff0: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8033ff2: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8033ff4: 2341 movs r3, #65 ; 0x41 8033ff6: e002 b.n 8033ffe od->v_len = sizeof(u32_t); break; case 30: /* snmpEnableAuthenTraps */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 8033ff8: 2103 movs r1, #3 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); break; case 30: /* snmpEnableAuthenTraps */ od->instance = MIB_OBJECT_SCALAR; 8033ffa: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8033ffc: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8033ffe: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8034000: 2304 movs r3, #4 8034002: 8093 strh r3, [r2, #4] break; 8034004: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("snmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8034006: 2300 movs r3, #0 8034008: 7013 strb r3, [r2, #0] 803400a: bd10 pop {r4, pc} 803400c: 7efffefc .word 0x7efffefc 08034010 : u8_t id, set_ok; LWIP_UNUSED_ARG(len); set_ok = 0; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8034010: 6883 ldr r3, [r0, #8] if (id == 30) 8034012: 781b ldrb r3, [r3, #0] 8034014: 2b1e cmp r3, #30 8034016: d10f bne.n 8034038 { /* snmpEnableAuthenTraps */ s32_t *sint_ptr = (s32_t*)value; if (snmpenableauthentraps_ptr != &snmpenableauthentraps_default) 8034018: 4b08 ldr r3, [pc, #32] ; (803403c ) 803401a: 6810 ldr r0, [r2, #0] 803401c: 6819 ldr r1, [r3, #0] 803401e: 4b08 ldr r3, [pc, #32] ; (8034040 ) 8034020: 4299 cmp r1, r3 8034022: d005 beq.n 8034030 { /* we should have writable non-volatile mem here */ if ((*sint_ptr == 1) || (*sint_ptr == 2)) 8034024: 3801 subs r0, #1 snmp_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(len); set_ok = 0; 8034026: 2801 cmp r0, #1 8034028: bf8c ite hi 803402a: 2000 movhi r0, #0 803402c: 2001 movls r0, #1 803402e: 4770 bx lr 8034030: 1e83 subs r3, r0, #2 8034032: 4258 negs r0, r3 8034034: 4158 adcs r0, r3 8034036: 4770 bx lr 8034038: 2000 movs r0, #0 set_ok = 1; } } } return set_ok; } 803403a: 4770 bx lr 803403c: 200008a8 .word 0x200008a8 8034040: 08044940 .word 0x08044940 08034044 : * @param dst points to destination * @param src points to source * @param n number of octets to copy. */ void ocstrncpy(u8_t *dst, u8_t *src, u16_t n) { 8034044: b510 push {r4, lr} u16_t i = n; while (i > 0) { 8034046: 2300 movs r3, #0 8034048: e002 b.n 8034050 i--; *dst++ = *src++; 803404a: 5ccc ldrb r4, [r1, r3] 803404c: 54c4 strb r4, [r0, r3] 803404e: 3301 adds r3, #1 * @param n number of octets to copy. */ void ocstrncpy(u8_t *dst, u8_t *src, u16_t n) { u16_t i = n; while (i > 0) { 8034050: b29c uxth r4, r3 8034052: 42a2 cmp r2, r4 8034054: d1f9 bne.n 803404a i--; *dst++ = *src++; } } 8034056: bd10 pop {r4, pc} 08034058 : { u8_t id; LWIP_ASSERT("invalid len", len <= 0xff); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8034058: 6883 ldr r3, [r0, #8] switch (id) 803405a: 781b ldrb r3, [r3, #0] 803405c: 2b05 cmp r3, #5 return set_ok; } static void system_set_value(struct obj_def *od, u16_t len, void *value) { 803405e: b510 push {r4, lr} 8034060: 460c mov r4, r1 8034062: 4611 mov r1, r2 u8_t id; LWIP_ASSERT("invalid len", len <= 0xff); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; switch (id) 8034064: d00a beq.n 803407c 8034066: 2b06 cmp r3, #6 8034068: d00f beq.n 803408a 803406a: 2b04 cmp r3, #4 803406c: d115 bne.n 803409a { case 4: /* sysContact */ ocstrncpy(syscontact_ptr, (u8_t*)value, len); 803406e: 4b0b ldr r3, [pc, #44] ; (803409c ) 8034070: 4622 mov r2, r4 8034072: 6818 ldr r0, [r3, #0] 8034074: f7ff ffe6 bl 8034044 *syscontact_len_ptr = (u8_t)len; 8034078: 4b09 ldr r3, [pc, #36] ; (80340a0 ) 803407a: e00c b.n 8034096 break; case 5: /* sysName */ ocstrncpy(sysname_ptr, (u8_t*)value, len); 803407c: 4b09 ldr r3, [pc, #36] ; (80340a4 ) 803407e: 4622 mov r2, r4 8034080: 6818 ldr r0, [r3, #0] 8034082: f7ff ffdf bl 8034044 *sysname_len_ptr = (u8_t)len; 8034086: 4b08 ldr r3, [pc, #32] ; (80340a8 ) 8034088: e005 b.n 8034096 break; case 6: /* sysLocation */ ocstrncpy(syslocation_ptr, (u8_t*)value, len); 803408a: 4b08 ldr r3, [pc, #32] ; (80340ac ) 803408c: 4622 mov r2, r4 803408e: 6818 ldr r0, [r3, #0] 8034090: f7ff ffd8 bl 8034044 *syslocation_len_ptr = (u8_t)len; 8034094: 4b06 ldr r3, [pc, #24] ; (80340b0 ) 8034096: 681b ldr r3, [r3, #0] 8034098: 701c strb r4, [r3, #0] 803409a: bd10 pop {r4, pc} 803409c: 20000924 .word 0x20000924 80340a0: 200007a8 .word 0x200007a8 80340a4: 200008b0 .word 0x200008b0 80340a8: 200007a4 .word 0x200007a4 80340ac: 20000a3c .word 0x20000a3c 80340b0: 20000990 .word 0x20000990 080340b4 : * * @param dst points to destination * @param src points to source * @param n number of sub identifiers to copy. */ void objectidncpy(s32_t *dst, s32_t *src, u8_t n) 80340b4: 3904 subs r1, #4 { u8_t i = n; while(i > 0) { 80340b6: e005 b.n 80340c4 i--; *dst++ = *src++; 80340b8: f851 3f04 ldr.w r3, [r1, #4]! */ void objectidncpy(s32_t *dst, s32_t *src, u8_t n) { u8_t i = n; while(i > 0) { i--; 80340bc: 3a01 subs r2, #1 *dst++ = *src++; 80340be: f840 3b04 str.w r3, [r0], #4 */ void objectidncpy(s32_t *dst, s32_t *src, u8_t n) { u8_t i = n; while(i > 0) { i--; 80340c2: b2d2 uxtb r2, r2 * @param n number of sub identifiers to copy. */ void objectidncpy(s32_t *dst, s32_t *src, u8_t n) { u8_t i = n; while(i > 0) { 80340c4: 2a00 cmp r2, #0 80340c6: d1f7 bne.n 80340b8 i--; *dst++ = *src++; } } 80340c8: 4770 bx lr 80340ca: 0000 movs r0, r0 080340cc : * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void ifentry_get_value(struct obj_def *od, u16_t len, void *value) { 80340cc: b573 push {r0, r1, r4, r5, r6, lr} struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 80340ce: 6883 ldr r3, [r0, #8] * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void ifentry_get_value(struct obj_def *od, u16_t len, void *value) { 80340d0: 4606 mov r6, r0 80340d2: 460d mov r5, r1 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 80340d4: 6858 ldr r0, [r3, #4] 80340d6: a901 add r1, sp, #4 * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void ifentry_get_value(struct obj_def *od, u16_t len, void *value) { 80340d8: 4614 mov r4, r2 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 80340da: f000 fdaf bl 8034c3c LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 80340de: 68b3 ldr r3, [r6, #8] switch (id) 80340e0: 781a ldrb r2, [r3, #0] 80340e2: 3a01 subs r2, #1 80340e4: 2a15 cmp r2, #21 80340e6: d85c bhi.n 80341a2 80340e8: e8df f002 tbb [pc, r2] 80340ec: 15110d0b .word 0x15110d0b 80340f0: 2e221b18 .word 0x2e221b18 80340f4: 403d3a37 .word 0x403d3a37 80340f8: 46525243 .word 0x46525243 80340fc: 524f4c49 .word 0x524f4c49 8034100: 5552 .short 0x5552 { case 1: /* ifIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8034102: 685b ldr r3, [r3, #4] 8034104: e045 b.n 8034192 } break; case 2: /* ifDescr */ ocstrncpy((u8_t*)value, (u8_t*)netif->name, len); 8034106: 9901 ldr r1, [sp, #4] 8034108: 4620 mov r0, r4 803410a: 312e adds r1, #46 ; 0x2e 803410c: e00c b.n 8034128 break; case 3: /* ifType */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->link_type; 803410e: 9b01 ldr r3, [sp, #4] 8034110: f893 3031 ldrb.w r3, [r3, #49] ; 0x31 8034114: e03d b.n 8034192 } break; case 4: /* ifMtu */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->mtu; 8034116: 9b01 ldr r3, [sp, #4] 8034118: 8c9b ldrh r3, [r3, #36] ; 0x24 803411a: e03a b.n 8034192 } break; case 5: /* ifSpeed */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->link_speed; 803411c: 9b01 ldr r3, [sp, #4] 803411e: 6b5b ldr r3, [r3, #52] ; 0x34 8034120: e037 b.n 8034192 } break; case 6: /* ifPhysAddress */ ocstrncpy((u8_t*)value, netif->hwaddr, len); 8034122: 9901 ldr r1, [sp, #4] 8034124: 4620 mov r0, r4 8034126: 3127 adds r1, #39 ; 0x27 8034128: 462a mov r2, r5 803412a: f7ff ff8b bl 8034044 break; 803412e: e038 b.n 80341a2 case 7: /* ifAdminStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 8034130: 9b01 ldr r3, [sp, #4] 8034132: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8034136: 07d9 lsls r1, r3, #31 8034138: d50d bpl.n 8034156 { if (netif_is_link_up(netif)) 803413a: f003 0310 and.w r3, r3, #16 803413e: b2db uxtb r3, r3 8034140: b103 cbz r3, 8034144 8034142: e006 b.n 8034152 { *sint_ptr = 1; /* up */ } else { *sint_ptr = 7; /* lowerLayerDown */ 8034144: 2307 movs r3, #7 8034146: e024 b.n 8034192 } break; case 8: /* ifOperStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 8034148: 9b01 ldr r3, [sp, #4] 803414a: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 803414e: 07da lsls r2, r3, #31 8034150: d501 bpl.n 8034156 { *sint_ptr = 1; 8034152: 2301 movs r3, #1 8034154: e01d b.n 8034192 } else { *sint_ptr = 2; 8034156: 2302 movs r3, #2 8034158: e01b b.n 8034192 } break; case 9: /* ifLastChange */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ts; 803415a: 9b01 ldr r3, [sp, #4] 803415c: 6b9b ldr r3, [r3, #56] ; 0x38 803415e: e018 b.n 8034192 } break; case 10: /* ifInOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinoctets; 8034160: 9b01 ldr r3, [sp, #4] 8034162: 6bdb ldr r3, [r3, #60] ; 0x3c 8034164: e015 b.n 8034192 } break; case 11: /* ifInUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinucastpkts; 8034166: 9b01 ldr r3, [sp, #4] 8034168: 6c1b ldr r3, [r3, #64] ; 0x40 803416a: e012 b.n 8034192 } break; case 12: /* ifInNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinnucastpkts; 803416c: 9b01 ldr r3, [sp, #4] 803416e: 6c5b ldr r3, [r3, #68] ; 0x44 8034170: e00f b.n 8034192 } break; case 13: /* ifInDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifindiscards; 8034172: 9b01 ldr r3, [sp, #4] 8034174: 6c9b ldr r3, [r3, #72] ; 0x48 8034176: e00c b.n 8034192 } break; case 16: /* ifOutOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutoctets; 8034178: 9b01 ldr r3, [sp, #4] 803417a: 6cdb ldr r3, [r3, #76] ; 0x4c 803417c: e009 b.n 8034192 } break; case 17: /* ifOutUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutucastpkts; 803417e: 9b01 ldr r3, [sp, #4] 8034180: 6d1b ldr r3, [r3, #80] ; 0x50 8034182: e006 b.n 8034192 } break; case 18: /* ifOutNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutnucastpkts; 8034184: 9b01 ldr r3, [sp, #4] 8034186: 6d5b ldr r3, [r3, #84] ; 0x54 8034188: e003 b.n 8034192 } break; case 19: /* ifOutDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutdiscards; 803418a: 9b01 ldr r3, [sp, #4] 803418c: 6d9b ldr r3, [r3, #88] ; 0x58 803418e: e000 b.n 8034192 break; case 21: /* ifOutQLen */ /** @todo figure out if this must be 0 (no queue) or 1? */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = 0; 8034190: 2300 movs r3, #0 8034192: 6023 str r3, [r4, #0] } break; 8034194: e005 b.n 80341a2 case 22: /* ifSpecific */ objectidncpy((s32_t*)value, (s32_t*)ifspecific.id, (u8_t)(len / sizeof(s32_t))); 8034196: 4620 mov r0, r4 8034198: 4902 ldr r1, [pc, #8] ; (80341a4 ) 803419a: f3c5 0287 ubfx r2, r5, #2, #8 803419e: f7ff ff89 bl 80340b4 break; }; } 80341a2: bd7c pop {r2, r3, r4, r5, r6, pc} 80341a4: 080449c8 .word 0x080449c8 080341a8 : } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 80341a8: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} struct netif *netif; ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; 80341aa: 6885 ldr r5, [r0, #8] } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 80341ac: 460f mov r7, r1 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 80341ae: 1d28 adds r0, r5, #4 80341b0: a901 add r1, sp, #4 } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 80341b2: 4614 mov r4, r2 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 80341b4: f000 fd60 bl 8034c78 if (ip_addr_isany(&dest)) 80341b8: 9b01 ldr r3, [sp, #4] 80341ba: b91b cbnz r3, 80341c4 { /* ip_route() uses default netif for default route */ netif = netif_default; 80341bc: 4a23 ldr r2, [pc, #140] ; (803424c ) 80341be: 6810 ldr r0, [r2, #0] !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; } } if (netif != NULL) 80341c0: b960 cbnz r0, 80341dc 80341c2: e041 b.n 8034248 netif = netif_default; } else { /* not using ip_route(), need exact match! */ netif = netif_list; 80341c4: 4a22 ldr r2, [pc, #136] ; (8034250 ) 80341c6: 6810 ldr r0, [r2, #0] while ((netif != NULL) && 80341c8: e000 b.n 80341cc !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; 80341ca: 6800 ldr r0, [r0, #0] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 80341cc: 2800 cmp r0, #0 80341ce: d03b beq.n 8034248 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) 80341d0: 6846 ldr r6, [r0, #4] 80341d2: ea83 0206 eor.w r2, r3, r6 80341d6: 6886 ldr r6, [r0, #8] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 80341d8: 4232 tst r2, r6 80341da: d1f6 bne.n 80341ca } if (netif != NULL) { LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80341dc: 782d ldrb r5, [r5, #0] 80341de: 3d01 subs r5, #1 80341e0: 2d0c cmp r5, #12 80341e2: d831 bhi.n 8034248 80341e4: e8df f005 tbb [pc, r5] 80341e8: 14110d07 .word 0x14110d07 80341ec: 1c171414 .word 0x1c171414 80341f0: 14252321 .word 0x14252321 80341f4: 2a .byte 0x2a 80341f5: 00 .byte 0x00 { case 1: /* ipRouteDest */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 80341f6: b903 cbnz r3, 80341fa 80341f8: e01e b.n 8034238 ip_addr_set_zero(dst); } else { /* netifs have netaddress dest */ ip_addr_get_network(dst, &netif->ip_addr, &netif->netmask); 80341fa: 6882 ldr r2, [r0, #8] 80341fc: 6843 ldr r3, [r0, #4] 80341fe: 4013 ands r3, r2 8034200: e01a b.n 8034238 break; case 2: /* ipRouteIfIndex */ { s32_t *sint_ptr = (s32_t*)value; snmp_netiftoifindex(netif, sint_ptr); 8034202: 4621 mov r1, r4 8034204: f000 fd28 bl 8034c58 } break; 8034208: e01e b.n 8034248 case 3: /* ipRouteMetric1 */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 803420a: b983 cbnz r3, 803422e { /* default rte has metric 1 */ *sint_ptr = 1; 803420c: 2301 movs r3, #1 803420e: e013 b.n 8034238 case 6: /* ipRouteMetric4 */ case 12: /* ipRouteMetric5 */ { s32_t *sint_ptr = (s32_t*)value; /* not used */ *sint_ptr = -1; 8034210: f04f 33ff mov.w r3, #4294967295 8034214: e010 b.n 8034238 break; case 7: /* ipRouteNextHop */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 8034216: b90b cbnz r3, 803421c { /* default rte: gateway */ *dst = netif->gw; 8034218: 68c3 ldr r3, [r0, #12] 803421a: e00d b.n 8034238 } else { /* other rtes: netif ip_addr */ *dst = netif->ip_addr; 803421c: 6843 ldr r3, [r0, #4] 803421e: e00b b.n 8034238 break; case 8: /* ipRouteType */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 8034220: b90b cbnz r3, 8034226 { /* default rte is indirect */ *sint_ptr = 4; 8034222: 2304 movs r3, #4 8034224: e008 b.n 8034238 } else { /* other rtes are direct */ *sint_ptr = 3; 8034226: 2303 movs r3, #3 8034228: e006 b.n 8034238 break; case 9: /* ipRouteProto */ { s32_t *sint_ptr = (s32_t*)value; /* locally defined routes */ *sint_ptr = 2; 803422a: 2302 movs r3, #2 803422c: e004 b.n 8034238 case 10: /* ipRouteAge */ { s32_t *sint_ptr = (s32_t*)value; /** @todo (sysuptime - timestamp last change) / 100 @see snmp_insert_iprteidx_tree() */ *sint_ptr = 0; 803422e: 2300 movs r3, #0 8034230: e002 b.n 8034238 break; case 11: /* ipRouteMask */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 8034232: b903 cbnz r3, 8034236 8034234: e000 b.n 8034238 ip_addr_set_zero(dst); } else { /* other rtes use netmask */ *dst = netif->netmask; 8034236: 6883 ldr r3, [r0, #8] 8034238: 6023 str r3, [r4, #0] 803423a: e005 b.n 8034248 } } break; case 13: /* ipRouteInfo */ objectidncpy((s32_t*)value, (s32_t*)iprouteinfo.id, (u8_t)(len / sizeof(s32_t))); 803423c: 4620 mov r0, r4 803423e: 4905 ldr r1, [pc, #20] ; (8034254 ) 8034240: f3c7 0287 ubfx r2, r7, #2, #8 8034244: f7ff ff36 bl 80340b4 break; } } } 8034248: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 803424a: bf00 nop 803424c: 2000ff18 .word 0x2000ff18 8034250: 2000ff14 .word 0x2000ff14 8034254: 080447dc .word 0x080447dc 08034258 : * @param str if non-NULL then copy str pointer * @param len points to string length, excluding zero terminator */ void snmp_set_sysdesr(u8_t *str, u8_t *len) { if (str != NULL) 8034258: b118 cbz r0, 8034262 { sysdescr_ptr = str; 803425a: 4b02 ldr r3, [pc, #8] ; (8034264 ) 803425c: 6018 str r0, [r3, #0] sysdescr_len_ptr = len; 803425e: 4b02 ldr r3, [pc, #8] ; (8034268 ) 8034260: 6019 str r1, [r3, #0] 8034262: 4770 bx lr 8034264: 200008d0 .word 0x200008d0 8034268: 2000094c .word 0x2000094c 0803426c : * Initializes sysObjectID value. * * @param oid points to stuct snmp_obj_id to copy */ void snmp_set_sysobjid(struct snmp_obj_id *oid) { 803426c: 4601 mov r1, r0 803426e: b508 push {r3, lr} sysobjid = *oid; 8034270: 2284 movs r2, #132 ; 0x84 8034272: 4802 ldr r0, [pc, #8] ; (803427c ) 8034274: f7ed fd16 bl 8021ca4 8034278: bd08 pop {r3, pc} 803427a: bf00 nop 803427c: 200007fc .word 0x200007fc 08034280 : * Must be called at regular 10 msec interval from a timer interrupt * or signal handler depending on your runtime environment. */ void snmp_inc_sysuptime(void) { sysuptime++; 8034280: 4b02 ldr r3, [pc, #8] ; (803428c ) 8034282: 681a ldr r2, [r3, #0] 8034284: 3201 adds r2, #1 8034286: 601a str r2, [r3, #0] 8034288: 4770 bx lr 803428a: bf00 nop 803428c: 2000c554 .word 0x2000c554 08034290 : { sysuptime+=value; } void snmp_get_sysuptime(u32_t *value) { 8034290: b510 push {r4, lr} 8034292: 4604 mov r4, r0 SNMP_GET_SYSUPTIME(sysuptime); 8034294: f003 f983 bl 803759e 8034298: 230a movs r3, #10 803429a: 4a03 ldr r2, [pc, #12] ; (80342a8 ) 803429c: fbb0 f0f3 udiv r0, r0, r3 80342a0: 6010 str r0, [r2, #0] *value = sysuptime; 80342a2: 6020 str r0, [r4, #0] 80342a4: bd10 pop {r4, pc} 80342a6: bf00 nop 80342a8: 2000c554 .word 0x2000c554 080342ac : * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void system_get_value(struct obj_def *od, u16_t len, void *value) { 80342ac: 4613 mov r3, r2 u8_t id; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 80342ae: 6882 ldr r2, [r0, #8] switch (id) 80342b0: 7812 ldrb r2, [r2, #0] 80342b2: 3a01 subs r2, #1 * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void system_get_value(struct obj_def *od, u16_t len, void *value) { 80342b4: b510 push {r4, lr} 80342b6: 460c mov r4, r1 u8_t id; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; switch (id) 80342b8: 2a06 cmp r2, #6 80342ba: d825 bhi.n 8034308 80342bc: e8df f002 tbb [pc, r2] 80342c0: 140f0704 .word 0x140f0704 80342c4: 1a17 .short 0x1a17 80342c6: 22 .byte 0x22 80342c7: 00 .byte 0x00 { case 1: /* sysDescr */ ocstrncpy((u8_t*)value, sysdescr_ptr, len); 80342c8: 4618 mov r0, r3 80342ca: 4b10 ldr r3, [pc, #64] ; (803430c ) 80342cc: e014 b.n 80342f8 break; case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); 80342ce: 4910 ldr r1, [pc, #64] ; (8034310 ) 80342d0: 4618 mov r0, r3 80342d2: f3c4 0287 ubfx r2, r4, #2, #8 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80342d6: e8bd 4010 ldmia.w sp!, {r4, lr} { case 1: /* sysDescr */ ocstrncpy((u8_t*)value, sysdescr_ptr, len); break; case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); 80342da: f7ff beeb b.w 80340b4 break; case 3: /* sysUpTime */ { snmp_get_sysuptime((u32_t*)value); 80342de: 4618 mov r0, r3 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80342e0: e8bd 4010 ldmia.w sp!, {r4, lr} case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); break; case 3: /* sysUpTime */ { snmp_get_sysuptime((u32_t*)value); 80342e4: f7ff bfd4 b.w 8034290 } break; case 4: /* sysContact */ ocstrncpy((u8_t*)value, syscontact_ptr, len); 80342e8: 4618 mov r0, r3 80342ea: 4b0a ldr r3, [pc, #40] ; (8034314 ) 80342ec: e004 b.n 80342f8 break; case 5: /* sysName */ ocstrncpy((u8_t*)value, sysname_ptr, len); 80342ee: 4618 mov r0, r3 80342f0: 4b09 ldr r3, [pc, #36] ; (8034318 ) 80342f2: e001 b.n 80342f8 break; case 6: /* sysLocation */ ocstrncpy((u8_t*)value, syslocation_ptr, len); 80342f4: 4618 mov r0, r3 80342f6: 4b09 ldr r3, [pc, #36] ; (803431c ) 80342f8: 6819 ldr r1, [r3, #0] 80342fa: 4622 mov r2, r4 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80342fc: e8bd 4010 ldmia.w sp!, {r4, lr} break; case 5: /* sysName */ ocstrncpy((u8_t*)value, sysname_ptr, len); break; case 6: /* sysLocation */ ocstrncpy((u8_t*)value, syslocation_ptr, len); 8034300: f7ff bea0 b.w 8034044 break; case 7: /* sysServices */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; 8034304: 2248 movs r2, #72 ; 0x48 8034306: 601a str r2, [r3, #0] 8034308: bd10 pop {r4, pc} 803430a: bf00 nop 803430c: 200008d0 .word 0x200008d0 8034310: 20000800 .word 0x20000800 8034314: 20000924 .word 0x20000924 8034318: 200008b0 .word 0x200008b0 803431c: 20000a3c .word 0x20000a3c 08034320 : * @param ocstr if non-NULL then copy str pointer * @param ocstrlen points to string length, excluding zero terminator */ void snmp_set_syscontact(u8_t *ocstr, u8_t *ocstrlen) { if (ocstr != NULL) 8034320: b118 cbz r0, 803432a { syscontact_ptr = ocstr; 8034322: 4b02 ldr r3, [pc, #8] ; (803432c ) 8034324: 6018 str r0, [r3, #0] syscontact_len_ptr = ocstrlen; 8034326: 4b02 ldr r3, [pc, #8] ; (8034330 ) 8034328: 6019 str r1, [r3, #0] 803432a: 4770 bx lr 803432c: 20000924 .word 0x20000924 8034330: 200007a8 .word 0x200007a8 08034334 : * @param ocstr if non-NULL then copy str pointer * @param ocstrlen points to string length, excluding zero terminator */ void snmp_set_sysname(u8_t *ocstr, u8_t *ocstrlen) { if (ocstr != NULL) 8034334: b118 cbz r0, 803433e { sysname_ptr = ocstr; 8034336: 4b02 ldr r3, [pc, #8] ; (8034340 ) 8034338: 6018 str r0, [r3, #0] sysname_len_ptr = ocstrlen; 803433a: 4b02 ldr r3, [pc, #8] ; (8034344 ) 803433c: 6019 str r1, [r3, #0] 803433e: 4770 bx lr 8034340: 200008b0 .word 0x200008b0 8034344: 200007a4 .word 0x200007a4 08034348 : * @param ocstr if non-NULL then copy str pointer * @param ocstrlen points to string length, excluding zero terminator */ void snmp_set_syslocation(u8_t *ocstr, u8_t *ocstrlen) { if (ocstr != NULL) 8034348: b118 cbz r0, 8034352 { syslocation_ptr = ocstr; 803434a: 4b02 ldr r3, [pc, #8] ; (8034354 ) 803434c: 6018 str r0, [r3, #0] syslocation_len_ptr = ocstrlen; 803434e: 4b02 ldr r3, [pc, #8] ; (8034358 ) 8034350: 6019 str r1, [r3, #0] 8034352: 4770 bx lr 8034354: 20000a3c .word 0x20000a3c 8034358: 20000990 .word 0x20000990 0803435c : { (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { 803435c: b507 push {r0, r1, r2, lr} struct mib_list_node *if_node = NULL; snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 803435e: 4806 ldr r0, [pc, #24] ; (8034378 ) (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 8034360: aa02 add r2, sp, #8 snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 8034362: 8b81 ldrh r1, [r0, #28] (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 8034364: 2300 movs r3, #0 8034366: f842 3d04 str.w r3, [r2, #-4]! snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 803436a: 3101 adds r1, #1 803436c: f000 fccc bl 8034d08 /* enable getnext traversal on filled table */ iftable.maxlength = 1; 8034370: 4b02 ldr r3, [pc, #8] ; (803437c ) 8034372: 2201 movs r2, #1 8034374: 825a strh r2, [r3, #18] } 8034376: bd0e pop {r1, r2, r3, pc} 8034378: 200007dc .word 0x200007dc 803437c: 20000954 .word 0x20000954 08034380 : /** * Inserts ARP table indexes (.xIfIndex.xNetAddress) * into arp table index trees (both atTable and ipNetToMediaTable). */ void snmp_insert_arpidx_tree(struct netif *ni, ip_addr_t *ip) { 8034380: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8034384: b086 sub sp, #24 8034386: 460c mov r4, r1 struct mib_list_node *at_node; s32_t arpidx[5]; u8_t level, tree; LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); 8034388: a901 add r1, sp, #4 803438a: f000 fc65 bl 8034c58 snmp_iptooid(ip, &arpidx[1]); 803438e: 4620 mov r0, r4 8034390: a902 add r1, sp, #8 8034392: f000 fc7e bl 8034c92 for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 8034396: f8df 80a0 ldr.w r8, [pc, #160] ; 8034438 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 803439a: 2500 movs r5, #0 { if (tree == 0) { at_rn = &arptree_root; 803439c: 4c1f ldr r4, [pc, #124] ; (803441c ) else { at_rn->get_object_def = ip_ntomentry_get_object_def; at_rn->get_value = ip_ntomentry_get_value; } at_rn->set_test = noleafs_set_test; 803439e: f8df 909c ldr.w r9, [pc, #156] ; 803443c at_rn->set_value = noleafs_set_value; 80343a2: f8df a09c ldr.w sl, [pc, #156] ; 8034440 for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 80343a6: 2d00 cmp r5, #0 80343a8: bf18 it ne 80343aa: 4644 movne r4, r8 } else { at_rn = &ipntomtree_root; 80343ac: 2600 movs r6, #0 } for (level = 0; level < 5; level++) { at_node = NULL; 80343ae: 2300 movs r3, #0 80343b0: 9300 str r3, [sp, #0] snmp_mib_node_insert(at_rn, arpidx[level], &at_node); 80343b2: ab01 add r3, sp, #4 80343b4: 4620 mov r0, r4 80343b6: f853 1026 ldr.w r1, [r3, r6, lsl #2] 80343ba: aa00 add r2, sp, #0 80343bc: b2f7 uxtb r7, r6 80343be: f000 fca3 bl 8034d08 if ((level != 4) && (at_node != NULL)) 80343c2: 2f04 cmp r7, #4 80343c4: d01d beq.n 8034402 80343c6: 9b00 ldr r3, [sp, #0] 80343c8: b1db cbz r3, 8034402 { if (at_node->nptr == NULL) 80343ca: 68dc ldr r4, [r3, #12] 80343cc: b9cc cbnz r4, 8034402 { at_rn = snmp_mib_lrn_alloc(); 80343ce: f000 fc79 bl 8034cc4 at_node->nptr = (struct mib_node*)at_rn; 80343d2: 9b00 ldr r3, [sp, #0] snmp_mib_node_insert(at_rn, arpidx[level], &at_node); if ((level != 4) && (at_node != NULL)) { if (at_node->nptr == NULL) { at_rn = snmp_mib_lrn_alloc(); 80343d4: 4604 mov r4, r0 at_node->nptr = (struct mib_node*)at_rn; 80343d6: 60d8 str r0, [r3, #12] if (at_rn != NULL) 80343d8: b920 cbnz r0, 80343e4 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 80343da: 3501 adds r5, #1 80343dc: b2ed uxtb r5, r5 80343de: 2d02 cmp r5, #2 80343e0: d1dc bne.n 803439c 80343e2: e012 b.n 803440a { at_rn = snmp_mib_lrn_alloc(); at_node->nptr = (struct mib_node*)at_rn; if (at_rn != NULL) { if (level == 3) 80343e4: 2f03 cmp r7, #3 80343e6: d10c bne.n 8034402 { if (tree == 0) 80343e8: b91d cbnz r5, 80343f2 { at_rn->get_object_def = atentry_get_object_def; 80343ea: 4b0d ldr r3, [pc, #52] ; (8034420 ) 80343ec: 6003 str r3, [r0, #0] at_rn->get_value = atentry_get_value; 80343ee: 4b0d ldr r3, [pc, #52] ; (8034424 ) 80343f0: e002 b.n 80343f8 } else { at_rn->get_object_def = ip_ntomentry_get_object_def; 80343f2: 4b0d ldr r3, [pc, #52] ; (8034428 ) 80343f4: 6003 str r3, [r0, #0] at_rn->get_value = ip_ntomentry_get_value; 80343f6: 4b0d ldr r3, [pc, #52] ; (803442c ) 80343f8: 6063 str r3, [r4, #4] } at_rn->set_test = noleafs_set_test; 80343fa: f8c4 9008 str.w r9, [r4, #8] at_rn->set_value = noleafs_set_value; 80343fe: f8c4 a00c str.w sl, [r4, #12] 8034402: 3601 adds r6, #1 } else { at_rn = &ipntomtree_root; } for (level = 0; level < 5; level++) 8034404: 2e05 cmp r6, #5 8034406: d1d2 bne.n 80343ae 8034408: e7e7 b.n 80343da } } } } /* enable getnext traversal on filled tables */ at.maxlength = 1; 803440a: 4a09 ldr r2, [pc, #36] ; (8034430 ) 803440c: 2301 movs r3, #1 803440e: 8253 strh r3, [r2, #18] ipntomtable.maxlength = 1; 8034410: 4a08 ldr r2, [pc, #32] ; (8034434 ) 8034412: 8253 strh r3, [r2, #18] } 8034414: b006 add sp, #24 8034416: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 803441a: bf00 nop 803441c: 20000928 .word 0x20000928 8034420: 08033e09 .word 0x08033e09 8034424: 08033d61 .word 0x08033d61 8034428: 08033eed .word 0x08033eed 803442c: 08033d05 .word 0x08033d05 8034430: 2000074c .word 0x2000074c 8034434: 20000730 .word 0x20000730 8034438: 20000a18 .word 0x20000a18 803443c: 08033623 .word 0x08033623 8034440: 08033627 .word 0x08033627 08034444 : /** * Removes ARP table indexes (.xIfIndex.xNetAddress) * from arp table index trees. */ void snmp_delete_arpidx_tree(struct netif *ni, ip_addr_t *ip) { 8034444: b5f0 push {r4, r5, r6, r7, lr} 8034446: b091 sub sp, #68 ; 0x44 8034448: 460c mov r4, r1 struct mib_list_rootnode *at_rn, *next, *del_rn[5]; struct mib_list_node *at_n, *del_n[5]; s32_t arpidx[5]; u8_t fc, tree, level, del_cnt; snmp_netiftoifindex(ni, &arpidx[0]); 803444a: a90b add r1, sp, #44 ; 0x2c 803444c: f000 fc04 bl 8034c58 snmp_iptooid(ip, &arpidx[1]); 8034450: 4620 mov r0, r4 8034452: a90c add r1, sp, #48 ; 0x30 8034454: f000 fc1d bl 8034c92 for (tree = 0; tree < 2; tree++) 8034458: 2700 movs r7, #0 { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 803445a: 4b26 ldr r3, [pc, #152] ; (80344f4 ) 803445c: 4d26 ldr r5, [pc, #152] ; (80344f8 ) } else { at_rn = &ipntomtree_root; 803445e: 2600 movs r6, #0 for (tree = 0; tree < 2; tree++) { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 8034460: 2f00 cmp r7, #0 8034462: bf08 it eq 8034464: 461d moveq r5, r3 } else { at_rn = &ipntomtree_root; 8034466: 4634 mov r4, r6 } level = 0; del_cnt = 0; while ((level < 5) && (at_rn != NULL)) { fc = snmp_mib_node_find(at_rn, arpidx[level], &at_n); 8034468: ab0b add r3, sp, #44 ; 0x2c 803446a: 4628 mov r0, r5 803446c: 58f1 ldr r1, [r6, r3] 803446e: aa00 add r2, sp, #0 8034470: f000 fc85 bl 8034d7e 8034474: b2c0 uxtb r0, r0 if (fc == 0) 8034476: b198 cbz r0, 80344a0 { /* arpidx[level] does not exist */ del_cnt = 0; at_rn = NULL; } else if (fc == 1) 8034478: 2801 cmp r0, #1 803447a: d10b bne.n 8034494 { del_rn[del_cnt] = at_rn; 803447c: ab10 add r3, sp, #64 ; 0x40 803447e: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = at_n; 8034482: 9b00 ldr r3, [sp, #0] del_cnt = 0; at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; 8034484: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = at_n; del_cnt++; 8034488: 3401 adds r4, #1 at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; del_n[del_cnt] = at_n; 803448a: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 803448e: b2e4 uxtb r4, r4 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8034490: 68dd ldr r5, [r3, #12] 8034492: e007 b.n 80344a4 } else if (fc == 2) 8034494: 2802 cmp r0, #2 8034496: d105 bne.n 80344a4 { /* reset delete (2 or more childs) */ del_cnt = 0; at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8034498: 9b00 ldr r3, [sp, #0] at_rn = (struct mib_list_rootnode*)(at_n->nptr); } else if (fc == 2) { /* reset delete (2 or more childs) */ del_cnt = 0; 803449a: 2400 movs r4, #0 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 803449c: 68dd ldr r5, [r3, #12] 803449e: e001 b.n 80344a4 { fc = snmp_mib_node_find(at_rn, arpidx[level], &at_n); if (fc == 0) { /* arpidx[level] does not exist */ del_cnt = 0; 80344a0: 4604 mov r4, r0 at_rn = NULL; 80344a2: 4605 mov r5, r0 80344a4: 3604 adds r6, #4 { at_rn = &ipntomtree_root; } level = 0; del_cnt = 0; while ((level < 5) && (at_rn != NULL)) 80344a6: 2e14 cmp r6, #20 80344a8: d011 beq.n 80344ce 80344aa: 2d00 cmp r5, #0 80344ac: d1dc bne.n 8034468 80344ae: e00e b.n 80344ce level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 80344b0: 3c01 subs r4, #1 80344b2: b2e4 uxtb r4, r4 at_rn = del_rn[del_cnt]; 80344b4: aa10 add r2, sp, #64 ; 0x40 80344b6: eb02 0384 add.w r3, r2, r4, lsl #2 at_n = del_n[del_cnt]; 80344ba: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; at_rn = del_rn[del_cnt]; 80344be: f853 0c3c ldr.w r0, [r3, #-60] at_n = del_n[del_cnt]; 80344c2: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(at_rn, at_n); 80344c4: f000 fc75 bl 8034db2 if (next != NULL) 80344c8: b108 cbz r0, 80344ce { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 80344ca: f000 fc19 bl 8034d00 at_rn = (struct mib_list_rootnode*)(at_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 80344ce: 2c00 cmp r4, #0 80344d0: d1ee bne.n 80344b0 u8_t fc, tree, level, del_cnt; snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 80344d2: 3701 adds r7, #1 80344d4: b2ff uxtb r7, r7 80344d6: 2f02 cmp r7, #2 80344d8: d1bf bne.n 803445a snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty tables */ if(arptree_root.count == 0) at.maxlength = 0; 80344da: 4b06 ldr r3, [pc, #24] ; (80344f4 ) 80344dc: 8b9b ldrh r3, [r3, #28] 80344de: b90b cbnz r3, 80344e4 80344e0: 4b06 ldr r3, [pc, #24] ; (80344fc ) 80344e2: 825c strh r4, [r3, #18] if(ipntomtree_root.count == 0) ipntomtable.maxlength = 0; 80344e4: 4b04 ldr r3, [pc, #16] ; (80344f8 ) 80344e6: 8b9b ldrh r3, [r3, #28] 80344e8: b90b cbnz r3, 80344ee 80344ea: 4a05 ldr r2, [pc, #20] ; (8034500 ) 80344ec: 8253 strh r3, [r2, #18] } 80344ee: b011 add sp, #68 ; 0x44 80344f0: bdf0 pop {r4, r5, r6, r7, pc} 80344f2: bf00 nop 80344f4: 20000928 .word 0x20000928 80344f8: 20000a18 .word 0x20000a18 80344fc: 2000074c .word 0x2000074c 8034500: 20000730 .word 0x20000730 08034504 : void snmp_inc_ipinreceives(void) { ipinreceives++; 8034504: 4b02 ldr r3, [pc, #8] ; (8034510 ) 8034506: 681a ldr r2, [r3, #0] 8034508: 3201 adds r2, #1 803450a: 601a str r2, [r3, #0] 803450c: 4770 bx lr 803450e: bf00 nop 8034510: 2000c528 .word 0x2000c528 08034514 : } void snmp_inc_ipinhdrerrors(void) { ipinhdrerrors++; 8034514: 4b02 ldr r3, [pc, #8] ; (8034520 ) 8034516: 681a ldr r2, [r3, #0] 8034518: 3201 adds r2, #1 803451a: 601a str r2, [r3, #0] 803451c: 4770 bx lr 803451e: bf00 nop 8034520: 2000c4b0 .word 0x2000c4b0 08034524 : } void snmp_inc_ipinaddrerrors(void) { ipinaddrerrors++; 8034524: 4b02 ldr r3, [pc, #8] ; (8034530 ) 8034526: 681a ldr r2, [r3, #0] 8034528: 3201 adds r2, #1 803452a: 601a str r2, [r3, #0] 803452c: 4770 bx lr 803452e: bf00 nop 8034530: 2000c494 .word 0x2000c494 08034534 : ipforwdatagrams++; } void snmp_inc_ipinunknownprotos(void) { ipinunknownprotos++; 8034534: 4b02 ldr r3, [pc, #8] ; (8034540 ) 8034536: 681a ldr r2, [r3, #0] 8034538: 3201 adds r2, #1 803453a: 601a str r2, [r3, #0] 803453c: 4770 bx lr 803453e: bf00 nop 8034540: 2000c4f0 .word 0x2000c4f0 08034544 : } void snmp_inc_ipindiscards(void) { ipindiscards++; 8034544: 4b02 ldr r3, [pc, #8] ; (8034550 ) 8034546: 681a ldr r2, [r3, #0] 8034548: 3201 adds r2, #1 803454a: 601a str r2, [r3, #0] 803454c: 4770 bx lr 803454e: bf00 nop 8034550: 2000c57c .word 0x2000c57c 08034554 : } void snmp_inc_ipindelivers(void) { ipindelivers++; 8034554: 4b02 ldr r3, [pc, #8] ; (8034560 ) 8034556: 681a ldr r2, [r3, #0] 8034558: 3201 adds r2, #1 803455a: 601a str r2, [r3, #0] 803455c: 4770 bx lr 803455e: bf00 nop 8034560: 2000c5b4 .word 0x2000c5b4 08034564 : } void snmp_inc_ipoutrequests(void) { ipoutrequests++; 8034564: 4b02 ldr r3, [pc, #8] ; (8034570 ) 8034566: 681a ldr r2, [r3, #0] 8034568: 3201 adds r2, #1 803456a: 601a str r2, [r3, #0] 803456c: 4770 bx lr 803456e: bf00 nop 8034570: 2000c59c .word 0x2000c59c 08034574 : } void snmp_inc_ipoutdiscards(void) { ipoutdiscards++; 8034574: 4b02 ldr r3, [pc, #8] ; (8034580 ) 8034576: 681a ldr r2, [r3, #0] 8034578: 3201 adds r2, #1 803457a: 601a str r2, [r3, #0] 803457c: 4770 bx lr 803457e: bf00 nop 8034580: 2000c540 .word 0x2000c540 08034584 : } void snmp_inc_ipoutnoroutes(void) { ipoutnoroutes++; 8034584: 4b02 ldr r3, [pc, #8] ; (8034590 ) 8034586: 681a ldr r2, [r3, #0] 8034588: 3201 adds r2, #1 803458a: 601a str r2, [r3, #0] 803458c: 4770 bx lr 803458e: bf00 nop 8034590: 2000c5c0 .word 0x2000c5c0 08034594 : /** * Inserts ipAddrTable indexes (.ipAdEntAddr) * into index tree. */ void snmp_insert_ipaddridx_tree(struct netif *ni) { 8034594: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034598: b086 sub sp, #24 struct mib_list_node *ipa_node; s32_t ipaddridx[4]; u8_t level; LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); 803459a: 3004 adds r0, #4 803459c: a902 add r1, sp, #8 803459e: f000 fb78 bl 8034c92 level = 0; ipa_rn = &ipaddrtree_root; 80345a2: 4c17 ldr r4, [pc, #92] ; (8034600 ) ipa_node->nptr = (struct mib_node*)ipa_rn; if (ipa_rn != NULL) { if (level == 2) { ipa_rn->get_object_def = ip_addrentry_get_object_def; 80345a4: 4f17 ldr r7, [pc, #92] ; (8034604 ) ipa_rn->get_value = ip_addrentry_get_value; 80345a6: f8df 806c ldr.w r8, [pc, #108] ; 8034614 struct mib_list_node *ipa_node; s32_t ipaddridx[4]; u8_t level; LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); 80345aa: 2500 movs r5, #0 level = 0; ipa_rn = &ipaddrtree_root; while (level < 4) { ipa_node = NULL; 80345ac: 2300 movs r3, #0 80345ae: 9301 str r3, [sp, #4] snmp_mib_node_insert(ipa_rn, ipaddridx[level], &ipa_node); 80345b0: ab02 add r3, sp, #8 80345b2: 4620 mov r0, r4 80345b4: f853 1025 ldr.w r1, [r3, r5, lsl #2] 80345b8: aa01 add r2, sp, #4 80345ba: b2ee uxtb r6, r5 80345bc: f000 fba4 bl 8034d08 if ((level != 3) && (ipa_node != NULL)) 80345c0: 2e03 cmp r6, #3 80345c2: d015 beq.n 80345f0 80345c4: 9b01 ldr r3, [sp, #4] 80345c6: b19b cbz r3, 80345f0 { if (ipa_node->nptr == NULL) 80345c8: 68dc ldr r4, [r3, #12] 80345ca: b98c cbnz r4, 80345f0 { ipa_rn = snmp_mib_lrn_alloc(); 80345cc: f000 fb7a bl 8034cc4 ipa_node->nptr = (struct mib_node*)ipa_rn; 80345d0: 9b01 ldr r3, [sp, #4] snmp_mib_node_insert(ipa_rn, ipaddridx[level], &ipa_node); if ((level != 3) && (ipa_node != NULL)) { if (ipa_node->nptr == NULL) { ipa_rn = snmp_mib_lrn_alloc(); 80345d2: 4604 mov r4, r0 ipa_node->nptr = (struct mib_node*)ipa_rn; 80345d4: 60d8 str r0, [r3, #12] if (ipa_rn != NULL) 80345d6: b918 cbnz r0, 80345e0 } } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; 80345d8: 4b0b ldr r3, [pc, #44] ; (8034608 ) 80345da: 2201 movs r2, #1 80345dc: 825a strh r2, [r3, #18] 80345de: e00b b.n 80345f8 { ipa_rn = snmp_mib_lrn_alloc(); ipa_node->nptr = (struct mib_node*)ipa_rn; if (ipa_rn != NULL) { if (level == 2) 80345e0: 2e02 cmp r6, #2 80345e2: d105 bne.n 80345f0 { ipa_rn->get_object_def = ip_addrentry_get_object_def; ipa_rn->get_value = ip_addrentry_get_value; ipa_rn->set_test = noleafs_set_test; 80345e4: 4b09 ldr r3, [pc, #36] ; (803460c ) if (ipa_rn != NULL) { if (level == 2) { ipa_rn->get_object_def = ip_addrentry_get_object_def; ipa_rn->get_value = ip_addrentry_get_value; 80345e6: e880 0180 stmia.w r0, {r7, r8} ipa_rn->set_test = noleafs_set_test; 80345ea: 6083 str r3, [r0, #8] ipa_rn->set_value = noleafs_set_value; 80345ec: 4b08 ldr r3, [pc, #32] ; (8034610 ) 80345ee: 60c3 str r3, [r0, #12] 80345f0: 3501 adds r5, #1 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); level = 0; ipa_rn = &ipaddrtree_root; while (level < 4) 80345f2: 2d04 cmp r5, #4 80345f4: d1da bne.n 80345ac 80345f6: e7ef b.n 80345d8 } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; } 80345f8: b006 add sp, #24 80345fa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80345fe: bf00 nop 8034600: 20000884 .word 0x20000884 8034604: 08033ea9 .word 0x08033ea9 8034608: 20000908 .word 0x20000908 803460c: 08033623 .word 0x08033623 8034610: 08033627 .word 0x08033627 8034614: 08033c99 .word 0x08033c99 08034618 : /** * Removes ipAddrTable indexes (.ipAdEntAddr) * from index tree. */ void snmp_delete_ipaddridx_tree(struct netif *ni) { 8034618: b570 push {r4, r5, r6, lr} 803461a: b08e sub sp, #56 ; 0x38 struct mib_list_node *ipa_n, *del_n[4]; s32_t ipaddridx[4]; u8_t fc, level, del_cnt; LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); 803461c: 3004 adds r0, #4 803461e: a90a add r1, sp, #40 ; 0x28 8034620: f000 fb37 bl 8034c92 8034624: 2600 movs r6, #0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; 8034626: 4d1f ldr r5, [pc, #124] ; (80346a4 ) LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); /* mark nodes for deletion */ level = 0; del_cnt = 0; 8034628: 4634 mov r4, r6 ipa_rn = &ipaddrtree_root; while ((level < 4) && (ipa_rn != NULL)) { fc = snmp_mib_node_find(ipa_rn, ipaddridx[level], &ipa_n); 803462a: ab0a add r3, sp, #40 ; 0x28 803462c: 4628 mov r0, r5 803462e: 58f1 ldr r1, [r6, r3] 8034630: aa01 add r2, sp, #4 8034632: f000 fba4 bl 8034d7e 8034636: b2c0 uxtb r0, r0 if (fc == 0) 8034638: b198 cbz r0, 8034662 { /* ipaddridx[level] does not exist */ del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) 803463a: 2801 cmp r0, #1 803463c: d10b bne.n 8034656 { del_rn[del_cnt] = ipa_rn; 803463e: ab0e add r3, sp, #56 ; 0x38 8034640: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = ipa_n; 8034644: 9b01 ldr r3, [sp, #4] del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; 8034646: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = ipa_n; del_cnt++; 803464a: 3401 adds r4, #1 ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; del_n[del_cnt] = ipa_n; 803464c: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8034650: b2e4 uxtb r4, r4 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8034652: 68dd ldr r5, [r3, #12] 8034654: e007 b.n 8034666 } else if (fc == 2) 8034656: 2802 cmp r0, #2 8034658: d105 bne.n 8034666 { /* reset delete (2 or more childs) */ del_cnt = 0; ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 803465a: 9b01 ldr r3, [sp, #4] ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); } else if (fc == 2) { /* reset delete (2 or more childs) */ del_cnt = 0; 803465c: 2400 movs r4, #0 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 803465e: 68dd ldr r5, [r3, #12] 8034660: e001 b.n 8034666 { fc = snmp_mib_node_find(ipa_rn, ipaddridx[level], &ipa_n); if (fc == 0) { /* ipaddridx[level] does not exist */ del_cnt = 0; 8034662: 4604 mov r4, r0 ipa_rn = NULL; 8034664: 4605 mov r5, r0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; while ((level < 4) && (ipa_rn != NULL)) 8034666: 2e0c cmp r6, #12 8034668: d012 beq.n 8034690 803466a: 3604 adds r6, #4 803466c: 2d00 cmp r5, #0 803466e: d1dc bne.n 803462a 8034670: e00e b.n 8034690 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034672: 3c01 subs r4, #1 8034674: b2e4 uxtb r4, r4 ipa_rn = del_rn[del_cnt]; 8034676: aa0e add r2, sp, #56 ; 0x38 8034678: eb02 0384 add.w r3, r2, r4, lsl #2 ipa_n = del_n[del_cnt]; 803467c: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; ipa_rn = del_rn[del_cnt]; 8034680: f853 0c30 ldr.w r0, [r3, #-48] ipa_n = del_n[del_cnt]; 8034684: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(ipa_rn, ipa_n); 8034686: f000 fb94 bl 8034db2 if (next != NULL) 803468a: b108 cbz r0, 8034690 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 803468c: f000 fb38 bl 8034d00 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034690: 2c00 cmp r4, #0 8034692: d1ee bne.n 8034672 LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); } } /* disable getnext traversal on empty table */ if (ipaddrtree_root.count == 0) ipaddrtable.maxlength = 0; 8034694: 4b03 ldr r3, [pc, #12] ; (80346a4 ) 8034696: 8b9b ldrh r3, [r3, #28] 8034698: b90b cbnz r3, 803469e 803469a: 4b03 ldr r3, [pc, #12] ; (80346a8 ) 803469c: 825c strh r4, [r3, #18] } 803469e: b00e add sp, #56 ; 0x38 80346a0: bd70 pop {r4, r5, r6, pc} 80346a2: bf00 nop 80346a4: 20000884 .word 0x20000884 80346a8: 20000908 .word 0x20000908 080346ac : * * @todo record sysuptime for _this_ route when it is installed * (needed for ipRouteAge) in the netif. */ void snmp_insert_iprteidx_tree(u8_t dflt, struct netif *ni) { 80346ac: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80346b0: b086 sub sp, #24 u8_t insert = 0; ip_addr_t dst; if (dflt != 0) 80346b2: b110 cbz r0, 80346ba { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 80346b4: 2300 movs r3, #0 80346b6: 9300 str r3, [sp, #0] 80346b8: e02b b.n 8034712 insert = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 80346ba: 688a ldr r2, [r1, #8] 80346bc: 684b ldr r3, [r1, #4] 80346be: 4013 ands r3, r2 80346c0: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 80346c2: bb33 cbnz r3, 8034712 80346c4: e021 b.n 803470a snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) { iprte_node = NULL; 80346c6: 2300 movs r3, #0 80346c8: 9301 str r3, [sp, #4] snmp_mib_node_insert(iprte_rn, iprteidx[level], &iprte_node); 80346ca: ab02 add r3, sp, #8 80346cc: 4620 mov r0, r4 80346ce: f853 1025 ldr.w r1, [r3, r5, lsl #2] 80346d2: aa01 add r2, sp, #4 80346d4: b2ee uxtb r6, r5 80346d6: f000 fb17 bl 8034d08 if ((level != 3) && (iprte_node != NULL)) 80346da: 2e03 cmp r6, #3 80346dc: d012 beq.n 8034704 80346de: 9b01 ldr r3, [sp, #4] 80346e0: b183 cbz r3, 8034704 { if (iprte_node->nptr == NULL) 80346e2: 68dc ldr r4, [r3, #12] 80346e4: b974 cbnz r4, 8034704 { iprte_rn = snmp_mib_lrn_alloc(); 80346e6: f000 faed bl 8034cc4 iprte_node->nptr = (struct mib_node*)iprte_rn; 80346ea: 9b01 ldr r3, [sp, #4] snmp_mib_node_insert(iprte_rn, iprteidx[level], &iprte_node); if ((level != 3) && (iprte_node != NULL)) { if (iprte_node->nptr == NULL) { iprte_rn = snmp_mib_lrn_alloc(); 80346ec: 4604 mov r4, r0 iprte_node->nptr = (struct mib_node*)iprte_rn; 80346ee: 60d8 str r0, [r3, #12] if (iprte_rn != NULL) 80346f0: b158 cbz r0, 803470a { if (level == 2) 80346f2: 2e02 cmp r6, #2 80346f4: d106 bne.n 8034704 { iprte_rn->get_object_def = ip_rteentry_get_object_def; iprte_rn->get_value = ip_rteentry_get_value; iprte_rn->set_test = noleafs_set_test; 80346f6: 4b0d ldr r3, [pc, #52] ; (803472c ) iprte_node->nptr = (struct mib_node*)iprte_rn; if (iprte_rn != NULL) { if (level == 2) { iprte_rn->get_object_def = ip_rteentry_get_object_def; 80346f8: f8c0 8000 str.w r8, [r0] iprte_rn->get_value = ip_rteentry_get_value; iprte_rn->set_test = noleafs_set_test; 80346fc: 6083 str r3, [r0, #8] iprte_rn->set_value = noleafs_set_value; 80346fe: 4b0c ldr r3, [pc, #48] ; (8034730 ) if (iprte_rn != NULL) { if (level == 2) { iprte_rn->get_object_def = ip_rteentry_get_object_def; iprte_rn->get_value = ip_rteentry_get_value; 8034700: 6047 str r7, [r0, #4] iprte_rn->set_test = noleafs_set_test; iprte_rn->set_value = noleafs_set_value; 8034702: 60c3 str r3, [r0, #12] 8034704: 3501 adds r5, #1 u8_t level; snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) 8034706: 2d04 cmp r5, #4 8034708: d1dd bne.n 80346c6 } level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; 803470a: 4b0a ldr r3, [pc, #40] ; (8034734 ) 803470c: 2201 movs r2, #1 803470e: 825a strh r2, [r3, #18] 8034710: e009 b.n 8034726 struct mib_list_rootnode *iprte_rn; struct mib_list_node *iprte_node; s32_t iprteidx[4]; u8_t level; snmp_iptooid(&dst, &iprteidx[0]); 8034712: 4668 mov r0, sp 8034714: a902 add r1, sp, #8 8034716: f000 fabc bl 8034c92 803471a: 2500 movs r5, #0 level = 0; iprte_rn = &iprtetree_root; 803471c: 4c06 ldr r4, [pc, #24] ; (8034738 ) iprte_node->nptr = (struct mib_node*)iprte_rn; if (iprte_rn != NULL) { if (level == 2) { iprte_rn->get_object_def = ip_rteentry_get_object_def; 803471e: f8df 8020 ldr.w r8, [pc, #32] ; 8034740 iprte_rn->get_value = ip_rteentry_get_value; 8034722: 4f06 ldr r7, [pc, #24] ; (803473c ) 8034724: e7cf b.n 80346c6 level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; } 8034726: b006 add sp, #24 8034728: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 803472c: 08033623 .word 0x08033623 8034730: 08033627 .word 0x08033627 8034734: 20000970 .word 0x20000970 8034738: 200007b4 .word 0x200007b4 803473c: 080341a9 .word 0x080341a9 8034740: 080337ed .word 0x080337ed 08034744 : * @param dflt non-zero for the default rte, zero for network rte * @param ni points to network interface for this rte or NULL * for default route to be removed. */ void snmp_delete_iprteidx_tree(u8_t dflt, struct netif *ni) { 8034744: b570 push {r4, r5, r6, lr} 8034746: b08e sub sp, #56 ; 0x38 u8_t del = 0; ip_addr_t dst; if (dflt != 0) 8034748: b110 cbz r0, 8034750 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 803474a: 2300 movs r3, #0 803474c: 9300 str r3, [sp, #0] 803474e: e041 b.n 80347d4 del = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 8034750: 688a ldr r2, [r1, #8] 8034752: 684b ldr r3, [r1, #4] 8034754: 4013 ands r3, r2 8034756: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 8034758: 2b00 cmp r3, #0 803475a: d13b bne.n 80347d4 803475c: e034 b.n 80347c8 level = 0; del_cnt = 0; iprte_rn = &iprtetree_root; while ((level < 4) && (iprte_rn != NULL)) { fc = snmp_mib_node_find(iprte_rn, iprteidx[level], &iprte_n); 803475e: ab0a add r3, sp, #40 ; 0x28 8034760: 4628 mov r0, r5 8034762: 58f1 ldr r1, [r6, r3] 8034764: aa01 add r2, sp, #4 8034766: f000 fb0a bl 8034d7e 803476a: b2c0 uxtb r0, r0 if (fc == 0) 803476c: b198 cbz r0, 8034796 { /* iprteidx[level] does not exist */ del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) 803476e: 2801 cmp r0, #1 8034770: d10b bne.n 803478a { del_rn[del_cnt] = iprte_rn; 8034772: ab0e add r3, sp, #56 ; 0x38 8034774: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = iprte_n; 8034778: 9b01 ldr r3, [sp, #4] del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; 803477a: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = iprte_n; del_cnt++; 803477e: 3401 adds r4, #1 iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; del_n[del_cnt] = iprte_n; 8034780: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8034784: b2e4 uxtb r4, r4 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034786: 68dd ldr r5, [r3, #12] 8034788: e007 b.n 803479a } else if (fc == 2) 803478a: 2802 cmp r0, #2 803478c: d105 bne.n 803479a { /* reset delete (2 or more childs) */ del_cnt = 0; iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 803478e: 9b01 ldr r3, [sp, #4] iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); } else if (fc == 2) { /* reset delete (2 or more childs) */ del_cnt = 0; 8034790: 2400 movs r4, #0 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8034792: 68dd ldr r5, [r3, #12] 8034794: e001 b.n 803479a { fc = snmp_mib_node_find(iprte_rn, iprteidx[level], &iprte_n); if (fc == 0) { /* iprteidx[level] does not exist */ del_cnt = 0; 8034796: 4604 mov r4, r0 iprte_rn = NULL; 8034798: 4605 mov r5, r0 snmp_iptooid(&dst, &iprteidx[0]); /* mark nodes for deletion */ level = 0; del_cnt = 0; iprte_rn = &iprtetree_root; while ((level < 4) && (iprte_rn != NULL)) 803479a: 2e0c cmp r6, #12 803479c: d012 beq.n 80347c4 803479e: 3604 adds r6, #4 80347a0: 2d00 cmp r5, #0 80347a2: d1dc bne.n 803475e 80347a4: e00e b.n 80347c4 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 80347a6: 3c01 subs r4, #1 80347a8: b2e4 uxtb r4, r4 iprte_rn = del_rn[del_cnt]; 80347aa: aa0e add r2, sp, #56 ; 0x38 80347ac: eb02 0384 add.w r3, r2, r4, lsl #2 iprte_n = del_n[del_cnt]; 80347b0: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; iprte_rn = del_rn[del_cnt]; 80347b4: f853 0c30 ldr.w r0, [r3, #-48] iprte_n = del_n[del_cnt]; 80347b8: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(iprte_rn, iprte_n); 80347ba: f000 fafa bl 8034db2 if (next != NULL) 80347be: b108 cbz r0, 80347c4 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 80347c0: f000 fa9e bl 8034d00 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 80347c4: 2c00 cmp r4, #0 80347c6: d1ee bne.n 80347a6 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; 80347c8: 4b07 ldr r3, [pc, #28] ; (80347e8 ) 80347ca: 8b9b ldrh r3, [r3, #28] 80347cc: b953 cbnz r3, 80347e4 80347ce: 4a07 ldr r2, [pc, #28] ; (80347ec ) 80347d0: 8253 strh r3, [r2, #18] 80347d2: e007 b.n 80347e4 struct mib_list_rootnode *iprte_rn, *next, *del_rn[4]; struct mib_list_node *iprte_n, *del_n[4]; s32_t iprteidx[4]; u8_t fc, level, del_cnt; snmp_iptooid(&dst, &iprteidx[0]); 80347d4: 4668 mov r0, sp 80347d6: a90a add r1, sp, #40 ; 0x28 80347d8: 2600 movs r6, #0 80347da: f000 fa5a bl 8034c92 /* mark nodes for deletion */ level = 0; del_cnt = 0; 80347de: 4634 mov r4, r6 iprte_rn = &iprtetree_root; 80347e0: 4d01 ldr r5, [pc, #4] ; (80347e8 ) 80347e2: e7bc b.n 803475e } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; } 80347e4: b00e add sp, #56 ; 0x38 80347e6: bd70 pop {r4, r5, r6, pc} 80347e8: 200007b4 .word 0x200007b4 80347ec: 20000970 .word 0x20000970 080347f0 : void snmp_inc_icmpinmsgs(void) { icmpinmsgs++; 80347f0: 4b02 ldr r3, [pc, #8] ; (80347fc ) 80347f2: 681a ldr r2, [r3, #0] 80347f4: 3201 adds r2, #1 80347f6: 601a str r2, [r3, #0] 80347f8: 4770 bx lr 80347fa: bf00 nop 80347fc: 2000c4b8 .word 0x2000c4b8 08034800 : } void snmp_inc_icmpinerrors(void) { icmpinerrors++; 8034800: 4b02 ldr r3, [pc, #8] ; (803480c ) 8034802: 681a ldr r2, [r3, #0] 8034804: 3201 adds r2, #1 8034806: 601a str r2, [r3, #0] 8034808: 4770 bx lr 803480a: bf00 nop 803480c: 2000c4b4 .word 0x2000c4b4 08034810 : icmpinaddrmaskreps++; } void snmp_inc_icmpoutmsgs(void) { icmpoutmsgs++; 8034810: 4b02 ldr r3, [pc, #8] ; (803481c ) 8034812: 681a ldr r2, [r3, #0] 8034814: 3201 adds r2, #1 8034816: 601a str r2, [r3, #0] 8034818: 4770 bx lr 803481a: bf00 nop 803481c: 2000c538 .word 0x2000c538 08034820 : icmpoutdestunreachs++; } void snmp_inc_icmpouttimeexcds(void) { icmpouttimeexcds++; 8034820: 4b02 ldr r3, [pc, #8] ; (803482c ) 8034822: 681a ldr r2, [r3, #0] 8034824: 3201 adds r2, #1 8034826: 601a str r2, [r3, #0] 8034828: 4770 bx lr 803482a: bf00 nop 803482c: 2000c504 .word 0x2000c504 08034830 : icmpoutechos++; } void snmp_inc_icmpoutechoreps(void) { icmpoutechoreps++; 8034830: 4b02 ldr r3, [pc, #8] ; (803483c ) 8034832: 681a ldr r2, [r3, #0] 8034834: 3201 adds r2, #1 8034836: 601a str r2, [r3, #0] 8034838: 4770 bx lr 803483a: bf00 nop 803483c: 2000c558 .word 0x2000c558 08034840 : tcpactiveopens++; } void snmp_inc_tcppassiveopens(void) { tcppassiveopens++; 8034840: 4b02 ldr r3, [pc, #8] ; (803484c ) 8034842: 681a ldr r2, [r3, #0] 8034844: 3201 adds r2, #1 8034846: 601a str r2, [r3, #0] 8034848: 4770 bx lr 803484a: bf00 nop 803484c: 2000c4e0 .word 0x2000c4e0 08034850 : } void snmp_inc_tcpattemptfails(void) { tcpattemptfails++; 8034850: 4b02 ldr r3, [pc, #8] ; (803485c ) 8034852: 681a ldr r2, [r3, #0] 8034854: 3201 adds r2, #1 8034856: 601a str r2, [r3, #0] 8034858: 4770 bx lr 803485a: bf00 nop 803485c: 2000c52c .word 0x2000c52c 08034860 : } void snmp_inc_tcpestabresets(void) { tcpestabresets++; 8034860: 4b02 ldr r3, [pc, #8] ; (803486c ) 8034862: 681a ldr r2, [r3, #0] 8034864: 3201 adds r2, #1 8034866: 601a str r2, [r3, #0] 8034868: 4770 bx lr 803486a: bf00 nop 803486c: 2000c4c0 .word 0x2000c4c0 08034870 : } void snmp_inc_tcpinsegs(void) { tcpinsegs++; 8034870: 4b02 ldr r3, [pc, #8] ; (803487c ) 8034872: 681a ldr r2, [r3, #0] 8034874: 3201 adds r2, #1 8034876: 601a str r2, [r3, #0] 8034878: 4770 bx lr 803487a: bf00 nop 803487c: 2000c53c .word 0x2000c53c 08034880 : } void snmp_inc_tcpoutsegs(void) { tcpoutsegs++; 8034880: 4b02 ldr r3, [pc, #8] ; (803488c ) 8034882: 681a ldr r2, [r3, #0] 8034884: 3201 adds r2, #1 8034886: 601a str r2, [r3, #0] 8034888: 4770 bx lr 803488a: bf00 nop 803488c: 2000c588 .word 0x2000c588 08034890 : } void snmp_inc_tcpretranssegs(void) { tcpretranssegs++; 8034890: 4b02 ldr r3, [pc, #8] ; (803489c ) 8034892: 681a ldr r2, [r3, #0] 8034894: 3201 adds r2, #1 8034896: 601a str r2, [r3, #0] 8034898: 4770 bx lr 803489a: bf00 nop 803489c: 2000c55c .word 0x2000c55c 080348a0 : } void snmp_inc_tcpinerrs(void) { tcpinerrs++; 80348a0: 4b02 ldr r3, [pc, #8] ; (80348ac ) 80348a2: 681a ldr r2, [r3, #0] 80348a4: 3201 adds r2, #1 80348a6: 601a str r2, [r3, #0] 80348a8: 4770 bx lr 80348aa: bf00 nop 80348ac: 2000c4e8 .word 0x2000c4e8 080348b0 : } void snmp_inc_tcpoutrsts(void) { tcpoutrsts++; 80348b0: 4b02 ldr r3, [pc, #8] ; (80348bc ) 80348b2: 681a ldr r2, [r3, #0] 80348b4: 3201 adds r2, #1 80348b6: 601a str r2, [r3, #0] 80348b8: 4770 bx lr 80348ba: bf00 nop 80348bc: 2000c54c .word 0x2000c54c 080348c0 : } void snmp_inc_udpindatagrams(void) { udpindatagrams++; 80348c0: 4b02 ldr r3, [pc, #8] ; (80348cc ) 80348c2: 681a ldr r2, [r3, #0] 80348c4: 3201 adds r2, #1 80348c6: 601a str r2, [r3, #0] 80348c8: 4770 bx lr 80348ca: bf00 nop 80348cc: 2000c568 .word 0x2000c568 080348d0 : } void snmp_inc_udpnoports(void) { udpnoports++; 80348d0: 4b02 ldr r3, [pc, #8] ; (80348dc ) 80348d2: 681a ldr r2, [r3, #0] 80348d4: 3201 adds r2, #1 80348d6: 601a str r2, [r3, #0] 80348d8: 4770 bx lr 80348da: bf00 nop 80348dc: 2000c520 .word 0x2000c520 080348e0 : } void snmp_inc_udpinerrors(void) { udpinerrors++; 80348e0: 4b02 ldr r3, [pc, #8] ; (80348ec ) 80348e2: 681a ldr r2, [r3, #0] 80348e4: 3201 adds r2, #1 80348e6: 601a str r2, [r3, #0] 80348e8: 4770 bx lr 80348ea: bf00 nop 80348ec: 2000c590 .word 0x2000c590 080348f0 : } void snmp_inc_udpoutdatagrams(void) { udpoutdatagrams++; 80348f0: 4b02 ldr r3, [pc, #8] ; (80348fc ) 80348f2: 681a ldr r2, [r3, #0] 80348f4: 3201 adds r2, #1 80348f6: 601a str r2, [r3, #0] 80348f8: 4770 bx lr 80348fa: bf00 nop 80348fc: 2000c518 .word 0x2000c518 08034900 : /** * Inserts udpTable indexes (.udpLocalAddress.udpLocalPort) * into index tree. */ void snmp_insert_udpidx_tree(struct udp_pcb *pcb) { 8034900: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034904: 4604 mov r4, r0 8034906: b086 sub sp, #24 struct mib_list_node *udp_node; s32_t udpidx[5]; u8_t level; LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); 8034908: a901 add r1, sp, #4 803490a: f000 f9c2 bl 8034c92 udpidx[4] = pcb->local_port; 803490e: 8a63 ldrh r3, [r4, #18] udp_node->nptr = (struct mib_node*)udp_rn; if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; 8034910: 4f17 ldr r7, [pc, #92] ; (8034970 ) LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; udp_rn = &udp_root; 8034912: 4c18 ldr r4, [pc, #96] ; (8034974 ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8034914: f8df 806c ldr.w r8, [pc, #108] ; 8034984 s32_t udpidx[5]; u8_t level; LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; 8034918: 9305 str r3, [sp, #20] 803491a: 2500 movs r5, #0 udp_rn = &udp_root; for (level = 0; level < 5; level++) { udp_node = NULL; 803491c: 2300 movs r3, #0 803491e: 9300 str r3, [sp, #0] snmp_mib_node_insert(udp_rn, udpidx[level], &udp_node); 8034920: ab01 add r3, sp, #4 8034922: 4620 mov r0, r4 8034924: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8034928: 466a mov r2, sp 803492a: b2ee uxtb r6, r5 803492c: f000 f9ec bl 8034d08 if ((level != 4) && (udp_node != NULL)) 8034930: 2e04 cmp r6, #4 8034932: d015 beq.n 8034960 8034934: 9b00 ldr r3, [sp, #0] 8034936: b19b cbz r3, 8034960 { if (udp_node->nptr == NULL) 8034938: 68dc ldr r4, [r3, #12] 803493a: b98c cbnz r4, 8034960 { udp_rn = snmp_mib_lrn_alloc(); 803493c: f000 f9c2 bl 8034cc4 udp_node->nptr = (struct mib_node*)udp_rn; 8034940: 9b00 ldr r3, [sp, #0] snmp_mib_node_insert(udp_rn, udpidx[level], &udp_node); if ((level != 4) && (udp_node != NULL)) { if (udp_node->nptr == NULL) { udp_rn = snmp_mib_lrn_alloc(); 8034942: 4604 mov r4, r0 udp_node->nptr = (struct mib_node*)udp_rn; 8034944: 60d8 str r0, [r3, #12] if (udp_rn != NULL) 8034946: b918 cbnz r0, 8034950 { udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; 8034948: 4b0b ldr r3, [pc, #44] ; (8034978 ) 803494a: 2201 movs r2, #1 803494c: 825a strh r2, [r3, #18] 803494e: e00b b.n 8034968 { udp_rn = snmp_mib_lrn_alloc(); udp_node->nptr = (struct mib_node*)udp_rn; if (udp_rn != NULL) { if (level == 3) 8034950: 2e03 cmp r6, #3 8034952: d105 bne.n 8034960 { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; udp_rn->set_test = noleafs_set_test; 8034954: 4b09 ldr r3, [pc, #36] ; (803497c ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8034956: e880 0180 stmia.w r0, {r7, r8} udp_rn->set_test = noleafs_set_test; 803495a: 6083 str r3, [r0, #8] udp_rn->set_value = noleafs_set_value; 803495c: 4b08 ldr r3, [pc, #32] ; (8034980 ) 803495e: 60c3 str r3, [r0, #12] 8034960: 3501 adds r5, #1 LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; udp_rn = &udp_root; for (level = 0; level < 5; level++) 8034962: 2d05 cmp r5, #5 8034964: d1da bne.n 803491c 8034966: e7ef b.n 8034948 udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; } 8034968: b006 add sp, #24 803496a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 803496e: bf00 nop 8034970: 08033f95 .word 0x08033f95 8034974: 20000784 .word 0x20000784 8034978: 20000768 .word 0x20000768 803497c: 08033623 .word 0x08033623 8034980: 08033627 .word 0x08033627 8034984: 08033c51 .word 0x08033c51 08034988 : /** * Removes udpTable indexes (.udpLocalAddress.udpLocalPort) * from index tree. */ void snmp_delete_udpidx_tree(struct udp_pcb *pcb) { 8034988: b570 push {r4, r5, r6, lr} 803498a: 4604 mov r4, r0 803498c: b090 sub sp, #64 ; 0x40 struct mib_list_node *udp_n, *del_n[5]; s32_t udpidx[5]; u8_t bindings, fc, level, del_cnt; LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); 803498e: a90b add r1, sp, #44 ; 0x2c 8034990: f000 f97f bl 8034c92 udpidx[4] = pcb->local_port; 8034994: 8a61 ldrh r1, [r4, #18] /* count PCBs for a given binding (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; npcb = udp_pcbs; 8034996: 4b2a ldr r3, [pc, #168] ; (8034a40 ) s32_t udpidx[5]; u8_t bindings, fc, level, del_cnt; LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; 8034998: 910f str r1, [sp, #60] ; 0x3c /* count PCBs for a given binding (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; npcb = udp_pcbs; 803499a: 681b ldr r3, [r3, #0] snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; /* count PCBs for a given binding (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; 803499c: 2200 movs r2, #0 npcb = udp_pcbs; while ((npcb != NULL)) 803499e: e009 b.n 80349b4 { if (ip_addr_cmp(&npcb->local_ip, &pcb->local_ip) && 80349a0: 681d ldr r5, [r3, #0] 80349a2: 6820 ldr r0, [r4, #0] 80349a4: 4285 cmp r5, r0 80349a6: d104 bne.n 80349b2 (npcb->local_port == udpidx[4])) 80349a8: 8a58 ldrh r0, [r3, #18] (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; npcb = udp_pcbs; while ((npcb != NULL)) { if (ip_addr_cmp(&npcb->local_ip, &pcb->local_ip) && 80349aa: 4288 cmp r0, r1 80349ac: d101 bne.n 80349b2 (npcb->local_port == udpidx[4])) { bindings++; 80349ae: 3201 adds r2, #1 80349b0: b2d2 uxtb r2, r2 } npcb = npcb->next; 80349b2: 68db ldr r3, [r3, #12] /* count PCBs for a given binding (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; npcb = udp_pcbs; while ((npcb != NULL)) 80349b4: 2b00 cmp r3, #0 80349b6: d1f3 bne.n 80349a0 { bindings++; } npcb = npcb->next; } if (bindings == 1) 80349b8: 2a01 cmp r2, #1 80349ba: d004 beq.n 80349c6 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 80349bc: 4b21 ldr r3, [pc, #132] ; (8034a44 ) 80349be: 8b9b ldrh r3, [r3, #28] 80349c0: 2b00 cmp r3, #0 80349c2: d039 beq.n 8034a38 80349c4: e03a b.n 8034a3c { /* selectively remove */ /* mark nodes for deletion */ level = 0; del_cnt = 0; udp_rn = &udp_root; 80349c6: 4d1f ldr r5, [pc, #124] ; (8034a44 ) { bindings++; } npcb = npcb->next; } if (bindings == 1) 80349c8: 461e mov r6, r3 80349ca: 461c mov r4, r3 level = 0; del_cnt = 0; udp_rn = &udp_root; while ((level < 5) && (udp_rn != NULL)) { fc = snmp_mib_node_find(udp_rn, udpidx[level], &udp_n); 80349cc: ab0b add r3, sp, #44 ; 0x2c 80349ce: 4628 mov r0, r5 80349d0: 58f1 ldr r1, [r6, r3] 80349d2: 466a mov r2, sp 80349d4: f000 f9d3 bl 8034d7e 80349d8: b2c0 uxtb r0, r0 if (fc == 0) 80349da: b198 cbz r0, 8034a04 { /* udpidx[level] does not exist */ del_cnt = 0; udp_rn = NULL; } else if (fc == 1) 80349dc: 2801 cmp r0, #1 80349de: d10b bne.n 80349f8 { del_rn[del_cnt] = udp_rn; 80349e0: ab10 add r3, sp, #64 ; 0x40 80349e2: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = udp_n; 80349e6: 9b00 ldr r3, [sp, #0] del_cnt = 0; udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; 80349e8: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = udp_n; del_cnt++; 80349ec: 3401 adds r4, #1 udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; del_n[del_cnt] = udp_n; 80349ee: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 80349f2: b2e4 uxtb r4, r4 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 80349f4: 68dd ldr r5, [r3, #12] 80349f6: e007 b.n 8034a08 } else if (fc == 2) 80349f8: 2802 cmp r0, #2 80349fa: d105 bne.n 8034a08 { /* reset delete (2 or more childs) */ del_cnt = 0; udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 80349fc: 9b00 ldr r3, [sp, #0] udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); } else if (fc == 2) { /* reset delete (2 or more childs) */ del_cnt = 0; 80349fe: 2400 movs r4, #0 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 8034a00: 68dd ldr r5, [r3, #12] 8034a02: e001 b.n 8034a08 { fc = snmp_mib_node_find(udp_rn, udpidx[level], &udp_n); if (fc == 0) { /* udpidx[level] does not exist */ del_cnt = 0; 8034a04: 4604 mov r4, r0 udp_rn = NULL; 8034a06: 4605 mov r5, r0 /* selectively remove */ /* mark nodes for deletion */ level = 0; del_cnt = 0; udp_rn = &udp_root; while ((level < 5) && (udp_rn != NULL)) 8034a08: 2e10 cmp r6, #16 8034a0a: d012 beq.n 8034a32 8034a0c: 3604 adds r6, #4 8034a0e: 2d00 cmp r5, #0 8034a10: d1dc bne.n 80349cc 8034a12: e00e b.n 8034a32 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8034a14: 3c01 subs r4, #1 8034a16: b2e4 uxtb r4, r4 udp_rn = del_rn[del_cnt]; 8034a18: aa10 add r2, sp, #64 ; 0x40 8034a1a: eb02 0384 add.w r3, r2, r4, lsl #2 udp_n = del_n[del_cnt]; 8034a1e: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; udp_rn = del_rn[del_cnt]; 8034a22: f853 0c3c ldr.w r0, [r3, #-60] udp_n = del_n[del_cnt]; 8034a26: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(udp_rn, udp_n); 8034a28: f000 f9c3 bl 8034db2 if (next != NULL) 8034a2c: b108 cbz r0, 8034a32 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8034a2e: f000 f967 bl 8034d00 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 8034a32: 2c00 cmp r4, #0 8034a34: d1ee bne.n 8034a14 8034a36: e7c1 b.n 80349bc snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 8034a38: 4a03 ldr r2, [pc, #12] ; (8034a48 ) 8034a3a: 8253 strh r3, [r2, #18] } 8034a3c: b010 add sp, #64 ; 0x40 8034a3e: bd70 pop {r4, r5, r6, pc} 8034a40: 2000ff3c .word 0x2000ff3c 8034a44: 20000784 .word 0x20000784 8034a48: 20000768 .word 0x20000768 08034a4c : void snmp_inc_snmpinpkts(void) { snmpinpkts++; 8034a4c: 4b02 ldr r3, [pc, #8] ; (8034a58 ) 8034a4e: 681a ldr r2, [r3, #0] 8034a50: 3201 adds r2, #1 8034a52: 601a str r2, [r3, #0] 8034a54: 4770 bx lr 8034a56: bf00 nop 8034a58: 2000c4c4 .word 0x2000c4c4 08034a5c : } void snmp_inc_snmpoutpkts(void) { snmpoutpkts++; 8034a5c: 4b02 ldr r3, [pc, #8] ; (8034a68 ) 8034a5e: 681a ldr r2, [r3, #0] 8034a60: 3201 adds r2, #1 8034a62: 601a str r2, [r3, #0] 8034a64: 4770 bx lr 8034a66: bf00 nop 8034a68: 2000c594 .word 0x2000c594 08034a6c : } void snmp_inc_snmpinbadversions(void) { snmpinbadversions++; 8034a6c: 4b02 ldr r3, [pc, #8] ; (8034a78 ) 8034a6e: 681a ldr r2, [r3, #0] 8034a70: 3201 adds r2, #1 8034a72: 601a str r2, [r3, #0] 8034a74: 4770 bx lr 8034a76: bf00 nop 8034a78: 2000c580 .word 0x2000c580 08034a7c : } void snmp_inc_snmpinbadcommunitynames(void) { snmpinbadcommunitynames++; 8034a7c: 4b02 ldr r3, [pc, #8] ; (8034a88 ) 8034a7e: 681a ldr r2, [r3, #0] 8034a80: 3201 adds r2, #1 8034a82: 601a str r2, [r3, #0] 8034a84: 4770 bx lr 8034a86: bf00 nop 8034a88: 2000c498 .word 0x2000c498 08034a8c : snmpinbadcommunityuses++; } void snmp_inc_snmpinasnparseerrs(void) { snmpinasnparseerrs++; 8034a8c: 4b02 ldr r3, [pc, #8] ; (8034a98 ) 8034a8e: 681a ldr r2, [r3, #0] 8034a90: 3201 adds r2, #1 8034a92: 601a str r2, [r3, #0] 8034a94: 4770 bx lr 8034a96: bf00 nop 8034a98: 2000c584 .word 0x2000c584 08034a9c : } void snmp_inc_snmpintoobigs(void) { snmpintoobigs++; 8034a9c: 4b02 ldr r3, [pc, #8] ; (8034aa8 ) 8034a9e: 681a ldr r2, [r3, #0] 8034aa0: 3201 adds r2, #1 8034aa2: 601a str r2, [r3, #0] 8034aa4: 4770 bx lr 8034aa6: bf00 nop 8034aa8: 2000c544 .word 0x2000c544 08034aac : } void snmp_inc_snmpinnosuchnames(void) { snmpinnosuchnames++; 8034aac: 4b02 ldr r3, [pc, #8] ; (8034ab8 ) 8034aae: 681a ldr r2, [r3, #0] 8034ab0: 3201 adds r2, #1 8034ab2: 601a str r2, [r3, #0] 8034ab4: 4770 bx lr 8034ab6: bf00 nop 8034ab8: 2000c5c4 .word 0x2000c5c4 08034abc : } void snmp_inc_snmpinbadvalues(void) { snmpinbadvalues++; 8034abc: 4b02 ldr r3, [pc, #8] ; (8034ac8 ) 8034abe: 681a ldr r2, [r3, #0] 8034ac0: 3201 adds r2, #1 8034ac2: 601a str r2, [r3, #0] 8034ac4: 4770 bx lr 8034ac6: bf00 nop 8034ac8: 2000c560 .word 0x2000c560 08034acc : } void snmp_inc_snmpinreadonlys(void) { snmpinreadonlys++; 8034acc: 4b02 ldr r3, [pc, #8] ; (8034ad8 ) 8034ace: 681a ldr r2, [r3, #0] 8034ad0: 3201 adds r2, #1 8034ad2: 601a str r2, [r3, #0] 8034ad4: 4770 bx lr 8034ad6: bf00 nop 8034ad8: 2000c534 .word 0x2000c534 08034adc : } void snmp_inc_snmpingenerrs(void) { snmpingenerrs++; 8034adc: 4b02 ldr r3, [pc, #8] ; (8034ae8 ) 8034ade: 681a ldr r2, [r3, #0] 8034ae0: 3201 adds r2, #1 8034ae2: 601a str r2, [r3, #0] 8034ae4: 4770 bx lr 8034ae6: bf00 nop 8034ae8: 2000c50c .word 0x2000c50c 08034aec : } void snmp_add_snmpintotalreqvars(u8_t value) { snmpintotalreqvars += value; 8034aec: 4b02 ldr r3, [pc, #8] ; (8034af8 ) 8034aee: 681a ldr r2, [r3, #0] 8034af0: 1880 adds r0, r0, r2 8034af2: 6018 str r0, [r3, #0] 8034af4: 4770 bx lr 8034af6: bf00 nop 8034af8: 2000c564 .word 0x2000c564 08034afc : } void snmp_add_snmpintotalsetvars(u8_t value) { snmpintotalsetvars += value; 8034afc: 4b02 ldr r3, [pc, #8] ; (8034b08 ) 8034afe: 681a ldr r2, [r3, #0] 8034b00: 1880 adds r0, r0, r2 8034b02: 6018 str r0, [r3, #0] 8034b04: 4770 bx lr 8034b06: bf00 nop 8034b08: 2000c4a4 .word 0x2000c4a4 08034b0c : } void snmp_inc_snmpingetrequests(void) { snmpingetrequests++; 8034b0c: 4b02 ldr r3, [pc, #8] ; (8034b18 ) 8034b0e: 681a ldr r2, [r3, #0] 8034b10: 3201 adds r2, #1 8034b12: 601a str r2, [r3, #0] 8034b14: 4770 bx lr 8034b16: bf00 nop 8034b18: 2000c4f8 .word 0x2000c4f8 08034b1c : } void snmp_inc_snmpingetnexts(void) { snmpingetnexts++; 8034b1c: 4b02 ldr r3, [pc, #8] ; (8034b28 ) 8034b1e: 681a ldr r2, [r3, #0] 8034b20: 3201 adds r2, #1 8034b22: 601a str r2, [r3, #0] 8034b24: 4770 bx lr 8034b26: bf00 nop 8034b28: 2000c47c .word 0x2000c47c 08034b2c : } void snmp_inc_snmpinsetrequests(void) { snmpinsetrequests++; 8034b2c: 4b02 ldr r3, [pc, #8] ; (8034b38 ) 8034b2e: 681a ldr r2, [r3, #0] 8034b30: 3201 adds r2, #1 8034b32: 601a str r2, [r3, #0] 8034b34: 4770 bx lr 8034b36: bf00 nop 8034b38: 2000c5a0 .word 0x2000c5a0 08034b3c : } void snmp_inc_snmpingetresponses(void) { snmpingetresponses++; 8034b3c: 4b02 ldr r3, [pc, #8] ; (8034b48 ) 8034b3e: 681a ldr r2, [r3, #0] 8034b40: 3201 adds r2, #1 8034b42: 601a str r2, [r3, #0] 8034b44: 4770 bx lr 8034b46: bf00 nop 8034b48: 2000c4f4 .word 0x2000c4f4 08034b4c : } void snmp_inc_snmpintraps(void) { snmpintraps++; 8034b4c: 4b02 ldr r3, [pc, #8] ; (8034b58 ) 8034b4e: 681a ldr r2, [r3, #0] 8034b50: 3201 adds r2, #1 8034b52: 601a str r2, [r3, #0] 8034b54: 4770 bx lr 8034b56: bf00 nop 8034b58: 2000c48c .word 0x2000c48c 08034b5c : } void snmp_inc_snmpouttoobigs(void) { snmpouttoobigs++; 8034b5c: 4b02 ldr r3, [pc, #8] ; (8034b68 ) 8034b5e: 681a ldr r2, [r3, #0] 8034b60: 3201 adds r2, #1 8034b62: 601a str r2, [r3, #0] 8034b64: 4770 bx lr 8034b66: bf00 nop 8034b68: 2000c4dc .word 0x2000c4dc 08034b6c : } void snmp_inc_snmpoutnosuchnames(void) { snmpoutnosuchnames++; 8034b6c: 4b02 ldr r3, [pc, #8] ; (8034b78 ) 8034b6e: 681a ldr r2, [r3, #0] 8034b70: 3201 adds r2, #1 8034b72: 601a str r2, [r3, #0] 8034b74: 4770 bx lr 8034b76: bf00 nop 8034b78: 2000c4a8 .word 0x2000c4a8 08034b7c : } void snmp_inc_snmpoutbadvalues(void) { snmpoutbadvalues++; 8034b7c: 4b02 ldr r3, [pc, #8] ; (8034b88 ) 8034b7e: 681a ldr r2, [r3, #0] 8034b80: 3201 adds r2, #1 8034b82: 601a str r2, [r3, #0] 8034b84: 4770 bx lr 8034b86: bf00 nop 8034b88: 2000c488 .word 0x2000c488 08034b8c : } void snmp_inc_snmpoutgenerrs(void) { snmpoutgenerrs++; 8034b8c: 4b02 ldr r3, [pc, #8] ; (8034b98 ) 8034b8e: 681a ldr r2, [r3, #0] 8034b90: 3201 adds r2, #1 8034b92: 601a str r2, [r3, #0] 8034b94: 4770 bx lr 8034b96: bf00 nop 8034b98: 2000c5c8 .word 0x2000c5c8 08034b9c : snmpoutsetrequests++; } void snmp_inc_snmpoutgetresponses(void) { snmpoutgetresponses++; 8034b9c: 4b02 ldr r3, [pc, #8] ; (8034ba8 ) 8034b9e: 681a ldr r2, [r3, #0] 8034ba0: 3201 adds r2, #1 8034ba2: 601a str r2, [r3, #0] 8034ba4: 4770 bx lr 8034ba6: bf00 nop 8034ba8: 2000c484 .word 0x2000c484 08034bac : } void snmp_inc_snmpouttraps(void) { snmpouttraps++; 8034bac: 4b02 ldr r3, [pc, #8] ; (8034bb8 ) 8034bae: 681a ldr r2, [r3, #0] 8034bb0: 3201 adds r2, #1 8034bb2: 601a str r2, [r3, #0] 8034bb4: 4770 bx lr 8034bb6: bf00 nop 8034bb8: 2000c4fc .word 0x2000c4fc 08034bbc : } void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid) { *oid = &snmpgrp_id; 8034bbc: 4b01 ldr r3, [pc, #4] ; (8034bc4 ) 8034bbe: 6003 str r3, [r0, #0] 8034bc0: 4770 bx lr 8034bc2: bf00 nop 8034bc4: 20000994 .word 0x20000994 08034bc8 : } } void snmp_get_snmpenableauthentraps(u8_t *value) { *value = *snmpenableauthentraps_ptr; 8034bc8: 4b02 ldr r3, [pc, #8] ; (8034bd4 ) 8034bca: 681b ldr r3, [r3, #0] 8034bcc: 781b ldrb r3, [r3, #0] 8034bce: 7003 strb r3, [r0, #0] 8034bd0: 4770 bx lr 8034bd2: bf00 nop 8034bd4: 200008a8 .word 0x200008a8 08034bd8 : /** * Pushes nse struct onto stack. */ static void push_node(struct nse* node) { 8034bd8: b530 push {r4, r5, lr} LWIP_ASSERT("node_stack_cnt < NODE_STACK_SIZE",node_stack_cnt < NODE_STACK_SIZE); LWIP_DEBUGF(SNMP_MIB_DEBUG,("push_node() node=%p id=%"S32_F"\n",(void*)(node->r_ptr),node->r_id)); if (node_stack_cnt < NODE_STACK_SIZE) 8034bda: 4d07 ldr r5, [pc, #28] ; (8034bf8 ) 8034bdc: 782b ldrb r3, [r5, #0] 8034bde: 2b1f cmp r3, #31 8034be0: d808 bhi.n 8034bf4 { node_stack[node_stack_cnt] = *node; 8034be2: 4a06 ldr r2, [pc, #24] ; (8034bfc ) 8034be4: 240c movs r4, #12 8034be6: fb04 2403 mla r4, r4, r3, r2 8034bea: c807 ldmia r0, {r0, r1, r2} 8034bec: e884 0007 stmia.w r4, {r0, r1, r2} node_stack_cnt++; 8034bf0: 3301 adds r3, #1 8034bf2: 702b strb r3, [r5, #0] 8034bf4: bd30 pop {r4, r5, pc} 8034bf6: bf00 nop 8034bf8: 2000c5cc .word 0x2000c5cc 8034bfc: 2000c5d0 .word 0x2000c5d0 08034c00 : empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; if (node != NULL) 8034c00: b1d0 cbz r0, 8034c38 { node_type = node->node_type; 8034c02: 7c03 ldrb r3, [r0, #16] if (node_type == MIB_NODE_LR) 8034c04: 2b04 cmp r3, #4 8034c06: d105 bne.n 8034c14 { struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode *)node; if ((lrn->count == 0) || (lrn->head == NULL)) 8034c08: 8b83 ldrh r3, [r0, #28] 8034c0a: b903 cbnz r3, 8034c0e 8034c0c: e009 b.n 8034c22 8034c0e: 6943 ldr r3, [r0, #20] 8034c10: b13b cbz r3, 8034c22 8034c12: e010 b.n 8034c36 { empty = 1; } } else if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8034c14: 1e9a subs r2, r3, #2 8034c16: 2a01 cmp r2, #1 8034c18: d805 bhi.n 8034c26 { struct mib_array_node *an; an = (struct mib_array_node *)node; if ((an->maxlength == 0) || (an->nptr == NULL)) 8034c1a: 8a43 ldrh r3, [r0, #18] 8034c1c: b10b cbz r3, 8034c22 8034c1e: 6980 ldr r0, [r0, #24] 8034c20: e004 b.n 8034c2c { empty = 1; 8034c22: 2001 movs r0, #1 8034c24: 4770 bx lr } } else if (node_type == MIB_NODE_EX) 8034c26: 2b05 cmp r3, #5 8034c28: d105 bne.n 8034c36 { struct mib_external_node *en; en = (struct mib_external_node *)node; if (en->tree_levels == 0) 8034c2a: 7e00 ldrb r0, [r0, #24] */ static u8_t empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; 8034c2c: f1d0 0001 rsbs r0, r0, #1 8034c30: bf38 it cc 8034c32: 2000 movcc r0, #0 8034c34: 4770 bx lr 8034c36: 2000 movs r0, #0 empty = 1; } } } return empty; } 8034c38: 4770 bx lr 8034c3a: 0000 movs r0, r0 08034c3c : * @param netif points to returned netif struct pointer */ void snmp_ifindextonetif(s32_t ifindex, struct netif **netif) { struct netif *nif = netif_list; 8034c3c: 4b05 ldr r3, [pc, #20] ; (8034c54 ) s32_t i, ifidx; ifidx = ifindex - 1; 8034c3e: 3801 subs r0, #1 * @param netif points to returned netif struct pointer */ void snmp_ifindextonetif(s32_t ifindex, struct netif **netif) { struct netif *nif = netif_list; 8034c40: 681b ldr r3, [r3, #0] s32_t i, ifidx; ifidx = ifindex - 1; i = 0; 8034c42: 2200 movs r2, #0 while ((nif != NULL) && (i < ifidx)) 8034c44: e001 b.n 8034c4a { nif = nif->next; 8034c46: 681b ldr r3, [r3, #0] i++; 8034c48: 3201 adds r2, #1 struct netif *nif = netif_list; s32_t i, ifidx; ifidx = ifindex - 1; i = 0; while ((nif != NULL) && (i < ifidx)) 8034c4a: b10b cbz r3, 8034c50 8034c4c: 4282 cmp r2, r0 8034c4e: dbfa blt.n 8034c46 { nif = nif->next; i++; } *netif = nif; 8034c50: 600b str r3, [r1, #0] 8034c52: 4770 bx lr 8034c54: 2000ff14 .word 0x2000ff14 08034c58 : * @param ifidx points to s32_t object sub-identifier */ void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx) { struct netif *nif = netif_list; 8034c58: 4b06 ldr r3, [pc, #24] ; (8034c74 ) u16_t i; i = 0; 8034c5a: 2200 movs r2, #0 * @param ifidx points to s32_t object sub-identifier */ void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx) { struct netif *nif = netif_list; 8034c5c: 681b ldr r3, [r3, #0] u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8034c5e: e001 b.n 8034c64 { nif = nif->next; 8034c60: 681b ldr r3, [r3, #0] i++; 8034c62: b292 uxth r2, r2 8034c64: 3201 adds r2, #1 { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8034c66: b90b cbnz r3, 8034c6c { nif = nif->next; i++; } *ifidx = i+1; 8034c68: 600a str r2, [r1, #0] 8034c6a: 4770 bx lr { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8034c6c: 4283 cmp r3, r0 8034c6e: d1f7 bne.n 8034c60 8034c70: e7fa b.n 8034c68 8034c72: bf00 nop 8034c74: 2000ff14 .word 0x2000ff14 08034c78 : * @param ip points to output struct */ void snmp_oidtoip(s32_t *ident, ip_addr_t *ip) { IP4_ADDR(ip, ident[0], ident[1], ident[2], ident[3]); 8034c78: 7802 ldrb r2, [r0, #0] 8034c7a: 68c3 ldr r3, [r0, #12] 8034c7c: ea42 6303 orr.w r3, r2, r3, lsl #24 8034c80: 7a02 ldrb r2, [r0, #8] 8034c82: ea43 4302 orr.w r3, r3, r2, lsl #16 8034c86: 6842 ldr r2, [r0, #4] 8034c88: 0612 lsls r2, r2, #24 8034c8a: ea43 4312 orr.w r3, r3, r2, lsr #16 8034c8e: 600b str r3, [r1, #0] 8034c90: 4770 bx lr 08034c92 : * @param ident points to s32_t ident[4] output */ void snmp_iptooid(ip_addr_t *ip, s32_t *ident) { ident[0] = ip4_addr1(ip); 8034c92: 7803 ldrb r3, [r0, #0] 8034c94: 600b str r3, [r1, #0] ident[1] = ip4_addr2(ip); 8034c96: 7843 ldrb r3, [r0, #1] 8034c98: 604b str r3, [r1, #4] ident[2] = ip4_addr3(ip); 8034c9a: 7883 ldrb r3, [r0, #2] 8034c9c: 608b str r3, [r1, #8] ident[3] = ip4_addr4(ip); 8034c9e: 78c3 ldrb r3, [r0, #3] 8034ca0: 60cb str r3, [r1, #12] 8034ca2: 4770 bx lr 08034ca4 : } struct mib_list_node * snmp_mib_ln_alloc(s32_t id) { 8034ca4: b510 push {r4, lr} 8034ca6: 4604 mov r4, r0 struct mib_list_node *ln; ln = (struct mib_list_node *)memp_malloc(MEMP_SNMP_NODE); 8034ca8: 200b movs r0, #11 8034caa: f7fa fecd bl 802fa48 if (ln != NULL) 8034cae: b120 cbz r0, 8034cba { ln->prev = NULL; 8034cb0: 2300 movs r3, #0 8034cb2: 6003 str r3, [r0, #0] ln->next = NULL; 8034cb4: 6043 str r3, [r0, #4] ln->objid = id; 8034cb6: 6084 str r4, [r0, #8] ln->nptr = NULL; 8034cb8: 60c3 str r3, [r0, #12] } return ln; } 8034cba: bd10 pop {r4, pc} 08034cbc : void snmp_mib_ln_free(struct mib_list_node *ln) { 8034cbc: 4601 mov r1, r0 memp_free(MEMP_SNMP_NODE, ln); 8034cbe: 200b movs r0, #11 8034cc0: f7fa bed8 b.w 802fa74 08034cc4 : } struct mib_list_rootnode * snmp_mib_lrn_alloc(void) { 8034cc4: b508 push {r3, lr} struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode*)memp_malloc(MEMP_SNMP_ROOTNODE); 8034cc6: 200a movs r0, #10 8034cc8: f7fa febe bl 802fa48 if (lrn != NULL) 8034ccc: b170 cbz r0, 8034cec { lrn->get_object_def = noleafs_get_object_def; 8034cce: 4b08 ldr r3, [pc, #32] ; (8034cf0 ) 8034cd0: 6003 str r3, [r0, #0] lrn->get_value = noleafs_get_value; 8034cd2: 4b08 ldr r3, [pc, #32] ; (8034cf4 ) 8034cd4: 6043 str r3, [r0, #4] lrn->set_test = noleafs_set_test; 8034cd6: 4b08 ldr r3, [pc, #32] ; (8034cf8 ) 8034cd8: 6083 str r3, [r0, #8] lrn->set_value = noleafs_set_value; 8034cda: 4b08 ldr r3, [pc, #32] ; (8034cfc ) 8034cdc: 60c3 str r3, [r0, #12] lrn->node_type = MIB_NODE_LR; 8034cde: 2304 movs r3, #4 8034ce0: 7403 strb r3, [r0, #16] lrn->maxlength = 0; 8034ce2: 2300 movs r3, #0 8034ce4: 8243 strh r3, [r0, #18] lrn->head = NULL; 8034ce6: 6143 str r3, [r0, #20] lrn->tail = NULL; 8034ce8: 6183 str r3, [r0, #24] lrn->count = 0; 8034cea: 8383 strh r3, [r0, #28] } return lrn; } 8034cec: bd08 pop {r3, pc} 8034cee: bf00 nop 8034cf0: 0803361b .word 0x0803361b 8034cf4: 08033621 .word 0x08033621 8034cf8: 08033623 .word 0x08033623 8034cfc: 08033627 .word 0x08033627 08034d00 : void snmp_mib_lrn_free(struct mib_list_rootnode *lrn) { 8034d00: 4601 mov r1, r0 memp_free(MEMP_SNMP_ROOTNODE, lrn); 8034d02: 200a movs r0, #10 8034d04: f7fa beb6 b.w 802fa74 08034d08 : * used for constructing the tree. * @return -1 if failed, 1 if inserted, 2 if present. */ s8_t snmp_mib_node_insert(struct mib_list_rootnode *rn, s32_t objid, struct mib_list_node **insn) { 8034d08: b5f8 push {r3, r4, r5, r6, r7, lr} 8034d0a: 4605 mov r5, r0 8034d0c: 4616 mov r6, r2 LWIP_ASSERT("rn != NULL",rn != NULL); /* -1 = malloc failure, 0 = not inserted, 1 = inserted, 2 = was present */ insert = 0; if (rn->head == NULL) 8034d0e: 696c ldr r4, [r5, #20] * used for constructing the tree. * @return -1 if failed, 1 if inserted, 2 if present. */ s8_t snmp_mib_node_insert(struct mib_list_rootnode *rn, s32_t objid, struct mib_list_node **insn) { 8034d10: 4608 mov r0, r1 LWIP_ASSERT("rn != NULL",rn != NULL); /* -1 = malloc failure, 0 = not inserted, 1 = inserted, 2 = was present */ insert = 0; if (rn->head == NULL) 8034d12: b93c cbnz r4, 8034d24 { /* empty list, add first node */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc empty list objid==%"S32_F"\n",objid)); nn = snmp_mib_ln_alloc(objid); 8034d14: f7ff ffc6 bl 8034ca4 if (nn != NULL) 8034d18: b350 cbz r0, 8034d70 { rn->head = nn; 8034d1a: 6168 str r0, [r5, #20] rn->tail = nn; 8034d1c: 61a8 str r0, [r5, #24] *insn = nn; 8034d1e: 6030 str r0, [r6, #0] 8034d20: e021 b.n 8034d66 *insn = n; insert = 2; } else if (n->objid < objid) { if (n->next == NULL) 8034d22: 463c mov r4, r7 struct mib_list_node *n; /* at least one node is present */ n = rn->head; while ((n != NULL) && (insert == 0)) { if (n->objid == objid) 8034d24: 68a3 ldr r3, [r4, #8] 8034d26: 4283 cmp r3, r0 8034d28: d102 bne.n 8034d30 { /* node is already there */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("node already there objid==%"S32_F"\n",objid)); *insn = n; 8034d2a: 6034 str r4, [r6, #0] insert = 2; 8034d2c: 2302 movs r3, #2 8034d2e: e023 b.n 8034d78 } else if (n->objid < objid) 8034d30: da0a bge.n 8034d48 { if (n->next == NULL) 8034d32: 6867 ldr r7, [r4, #4] 8034d34: 2f00 cmp r7, #0 8034d36: d1f4 bne.n 8034d22 { /* alloc and insert at the tail */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc ins tail objid==%"S32_F"\n",objid)); nn = snmp_mib_ln_alloc(objid); 8034d38: f7ff ffb4 bl 8034ca4 if (nn != NULL) 8034d3c: b1d8 cbz r0, 8034d76 { nn->next = NULL; nn->prev = n; 8034d3e: e880 0090 stmia.w r0, {r4, r7} n->next = nn; 8034d42: 6060 str r0, [r4, #4] rn->tail = nn; 8034d44: 61a8 str r0, [r5, #24] 8034d46: e00b b.n 8034d60 else { /* n->objid > objid */ /* alloc and insert between n->prev and n */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc ins n->prev, objid==%"S32_F", n\n",objid)); nn = snmp_mib_ln_alloc(objid); 8034d48: f7ff ffac bl 8034ca4 if (nn != NULL) 8034d4c: b198 cbz r0, 8034d76 { if (n->prev == NULL) 8034d4e: 6822 ldr r2, [r4, #0] { /* insert at the head */ nn->next = n; nn->prev = NULL; 8034d50: e880 0014 stmia.w r0, {r2, r4} /* alloc and insert between n->prev and n */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc ins n->prev, objid==%"S32_F", n\n",objid)); nn = snmp_mib_ln_alloc(objid); if (nn != NULL) { if (n->prev == NULL) 8034d54: b90a cbnz r2, 8034d5a { /* insert at the head */ nn->next = n; nn->prev = NULL; rn->head = nn; 8034d56: 6168 str r0, [r5, #20] 8034d58: e001 b.n 8034d5e else { /* insert in the middle */ nn->next = n; nn->prev = n->prev; n->prev->next = nn; 8034d5a: 6822 ldr r2, [r4, #0] 8034d5c: 6050 str r0, [r2, #4] n->prev = nn; 8034d5e: 6020 str r0, [r4, #0] } *insn = nn; 8034d60: 6030 str r0, [r6, #0] insert = 1; 8034d62: 2301 movs r3, #1 8034d64: e008 b.n 8034d78 } } } if (insert == 1) { rn->count += 1; 8034d66: 8bab ldrh r3, [r5, #28] 8034d68: 3301 adds r3, #1 8034d6a: 83ab strh r3, [r5, #28] 8034d6c: 2301 movs r3, #1 8034d6e: e000 b.n 8034d72 *insn = nn; insert = 1; } else { insert = -1; 8034d70: 23ff movs r3, #255 ; 0xff if (insert == 1) { rn->count += 1; } LWIP_ASSERT("insert != 0",insert != 0); return insert; 8034d72: b258 sxtb r0, r3 8034d74: bdf8 pop {r3, r4, r5, r6, r7, pc} insert = 1; } else { /* insertion failure */ insert = -1; 8034d76: 23ff movs r3, #255 ; 0xff } } } } if (insert == 1) 8034d78: 2b01 cmp r3, #1 8034d7a: d1fa bne.n 8034d72 8034d7c: e7f3 b.n 8034d66 08034d7e : { s8_t fc; struct mib_list_node *n; LWIP_ASSERT("rn != NULL",rn != NULL); n = rn->head; 8034d7e: 6943 ldr r3, [r0, #20] while ((n != NULL) && (n->objid != objid)) 8034d80: e000 b.n 8034d84 { n = n->next; 8034d82: 685b ldr r3, [r3, #4] s8_t fc; struct mib_list_node *n; LWIP_ASSERT("rn != NULL",rn != NULL); n = rn->head; while ((n != NULL) && (n->objid != objid)) 8034d84: b16b cbz r3, 8034da2 8034d86: 6898 ldr r0, [r3, #8] 8034d88: 4288 cmp r0, r1 8034d8a: d1fa bne.n 8034d82 } if (n == NULL) { fc = 0; } else if (n->nptr == NULL) 8034d8c: 68d9 ldr r1, [r3, #12] 8034d8e: b161 cbz r1, 8034daa } else { struct mib_list_rootnode *r; if (n->nptr->node_type == MIB_NODE_LR) 8034d90: 7c08 ldrb r0, [r1, #16] 8034d92: 2804 cmp r0, #4 8034d94: d107 bne.n 8034da6 { r = (struct mib_list_rootnode *)n->nptr; if (r->count > 1) 8034d96: 8b88 ldrh r0, [r1, #28] { /* can't delete node */ fc = 2; 8034d98: 2801 cmp r0, #1 8034d9a: bf94 ite ls 8034d9c: 2001 movls r0, #1 8034d9e: 2002 movhi r0, #2 8034da0: e004 b.n 8034dac { n = n->next; } if (n == NULL) { fc = 0; 8034da2: 4618 mov r0, r3 8034da4: e002 b.n 8034dac } } else { /* other node type */ fc = 3; 8034da6: 2003 movs r0, #3 8034da8: e000 b.n 8034dac fc = 0; } else if (n->nptr == NULL) { /* leaf, can delete node */ fc = 1; 8034daa: 2001 movs r0, #1 { /* other node type */ fc = 3; } } *fn = n; 8034dac: 6013 str r3, [r2, #0] return fc; } 8034dae: b240 sxtb r0, r0 8034db0: 4770 bx lr 08034db2 : * @param n points to the node to delete * @return the nptr to be freed by caller */ struct mib_list_rootnode * snmp_mib_node_delete(struct mib_list_rootnode *rn, struct mib_list_node *n) { 8034db2: b538 push {r3, r4, r5, lr} LWIP_ASSERT("rn != NULL",rn != NULL); LWIP_ASSERT("n != NULL",n != NULL); /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); rn->count -= 1; 8034db4: 8b83 ldrh r3, [r0, #28] LWIP_ASSERT("rn != NULL",rn != NULL); LWIP_ASSERT("n != NULL",n != NULL); /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); 8034db6: 68cd ldr r5, [r1, #12] rn->count -= 1; 8034db8: 3b01 subs r3, #1 8034dba: 8383 strh r3, [r0, #28] if (n == rn->head) 8034dbc: 6943 ldr r3, [r0, #20] 8034dbe: 4299 cmp r1, r3 * @param n points to the node to delete * @return the nptr to be freed by caller */ struct mib_list_rootnode * snmp_mib_node_delete(struct mib_list_rootnode *rn, struct mib_list_node *n) { 8034dc0: 4604 mov r4, r0 /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); rn->count -= 1; if (n == rn->head) 8034dc2: d105 bne.n 8034dd0 { rn->head = n->next; 8034dc4: 684b ldr r3, [r1, #4] 8034dc6: 6143 str r3, [r0, #20] if (n->next != NULL) 8034dc8: b17b cbz r3, 8034dea { /* not last node, new list begin */ n->next->prev = NULL; 8034dca: 2200 movs r2, #0 8034dcc: 601a str r2, [r3, #0] 8034dce: e00c b.n 8034dea } } else if (n == rn->tail) 8034dd0: 6983 ldr r3, [r0, #24] 8034dd2: 4299 cmp r1, r3 8034dd4: 680b ldr r3, [r1, #0] 8034dd6: d104 bne.n 8034de2 { rn->tail = n->prev; 8034dd8: 6183 str r3, [r0, #24] if (n->prev != NULL) 8034dda: b133 cbz r3, 8034dea { /* not last node, new list end */ n->prev->next = NULL; 8034ddc: 2200 movs r2, #0 8034dde: 605a str r2, [r3, #4] 8034de0: e003 b.n 8034dea } } else { /* node must be in the middle */ n->prev->next = n->next; 8034de2: 684a ldr r2, [r1, #4] 8034de4: 605a str r2, [r3, #4] n->next->prev = n->prev; 8034de6: 684a ldr r2, [r1, #4] 8034de8: 6013 str r3, [r2, #0] } LWIP_DEBUGF(SNMP_MIB_DEBUG,("free list objid==%"S32_F"\n",n->objid)); snmp_mib_ln_free(n); 8034dea: 4608 mov r0, r1 8034dec: f7ff ff66 bl 8034cbc if (rn->count == 0) 8034df0: 8ba3 ldrh r3, [r4, #28] 8034df2: b90b cbnz r3, 8034df8 { rn->head = NULL; 8034df4: 6163 str r3, [r4, #20] rn->tail = NULL; 8034df6: 61a3 str r3, [r4, #24] } return next; } 8034df8: 4628 mov r0, r5 8034dfa: bd38 pop {r3, r4, r5, pc} 08034dfc : * @param np points to the found object instance (return) * @return pointer to the requested parent (!) node if success, NULL otherwise */ struct mib_node * snmp_search_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_name_ptr *np) { 8034dfc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8034e00: 4604 mov r4, r0 8034e02: b085 sub sp, #20 8034e04: 460d mov r5, r1 8034e06: 461e mov r6, r3 * @param ident points to the array of sub identifiers * @param np points to the found object instance (return) * @return pointer to the requested parent (!) node if success, NULL otherwise */ struct mib_node * snmp_search_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_name_ptr *np) 8034e08: f102 0804 add.w r8, r2, #4 { u8_t node_type, ext_level; ext_level = 0; 8034e0c: f04f 0b00 mov.w fp, #0 LWIP_DEBUGF(SNMP_MIB_DEBUG,("node==%p *ident==%"S32_F"\n",(void*)node,*ident)); while (node != NULL) 8034e10: e068 b.n 8034ee4 { node_type = node->node_type; 8034e12: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8034e14: 1e9a subs r2, r3, #2 8034e16: 2a01 cmp r2, #1 8034e18: d812 bhi.n 8034e40 { struct mib_array_node *an; u16_t i; if (ident_len > 0) 8034e1a: b90d cbnz r5, 8034e20 } else { /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an search failed, short object identifier\n")); return NULL; 8034e1c: 2000 movs r0, #0 8034e1e: e06a b.n 8034ef6 if (ident_len > 0) { /* array node (internal ROM or RAM, fixed length) */ an = (struct mib_array_node *)node; i = 0; while ((i < an->maxlength) && (an->objid[i] != *ident)) 8034e20: 8a67 ldrh r7, [r4, #18] 8034e22: 2300 movs r3, #0 8034e24: b29a uxth r2, r3 8034e26: 42ba cmp r2, r7 8034e28: d2f8 bcs.n 8034e1c 8034e2a: 009a lsls r2, r3, #2 8034e2c: 6961 ldr r1, [r4, #20] 8034e2e: 5888 ldr r0, [r1, r2] 8034e30: f858 1c04 ldr.w r1, [r8, #-4] 8034e34: 3301 adds r3, #1 8034e36: 4288 cmp r0, r1 8034e38: d1f4 bne.n 8034e24 } if (i < an->maxlength) { /* found it, if available proceed to child, otherwise inspect leaf */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an->objid[%"U16_F"]==%"S32_F" *ident==%"S32_F"\n",i,an->objid[i],*ident)); if (an->nptr[i] == NULL) 8034e3a: 69a3 ldr r3, [r4, #24] 8034e3c: 589b ldr r3, [r3, r2] 8034e3e: e057 b.n 8034ef0 /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an search failed, short object identifier\n")); return NULL; } } else if(node_type == MIB_NODE_LR) 8034e40: 2b04 cmp r3, #4 8034e42: d10c bne.n 8034e5e { struct mib_list_rootnode *lrn; struct mib_list_node *ln; if (ident_len > 0) 8034e44: 2d00 cmp r5, #0 8034e46: d0e9 beq.n 8034e1c { /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; ln = lrn->head; 8034e48: 6963 ldr r3, [r4, #20] /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid != *ident)) 8034e4a: e000 b.n 8034e4e { ln = ln->next; 8034e4c: 685b ldr r3, [r3, #4] { /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid != *ident)) 8034e4e: 2b00 cmp r3, #0 8034e50: d0e4 beq.n 8034e1c 8034e52: 6899 ldr r1, [r3, #8] 8034e54: f858 2c04 ldr.w r2, [r8, #-4] 8034e58: 4291 cmp r1, r2 8034e5a: d1f7 bne.n 8034e4c 8034e5c: e047 b.n 8034eee /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("ln search failed, short object identifier\n")); return NULL; } } else if(node_type == MIB_NODE_EX) 8034e5e: 2b05 cmp r3, #5 8034e60: d12e bne.n 8034ec0 { struct mib_external_node *en; u16_t i, len; if (ident_len > 0) 8034e62: 2d00 cmp r5, #0 8034e64: d0da beq.n 8034e1c { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; len = en->level_length(en->addr_inf,ext_level); 8034e66: 69e3 ldr r3, [r4, #28] 8034e68: 6960 ldr r0, [r4, #20] 8034e6a: 4659 mov r1, fp 8034e6c: 4798 blx r3 if (ident_len > 0) { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; 8034e6e: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 8034e72: 4684 mov ip, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) != 0)) 8034e74: e003 b.n 8034e7e { i++; 8034e76: f109 0901 add.w r9, r9, #1 8034e7a: fa1f f989 uxth.w r9, r9 /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; len = en->level_length(en->addr_inf,ext_level); while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) != 0)) 8034e7e: 45e1 cmp r9, ip 8034e80: d0cc beq.n 8034e1c 8034e82: 6960 ldr r0, [r4, #20] 8034e84: f858 3c04 ldr.w r3, [r8, #-4] 8034e88: 6a27 ldr r7, [r4, #32] 8034e8a: f8cd c004 str.w ip, [sp, #4] 8034e8e: 4659 mov r1, fp 8034e90: 464a mov r2, r9 8034e92: 47b8 blx r7 8034e94: f8dd c004 ldr.w ip, [sp, #4] 8034e98: 2800 cmp r0, #0 8034e9a: d1ec bne.n 8034e76 { i++; } if (i < len) 8034e9c: 45e1 cmp r9, ip 8034e9e: d2bd bcs.n 8034e1c { s32_t debug_id; en->get_objid(en->addr_inf,ext_level,i,&debug_id); 8034ea0: 4659 mov r1, fp 8034ea2: ab03 add r3, sp, #12 8034ea4: 6a67 ldr r7, [r4, #36] ; 0x24 8034ea6: 6960 ldr r0, [r4, #20] 8034ea8: 464a mov r2, r9 8034eaa: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("en->objid==%"S32_F" *ident==%"S32_F"\n",debug_id,*ident)); if ((ext_level + 1) == en->tree_levels) 8034eac: 7e23 ldrb r3, [r4, #24] 8034eae: f10b 0b01 add.w fp, fp, #1 8034eb2: 459b cmp fp, r3 8034eb4: d100 bne.n 8034eb8 8034eb6: e00b b.n 8034ed0 else { /* found it, proceed to child */ ident_len--; ident++; ext_level++; 8034eb8: fa5f fb8b uxtb.w fp, fp 8034ebc: 4623 mov r3, r4 8034ebe: e00c b.n 8034eda /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("en search failed, short object identifier\n")); return NULL; } } else if (node_type == MIB_NODE_SC) 8034ec0: 2b01 cmp r3, #1 8034ec2: d1ab bne.n 8034e1c { mib_scalar_node *sn; sn = (mib_scalar_node *)node; if ((ident_len == 1) && (*ident == 0)) 8034ec4: 2d01 cmp r5, #1 8034ec6: d1a9 bne.n 8034e1c 8034ec8: f8da 3000 ldr.w r3, [sl] 8034ecc: 2b00 cmp r3, #0 8034ece: d1a5 bne.n 8034e1c { np->ident_len = ident_len; 8034ed0: 7035 strb r5, [r6, #0] np->ident = ident; 8034ed2: f8c6 a004 str.w sl, [r6, #4] return (struct mib_node*)sn; 8034ed6: 4620 mov r0, r4 8034ed8: e00d b.n 8034ef6 8034eda: 3d01 subs r5, #1 8034edc: b2ed uxtb r5, r5 8034ede: f108 0804 add.w r8, r8, #4 8034ee2: 461c mov r4, r3 * @param ident points to the array of sub identifiers * @param np points to the found object instance (return) * @return pointer to the requested parent (!) node if success, NULL otherwise */ struct mib_node * snmp_search_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_name_ptr *np) 8034ee4: f1a8 0a04 sub.w sl, r8, #4 { u8_t node_type, ext_level; ext_level = 0; LWIP_DEBUGF(SNMP_MIB_DEBUG,("node==%p *ident==%"S32_F"\n",(void*)node,*ident)); while (node != NULL) 8034ee8: 2c00 cmp r4, #0 8034eea: d192 bne.n 8034e12 8034eec: e796 b.n 8034e1c } if (ln != NULL) { /* found it, proceed to child */; LWIP_DEBUGF(SNMP_MIB_DEBUG,("ln->objid==%"S32_F" *ident==%"S32_F"\n",ln->objid,*ident)); if (ln->nptr == NULL) 8034eee: 68db ldr r3, [r3, #12] 8034ef0: 2b00 cmp r3, #0 8034ef2: d1f2 bne.n 8034eda 8034ef4: e7ec b.n 8034ed0 } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("search failed node==%p\n",(void*)node)); return NULL; } 8034ef6: b005 add sp, #20 8034ef8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08034efc : /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 8034efc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8034f00: 461d mov r5, r3 8034f02: b08b sub sp, #44 ; 0x2c u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 8034f04: 4ba4 ldr r3, [pc, #656] ; (8035198 ) 8034f06: f04f 0a00 mov.w sl, #0 j = (u8_t)i + 1; if (j < len) { /* right node is the current external node */ cur_node.r_ptr = node; en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 8034f0a: af08 add r7, sp, #32 /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 8034f0c: 4604 mov r4, r0 8034f0e: 460e mov r6, r1 8034f10: 4690 mov r8, r2 u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 8034f12: f883 a000 strb.w sl, [r3] j = (u8_t)i + 1; if (j < len) { /* right node is the current external node */ cur_node.r_ptr = node; en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 8034f16: 9705 str r7, [sp, #20] u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; while (node != NULL) 8034f18: e19c b.n 8035254 { climb_tree = 0; node_type = node->node_type; 8034f1a: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8034f1c: 1e9a subs r2, r3, #2 8034f1e: 2a01 cmp r2, #1 8034f20: f200 808f bhi.w 8035042 8034f24: 8a67 ldrh r7, [r4, #18] struct mib_array_node *an; u16_t i; /* array node (internal ROM or RAM, fixed length) */ an = (struct mib_array_node *)node; if (ident_len > 0) 8034f26: b90e cbnz r6, 8034f2c else { u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) 8034f28: 46b1 mov r9, r6 8034f2a: e06f b.n 803500c /* array node (internal ROM or RAM, fixed length) */ an = (struct mib_array_node *)node; if (ident_len > 0) { i = 0; while ((i < an->maxlength) && (an->objid[i] < *ident)) 8034f2c: f04f 0c00 mov.w ip, #0 8034f30: fa1f f28c uxth.w r2, ip 8034f34: 42ba cmp r2, r7 8034f36: f080 8168 bcs.w 803520a 8034f3a: 6963 ldr r3, [r4, #20] 8034f3c: f853 102c ldr.w r1, [r3, ip, lsl #2] 8034f40: f8d8 3000 ldr.w r3, [r8] 8034f44: 4299 cmp r1, r3 8034f46: ea4f 098c mov.w r9, ip, lsl #2 8034f4a: f10c 0c01 add.w ip, ip, #1 8034f4e: dbef blt.n 8034f30 } if (i < an->maxlength) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("an->objid[%"U16_F"]==%"S32_F" *ident==%"S32_F"\n",i,an->objid[i],*ident)); /* add identifier to oidret */ oidret->id[oidret->len] = an->objid[i]; 8034f50: 782b ldrb r3, [r5, #0] 8034f52: eb05 0783 add.w r7, r5, r3, lsl #2 8034f56: 6079 str r1, [r7, #4] (oidret->len)++; 8034f58: 1c59 adds r1, r3, #1 8034f5a: 7029 strb r1, [r5, #0] if (an->nptr[i] == NULL) 8034f5c: f8d4 b018 ldr.w fp, [r4, #24] 8034f60: f85b 0009 ldr.w r0, [fp, r9] 8034f64: b998 cbnz r0, 8034f8e { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node (e.g. in a fixed size table) */ if (an->objid[i] > *ident) 8034f66: 6960 ldr r0, [r4, #20] 8034f68: f850 6009 ldr.w r6, [r0, r9] 8034f6c: f8d8 0000 ldr.w r0, [r8] 8034f70: 4286 cmp r6, r0 8034f72: f300 8173 bgt.w 803525c { return (struct mib_node*)an; } else if ((i + 1) < an->maxlength) 8034f76: 8a60 ldrh r0, [r4, #18] { /* an->objid[i] == *ident */ (oidret->len)--; 8034f78: 702b strb r3, [r5, #0] /* leaf node (e.g. in a fixed size table) */ if (an->objid[i] > *ident) { return (struct mib_node*)an; } else if ((i + 1) < an->maxlength) 8034f7a: 3201 adds r2, #1 8034f7c: 4282 cmp r2, r0 8034f7e: f280 8144 bge.w 803520a { /* an->objid[i] == *ident */ (oidret->len)--; oidret->id[oidret->len] = an->objid[i + 1]; 8034f82: 6963 ldr r3, [r4, #20] 8034f84: f853 302c ldr.w r3, [r3, ip, lsl #2] (oidret->len)++; 8034f88: 7029 strb r1, [r5, #0] } else if ((i + 1) < an->maxlength) { /* an->objid[i] == *ident */ (oidret->len)--; oidret->id[oidret->len] = an->objid[i + 1]; 8034f8a: 607b str r3, [r7, #4] 8034f8c: e166 b.n 803525c struct nse cur_node; LWIP_DEBUGF(SNMP_MIB_DEBUG,("non-leaf node\n")); /* non-leaf, store right child ptr and id */ LWIP_ASSERT("i < 0xff", i < 0xff); j = (u8_t)i + 1; 8034f8e: 3201 adds r2, #1 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8034f90: 8a61 ldrh r1, [r4, #18] struct nse cur_node; LWIP_DEBUGF(SNMP_MIB_DEBUG,("non-leaf node\n")); /* non-leaf, store right child ptr and id */ LWIP_ASSERT("i < 0xff", i < 0xff); j = (u8_t)i + 1; 8034f92: fa5f fc82 uxtb.w ip, r2 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8034f96: 2700 movs r7, #0 /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) 8034f98: eb0c 0307 add.w r3, ip, r7 8034f9c: b2db uxtb r3, r3 LWIP_DEBUGF(SNMP_MIB_DEBUG,("non-leaf node\n")); /* non-leaf, store right child ptr and id */ LWIP_ASSERT("i < 0xff", i < 0xff); j = (u8_t)i + 1; while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8034f9e: 428b cmp r3, r1 8034fa0: d21a bcs.n 8034fd8 8034fa2: b21b sxth r3, r3 8034fa4: 009a lsls r2, r3, #2 8034fa6: f85b 3023 ldr.w r3, [fp, r3, lsl #2] 8034faa: 9104 str r1, [sp, #16] 8034fac: 4618 mov r0, r3 8034fae: 9203 str r2, [sp, #12] 8034fb0: 9302 str r3, [sp, #8] 8034fb2: f8cd c004 str.w ip, [sp, #4] 8034fb6: f7ff fe23 bl 8034c00 8034fba: 3701 adds r7, #1 8034fbc: 9904 ldr r1, [sp, #16] 8034fbe: 9a03 ldr r2, [sp, #12] 8034fc0: 9b02 ldr r3, [sp, #8] 8034fc2: f8dd c004 ldr.w ip, [sp, #4] 8034fc6: 2800 cmp r0, #0 8034fc8: d1e6 bne.n 8034f98 { j++; } if (j < an->maxlength) { cur_node.r_ptr = an->nptr[j]; 8034fca: 9307 str r3, [sp, #28] cur_node.r_id = an->objid[j]; 8034fcc: 6963 ldr r3, [r4, #20] 8034fce: 589b ldr r3, [r3, r2] cur_node.r_nl = 0; 8034fd0: f88d 0024 strb.w r0, [sp, #36] ; 0x24 j++; } if (j < an->maxlength) { cur_node.r_ptr = an->nptr[j]; cur_node.r_id = an->objid[j]; 8034fd4: 9308 str r3, [sp, #32] 8034fd6: e001 b.n 8034fdc cur_node.r_nl = 0; } else { cur_node.r_ptr = NULL; 8034fd8: 2300 movs r3, #0 8034fda: 9307 str r3, [sp, #28] } push_node(&cur_node); 8034fdc: a807 add r0, sp, #28 8034fde: f7ff fdfb bl 8034bd8 if (an->objid[i] == *ident) 8034fe2: 6963 ldr r3, [r4, #20] 8034fe4: f853 2009 ldr.w r2, [r3, r9] 8034fe8: f8d8 3000 ldr.w r3, [r8] 8034fec: 429a cmp r2, r3 8034fee: d104 bne.n 8034ffa { ident_len--; 8034ff0: 3e01 subs r6, #1 8034ff2: b2f6 uxtb r6, r6 ident++; 8034ff4: f108 0804 add.w r8, r8, #4 8034ff8: e000 b.n 8034ffc } else { /* an->objid[i] < *ident */ ident_len = 0; 8034ffa: 2600 movs r6, #0 } /* follow next child pointer */ node = an->nptr[i]; 8034ffc: 69a3 ldr r3, [r4, #24] 8034ffe: f853 3009 ldr.w r3, [r3, r9] 8035002: e140 b.n 8035286 u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) { j++; 8035004: f109 0901 add.w r9, r9, #1 8035008: fa5f f989 uxtb.w r9, r9 else { u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) 803500c: 45b9 cmp r9, r7 803500e: f080 80fc bcs.w 803520a 8035012: fa0f f289 sxth.w r2, r9 8035016: 69a3 ldr r3, [r4, #24] 8035018: f853 0022 ldr.w r0, [r3, r2, lsl #2] 803501c: ea4f 0b82 mov.w fp, r2, lsl #2 8035020: f7ff fdee bl 8034c00 8035024: 2800 cmp r0, #0 8035026: d1ed bne.n 8035004 j++; } if (j < an->maxlength) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left an->objid[j]==%"S32_F"\n",an->objid[j])); oidret->id[oidret->len] = an->objid[j]; 8035028: 6962 ldr r2, [r4, #20] 803502a: 782b ldrb r3, [r5, #0] 803502c: f852 100b ldr.w r1, [r2, fp] 8035030: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 8035034: 3301 adds r3, #1 8035036: 702b strb r3, [r5, #0] if (an->nptr[j] == NULL) 8035038: 69a3 ldr r3, [r4, #24] j++; } if (j < an->maxlength) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left an->objid[j]==%"S32_F"\n",an->objid[j])); oidret->id[oidret->len] = an->objid[j]; 803503a: 6051 str r1, [r2, #4] (oidret->len)++; if (an->nptr[j] == NULL) 803503c: f853 300b ldr.w r3, [r3, fp] 8035040: e11f b.n 8035282 /* j == an->maxlength */ climb_tree = 1; } } } else if(node_type == MIB_NODE_LR) 8035042: 2b04 cmp r3, #4 8035044: d14c bne.n 80350e0 8035046: 6967 ldr r7, [r4, #20] struct mib_list_rootnode *lrn; struct mib_list_node *ln; /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; if (ident_len > 0) 8035048: 2e00 cmp r6, #0 803504a: d040 beq.n 80350ce { ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid < *ident)) 803504c: e000 b.n 8035050 { ln = ln->next; 803504e: 687f ldr r7, [r7, #4] lrn = (struct mib_list_rootnode *)node; if (ident_len > 0) { ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid < *ident)) 8035050: 2f00 cmp r7, #0 8035052: f000 80da beq.w 803520a 8035056: 68ba ldr r2, [r7, #8] 8035058: f8d8 3000 ldr.w r3, [r8] 803505c: 429a cmp r2, r3 803505e: dbf6 blt.n 803504e ln = ln->next; } if (ln != NULL) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ln->objid==%"S32_F" *ident==%"S32_F"\n",ln->objid,*ident)); oidret->id[oidret->len] = ln->objid; 8035060: 782b ldrb r3, [r5, #0] 8035062: eb05 0183 add.w r1, r5, r3, lsl #2 8035066: 604a str r2, [r1, #4] (oidret->len)++; 8035068: 1c5a adds r2, r3, #1 803506a: 702a strb r2, [r5, #0] if (ln->nptr == NULL) 803506c: 68f8 ldr r0, [r7, #12] 803506e: b978 cbnz r0, 8035090 { /* leaf node */ if (ln->objid > *ident) 8035070: 68b8 ldr r0, [r7, #8] 8035072: f8d8 6000 ldr.w r6, [r8] 8035076: 42b0 cmp r0, r6 8035078: f300 80f0 bgt.w 803525c { return (struct mib_node*)lrn; } else if (ln->next != NULL) 803507c: 6878 ldr r0, [r7, #4] { /* ln->objid == *ident */ (oidret->len)--; 803507e: 702b strb r3, [r5, #0] /* leaf node */ if (ln->objid > *ident) { return (struct mib_node*)lrn; } else if (ln->next != NULL) 8035080: 2800 cmp r0, #0 8035082: f000 80c2 beq.w 803520a { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 8035086: 687b ldr r3, [r7, #4] 8035088: 689b ldr r3, [r3, #8] (oidret->len)++; 803508a: 702a strb r2, [r5, #0] } else if (ln->next != NULL) { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 803508c: 604b str r3, [r1, #4] 803508e: e0e5 b.n 803525c { struct mib_list_node *jn; struct nse cur_node; /* non-leaf, store right child ptr and id */ jn = ln->next; 8035090: 687c ldr r4, [r7, #4] while ((jn != NULL) && empty_table(jn->nptr)) 8035092: e000 b.n 8035096 { jn = jn->next; 8035094: 6864 ldr r4, [r4, #4] struct mib_list_node *jn; struct nse cur_node; /* non-leaf, store right child ptr and id */ jn = ln->next; while ((jn != NULL) && empty_table(jn->nptr)) 8035096: 2c00 cmp r4, #0 8035098: f000 80e9 beq.w 803526e 803509c: f8d4 900c ldr.w r9, [r4, #12] 80350a0: 4648 mov r0, r9 80350a2: f7ff fdad bl 8034c00 80350a6: 2800 cmp r0, #0 80350a8: d1f4 bne.n 8035094 80350aa: e0d9 b.n 8035260 } else { cur_node.r_ptr = NULL; } push_node(&cur_node); 80350ac: a807 add r0, sp, #28 80350ae: f7ff fd93 bl 8034bd8 if (ln->objid == *ident) 80350b2: 68ba ldr r2, [r7, #8] 80350b4: f8d8 3000 ldr.w r3, [r8] 80350b8: 429a cmp r2, r3 80350ba: d104 bne.n 80350c6 { ident_len--; 80350bc: 3e01 subs r6, #1 80350be: b2f6 uxtb r6, r6 ident++; 80350c0: f108 0804 add.w r8, r8, #4 80350c4: e000 b.n 80350c8 } else { /* ln->objid < *ident */ ident_len = 0; 80350c6: 2600 movs r6, #0 } /* follow next child pointer */ node = ln->nptr; 80350c8: 68fb ldr r3, [r7, #12] 80350ca: e0dc b.n 8035286 struct mib_list_node *jn; /* ident_len == 0, complete with leftmost '.thing' */ jn = lrn->head; while ((jn != NULL) && empty_table(jn->nptr)) { jn = jn->next; 80350cc: 687f ldr r7, [r7, #4] else { struct mib_list_node *jn; /* ident_len == 0, complete with leftmost '.thing' */ jn = lrn->head; while ((jn != NULL) && empty_table(jn->nptr)) 80350ce: 2f00 cmp r7, #0 80350d0: f000 809b beq.w 803520a 80350d4: 68f8 ldr r0, [r7, #12] 80350d6: f7ff fd93 bl 8034c00 80350da: 2800 cmp r0, #0 80350dc: d1f6 bne.n 80350cc 80350de: e0c8 b.n 8035272 /* jn == NULL */ climb_tree = 1; } } } else if(node_type == MIB_NODE_EX) 80350e0: 2b05 cmp r3, #5 80350e2: f040 8086 bne.w 80351f2 struct mib_external_node *en; s32_t ex_id; /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; if (ident_len > 0) 80350e6: 2e00 cmp r6, #0 80350e8: d06e beq.n 80351c8 { u16_t i, len; i = 0; len = en->level_length(en->addr_inf,ext_level); 80350ea: 69e3 ldr r3, [r4, #28] 80350ec: 6960 ldr r0, [r4, #20] 80350ee: 4651 mov r1, sl 80350f0: 4798 blx r3 en = (struct mib_external_node *)node; if (ident_len > 0) { u16_t i, len; i = 0; 80350f2: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 80350f6: 4683 mov fp, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) < 0)) 80350f8: e003 b.n 8035102 { i++; 80350fa: f109 0901 add.w r9, r9, #1 80350fe: fa1f f989 uxth.w r9, r9 { u16_t i, len; i = 0; len = en->level_length(en->addr_inf,ext_level); while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) < 0)) 8035102: 45d9 cmp r9, fp 8035104: f000 8081 beq.w 803520a 8035108: 6a27 ldr r7, [r4, #32] 803510a: 6960 ldr r0, [r4, #20] 803510c: f8d8 3000 ldr.w r3, [r8] 8035110: 4651 mov r1, sl 8035112: 464a mov r2, r9 8035114: 47b8 blx r7 8035116: 2800 cmp r0, #0 8035118: dbef blt.n 80350fa { i++; } if (i < len) 803511a: 45d9 cmp r9, fp 803511c: d275 bcs.n 803520a { /* add identifier to oidret */ en->get_objid(en->addr_inf,ext_level,i,&ex_id); 803511e: 4651 mov r1, sl 8035120: 464a mov r2, r9 8035122: ab06 add r3, sp, #24 8035124: 6a67 ldr r7, [r4, #36] ; 0x24 8035126: 6960 ldr r0, [r4, #20] 8035128: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("en->objid[%"U16_F"]==%"S32_F" *ident==%"S32_F"\n",i,ex_id,*ident)); oidret->id[oidret->len] = ex_id; 803512a: 782b ldrb r3, [r5, #0] 803512c: 9a06 ldr r2, [sp, #24] 803512e: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; if ((ext_level + 1) == en->tree_levels) 8035132: f10a 0c01 add.w ip, sl, #1 if (i < len) { /* add identifier to oidret */ en->get_objid(en->addr_inf,ext_level,i,&ex_id); LWIP_DEBUGF(SNMP_MIB_DEBUG,("en->objid[%"U16_F"]==%"S32_F" *ident==%"S32_F"\n",i,ex_id,*ident)); oidret->id[oidret->len] = ex_id; 8035136: 604a str r2, [r1, #4] (oidret->len)++; 8035138: 1c59 adds r1, r3, #1 803513a: 7029 strb r1, [r5, #0] if ((ext_level + 1) == en->tree_levels) 803513c: 7e21 ldrb r1, [r4, #24] 803513e: 458c cmp ip, r1 8035140: d118 bne.n 8035174 { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node */ if (ex_id > *ident) 8035142: f8d8 1000 ldr.w r1, [r8] 8035146: 428a cmp r2, r1 8035148: f300 8088 bgt.w 803525c { return (struct mib_node*)en; } else if ((i + 1) < len) 803514c: f109 0201 add.w r2, r9, #1 8035150: 455a cmp r2, fp 8035152: da0d bge.n 8035170 { /* ex_id == *ident */ en->get_objid(en->addr_inf,ext_level,i + 1,&ex_id); 8035154: ab06 add r3, sp, #24 8035156: 6a66 ldr r6, [r4, #36] ; 0x24 8035158: 6960 ldr r0, [r4, #20] 803515a: 4651 mov r1, sl 803515c: b292 uxth r2, r2 803515e: 47b0 blx r6 (oidret->len)--; 8035160: 782b ldrb r3, [r5, #0] 8035162: 3b01 subs r3, #1 oidret->id[oidret->len] = ex_id; 8035164: b2db uxtb r3, r3 8035166: eb05 0583 add.w r5, r5, r3, lsl #2 803516a: 9b06 ldr r3, [sp, #24] 803516c: 606b str r3, [r5, #4] 803516e: e075 b.n 803525c return (struct mib_node*)en; } else { /* (i + 1) == len */ (oidret->len)--; 8035170: 702b strb r3, [r5, #0] 8035172: e04a b.n 803520a struct nse cur_node; LWIP_DEBUGF(SNMP_MIB_DEBUG,("non-leaf node\n")); /* non-leaf, store right child ptr and id */ LWIP_ASSERT("i < 0xff", i < 0xff); j = (u8_t)i + 1; 8035174: f109 0201 add.w r2, r9, #1 if (j < len) 8035178: b2d2 uxtb r2, r2 803517a: 455a cmp r2, fp 803517c: d20e bcs.n 803519c { /* right node is the current external node */ cur_node.r_ptr = node; 803517e: 9407 str r4, [sp, #28] en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 8035180: 6960 ldr r0, [r4, #20] 8035182: 9b05 ldr r3, [sp, #20] 8035184: f8cd c004 str.w ip, [sp, #4] 8035188: 4651 mov r1, sl 803518a: 6a67 ldr r7, [r4, #36] ; 0x24 803518c: 47b8 blx r7 cur_node.r_nl = ext_level + 1; 803518e: f8dd c004 ldr.w ip, [sp, #4] 8035192: f88d c024 strb.w ip, [sp, #36] ; 0x24 8035196: e003 b.n 80351a0 8035198: 2000c5cc .word 0x2000c5cc } else { cur_node.r_ptr = NULL; 803519c: 2300 movs r3, #0 803519e: 9307 str r3, [sp, #28] } push_node(&cur_node); 80351a0: a807 add r0, sp, #28 80351a2: f7ff fd19 bl 8034bd8 if (en->ident_cmp(en->addr_inf,ext_level,i,*ident) == 0) 80351a6: 6a27 ldr r7, [r4, #32] 80351a8: 6960 ldr r0, [r4, #20] 80351aa: f8d8 3000 ldr.w r3, [r8] 80351ae: 4651 mov r1, sl 80351b0: 464a mov r2, r9 80351b2: 47b8 blx r7 80351b4: b920 cbnz r0, 80351c0 { ident_len--; 80351b6: 3e01 subs r6, #1 80351b8: b2f6 uxtb r6, r6 ident++; 80351ba: f108 0804 add.w r8, r8, #4 80351be: e000 b.n 80351c2 } else { /* external id < *ident */ ident_len = 0; 80351c0: 2600 movs r6, #0 } /* proceed to child */ ext_level++; 80351c2: f10a 0a01 add.w sl, sl, #1 80351c6: e011 b.n 80351ec } } else { /* ident_len == 0, complete with leftmost '.thing' */ en->get_objid(en->addr_inf,ext_level,0,&ex_id); 80351c8: 4651 mov r1, sl 80351ca: 4632 mov r2, r6 80351cc: ab06 add r3, sp, #24 80351ce: 6a67 ldr r7, [r4, #36] ; 0x24 80351d0: 6960 ldr r0, [r4, #20] 80351d2: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("left en->objid==%"S32_F"\n",ex_id)); oidret->id[oidret->len] = ex_id; 80351d4: 782b ldrb r3, [r5, #0] 80351d6: 9a06 ldr r2, [sp, #24] 80351d8: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 80351dc: 3301 adds r3, #1 else { /* ident_len == 0, complete with leftmost '.thing' */ en->get_objid(en->addr_inf,ext_level,0,&ex_id); LWIP_DEBUGF(SNMP_MIB_DEBUG,("left en->objid==%"S32_F"\n",ex_id)); oidret->id[oidret->len] = ex_id; 80351de: 604a str r2, [r1, #4] (oidret->len)++; 80351e0: 702b strb r3, [r5, #0] if ((ext_level + 1) == en->tree_levels) 80351e2: 7e23 ldrb r3, [r4, #24] 80351e4: f10a 0a01 add.w sl, sl, #1 80351e8: 459a cmp sl, r3 80351ea: d037 beq.n 803525c return (struct mib_node*)en; } else { /* no leaf, proceed to child */ ext_level++; 80351ec: fa5f fa8a uxtb.w sl, sl 80351f0: e030 b.n 8035254 } } } else if(node_type == MIB_NODE_SC) 80351f2: 2b01 cmp r3, #1 80351f4: d001 beq.n 80351fa } else { /* unknown/unhandled node_type */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node_type %"U16_F" unkown\n",(u16_t)node_type)); return NULL; 80351f6: 2000 movs r0, #0 80351f8: e047 b.n 803528a { mib_scalar_node *sn; /* scalar node */ sn = (mib_scalar_node *)node; if (ident_len > 0) 80351fa: b936 cbnz r6, 803520a climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 80351fc: 782b ldrb r3, [r5, #0] 80351fe: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 8035202: 3301 adds r3, #1 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 8035204: 6056 str r6, [r2, #4] (oidret->len)++; 8035206: 702b strb r3, [r5, #0] 8035208: e028 b.n 803525c 803520a: 4921 ldr r1, [pc, #132] ; (8035290 ) struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; 803520c: f04f 0a00 mov.w sl, #0 8035210: 780b ldrb r3, [r1, #0] pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 8035212: 4920 ldr r1, [pc, #128] ; (8035294 ) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; 8035214: 4652 mov r2, sl if (climb_tree) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; 8035216: 4654 mov r4, sl pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 8035218: 260c movs r6, #12 /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; while ((node_stack_cnt > 0) && (child.r_ptr == NULL)) 803521a: e00b b.n 8035234 static void pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; 803521c: 3b01 subs r3, #1 803521e: b2db uxtb r3, r3 *node = node_stack[node_stack_cnt]; 8035220: fb06 f203 mul.w r2, r6, r3 8035224: 1888 adds r0, r1, r2 8035226: 588c ldr r4, [r1, r2] 8035228: f890 a008 ldrb.w sl, [r0, #8] 803522c: 6842 ldr r2, [r0, #4] child.r_nl = 0; while ((node_stack_cnt > 0) && (child.r_ptr == NULL)) { pop_node(&child); /* trim returned oid */ (oidret->len)--; 803522e: 7828 ldrb r0, [r5, #0] 8035230: 3801 subs r0, #1 8035232: 7028 strb r0, [r5, #0] /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; while ((node_stack_cnt > 0) && (child.r_ptr == NULL)) 8035234: b91b cbnz r3, 803523e 8035236: 4f16 ldr r7, [pc, #88] ; (8035290 ) 8035238: 703b strb r3, [r7, #0] { pop_node(&child); /* trim returned oid */ (oidret->len)--; } if (child.r_ptr != NULL) 803523a: b924 cbnz r4, 8035246 803523c: e7db b.n 80351f6 /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; while ((node_stack_cnt > 0) && (child.r_ptr == NULL)) 803523e: 2c00 cmp r4, #0 8035240: d0ec beq.n 803521c 8035242: 4913 ldr r1, [pc, #76] ; (8035290 ) 8035244: 700b strb r3, [r1, #0] } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; oidret->id[oidret->len] = child.r_id; 8035246: 782b ldrb r3, [r5, #0] 8035248: eb05 0183 add.w r1, r5, r3, lsl #2 oidret->len++; 803524c: 3301 adds r3, #1 } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; oidret->id[oidret->len] = child.r_id; 803524e: 604a str r2, [r1, #4] oidret->len++; 8035250: 702b strb r3, [r5, #0] (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 8035252: 2600 movs r6, #0 u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; while (node != NULL) 8035254: 2c00 cmp r4, #0 8035256: f47f ae60 bne.w 8034f1a 803525a: e7cc b.n 80351f6 if (jn != NULL) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left jn->objid==%"S32_F"\n",jn->objid)); oidret->id[oidret->len] = jn->objid; (oidret->len)++; if (jn->nptr == NULL) 803525c: 4620 mov r0, r4 803525e: e014 b.n 803528a jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; cur_node.r_id = jn->objid; 8035260: 68a3 ldr r3, [r4, #8] { jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; 8035262: f8cd 901c str.w r9, [sp, #28] cur_node.r_id = jn->objid; 8035266: 9308 str r3, [sp, #32] cur_node.r_nl = 0; 8035268: f88d 0024 strb.w r0, [sp, #36] ; 0x24 803526c: e71e b.n 80350ac } else { cur_node.r_ptr = NULL; 803526e: 9407 str r4, [sp, #28] 8035270: e71c b.n 80350ac jn = jn->next; } if (jn != NULL) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left jn->objid==%"S32_F"\n",jn->objid)); oidret->id[oidret->len] = jn->objid; 8035272: 782b ldrb r3, [r5, #0] 8035274: 68ba ldr r2, [r7, #8] 8035276: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 803527a: 3301 adds r3, #1 803527c: 702b strb r3, [r5, #0] if (jn->nptr == NULL) 803527e: 68fb ldr r3, [r7, #12] jn = jn->next; } if (jn != NULL) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left jn->objid==%"S32_F"\n",jn->objid)); oidret->id[oidret->len] = jn->objid; 8035280: 604a str r2, [r1, #4] (oidret->len)++; if (jn->nptr == NULL) 8035282: 2b00 cmp r3, #0 8035284: d0ea beq.n 803525c (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 8035286: 461c mov r4, r3 8035288: e7e4 b.n 8035254 } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node==%p\n",(void*)node)); return NULL; } 803528a: b00b add sp, #44 ; 0x2c 803528c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8035290: 2000c5cc .word 0x2000c5cc 8035294: 2000c5d0 .word 0x2000c5d0 08035298 : * @return 1 if it matches, 0 otherwise */ u8_t snmp_iso_prefix_tst(u8_t ident_len, s32_t *ident) { if ((ident_len > 3) && 8035298: 2803 cmp r0, #3 803529a: d90d bls.n 80352b8 803529c: 680b ldr r3, [r1, #0] 803529e: 2b01 cmp r3, #1 80352a0: d10a bne.n 80352b8 (ident[0] == 1) && (ident[1] == 3) && 80352a2: 684b ldr r3, [r1, #4] 80352a4: 2b03 cmp r3, #3 80352a6: d107 bne.n 80352b8 80352a8: 688b ldr r3, [r1, #8] 80352aa: 2b06 cmp r3, #6 80352ac: d104 bne.n 80352b8 (ident[2] == 6) && (ident[3] == 1)) 80352ae: 68c8 ldr r0, [r1, #12] { return 1; 80352b0: 1e43 subs r3, r0, #1 80352b2: 4258 negs r0, r3 80352b4: 4158 adcs r0, r3 80352b6: 4770 bx lr } else { return 0; 80352b8: 2000 movs r0, #0 } } 80352ba: 4770 bx lr 080352bc : i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) 80352bc: 2300 movs r3, #0 * * @note ident_len 0 is allowed, expanding to the first known object id!! */ u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 80352be: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} s32_t *ret_ptr; u8_t i; i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; 80352c2: 1d15 adds r5, r2, #4 ident_len = ((ident_len < 4)?ident_len:4); 80352c4: 2804 cmp r0, #4 80352c6: bf34 ite cc 80352c8: 4680 movcc r8, r0 80352ca: f04f 0804 movcs.w r8, #4 { const s32_t *prefix_ptr; s32_t *ret_ptr; u8_t i; i = 0; 80352ce: 461c mov r4, r3 * @return 1 if it matches, 0 otherwise * * @note ident_len 0 is allowed, expanding to the first known object id!! */ u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) 80352d0: 4f10 ldr r7, [pc, #64] ; (8035314 ) i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) 80352d2: e003 b.n 80352dc { *ret_ptr++ = *prefix_ptr++; ident++; i++; 80352d4: 3401 adds r4, #1 prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) { *ret_ptr++ = *prefix_ptr++; 80352d6: 50ee str r6, [r5, r3] ident++; i++; 80352d8: b2e4 uxtb r4, r4 80352da: 3304 adds r3, #4 i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) 80352dc: 4544 cmp r4, r8 * @return 1 if it matches, 0 otherwise * * @note ident_len 0 is allowed, expanding to the first known object id!! */ u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) 80352de: eb05 0c03 add.w ip, r5, r3 80352e2: eb07 0603 add.w r6, r7, r3 i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) 80352e6: d101 bne.n 80352ec 80352e8: 2300 movs r3, #0 80352ea: e00c b.n 8035306 80352ec: 59de ldr r6, [r3, r7] 80352ee: 58c8 ldr r0, [r1, r3] 80352f0: 42b0 cmp r0, r6 80352f2: ddef ble.n 80352d4 return 1; } else { /* i != ident_len */ return 0; 80352f4: 2000 movs r0, #0 80352f6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} if (i == ident_len) { /* match, complete missing bits */ while (i < 4) { *ret_ptr++ = *prefix_ptr++; 80352fa: 58f1 ldr r1, [r6, r3] i++; 80352fc: 3401 adds r4, #1 if (i == ident_len) { /* match, complete missing bits */ while (i < 4) { *ret_ptr++ = *prefix_ptr++; 80352fe: f84c 1003 str.w r1, [ip, r3] i++; 8035302: b2e4 uxtb r4, r4 8035304: 3304 adds r3, #4 i++; } if (i == ident_len) { /* match, complete missing bits */ while (i < 4) 8035306: 2c03 cmp r4, #3 8035308: d9f7 bls.n 80352fa { *ret_ptr++ = *prefix_ptr++; i++; } oidret->len = i; 803530a: 7014 strb r4, [r2, #0] return 1; 803530c: 2001 movs r0, #1 else { /* i != ident_len */ return 0; } } 803530e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8035312: bf00 nop 8035314: 08045058 .word 0x08045058 08035318 : * Starts SNMP Agent. * Allocates UDP pcb and binds it to IP_ADDR_ANY port 161. */ void snmp_init(void) { 8035318: b510 push {r4, lr} struct snmp_msg_pstat *msg_ps; u8_t i; snmp1_pcb = udp_new(); 803531a: f7fd fa1d bl 8032758 803531e: 4c0b ldr r4, [pc, #44] ; (803534c ) 8035320: 6020 str r0, [r4, #0] if (snmp1_pcb != NULL) 8035322: b140 cbz r0, 8035336 { udp_recv(snmp1_pcb, snmp_recv, (void *)SNMP_IN_PORT); 8035324: 490a ldr r1, [pc, #40] ; (8035350 ) 8035326: 22a1 movs r2, #161 ; 0xa1 8035328: f7fd f9f6 bl 8032718 udp_bind(snmp1_pcb, IP_ADDR_ANY, SNMP_IN_PORT); 803532c: 6820 ldr r0, [r4, #0] 803532e: 4909 ldr r1, [pc, #36] ; (8035354 ) 8035330: 22a1 movs r2, #161 ; 0xa1 8035332: f7fd f8f9 bl 8032528 } msg_ps = &msg_input_list[0]; for (i=0; istate = SNMP_MSG_EMPTY; 8035336: 4b08 ldr r3, [pc, #32] ; (8035358 ) 8035338: 2200 movs r2, #0 803533a: f883 205a strb.w r2, [r3, #90] ; 0x5a msg_ps->error_index = 0; 803533e: 615a str r2, [r3, #20] msg_ps->error_status = SNMP_ES_NOERROR; 8035340: 611a str r2, [r3, #16] msg_ps++; } trap_msg.pcb = snmp1_pcb; 8035342: 4b02 ldr r3, [pc, #8] ; (803534c ) 8035344: 681a ldr r2, [r3, #0] 8035346: 4b05 ldr r3, [pc, #20] ; (803535c ) 8035348: 601a str r2, [r3, #0] 803534a: bd10 pop {r4, pc} 803534c: 2000ff50 .word 0x2000ff50 8035350: 08035ec5 .word 0x08035ec5 8035354: 08044744 .word 0x08044744 8035358: 2000ff54 .word 0x2000ff54 803535c: 2001008c .word 0x2001008c 08035360 : return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8035360: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8035364: 4680 mov r8, r0 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035366: 200c movs r0, #12 return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8035368: 4689 mov r9, r1 803536a: 4617 mov r7, r2 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 803536c: f7fa fb6c bl 802fa48 if (vb != NULL) 8035370: 4604 mov r4, r0 8035372: 2800 cmp r0, #0 8035374: d032 beq.n 80353dc { u8_t i; vb->next = NULL; 8035376: 2300 movs r3, #0 8035378: 6003 str r3, [r0, #0] vb->prev = NULL; 803537a: 6043 str r3, [r0, #4] i = oid->len; 803537c: f898 5000 ldrb.w r5, [r8] vb->ident_len = i; 8035380: 7205 strb r5, [r0, #8] if (i > 0) 8035382: b1ad cbz r5, 80353b0 { LWIP_ASSERT("SNMP_MAX_TREE_DEPTH is configured too low", i <= SNMP_MAX_TREE_DEPTH); /* allocate array of s32_t for our object identifier */ vb->ident = (s32_t*)memp_malloc(MEMP_SNMP_VALUE); 8035384: 200d movs r0, #13 8035386: f7fa fb5f bl 802fa48 803538a: 4606 mov r6, r0 803538c: 60e0 str r0, [r4, #12] if (vb->ident == NULL) 803538e: b928 cbnz r0, 803539c { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate ident value space\n")); memp_free(MEMP_SNMP_VARBIND, vb); 8035390: 4621 mov r1, r4 8035392: 200c movs r0, #12 8035394: f7fa fb6e bl 802fa74 return NULL; 8035398: 4634 mov r4, r6 803539a: e01f b.n 80353dc } while(i > 0) { i--; 803539c: 3d01 subs r5, #1 803539e: b2ed uxtb r5, r5 vb->ident[i] = oid->id[i]; 80353a0: eb08 0385 add.w r3, r8, r5, lsl #2 80353a4: 685b ldr r3, [r3, #4] 80353a6: f846 3025 str.w r3, [r6, r5, lsl #2] { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate ident value space\n")); memp_free(MEMP_SNMP_VARBIND, vb); return NULL; } while(i > 0) 80353aa: 2d00 cmp r5, #0 80353ac: d1f6 bne.n 803539c 80353ae: e000 b.n 80353b2 } } else { /* i == 0, pass zero length object identifier */ vb->ident = NULL; 80353b0: 60c5 str r5, [r0, #12] } vb->value_type = type; 80353b2: f884 9010 strb.w r9, [r4, #16] vb->value_len = len; 80353b6: 7467 strb r7, [r4, #17] if (len > 0) 80353b8: b17f cbz r7, 80353da { LWIP_ASSERT("SNMP_MAX_OCTET_STRING_LEN is configured too low", vb->value_len <= SNMP_MAX_VALUE_SIZE); /* allocate raw bytes for our object value */ vb->value = memp_malloc(MEMP_SNMP_VALUE); 80353ba: 200d movs r0, #13 80353bc: f7fa fb44 bl 802fa48 80353c0: 6160 str r0, [r4, #20] if (vb->value == NULL) 80353c2: b958 cbnz r0, 80353dc { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate value space\n")); if (vb->ident != NULL) 80353c4: 68e1 ldr r1, [r4, #12] 80353c6: b111 cbz r1, 80353ce { memp_free(MEMP_SNMP_VALUE, vb->ident); 80353c8: 200d movs r0, #13 80353ca: f7fa fb53 bl 802fa74 } memp_free(MEMP_SNMP_VARBIND, vb); 80353ce: 4621 mov r1, r4 80353d0: 200c movs r0, #12 80353d2: f7fa fb4f bl 802fa74 return NULL; 80353d6: 2400 movs r4, #0 80353d8: e000 b.n 80353dc } } else { /* ASN1_NUL type, or zero length ASN1_OC_STR */ vb->value = NULL; 80353da: 6167 str r7, [r4, #20] else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate varbind space\n")); } return vb; } 80353dc: 4620 mov r0, r4 80353de: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 080353e2 : void snmp_varbind_free(struct snmp_varbind *vb) { if (vb->value != NULL ) 80353e2: 6941 ldr r1, [r0, #20] return vb; } void snmp_varbind_free(struct snmp_varbind *vb) { 80353e4: b510 push {r4, lr} 80353e6: 4604 mov r4, r0 if (vb->value != NULL ) 80353e8: b111 cbz r1, 80353f0 { memp_free(MEMP_SNMP_VALUE, vb->value); 80353ea: 200d movs r0, #13 80353ec: f7fa fb42 bl 802fa74 } if (vb->ident != NULL ) 80353f0: 68e1 ldr r1, [r4, #12] 80353f2: b111 cbz r1, 80353fa { memp_free(MEMP_SNMP_VALUE, vb->ident); 80353f4: 200d movs r0, #13 80353f6: f7fa fb3d bl 802fa74 } memp_free(MEMP_SNMP_VARBIND, vb); 80353fa: 200c movs r0, #12 80353fc: 4621 mov r1, r4 } 80353fe: e8bd 4010 ldmia.w sp!, {r4, lr} } if (vb->ident != NULL ) { memp_free(MEMP_SNMP_VALUE, vb->ident); } memp_free(MEMP_SNMP_VARBIND, vb); 8035402: f7fa bb37 b.w 802fa74 08035406 : } void snmp_varbind_list_free(struct snmp_varbind_root *root) { 8035406: b538 push {r3, r4, r5, lr} 8035408: 4604 mov r4, r0 struct snmp_varbind *vb, *prev; vb = root->tail; 803540a: 6840 ldr r0, [r0, #4] while ( vb != NULL ) 803540c: e003 b.n 8035416 { prev = vb->prev; 803540e: 6845 ldr r5, [r0, #4] snmp_varbind_free(vb); 8035410: f7ff ffe7 bl 80353e2 vb = prev; 8035414: 4628 mov r0, r5 snmp_varbind_list_free(struct snmp_varbind_root *root) { struct snmp_varbind *vb, *prev; vb = root->tail; while ( vb != NULL ) 8035416: 2800 cmp r0, #0 8035418: d1f9 bne.n 803540e { prev = vb->prev; snmp_varbind_free(vb); vb = prev; } root->count = 0; 803541a: 7220 strb r0, [r4, #8] root->head = NULL; 803541c: 6020 str r0, [r4, #0] root->tail = NULL; 803541e: 6060 str r0, [r4, #4] 8035420: bd38 pop {r3, r4, r5, pc} 08035422 : //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 8035422: b570 push {r4, r5, r6, lr} 8035424: 4604 mov r4, r0 /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; struct snmp_varbind *vbo = msg_ps->outvb.head; for (v=0; vvb_idx; v++) { 8035426: 2200 movs r2, #0 //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 8035428: 460e mov r6, r1 /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; 803542a: f8d0 0100 ldr.w r0, [r0, #256] ; 0x100 struct snmp_varbind *vbo = msg_ps->outvb.head; 803542e: f8d4 310c ldr.w r3, [r4, #268] ; 0x10c for (v=0; vvb_idx; v++) { vbi->ident_len = vbo->ident_len; vbo->ident_len = 0; 8035432: 4611 mov r1, r2 { /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; struct snmp_varbind *vbo = msg_ps->outvb.head; for (v=0; vvb_idx; v++) { 8035434: e008 b.n 8035448 vbi->ident_len = vbo->ident_len; 8035436: 7a1d ldrb r5, [r3, #8] 8035438: 7205 strb r5, [r0, #8] vbo->ident_len = 0; vbi->ident = vbo->ident; 803543a: 68dd ldr r5, [r3, #12] int v; struct snmp_varbind *vbi = msg_ps->invb.head; struct snmp_varbind *vbo = msg_ps->outvb.head; for (v=0; vvb_idx; v++) { vbi->ident_len = vbo->ident_len; vbo->ident_len = 0; 803543c: 7219 strb r1, [r3, #8] vbi->ident = vbo->ident; 803543e: 60c5 str r5, [r0, #12] vbo->ident = NULL; 8035440: 60d9 str r1, [r3, #12] vbi = vbi->next; 8035442: 6800 ldr r0, [r0, #0] vbo = vbo->next; 8035444: 681b ldr r3, [r3, #0] { /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; struct snmp_varbind *vbo = msg_ps->outvb.head; for (v=0; vvb_idx; v++) { 8035446: 3201 adds r2, #1 8035448: f894 50f8 ldrb.w r5, [r4, #248] ; 0xf8 803544c: 42aa cmp r2, r5 803544e: dbf2 blt.n 8035436 vbo->ident = NULL; vbi = vbi->next; vbo = vbo->next; } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); 8035450: f504 7586 add.w r5, r4, #268 ; 0x10c 8035454: 4628 mov r0, r5 8035456: f7ff ffd6 bl 8035406 /* we send invb back */ msg_ps->outvb = msg_ps->invb; 803545a: f504 7380 add.w r3, r4, #256 ; 0x100 803545e: e893 0007 ldmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 8035462: 2300 movs r3, #0 msg_ps->invb.tail = NULL; msg_ps->invb.count = 0; msg_ps->error_status = error; /* error index must be 0 for error too big */ msg_ps->error_index = (error != SNMP_ES_TOOBIG) ? (1 + msg_ps->vb_idx) : 0; 8035464: 2e01 cmp r6, #1 } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); /* we send invb back */ msg_ps->outvb = msg_ps->invb; msg_ps->invb.head = NULL; 8035466: f8c4 3100 str.w r3, [r4, #256] ; 0x100 msg_ps->invb.tail = NULL; 803546a: f8c4 3104 str.w r3, [r4, #260] ; 0x104 msg_ps->invb.count = 0; 803546e: f884 3108 strb.w r3, [r4, #264] ; 0x108 msg_ps->error_status = error; /* error index must be 0 for error too big */ msg_ps->error_index = (error != SNMP_ES_TOOBIG) ? (1 + msg_ps->vb_idx) : 0; 8035472: bf18 it ne 8035474: f894 30f8 ldrbne.w r3, [r4, #248] ; 0xf8 /* we send invb back */ msg_ps->outvb = msg_ps->invb; msg_ps->invb.head = NULL; msg_ps->invb.tail = NULL; msg_ps->invb.count = 0; msg_ps->error_status = error; 8035478: 6126 str r6, [r4, #16] /* error index must be 0 for error too big */ msg_ps->error_index = (error != SNMP_ES_TOOBIG) ? (1 + msg_ps->vb_idx) : 0; 803547a: bf18 it ne 803547c: 3301 addne r3, #1 vbo = vbo->next; } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); /* we send invb back */ msg_ps->outvb = msg_ps->invb; 803547e: e885 0007 stmia.w r5, {r0, r1, r2} msg_ps->invb.head = NULL; msg_ps->invb.tail = NULL; msg_ps->invb.count = 0; msg_ps->error_status = error; /* error index must be 0 for error too big */ msg_ps->error_index = (error != SNMP_ES_TOOBIG) ? (1 + msg_ps->vb_idx) : 0; 8035482: 6163 str r3, [r4, #20] snmp_send_response(msg_ps); 8035484: 4620 mov r0, r4 8035486: f001 f877 bl 8036578 snmp_varbind_list_free(&msg_ps->outvb); 803548a: 4628 mov r0, r5 803548c: f7ff ffbb bl 8035406 msg_ps->state = SNMP_MSG_EMPTY; 8035490: 2300 movs r3, #0 8035492: f884 305a strb.w r3, [r4, #90] ; 0x5a 8035496: bd70 pop {r4, r5, r6, pc} 08035498 : } static void snmp_ok_response(struct snmp_msg_pstat *msg_ps) { 8035498: b510 push {r4, lr} 803549a: 4604 mov r4, r0 err_t err_ret; err_ret = snmp_send_response(msg_ps); 803549c: f001 f86c bl 8036578 else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event = %"S32_F"\n",msg_ps->error_status)); } /* free varbinds (if available) */ snmp_varbind_list_free(&msg_ps->invb); 80354a0: f504 7080 add.w r0, r4, #256 ; 0x100 80354a4: f7ff ffaf bl 8035406 snmp_varbind_list_free(&msg_ps->outvb); 80354a8: f504 7086 add.w r0, r4, #268 ; 0x10c 80354ac: f7ff ffab bl 8035406 msg_ps->state = SNMP_MSG_EMPTY; 80354b0: 2300 movs r3, #0 80354b2: f884 305a strb.w r3, [r4, #90] ; 0x5a 80354b6: bd10 pop {r4, pc} 080354b8 : } void snmp_varbind_tail_add(struct snmp_varbind_root *root, struct snmp_varbind *vb) { if (root->count == 0) 80354b8: 7a03 ldrb r3, [r0, #8] 80354ba: b90b cbnz r3, 80354c0 { /* add first varbind to list */ root->head = vb; 80354bc: 6001 str r1, [r0, #0] 80354be: e002 b.n 80354c6 root->tail = vb; } else { /* add nth varbind to list tail */ root->tail->next = vb; 80354c0: 6843 ldr r3, [r0, #4] 80354c2: 6019 str r1, [r3, #0] vb->prev = root->tail; 80354c4: 604b str r3, [r1, #4] root->tail = vb; } root->count += 1; 80354c6: 7a03 ldrb r3, [r0, #8] else { /* add nth varbind to list tail */ root->tail->next = vb; vb->prev = root->tail; root->tail = vb; 80354c8: 6041 str r1, [r0, #4] } root->count += 1; 80354ca: 3301 adds r3, #1 80354cc: 7203 strb r3, [r0, #8] 80354ce: 4770 bx lr 080354d0 : * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 80354d0: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 80354d4: 4605 mov r5, r0 * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 80354d6: b0a7 sub sp, #156 ; 0x9c struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 80354d8: 2800 cmp r0, #0 80354da: f040 8390 bne.w 8035bfe { msg_ps = &msg_input_list[request_id]; if (msg_ps->rt == SNMP_ASN1_PDU_GET_NEXT_REQ) 80354de: 4cb2 ldr r4, [pc, #712] ; (80357a8 ) 80354e0: 7aa6 ldrb r6, [r4, #10] 80354e2: 2e01 cmp r6, #1 80354e4: f040 80d4 bne.w 8035690 static void snmp_msg_getnext_event(u8_t request_id, struct snmp_msg_pstat *msg_ps) { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_getnext_event: msg_ps->state==%"U16_F"\n",(u16_t)msg_ps->state)); if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF) 80354e8: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80354ec: 2b07 cmp r3, #7 80354ee: d125 bne.n 803553c /* get_object_def() answer*/ en = msg_ps->ext_mib_node; /* translate answer into a known lifeform */ en->get_object_def_a(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1], &msg_ps->ext_object_def); 80354f0: f894 2074 ldrb.w r2, [r4, #116] ; 0x74 if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF) { struct mib_external_node *en; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 80354f4: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c /* translate answer into a known lifeform */ en->get_object_def_a(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1], &msg_ps->ext_object_def); 80354f8: eb04 0282 add.w r2, r4, r2, lsl #2 80354fc: 4631 mov r1, r6 80354fe: 3274 adds r2, #116 ; 0x74 8035500: f104 0368 add.w r3, r4, #104 ; 0x68 8035504: f8d8 7038 ldr.w r7, [r8, #56] ; 0x38 8035508: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 803550a: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 803550e: b148 cbz r0, 8035524 { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 8035510: 2308 movs r3, #8 8035512: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 8035516: f8d8 302c ldr.w r3, [r8, #44] ; 0x2c 803551a: 4628 mov r0, r5 803551c: f104 0168 add.w r1, r4, #104 ; 0x68 8035520: 4798 blx r3 8035522: e0a6 b.n 8035672 } else { en->get_object_def_pc(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1]); 8035524: f894 2074 ldrb.w r2, [r4, #116] ; 0x74 8035528: f8d8 3048 ldr.w r3, [r8, #72] ; 0x48 803552c: eb04 0282 add.w r2, r4, r2, lsl #2 8035530: 4631 mov r1, r6 8035532: 3274 adds r2, #116 ; 0x74 8035534: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035536: 4620 mov r0, r4 8035538: 2102 movs r1, #2 803553a: e02a b.n 8035592 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 803553c: 2b08 cmp r3, #8 803553e: f040 8098 bne.w 8035672 /* get_value() answer */ en = msg_ps->ext_mib_node; LWIP_ASSERT("invalid length", msg_ps->ext_object_def.v_len <= 0xff); vb = snmp_varbind_alloc(&msg_ps->ext_oid, 8035542: f104 0074 add.w r0, r4, #116 ; 0x74 8035546: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 803554a: f894 206c ldrb.w r2, [r4, #108] ; 0x6c { struct mib_external_node *en; struct snmp_varbind *vb; /* get_value() answer */ en = msg_ps->ext_mib_node; 803554e: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c LWIP_ASSERT("invalid length", msg_ps->ext_object_def.v_len <= 0xff); vb = snmp_varbind_alloc(&msg_ps->ext_oid, 8035552: f7ff ff05 bl 8035360 msg_ps->ext_object_def.asn_type, (u8_t)msg_ps->ext_object_def.v_len); if (vb != NULL) 8035556: 4607 mov r7, r0 8035558: b1a0 cbz r0, 8035584 { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 803555a: 697b ldr r3, [r7, #20] 803555c: f8d8 c03c ldr.w ip, [r8, #60] ; 0x3c 8035560: 7c7a ldrb r2, [r7, #17] 8035562: 4628 mov r0, r5 8035564: f104 0168 add.w r1, r4, #104 ; 0x68 8035568: 47e0 blx ip snmp_varbind_tail_add(&msg_ps->outvb, vb); 803556a: f504 7086 add.w r0, r4, #268 ; 0x10c 803556e: 4639 mov r1, r7 8035570: f7ff ffa2 bl 80354b8 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; 8035574: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 (u8_t)msg_ps->ext_object_def.v_len); if (vb != NULL) { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); snmp_varbind_tail_add(&msg_ps->outvb, vb); msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035578: f884 605a strb.w r6, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 803557c: 3301 adds r3, #1 803557e: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035582: e076 b.n 8035672 } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8035584: f104 0168 add.w r1, r4, #104 ; 0x68 8035588: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 803558c: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_getnext_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 803558e: 4620 mov r0, r4 8035590: 4631 mov r1, r6 8035592: f7ff ff46 bl 8035422 8035596: e06c b.n 8035672 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_obj_id oid; if (msg_ps->vb_idx == 0) 8035598: b913 cbnz r3, 80355a0 { msg_ps->vb_ptr = msg_ps->invb.head; 803559a: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 803559e: e002 b.n 80355a6 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 80355a0: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80355a4: 681b ldr r3, [r3, #0] 80355a6: f8c4 30fc str.w r3, [r4, #252] ; 0xfc } if (snmp_iso_prefix_expand(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident, &oid)) 80355aa: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80355ae: aa05 add r2, sp, #20 80355b0: 7a18 ldrb r0, [r3, #8] 80355b2: 68d9 ldr r1, [r3, #12] 80355b4: f7ff fe82 bl 80352bc 80355b8: 2800 cmp r0, #0 80355ba: f000 82ff beq.w 8035bbc { if (msg_ps->vb_ptr->ident_len > 3) 80355be: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80355c2: 7a19 ldrb r1, [r3, #8] 80355c4: 2903 cmp r1, #3 80355c6: d905 bls.n 80355d4 { /* can offset ident_len and ident */ mn = snmp_expand_tree((struct mib_node*)&internet, 80355c8: 68da ldr r2, [r3, #12] 80355ca: 4878 ldr r0, [pc, #480] ; (80357ac ) 80355cc: 3904 subs r1, #4 80355ce: b2c9 uxtb r1, r1 80355d0: 3210 adds r2, #16 80355d2: e002 b.n 80355da msg_ps->vb_ptr->ident + 4, &oid); } else { /* can't offset ident_len -4, ident + 4 */ mn = snmp_expand_tree((struct mib_node*)&internet, 0, NULL, &oid); 80355d4: 2100 movs r1, #0 80355d6: 4875 ldr r0, [pc, #468] ; (80357ac ) 80355d8: 460a mov r2, r1 80355da: ab05 add r3, sp, #20 80355dc: f7ff fc8e bl 8034efc 80355e0: 4605 mov r5, r0 } else { mn = NULL; } if (mn != NULL) 80355e2: 2800 cmp r0, #0 80355e4: f000 82ea beq.w 8035bbc { if (mn->node_type == MIB_NODE_EX) 80355e8: 7c03 ldrb r3, [r0, #16] 80355ea: 2b05 cmp r3, #5 80355ec: d113 bne.n 8035616 { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 80355ee: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 80355f0: 65e0 str r0, [r4, #92] ; 0x5c msg_ps->ext_oid = oid; 80355f2: a905 add r1, sp, #20 80355f4: 2284 movs r2, #132 ; 0x84 80355f6: 486e ldr r0, [pc, #440] ; (80357b0 ) if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 80355f8: f884 305a strb.w r3, [r4, #90] ; 0x5a /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_oid = oid; 80355fc: f7ec fb52 bl 8021ca4 en->get_object_def_q(en->addr_inf, request_id, 1, &oid.id[oid.len - 1]); 8035600: f89d 3014 ldrb.w r3, [sp, #20] 8035604: 6aae ldr r6, [r5, #40] ; 0x28 8035606: 6968 ldr r0, [r5, #20] 8035608: ad05 add r5, sp, #20 803560a: 2100 movs r1, #0 803560c: 2201 movs r2, #1 803560e: eb05 0383 add.w r3, r5, r3, lsl #2 8035612: 47b0 blx r6 8035614: e02e b.n 8035674 { /* internal object */ struct obj_def object_def; struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8035616: 2302 movs r3, #2 mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 8035618: f89d 1014 ldrb.w r1, [sp, #20] { /* internal object */ struct obj_def object_def; struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 803561c: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 8035620: af05 add r7, sp, #20 8035622: 6803 ldr r3, [r0, #0] 8035624: eb07 0181 add.w r1, r7, r1, lsl #2 8035628: 2001 movs r0, #1 803562a: aa02 add r2, sp, #8 803562c: 4798 blx r3 LWIP_ASSERT("invalid length", object_def.v_len <= 0xff); vb = snmp_varbind_alloc(&oid, object_def.asn_type, (u8_t)object_def.v_len); 803562e: a805 add r0, sp, #20 8035630: f89d 100a ldrb.w r1, [sp, #10] 8035634: f89d 200c ldrb.w r2, [sp, #12] 8035638: f7ff fe92 bl 8035360 if (vb != NULL) 803563c: 4606 mov r6, r0 803563e: b1a8 cbz r0, 803566c { msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035640: 2303 movs r3, #3 8035642: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_value(&object_def, object_def.v_len, vb->value); 8035646: 686b ldr r3, [r5, #4] 8035648: f8bd 100c ldrh.w r1, [sp, #12] 803564c: 6972 ldr r2, [r6, #20] 803564e: a802 add r0, sp, #8 8035650: 4798 blx r3 snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035652: 4858 ldr r0, [pc, #352] ; (80357b4 ) 8035654: 4631 mov r1, r6 8035656: f7ff ff2f bl 80354b8 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 803565a: 2301 movs r3, #1 803565c: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035660: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035664: 3301 adds r3, #1 8035666: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803566a: e003 b.n 8035674 } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 803566c: 484e ldr r0, [pc, #312] ; (80357a8 ) 803566e: 2101 movs r1, #1 8035670: e2a6 b.n 8035bc0 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_getnext_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035672: 4c4d ldr r4, [pc, #308] ; (80357a8 ) 8035674: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035678: 2b01 cmp r3, #1 803567a: f040 82c0 bne.w 8035bfe (msg_ps->vb_idx < msg_ps->invb.count)) 803567e: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035682: f894 2108 ldrb.w r2, [r4, #264] ; 0x108 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_getnext_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035686: 4293 cmp r3, r2 8035688: d386 bcc.n 8035598 803568a: e2a7 b.n 8035bdc } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { snmp_ok_response(msg_ps); 803568c: 4846 ldr r0, [pc, #280] ; (80357a8 ) 803568e: e292 b.n 8035bb6 msg_ps = &msg_input_list[request_id]; if (msg_ps->rt == SNMP_ASN1_PDU_GET_NEXT_REQ) { snmp_msg_getnext_event(request_id, msg_ps); } else if (msg_ps->rt == SNMP_ASN1_PDU_GET_REQ) 8035690: 2e00 cmp r6, #0 8035692: f040 8126 bne.w 80358e2 static void snmp_msg_get_event(u8_t request_id, struct snmp_msg_pstat *msg_ps) { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_get_event: msg_ps->state==%"U16_F"\n",(u16_t)msg_ps->state)); if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF) 8035696: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 803569a: 2b07 cmp r3, #7 803569c: d122 bne.n 80356e4 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 803569e: 6de5 ldr r5, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 80356a0: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 80356a4: f8d4 8064 ldr.w r8, [r4, #100] ; 0x64 /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); 80356a8: 6baf ldr r7, [r5, #56] ; 0x38 80356aa: f104 0368 add.w r3, r4, #104 ; 0x68 80356ae: 4649 mov r1, r9 80356b0: 4642 mov r2, r8 80356b2: 47b8 blx r7 if ((msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) && 80356b4: f894 3068 ldrb.w r3, [r4, #104] ; 0x68 80356b8: b163 cbz r3, 80356d4 (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) 80356ba: f894 3069 ldrb.w r3, [r4, #105] ; 0x69 en = msg_ps->ext_mib_node; np = msg_ps->ext_name_ptr; /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); if ((msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) && 80356be: 07da lsls r2, r3, #31 80356c0: d508 bpl.n 80356d4 (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 80356c2: 2308 movs r3, #8 80356c4: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 80356c8: 6aeb ldr r3, [r5, #44] ; 0x2c 80356ca: 4630 mov r0, r6 80356cc: f104 0168 add.w r1, r4, #104 ; 0x68 80356d0: 4798 blx r3 80356d2: e0f7 b.n 80358c4 } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 80356d4: 2000 movs r0, #0 80356d6: 4649 mov r1, r9 80356d8: 6cab ldr r3, [r5, #72] ; 0x48 80356da: 4642 mov r2, r8 80356dc: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80356de: 4832 ldr r0, [pc, #200] ; (80357a8 ) 80356e0: 2102 movs r1, #2 80356e2: e059 b.n 8035798 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 80356e4: 2b08 cmp r3, #8 80356e6: f040 80ed bne.w 80358c4 /* get_value() answer */ en = msg_ps->ext_mib_node; /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 80356ea: 200c movs r0, #12 { struct mib_external_node *en; struct snmp_varbind *vb; /* get_value() answer */ en = msg_ps->ext_mib_node; 80356ec: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 80356f0: f7fa f9aa bl 802fa48 if (vb != NULL) 80356f4: 4605 mov r5, r0 80356f6: 2800 cmp r0, #0 80356f8: d047 beq.n 803578a { vb->next = NULL; 80356fa: 6006 str r6, [r0, #0] vb->prev = NULL; 80356fc: 6046 str r6, [r0, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 80356fe: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035702: 68da ldr r2, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035704: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8035706: 60c2 str r2, [r0, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035708: 7203 strb r3, [r0, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 803570a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 803570e: 721e strb r6, [r3, #8] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; vb->ident_len = msg_ps->vb_ptr->ident_len; /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 8035710: 60de str r6, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = msg_ps->ext_object_def.asn_type; 8035712: f894 306a ldrb.w r3, [r4, #106] ; 0x6a 8035716: 7403 strb r3, [r0, #16] LWIP_ASSERT("invalid length", msg_ps->ext_object_def.v_len <= 0xff); vb->value_len = (u8_t)msg_ps->ext_object_def.v_len; 8035718: f894 706c ldrb.w r7, [r4, #108] ; 0x6c 803571c: 7447 strb r7, [r0, #17] if (vb->value_len > 0) 803571e: b1ef cbz r7, 803575c { LWIP_ASSERT("SNMP_MAX_OCTET_STRING_LEN is configured too low", vb->value_len <= SNMP_MAX_VALUE_SIZE); vb->value = memp_malloc(MEMP_SNMP_VALUE); 8035720: 200d movs r0, #13 8035722: f7fa f991 bl 802fa48 8035726: 4603 mov r3, r0 8035728: 6168 str r0, [r5, #20] if (vb->value != NULL) 803572a: b138 cbz r0, 803573c { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 803572c: f8d8 703c ldr.w r7, [r8, #60] ; 0x3c 8035730: 7c6a ldrb r2, [r5, #17] 8035732: 4630 mov r0, r6 8035734: f104 0168 add.w r1, r4, #104 ; 0x68 8035738: 47b8 blx r7 803573a: e018 b.n 803576e msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 803573c: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8035740: f104 0168 add.w r1, r4, #104 ; 0x68 8035744: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no variable space\n")); msg_ps->vb_ptr->ident = vb->ident; 8035746: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803574a: 68ea ldr r2, [r5, #12] 803574c: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 803574e: 7a2a ldrb r2, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8035750: 200c movs r0, #12 else { en->get_value_pc(request_id, &msg_ps->ext_object_def); LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no variable space\n")); msg_ps->vb_ptr->ident = vb->ident; msg_ps->vb_ptr->ident_len = vb->ident_len; 8035752: 721a strb r2, [r3, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8035754: 4629 mov r1, r5 8035756: f7fa f98d bl 802fa74 803575a: e01b b.n 8035794 } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ en->get_value_a(request_id, &msg_ps->ext_object_def, 0, NULL); 803575c: f8d8 603c ldr.w r6, [r8, #60] ; 0x3c 8035760: 4638 mov r0, r7 8035762: f104 0168 add.w r1, r4, #104 ; 0x68 8035766: 463a mov r2, r7 8035768: 463b mov r3, r7 803576a: 47b0 blx r6 vb->value = NULL; 803576c: 616f str r7, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 803576e: f504 7086 add.w r0, r4, #268 ; 0x10c 8035772: 4629 mov r1, r5 8035774: f7ff fea0 bl 80354b8 /* search again (if vb_idx < msg_ps->invb.count) */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035778: 2301 movs r3, #1 803577a: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 803577e: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035782: 3301 adds r3, #1 8035784: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035788: e09c b.n 80358c4 } } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 803578a: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 803578e: f104 0168 add.w r1, r4, #104 ; 0x68 8035792: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8035794: 4620 mov r0, r4 8035796: 2101 movs r1, #1 8035798: f7ff fe43 bl 8035422 803579c: e092 b.n 80358c4 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 803579e: b95b cbnz r3, 80357b8 { msg_ps->vb_ptr = msg_ps->invb.head; 80357a0: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 80357a4: e00b b.n 80357be 80357a6: bf00 nop 80357a8: 2000ff54 .word 0x2000ff54 80357ac: 08044f70 .word 0x08044f70 80357b0: 2000ffc8 .word 0x2000ffc8 80357b4: 20010060 .word 0x20010060 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 80357b8: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80357bc: 681b ldr r3, [r3, #0] 80357be: f8c4 30fc str.w r3, [r4, #252] ; 0xfc } /** test object identifier for .iso.org.dod.internet prefix */ if (snmp_iso_prefix_tst(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident)) 80357c2: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80357c6: 7a18 ldrb r0, [r3, #8] 80357c8: 68d9 ldr r1, [r3, #12] 80357ca: f7ff fd65 bl 8035298 80357ce: 2800 cmp r0, #0 80357d0: d073 beq.n 80358ba { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 80357d2: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80357d6: 48a6 ldr r0, [pc, #664] ; (8035a70 ) 80357d8: 7a19 ldrb r1, [r3, #8] 80357da: 68da ldr r2, [r3, #12] 80357dc: 3904 subs r1, #4 80357de: b2c9 uxtb r1, r1 80357e0: 3210 adds r2, #16 80357e2: 466b mov r3, sp 80357e4: f7ff fb0a bl 8034dfc msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 80357e8: 4606 mov r6, r0 80357ea: 2800 cmp r0, #0 80357ec: d065 beq.n 80358ba { if (mn->node_type == MIB_NODE_EX) 80357ee: 7c03 ldrb r3, [r0, #16] 80357f0: 2b05 cmp r3, #5 80357f2: d110 bne.n 8035816 /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 80357f4: 65e0 str r0, [r4, #92] ; 0x5c if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 80357f6: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 80357f8: e898 0003 ldmia.w r8, {r0, r1} if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 80357fc: f884 305a strb.w r3, [r4, #90] ; 0x5a /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035800: 4b9c ldr r3, [pc, #624] ; (8035a74 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035802: f89d 2000 ldrb.w r2, [sp] struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035806: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 803580a: 2100 movs r1, #0 803580c: 6ab5 ldr r5, [r6, #40] ; 0x28 803580e: 6970 ldr r0, [r6, #20] 8035810: 9b01 ldr r3, [sp, #4] 8035812: 47a8 blx r5 8035814: e058 b.n 80358c8 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8035816: 2302 movs r3, #2 8035818: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 803581c: 6803 ldr r3, [r0, #0] 803581e: 9901 ldr r1, [sp, #4] 8035820: f89d 0000 ldrb.w r0, [sp] 8035824: aa02 add r2, sp, #8 8035826: 4798 blx r3 if ((object_def.instance != MIB_OBJECT_NONE) && 8035828: f89d 3008 ldrb.w r3, [sp, #8] 803582c: 2b00 cmp r3, #0 803582e: d044 beq.n 80358ba (object_def.access & MIB_ACCESS_READ)) 8035830: f89d 3009 ldrb.w r3, [sp, #9] /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; mn->get_object_def(np.ident_len, np.ident, &object_def); if ((object_def.instance != MIB_OBJECT_NONE) && 8035834: 07db lsls r3, r3, #31 8035836: f100 81c6 bmi.w 8035bc6 803583a: e03e b.n 80358ba msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); if (vb != NULL) { vb->next = NULL; 803583c: 2200 movs r2, #0 803583e: 602a str r2, [r5, #0] vb->prev = NULL; 8035840: 606a str r2, [r5, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8035842: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035846: 68d9 ldr r1, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8035848: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 803584a: 60e9 str r1, [r5, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 803584c: 722b strb r3, [r5, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 803584e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 8035852: 721a strb r2, [r3, #8] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; vb->ident_len = msg_ps->vb_ptr->ident_len; /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 8035854: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = object_def.asn_type; 8035856: f89d 300a ldrb.w r3, [sp, #10] 803585a: 742b strb r3, [r5, #16] LWIP_ASSERT("invalid length", object_def.v_len <= 0xff); vb->value_len = (u8_t)object_def.v_len; 803585c: f89d 300c ldrb.w r3, [sp, #12] 8035860: 746b strb r3, [r5, #17] if (vb->value_len > 0) 8035862: b1bb cbz r3, 8035894 { LWIP_ASSERT("SNMP_MAX_OCTET_STRING_LEN is configured too low", vb->value_len <= SNMP_MAX_VALUE_SIZE); vb->value = memp_malloc(MEMP_SNMP_VALUE); 8035864: 200d movs r0, #13 8035866: f7fa f8ef bl 802fa48 803586a: 4602 mov r2, r0 803586c: 6168 str r0, [r5, #20] if (vb->value != NULL) 803586e: b120 cbz r0, 803587a { mn->get_value(&object_def, vb->value_len, vb->value); 8035870: 6877 ldr r7, [r6, #4] 8035872: 7c69 ldrb r1, [r5, #17] 8035874: a802 add r0, sp, #8 8035876: 47b8 blx r7 8035878: e00d b.n 8035896 msg_ps->vb_idx += 1; } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate variable space\n")); msg_ps->vb_ptr->ident = vb->ident; 803587a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803587e: 68e9 ldr r1, [r5, #12] 8035880: 60d9 str r1, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 8035882: 7a29 ldrb r1, [r5, #8] vb->ident = NULL; 8035884: 60e8 str r0, [r5, #12] } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate variable space\n")); msg_ps->vb_ptr->ident = vb->ident; msg_ps->vb_ptr->ident_len = vb->ident_len; 8035886: 7219 strb r1, [r3, #8] vb->ident = NULL; vb->ident_len = 0; 8035888: 7228 strb r0, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 803588a: 4629 mov r1, r5 803588c: 200c movs r0, #12 803588e: f7fa f8f1 bl 802fa74 8035892: e00d b.n 80358b0 } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ vb->value = NULL; 8035894: 616b str r3, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 8035896: 4878 ldr r0, [pc, #480] ; (8035a78 ) 8035898: 4629 mov r1, r5 803589a: f7ff fe0d bl 80354b8 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 803589e: 2301 movs r3, #1 80358a0: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 80358a4: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 80358a8: 3301 adds r3, #1 80358aa: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 80358ae: e003 b.n 80358b8 } } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 80358b0: 4872 ldr r0, [pc, #456] ; (8035a7c ) 80358b2: 2101 movs r1, #1 80358b4: f7ff fdb5 bl 8035422 } else { mn = NULL; } if (mn == NULL) 80358b8: b936 cbnz r6, 80358c8 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80358ba: 4870 ldr r0, [pc, #448] ; (8035a7c ) 80358bc: 2102 movs r1, #2 80358be: f7ff fdb0 bl 8035422 80358c2: e001 b.n 80358c8 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 80358c4: 4c6d ldr r4, [pc, #436] ; (8035a7c ) msg_ps->vb_ptr = msg_ps->vb_ptr->next; } /** test object identifier for .iso.org.dod.internet prefix */ if (snmp_iso_prefix_tst(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident)) { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 80358c6: 46e8 mov r8, sp LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 80358c8: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80358cc: 2b01 cmp r3, #1 80358ce: f040 8196 bne.w 8035bfe (msg_ps->vb_idx < msg_ps->invb.count)) 80358d2: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 80358d6: f894 2108 ldrb.w r2, [r4, #264] ; 0x108 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 80358da: 4293 cmp r3, r2 80358dc: f4ff af5f bcc.w 803579e 80358e0: e17c b.n 8035bdc } else if (msg_ps->rt == SNMP_ASN1_PDU_GET_REQ) { snmp_msg_get_event(request_id, msg_ps); } else if(msg_ps->rt == SNMP_ASN1_PDU_SET_REQ) 80358e2: 2e03 cmp r6, #3 80358e4: f040 818b bne.w 8035bfe static void snmp_msg_set_event(u8_t request_id, struct snmp_msg_pstat *msg_ps) { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_set_event: msg_ps->state==%"U16_F"\n",(u16_t)msg_ps->state)); if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF) 80358e8: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80358ec: 2b07 cmp r3, #7 80358ee: d11b bne.n 8035928 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 80358f0: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 80358f2: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 80358f6: f8d4 8064 ldr.w r8, [r4, #100] ; 0x64 /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); 80358fa: 6bb7 ldr r7, [r6, #56] ; 0x38 80358fc: 4649 mov r1, r9 80358fe: 4642 mov r2, r8 8035900: f104 0368 add.w r3, r4, #104 ; 0x68 8035904: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8035906: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 803590a: b140 cbz r0, 803591e { msg_ps->state = SNMP_MSG_EXTERNAL_SET_TEST; 803590c: 2309 movs r3, #9 803590e: f884 305a strb.w r3, [r4, #90] ; 0x5a en->set_test_q(request_id, &msg_ps->ext_object_def); 8035912: 6b33 ldr r3, [r6, #48] ; 0x30 8035914: 4628 mov r0, r5 8035916: f104 0168 add.w r1, r4, #104 ; 0x68 803591a: 4798 blx r3 803591c: e0d5 b.n 8035aca } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 803591e: 6cb3 ldr r3, [r6, #72] ; 0x48 8035920: 4649 mov r1, r9 8035922: 4642 mov r2, r8 8035924: 4798 blx r3 8035926: e023 b.n 8035970 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_TEST) 8035928: 2b09 cmp r3, #9 803592a: d124 bne.n 8035976 struct mib_external_node *en; /* set_test() answer*/ en = msg_ps->ext_mib_node; if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 803592c: f894 3069 ldrb.w r3, [r4, #105] ; 0x69 else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_TEST) { struct mib_external_node *en; /* set_test() answer*/ en = msg_ps->ext_mib_node; 8035930: 6de5 ldr r5, [r4, #92] ; 0x5c if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 8035932: f003 0302 and.w r3, r3, #2 8035936: b2db uxtb r3, r3 8035938: b1b3 cbz r3, 8035968 { if ((msg_ps->ext_object_def.asn_type == msg_ps->vb_ptr->value_type) && 803593a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803593e: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 8035942: 7c1a ldrb r2, [r3, #16] 8035944: 4291 cmp r1, r2 8035946: d108 bne.n 803595a (en->set_test_a(request_id,&msg_ps->ext_object_def, 8035948: 7c5a ldrb r2, [r3, #17] 803594a: 6c2e ldr r6, [r5, #64] ; 0x40 803594c: 695b ldr r3, [r3, #20] 803594e: f104 0168 add.w r1, r4, #104 ; 0x68 8035952: 47b0 blx r6 /* set_test() answer*/ en = msg_ps->ext_mib_node; if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) { if ((msg_ps->ext_object_def.asn_type == msg_ps->vb_ptr->value_type) && 8035954: b108 cbz r0, 803595a (en->set_test_a(request_id,&msg_ps->ext_object_def, msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) { msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035956: 2301 movs r3, #1 8035958: e040 b.n 80359dc msg_ps->vb_idx += 1; } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 803595a: 2000 movs r0, #0 803595c: 4948 ldr r1, [pc, #288] ; (8035a80 ) 803595e: 6d2b ldr r3, [r5, #80] ; 0x50 8035960: 4798 blx r3 /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 8035962: 4846 ldr r0, [pc, #280] ; (8035a7c ) 8035964: 2103 movs r1, #3 8035966: e029 b.n 80359bc } } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 8035968: 6d2b ldr r3, [r5, #80] ; 0x50 803596a: f104 0168 add.w r1, r4, #104 ; 0x68 803596e: 4798 blx r3 /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035970: 4620 mov r0, r4 8035972: 2102 movs r1, #2 8035974: e022 b.n 80359bc } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF_S) 8035976: 2b0a cmp r3, #10 8035978: d123 bne.n 80359c2 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 803597a: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 803597c: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8035980: f8d4 8064 ldr.w r8, [r4, #100] ; 0x64 /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); 8035984: 6bb7 ldr r7, [r6, #56] ; 0x38 8035986: 4649 mov r1, r9 8035988: 4642 mov r2, r8 803598a: f104 0368 add.w r3, r4, #104 ; 0x68 803598e: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 8035990: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 8035994: b160 cbz r0, 80359b0 { msg_ps->state = SNMP_MSG_EXTERNAL_SET_VALUE; 8035996: 230b movs r3, #11 8035998: f884 305a strb.w r3, [r4, #90] ; 0x5a en->set_value_q(request_id, &msg_ps->ext_object_def, msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); 803599c: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) { msg_ps->state = SNMP_MSG_EXTERNAL_SET_VALUE; en->set_value_q(request_id, &msg_ps->ext_object_def, 80359a0: 6b76 ldr r6, [r6, #52] ; 0x34 80359a2: 7c5a ldrb r2, [r3, #17] 80359a4: 695b ldr r3, [r3, #20] 80359a6: 4628 mov r0, r5 80359a8: f104 0168 add.w r1, r4, #104 ; 0x68 80359ac: 47b0 blx r6 80359ae: e08c b.n 8035aca msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 80359b0: 4649 mov r1, r9 80359b2: 6cb3 ldr r3, [r6, #72] ; 0x48 80359b4: 4642 mov r2, r8 80359b6: 4798 blx r3 /* set_value failed, object has disappeared for some odd reason?? */ snmp_error_response(msg_ps,SNMP_ES_GENERROR); 80359b8: 4620 mov r0, r4 80359ba: 2105 movs r1, #5 80359bc: f7ff fd31 bl 8035422 80359c0: e083 b.n 8035aca } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_VALUE) 80359c2: 2b0b cmp r3, #11 80359c4: f040 8081 bne.w 8035aca struct mib_external_node *en; /** set_value_a() */ en = msg_ps->ext_mib_node; en->set_value_a(request_id, &msg_ps->ext_object_def, msg_ps->vb_ptr->value_len, msg_ps->vb_ptr->value); 80359c8: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc { struct mib_external_node *en; /** set_value_a() */ en = msg_ps->ext_mib_node; en->set_value_a(request_id, &msg_ps->ext_object_def, 80359cc: 6de2 ldr r2, [r4, #92] ; 0x5c 80359ce: f104 0168 add.w r1, r4, #104 ; 0x68 80359d2: 6c55 ldr r5, [r2, #68] ; 0x44 80359d4: 7c5a ldrb r2, [r3, #17] 80359d6: 695b ldr r3, [r3, #20] 80359d8: 47a8 blx r5 msg_ps->vb_ptr->value_len, msg_ps->vb_ptr->value); /** @todo use set_value_pc() if toobig */ msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 80359da: 2306 movs r3, #6 80359dc: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 80359e0: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 80359e4: 3301 adds r3, #1 80359e6: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 80359ea: e06e b.n 8035aca (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 80359ec: b912 cbnz r2, 80359f4 { msg_ps->vb_ptr = msg_ps->invb.head; 80359ee: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 80359f2: e002 b.n 80359fa } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 80359f4: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80359f8: 681b ldr r3, [r3, #0] 80359fa: f8c4 30fc str.w r3, [r4, #252] ; 0xfc } /** test object identifier for .iso.org.dod.internet prefix */ if (snmp_iso_prefix_tst(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident)) 80359fe: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035a02: 7a18 ldrb r0, [r3, #8] 8035a04: 68d9 ldr r1, [r3, #12] 8035a06: f7ff fc47 bl 8035298 8035a0a: 2800 cmp r0, #0 8035a0c: d058 beq.n 8035ac0 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035a0e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035a12: 4817 ldr r0, [pc, #92] ; (8035a70 ) 8035a14: 7a19 ldrb r1, [r3, #8] 8035a16: 68da ldr r2, [r3, #12] 8035a18: 3904 subs r1, #4 8035a1a: b2c9 uxtb r1, r1 8035a1c: 3210 adds r2, #16 8035a1e: 466b mov r3, sp 8035a20: f7ff f9ec bl 8034dfc msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 8035a24: 4605 mov r5, r0 8035a26: 2800 cmp r0, #0 8035a28: d04a beq.n 8035ac0 { if (mn->node_type == MIB_NODE_EX) 8035a2a: 7c03 ldrb r3, [r0, #16] 8035a2c: 2b05 cmp r3, #5 8035a2e: d110 bne.n 8035a52 /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 8035a30: 65e0 str r0, [r4, #92] ; 0x5c if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 8035a32: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035a34: e896 0003 ldmia.w r6, {r0, r1} if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 8035a38: f884 305a strb.w r3, [r4, #90] ; 0x5a /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035a3c: 4b0d ldr r3, [pc, #52] ; (8035a74 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035a3e: f89d 2000 ldrb.w r2, [sp] struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035a42: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035a46: 2100 movs r1, #0 8035a48: 6aaf ldr r7, [r5, #40] ; 0x28 8035a4a: 6968 ldr r0, [r5, #20] 8035a4c: 9b01 ldr r3, [sp, #4] 8035a4e: 47b8 blx r7 8035a50: e03d b.n 8035ace else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8035a52: 2702 movs r7, #2 8035a54: f884 705a strb.w r7, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8035a58: 6803 ldr r3, [r0, #0] 8035a5a: 9901 ldr r1, [sp, #4] 8035a5c: f89d 0000 ldrb.w r0, [sp] 8035a60: aa02 add r2, sp, #8 8035a62: 4798 blx r3 if (object_def.instance != MIB_OBJECT_NONE) 8035a64: f89d 3008 ldrb.w r3, [sp, #8] 8035a68: 2b00 cmp r3, #0 8035a6a: f040 80b9 bne.w 8035be0 8035a6e: e027 b.n 8035ac0 8035a70: 08044f70 .word 0x08044f70 8035a74: 2000ffb4 .word 0x2000ffb4 8035a78: 20010060 .word 0x20010060 8035a7c: 2000ff54 .word 0x2000ff54 8035a80: 2000ffbc .word 0x2000ffbc { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; if (object_def.access & MIB_ACCESS_WRITE) { if ((object_def.asn_type == msg_ps->vb_ptr->value_type) && 8035a84: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035a88: f89d 100a ldrb.w r1, [sp, #10] 8035a8c: 7c1a ldrb r2, [r3, #16] 8035a8e: 4291 cmp r1, r2 8035a90: d10e bne.n 8035ab0 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) 8035a92: 68af ldr r7, [r5, #8] 8035a94: 7c59 ldrb r1, [r3, #17] 8035a96: 695a ldr r2, [r3, #20] 8035a98: a802 add r0, sp, #8 8035a9a: 47b8 blx r7 { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; if (object_def.access & MIB_ACCESS_WRITE) { if ((object_def.asn_type == msg_ps->vb_ptr->value_type) && 8035a9c: b140 cbz r0, 8035ab0 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) { msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8035a9e: 2301 movs r3, #1 8035aa0: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8035aa4: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035aa8: 3301 adds r3, #1 8035aaa: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035aae: e006 b.n 8035abe } else { /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 8035ab0: 4854 ldr r0, [pc, #336] ; (8035c04 ) 8035ab2: 2103 movs r1, #3 8035ab4: e001 b.n 8035aba } } else { /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035ab6: 4853 ldr r0, [pc, #332] ; (8035c04 ) 8035ab8: 4639 mov r1, r7 8035aba: f7ff fcb2 bl 8035422 } else { mn = NULL; } if (mn == NULL) 8035abe: b935 cbnz r5, 8035ace { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035ac0: 4850 ldr r0, [pc, #320] ; (8035c04 ) 8035ac2: 2102 movs r1, #2 8035ac4: f7ff fcad bl 8035422 8035ac8: e001 b.n 8035ace msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; msg_ps->vb_idx += 1; } /* test all values before setting */ while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035aca: 4c4e ldr r4, [pc, #312] ; (8035c04 ) msg_ps->vb_ptr = msg_ps->vb_ptr->next; } /** test object identifier for .iso.org.dod.internet prefix */ if (snmp_iso_prefix_tst(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident)) { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035acc: 466e mov r6, sp msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; msg_ps->vb_idx += 1; } /* test all values before setting */ while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035ace: f894 205a ldrb.w r2, [r4, #90] ; 0x5a 8035ad2: 4b4c ldr r3, [pc, #304] ; (8035c04 ) 8035ad4: 2a01 cmp r2, #1 8035ad6: d151 bne.n 8035b7c (msg_ps->vb_idx < msg_ps->invb.count)) 8035ad8: f894 20f8 ldrb.w r2, [r4, #248] ; 0xf8 8035adc: f894 1108 ldrb.w r1, [r4, #264] ; 0x108 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; msg_ps->vb_idx += 1; } /* test all values before setting */ while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035ae0: 428a cmp r2, r1 8035ae2: d383 bcc.n 80359ec 8035ae4: e088 b.n 8035bf8 } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { msg_ps->vb_idx = 0; 8035ae6: 2200 movs r2, #0 8035ae8: f883 20f8 strb.w r2, [r3, #248] ; 0xf8 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 8035aec: 2206 movs r2, #6 8035aee: f883 205a strb.w r2, [r3, #90] ; 0x5a 8035af2: e043 b.n 8035b7c (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 8035af4: b913 cbnz r3, 8035afc { msg_ps->vb_ptr = msg_ps->invb.head; 8035af6: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8035afa: e002 b.n 8035b02 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 8035afc: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035b00: 681b ldr r3, [r3, #0] 8035b02: f8c4 30fc str.w r3, [r4, #252] ; 0xfc } /* skip iso prefix test, was done previously while settesting() */ mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035b06: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035b0a: 483f ldr r0, [pc, #252] ; (8035c08 ) 8035b0c: 7a19 ldrb r1, [r3, #8] 8035b0e: 68da ldr r2, [r3, #12] 8035b10: 3904 subs r1, #4 8035b12: b2c9 uxtb r1, r1 8035b14: 3210 adds r2, #16 8035b16: 466b mov r3, sp 8035b18: f7ff f970 bl 8034dfc msg_ps->vb_ptr->ident + 4, &np); /* check if object is still available (e.g. external hot-plug thingy present?) */ if (mn != NULL) 8035b1c: 4605 mov r5, r0 8035b1e: 2800 cmp r0, #0 8035b20: d02e beq.n 8035b80 { if (mn->node_type == MIB_NODE_EX) 8035b22: 7c03 ldrb r3, [r0, #16] 8035b24: 2b05 cmp r3, #5 8035b26: d110 bne.n 8035b4a /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF_S; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 8035b28: 65e0 str r0, [r4, #92] ; 0x5c if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF_S; 8035b2a: 230a movs r3, #10 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035b2c: e896 0003 ldmia.w r6, {r0, r1} if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF_S; 8035b30: f884 305a strb.w r3, [r4, #90] ; 0x5a /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035b34: 4b35 ldr r3, [pc, #212] ; (8035c0c ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035b36: f89d 2000 ldrb.w r2, [sp] struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF_S; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8035b3a: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8035b3e: 2100 movs r1, #0 8035b40: 6aaf ldr r7, [r5, #40] ; 0x28 8035b42: 6968 ldr r0, [r5, #20] 8035b44: 9b01 ldr r3, [sp, #4] 8035b46: 47b8 blx r7 8035b48: e01a b.n 8035b80 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF_S; 8035b4a: 2305 movs r3, #5 8035b4c: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8035b50: 6803 ldr r3, [r0, #0] 8035b52: 9901 ldr r1, [sp, #4] 8035b54: f89d 0000 ldrb.w r0, [sp] 8035b58: aa02 add r2, sp, #8 8035b5a: 4798 blx r3 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 8035b5c: 2306 movs r3, #6 8035b5e: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->set_value(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); 8035b62: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8035b66: 68ed ldr r5, [r5, #12] 8035b68: 7c59 ldrb r1, [r3, #17] 8035b6a: 695a ldr r2, [r3, #20] 8035b6c: a802 add r0, sp, #8 8035b6e: 47a8 blx r5 msg_ps->vb_idx += 1; 8035b70: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035b74: 3301 adds r3, #1 8035b76: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8035b7a: e001 b.n 8035b80 msg_ps->vb_idx = 0; msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; } /* set all values "atomically" (be as "atomic" as possible) */ while ((msg_ps->state == SNMP_MSG_INTERNAL_SET_VALUE) && 8035b7c: 4c21 ldr r4, [pc, #132] ; (8035c04 ) else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; } /* skip iso prefix test, was done previously while settesting() */ mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 8035b7e: 466e mov r6, sp msg_ps->vb_idx = 0; msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; } /* set all values "atomically" (be as "atomic" as possible) */ while ((msg_ps->state == SNMP_MSG_INTERNAL_SET_VALUE) && 8035b80: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8035b84: 4d1f ldr r5, [pc, #124] ; (8035c04 ) 8035b86: 2b06 cmp r3, #6 8035b88: d139 bne.n 8035bfe (msg_ps->vb_idx < msg_ps->invb.count)) 8035b8a: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8035b8e: f894 2108 ldrb.w r2, [r4, #264] ; 0x108 msg_ps->vb_idx = 0; msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; } /* set all values "atomically" (be as "atomic" as possible) */ while ((msg_ps->state == SNMP_MSG_INTERNAL_SET_VALUE) && 8035b92: 4293 cmp r3, r2 8035b94: d3ae bcc.n 8035af4 8035b96: e031 b.n 8035bfc (msg_ps->vb_idx == msg_ps->invb.count)) { /* simply echo the input if we can set it @todo do we need to return the actual value? e.g. if value is silently modified or behaves sticky? */ msg_ps->outvb = msg_ps->invb; 8035b98: f505 7280 add.w r2, r5, #256 ; 0x100 8035b9c: ca07 ldmia r2, {r0, r1, r2} 8035b9e: f505 7386 add.w r3, r5, #268 ; 0x10c 8035ba2: e883 0007 stmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 8035ba6: 2300 movs r3, #0 8035ba8: f8c5 3100 str.w r3, [r5, #256] ; 0x100 msg_ps->invb.tail = NULL; 8035bac: f8c5 3104 str.w r3, [r5, #260] ; 0x104 msg_ps->invb.count = 0; 8035bb0: f885 3108 strb.w r3, [r5, #264] ; 0x108 snmp_ok_response(msg_ps); 8035bb4: 4628 mov r0, r5 8035bb6: f7ff fc6f bl 8035498 8035bba: e020 b.n 8035bfe } } if (mn == NULL) { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8035bbc: 4811 ldr r0, [pc, #68] ; (8035c04 ) 8035bbe: 2102 movs r1, #2 8035bc0: f7ff fc2f bl 8035422 8035bc4: e556 b.n 8035674 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035bc6: 2303 movs r3, #3 /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035bc8: 200c movs r0, #12 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 8035bca: f884 305a strb.w r3, [r4, #90] ; 0x5a /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8035bce: f7f9 ff3b bl 802fa48 if (vb != NULL) 8035bd2: 4605 mov r5, r0 8035bd4: 2800 cmp r0, #0 8035bd6: f47f ae31 bne.w 803583c 8035bda: e669 b.n 80358b0 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035bdc: d10f bne.n 8035bfe 8035bde: e555 b.n 803568c /* search failed, object id points to unknown object (nosuchname) */ mn = NULL; } if (mn != NULL) { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; 8035be0: 2304 movs r3, #4 8035be2: f884 305a strb.w r3, [r4, #90] ; 0x5a if (object_def.access & MIB_ACCESS_WRITE) 8035be6: f89d 3009 ldrb.w r3, [sp, #9] 8035bea: f003 0302 and.w r3, r3, #2 8035bee: b2db uxtb r3, r3 8035bf0: 2b00 cmp r3, #0 8035bf2: f47f af47 bne.w 8035a84 8035bf6: e75e b.n 8035ab6 /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 8035bf8: d1c0 bne.n 8035b7c 8035bfa: e774 b.n 8035ae6 mn->set_value(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); msg_ps->vb_idx += 1; } } } if ((msg_ps->state == SNMP_MSG_INTERNAL_SET_VALUE) && 8035bfc: d0cc beq.n 8035b98 else if(msg_ps->rt == SNMP_ASN1_PDU_SET_REQ) { snmp_msg_set_event(request_id, msg_ps); } } } 8035bfe: b027 add sp, #156 ; 0x9c 8035c00: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8035c04: 2000ff54 .word 0x2000ff54 8035c08: 08044f70 .word 0x08044f70 8035c0c: 2000ffb4 .word 0x2000ffb4 08035c10 : return ERR_OK; } static err_t snmp_pdu_dec_varbindlist(struct pbuf *p, u16_t ofs, u16_t *ofs_ret, struct snmp_msg_pstat *m_stat) { 8035c10: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8035c14: b0c7 sub sp, #284 ; 0x11c u16_t len, vb_len; u8_t len_octets; u8_t type; /* variable binding list */ snmp_asn1_dec_type(p, ofs, &type); 8035c16: f10d 070b add.w r7, sp, #11 return ERR_OK; } static err_t snmp_pdu_dec_varbindlist(struct pbuf *p, u16_t ofs, u16_t *ofs_ret, struct snmp_msg_pstat *m_stat) { 8035c1a: 468a mov sl, r1 8035c1c: 4691 mov r9, r2 u16_t len, vb_len; u8_t len_octets; u8_t type; /* variable binding list */ snmp_asn1_dec_type(p, ofs, &type); 8035c1e: 463a mov r2, r7 return ERR_OK; } static err_t snmp_pdu_dec_varbindlist(struct pbuf *p, u16_t ofs, u16_t *ofs_ret, struct snmp_msg_pstat *m_stat) { 8035c20: 4604 mov r4, r0 8035c22: 461d mov r5, r3 u8_t len_octets; u8_t type; /* variable binding list */ snmp_asn1_dec_type(p, ofs, &type); derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &vb_len); 8035c24: f10d 060e add.w r6, sp, #14 u16_t len, vb_len; u8_t len_octets; u8_t type; /* variable binding list */ snmp_asn1_dec_type(p, ofs, &type); 8035c28: f7fd f928 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &vb_len); 8035c2c: f10a 0101 add.w r1, sl, #1 8035c30: 4620 mov r0, r4 8035c32: b289 uxth r1, r1 8035c34: f10d 020a add.w r2, sp, #10 8035c38: 4633 mov r3, r6 8035c3a: f7fd f934 bl 8032ea6 if ((derr != ERR_OK) || 8035c3e: b910 cbnz r0, 8035c46 8035c40: 783b ldrb r3, [r7, #0] 8035c42: 2b30 cmp r3, #48 ; 0x30 8035c44: d002 beq.n 8035c4c (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); 8035c46: f7fe ff21 bl 8034a8c 8035c4a: e02b b.n 8035ca4 return ERR_ARG; } ofs += (1 + len_octets); 8035c4c: f89d 800a ldrb.w r8, [sp, #10] /* start with empty list */ m_stat->invb.count = 0; 8035c50: f885 0108 strb.w r0, [r5, #264] ; 0x108 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets); 8035c54: f108 0801 add.w r8, r8, #1 8035c58: 44d0 add r8, sl 8035c5a: fa1f f888 uxth.w r8, r8 /* start with empty list */ m_stat->invb.count = 0; m_stat->invb.head = NULL; 8035c5e: f8c5 0100 str.w r0, [r5, #256] ; 0x100 m_stat->invb.tail = NULL; 8035c62: f8c5 0104 str.w r0, [r5, #260] ; 0x104 while (vb_len > 0) 8035c66: e118 b.n 8035e9a { struct snmp_obj_id oid, oid_value; struct snmp_varbind *vb; snmp_asn1_dec_type(p, ofs, &type); 8035c68: 4641 mov r1, r8 8035c6a: 463a mov r2, r7 8035c6c: 4620 mov r0, r4 8035c6e: f7fd f905 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035c72: f108 0101 add.w r1, r8, #1 8035c76: 4620 mov r0, r4 8035c78: b289 uxth r1, r1 8035c7a: f10d 020a add.w r2, sp, #10 8035c7e: ab03 add r3, sp, #12 8035c80: f7fd f911 bl 8032ea6 if ((derr != ERR_OK) || 8035c84: b940 cbnz r0, 8035c98 8035c86: 783b ldrb r3, [r7, #0] 8035c88: 2b30 cmp r3, #48 ; 0x30 8035c8a: d105 bne.n 8035c98 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) || (len == 0) || (len > vb_len)) 8035c8c: f8bd 200c ldrh.w r2, [sp, #12] struct snmp_varbind *vb; snmp_asn1_dec_type(p, ofs, &type); derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) || 8035c90: b112 cbz r2, 8035c98 (len == 0) || (len > vb_len)) 8035c92: 8833 ldrh r3, [r6, #0] 8035c94: 429a cmp r2, r3 8035c96: d907 bls.n 8035ca8 { snmp_inc_snmpinasnparseerrs(); 8035c98: f7fe fef8 bl 8034a8c /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); 8035c9c: f505 7080 add.w r0, r5, #256 ; 0x100 8035ca0: f7ff fbb1 bl 8035406 8035ca4: 20f2 movs r0, #242 ; 0xf2 8035ca6: e109 b.n 8035ebc return ERR_ARG; } ofs += (1 + len_octets); 8035ca8: f89d 200a ldrb.w r2, [sp, #10] 8035cac: 4490 add r8, r2 8035cae: fa1f f888 uxth.w r8, r8 8035cb2: f108 0a01 add.w sl, r8, #1 vb_len -= (1 + len_octets); 8035cb6: 43d2 mvns r2, r2 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets); 8035cb8: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets); 8035cbc: 189b adds r3, r3, r2 snmp_asn1_dec_type(p, ofs, &type); 8035cbe: 4651 mov r1, sl 8035cc0: 463a mov r2, r7 8035cc2: 4620 mov r0, r4 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets); vb_len -= (1 + len_octets); 8035cc4: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8035cc6: f7fd f8d9 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035cca: f108 0102 add.w r1, r8, #2 8035cce: 4620 mov r0, r4 8035cd0: b289 uxth r1, r1 8035cd2: f10d 020a add.w r2, sp, #10 8035cd6: ab03 add r3, sp, #12 8035cd8: f7fd f8e5 bl 8032ea6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID))) 8035cdc: 2800 cmp r0, #0 8035cde: d1db bne.n 8035c98 8035ce0: 783b ldrb r3, [r7, #0] 8035ce2: 2b06 cmp r3, #6 8035ce4: d1d8 bne.n 8035c98 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } derr = snmp_asn1_dec_oid(p, ofs + 1 + len_octets, len, &oid); 8035ce6: f89d 100a ldrb.w r1, [sp, #10] 8035cea: f8bd 200c ldrh.w r2, [sp, #12] 8035cee: 3101 adds r1, #1 8035cf0: 4451 add r1, sl 8035cf2: 4620 mov r0, r4 8035cf4: b289 uxth r1, r1 8035cf6: ab04 add r3, sp, #16 8035cf8: f7fd fa04 bl 8033104 if (derr != ERR_OK) 8035cfc: 2800 cmp r0, #0 8035cfe: d1cb bne.n 8035c98 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8035d00: f89d 300a ldrb.w r3, [sp, #10] 8035d04: f8bd 200c ldrh.w r2, [sp, #12] 8035d08: 1899 adds r1, r3, r2 8035d0a: 448a add sl, r1 8035d0c: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets + len); 8035d10: 8831 ldrh r1, [r6, #0] snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8035d12: f10a 0801 add.w r8, sl, #1 vb_len -= (1 + len_octets + len); 8035d16: 1a8a subs r2, r1, r2 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8035d18: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 8035d1c: 43db mvns r3, r3 8035d1e: 18d3 adds r3, r2, r3 snmp_asn1_dec_type(p, ofs, &type); 8035d20: 4641 mov r1, r8 8035d22: 463a mov r2, r7 8035d24: 4620 mov r0, r4 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); vb_len -= (1 + len_octets + len); 8035d26: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8035d28: f7fd f8a8 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035d2c: f10a 0102 add.w r1, sl, #2 8035d30: 4620 mov r0, r4 8035d32: b289 uxth r1, r1 8035d34: f10d 020a add.w r2, sp, #10 8035d38: ab03 add r3, sp, #12 8035d3a: f7fd f8b4 bl 8032ea6 if (derr != ERR_OK) 8035d3e: 2800 cmp r0, #0 8035d40: d1aa bne.n 8035c98 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } switch (type) 8035d42: 7839 ldrb r1, [r7, #0] 8035d44: 2906 cmp r1, #6 8035d46: d047 beq.n 8035dd8 8035d48: d805 bhi.n 8035d56 8035d4a: 2904 cmp r1, #4 8035d4c: d036 beq.n 8035dbc 8035d4e: d839 bhi.n 8035dc4 8035d50: 2902 cmp r1, #2 8035d52: d1a1 bne.n 8035c98 8035d54: e009 b.n 8035d6a 8035d56: 2943 cmp r1, #67 ; 0x43 8035d58: d804 bhi.n 8035d64 8035d5a: 2941 cmp r1, #65 ; 0x41 8035d5c: d219 bcs.n 8035d92 8035d5e: 2940 cmp r1, #64 ; 0x40 8035d60: d19a bne.n 8035c98 8035d62: e069 b.n 8035e38 8035d64: 2944 cmp r1, #68 ; 0x44 8035d66: d197 bne.n 8035c98 8035d68: e028 b.n 8035dbc { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): vb = snmp_varbind_alloc(&oid, type, sizeof(s32_t)); 8035d6a: a804 add r0, sp, #16 8035d6c: 2204 movs r2, #4 8035d6e: f7ff faf7 bl 8035360 if (vb != NULL) 8035d72: 4683 mov fp, r0 8035d74: 2800 cmp r0, #0 8035d76: d08f beq.n 8035c98 { s32_t *vptr = (s32_t*)vb->value; derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, vptr); 8035d78: f89d 100a ldrb.w r1, [sp, #10] 8035d7c: f8bd 200c ldrh.w r2, [sp, #12] 8035d80: f8db 3014 ldr.w r3, [fp, #20] 8035d84: 3101 adds r1, #1 8035d86: 4441 add r1, r8 8035d88: 4620 mov r0, r4 8035d8a: b289 uxth r1, r1 8035d8c: f7fd f961 bl 8033052 8035d90: e06b b.n 8035e6a } break; case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS): vb = snmp_varbind_alloc(&oid, type, sizeof(u32_t)); 8035d92: a804 add r0, sp, #16 8035d94: 2204 movs r2, #4 8035d96: f7ff fae3 bl 8035360 if (vb != NULL) 8035d9a: 4683 mov fp, r0 8035d9c: 2800 cmp r0, #0 8035d9e: f43f af7b beq.w 8035c98 { u32_t *vptr = (u32_t*)vb->value; derr = snmp_asn1_dec_u32t(p, ofs + 1 + len_octets, len, vptr); 8035da2: f89d 100a ldrb.w r1, [sp, #10] 8035da6: f8bd 200c ldrh.w r2, [sp, #12] 8035daa: f8db 3014 ldr.w r3, [fp, #20] 8035dae: 3101 adds r1, #1 8035db0: 4441 add r1, r8 8035db2: 4620 mov r0, r4 8035db4: b289 uxth r1, r1 8035db6: f7fd f8f8 bl 8032faa 8035dba: e056 b.n 8035e6a } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_OPAQUE): LWIP_ASSERT("invalid length", len <= 0xff); vb = snmp_varbind_alloc(&oid, type, (u8_t)len); 8035dbc: a804 add r0, sp, #16 8035dbe: f89d 200c ldrb.w r2, [sp, #12] 8035dc2: e03f b.n 8035e44 { derr = ERR_ARG; } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): vb = snmp_varbind_alloc(&oid, type, 0); 8035dc4: 2105 movs r1, #5 8035dc6: a804 add r0, sp, #16 8035dc8: 2200 movs r2, #0 8035dca: f7ff fac9 bl 8035360 if (vb != NULL) 8035dce: 4601 mov r1, r0 8035dd0: 2800 cmp r0, #0 8035dd2: f43f af61 beq.w 8035c98 8035dd6: e02a b.n 8035e2e { derr = ERR_ARG; } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID): derr = snmp_asn1_dec_oid(p, ofs + 1 + len_octets, len, &oid_value); 8035dd8: f89d 100a ldrb.w r1, [sp, #10] 8035ddc: f8bd 200c ldrh.w r2, [sp, #12] 8035de0: 3101 adds r1, #1 8035de2: 4441 add r1, r8 8035de4: 4620 mov r0, r4 8035de6: b289 uxth r1, r1 8035de8: ab25 add r3, sp, #148 ; 0x94 8035dea: f7fd f98b bl 8033104 if (derr == ERR_OK) 8035dee: 2800 cmp r0, #0 8035df0: f47f af52 bne.w 8035c98 { vb = snmp_varbind_alloc(&oid, type, oid_value.len * sizeof(s32_t)); 8035df4: f89d 2094 ldrb.w r2, [sp, #148] ; 0x94 8035df8: 7839 ldrb r1, [r7, #0] 8035dfa: 0092 lsls r2, r2, #2 8035dfc: a804 add r0, sp, #16 8035dfe: f002 02fc and.w r2, r2, #252 ; 0xfc 8035e02: f7ff faad bl 8035360 if (vb != NULL) 8035e06: 4601 mov r1, r0 8035e08: 2800 cmp r0, #0 8035e0a: f43f af45 beq.w 8035c98 { u8_t i = oid_value.len; 8035e0e: f89d 3094 ldrb.w r3, [sp, #148] ; 0x94 s32_t *vptr = (s32_t*)vb->value; 8035e12: 6940 ldr r0, [r0, #20] while(i > 0) 8035e14: e009 b.n 8035e2a { i--; 8035e16: 3b01 subs r3, #1 8035e18: b2db uxtb r3, r3 vptr[i] = oid_value.id[i]; 8035e1a: f50d 7e8c add.w lr, sp, #280 ; 0x118 8035e1e: eb0e 0283 add.w r2, lr, r3, lsl #2 8035e22: f852 2c80 ldr.w r2, [r2, #-128] 8035e26: f840 2023 str.w r2, [r0, r3, lsl #2] if (vb != NULL) { u8_t i = oid_value.len; s32_t *vptr = (s32_t*)vb->value; while(i > 0) 8035e2a: 2b00 cmp r3, #0 8035e2c: d1f3 bne.n 8035e16 { i--; vptr[i] = oid_value.id[i]; } snmp_varbind_tail_add(&m_stat->invb, vb); 8035e2e: f505 7080 add.w r0, r5, #256 ; 0x100 8035e32: f7ff fb41 bl 80354b8 8035e36: e022 b.n 8035e7e derr = ERR_ARG; } } break; case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): if (len == 4) 8035e38: f8bd 200c ldrh.w r2, [sp, #12] 8035e3c: 2a04 cmp r2, #4 8035e3e: f47f af2b bne.w 8035c98 { /* must be exactly 4 octets! */ vb = snmp_varbind_alloc(&oid, type, 4); 8035e42: a804 add r0, sp, #16 8035e44: f7ff fa8c bl 8035360 if (vb != NULL) 8035e48: 4683 mov fp, r0 8035e4a: 2800 cmp r0, #0 8035e4c: f43f af24 beq.w 8035c98 { derr = snmp_asn1_dec_raw(p, ofs + 1 + len_octets, len, vb->value_len, (u8_t*)vb->value); 8035e50: f89d 100a ldrb.w r1, [sp, #10] 8035e54: 7c43 ldrb r3, [r0, #17] 8035e56: 6940 ldr r0, [r0, #20] 8035e58: f8bd 200c ldrh.w r2, [sp, #12] 8035e5c: 9000 str r0, [sp, #0] 8035e5e: 3101 adds r1, #1 8035e60: 4441 add r1, r8 8035e62: 4620 mov r0, r4 8035e64: b289 uxth r1, r1 8035e66: f7fd f9e9 bl 803323c 8035e6a: 4682 mov sl, r0 snmp_varbind_tail_add(&m_stat->invb, vb); 8035e6c: 4659 mov r1, fp 8035e6e: f505 7080 add.w r0, r5, #256 ; 0x100 8035e72: f7ff fb21 bl 80354b8 break; default: derr = ERR_ARG; break; } if (derr != ERR_OK) 8035e76: f1ba 0f00 cmp.w sl, #0 8035e7a: f47f af0d bne.w 8035c98 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8035e7e: f8bd 200c ldrh.w r2, [sp, #12] 8035e82: f89d 300a ldrb.w r3, [sp, #10] 8035e86: 1c51 adds r1, r2, #1 8035e88: 1859 adds r1, r3, r1 8035e8a: 4488 add r8, r1 vb_len -= (1 + len_octets + len); 8035e8c: 8831 ldrh r1, [r6, #0] 8035e8e: 43db mvns r3, r3 8035e90: 1a8a subs r2, r1, r2 8035e92: 18d3 adds r3, r2, r3 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8035e94: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 8035e98: 8033 strh r3, [r6, #0] /* start with empty list */ m_stat->invb.count = 0; m_stat->invb.head = NULL; m_stat->invb.tail = NULL; while (vb_len > 0) 8035e9a: 8833 ldrh r3, [r6, #0] 8035e9c: 2b00 cmp r3, #0 8035e9e: f47f aee3 bne.w 8035c68 } ofs += (1 + len_octets + len); vb_len -= (1 + len_octets + len); } if (m_stat->rt == SNMP_ASN1_PDU_SET_REQ) 8035ea2: 7aab ldrb r3, [r5, #10] 8035ea4: f895 0108 ldrb.w r0, [r5, #264] ; 0x108 8035ea8: 2b03 cmp r3, #3 8035eaa: d102 bne.n 8035eb2 { snmp_add_snmpintotalsetvars(m_stat->invb.count); 8035eac: f7fe fe26 bl 8034afc 8035eb0: e001 b.n 8035eb6 } else { snmp_add_snmpintotalreqvars(m_stat->invb.count); 8035eb2: f7fe fe1b bl 8034aec } *ofs_ret = ofs; 8035eb6: f8a9 8000 strh.w r8, [r9] return ERR_OK; 8035eba: 2000 movs r0, #0 } 8035ebc: b240 sxtb r0, r0 8035ebe: b047 add sp, #284 ; 0x11c 8035ec0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08035ec4 : /* lwIP UDP receive callback function */ static void snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 8035ec4: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} LWIP_UNUSED_ARG(arg); /* traverse input message process list, look for SNMP_MSG_EMPTY */ msg_ps = &msg_input_list[0]; req_idx = 0; while ((req_idx < SNMP_CONCURRENT_REQUESTS) && (msg_ps->state != SNMP_MSG_EMPTY)) 8035ec8: 4da3 ldr r5, [pc, #652] ; (8036158 ) { //volatile struct snmp_msg_pstat *msg_ps; struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; 8035eca: 8917 ldrh r7, [r2, #8] LWIP_UNUSED_ARG(arg); /* traverse input message process list, look for SNMP_MSG_EMPTY */ msg_ps = &msg_input_list[0]; req_idx = 0; while ((req_idx < SNMP_CONCURRENT_REQUESTS) && (msg_ps->state != SNMP_MSG_EMPTY)) 8035ecc: f895 605a ldrb.w r6, [r5, #90] ; 0x5a /* lwIP UDP receive callback function */ static void snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 8035ed0: b087 sub sp, #28 8035ed2: 4699 mov r9, r3 struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; u16_t payload_ofs = 0; u16_t varbind_ofs = 0; 8035ed4: 2300 movs r3, #0 /* lwIP UDP receive callback function */ static void snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 8035ed6: 4688 mov r8, r1 8035ed8: 4614 mov r4, r2 struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; u16_t payload_ofs = 0; u16_t varbind_ofs = 0; 8035eda: f8ad 3010 strh.w r3, [sp, #16] LWIP_UNUSED_ARG(arg); /* traverse input message process list, look for SNMP_MSG_EMPTY */ msg_ps = &msg_input_list[0]; req_idx = 0; while ((req_idx < SNMP_CONCURRENT_REQUESTS) && (msg_ps->state != SNMP_MSG_EMPTY)) 8035ede: 2e00 cmp r6, #0 8035ee0: f000 81a7 beq.w 8036232 msg_ps++; } if (req_idx == SNMP_CONCURRENT_REQUESTS) { /* exceeding number of concurrent requests */ pbuf_free(p); 8035ee4: 4620 mov r0, r4 8035ee6: f7f9 fecf bl 802fc88 8035eea: e1d3 b.n 8036294 ofs_base = ofs; snmp_asn1_dec_type(p, ofs, &type); derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); if ((derr != ERR_OK) || (pdu_len != (1 + len_octets + len)) || 8035eec: f89d 600e ldrb.w r6, [sp, #14] 8035ef0: f8bd 3012 ldrh.w r3, [sp, #18] 8035ef4: 1c75 adds r5, r6, #1 8035ef6: 18eb adds r3, r5, r3 s32_t version; ofs_base = ofs; snmp_asn1_dec_type(p, ofs, &type); derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); if ((derr != ERR_OK) || 8035ef8: 429f cmp r7, r3 8035efa: f040 80c4 bne.w 8036086 (pdu_len != (1 + len_octets + len)) || 8035efe: f89d 300f ldrb.w r3, [sp, #15] 8035f02: 2b30 cmp r3, #48 ; 0x30 8035f04: d000 beq.n 8035f08 8035f06: e0be b.n 8036086 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets); 8035f08: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 8035f0a: 4629 mov r1, r5 8035f0c: f10d 020f add.w r2, sp, #15 8035f10: 4620 mov r0, r4 8035f12: f7fc ffb3 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035f16: 4620 mov r0, r4 8035f18: 1cb1 adds r1, r6, #2 8035f1a: f10d 020e add.w r2, sp, #14 8035f1e: f10d 0312 add.w r3, sp, #18 8035f22: f7fc ffc0 bl 8032ea6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8035f26: 2800 cmp r0, #0 8035f28: f040 80ad bne.w 8036086 8035f2c: f89d 300f ldrb.w r3, [sp, #15] 8035f30: 2b02 cmp r3, #2 8035f32: f040 80a8 bne.w 8036086 { /* can't decode or no integer (version) */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, &version); 8035f36: f89d 100e ldrb.w r1, [sp, #14] 8035f3a: f8bd 2012 ldrh.w r2, [sp, #18] 8035f3e: 3101 adds r1, #1 8035f40: 4620 mov r0, r4 8035f42: 1869 adds r1, r5, r1 8035f44: ab05 add r3, sp, #20 8035f46: f7fd f884 bl 8033052 if (derr != ERR_OK) 8035f4a: 2800 cmp r0, #0 8035f4c: f040 809b bne.w 8036086 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } if (version != 0) 8035f50: 9b05 ldr r3, [sp, #20] 8035f52: b113 cbz r3, 8035f5a { /* not version 1 */ snmp_inc_snmpinbadversions(); 8035f54: f7fe fd8a bl 8034a6c 8035f58: e7c4 b.n 8035ee4 return ERR_ARG; } ofs += (1 + len_octets + len); 8035f5a: f89d 200e ldrb.w r2, [sp, #14] 8035f5e: f8bd 3012 ldrh.w r3, [sp, #18] 8035f62: 18d3 adds r3, r2, r3 8035f64: 18ed adds r5, r5, r3 8035f66: b2ad uxth r5, r5 8035f68: 1c6e adds r6, r5, #1 8035f6a: b2b6 uxth r6, r6 snmp_asn1_dec_type(p, ofs, &type); 8035f6c: 4631 mov r1, r6 8035f6e: f10d 020f add.w r2, sp, #15 8035f72: 4620 mov r0, r4 8035f74: f7fc ff82 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035f78: 1ca9 adds r1, r5, #2 8035f7a: 4620 mov r0, r4 8035f7c: b289 uxth r1, r1 8035f7e: f10d 020e add.w r2, sp, #14 8035f82: f10d 0312 add.w r3, sp, #18 8035f86: f7fc ff8e bl 8032ea6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR))) 8035f8a: 2800 cmp r0, #0 8035f8c: d17b bne.n 8036086 8035f8e: f89d 300f ldrb.w r3, [sp, #15] 8035f92: 2b04 cmp r3, #4 8035f94: d177 bne.n 8036086 { /* can't decode or no octet string (community) */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } derr = snmp_asn1_dec_raw(p, ofs + 1 + len_octets, len, SNMP_COMMUNITY_STR_LEN, m_stat->community); 8035f96: f89d 100e ldrb.w r1, [sp, #14] 8035f9a: 4d70 ldr r5, [pc, #448] ; (803615c ) 8035f9c: f8bd 2012 ldrh.w r2, [sp, #18] 8035fa0: 9500 str r5, [sp, #0] 8035fa2: 3101 adds r1, #1 8035fa4: 1871 adds r1, r6, r1 8035fa6: 4620 mov r0, r4 8035fa8: b289 uxth r1, r1 8035faa: 2340 movs r3, #64 ; 0x40 8035fac: f7fd f946 bl 803323c if (derr != ERR_OK) 8035fb0: 2800 cmp r0, #0 8035fb2: d168 bne.n 8036086 { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 8035fb4: f8bd 3012 ldrh.w r3, [sp, #18] m_stat->community[len] = 0; 8035fb8: f1a5 0218 sub.w r2, r5, #24 { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 8035fbc: 2b40 cmp r3, #64 ; 0x40 8035fbe: bf28 it cs 8035fc0: 2340 movcs r3, #64 ; 0x40 m_stat->community[len] = 0; 8035fc2: 18d1 adds r1, r2, r3 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 8035fc4: f89d 200e ldrb.w r2, [sp, #14] { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 8035fc8: f8ad 3012 strh.w r3, [sp, #18] m_stat->community[len] = 0; m_stat->com_strlen = (u8_t)len; 8035fcc: f885 3041 strb.w r3, [r5, #65] ; 0x41 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 8035fd0: 189b adds r3, r3, r2 8035fd2: 18f6 adds r6, r6, r3 8035fd4: b2b6 uxth r6, r6 8035fd6: f106 0801 add.w r8, r6, #1 8035fda: fa1f f888 uxth.w r8, r8 snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); m_stat->community[len] = 0; 8035fde: 7608 strb r0, [r1, #24] snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); snmp_asn1_dec_type(p, ofs, &type); 8035fe0: f10d 020f add.w r2, sp, #15 8035fe4: 4641 mov r1, r8 8035fe6: 4620 mov r0, r4 8035fe8: f7fc ff48 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8035fec: 1cb1 adds r1, r6, #2 8035fee: 4620 mov r0, r4 8035ff0: b289 uxth r1, r1 8035ff2: f10d 020e add.w r2, sp, #14 8035ff6: f10d 0312 add.w r3, sp, #18 8035ffa: f7fc ff54 bl 8032ea6 if (derr != ERR_OK) 8035ffe: 2800 cmp r0, #0 8036000: d141 bne.n 8036086 return ERR_ARG; } /* FIX for write/read communuty */ /* GetRequest PDU */ if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ)) 8036002: f89d 300f ldrb.w r3, [sp, #15] 8036006: 2ba0 cmp r3, #160 ; 0xa0 8036008: d10f bne.n 803602a { if (strncmp(sSettings.sSnmp.readCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.readCommunity)) != 0 803600a: 4855 ldr r0, [pc, #340] ; (8036160 ) 803600c: f7ec f8dc bl 80221c8 8036010: 4629 mov r1, r5 8036012: 4602 mov r2, r0 8036014: 4852 ldr r0, [pc, #328] ; (8036160 ) 8036016: f7ec f939 bl 802228c 803601a: b120 cbz r0, 8036026 || (strlen(sSettings.sSnmp.readCommunity) != strlen((const char*)m_stat->community)) ) { snmp_inc_snmpinbadcommunitynames(); 803601c: f7fe fd2e bl 8034a7c snmp_authfail_trap(); 8036020: f000 fd82 bl 8036b28 8036024: e75e b.n 8035ee4 /* FIX for write/read communuty */ /* GetRequest PDU */ if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ)) { if (strncmp(sSettings.sSnmp.readCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.readCommunity)) != 0 || (strlen(sSettings.sSnmp.readCommunity) != strlen((const char*)m_stat->community)) ) 8036026: 484e ldr r0, [pc, #312] ; (8036160 ) 8036028: e00c b.n 8036044 snmp_authfail_trap(); return ERR_ARG; } } /* SetRequest PDU */ else if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ)) 803602a: 2ba3 cmp r3, #163 ; 0xa3 803602c: d112 bne.n 8036054 { if (strncmp(sSettings.sSnmp.writeCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.writeCommunity)) != 0 803602e: 484d ldr r0, [pc, #308] ; (8036164 ) 8036030: f7ec f8ca bl 80221c8 8036034: 4629 mov r1, r5 8036036: 4602 mov r2, r0 8036038: 484a ldr r0, [pc, #296] ; (8036164 ) 803603a: f7ec f927 bl 802228c 803603e: 2800 cmp r0, #0 8036040: d1ec bne.n 803601c || (strlen(sSettings.sSnmp.writeCommunity) != strlen((const char*)m_stat->community)) ) 8036042: 4848 ldr r0, [pc, #288] ; (8036164 ) 8036044: f7ec f8c0 bl 80221c8 8036048: 4606 mov r6, r0 803604a: 4628 mov r0, r5 803604c: f7ec f8bc bl 80221c8 8036050: 4286 cmp r6, r0 8036052: d1e3 bne.n 803601c snmp_authfail_trap(); return ERR_ARG; } } switch(type) 8036054: f89d 300f ldrb.w r3, [sp, #15] 8036058: 3ba0 subs r3, #160 ; 0xa0 803605a: 2b04 cmp r3, #4 803605c: d813 bhi.n 8036086 803605e: e8df f003 tbb [pc, r3] 8036062: 0603 .short 0x0603 8036064: 0c09 .short 0x0c09 8036066: 0f .byte 0x0f 8036067: 00 .byte 0x00 { case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ): // GetRequest PDU snmp_inc_snmpingetrequests(); 8036068: f7fe fd50 bl 8034b0c 803606c: e0fd b.n 803626a derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_NEXT_REQ): // GetNextRequest PDU snmp_inc_snmpingetnexts(); 803606e: f7fe fd55 bl 8034b1c 8036072: e0fa b.n 803626a derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP): // GetResponse PDU snmp_inc_snmpingetresponses(); 8036074: f7fe fd62 bl 8034b3c 8036078: e734 b.n 8035ee4 derr = ERR_ARG; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ): // SetRequest PDU snmp_inc_snmpinsetrequests(); 803607a: f7fe fd57 bl 8034b2c 803607e: e0f4 b.n 803626a derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP): // Trap PDU snmp_inc_snmpintraps(); 8036080: f7fe fd64 bl 8034b4c 8036084: e72e b.n 8035ee4 derr = ERR_ARG; break; default: snmp_inc_snmpinasnparseerrs(); 8036086: f7fe fd01 bl 8034a8c 803608a: e72b b.n 8035ee4 { /* decoded PDU length does not equal actual payload length */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } snmp_asn1_dec_type(p, ofs, &type); 803608c: 4631 mov r1, r6 803608e: f10d 020f add.w r2, sp, #15 8036092: 4620 mov r0, r4 8036094: f7fc fef2 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036098: f108 0102 add.w r1, r8, #2 803609c: 4620 mov r0, r4 803609e: b289 uxth r1, r1 80360a0: f10d 020e add.w r2, sp, #14 80360a4: f10d 0312 add.w r3, sp, #18 80360a8: f7fc fefd bl 8032ea6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 80360ac: 2800 cmp r0, #0 80360ae: d1ea bne.n 8036086 80360b0: f89d 300f ldrb.w r3, [sp, #15] 80360b4: 2b02 cmp r3, #2 80360b6: d1e6 bne.n 8036086 { /* can't decode or no integer (request ID) */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, &m_stat->rid); 80360b8: f89d 100e ldrb.w r1, [sp, #14] 80360bc: f8bd 2012 ldrh.w r2, [sp, #18] 80360c0: 3101 adds r1, #1 80360c2: 1871 adds r1, r6, r1 80360c4: 4620 mov r0, r4 80360c6: b289 uxth r1, r1 80360c8: f105 030c add.w r3, r5, #12 80360cc: f7fc ffc1 bl 8033052 if (derr != ERR_OK) 80360d0: 2800 cmp r0, #0 80360d2: d1d8 bne.n 8036086 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 80360d4: f89d 200e ldrb.w r2, [sp, #14] 80360d8: f8bd 3012 ldrh.w r3, [sp, #18] 80360dc: 18d3 adds r3, r2, r3 80360de: 18f6 adds r6, r6, r3 80360e0: b2b6 uxth r6, r6 80360e2: 1c77 adds r7, r6, #1 80360e4: b2bf uxth r7, r7 snmp_asn1_dec_type(p, ofs, &type); 80360e6: 4639 mov r1, r7 80360e8: f10d 020f add.w r2, sp, #15 80360ec: 4620 mov r0, r4 80360ee: f7fc fec5 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 80360f2: 1cb1 adds r1, r6, #2 80360f4: 4620 mov r0, r4 80360f6: b289 uxth r1, r1 80360f8: f10d 020e add.w r2, sp, #14 80360fc: f10d 0312 add.w r3, sp, #18 8036100: f7fc fed1 bl 8032ea6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8036104: 2800 cmp r0, #0 8036106: d1be bne.n 8036086 8036108: f89d 300f ldrb.w r3, [sp, #15] 803610c: 2b02 cmp r3, #2 803610e: d1ba bne.n 8036086 snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* must be noError (0) for incoming requests. log errors for mib-2 completeness and for debug purposes */ derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, &m_stat->error_status); 8036110: f89d 100e ldrb.w r1, [sp, #14] 8036114: f8bd 2012 ldrh.w r2, [sp, #18] 8036118: 3101 adds r1, #1 803611a: 1879 adds r1, r7, r1 803611c: 4620 mov r0, r4 803611e: b289 uxth r1, r1 8036120: f105 0310 add.w r3, r5, #16 8036124: f7fc ff95 bl 8033052 if (derr != ERR_OK) 8036128: 2800 cmp r0, #0 803612a: d1ac bne.n 8036086 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } switch (m_stat->error_status) 803612c: 692b ldr r3, [r5, #16] 803612e: 3b01 subs r3, #1 8036130: 2b04 cmp r3, #4 8036132: d81b bhi.n 803616c 8036134: e8df f003 tbb [pc, r3] 8036138: 0c090603 .word 0x0c090603 803613c: 18 .byte 0x18 803613d: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpintoobigs(); 803613e: f7fe fcad bl 8034a9c 8036142: e013 b.n 803616c break; case SNMP_ES_NOSUCHNAME: snmp_inc_snmpinnosuchnames(); 8036144: f7fe fcb2 bl 8034aac 8036148: e010 b.n 803616c break; case SNMP_ES_BADVALUE: snmp_inc_snmpinbadvalues(); 803614a: f7fe fcb7 bl 8034abc 803614e: e00d b.n 803616c break; case SNMP_ES_READONLY: snmp_inc_snmpinreadonlys(); 8036150: f7fe fcbc bl 8034acc 8036154: e00a b.n 803616c 8036156: bf00 nop 8036158: 2000ff54 .word 0x2000ff54 803615c: 2000ff6c .word 0x2000ff6c 8036160: 2000d5e5 .word 0x2000d5e5 8036164: 2000d5f9 .word 0x2000d5f9 break; case SNMP_ES_GENERROR: snmp_inc_snmpingenerrs(); 8036168: f7fe fcb8 bl 8034adc break; } ofs += (1 + len_octets + len); 803616c: f89d 200e ldrb.w r2, [sp, #14] 8036170: f8bd 3012 ldrh.w r3, [sp, #18] 8036174: 18d3 adds r3, r2, r3 8036176: 18ff adds r7, r7, r3 8036178: b2bf uxth r7, r7 803617a: 1c7d adds r5, r7, #1 803617c: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 803617e: 4629 mov r1, r5 8036180: f10d 020f add.w r2, sp, #15 8036184: 4620 mov r0, r4 8036186: f7fc fe79 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 803618a: 1cb9 adds r1, r7, #2 803618c: 4620 mov r0, r4 803618e: b289 uxth r1, r1 8036190: f10d 020e add.w r2, sp, #14 8036194: f10d 0312 add.w r3, sp, #18 8036198: f7fc fe85 bl 8032ea6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 803619c: 2800 cmp r0, #0 803619e: f47f af72 bne.w 8036086 80361a2: f89d 300f ldrb.w r3, [sp, #15] 80361a6: 2b02 cmp r3, #2 80361a8: f47f af6d bne.w 8036086 snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* must be 0 for incoming requests. decode anyway to catch bad integers (and dirty tricks) */ derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, &m_stat->error_index); 80361ac: f89d 100e ldrb.w r1, [sp, #14] 80361b0: f8bd 2012 ldrh.w r2, [sp, #18] 80361b4: 4b39 ldr r3, [pc, #228] ; (803629c ) 80361b6: 3101 adds r1, #1 80361b8: 1869 adds r1, r5, r1 80361ba: 4620 mov r0, r4 80361bc: b289 uxth r1, r1 80361be: f7fc ff48 bl 8033052 if (derr != ERR_OK) 80361c2: 2800 cmp r0, #0 80361c4: f47f af5f bne.w 8036086 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 80361c8: f8bd 3012 ldrh.w r3, [sp, #18] 80361cc: f89d 200e ldrb.w r2, [sp, #14] 80361d0: 3301 adds r3, #1 80361d2: 189b adds r3, r3, r2 /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 80361d4: 4a32 ldr r2, [pc, #200] ; (80362a0 ) { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 80361d6: 18ed adds r5, r5, r3 /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 80361d8: 7a93 ldrb r3, [r2, #10] /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); *ofs_ret = ofs; 80361da: f8ad 5010 strh.w r5, [sp, #16] /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || 80361de: 2b01 cmp r3, #1 80361e0: d902 bls.n 80361e8 ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 80361e2: 2b03 cmp r3, #3 80361e4: f47f ae7e bne.w 8035ee4 (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || 80361e8: 6913 ldr r3, [r2, #16] ((msg_ps->error_status != SNMP_ES_NOERROR) || 80361ea: 4d2d ldr r5, [pc, #180] ; (80362a0 ) /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || 80361ec: 2b00 cmp r3, #0 80361ee: f47f ae79 bne.w 8035ee4 ((msg_ps->error_status != SNMP_ES_NOERROR) || 80361f2: 696b ldr r3, [r5, #20] 80361f4: 2b00 cmp r3, #0 80361f6: f47f ae75 bne.w 8035ee4 } LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv ok, community %s\n", msg_ps->community)); /* Builds a list of variable bindings. Copy the varbinds from the pbuf chain to glue them when these are divided over two or more pbuf's. */ err_ret = snmp_pdu_dec_varbindlist(p, varbind_ofs, &varbind_ofs, msg_ps); 80361fa: aa06 add r2, sp, #24 80361fc: 4620 mov r0, r4 80361fe: f832 1d08 ldrh.w r1, [r2, #-8]! 8036202: 462b mov r3, r5 8036204: f7ff fd04 bl 8035c10 8036208: 4606 mov r6, r0 /* we've decoded the incoming message, release input msg now */ pbuf_free(p); 803620a: 4620 mov r0, r4 803620c: f7f9 fd3c bl 802fc88 if ((err_ret != ERR_OK) || (msg_ps->invb.count == 0)) 8036210: 2e00 cmp r6, #0 8036212: d13f bne.n 8036294 8036214: f895 3108 ldrb.w r3, [r5, #264] ; 0x108 8036218: 2b00 cmp r3, #0 803621a: d03b beq.n 8036294 } msg_ps->error_status = SNMP_ES_NOERROR; msg_ps->error_index = 0; /* find object for each variable binding */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 803621c: 2301 movs r3, #1 (errors are only returned for a specific varbind failure) */ LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_pdu_dec_varbindlist() failed\n")); return; } msg_ps->error_status = SNMP_ES_NOERROR; 803621e: 612e str r6, [r5, #16] msg_ps->error_index = 0; 8036220: 616e str r6, [r5, #20] /* find object for each variable binding */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8036222: f885 305a strb.w r3, [r5, #90] ; 0x5a /* first variable binding from list to inspect */ msg_ps->vb_idx = 0; 8036226: f885 60f8 strb.w r6, [r5, #248] ; 0xf8 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv varbind cnt=%"U16_F"\n",(u16_t)msg_ps->invb.count)); /* handle input event and as much objects as possible in one go */ snmp_msg_event(req_idx); 803622a: 4630 mov r0, r6 803622c: f7ff f950 bl 80354d0 8036230: e030 b.n 8036294 pbuf_free(p); return; } /* accepting request */ snmp_inc_snmpinpkts(); 8036232: f7fe fc0b bl 8034a4c /* record used 'protocol control block' */ msg_ps->pcb = pcb; /* source address (network order) */ msg_ps->sip = *addr; 8036236: f8d9 3000 ldr.w r3, [r9] } /* accepting request */ snmp_inc_snmpinpkts(); /* record used 'protocol control block' */ msg_ps->pcb = pcb; 803623a: f8c5 8000 str.w r8, [r5] /* source address (network order) */ msg_ps->sip = *addr; 803623e: 606b str r3, [r5, #4] /* source port (host order (lwIP oddity)) */ msg_ps->sp = port; 8036240: f8bd 3038 ldrh.w r3, [sp, #56] ; 0x38 u8_t len_octets; u8_t type; s32_t version; ofs_base = ofs; snmp_asn1_dec_type(p, ofs, &type); 8036244: 4631 mov r1, r6 /* record used 'protocol control block' */ msg_ps->pcb = pcb; /* source address (network order) */ msg_ps->sip = *addr; /* source port (host order (lwIP oddity)) */ msg_ps->sp = port; 8036246: 812b strh r3, [r5, #8] u8_t len_octets; u8_t type; s32_t version; ofs_base = ofs; snmp_asn1_dec_type(p, ofs, &type); 8036248: f10d 020f add.w r2, sp, #15 803624c: 4620 mov r0, r4 803624e: f7fc fe15 bl 8032e7c derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8036252: 4620 mov r0, r4 8036254: 2101 movs r1, #1 8036256: f10d 020e add.w r2, sp, #14 803625a: f10d 0312 add.w r3, sp, #18 803625e: f7fc fe22 bl 8032ea6 if ((derr != ERR_OK) || 8036262: 2800 cmp r0, #0 8036264: f43f ae42 beq.w 8035eec 8036268: e70d b.n 8036086 if (derr != ERR_OK) { /* unsupported input PDU for this agent (no parse error) */ return ERR_ARG; } m_stat->rt = type & 0x1F; 803626a: f89d 300f ldrb.w r3, [sp, #15] 803626e: 4d0c ldr r5, [pc, #48] ; (80362a0 ) 8036270: f003 031f and.w r3, r3, #31 8036274: 72ab strb r3, [r5, #10] ofs += (1 + len_octets); 8036276: f89d 300e ldrb.w r3, [sp, #14] 803627a: 4498 add r8, r3 803627c: fa1f f888 uxth.w r8, r8 8036280: f108 0601 add.w r6, r8, #1 8036284: b2b6 uxth r6, r6 if (len != (pdu_len - (ofs - ofs_base))) 8036286: f8bd 3012 ldrh.w r3, [sp, #18] 803628a: 1bbf subs r7, r7, r6 803628c: 42bb cmp r3, r7 803628e: f43f aefd beq.w 803608c 8036292: e6f8 b.n 8036086 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv varbind cnt=%"U16_F"\n",(u16_t)msg_ps->invb.count)); /* handle input event and as much objects as possible in one go */ snmp_msg_event(req_idx); } 8036294: b007 add sp, #28 8036296: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 803629a: bf00 nop 803629c: 2000ff68 .word 0x2000ff68 80362a0: 2000ff54 .word 0x2000ff54 080362a4 : * @param root points to the root of the variable binding list * @return the required lenght for encoding the variable bindings */ static u16_t snmp_varbind_list_sum(struct snmp_varbind_root *root) { 80362a4: b5f8 push {r3, r4, r5, r6, r7, lr} struct snmp_varbind *vb; u32_t *uint_ptr; s32_t *sint_ptr; u16_t tot_len; tot_len = 0; 80362a6: 2500 movs r5, #0 * @param root points to the root of the variable binding list * @return the required lenght for encoding the variable bindings */ static u16_t snmp_varbind_list_sum(struct snmp_varbind_root *root) { 80362a8: 4606 mov r6, r0 u32_t *uint_ptr; s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; 80362aa: 6844 ldr r4, [r0, #4] sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_oid_cnt(vb->value_len / sizeof(s32_t), sint_ptr, &vb->vlen); break; default: /* unsupported type */ vb->vlen = 0; 80362ac: 462f mov r7, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 80362ae: e051 b.n 8036354 { /* encoded value lenght depends on type */ switch (vb->value_type) 80362b0: 7c23 ldrb r3, [r4, #16] 80362b2: 2b06 cmp r3, #6 80362b4: d020 beq.n 80362f8 80362b6: d805 bhi.n 80362c4 80362b8: 2b02 cmp r3, #2 80362ba: d00c beq.n 80362d6 80362bc: d324 bcc.n 8036308 80362be: 2b04 cmp r3, #4 80362c0: d322 bcc.n 8036308 80362c2: e016 b.n 80362f2 80362c4: 2b43 cmp r3, #67 ; 0x43 80362c6: d803 bhi.n 80362d0 80362c8: 2b41 cmp r3, #65 ; 0x41 80362ca: d20b bcs.n 80362e4 80362cc: 2b40 cmp r3, #64 ; 0x40 80362ce: e000 b.n 80362d2 80362d0: 2b44 cmp r3, #68 ; 0x44 80362d2: d119 bne.n 8036308 80362d4: e00d b.n 80362f2 { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_s32t_cnt(*sint_ptr, &vb->vlen); 80362d6: 6963 ldr r3, [r4, #20] 80362d8: f104 0120 add.w r1, r4, #32 80362dc: 6818 ldr r0, [r3, #0] 80362de: f7fd f804 bl 80332ea break; 80362e2: e012 b.n 803630a case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS): uint_ptr = (u32_t*)vb->value; snmp_asn1_enc_u32t_cnt(*uint_ptr, &vb->vlen); 80362e4: 6963 ldr r3, [r4, #20] 80362e6: f104 0120 add.w r1, r4, #32 80362ea: 6818 ldr r0, [r3, #0] 80362ec: f7fc ffe8 bl 80332c0 break; 80362f0: e00b b.n 803630a case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR): case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_OPAQUE): vb->vlen = vb->value_len; 80362f2: 7c63 ldrb r3, [r4, #17] 80362f4: 8423 strh r3, [r4, #32] break; 80362f6: e008 b.n 803630a case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID): sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_oid_cnt(vb->value_len / sizeof(s32_t), sint_ptr, &vb->vlen); 80362f8: 7c60 ldrb r0, [r4, #17] 80362fa: 6961 ldr r1, [r4, #20] 80362fc: 0880 lsrs r0, r0, #2 80362fe: f104 0220 add.w r2, r4, #32 8036302: f7fd f807 bl 8033314 break; 8036306: e000 b.n 803630a default: /* unsupported type */ vb->vlen = 0; 8036308: 8427 strh r7, [r4, #32] break; }; /* encoding length of value length field */ snmp_asn1_enc_length_cnt(vb->vlen, &vb->vlenlen); 803630a: 8c20 ldrh r0, [r4, #32] 803630c: f104 011a add.w r1, r4, #26 8036310: f7fc ffcb bl 80332aa snmp_asn1_enc_oid_cnt(vb->ident_len, vb->ident, &vb->olen); 8036314: f104 021e add.w r2, r4, #30 8036318: 7a20 ldrb r0, [r4, #8] 803631a: 68e1 ldr r1, [r4, #12] 803631c: f7fc fffa bl 8033314 snmp_asn1_enc_length_cnt(vb->olen, &vb->olenlen); 8036320: 8be0 ldrh r0, [r4, #30] 8036322: f104 0119 add.w r1, r4, #25 8036326: f7fc ffc0 bl 80332aa vb->seqlen = 1 + vb->vlenlen + vb->vlen; 803632a: 8be3 ldrh r3, [r4, #30] 803632c: 8c20 ldrh r0, [r4, #32] 803632e: 18c0 adds r0, r0, r3 8036330: 7ea3 ldrb r3, [r4, #26] vb->seqlen += 1 + vb->olenlen + vb->olen; 8036332: 3002 adds r0, #2 8036334: 18c0 adds r0, r0, r3 8036336: 7e63 ldrb r3, [r4, #25] 8036338: 18c0 adds r0, r0, r3 803633a: b280 uxth r0, r0 803633c: 83a0 strh r0, [r4, #28] snmp_asn1_enc_length_cnt(vb->seqlen, &vb->seqlenlen); 803633e: f104 0118 add.w r1, r4, #24 8036342: f7fc ffb2 bl 80332aa /* varbind seq */ tot_len += 1 + vb->seqlenlen + vb->seqlen; 8036346: 8ba3 ldrh r3, [r4, #28] 8036348: 7e22 ldrb r2, [r4, #24] vb = vb->prev; 803634a: 6864 ldr r4, [r4, #4] vb->seqlen = 1 + vb->vlenlen + vb->vlen; vb->seqlen += 1 + vb->olenlen + vb->olen; snmp_asn1_enc_length_cnt(vb->seqlen, &vb->seqlenlen); /* varbind seq */ tot_len += 1 + vb->seqlenlen + vb->seqlen; 803634c: 3301 adds r3, #1 803634e: 189b adds r3, r3, r2 8036350: 18ed adds r5, r5, r3 8036352: b2ad uxth r5, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 8036354: 2c00 cmp r4, #0 8036356: d1ab bne.n 80362b0 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 8036358: 4628 mov r0, r5 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; 803635a: 8175 strh r5, [r6, #10] snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 803635c: f106 0109 add.w r1, r6, #9 8036360: f7fc ffa3 bl 80332aa tot_len += 1 + root->seqlenlen; 8036364: 7a73 ldrb r3, [r6, #9] 8036366: 3301 adds r3, #1 8036368: 18e8 adds r0, r5, r3 return tot_len; } 803636a: b280 uxth r0, r0 803636c: bdf8 pop {r3, r4, r5, r6, r7, pc} 803636e: 0000 movs r0, r0 08036370 : * @param rhl points to returned header lengths * @return the required lenght for encoding the response header */ static u16_t snmp_resp_header_sum(struct snmp_msg_pstat *m_stat, u16_t vb_len) { 8036370: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8036374: 4604 mov r4, r0 u16_t tot_len; struct snmp_resp_header_lengths *rhl; rhl = &m_stat->rhl; tot_len = vb_len; snmp_asn1_enc_s32t_cnt(m_stat->error_index, &rhl->erridxlen); 8036376: f500 758c add.w r5, r0, #280 ; 0x118 * @param rhl points to returned header lengths * @return the required lenght for encoding the response header */ static u16_t snmp_resp_header_sum(struct snmp_msg_pstat *m_stat, u16_t vb_len) { 803637a: 460f mov r7, r1 u16_t tot_len; struct snmp_resp_header_lengths *rhl; rhl = &m_stat->rhl; tot_len = vb_len; snmp_asn1_enc_s32t_cnt(m_stat->error_index, &rhl->erridxlen); 803637c: 6940 ldr r0, [r0, #20] 803637e: f504 7190 add.w r1, r4, #288 ; 0x120 8036382: f7fc ffb2 bl 80332ea snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); 8036386: f8b4 0120 ldrh.w r0, [r4, #288] ; 0x120 803638a: 4629 mov r1, r5 803638c: f7fc ff8d bl 80332aa tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 8036390: 6920 ldr r0, [r4, #16] rhl = &m_stat->rhl; tot_len = vb_len; snmp_asn1_enc_s32t_cnt(m_stat->error_index, &rhl->erridxlen); snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; 8036392: f894 8118 ldrb.w r8, [r4, #280] ; 0x118 8036396: f8b4 a120 ldrh.w sl, [r4, #288] ; 0x120 snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 803639a: f504 7191 add.w r1, r4, #290 ; 0x122 803639e: f7fc ffa4 bl 80332ea snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); 80363a2: 1c69 adds r1, r5, #1 80363a4: f8b4 0122 ldrh.w r0, [r4, #290] ; 0x122 80363a8: f7fc ff7f bl 80332aa tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 80363ac: f8b4 9122 ldrh.w r9, [r4, #290] ; 0x122 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 80363b0: 68e0 ldr r0, [r4, #12] snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 80363b2: f894 6119 ldrb.w r6, [r4, #281] ; 0x119 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 80363b6: f504 7192 add.w r1, r4, #292 ; 0x124 80363ba: f7fc ff96 bl 80332ea snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); 80363be: f8b4 0124 ldrh.w r0, [r4, #292] ; 0x124 80363c2: f504 718d add.w r1, r4, #282 ; 0x11a 80363c6: f7fc ff70 bl 80332aa rhl = &m_stat->rhl; tot_len = vb_len; snmp_asn1_enc_s32t_cnt(m_stat->error_index, &rhl->erridxlen); snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; 80363ca: 44d1 add r9, sl snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 80363cc: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 80363d0: f109 0903 add.w r9, r9, #3 80363d4: 4499 add r9, r3 80363d6: fa18 f889 uxtah r8, r8, r9 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); tot_len += 1 + rhl->ridlenlen + rhl->ridlen; 80363da: f894 311a ldrb.w r3, [r4, #282] ; 0x11a 80363de: 4446 add r6, r8 80363e0: 18f6 adds r6, r6, r3 80363e2: fa17 f686 uxtah r6, r7, r6 80363e6: b2b6 uxth r6, r6 rhl->pdulen = tot_len; snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 80363e8: 1ce9 adds r1, r5, #3 80363ea: 4630 mov r0, r6 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); tot_len += 1 + rhl->ridlenlen + rhl->ridlen; rhl->pdulen = tot_len; 80363ec: f8a4 6126 strh.w r6, [r4, #294] ; 0x126 snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 80363f0: f7fc ff5b bl 80332aa tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; 80363f4: f894 0059 ldrb.w r0, [r4, #89] ; 0x59 snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); tot_len += 1 + rhl->ridlenlen + rhl->ridlen; rhl->pdulen = tot_len; snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; 80363f8: f894 811b ldrb.w r8, [r4, #283] ; 0x11b rhl->comlen = m_stat->com_strlen; 80363fc: f8a4 0128 strh.w r0, [r4, #296] ; 0x128 snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); 8036400: f504 718e add.w r1, r4, #284 ; 0x11c 8036404: f7fc ff51 bl 80332aa tot_len += 1 + rhl->comlenlen + rhl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 8036408: 4b14 ldr r3, [pc, #80] ; (803645c ) snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); tot_len += 1 + rhl->comlenlen + rhl->comlen; 803640a: f894 711c ldrb.w r7, [r4, #284] ; 0x11c snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 803640e: 6818 ldr r0, [r3, #0] snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); tot_len += 1 + rhl->comlenlen + rhl->comlen; 8036410: f8b4 9128 ldrh.w r9, [r4, #296] ; 0x128 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 8036414: f504 7195 add.w r1, r4, #298 ; 0x12a 8036418: f7fc ff67 bl 80332ea snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); 803641c: 1d69 adds r1, r5, #5 803641e: f8b4 012a ldrh.w r0, [r4, #298] ; 0x12a 8036422: f7fc ff42 bl 80332aa snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); tot_len += 1 + rhl->comlenlen + rhl->comlen; 8036426: f8b4 512a ldrh.w r5, [r4, #298] ; 0x12a snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); tot_len += 1 + rhl->verlen + rhl->verlenlen; 803642a: f894 311d ldrb.w r3, [r4, #285] ; 0x11d snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); tot_len += 1 + rhl->comlenlen + rhl->comlen; 803642e: 444d add r5, r9 8036430: 3503 adds r5, #3 8036432: 4445 add r5, r8 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); tot_len += 1 + rhl->verlen + rhl->verlenlen; 8036434: 197d adds r5, r7, r5 8036436: 18ed adds r5, r5, r3 8036438: fa16 f585 uxtah r5, r6, r5 803643c: b2ad uxth r5, r5 rhl->seqlen = tot_len; snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 803643e: 4628 mov r0, r5 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); tot_len += 1 + rhl->verlen + rhl->verlenlen; rhl->seqlen = tot_len; 8036440: f8a4 512c strh.w r5, [r4, #300] ; 0x12c snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 8036444: f504 718f add.w r1, r4, #286 ; 0x11e 8036448: f7fc ff2f bl 80332aa tot_len += 1 + rhl->seqlenlen; 803644c: f894 311e ldrb.w r3, [r4, #286] ; 0x11e 8036450: 3301 adds r3, #1 8036452: 18e8 adds r0, r5, r3 return tot_len; } 8036454: b280 uxth r0, r0 8036456: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 803645a: bf00 nop 803645c: 08045068 .word 0x08045068 08036460 : /** * Encodes varbind list from head to tail. */ static u16_t snmp_varbind_list_enc(struct snmp_varbind_root *root, struct pbuf *p, u16_t ofs) { 8036460: b570 push {r4, r5, r6, lr} 8036462: 4616 mov r6, r2 8036464: 4604 mov r4, r0 s32_t *sint_ptr; u32_t *uint_ptr; u8_t *raw_ptr; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; 8036466: 3601 adds r6, #1 /** * Encodes varbind list from head to tail. */ static u16_t snmp_varbind_list_enc(struct snmp_varbind_root *root, struct pbuf *p, u16_t ofs) { 8036468: 460d mov r5, r1 struct snmp_varbind *vb; s32_t *sint_ptr; u32_t *uint_ptr; u8_t *raw_ptr; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 803646a: 4608 mov r0, r1 ofs += 1; 803646c: b2b6 uxth r6, r6 struct snmp_varbind *vb; s32_t *sint_ptr; u32_t *uint_ptr; u8_t *raw_ptr; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 803646e: 4611 mov r1, r2 8036470: 2230 movs r2, #48 ; 0x30 8036472: f7fc ff67 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); 8036476: 4628 mov r0, r5 8036478: 4631 mov r1, r6 803647a: 8962 ldrh r2, [r4, #10] 803647c: f7fc ff76 bl 803336c ofs += root->seqlenlen; 8036480: 7a63 ldrb r3, [r4, #9] 8036482: e064 b.n 803654e vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 8036484: 4631 mov r1, r6 ofs += 1; 8036486: 3601 adds r6, #1 ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 8036488: 2230 movs r2, #48 ; 0x30 ofs += 1; 803648a: b2b6 uxth r6, r6 ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 803648c: 4628 mov r0, r5 803648e: f7fc ff59 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); 8036492: 4631 mov r1, r6 8036494: 8ba2 ldrh r2, [r4, #28] 8036496: 4628 mov r0, r5 8036498: f7fc ff68 bl 803336c ofs += vb->seqlenlen; 803649c: 7e23 ldrb r3, [r4, #24] 803649e: 18f6 adds r6, r6, r3 80364a0: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 80364a2: 4631 mov r1, r6 ofs += 1; 80364a4: 3601 adds r6, #1 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); ofs += vb->seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 80364a6: 2206 movs r2, #6 ofs += 1; 80364a8: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); ofs += vb->seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 80364aa: 4628 mov r0, r5 80364ac: f7fc ff4a bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); 80364b0: 4631 mov r1, r6 80364b2: 8be2 ldrh r2, [r4, #30] 80364b4: 4628 mov r0, r5 80364b6: f7fc ff59 bl 803336c ofs += vb->olenlen; 80364ba: 7e63 ldrb r3, [r4, #25] snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 80364bc: 7a22 ldrb r2, [r4, #8] ofs += vb->seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); ofs += vb->olenlen; 80364be: 18f6 adds r6, r6, r3 80364c0: b2b6 uxth r6, r6 snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 80364c2: 4631 mov r1, r6 80364c4: 68e3 ldr r3, [r4, #12] 80364c6: 4628 mov r0, r5 80364c8: f7fd f805 bl 80334d6 ofs += vb->olen; 80364cc: 8be3 ldrh r3, [r4, #30] snmp_asn1_enc_type(p, ofs, vb->value_type); 80364ce: 7c22 ldrb r2, [r4, #16] snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); ofs += vb->olenlen; snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); ofs += vb->olen; 80364d0: 18f6 adds r6, r6, r3 80364d2: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, vb->value_type); 80364d4: 4631 mov r1, r6 ofs += 1; 80364d6: 3601 adds r6, #1 80364d8: b2b6 uxth r6, r6 snmp_asn1_enc_length(p, ofs, vb->olen); ofs += vb->olenlen; snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); ofs += vb->olen; snmp_asn1_enc_type(p, ofs, vb->value_type); 80364da: 4628 mov r0, r5 80364dc: f7fc ff32 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->vlen); 80364e0: 4631 mov r1, r6 80364e2: 4628 mov r0, r5 80364e4: 8c22 ldrh r2, [r4, #32] 80364e6: f7fc ff41 bl 803336c ofs += vb->vlenlen; 80364ea: 7ea3 ldrb r3, [r4, #26] 80364ec: 18f6 adds r6, r6, r3 switch (vb->value_type) 80364ee: 7c23 ldrb r3, [r4, #16] 80364f0: 2b40 cmp r3, #64 ; 0x40 ofs += vb->olen; snmp_asn1_enc_type(p, ofs, vb->value_type); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->vlen); ofs += vb->vlenlen; 80364f2: b2b6 uxth r6, r6 switch (vb->value_type) 80364f4: d01c beq.n 8036530 80364f6: d806 bhi.n 8036506 80364f8: 2b04 cmp r3, #4 80364fa: d019 beq.n 8036530 80364fc: 2b06 cmp r3, #6 80364fe: d01e beq.n 803653e 8036500: 2b02 cmp r3, #2 8036502: d123 bne.n 803654c 8036504: e004 b.n 8036510 8036506: 2b43 cmp r3, #67 ; 0x43 8036508: d90a bls.n 8036520 803650a: 2b44 cmp r3, #68 ; 0x44 803650c: d11e bne.n 803654c 803650e: e00f b.n 8036530 { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_s32t(p, ofs, vb->vlen, *sint_ptr); 8036510: 6963 ldr r3, [r4, #20] 8036512: 8c22 ldrh r2, [r4, #32] 8036514: 681b ldr r3, [r3, #0] 8036516: 4628 mov r0, r5 8036518: 4631 mov r1, r6 803651a: f7fc ffaf bl 803347c break; 803651e: e015 b.n 803654c case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS): uint_ptr = (u32_t*)vb->value; snmp_asn1_enc_u32t(p, ofs, vb->vlen, *uint_ptr); 8036520: 6963 ldr r3, [r4, #20] 8036522: 8c22 ldrh r2, [r4, #32] 8036524: 681b ldr r3, [r3, #0] 8036526: 4628 mov r0, r5 8036528: 4631 mov r1, r6 803652a: f7fc ff67 bl 80333fc break; 803652e: e00d b.n 803654c case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_OPAQUE): raw_ptr = (u8_t*)vb->value; snmp_asn1_enc_raw(p, ofs, vb->vlen, raw_ptr); 8036530: 4628 mov r0, r5 8036532: 4631 mov r1, r6 8036534: 8c22 ldrh r2, [r4, #32] 8036536: 6963 ldr r3, [r4, #20] 8036538: f7fd f840 bl 80335bc break; 803653c: e006 b.n 803654c case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID): sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_oid(p, ofs, vb->value_len / sizeof(s32_t), sint_ptr); 803653e: 7c62 ldrb r2, [r4, #17] 8036540: 6963 ldr r3, [r4, #20] 8036542: 4628 mov r0, r5 8036544: 4631 mov r1, r6 8036546: 0892 lsrs r2, r2, #2 8036548: f7fc ffc5 bl 80334d6 break; default: /* unsupported type */ break; }; ofs += vb->vlen; 803654c: 8c23 ldrh r3, [r4, #32] vb = vb->next; 803654e: 6824 ldr r4, [r4, #0] break; default: /* unsupported type */ break; }; ofs += vb->vlen; 8036550: 18f6 adds r6, r6, r3 8036552: b2b6 uxth r6, r6 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) 8036554: 2c00 cmp r4, #0 8036556: d195 bne.n 8036484 }; ofs += vb->vlen; vb = vb->next; } return ofs; } 8036558: 4630 mov r0, r6 803655a: bd70 pop {r4, r5, r6, pc} 0803655c : * @param enable switch if 0 destination is disabled >0 enabled. */ void snmp_trap_dst_enable(u8_t dst_idx, u8_t enable) { if (dst_idx < SNMP_TRAP_DESTINATIONS) 803655c: b908 cbnz r0, 8036562 { trap_dst[dst_idx].enable = enable; 803655e: 4b01 ldr r3, [pc, #4] ; (8036564 ) 8036560: 7119 strb r1, [r3, #4] 8036562: 4770 bx lr 8036564: 20010084 .word 0x20010084 08036568 : * @param dst IPv4 address in host order. */ void snmp_trap_dst_ip_set(u8_t dst_idx, ip_addr_t *dst) { if (dst_idx < SNMP_TRAP_DESTINATIONS) 8036568: b918 cbnz r0, 8036572 { ip_addr_set(&trap_dst[dst_idx].dip, dst); 803656a: b101 cbz r1, 803656e 803656c: 6809 ldr r1, [r1, #0] 803656e: 4b01 ldr r3, [pc, #4] ; (8036574 ) 8036570: 6019 str r1, [r3, #0] 8036572: 4770 bx lr 8036574: 20010084 .word 0x20010084 08036578 : * @note the caller is responsible for filling in outvb in the m_stat * and provide error-status and index (except for tooBig errors) ... */ err_t snmp_send_response(struct snmp_msg_pstat *m_stat) { 8036578: b5f0 push {r4, r5, r6, r7, lr} 803657a: 4604 mov r4, r0 803657c: b085 sub sp, #20 struct snmp_varbind_root emptyvb = {NULL, NULL, 0, 0, 0}; 803657e: 220c movs r2, #12 8036580: 2100 movs r1, #0 8036582: a801 add r0, sp, #4 struct pbuf *p; u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); 8036584: f504 7686 add.w r6, r4, #268 ; 0x10c * and provide error-status and index (except for tooBig errors) ... */ err_t snmp_send_response(struct snmp_msg_pstat *m_stat) { struct snmp_varbind_root emptyvb = {NULL, NULL, 0, 0, 0}; 8036588: f7eb fc46 bl 8021e18 struct pbuf *p; u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); 803658c: 4630 mov r0, r6 803658e: f7ff fe89 bl 80362a4 8036592: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 8036594: 4620 mov r0, r4 8036596: f7ff feeb bl 8036370 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 803659a: 2203 movs r2, #3 u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); tot_len = snmp_resp_header_sum(m_stat, tot_len); 803659c: 4601 mov r1, r0 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 803659e: 2000 movs r0, #0 80365a0: f7f9 fbbf bl 802fd22 if (p == NULL) 80365a4: 4605 mov r5, r0 80365a6: b990 cbnz r0, 80365ce { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_snd_response() tooBig\n")); /* can't construct reply, return error-status tooBig */ m_stat->error_status = SNMP_ES_TOOBIG; 80365a8: 2301 movs r3, #1 80365aa: 6123 str r3, [r4, #16] m_stat->error_index = 0; 80365ac: 6160 str r0, [r4, #20] /* pass 0, recalculate lengths, for empty varbind-list */ tot_len = snmp_varbind_list_sum(&emptyvb); 80365ae: a801 add r0, sp, #4 80365b0: f7ff fe78 bl 80362a4 80365b4: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 80365b6: 4620 mov r0, r4 80365b8: f7ff feda bl 8036370 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 80365bc: 2203 movs r2, #3 /* can't construct reply, return error-status tooBig */ m_stat->error_status = SNMP_ES_TOOBIG; m_stat->error_index = 0; /* pass 0, recalculate lengths, for empty varbind-list */ tot_len = snmp_varbind_list_sum(&emptyvb); tot_len = snmp_resp_header_sum(m_stat, tot_len); 80365be: 4601 mov r1, r0 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 80365c0: 4628 mov r0, r5 80365c2: f7f9 fbae bl 802fd22 } if (p != NULL) 80365c6: 4605 mov r5, r0 80365c8: 2800 cmp r0, #0 80365ca: f000 80dc beq.w 8036786 snmp_resp_header_enc(struct snmp_msg_pstat *m_stat, struct pbuf *p) { u16_t ofs; ofs = 0; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 80365ce: 2100 movs r1, #0 80365d0: 2230 movs r2, #48 ; 0x30 80365d2: 4628 mov r0, r5 80365d4: f7fc feb6 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen); 80365d8: 2101 movs r1, #1 80365da: f8b4 212c ldrh.w r2, [r4, #300] ; 0x12c 80365de: 4628 mov r0, r5 80365e0: f7fc fec4 bl 803336c ofs += m_stat->rhl.seqlenlen; 80365e4: f894 711e ldrb.w r7, [r4, #286] ; 0x11e snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80365e8: 2202 movs r2, #2 80365ea: 1c79 adds r1, r7, #1 80365ec: 4628 mov r0, r5 ofs += 1; 80365ee: 3702 adds r7, #2 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen); ofs += m_stat->rhl.seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80365f0: f7fc fea8 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); 80365f4: 4639 mov r1, r7 80365f6: f8b4 212a ldrh.w r2, [r4, #298] ; 0x12a 80365fa: 4628 mov r0, r5 80365fc: f7fc feb6 bl 803336c ofs += m_stat->rhl.verlenlen; 8036600: f894 311d ldrb.w r3, [r4, #285] ; 0x11d snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 8036604: f8b4 212a ldrh.w r2, [r4, #298] ; 0x12a ofs += m_stat->rhl.seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); ofs += m_stat->rhl.verlenlen; 8036608: 18ff adds r7, r7, r3 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 803660a: 4b61 ldr r3, [pc, #388] ; (8036790 ) 803660c: 4639 mov r1, r7 803660e: 681b ldr r3, [r3, #0] 8036610: 4628 mov r0, r5 8036612: f7fc ff33 bl 803347c ofs += m_stat->rhl.verlen; 8036616: f8b4 312a ldrh.w r3, [r4, #298] ; 0x12a 803661a: 18ff adds r7, r7, r3 803661c: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 803661e: 4639 mov r1, r7 ofs += 1; 8036620: 3701 adds r7, #1 snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); ofs += m_stat->rhl.verlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); ofs += m_stat->rhl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 8036622: 2204 movs r2, #4 ofs += 1; 8036624: b2bf uxth r7, r7 snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); ofs += m_stat->rhl.verlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); ofs += m_stat->rhl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 8036626: 4628 mov r0, r5 8036628: f7fc fe8c bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); 803662c: 4639 mov r1, r7 803662e: f8b4 2128 ldrh.w r2, [r4, #296] ; 0x128 8036632: 4628 mov r0, r5 8036634: f7fc fe9a bl 803336c ofs += m_stat->rhl.comlenlen; 8036638: f894 311c ldrb.w r3, [r4, #284] ; 0x11c snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 803663c: f8b4 2128 ldrh.w r2, [r4, #296] ; 0x128 ofs += m_stat->rhl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); ofs += m_stat->rhl.comlenlen; 8036640: 18ff adds r7, r7, r3 8036642: b2bf uxth r7, r7 snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 8036644: 4639 mov r1, r7 8036646: f104 0318 add.w r3, r4, #24 803664a: 4628 mov r0, r5 803664c: f7fc ffb6 bl 80335bc ofs += m_stat->rhl.comlen; 8036650: f8b4 3128 ldrh.w r3, [r4, #296] ; 0x128 8036654: 18ff adds r7, r7, r3 8036656: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 8036658: 4639 mov r1, r7 ofs += 1; 803665a: 3701 adds r7, #1 snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); ofs += m_stat->rhl.comlenlen; snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); ofs += m_stat->rhl.comlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 803665c: 22a2 movs r2, #162 ; 0xa2 ofs += 1; 803665e: b2bf uxth r7, r7 snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); ofs += m_stat->rhl.comlenlen; snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); ofs += m_stat->rhl.comlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 8036660: 4628 mov r0, r5 8036662: f7fc fe6f bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); 8036666: 4639 mov r1, r7 8036668: f8b4 2126 ldrh.w r2, [r4, #294] ; 0x126 803666c: 4628 mov r0, r5 803666e: f7fc fe7d bl 803336c ofs += m_stat->rhl.pdulenlen; 8036672: f894 311b ldrb.w r3, [r4, #283] ; 0x11b 8036676: 18ff adds r7, r7, r3 8036678: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 803667a: 4639 mov r1, r7 ofs += 1; 803667c: 3701 adds r7, #1 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); ofs += m_stat->rhl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 803667e: 2202 movs r2, #2 ofs += 1; 8036680: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); ofs += m_stat->rhl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036682: 4628 mov r0, r5 8036684: f7fc fe5e bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); 8036688: 4639 mov r1, r7 803668a: f8b4 2124 ldrh.w r2, [r4, #292] ; 0x124 803668e: 4628 mov r0, r5 8036690: f7fc fe6c bl 803336c ofs += m_stat->rhl.ridlenlen; 8036694: f894 311a ldrb.w r3, [r4, #282] ; 0x11a snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 8036698: f8b4 2124 ldrh.w r2, [r4, #292] ; 0x124 ofs += m_stat->rhl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); ofs += m_stat->rhl.ridlenlen; 803669c: 18ff adds r7, r7, r3 803669e: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 80366a0: 4639 mov r1, r7 80366a2: 68e3 ldr r3, [r4, #12] 80366a4: 4628 mov r0, r5 80366a6: f7fc fee9 bl 803347c ofs += m_stat->rhl.ridlen; 80366aa: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 80366ae: 18ff adds r7, r7, r3 80366b0: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80366b2: 4639 mov r1, r7 ofs += 1; 80366b4: 3701 adds r7, #1 snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); ofs += m_stat->rhl.ridlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); ofs += m_stat->rhl.ridlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80366b6: 2202 movs r2, #2 ofs += 1; 80366b8: b2bf uxth r7, r7 snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); ofs += m_stat->rhl.ridlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); ofs += m_stat->rhl.ridlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80366ba: 4628 mov r0, r5 80366bc: f7fc fe42 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); 80366c0: 4639 mov r1, r7 80366c2: f8b4 2122 ldrh.w r2, [r4, #290] ; 0x122 80366c6: 4628 mov r0, r5 80366c8: f7fc fe50 bl 803336c ofs += m_stat->rhl.errstatlenlen; 80366cc: f894 3119 ldrb.w r3, [r4, #281] ; 0x119 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 80366d0: f8b4 2122 ldrh.w r2, [r4, #290] ; 0x122 ofs += m_stat->rhl.ridlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); ofs += m_stat->rhl.errstatlenlen; 80366d4: 18ff adds r7, r7, r3 80366d6: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 80366d8: 4639 mov r1, r7 80366da: 6923 ldr r3, [r4, #16] 80366dc: 4628 mov r0, r5 80366de: f7fc fecd bl 803347c ofs += m_stat->rhl.errstatlen; 80366e2: f8b4 3122 ldrh.w r3, [r4, #290] ; 0x122 80366e6: 18ff adds r7, r7, r3 80366e8: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80366ea: 4639 mov r1, r7 ofs += 1; 80366ec: 3701 adds r7, #1 snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); ofs += m_stat->rhl.errstatlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); ofs += m_stat->rhl.errstatlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80366ee: 2202 movs r2, #2 ofs += 1; 80366f0: b2bf uxth r7, r7 snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); ofs += m_stat->rhl.errstatlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); ofs += m_stat->rhl.errstatlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80366f2: 4628 mov r0, r5 80366f4: f7fc fe26 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen); 80366f8: 4639 mov r1, r7 80366fa: f8b4 2120 ldrh.w r2, [r4, #288] ; 0x120 80366fe: 4628 mov r0, r5 8036700: f7fc fe34 bl 803336c ofs += m_stat->rhl.erridxlenlen; 8036704: f894 3118 ldrb.w r3, [r4, #280] ; 0x118 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 8036708: f8b4 2120 ldrh.w r2, [r4, #288] ; 0x120 ofs += m_stat->rhl.errstatlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen); ofs += m_stat->rhl.erridxlenlen; 803670c: 18ff adds r7, r7, r3 803670e: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 8036710: 4639 mov r1, r7 8036712: 6963 ldr r3, [r4, #20] 8036714: 4628 mov r0, r5 8036716: f7fc feb1 bl 803347c ofs += m_stat->rhl.erridxlen; 803671a: f8b4 3120 ldrh.w r3, [r4, #288] ; 0x120 803671e: 18fa adds r2, r7, r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_snd_response() p != NULL\n")); /* pass 1, size error, encode packet ino the pbuf(s) */ ofs = snmp_resp_header_enc(m_stat, p); snmp_varbind_list_enc(&m_stat->outvb, p, ofs); 8036720: 4630 mov r0, r6 8036722: 4629 mov r1, r5 8036724: b292 uxth r2, r2 8036726: f7ff fe9b bl 8036460 switch (m_stat->error_status) 803672a: 6923 ldr r3, [r4, #16] 803672c: 3b01 subs r3, #1 803672e: 2b04 cmp r3, #4 8036730: d80f bhi.n 8036752 8036732: e8df f003 tbb [pc, r3] 8036736: 0603 .short 0x0603 8036738: 0e09 .short 0x0e09 803673a: 0c .byte 0x0c 803673b: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpouttoobigs(); 803673c: f7fe fa0e bl 8034b5c break; 8036740: e007 b.n 8036752 case SNMP_ES_NOSUCHNAME: snmp_inc_snmpoutnosuchnames(); 8036742: f7fe fa13 bl 8034b6c break; 8036746: e004 b.n 8036752 case SNMP_ES_BADVALUE: snmp_inc_snmpoutbadvalues(); 8036748: f7fe fa18 bl 8034b7c break; 803674c: e001 b.n 8036752 case SNMP_ES_GENERROR: snmp_inc_snmpoutgenerrs(); 803674e: f7fe fa1d bl 8034b8c break; } snmp_inc_snmpoutgetresponses(); 8036752: f7fe fa23 bl 8034b9c snmp_inc_snmpoutpkts(); 8036756: f7fe f981 bl 8034a5c /** @todo do we need separate rx and tx pcbs for threaded case? */ /** connect to the originating source */ udp_connect(m_stat->pcb, &m_stat->sip, m_stat->sp); 803675a: 8922 ldrh r2, [r4, #8] 803675c: 6820 ldr r0, [r4, #0] 803675e: 1d21 adds r1, r4, #4 8036760: f7fb ffac bl 80326bc err = udp_send(m_stat->pcb, p); 8036764: 4629 mov r1, r5 8036766: 6820 ldr r0, [r4, #0] 8036768: f7fb ffa3 bl 80326b2 /** @todo release some memory, retry and return tooBig? tooMuchHassle? */ err = ERR_MEM; } else { err = ERR_OK; 803676c: f1b0 3fff cmp.w r0, #4294967295 8036770: bf0c ite eq 8036772: f04f 36ff moveq.w r6, #4294967295 8036776: 2600 movne r6, #0 } /** disassociate remote address and port with this pcb */ udp_disconnect(m_stat->pcb); 8036778: 6820 ldr r0, [r4, #0] 803677a: f7fb ffc5 bl 8032708 pbuf_free(p); 803677e: 4628 mov r0, r5 8036780: f7f9 fa82 bl 802fc88 8036784: e000 b.n 8036788 } else { /* first pbuf alloc try or retry alloc failed very low on memory, couldn't return tooBig */ return ERR_MEM; 8036786: 26ff movs r6, #255 ; 0xff } } 8036788: b270 sxtb r0, r6 803678a: b005 add sp, #20 803678c: bdf0 pop {r4, r5, r6, r7, pc} 803678e: bf00 nop 8036790: 08045068 .word 0x08045068 08036794 : * and .iso.org.dod.internet.private.enterprises.yourenterprise * (sysObjectID) for specific traps. */ err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap) { 8036794: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct pbuf *p; u16_t i,tot_len; for (i=0, td = &trap_dst[0]; ienable != 0) && !ip_addr_isany(&td->dip)) 8036798: 4b11 ldr r3, [pc, #68] ; (80367e0 ) * and .iso.org.dod.internet.private.enterprises.yourenterprise * (sysObjectID) for specific traps. */ err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap) { 803679a: 4617 mov r7, r2 struct pbuf *p; u16_t i,tot_len; for (i=0, td = &trap_dst[0]; ienable != 0) && !ip_addr_isany(&td->dip)) 803679c: 791a ldrb r2, [r3, #4] * and .iso.org.dod.internet.private.enterprises.yourenterprise * (sysObjectID) for specific traps. */ err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap) { 803679e: b085 sub sp, #20 80367a0: 4605 mov r5, r0 80367a2: 460e mov r6, r1 struct pbuf *p; u16_t i,tot_len; for (i=0, td = &trap_dst[0]; ienable != 0) && !ip_addr_isany(&td->dip)) 80367a4: 2a00 cmp r2, #0 80367a6: f000 81b8 beq.w 8036b1a 80367aa: 6818 ldr r0, [r3, #0] 80367ac: 2800 cmp r0, #0 80367ae: f000 81b4 beq.w 8036b1a { /* network order trap destination */ ip_addr_copy(trap_msg.dip, td->dip); 80367b2: 4c0c ldr r4, [pc, #48] ; (80367e4 ) 80367b4: 6060 str r0, [r4, #4] /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); 80367b6: 4618 mov r0, r3 80367b8: f7fc f9f0 bl 8032b9c ip_addr_copy(dst_ip, dst_if->ip_addr); 80367bc: 6843 ldr r3, [r0, #4] /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); trap_msg.sip_raw[2] = ip4_addr3(&dst_ip); trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); trap_msg.gen_trap = generic_trap; 80367be: 6125 str r5, [r4, #16] /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); ip_addr_copy(dst_ip, dst_if->ip_addr); /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); 80367c0: f3c3 2207 ubfx r2, r3, #8, #8 ip_addr_copy(trap_msg.dip, td->dip); /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); ip_addr_copy(dst_ip, dst_if->ip_addr); /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); 80367c4: 7323 strb r3, [r4, #12] trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); 80367c6: 7362 strb r2, [r4, #13] trap_msg.sip_raw[2] = ip4_addr3(&dst_ip); trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); trap_msg.gen_trap = generic_trap; trap_msg.spc_trap = specific_trap; if (generic_trap == SNMP_GENTRAP_ENTERPRISESPC) 80367c8: 2d06 cmp r5, #6 dst_if = ip_route(&td->dip); ip_addr_copy(dst_ip, dst_if->ip_addr); /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); trap_msg.sip_raw[2] = ip4_addr3(&dst_ip); 80367ca: f3c3 4207 ubfx r2, r3, #16, #8 trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 80367ce: f3c3 6307 ubfx r3, r3, #24, #8 dst_if = ip_route(&td->dip); ip_addr_copy(dst_ip, dst_if->ip_addr); /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); trap_msg.sip_raw[2] = ip4_addr3(&dst_ip); 80367d2: 73a2 strb r2, [r4, #14] trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 80367d4: 73e3 strb r3, [r4, #15] trap_msg.gen_trap = generic_trap; trap_msg.spc_trap = specific_trap; 80367d6: 6167 str r7, [r4, #20] if (generic_trap == SNMP_GENTRAP_ENTERPRISESPC) 80367d8: d106 bne.n 80367e8 { /* enterprise-Specific trap */ trap_msg.enterprise = eoid; 80367da: 60a6 str r6, [r4, #8] 80367dc: e008 b.n 80367f0 80367de: bf00 nop 80367e0: 20010084 .word 0x20010084 80367e4: 2001008c .word 0x2001008c } else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); 80367e8: f104 0008 add.w r0, r4, #8 80367ec: f7fe f9e6 bl 8034bbc } snmp_get_sysuptime(&trap_msg.ts); 80367f0: 48bb ldr r0, [pc, #748] ; (8036ae0 ) struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 80367f2: 4cbc ldr r4, [pc, #752] ; (8036ae4 ) else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); } snmp_get_sysuptime(&trap_msg.ts); 80367f4: f7fd fd4c bl 8034290 /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); 80367f8: 48bb ldr r0, [pc, #748] ; (8036ae8 ) 80367fa: f7ff fd53 bl 80362a4 struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 80367fe: f104 0132 add.w r1, r4, #50 ; 0x32 snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); } snmp_get_sysuptime(&trap_msg.ts); /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); 8036802: 4606 mov r6, r0 struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 8036804: 69a0 ldr r0, [r4, #24] 8036806: f7fc fd5b bl 80332c0 snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); 803680a: 8e60 ldrh r0, [r4, #50] ; 0x32 803680c: f104 0128 add.w r1, r4, #40 ; 0x28 8036810: f7fc fd4b bl 80332aa tot_len += 1 + thl->tslen + thl->tslenlen; 8036814: f8b4 c032 ldrh.w ip, [r4, #50] ; 0x32 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8036818: 6960 ldr r0, [r4, #20] 803681a: f8cd c004 str.w ip, [sp, #4] 803681e: f104 0134 add.w r1, r4, #52 ; 0x34 thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); tot_len += 1 + thl->tslen + thl->tslenlen; 8036822: f894 9028 ldrb.w r9, [r4, #40] ; 0x28 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8036826: f7fc fd60 bl 80332ea snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); 803682a: 8ea0 ldrh r0, [r4, #52] ; 0x34 803682c: f104 0129 add.w r1, r4, #41 ; 0x29 8036830: f7fc fd3b bl 80332aa tot_len += 1 + thl->strplen + thl->strplenlen; 8036834: 8ea3 ldrh r3, [r4, #52] ; 0x34 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); 8036836: 6920 ldr r0, [r4, #16] 8036838: 9302 str r3, [sp, #8] 803683a: f104 0136 add.w r1, r4, #54 ; 0x36 snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); tot_len += 1 + thl->tslen + thl->tslenlen; snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; 803683e: f894 8029 ldrb.w r8, [r4, #41] ; 0x29 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; 8036842: 2504 movs r5, #4 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); 8036844: f7fc fd51 bl 80332ea snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); 8036848: 8ee0 ldrh r0, [r4, #54] ; 0x36 803684a: f104 012a add.w r1, r4, #42 ; 0x2a 803684e: f7fc fd2c bl 80332aa tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 8036852: 4628 mov r0, r5 8036854: f104 012b add.w r1, r4, #43 ; 0x2b snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; 8036858: f8b4 b036 ldrh.w fp, [r4, #54] ; 0x36 803685c: f894 702a ldrb.w r7, [r4, #42] ; 0x2a thl->aaddrlen = 4; 8036860: 8725 strh r5, [r4, #56] ; 0x38 snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 8036862: f7fc fd22 bl 80332aa tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 8036866: f894 202b ldrb.w r2, [r4, #43] ; 0x2b snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 803686a: 68a1 ldr r1, [r4, #8] snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 803686c: 9203 str r2, [sp, #12] snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 803686e: f811 0b04 ldrb.w r0, [r1], #4 snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 8036872: f8b4 a038 ldrh.w sl, [r4, #56] ; 0x38 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 8036876: f104 023a add.w r2, r4, #58 ; 0x3a 803687a: f7fc fd4b bl 8033314 snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); 803687e: 8f60 ldrh r0, [r4, #58] ; 0x3a 8036880: f104 012c add.w r1, r4, #44 ; 0x2c 8036884: f7fc fd11 bl 80332aa snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); tot_len += 1 + thl->tslen + thl->tslenlen; snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; 8036888: f8dd c004 ldr.w ip, [sp, #4] 803688c: 9b02 ldr r3, [sp, #8] snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; 803688e: 8f62 ldrh r2, [r4, #58] ; 0x3a snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); tot_len += 1 + thl->tslen + thl->tslenlen; snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; 8036890: 4463 add r3, ip 8036892: 3305 adds r3, #5 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; 8036894: 449b add fp, r3 8036896: 44da add sl, fp 8036898: fa12 fa8a uxtah sl, r2, sl thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 803689c: 44d1 add r9, sl 803689e: 44c8 add r8, r9 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); tot_len += 1 + thl->eidlen + thl->eidlenlen; 80368a0: 9b03 ldr r3, [sp, #12] snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 80368a2: fa17 f788 uxtah r7, r7, r8 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); tot_len += 1 + thl->eidlen + thl->eidlenlen; 80368a6: 19df adds r7, r3, r7 80368a8: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 80368ac: 18ff adds r7, r7, r3 80368ae: fa16 f687 uxtah r6, r6, r7 80368b2: b2b6 uxth r6, r6 thl->pdulen = tot_len; snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 80368b4: 4630 mov r0, r6 80368b6: f104 012d add.w r1, r4, #45 ; 0x2d tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; 80368ba: 2706 movs r7, #6 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); tot_len += 1 + thl->eidlen + thl->eidlenlen; thl->pdulen = tot_len; 80368bc: 87a6 strh r6, [r4, #60] ; 0x3c snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 80368be: f7fc fcf4 bl 80332aa tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 80368c2: 4638 mov r0, r7 80368c4: f104 012e add.w r1, r4, #46 ; 0x2e snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); tot_len += 1 + thl->eidlen + thl->eidlenlen; thl->pdulen = tot_len; snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; 80368c8: f894 a02d ldrb.w sl, [r4, #45] ; 0x2d thl->comlen = sizeof(snmp_publiccommunity) - 1; 80368cc: 87e7 strh r7, [r4, #62] ; 0x3e snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 80368ce: f7fc fcec bl 80332aa tot_len += 1 + thl->comlenlen + thl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 80368d2: 4b86 ldr r3, [pc, #536] ; (8036aec ) snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); tot_len += 1 + thl->comlenlen + thl->comlen; 80368d4: f894 902e ldrb.w r9, [r4, #46] ; 0x2e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 80368d8: f8d3 8000 ldr.w r8, [r3] snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); tot_len += 1 + thl->comlenlen + thl->comlen; 80368dc: f8b4 b03e ldrh.w fp, [r4, #62] ; 0x3e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 80368e0: 4640 mov r0, r8 80368e2: f104 0140 add.w r1, r4, #64 ; 0x40 80368e6: f7fc fd00 bl 80332ea snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); 80368ea: f8b4 0040 ldrh.w r0, [r4, #64] ; 0x40 80368ee: f104 012f add.w r1, r4, #47 ; 0x2f 80368f2: f7fc fcda bl 80332aa snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); tot_len += 1 + thl->comlenlen + thl->comlen; 80368f6: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 80368fa: 449b add fp, r3 80368fc: f10b 0b03 add.w fp, fp, #3 snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); tot_len += 1 + thl->verlen + thl->verlenlen; 8036900: f894 302f ldrb.w r3, [r4, #47] ; 0x2f snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); tot_len += 1 + thl->comlenlen + thl->comlen; 8036904: 44da add sl, fp snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); tot_len += 1 + thl->verlen + thl->verlenlen; 8036906: 44d1 add r9, sl 8036908: 4499 add r9, r3 803690a: fa16 f689 uxtah r6, r6, r9 803690e: b2b6 uxth r6, r6 thl->seqlen = tot_len; snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 8036910: 4630 mov r0, r6 8036912: f104 0130 add.w r1, r4, #48 ; 0x30 snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); tot_len += 1 + thl->verlen + thl->verlenlen; thl->seqlen = tot_len; 8036916: f8a4 6042 strh.w r6, [r4, #66] ; 0x42 snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 803691a: f7fc fcc6 bl 80332aa tot_len += 1 + thl->seqlenlen; 803691e: f894 3030 ldrb.w r3, [r4, #48] ; 0x30 8036922: 3301 adds r3, #1 8036924: 18f1 adds r1, r6, r3 /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); tot_len = snmp_trap_header_sum(&trap_msg, tot_len); /* allocate pbuf(s) */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 8036926: 2000 movs r0, #0 8036928: b289 uxth r1, r1 803692a: 2203 movs r2, #3 803692c: f7f9 f9f9 bl 802fd22 if (p != NULL) 8036930: 4606 mov r6, r0 8036932: 2800 cmp r0, #0 8036934: f000 80f3 beq.w 8036b1e snmp_trap_header_enc(struct snmp_msg_trap *m_trap, struct pbuf *p) { u16_t ofs; ofs = 0; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 8036938: 2100 movs r1, #0 803693a: 2230 movs r2, #48 ; 0x30 803693c: f7fc fd02 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen); 8036940: 2101 movs r1, #1 8036942: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 8036946: 4630 mov r0, r6 8036948: f7fc fd10 bl 803336c ofs += m_trap->thl.seqlenlen; 803694c: f894 9030 ldrb.w r9, [r4, #48] ; 0x30 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036950: 2202 movs r2, #2 8036952: f109 0101 add.w r1, r9, #1 8036956: 4630 mov r0, r6 ofs += 1; 8036958: f109 0902 add.w r9, r9, #2 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen); ofs += m_trap->thl.seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 803695c: f7fc fcf2 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); 8036960: 4649 mov r1, r9 8036962: f8b4 2040 ldrh.w r2, [r4, #64] ; 0x40 8036966: 4630 mov r0, r6 8036968: f7fc fd00 bl 803336c ofs += m_trap->thl.verlenlen; 803696c: f894 302f ldrb.w r3, [r4, #47] ; 0x2f snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 8036970: f8b4 2040 ldrh.w r2, [r4, #64] ; 0x40 ofs += m_trap->thl.seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); ofs += m_trap->thl.verlenlen; 8036974: 4499 add r9, r3 snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 8036976: 4649 mov r1, r9 8036978: 4643 mov r3, r8 803697a: 4630 mov r0, r6 803697c: f7fc fd7e bl 803347c ofs += m_trap->thl.verlen; 8036980: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 8036984: 4499 add r9, r3 8036986: fa1f f989 uxth.w r9, r9 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 803698a: 462a mov r2, r5 ofs += 1; 803698c: f109 0501 add.w r5, r9, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); ofs += m_trap->thl.verlenlen; snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); ofs += m_trap->thl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 8036990: 4649 mov r1, r9 ofs += 1; 8036992: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); ofs += m_trap->thl.verlenlen; snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); ofs += m_trap->thl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 8036994: 4630 mov r0, r6 8036996: f7fc fcd5 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); 803699a: 4629 mov r1, r5 803699c: 8fe2 ldrh r2, [r4, #62] ; 0x3e 803699e: 4630 mov r0, r6 80369a0: f7fc fce4 bl 803336c ofs += m_trap->thl.comlenlen; 80369a4: f894 302e ldrb.w r3, [r4, #46] ; 0x2e snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 80369a8: 8fe2 ldrh r2, [r4, #62] ; 0x3e ofs += m_trap->thl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); ofs += m_trap->thl.comlenlen; 80369aa: 18ed adds r5, r5, r3 80369ac: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 80369ae: 4629 mov r1, r5 80369b0: 4b4f ldr r3, [pc, #316] ; (8036af0 ) 80369b2: 4630 mov r0, r6 80369b4: f7fc fe02 bl 80335bc ofs += m_trap->thl.comlen; 80369b8: 8fe3 ldrh r3, [r4, #62] ; 0x3e 80369ba: 18ed adds r5, r5, r3 80369bc: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 80369be: 4629 mov r1, r5 ofs += 1; 80369c0: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); ofs += m_trap->thl.comlenlen; snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); ofs += m_trap->thl.comlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 80369c2: 22a4 movs r2, #164 ; 0xa4 ofs += 1; 80369c4: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); ofs += m_trap->thl.comlenlen; snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); ofs += m_trap->thl.comlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 80369c6: 4630 mov r0, r6 80369c8: f7fc fcbc bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); 80369cc: 4629 mov r1, r5 80369ce: 8fa2 ldrh r2, [r4, #60] ; 0x3c 80369d0: 4630 mov r0, r6 80369d2: f7fc fccb bl 803336c ofs += m_trap->thl.pdulenlen; 80369d6: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 80369da: 18ed adds r5, r5, r3 80369dc: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 80369de: 4629 mov r1, r5 ofs += 1; 80369e0: 3501 adds r5, #1 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); ofs += m_trap->thl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 80369e2: 463a mov r2, r7 ofs += 1; 80369e4: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); ofs += m_trap->thl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 80369e6: 4630 mov r0, r6 80369e8: f7fc fcac bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); 80369ec: 4629 mov r1, r5 80369ee: 8f62 ldrh r2, [r4, #58] ; 0x3a 80369f0: 4630 mov r0, r6 80369f2: f7fc fcbb bl 803336c ofs += m_trap->thl.eidlenlen; 80369f6: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 80369fa: 18ed adds r5, r5, r3 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 80369fc: 68a3 ldr r3, [r4, #8] ofs += m_trap->thl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); ofs += m_trap->thl.eidlenlen; 80369fe: b2ad uxth r5, r5 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 8036a00: 4629 mov r1, r5 8036a02: f813 2b04 ldrb.w r2, [r3], #4 8036a06: 4630 mov r0, r6 8036a08: f7fc fd65 bl 80334d6 ofs += m_trap->thl.eidlen; 8036a0c: 8f63 ldrh r3, [r4, #58] ; 0x3a 8036a0e: 18ed adds r5, r5, r3 8036a10: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 8036a12: 4629 mov r1, r5 ofs += 1; 8036a14: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); ofs += m_trap->thl.eidlenlen; snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); ofs += m_trap->thl.eidlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 8036a16: 2240 movs r2, #64 ; 0x40 ofs += 1; 8036a18: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); ofs += m_trap->thl.eidlenlen; snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); ofs += m_trap->thl.eidlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 8036a1a: 4630 mov r0, r6 8036a1c: f7fc fc92 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); 8036a20: 4629 mov r1, r5 8036a22: 8f22 ldrh r2, [r4, #56] ; 0x38 8036a24: 4630 mov r0, r6 8036a26: f7fc fca1 bl 803336c ofs += m_trap->thl.aaddrlenlen; 8036a2a: f894 302b ldrb.w r3, [r4, #43] ; 0x2b snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 8036a2e: 8f22 ldrh r2, [r4, #56] ; 0x38 ofs += m_trap->thl.eidlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); ofs += m_trap->thl.aaddrlenlen; 8036a30: 18ed adds r5, r5, r3 8036a32: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 8036a34: 4629 mov r1, r5 8036a36: f104 030c add.w r3, r4, #12 8036a3a: 4630 mov r0, r6 8036a3c: f7fc fdbe bl 80335bc ofs += m_trap->thl.aaddrlen; 8036a40: 8f23 ldrh r3, [r4, #56] ; 0x38 8036a42: 18ed adds r5, r5, r3 8036a44: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036a46: 4629 mov r1, r5 ofs += 1; 8036a48: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); ofs += m_trap->thl.aaddrlenlen; snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); ofs += m_trap->thl.aaddrlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036a4a: 2202 movs r2, #2 ofs += 1; 8036a4c: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); ofs += m_trap->thl.aaddrlenlen; snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); ofs += m_trap->thl.aaddrlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036a4e: 4630 mov r0, r6 8036a50: f7fc fc78 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); 8036a54: 4629 mov r1, r5 8036a56: 8ee2 ldrh r2, [r4, #54] ; 0x36 8036a58: 4630 mov r0, r6 8036a5a: f7fc fc87 bl 803336c ofs += m_trap->thl.gtrplenlen; 8036a5e: f894 302a ldrb.w r3, [r4, #42] ; 0x2a snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 8036a62: 8ee2 ldrh r2, [r4, #54] ; 0x36 ofs += m_trap->thl.aaddrlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); ofs += m_trap->thl.gtrplenlen; 8036a64: 18ed adds r5, r5, r3 8036a66: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 8036a68: 4629 mov r1, r5 8036a6a: 6923 ldr r3, [r4, #16] 8036a6c: 4630 mov r0, r6 8036a6e: f7fc fcc5 bl 80333fc ofs += m_trap->thl.gtrplen; 8036a72: 8ee3 ldrh r3, [r4, #54] ; 0x36 8036a74: 18ed adds r5, r5, r3 8036a76: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036a78: 4629 mov r1, r5 ofs += 1; 8036a7a: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); ofs += m_trap->thl.gtrplenlen; snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); ofs += m_trap->thl.gtrplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036a7c: 2202 movs r2, #2 ofs += 1; 8036a7e: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); ofs += m_trap->thl.gtrplenlen; snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); ofs += m_trap->thl.gtrplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8036a80: 4630 mov r0, r6 8036a82: f7fc fc5f bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); 8036a86: 4629 mov r1, r5 8036a88: 8ea2 ldrh r2, [r4, #52] ; 0x34 8036a8a: 4630 mov r0, r6 8036a8c: f7fc fc6e bl 803336c ofs += m_trap->thl.strplenlen; 8036a90: f894 3029 ldrb.w r3, [r4, #41] ; 0x29 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 8036a94: 8ea2 ldrh r2, [r4, #52] ; 0x34 ofs += m_trap->thl.gtrplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); ofs += m_trap->thl.strplenlen; 8036a96: 18ed adds r5, r5, r3 8036a98: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 8036a9a: 4629 mov r1, r5 8036a9c: 6963 ldr r3, [r4, #20] 8036a9e: 4630 mov r0, r6 8036aa0: f7fc fcac bl 80333fc ofs += m_trap->thl.strplen; 8036aa4: 8ea3 ldrh r3, [r4, #52] ; 0x34 8036aa6: 18ed adds r5, r5, r3 8036aa8: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 8036aaa: 4629 mov r1, r5 ofs += 1; 8036aac: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); ofs += m_trap->thl.strplenlen; snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); ofs += m_trap->thl.strplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 8036aae: 2243 movs r2, #67 ; 0x43 ofs += 1; 8036ab0: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); ofs += m_trap->thl.strplenlen; snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); ofs += m_trap->thl.strplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 8036ab2: 4630 mov r0, r6 8036ab4: f7fc fc46 bl 8033344 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen); 8036ab8: 4629 mov r1, r5 8036aba: 8e62 ldrh r2, [r4, #50] ; 0x32 8036abc: 4630 mov r0, r6 8036abe: f7fc fc55 bl 803336c ofs += m_trap->thl.tslenlen; 8036ac2: f894 3028 ldrb.w r3, [r4, #40] ; 0x28 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 8036ac6: 8e62 ldrh r2, [r4, #50] ; 0x32 ofs += m_trap->thl.strplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen); ofs += m_trap->thl.tslenlen; 8036ac8: 18ed adds r5, r5, r3 8036aca: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 8036acc: 4629 mov r1, r5 8036ace: 69a3 ldr r3, [r4, #24] 8036ad0: 4630 mov r0, r6 8036ad2: f7fc fc93 bl 80333fc ofs += m_trap->thl.tslen; 8036ad6: 8e63 ldrh r3, [r4, #50] ; 0x32 8036ad8: 18ea adds r2, r5, r3 { u16_t ofs; /* pass 1, encode packet ino the pbuf(s) */ ofs = snmp_trap_header_enc(&trap_msg, p); snmp_varbind_list_enc(&trap_msg.outvb, p, ofs); 8036ada: 4631 mov r1, r6 8036adc: e00a b.n 8036af4 8036ade: bf00 nop 8036ae0: 200100a4 .word 0x200100a4 8036ae4: 2001008c .word 0x2001008c 8036ae8: 200100a8 .word 0x200100a8 8036aec: 08045068 .word 0x08045068 8036af0: 0804506c .word 0x0804506c 8036af4: b292 uxth r2, r2 8036af6: f104 001c add.w r0, r4, #28 8036afa: f7ff fcb1 bl 8036460 snmp_inc_snmpouttraps(); 8036afe: f7fe f855 bl 8034bac snmp_inc_snmpoutpkts(); 8036b02: f7fd ffab bl 8034a5c /** send to the TRAP destination */ udp_sendto(trap_msg.pcb, p, &trap_msg.dip, SNMP_TRAP_PORT); 8036b06: 4622 mov r2, r4 8036b08: 4631 mov r1, r6 8036b0a: f852 0b04 ldr.w r0, [r2], #4 8036b0e: 23a2 movs r3, #162 ; 0xa2 8036b10: f7fb fdbb bl 803268a pbuf_free(p); 8036b14: 4630 mov r0, r6 8036b16: f7f9 f8b7 bl 802fc88 { return ERR_MEM; } } } return ERR_OK; 8036b1a: 2000 movs r0, #0 8036b1c: e000 b.n 8036b20 pbuf_free(p); } else { return ERR_MEM; 8036b1e: 20ff movs r0, #255 ; 0xff } } } return ERR_OK; } 8036b20: b240 sxtb r0, r0 8036b22: b005 add sp, #20 8036b24: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08036b28 : snmp_send_trap(SNMP_GENTRAP_COLDSTART, NULL, 0); } void snmp_authfail_trap(void) { 8036b28: b507 push {r0, r1, r2, lr} u8_t enable; snmp_get_snmpenableauthentraps(&enable); 8036b2a: f10d 0007 add.w r0, sp, #7 8036b2e: f7fe f84b bl 8034bc8 if (enable == 1) 8036b32: f89d 3007 ldrb.w r3, [sp, #7] 8036b36: 2b01 cmp r3, #1 8036b38: d109 bne.n 8036b4e { trap_msg.outvb.head = NULL; 8036b3a: 2100 movs r1, #0 8036b3c: 4b04 ldr r3, [pc, #16] ; (8036b50 ) trap_msg.outvb.tail = NULL; trap_msg.outvb.count = 0; snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 8036b3e: 2004 movs r0, #4 8036b40: 460a mov r2, r1 { u8_t enable; snmp_get_snmpenableauthentraps(&enable); if (enable == 1) { trap_msg.outvb.head = NULL; 8036b42: 61d9 str r1, [r3, #28] trap_msg.outvb.tail = NULL; 8036b44: 6219 str r1, [r3, #32] trap_msg.outvb.count = 0; 8036b46: f883 1024 strb.w r1, [r3, #36] ; 0x24 snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 8036b4a: f7ff fe23 bl 8036794 } } 8036b4e: bd0e pop {r1, r2, r3, pc} 8036b50: 2001008c .word 0x2001008c 08036b54 : * @params dst the destination MAC address to be copied into the ethernet header * @return ERR_OK if the packet was sent, any other err_t on failure */ static err_t etharp_send_ip(struct netif *netif, struct pbuf *p, struct eth_addr *src, struct eth_addr *dst) { 8036b54: b5f8 push {r3, r4, r5, r6, r7, lr} struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; 8036b56: 684c ldr r4, [r1, #4] * @params dst the destination MAC address to be copied into the ethernet header * @return ERR_OK if the packet was sent, any other err_t on failure */ static err_t etharp_send_ip(struct netif *netif, struct pbuf *p, struct eth_addr *src, struct eth_addr *dst) { 8036b58: 4606 mov r6, r0 8036b5a: 460d mov r5, r1 8036b5c: 4617 mov r7, r2 struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; LWIP_ASSERT("netif->hwaddr_len must be the same as ETHARP_HWADDR_LEN for etharp!", (netif->hwaddr_len == ETHARP_HWADDR_LEN)); ETHADDR32_COPY(ðhdr->dest, dst); 8036b5e: 4619 mov r1, r3 8036b60: 2206 movs r2, #6 8036b62: 4620 mov r0, r4 8036b64: f7eb f89e bl 8021ca4 ETHADDR16_COPY(ðhdr->src, src); 8036b68: 4639 mov r1, r7 8036b6a: 1da0 adds r0, r4, #6 8036b6c: 2206 movs r2, #6 8036b6e: f7eb f899 bl 8021ca4 ethhdr->type = PP_HTONS(ETHTYPE_IP); 8036b72: 2308 movs r3, #8 8036b74: 7323 strb r3, [r4, #12] 8036b76: 2300 movs r3, #0 8036b78: 7363 strb r3, [r4, #13] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_send_ip: sending packet %p\n", (void *)p)); /* send the packet */ return netif->linkoutput(netif, p); 8036b7a: 69b3 ldr r3, [r6, #24] 8036b7c: 4630 mov r0, r6 8036b7e: 4629 mov r1, r5 8036b80: 4798 blx r3 } 8036b82: bdf8 pop {r3, r4, r5, r6, r7, pc} 08036b84 : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 8036b84: b570 push {r4, r5, r6, lr} /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8036b86: 4d0b ldr r5, [pc, #44] ; (8036bb4 ) 8036b88: 2414 movs r4, #20 8036b8a: 4344 muls r4, r0 8036b8c: 1929 adds r1, r5, r4 #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 8036b8e: 4606 mov r6, r0 /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8036b90: 3104 adds r1, #4 8036b92: 6848 ldr r0, [r1, #4] 8036b94: f7fd fc56 bl 8034444 /* and empty packet queue */ if (arp_table[i].q != NULL) { 8036b98: 5928 ldr r0, [r5, r4] 8036b9a: b118 cbz r0, 8036ba4 /* remove all queued packets */ LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_free_entry: freeing entry %"U16_F", packet queue %p.\n", (u16_t)i, (void *)(arp_table[i].q))); free_etharp_q(arp_table[i].q); 8036b9c: f7f9 f874 bl 802fc88 arp_table[i].q = NULL; 8036ba0: 2300 movs r3, #0 8036ba2: 512b str r3, [r5, r4] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8036ba4: 2314 movs r3, #20 8036ba6: fb03 5506 mla r5, r3, r6, r5 8036baa: 2300 movs r3, #0 8036bac: 74ab strb r3, [r5, #18] 8036bae: 3510 adds r5, #16 8036bb0: bd70 pop {r4, r5, r6, pc} 8036bb2: bf00 nop 8036bb4: 2000c754 .word 0x2000c754 08036bb8 : * @return The ARP entry index that matched or is created, ERR_MEM if no * entry is found or could be recycled. */ static s8_t etharp_find_entry(ip_addr_t *ipaddr, u8_t flags) { 8036bb8: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} s8_t empty = ARP_TABLE_SIZE; u8_t i = 0, age_pending = 0, age_stable = 0; /* oldest entry with packets on queue */ s8_t old_queue = ARP_TABLE_SIZE; /* its age */ u8_t age_queue = 0; 8036bbc: 2500 movs r5, #0 { s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; s8_t empty = ARP_TABLE_SIZE; u8_t i = 0, age_pending = 0, age_stable = 0; /* oldest entry with packets on queue */ s8_t old_queue = ARP_TABLE_SIZE; 8036bbe: 240a movs r4, #10 8036bc0: 4a35 ldr r2, [pc, #212] ; (8036c98 ) * @return The ARP entry index that matched or is created, ERR_MEM if no * entry is found or could be recycled. */ static s8_t etharp_find_entry(ip_addr_t *ipaddr, u8_t flags) { 8036bc2: 9101 str r1, [sp, #4] 8036bc4: 4606 mov r6, r0 s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; s8_t empty = ARP_TABLE_SIZE; u8_t i = 0, age_pending = 0, age_stable = 0; 8036bc6: 46a8 mov r8, r5 8036bc8: 46aa mov sl, r5 * 4) remember the oldest pending entry with queued packets (if any) * 5) search for a matching IP entry, either pending or stable * until 5 matches, or all entries are searched for. */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8036bca: 462b mov r3, r5 */ static s8_t etharp_find_entry(ip_addr_t *ipaddr, u8_t flags) { s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; s8_t empty = ARP_TABLE_SIZE; 8036bcc: 4627 mov r7, r4 * entry is found or could be recycled. */ static s8_t etharp_find_entry(ip_addr_t *ipaddr, u8_t flags) { s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; 8036bce: 46a4 mov ip, r4 8036bd0: 46a3 mov fp, r4 */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; /* no empty entry found yet and now we do find one? */ if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { 8036bd2: 2f0a cmp r7, #10 * 5) search for a matching IP entry, either pending or stable * until 5 matches, or all entries are searched for. */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; 8036bd4: f892 9012 ldrb.w r9, [r2, #18] /* no empty entry found yet and now we do find one? */ if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { 8036bd8: d104 bne.n 8036be4 8036bda: f1b9 0f00 cmp.w r9, #0 8036bde: d104 bne.n 8036bea LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); /* remember first empty entry */ empty = i; 8036be0: b2df uxtb r7, r3 8036be2: e023 b.n 8036c2c } else if (state != ETHARP_STATE_EMPTY) { 8036be4: f1b9 0f00 cmp.w r9, #0 8036be8: d020 beq.n 8036c2c LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE); /* if given, does IP address match IP address in ARP entry? */ if (ipaddr && ip_addr_cmp(ipaddr, &arp_table[i].ipaddr)) { 8036bea: b12e cbz r6, 8036bf8 8036bec: 6830 ldr r0, [r6, #0] 8036bee: 6851 ldr r1, [r2, #4] 8036bf0: 4288 cmp r0, r1 8036bf2: d101 bne.n 8036bf8 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %"U16_F"\n", (u16_t)i)); /* found exact IP address match, simply bail out */ return i; 8036bf4: 4618 mov r0, r3 8036bf6: e04b b.n 8036c90 } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 8036bf8: f1b9 0f01 cmp.w r9, #1 8036bfc: d10e bne.n 8036c1c /* pending with queued packets? */ if (arp_table[i].q != NULL) { 8036bfe: 6810 ldr r0, [r2, #0] if (arp_table[i].ctime >= age_queue) { 8036c00: f892 9013 ldrb.w r9, [r2, #19] return i; } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { /* pending with queued packets? */ if (arp_table[i].q != NULL) { 8036c04: b120 cbz r0, 8036c10 if (arp_table[i].ctime >= age_queue) { 8036c06: 45a9 cmp r9, r5 8036c08: d310 bcc.n 8036c2c old_queue = i; 8036c0a: b2dc uxtb r4, r3 8036c0c: 464d mov r5, r9 8036c0e: e00d b.n 8036c2c age_queue = arp_table[i].ctime; } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 8036c10: 45d1 cmp r9, sl 8036c12: d30b bcc.n 8036c2c old_pending = i; 8036c14: fa5f fb83 uxtb.w fp, r3 8036c18: 46ca mov sl, r9 8036c1a: e007 b.n 8036c2c age_pending = arp_table[i].ctime; } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 8036c1c: d906 bls.n 8036c2c /* don't record old_stable for static entries since they never expire */ if (state < ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* remember entry with oldest stable entry in oldest, its age in maxtime */ if (arp_table[i].ctime >= age_stable) { 8036c1e: f892 9013 ldrb.w r9, [r2, #19] 8036c22: 45c1 cmp r9, r8 old_stable = i; 8036c24: bf24 itt cs 8036c26: fa5f fc83 uxtbcs.w ip, r3 8036c2a: 46c8 movcs r8, r9 * 4) remember the oldest pending entry with queued packets (if any) * 5) search for a matching IP entry, either pending or stable * until 5 matches, or all entries are searched for. */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8036c2c: 3301 adds r3, #1 8036c2e: b2db uxtb r3, r3 8036c30: 3214 adds r2, #20 8036c32: 2b0a cmp r3, #10 8036c34: d1cd bne.n 8036bd2 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 8036c36: 9a01 ldr r2, [sp, #4] 8036c38: f002 0302 and.w r3, r2, #2 8036c3c: b2db uxtb r3, r3 8036c3e: bb33 cbnz r3, 8036c8e 8036c40: 2f0a cmp r7, #10 8036c42: d102 bne.n 8036c4a /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 8036c44: 07d3 lsls r3, r2, #31 8036c46: d402 bmi.n 8036c4e 8036c48: e021 b.n 8036c8e * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { i = empty; 8036c4a: b2fc uxtb r4, r7 8036c4c: e011 b.n 8036c72 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %"U16_F"\n", (u16_t)i)); } else { /* 2) found recyclable stable entry? */ if (old_stable < ARP_TABLE_SIZE) { 8036c4e: f1bc 0f0a cmp.w ip, #10 8036c52: d002 beq.n 8036c5a /* recycle oldest stable*/ i = old_stable; 8036c54: fa5f f48c uxtb.w r4, ip 8036c58: e008 b.n 8036c6c LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %"U16_F"\n", (u16_t)i)); /* no queued packets should exist on stable entries */ LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL); /* 3) found recyclable pending entry without queued packets? */ } else if (old_pending < ARP_TABLE_SIZE) { 8036c5a: f1bb 0f0a cmp.w fp, #10 8036c5e: d002 beq.n 8036c66 /* recycle oldest pending */ i = old_pending; 8036c60: fa5f f48b uxtb.w r4, fp 8036c64: e002 b.n 8036c6c LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F" (without queue)\n", (u16_t)i)); /* 4) found recyclable pending entry with queued packets? */ } else if (old_queue < ARP_TABLE_SIZE) { 8036c66: 2c0a cmp r4, #10 8036c68: d011 beq.n 8036c8e /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 8036c6a: b2e4 uxtb r4, r4 return (s8_t)ERR_MEM; } /* { empty or recyclable entry found } */ LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); etharp_free_entry(i); 8036c6c: 4620 mov r0, r4 8036c6e: f7ff ff89 bl 8036b84 8036c72: 4b09 ldr r3, [pc, #36] ; (8036c98 ) LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", arp_table[i].state == ETHARP_STATE_EMPTY); /* IP address given? */ if (ipaddr != NULL) { 8036c74: b126 cbz r6, 8036c80 /* set IP address */ ip_addr_copy(arp_table[i].ipaddr, *ipaddr); 8036c76: 2214 movs r2, #20 8036c78: 6831 ldr r1, [r6, #0] 8036c7a: fb02 3204 mla r2, r2, r4, r3 8036c7e: 6051 str r1, [r2, #4] } arp_table[i].ctime = 0; 8036c80: 2214 movs r2, #20 8036c82: fb02 3304 mla r3, r2, r4, r3 8036c86: 2200 movs r2, #0 8036c88: 74da strb r2, [r3, #19] return (err_t)i; 8036c8a: 4620 mov r0, r4 8036c8c: e000 b.n 8036c90 /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n")); return (s8_t)ERR_MEM; 8036c8e: 20ff movs r0, #255 ; 0xff /* set IP address */ ip_addr_copy(arp_table[i].ipaddr, *ipaddr); } arp_table[i].ctime = 0; return (err_t)i; } 8036c90: b240 sxtb r0, r0 8036c92: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8036c96: bf00 nop 8036c98: 2000c754 .word 0x2000c754 08036c9c : * This function should be called every ETHARP_TMR_INTERVAL milliseconds (5 seconds), * in order to expire entries in the ARP table. */ void etharp_tmr(void) { 8036c9c: b570 push {r4, r5, r6, lr} 8036c9e: 4c0d ldr r4, [pc, #52] ; (8036cd4 ) 8036ca0: 2500 movs r5, #0 etharp_free_entry(i); } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING) { /* Reset state to stable, so that the next transmitted packet will re-send an ARP request. */ arp_table[i].state = ETHARP_STATE_STABLE; 8036ca2: 2602 movs r6, #2 LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); /* remove expired entries from the ARP table */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; if (state != ETHARP_STATE_EMPTY 8036ca4: 7ca3 ldrb r3, [r4, #18] 8036ca6: b183 cbz r3, 8036cca #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 8036ca8: 7ce2 ldrb r2, [r4, #19] 8036caa: 3201 adds r2, #1 8036cac: b2d2 uxtb r2, r2 if ((arp_table[i].ctime >= ARP_MAXAGE) || 8036cae: 2aef cmp r2, #239 ; 0xef if (state != ETHARP_STATE_EMPTY #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 8036cb0: 74e2 strb r2, [r4, #19] if ((arp_table[i].ctime >= ARP_MAXAGE) || 8036cb2: d803 bhi.n 8036cbc 8036cb4: 2b01 cmp r3, #1 8036cb6: d105 bne.n 8036cc4 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8036cb8: 2a01 cmp r2, #1 8036cba: d906 bls.n 8036cca (arp_table[i].ctime >= ARP_MAXPENDING))) { /* pending or stable entry has become old! */ LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %"U16_F".\n", arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", (u16_t)i)); /* clean up entries that have just been expired */ etharp_free_entry(i); 8036cbc: 4628 mov r0, r5 8036cbe: f7ff ff61 bl 8036b84 8036cc2: e002 b.n 8036cca } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING) { 8036cc4: 2b03 cmp r3, #3 /* Reset state to stable, so that the next transmitted packet will re-send an ARP request. */ arp_table[i].state = ETHARP_STATE_STABLE; 8036cc6: bf08 it eq 8036cc8: 74a6 strbeq r6, [r4, #18] 8036cca: 3501 adds r5, #1 8036ccc: 3414 adds r4, #20 { u8_t i; LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); /* remove expired entries from the ARP table */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8036cce: 2d0a cmp r5, #10 8036cd0: d1e8 bne.n 8036ca4 /* resend an ARP query here? */ } #endif /* ARP_QUEUEING */ } } } 8036cd2: bd70 pop {r4, r5, r6, pc} 8036cd4: 2000c754 .word 0x2000c754 08036cd8 : * Remove all ARP table entries of the specified netif. * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 8036cd8: b570 push {r4, r5, r6, lr} 8036cda: 4d08 ldr r5, [pc, #32] ; (8036cfc ) 8036cdc: 4606 mov r6, r0 8036cde: 2400 movs r4, #0 u8_t i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { 8036ce0: 7cab ldrb r3, [r5, #18] 8036ce2: b12b cbz r3, 8036cf0 8036ce4: 68ab ldr r3, [r5, #8] 8036ce6: 42b3 cmp r3, r6 8036ce8: d102 bne.n 8036cf0 etharp_free_entry(i); 8036cea: 4620 mov r0, r4 8036cec: f7ff ff4a bl 8036b84 8036cf0: 3401 adds r4, #1 8036cf2: 3514 adds r5, #20 */ void etharp_cleanup_netif(struct netif *netif) { u8_t i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8036cf4: 2c0a cmp r4, #10 8036cf6: d1f3 bne.n 8036ce0 u8_t state = arp_table[i].state; if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { etharp_free_entry(i); } } } 8036cf8: bd70 pop {r4, r5, r6, pc} 8036cfa: bf00 nop 8036cfc: 2000c754 .word 0x2000c754 08036d00 : * @return table index if found, -1 otherwise */ s8_t etharp_find_addr(struct netif *netif, ip_addr_t *ipaddr, struct eth_addr **eth_ret, ip_addr_t **ip_ret) { 8036d00: b5f8 push {r3, r4, r5, r6, r7, lr} LWIP_ASSERT("eth_ret != NULL && ip_ret != NULL", eth_ret != NULL && ip_ret != NULL); LWIP_UNUSED_ARG(netif); i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY); 8036d02: 4608 mov r0, r1 8036d04: 2102 movs r1, #2 * @return table index if found, -1 otherwise */ s8_t etharp_find_addr(struct netif *netif, ip_addr_t *ipaddr, struct eth_addr **eth_ret, ip_addr_t **ip_ret) { 8036d06: 4616 mov r6, r2 8036d08: 461f mov r7, r3 LWIP_ASSERT("eth_ret != NULL && ip_ret != NULL", eth_ret != NULL && ip_ret != NULL); LWIP_UNUSED_ARG(netif); i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY); 8036d0a: f7ff ff55 bl 8036bb8 if((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { 8036d0e: 2800 cmp r0, #0 8036d10: db0c blt.n 8036d2c 8036d12: 2414 movs r4, #20 8036d14: 4d07 ldr r5, [pc, #28] ; (8036d34 ) 8036d16: 4344 muls r4, r0 8036d18: 1929 adds r1, r5, r4 8036d1a: 7c8b ldrb r3, [r1, #18] 8036d1c: 2b01 cmp r3, #1 8036d1e: d905 bls.n 8036d2c *eth_ret = &arp_table[i].ethaddr; 8036d20: 460c mov r4, r1 8036d22: 340c adds r4, #12 *ip_ret = &arp_table[i].ipaddr; 8036d24: 3104 adds r1, #4 LWIP_UNUSED_ARG(netif); i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY); if((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { *eth_ret = &arp_table[i].ethaddr; 8036d26: 6034 str r4, [r6, #0] *ip_ret = &arp_table[i].ipaddr; 8036d28: 6039 str r1, [r7, #0] return i; 8036d2a: e000 b.n 8036d2e } return -1; 8036d2c: 20ff movs r0, #255 ; 0xff } 8036d2e: b240 sxtb r0, r0 8036d30: bdf8 pop {r3, r4, r5, r6, r7, pc} 8036d32: bf00 nop 8036d34: 2000c754 .word 0x2000c754 08036d38 : * ERR_MEM if the ARP packet couldn't be allocated * any other err_t on failure */ err_t etharp_request(struct netif *netif, ip_addr_t *ipaddr) { 8036d38: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} #endif /* LWIP_AUTOIP */ LWIP_ASSERT("netif != NULL", netif != NULL); /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_RAW, SIZEOF_ETHARP_PACKET, PBUF_RAM); 8036d3c: 2200 movs r2, #0 * ERR_MEM if the ARP packet couldn't be allocated * any other err_t on failure */ err_t etharp_request(struct netif *netif, ip_addr_t *ipaddr) { 8036d3e: 4606 mov r6, r0 8036d40: 4688 mov r8, r1 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, ðbroadcast, (struct eth_addr *)netif->hwaddr, &netif->ip_addr, ðzero, 8036d42: f100 0727 add.w r7, r0, #39 ; 0x27 8036d46: f100 0904 add.w r9, r0, #4 #endif /* LWIP_AUTOIP */ LWIP_ASSERT("netif != NULL", netif != NULL); /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_RAW, SIZEOF_ETHARP_PACKET, PBUF_RAM); 8036d4a: 212a movs r1, #42 ; 0x2a 8036d4c: 2003 movs r0, #3 8036d4e: f7f8 ffe8 bl 802fd22 /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 8036d52: 4605 mov r5, r0 8036d54: 2800 cmp r0, #0 8036d56: d03c beq.n 8036dd2 return ERR_MEM; } LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", (p->len >= SIZEOF_ETHARP_PACKET)); ethhdr = (struct eth_hdr *)p->payload; 8036d58: 6844 ldr r4, [r0, #4] hdr = (struct etharp_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = htons(opcode); 8036d5a: 2001 movs r0, #1 8036d5c: f7f7 fe56 bl 802ea0c * 'sender IP address' MUST be sent using link-layer broadcast instead of * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ ethdst_hwaddr = ip_addr_islinklocal(ipsrc_addr) ? (u8_t*)(ethbroadcast.addr) : ethdst_addr->addr; #endif /* LWIP_AUTOIP */ /* Write the ARP MAC-Addresses */ ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); 8036d60: 4639 mov r1, r7 (p->len >= SIZEOF_ETHARP_PACKET)); ethhdr = (struct eth_hdr *)p->payload; hdr = (struct etharp_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = htons(opcode); 8036d62: 82a0 strh r0, [r4, #20] * 'sender IP address' MUST be sent using link-layer broadcast instead of * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ ethdst_hwaddr = ip_addr_islinklocal(ipsrc_addr) ? (u8_t*)(ethbroadcast.addr) : ethdst_addr->addr; #endif /* LWIP_AUTOIP */ /* Write the ARP MAC-Addresses */ ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); 8036d64: 2206 movs r2, #6 8036d66: f104 0016 add.w r0, r4, #22 8036d6a: f7ea ff9b bl 8021ca4 ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); 8036d6e: 2206 movs r2, #6 8036d70: f104 0020 add.w r0, r4, #32 8036d74: 4919 ldr r1, [pc, #100] ; (8036ddc ) 8036d76: f7ea ff95 bl 8021ca4 /* Write the Ethernet MAC-Addresses */ #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, ethdst_addr); 8036d7a: 2206 movs r2, #6 8036d7c: 4620 mov r0, r4 8036d7e: 4918 ldr r1, [pc, #96] ; (8036de0 ) 8036d80: f7ea ff90 bl 8021ca4 #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->src, ethsrc_addr); 8036d84: 1da0 adds r0, r4, #6 8036d86: 4639 mov r1, r7 8036d88: 2206 movs r2, #6 8036d8a: f7ea ff8b bl 8021ca4 /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without * structure packing. */ IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); 8036d8e: 4649 mov r1, r9 8036d90: 2204 movs r2, #4 8036d92: f104 001c add.w r0, r4, #28 8036d96: f7ea ff85 bl 8021ca4 IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); 8036d9a: 4641 mov r1, r8 8036d9c: 2204 movs r2, #4 8036d9e: f104 0026 add.w r0, r4, #38 ; 0x26 8036da2: f7ea ff7f bl 8021ca4 hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); 8036da6: 2300 movs r3, #0 8036da8: 2201 movs r2, #1 8036daa: 73a3 strb r3, [r4, #14] 8036dac: 73e2 strb r2, [r4, #15] hdr->proto = PP_HTONS(ETHTYPE_IP); 8036dae: 7463 strb r3, [r4, #17] 8036db0: 2208 movs r2, #8 /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; 8036db2: 2306 movs r3, #6 hdr->protolen = sizeof(ip_addr_t); 8036db4: 2104 movs r1, #4 * structure packing. */ IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); hdr->proto = PP_HTONS(ETHTYPE_IP); 8036db6: 7422 strb r2, [r4, #16] /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; hdr->protolen = sizeof(ip_addr_t); 8036db8: 74e1 strb r1, [r4, #19] ethhdr->type = PP_HTONS(ETHTYPE_ARP); 8036dba: 7322 strb r2, [r4, #12] IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); hdr->proto = PP_HTONS(ETHTYPE_IP); /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; 8036dbc: 74a3 strb r3, [r4, #18] hdr->protolen = sizeof(ip_addr_t); ethhdr->type = PP_HTONS(ETHTYPE_ARP); 8036dbe: 7363 strb r3, [r4, #13] /* send ARP query */ result = netif->linkoutput(netif, p); 8036dc0: 69b3 ldr r3, [r6, #24] 8036dc2: 4630 mov r0, r6 8036dc4: 4629 mov r1, r5 8036dc6: 4798 blx r3 8036dc8: 4604 mov r4, r0 ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 8036dca: 4628 mov r0, r5 8036dcc: f7f8 ff5c bl 802fc88 8036dd0: e000 b.n 8036dd4 /* could allocate a pbuf for an ARP request? */ if (p == NULL) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("etharp_raw: could not allocate pbuf for ARP request.\n")); ETHARP_STATS_INC(etharp.memerr); return ERR_MEM; 8036dd2: 24ff movs r4, #255 ; 0xff { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, ðbroadcast, (struct eth_addr *)netif->hwaddr, &netif->ip_addr, ðzero, ipaddr, ARP_REQUEST); } 8036dd4: b260 sxtb r0, r4 8036dd6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8036dda: bf00 nop 8036ddc: 08045079 .word 0x08045079 8036de0: 08045073 .word 0x08045073 08036de4 : * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. * */ err_t etharp_query(struct netif *netif, ip_addr_t *ipaddr, struct pbuf *q) { 8036de4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8036de8: 4607 mov r7, r0 8036dea: 460e mov r6, r1 struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; s8_t i; /* ARP entry index */ /* non-unicast address? */ if (ip_addr_isbroadcast(ipaddr, netif) || 8036dec: 6808 ldr r0, [r1, #0] 8036dee: 4639 mov r1, r7 * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. * */ err_t etharp_query(struct netif *netif, ip_addr_t *ipaddr, struct pbuf *q) { 8036df0: 4615 mov r5, r2 struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; s8_t i; /* ARP entry index */ /* non-unicast address? */ if (ip_addr_isbroadcast(ipaddr, netif) || 8036df2: f7fb fde3 bl 80329bc 8036df6: 2800 cmp r0, #0 8036df8: d157 bne.n 8036eaa ip_addr_ismulticast(ipaddr) || 8036dfa: 6833 ldr r3, [r6, #0] 8036dfc: f003 02f0 and.w r2, r3, #240 ; 0xf0 struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; s8_t i; /* ARP entry index */ /* non-unicast address? */ if (ip_addr_isbroadcast(ipaddr, netif) || 8036e00: 2ae0 cmp r2, #224 ; 0xe0 8036e02: d052 beq.n 8036eaa ip_addr_ismulticast(ipaddr) || ip_addr_isany(ipaddr)) { 8036e04: 2b00 cmp r3, #0 8036e06: d050 beq.n 8036eaa LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; } /* find entry in ARP cache, ask to create entry if queueing packet */ i = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD); 8036e08: 2101 movs r1, #1 8036e0a: 4630 mov r0, r6 8036e0c: f7ff fed4 bl 8036bb8 /* could not find or create entry? */ if (i < 0) { 8036e10: 1e04 subs r4, r0, #0 8036e12: db4f blt.n 8036eb4 } return (err_t)i; } /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 8036e14: 4931 ldr r1, [pc, #196] ; (8036edc ) 8036e16: 2214 movs r2, #20 8036e18: fb02 1304 mla r3, r2, r4, r1 8036e1c: 3310 adds r3, #16 8036e1e: 7898 ldrb r0, [r3, #2] 8036e20: b908 cbnz r0, 8036e26 arp_table[i].state = ETHARP_STATE_PENDING; 8036e22: 2001 movs r0, #1 8036e24: 7098 strb r0, [r3, #2] LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", ((arp_table[i].state == ETHARP_STATE_PENDING) || (arp_table[i].state >= ETHARP_STATE_STABLE))); /* do we have a pending entry? or an implicit query request? */ if ((arp_table[i].state == ETHARP_STATE_PENDING) || (q == NULL)) { 8036e26: fb02 1204 mla r2, r2, r4, r1 8036e2a: 7c93 ldrb r3, [r2, #18] 8036e2c: 2b01 cmp r3, #1 8036e2e: d000 beq.n 8036e32 8036e30: b935 cbnz r5, 8036e40 /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 8036e32: 4638 mov r0, r7 8036e34: 4631 mov r1, r6 8036e36: f7ff ff7f bl 8036d38 8036e3a: 4602 mov r2, r0 /* ARP request couldn't be sent */ /* We don't re-send arp request in etharp_tmr, but we still queue packets, since this failure could be temporary, and the next packet calling etharp_query again could lead to sending the queued packets. */ } if (q == NULL) { 8036e3c: b90d cbnz r5, 8036e42 8036e3e: e036 b.n 8036eae */ err_t etharp_query(struct netif *netif, ip_addr_t *ipaddr, struct pbuf *q) { struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; 8036e40: 22ff movs r2, #255 ; 0xff } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 8036e42: 2314 movs r3, #20 8036e44: 4925 ldr r1, [pc, #148] ; (8036edc ) 8036e46: 4363 muls r3, r4 8036e48: 18c8 adds r0, r1, r3 8036e4a: 7c80 ldrb r0, [r0, #18] 8036e4c: 2801 cmp r0, #1 8036e4e: d90b bls.n 8036e68 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); 8036e50: 4a23 ldr r2, [pc, #140] ; (8036ee0 ) /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 8036e52: 18cb adds r3, r1, r3 /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); 8036e54: 7014 strb r4, [r2, #0] /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 8036e56: 4638 mov r0, r7 8036e58: 4629 mov r1, r5 8036e5a: f107 0227 add.w r2, r7, #39 ; 0x27 8036e5e: 330c adds r3, #12 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); result = ERR_MEM; } } return result; } 8036e60: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 8036e64: f7ff be76 b.w 8036b54 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8036e68: d123 bne.n 8036eb2 8036e6a: 462b mov r3, r5 8036e6c: e003 b.n 8036e76 * to copy the whole queue into a new PBUF_RAM (see bug #11400) * PBUF_ROMs can be left as they are, since ROM must not get changed. */ p = q; while (p) { LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); if(p->type != PBUF_ROM) { 8036e6e: 7b1a ldrb r2, [r3, #12] 8036e70: 2a01 cmp r2, #1 8036e72: d128 bne.n 8036ec6 copy_needed = 1; break; } p = p->next; 8036e74: 681b ldr r3, [r3, #0] int copy_needed = 0; /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but * to copy the whole queue into a new PBUF_RAM (see bug #11400) * PBUF_ROMs can be left as they are, since ROM must not get changed. */ p = q; while (p) { 8036e76: 2b00 cmp r3, #0 8036e78: d1f9 bne.n 8036e6e 8036e7a: e01e b.n 8036eba } if(copy_needed) { /* copy the whole packet into new pbufs */ p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); if(p != NULL) { if (pbuf_copy(p, q) != ERR_OK) { 8036e7c: 4629 mov r1, r5 8036e7e: f7f9 f807 bl 802fe90 8036e82: b120 cbz r0, 8036e8e pbuf_free(p); 8036e84: 4630 mov r0, r6 8036e86: f7f8 feff bl 802fc88 8036e8a: e024 b.n 8036ed6 /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); } /* packet could be taken over? */ if (p != NULL) { 8036e8c: 462e mov r6, r5 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); result = ERR_MEM; } #else /* ARP_QUEUEING */ /* always queue one packet per ARP request only, freeing a previously queued packet */ if (arp_table[i].q != NULL) { 8036e8e: 2314 movs r3, #20 8036e90: 4a12 ldr r2, [pc, #72] ; (8036edc ) 8036e92: fb03 f104 mul.w r1, r3, r4 8036e96: 4615 mov r5, r2 8036e98: 5850 ldr r0, [r2, r1] 8036e9a: 461f mov r7, r3 8036e9c: b108 cbz r0, 8036ea2 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); pbuf_free(arp_table[i].q); 8036e9e: f7f8 fef3 bl 802fc88 } arp_table[i].q = p; 8036ea2: 437c muls r4, r7 8036ea4: 512e str r6, [r5, r4] result = ERR_OK; 8036ea6: 2400 movs r4, #0 8036ea8: e004 b.n 8036eb4 /* non-unicast address? */ if (ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr) || ip_addr_isany(ipaddr)) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; 8036eaa: 24f2 movs r4, #242 ; 0xf2 8036eac: e002 b.n 8036eb4 /* We don't re-send arp request in etharp_tmr, but we still queue packets, since this failure could be temporary, and the next packet calling etharp_query again could lead to sending the queued packets. */ } if (q == NULL) { return result; 8036eae: 4604 mov r4, r0 8036eb0: e000 b.n 8036eb4 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8036eb2: 4614 mov r4, r2 8036eb4: b260 sxtb r0, r4 8036eb6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } } } else { /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); 8036eba: 4628 mov r0, r5 8036ebc: f7f8 ffc1 bl 802fe42 } /* packet could be taken over? */ if (p != NULL) { 8036ec0: 2d00 cmp r5, #0 8036ec2: d1e3 bne.n 8036e8c 8036ec4: e007 b.n 8036ed6 } p = p->next; } if(copy_needed) { /* copy the whole packet into new pbufs */ p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); 8036ec6: 2003 movs r0, #3 8036ec8: 8919 ldrh r1, [r3, #8] 8036eca: 2200 movs r2, #0 8036ecc: f7f8 ff29 bl 802fd22 if(p != NULL) { 8036ed0: 4606 mov r6, r0 8036ed2: 2800 cmp r0, #0 8036ed4: d1d2 bne.n 8036e7c LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); #endif /* ARP_QUEUEING */ } else { ETHARP_STATS_INC(etharp.memerr); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); result = ERR_MEM; 8036ed6: 24ff movs r4, #255 ; 0xff 8036ed8: e7ec b.n 8036eb4 8036eda: bf00 nop 8036edc: 2000c754 .word 0x2000c754 8036ee0: 2000c750 .word 0x2000c750 08036ee4 : /** Just a small helper function that sends a pbuf to an ethernet address * in the arp_table specified by the index 'arp_idx'. */ static err_t etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) { 8036ee4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); /* if arp table entry is about to expire: re-request it, but only if its state is ETHARP_STATE_STABLE to prevent flooding the network with ARP requests if this address is used frequently. */ if ((arp_table[arp_idx].state == ETHARP_STATE_STABLE) && 8036ee8: 4b10 ldr r3, [pc, #64] ; (8036f2c ) /** Just a small helper function that sends a pbuf to an ethernet address * in the arp_table specified by the index 'arp_idx'. */ static err_t etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) { 8036eea: 4615 mov r5, r2 LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); /* if arp table entry is about to expire: re-request it, but only if its state is ETHARP_STATE_STABLE to prevent flooding the network with ARP requests if this address is used frequently. */ if ((arp_table[arp_idx].state == ETHARP_STATE_STABLE) && 8036eec: 2214 movs r2, #20 /** Just a small helper function that sends a pbuf to an ethernet address * in the arp_table specified by the index 'arp_idx'. */ static err_t etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) { 8036eee: 460e mov r6, r1 LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); /* if arp table entry is about to expire: re-request it, but only if its state is ETHARP_STATE_STABLE to prevent flooding the network with ARP requests if this address is used frequently. */ if ((arp_table[arp_idx].state == ETHARP_STATE_STABLE) && 8036ef0: fb02 3105 mla r1, r2, r5, r3 /** Just a small helper function that sends a pbuf to an ethernet address * in the arp_table specified by the index 'arp_idx'. */ static err_t etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) { 8036ef4: 4607 mov r7, r0 LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); /* if arp table entry is about to expire: re-request it, but only if its state is ETHARP_STATE_STABLE to prevent flooding the network with ARP requests if this address is used frequently. */ if ((arp_table[arp_idx].state == ETHARP_STATE_STABLE) && 8036ef6: 7c8a ldrb r2, [r1, #18] 8036ef8: 2a02 cmp r2, #2 8036efa: f101 0410 add.w r4, r1, #16 8036efe: d108 bne.n 8036f12 8036f00: 7cca ldrb r2, [r1, #19] 8036f02: 2ae3 cmp r2, #227 ; 0xe3 8036f04: d905 bls.n 8036f12 (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED)) { if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 8036f06: 3104 adds r1, #4 8036f08: f7ff ff16 bl 8036d38 8036f0c: b908 cbnz r0, 8036f12 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING; 8036f0e: 2303 movs r3, #3 8036f10: 70a3 strb r3, [r4, #2] } } return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), 8036f12: 4b06 ldr r3, [pc, #24] ; (8036f2c ) 8036f14: 2214 movs r2, #20 8036f16: fb02 3305 mla r3, r2, r5, r3 8036f1a: 4638 mov r0, r7 8036f1c: 4631 mov r1, r6 8036f1e: f107 0227 add.w r2, r7, #39 ; 0x27 8036f22: 330c adds r3, #12 &arp_table[arp_idx].ethaddr); } 8036f24: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING; } } return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), 8036f28: f7ff be14 b.w 8036b54 8036f2c: 2000c754 .word 0x2000c754 08036f30 : * - ERR_RTE No route to destination (no gateway to external networks), * or the return type of either etharp_query() or etharp_send_ip(). */ err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) { 8036f30: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8036f32: 4604 mov r4, r0 8036f34: 460e mov r6, r1 LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("q != NULL", q != NULL); LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); /* make room for Ethernet header - should not fail */ if (pbuf_header(q, sizeof(struct eth_hdr)) != 0) { 8036f36: 4608 mov r0, r1 8036f38: 210e movs r1, #14 * - ERR_RTE No route to destination (no gateway to external networks), * or the return type of either etharp_query() or etharp_send_ip(). */ err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) { 8036f3a: 4615 mov r5, r2 LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("q != NULL", q != NULL); LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); /* make room for Ethernet header - should not fail */ if (pbuf_header(q, sizeof(struct eth_hdr)) != 0) { 8036f3c: f7f8 fe79 bl 802fc32 8036f40: 2800 cmp r0, #0 8036f42: d163 bne.n 803700c /* Determine on destination hardware address. Broadcasts and multicasts * are special, other IP addresses are looked up in the ARP table. */ /* broadcast destination IP address? */ if (ip_addr_isbroadcast(ipaddr, netif)) { 8036f44: 6828 ldr r0, [r5, #0] 8036f46: 4621 mov r1, r4 8036f48: f7fb fd38 bl 80329bc 8036f4c: 2800 cmp r0, #0 8036f4e: d155 bne.n 8036ffc /* broadcast on Ethernet also */ dest = (struct eth_addr *)ðbroadcast; /* multicast destination IP address? */ } else if (ip_addr_ismulticast(ipaddr)) { 8036f50: 682b ldr r3, [r5, #0] 8036f52: f003 02f0 and.w r2, r3, #240 ; 0xf0 8036f56: 2ae0 cmp r2, #224 ; 0xe0 8036f58: d114 bne.n 8036f84 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_MULTICAST_ADDR_0; 8036f5a: 2301 movs r3, #1 8036f5c: f88d 3000 strb.w r3, [sp] mcastaddr.addr[1] = LL_MULTICAST_ADDR_1; mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; 8036f60: 235e movs r3, #94 ; 0x5e 8036f62: f88d 3002 strb.w r3, [sp, #2] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8036f66: 786b ldrb r3, [r5, #1] dest = (struct eth_addr *)ðbroadcast; /* multicast destination IP address? */ } else if (ip_addr_ismulticast(ipaddr)) { /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_MULTICAST_ADDR_0; mcastaddr.addr[1] = LL_MULTICAST_ADDR_1; 8036f68: f88d 0001 strb.w r0, [sp, #1] mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8036f6c: f003 037f and.w r3, r3, #127 ; 0x7f 8036f70: f88d 3003 strb.w r3, [sp, #3] mcastaddr.addr[4] = ip4_addr3(ipaddr); 8036f74: 78ab ldrb r3, [r5, #2] 8036f76: f88d 3004 strb.w r3, [sp, #4] mcastaddr.addr[5] = ip4_addr4(ipaddr); 8036f7a: 78eb ldrb r3, [r5, #3] 8036f7c: f88d 3005 strb.w r3, [sp, #5] /* destination Ethernet address is multicast */ dest = &mcastaddr; 8036f80: 466b mov r3, sp 8036f82: e03c b.n 8036ffe /* unicast destination IP address? */ } else { s8_t i; /* outside local network? if so, this can neither be a global broadcast nor a subnet broadcast. */ if (!ip_addr_netcmp(ipaddr, &(netif->ip_addr), &(netif->netmask)) && 8036f84: 6862 ldr r2, [r4, #4] 8036f86: ea83 0102 eor.w r1, r3, r2 8036f8a: 68a2 ldr r2, [r4, #8] 8036f8c: 4211 tst r1, r2 8036f8e: d009 beq.n 8036fa4 !ip_addr_islinklocal(ipaddr)) { 8036f90: b29b uxth r3, r3 /* unicast destination IP address? */ } else { s8_t i; /* outside local network? if so, this can neither be a global broadcast nor a subnet broadcast. */ if (!ip_addr_netcmp(ipaddr, &(netif->ip_addr), &(netif->netmask)) && 8036f92: f64f 62a9 movw r2, #65193 ; 0xfea9 8036f96: 4293 cmp r3, r2 8036f98: d004 beq.n 8036fa4 router for forwarding". */ if (!ip_addr_islinklocal(&iphdr->src)) #endif /* LWIP_AUTOIP */ { /* interface has default gateway? */ if (!ip_addr_isany(&netif->gw)) { 8036f9a: 68e3 ldr r3, [r4, #12] 8036f9c: f104 010c add.w r1, r4, #12 8036fa0: b90b cbnz r3, 8036fa6 8036fa2: e035 b.n 8037010 /* unicast destination IP address? */ } else { s8_t i; /* outside local network? if so, this can neither be a global broadcast nor a subnet broadcast. */ if (!ip_addr_netcmp(ipaddr, &(netif->ip_addr), &(netif->netmask)) && 8036fa4: 4629 mov r1, r5 if (netif->addr_hint != NULL) { /* per-pcb cached entry was given */ u8_t etharp_cached_entry = *(netif->addr_hint); if (etharp_cached_entry < ARP_TABLE_SIZE) { #endif /* LWIP_NETIF_HWADDRHINT */ if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 8036fa6: 4b1c ldr r3, [pc, #112] ; (8037018 ) 8036fa8: 781a ldrb r2, [r3, #0] 8036faa: 4b1c ldr r3, [pc, #112] ; (803701c ) 8036fac: 2014 movs r0, #20 8036fae: fb00 3302 mla r3, r0, r2, r3 8036fb2: 7c98 ldrb r0, [r3, #18] 8036fb4: 2801 cmp r0, #1 8036fb6: d904 bls.n 8036fc2 8036fb8: 6808 ldr r0, [r1, #0] 8036fba: 685b ldr r3, [r3, #4] 8036fbc: 4298 cmp r0, r3 8036fbe: d100 bne.n 8036fc2 8036fc0: e00d b.n 8036fde 8036fc2: 2300 movs r3, #0 * @return * - ERR_RTE No route to destination (no gateway to external networks), * or the return type of either etharp_query() or etharp_send_ip(). */ err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) 8036fc4: 4f15 ldr r7, [pc, #84] ; (803701c ) if (netif->addr_hint != NULL) { /* per-pcb cached entry was given */ u8_t etharp_cached_entry = *(netif->addr_hint); if (etharp_cached_entry < ARP_TABLE_SIZE) { #endif /* LWIP_NETIF_HWADDRHINT */ if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 8036fc6: 461a mov r2, r3 * @return * - ERR_RTE No route to destination (no gateway to external networks), * or the return type of either etharp_query() or etharp_send_ip(). */ err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) 8036fc8: 18f8 adds r0, r7, r3 #endif /* LWIP_NETIF_HWADDRHINT */ /* find stable entry: do this here since this is a critical path for throughput and etharp_find_entry() is kind of slow */ for (i = 0; i < ARP_TABLE_SIZE; i++) { if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 8036fca: 7c85 ldrb r5, [r0, #18] 8036fcc: 2d01 cmp r5, #1 8036fce: d90b bls.n 8036fe8 8036fd0: 680d ldr r5, [r1, #0] 8036fd2: 6840 ldr r0, [r0, #4] 8036fd4: 4285 cmp r5, r0 8036fd6: d107 bne.n 8036fe8 (ip_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { /* found an existing, stable entry */ ETHARP_SET_HINT(netif, i); 8036fd8: 4b0f ldr r3, [pc, #60] ; (8037018 ) 8036fda: b2d2 uxtb r2, r2 8036fdc: 701a strb r2, [r3, #0] return etharp_output_to_arp_index(netif, q, i); 8036fde: 4620 mov r0, r4 8036fe0: 4631 mov r1, r6 8036fe2: f7ff ff7f bl 8036ee4 8036fe6: e014 b.n 8037012 8036fe8: 3314 adds r3, #20 } #endif /* LWIP_NETIF_HWADDRHINT */ /* find stable entry: do this here since this is a critical path for throughput and etharp_find_entry() is kind of slow */ for (i = 0; i < ARP_TABLE_SIZE; i++) { 8036fea: 3201 adds r2, #1 8036fec: 2bc8 cmp r3, #200 ; 0xc8 8036fee: b2d2 uxtb r2, r2 8036ff0: d1ea bne.n 8036fc8 return etharp_output_to_arp_index(netif, q, i); } } /* no stable entry found, use the (slower) query function: queue on destination Ethernet address belonging to ipaddr */ return etharp_query(netif, dst_addr, q); 8036ff2: 4620 mov r0, r4 8036ff4: 4632 mov r2, r6 8036ff6: f7ff fef5 bl 8036de4 8036ffa: e00a b.n 8037012 * are special, other IP addresses are looked up in the ARP table. */ /* broadcast destination IP address? */ if (ip_addr_isbroadcast(ipaddr, netif)) { /* broadcast on Ethernet also */ dest = (struct eth_addr *)ðbroadcast; 8036ffc: 4b08 ldr r3, [pc, #32] ; (8037020 ) } /* continuation for multicast/broadcast destinations */ /* obtain source Ethernet address of the given interface */ /* send packet directly on the link */ return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), dest); 8036ffe: 4620 mov r0, r4 8037000: 4631 mov r1, r6 8037002: f104 0227 add.w r2, r4, #39 ; 0x27 8037006: f7ff fda5 bl 8036b54 803700a: e002 b.n 8037012 if (pbuf_header(q, sizeof(struct eth_hdr)) != 0) { /* bail out */ LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("etharp_output: could not allocate room for header.\n")); LINK_STATS_INC(link.lenerr); return ERR_BUF; 803700c: 20fe movs r0, #254 ; 0xfe 803700e: e000 b.n 8037012 /* send to hardware address of default gateway IP address */ dst_addr = &(netif->gw); /* no default gateway available */ } else { /* no route to destination error (default gateway missing) */ return ERR_RTE; 8037010: 20fc movs r0, #252 ; 0xfc /* continuation for multicast/broadcast destinations */ /* obtain source Ethernet address of the given interface */ /* send packet directly on the link */ return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), dest); } 8037012: b240 sxtb r0, r0 8037014: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 8037016: bf00 nop 8037018: 2000c750 .word 0x2000c750 803701c: 2000c754 .word 0x2000c754 8037020: 08045073 .word 0x08045073 08037024 : * @param p the recevied packet, p->payload pointing to the ethernet header * @param netif the network interface on which the packet was received */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 8037024: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} u16_t type; #if LWIP_ARP || ETHARP_SUPPORT_VLAN s16_t ip_hdr_offset = SIZEOF_ETH_HDR; #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ if (p->len <= SIZEOF_ETH_HDR) { 8037028: 8943 ldrh r3, [r0, #10] 803702a: 2b0e cmp r3, #14 * @param p the recevied packet, p->payload pointing to the ethernet header * @param netif the network interface on which the packet was received */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 803702c: b087 sub sp, #28 803702e: 4604 mov r4, r0 8037030: 460d mov r5, r1 u16_t type; #if LWIP_ARP || ETHARP_SUPPORT_VLAN s16_t ip_hdr_offset = SIZEOF_ETH_HDR; #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ if (p->len <= SIZEOF_ETH_HDR) { 8037032: f240 80ed bls.w 8037210 ETHARP_STATS_INC(etharp.drop); goto free_and_return; } /* points to packet payload, which starts with an Ethernet header */ ethhdr = (struct eth_hdr *)p->payload; 8037036: 6840 ldr r0, [r0, #4] #if LWIP_ARP_FILTER_NETIF netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, htons(type)); #endif /* LWIP_ARP_FILTER_NETIF*/ if (ethhdr->dest.addr[0] & 1) { 8037038: 7803 ldrb r3, [r0, #0] (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5], (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2], (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5], (unsigned)htons(ethhdr->type))); type = ethhdr->type; 803703a: 8986 ldrh r6, [r0, #12] #if LWIP_ARP_FILTER_NETIF netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, htons(type)); #endif /* LWIP_ARP_FILTER_NETIF*/ if (ethhdr->dest.addr[0] & 1) { 803703c: 07da lsls r2, r3, #31 803703e: d513 bpl.n 8037068 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_MULTICAST_ADDR_0) { 8037040: 2b01 cmp r3, #1 8037042: d108 bne.n 8037056 if ((ethhdr->dest.addr[1] == LL_MULTICAST_ADDR_1) && 8037044: 7843 ldrb r3, [r0, #1] 8037046: b97b cbnz r3, 8037068 8037048: 7883 ldrb r3, [r0, #2] 803704a: 2b5e cmp r3, #94 ; 0x5e 803704c: d10c bne.n 8037068 (ethhdr->dest.addr[2] == LL_MULTICAST_ADDR_2)) { /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 803704e: 7b63 ldrb r3, [r4, #13] 8037050: f043 0310 orr.w r3, r3, #16 8037054: e007 b.n 8037066 } } else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) { 8037056: 4972 ldr r1, [pc, #456] ; (8037220 ) 8037058: 2206 movs r2, #6 803705a: f7ea fdf1 bl 8021c40 803705e: b918 cbnz r0, 8037068 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 8037060: 7b63 ldrb r3, [r4, #13] 8037062: f043 0308 orr.w r3, r3, #8 8037066: 7363 strb r3, [r4, #13] } } switch (type) { 8037068: 2e08 cmp r6, #8 803706a: d004 beq.n 8037076 803706c: f5b6 6fc1 cmp.w r6, #1544 ; 0x608 8037070: f040 80ce bne.w 8037210 8037074: e014 b.n 80370a0 #if LWIP_ARP /* IP packet? */ case PP_HTONS(ETHTYPE_IP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8037076: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 803707a: f003 0320 and.w r3, r3, #32 803707e: b2db uxtb r3, r3 8037080: 2b00 cmp r3, #0 8037082: f000 80c5 beq.w 8037210 #if ETHARP_TRUST_IP_MAC /* update ARP table */ etharp_ip_input(netif, p); #endif /* ETHARP_TRUST_IP_MAC */ /* skip Ethernet header */ if(pbuf_header(p, -ip_hdr_offset)) { 8037086: 4620 mov r0, r4 8037088: f06f 010d mvn.w r1, #13 803708c: f7f8 fdd1 bl 802fc32 8037090: 2800 cmp r0, #0 8037092: f040 80bd bne.w 8037210 LWIP_ASSERT("Can't move over header in packet", 0); goto free_and_return; } else { /* pass to IP layer */ ip_input(p, netif); 8037096: 4620 mov r0, r4 8037098: 4629 mov r1, r5 803709a: f7fb fda3 bl 8032be4 } break; 803709e: e0ba b.n 8037216 case PP_HTONS(ETHTYPE_ARP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 80370a0: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 80370a4: f003 0320 and.w r3, r3, #32 80370a8: b2db uxtb r3, r3 80370aa: 2b00 cmp r3, #0 80370ac: f000 80b0 beq.w 8037210 LWIP_ERROR("netif != NULL", (netif != NULL), return;); /* drop short ARP packets: we have to check for p->len instead of p->tot_len here since a struct etharp_hdr is pointed to p->payload, so it musn't be chained! */ if (p->len < SIZEOF_ETHARP_PACKET) { 80370b0: 8963 ldrh r3, [r4, #10] 80370b2: 2b29 cmp r3, #41 ; 0x29 80370b4: d800 bhi.n 80370b8 80370b6: e0ab b.n 8037210 ETHARP_STATS_INC(etharp.drop); pbuf_free(p); return; } ethhdr = (struct eth_hdr *)p->payload; 80370b8: 6866 ldr r6, [r4, #4] hdr = (struct etharp_hdr *)(((u8_t*)ethhdr) + SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR); } #endif /* ETHARP_SUPPORT_VLAN */ /* RFC 826 "Packet Reception": */ if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || 80370ba: 89f3 ldrh r3, [r6, #14] 80370bc: f5b3 7f80 cmp.w r3, #256 ; 0x100 80370c0: f040 80a6 bne.w 8037210 80370c4: 7cb3 ldrb r3, [r6, #18] 80370c6: 2b06 cmp r3, #6 80370c8: f040 80a2 bne.w 8037210 (hdr->hwlen != ETHARP_HWADDR_LEN) || 80370cc: 7cf7 ldrb r7, [r6, #19] 80370ce: 2f04 cmp r7, #4 80370d0: f040 809e bne.w 8037210 (hdr->protolen != sizeof(ip_addr_t)) || 80370d4: 8a33 ldrh r3, [r6, #16] 80370d6: 2b08 cmp r3, #8 80370d8: f040 809a bne.w 8037210 autoip_arp_reply(netif, hdr); #endif /* LWIP_AUTOIP */ /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without * structure packing (not using structure copy which breaks strict-aliasing rules). */ IPADDR2_COPY(&sipaddr, &hdr->sipaddr); 80370dc: f106 0a1c add.w sl, r6, #28 80370e0: 4651 mov r1, sl 80370e2: 463a mov r2, r7 80370e4: a804 add r0, sp, #16 80370e6: f7ea fddd bl 8021ca4 IPADDR2_COPY(&dipaddr, &hdr->dipaddr); 80370ea: f106 0226 add.w r2, r6, #38 ; 0x26 80370ee: 9203 str r2, [sp, #12] 80370f0: 4611 mov r1, r2 80370f2: a805 add r0, sp, #20 80370f4: 463a mov r2, r7 80370f6: f7ea fdd5 bl 8021ca4 /* this interface is not configured? */ if (ip_addr_isany(&netif->ip_addr)) { 80370fa: 686b ldr r3, [r5, #4] 80370fc: b12b cbz r3, 803710a for_us = 0; } else { /* ARP packet directed to us? */ for_us = (u8_t)ip_addr_cmp(&dipaddr, &(netif->ip_addr)); 80370fe: 9a05 ldr r2, [sp, #20] 8037100: 1ad1 subs r1, r2, r3 8037102: 424a negs r2, r1 8037104: 414a adcs r2, r1 8037106: 9201 str r2, [sp, #4] 8037108: e000 b.n 803710c IPADDR2_COPY(&sipaddr, &hdr->sipaddr); IPADDR2_COPY(&dipaddr, &hdr->dipaddr); /* this interface is not configured? */ if (ip_addr_isany(&netif->ip_addr)) { for_us = 0; 803710a: 9301 str r3, [sp, #4] /* ARP message directed to us? -> add IP address in ARP cache; assume requester wants to talk to us, can result in directly sending the queued packets for this host. ARP message not directed to us? -> update the source IP address in the cache, if present */ etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), 803710c: 9b01 ldr r3, [sp, #4] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5])); /* non-unicast address? */ if (ip_addr_isany(ipaddr) || 803710e: 9804 ldr r0, [sp, #16] /* ARP message directed to us? -> add IP address in ARP cache; assume requester wants to talk to us, can result in directly sending the queued packets for this host. ARP message not directed to us? -> update the source IP address in the cache, if present */ etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), 8037110: f106 0716 add.w r7, r6, #22 8037114: 2b00 cmp r3, #0 8037116: bf0c ite eq 8037118: f04f 0802 moveq.w r8, #2 803711c: f04f 0801 movne.w r8, #1 case PP_HTONS(ETHTYPE_ARP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { goto free_and_return; } /* pass p to ARP module */ etharp_arp_input(netif, (struct eth_addr*)(netif->hwaddr), p); 8037120: f105 0927 add.w r9, r5, #39 ; 0x27 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5])); /* non-unicast address? */ if (ip_addr_isany(ipaddr) || 8037124: 2800 cmp r0, #0 8037126: d03d beq.n 80371a4 ip_addr_isbroadcast(ipaddr, netif) || 8037128: 4629 mov r1, r5 803712a: f7fb fc47 bl 80329bc LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5])); /* non-unicast address? */ if (ip_addr_isany(ipaddr) || 803712e: 9002 str r0, [sp, #8] 8037130: 2800 cmp r0, #0 8037132: d137 bne.n 80371a4 ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr)) { 8037134: 9a04 ldr r2, [sp, #16] 8037136: f002 02f0 and.w r2, r2, #240 ; 0xf0 ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5])); /* non-unicast address? */ if (ip_addr_isany(ipaddr) || ip_addr_isbroadcast(ipaddr, netif) || 803713a: 2ae0 cmp r2, #224 ; 0xe0 803713c: d032 beq.n 80371a4 ip_addr_ismulticast(ipaddr)) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; } /* find or create ARP entry */ i = etharp_find_entry(ipaddr, flags); 803713e: a804 add r0, sp, #16 8037140: 4641 mov r1, r8 8037142: f7ff fd39 bl 8036bb8 /* bail out if no entry could be found */ if (i < 0) { 8037146: 2800 cmp r0, #0 8037148: db2c blt.n 80371a4 arp_table[i].state = ETHARP_STATE_STATIC; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 803714a: 4b36 ldr r3, [pc, #216] ; (8037224 ) 803714c: f04f 0814 mov.w r8, #20 8037150: fb08 f800 mul.w r8, r8, r0 8037154: eb03 0108 add.w r1, r3, r8 8037158: 2202 movs r2, #2 803715a: 748a strb r2, [r1, #18] } /* record network interface */ arp_table[i].netif = netif; 803715c: 608d str r5, [r1, #8] arp_table[i].state = ETHARP_STATE_STATIC; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 803715e: f101 0b10 add.w fp, r1, #16 } /* record network interface */ arp_table[i].netif = netif; /* insert in SNMP ARP index tree */ snmp_insert_arpidx_tree(netif, &arp_table[i].ipaddr); 8037162: 4628 mov r0, r5 8037164: 3104 adds r1, #4 8037166: 9300 str r3, [sp, #0] 8037168: f7fd f90a bl 8034380 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", (s16_t)i)); /* update address */ ETHADDR32_COPY(&arp_table[i].ethaddr, ethaddr); 803716c: 9b00 ldr r3, [sp, #0] 803716e: eb03 0008 add.w r0, r3, r8 8037172: 2206 movs r2, #6 8037174: 300c adds r0, #12 8037176: 4639 mov r1, r7 8037178: f7ea fd94 bl 8021ca4 /* reset time stamp */ arp_table[i].ctime = 0; 803717c: 9a02 ldr r2, [sp, #8] 803717e: f88b 2003 strb.w r2, [fp, #3] /* get the packet pointer */ p = q->p; /* now queue entry can be freed */ memp_free(MEMP_ARP_QUEUE, q); #else /* ARP_QUEUEING */ if (arp_table[i].q != NULL) { 8037182: 9b00 ldr r3, [sp, #0] 8037184: f853 b008 ldr.w fp, [r3, r8] 8037188: f1bb 0f00 cmp.w fp, #0 803718c: d00a beq.n 80371a4 struct pbuf *p = arp_table[i].q; arp_table[i].q = NULL; 803718e: f843 2008 str.w r2, [r3, r8] #endif /* ARP_QUEUEING */ /* send the queued IP packet */ etharp_send_ip(netif, p, (struct eth_addr*)(netif->hwaddr), ethaddr); 8037192: 4628 mov r0, r5 8037194: 4659 mov r1, fp 8037196: 464a mov r2, r9 8037198: 463b mov r3, r7 803719a: f7ff fcdb bl 8036b54 /* free the queued IP packet */ pbuf_free(p); 803719e: 4658 mov r0, fp 80371a0: f7f8 fd72 bl 802fc88 -> update the source IP address in the cache, if present */ etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); /* now act on the message itself */ switch (hdr->opcode) { 80371a4: 8ab3 ldrh r3, [r6, #20] 80371a6: f5b3 7f80 cmp.w r3, #256 ; 0x100 80371aa: d003 beq.n 80371b4 80371ac: f5b3 7f00 cmp.w r3, #512 ; 0x200 80371b0: d12e bne.n 8037210 80371b2: e029 b.n 8037208 * reply. In any case, we time-stamp any existing ARP entry, * and possiby send out an IP packet that was queued on it. */ LWIP_DEBUGF (ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_arp_input: incoming ARP request\n")); /* ARP request for our address? */ if (for_us) { 80371b4: 9b01 ldr r3, [sp, #4] 80371b6: b35b cbz r3, 8037210 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_arp_input: replying to ARP request for our IP address\n")); /* Re-use pbuf to send ARP reply. Since we are re-using an existing pbuf, we can't call etharp_raw since that would allocate a new pbuf. */ hdr->opcode = htons(ARP_REPLY); 80371b8: 2002 movs r0, #2 80371ba: f7f7 fc27 bl 802ea0c 80371be: 82b0 strh r0, [r6, #20] IPADDR2_COPY(&hdr->dipaddr, &hdr->sipaddr); 80371c0: 4651 mov r1, sl 80371c2: 2204 movs r2, #4 80371c4: 9803 ldr r0, [sp, #12] 80371c6: f7ea fd6d bl 8021ca4 IPADDR2_COPY(&hdr->sipaddr, &netif->ip_addr); 80371ca: 1d29 adds r1, r5, #4 80371cc: 2204 movs r2, #4 80371ce: 4650 mov r0, sl 80371d0: f7ea fd68 bl 8021ca4 * 'sender IP address' MUST be sent using link-layer broadcast instead of * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ ethdst_hwaddr = ip_addr_islinklocal(&netif->ip_addr) ? (u8_t*)(ethbroadcast.addr) : hdr->shwaddr.addr; #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(&hdr->dhwaddr, &hdr->shwaddr); 80371d4: 4639 mov r1, r7 80371d6: 2206 movs r2, #6 80371d8: f106 0020 add.w r0, r6, #32 80371dc: f7ea fd62 bl 8021ca4 #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, &hdr->shwaddr); 80371e0: 4639 mov r1, r7 80371e2: 2206 movs r2, #6 80371e4: 4630 mov r0, r6 80371e6: f7ea fd5d bl 8021ca4 #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(&hdr->shwaddr, ethaddr); 80371ea: 4649 mov r1, r9 80371ec: 2206 movs r2, #6 80371ee: 4638 mov r0, r7 80371f0: f7ea fd58 bl 8021ca4 ETHADDR16_COPY(ðhdr->src, ethaddr); 80371f4: 4649 mov r1, r9 80371f6: 1db0 adds r0, r6, #6 80371f8: 2206 movs r2, #6 80371fa: f7ea fd53 bl 8021ca4 /* hwtype, hwaddr_len, proto, protolen and the type in the ethernet header are already correct, we tested that before */ /* return ARP reply */ netif->linkoutput(netif, p); 80371fe: 69ab ldr r3, [r5, #24] 8037200: 4628 mov r0, r5 8037202: 4621 mov r1, r4 8037204: 4798 blx r3 8037206: e003 b.n 8037210 #if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) /* DHCP wants to know about ARP replies from any host with an * IP address also offered to us by the DHCP server. We do not * want to take a duplicate IP address on a single network. * @todo How should we handle redundant (fail-over) interfaces? */ dhcp_arp_reply(netif, &sipaddr); 8037208: 4628 mov r0, r5 803720a: a904 add r1, sp, #16 803720c: f7f8 f8d4 bl 802f3b8 /* This means the pbuf is freed or consumed, so the caller doesn't have to free it again */ return ERR_OK; free_and_return: pbuf_free(p); 8037210: 4620 mov r0, r4 8037212: f7f8 fd39 bl 802fc88 return ERR_OK; } 8037216: 2000 movs r0, #0 8037218: b007 add sp, #28 803721a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 803721e: bf00 nop 8037220: 08045073 .word 0x08045073 8037224: 2000c754 .word 0x2000c754 08037228 : return ERR_OK; } static void arp_timer(void *arg) { 8037228: b508 push {r3, lr} etharp_tmr(); 803722a: f7ff fd37 bl 8036c9c sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 803722e: 4904 ldr r1, [pc, #16] ; (8037240 ) 8037230: f241 3088 movw r0, #5000 ; 0x1388 8037234: 2200 movs r2, #0 } 8037236: e8bd 4008 ldmia.w sp!, {r3, lr} static void arp_timer(void *arg) { etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 803723a: f7fa bfab b.w 8032194 803723e: bf00 nop 8037240: 08037229 .word 0x08037229 08037244 : } } */ void ethernetif_input(void * pvParameters) { 8037244: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct pbuf *p; for( ;; ) { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) 8037248: f8df 80c4 ldr.w r8, [pc, #196] ; 8037310 } } */ void ethernetif_input(void * pvParameters) { 803724c: b085 sub sp, #20 struct pbuf *p; for( ;; ) { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) 803724e: 2100 movs r1, #0 8037250: 2264 movs r2, #100 ; 0x64 8037252: f8d8 0000 ldr.w r0, [r8] 8037256: 460b mov r3, r1 8037258: f7f4 f886 bl 802b368 803725c: 2801 cmp r0, #1 803725e: d1f6 bne.n 803724e } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 8037260: f8df a0b0 ldr.w sl, [pc, #176] ; 8037314 /* Clear Segment_Count */ DMA_RX_FRAME_infos->Seg_Count =0; /* When Rx Buffer unavailable flag is set: clear it and resume reception */ if ((ETH->DMASR & ETH_DMASR_RBUS) != (u32)RESET) 8037264: f8df 90b0 ldr.w r9, [pc, #176] ; 8037318 __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; /* Get received frame */ frame = ETH_Get_Received_Frame_interrupt(); 8037268: a801 add r0, sp, #4 803726a: f001 fa25 bl 80386b8 803726e: 9e03 ldr r6, [sp, #12] /* check that frame has no error */ if ((frame.descriptor->Status & ETH_DMARxDesc_ES) == (uint32_t)RESET) 8037270: 6837 ldr r7, [r6, #0] 8037272: f417 4700 ands.w r7, r7, #32768 ; 0x8000 8037276: d001 beq.n 803727c uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 8037278: 2400 movs r4, #0 803727a: e016 b.n 80372aa /* Obtain the size of the packet and put it into the "len" variable. */ len = frame.length; buffer = (u8 *)frame.buffer; /* We allocate a pbuf chain of pbufs from the pool. */ p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); 803727c: 2003 movs r0, #3 803727e: f8bd 1004 ldrh.w r1, [sp, #4] if ((frame.descriptor->Status & ETH_DMARxDesc_ES) == (uint32_t)RESET) { /* Obtain the size of the packet and put it into the "len" variable. */ len = frame.length; buffer = (u8 *)frame.buffer; 8037282: f8dd b008 ldr.w fp, [sp, #8] /* We allocate a pbuf chain of pbufs from the pool. */ p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); 8037286: 4602 mov r2, r0 8037288: f7f8 fd4b bl 802fd22 /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) 803728c: 4604 mov r4, r0 803728e: 2800 cmp r0, #0 8037290: d0f2 beq.n 8037278 8037292: 4605 mov r5, r0 { for (q = p; q != NULL; q = q->next) { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); 8037294: 6868 ldr r0, [r5, #4] 8037296: 896a ldrh r2, [r5, #10] 8037298: eb0b 0107 add.w r1, fp, r7 803729c: f7ea fd02 bl 8021ca4 l = l + q->len; 80372a0: 896b ldrh r3, [r5, #10] p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) { for (q = p; q != NULL; q = q->next) 80372a2: 682d ldr r5, [r5, #0] { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); l = l + q->len; 80372a4: 18ff adds r7, r7, r3 p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) { for (q = p; q != NULL; q = q->next) 80372a6: 2d00 cmp r5, #0 80372a8: d1f4 bne.n 8037294 } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 80372aa: f8da 3000 ldr.w r3, [sl] 80372ae: 689a ldr r2, [r3, #8] 80372b0: 2a01 cmp r2, #1 { DMARxNextDesc = DMA_RX_FRAME_infos->FS_Rx_Desc; 80372b2: bf88 it hi 80372b4: 681e ldrhi r6, [r3, #0] } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) { DMARxNextDesc->Status = ETH_DMARxDesc_OWN; 80372b6: f04f 4000 mov.w r0, #2147483648 ; 0x80000000 uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 80372ba: 2200 movs r2, #0 80372bc: e002 b.n 80372c4 } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) { DMARxNextDesc->Status = ETH_DMARxDesc_OWN; 80372be: 6030 str r0, [r6, #0] DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); 80372c0: 68f6 ldr r6, [r6, #12] { DMARxNextDesc = frame.descriptor; } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) 80372c2: 3201 adds r2, #1 80372c4: 6899 ldr r1, [r3, #8] 80372c6: 428a cmp r2, r1 80372c8: d3f9 bcc.n 80372be DMARxNextDesc->Status = ETH_DMARxDesc_OWN; DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); } /* Clear Segment_Count */ DMA_RX_FRAME_infos->Seg_Count =0; 80372ca: 2200 movs r2, #0 80372cc: 609a str r2, [r3, #8] /* When Rx Buffer unavailable flag is set: clear it and resume reception */ if ((ETH->DMASR & ETH_DMASR_RBUS) != (u32)RESET) 80372ce: f8d9 3000 ldr.w r3, [r9] 80372d2: 061b lsls r3, r3, #24 80372d4: d504 bpl.n 80372e0 { /* Clear RBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_RBUS; 80372d6: 2380 movs r3, #128 ; 0x80 80372d8: f8c9 3000 str.w r3, [r9] /* Resume DMA reception */ ETH->DMARPDR = 0; 80372dc: 4b0a ldr r3, [pc, #40] ; (8037308 ) 80372de: 601a str r2, [r3, #0] { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) { GET_NEXT_FRAGMENT: p = low_level_input( s_pxNetIf ); if (p != NULL) 80372e0: 2c00 cmp r4, #0 80372e2: d0b4 beq.n 803724e { if (ERR_OK != s_pxNetIf->input( p, s_pxNetIf)) 80372e4: 4b09 ldr r3, [pc, #36] ; (803730c ) 80372e6: 6819 ldr r1, [r3, #0] 80372e8: 4620 mov r0, r4 80372ea: 690b ldr r3, [r1, #16] 80372ec: 4798 blx r3 80372ee: 4601 mov r1, r0 80372f0: b118 cbz r0, 80372fa { pbuf_free(p); 80372f2: 4620 mov r0, r4 80372f4: f7f8 fcc8 bl 802fc88 80372f8: e7a9 b.n 803724e p=NULL; } else { xSemaphoreTake(s_xSemaphore, 0); 80372fa: f8d8 0000 ldr.w r0, [r8] 80372fe: 460a mov r2, r1 8037300: 460b mov r3, r1 8037302: f7f4 f831 bl 802b368 goto GET_NEXT_FRAGMENT; 8037306: e7af b.n 8037268 8037308: 40029008 .word 0x40029008 803730c: 2000c81c .word 0x2000c81c 8037310: 2000c820 .word 0x2000c820 8037314: 20012244 .word 0x20012244 8037318: 40029014 .word 0x40029014 0803731c : * to become availale since the stack doesn't retry to send a packet * dropped because of memory failure (except for the TCP timers). */ static err_t low_level_output(struct netif *netif, struct pbuf *p) { 803731c: b570 push {r4, r5, r6, lr} static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 803731e: 4e19 ldr r6, [pc, #100] ; (8037384 ) 8037320: 6835 ldr r5, [r6, #0] * to become availale since the stack doesn't retry to send a packet * dropped because of memory failure (except for the TCP timers). */ static err_t low_level_output(struct netif *netif, struct pbuf *p) { 8037322: 460c mov r4, r1 static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 8037324: b95d cbnz r5, 803733e { vSemaphoreCreateBinary (xTxSemaphore); 8037326: 2001 movs r0, #1 8037328: 4629 mov r1, r5 803732a: 2203 movs r2, #3 803732c: f7f3 fe9f bl 802b06e 8037330: 6030 str r0, [r6, #0] 8037332: b120 cbz r0, 803733e 8037334: 4629 mov r1, r5 8037336: 462a mov r2, r5 8037338: 462b mov r3, r5 803733a: f7f3 fed5 bl 802b0e8 } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) 803733e: 4b11 ldr r3, [pc, #68] ; (8037384 ) 8037340: 2100 movs r1, #0 8037342: 6818 ldr r0, [r3, #0] 8037344: 22fa movs r2, #250 ; 0xfa 8037346: 460b mov r3, r1 8037348: f7f4 f80e bl 802b368 803734c: b1c0 cbz r0, 8037380 { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 803734e: 4b0e ldr r3, [pc, #56] ; (8037388 ) 8037350: 681b ldr r3, [r3, #0] static err_t low_level_output(struct netif *netif, struct pbuf *p) { static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; 8037352: 2500 movs r5, #0 vSemaphoreCreateBinary (xTxSemaphore); } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 8037354: 689e ldr r6, [r3, #8] 8037356: e007 b.n 8037368 for(q = p; q != NULL; q = q->next) { memcpy((u8_t*)&buffer[l], q->payload, q->len); 8037358: 1970 adds r0, r6, r5 803735a: 6861 ldr r1, [r4, #4] 803735c: 8962 ldrh r2, [r4, #10] 803735e: f7ea fca1 bl 8021ca4 l = l + q->len; 8037362: 8963 ldrh r3, [r4, #10] } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8037364: 6824 ldr r4, [r4, #0] { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; 8037366: 18ed adds r5, r5, r3 } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8037368: 2c00 cmp r4, #0 803736a: d1f5 bne.n 8037358 { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; } ETH_Prepare_Transmit_Descriptors(l); 803736c: b2a8 uxth r0, r5 803736e: f001 f9f3 bl 8038758 xSemaphoreGive(xTxSemaphore); 8037372: 4b04 ldr r3, [pc, #16] ; (8037384 ) 8037374: 4621 mov r1, r4 8037376: 6818 ldr r0, [r3, #0] 8037378: 4622 mov r2, r4 803737a: 4623 mov r3, r4 803737c: f7f3 feb4 bl 802b0e8 } return ERR_OK; } 8037380: 2000 movs r0, #0 8037382: bd70 pop {r4, r5, r6, pc} 8037384: 2000c824 .word 0x2000c824 8037388: 200103d8 .word 0x200103d8 0803738c : #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 803738c: 2373 movs r3, #115 ; 0x73 * @return ERR_OK if the loopif is initialized * ERR_MEM if private data couldn't be allocated * any other err_t on error */ err_t ethernetif_init(struct netif *netif) { 803738e: b530 push {r4, r5, lr} #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 8037390: f880 302e strb.w r3, [r0, #46] ; 0x2e netif->name[1] = IFNAME1; 8037394: 2374 movs r3, #116 ; 0x74 8037396: f880 302f strb.w r3, [r0, #47] ; 0x2f netif->output = etharp_output; 803739a: 4b37 ldr r3, [pc, #220] ; (8037478 ) netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; s_pxNetIf =netif; /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 803739c: 4d37 ldr r5, [pc, #220] ; (803747c ) #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; 803739e: 6143 str r3, [r0, #20] netif->linkoutput = low_level_output; 80373a0: 4b37 ldr r3, [pc, #220] ; (8037480 ) * @return ERR_OK if the loopif is initialized * ERR_MEM if private data couldn't be allocated * any other err_t on error */ err_t ethernetif_init(struct netif *netif) { 80373a2: b087 sub sp, #28 netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; netif->linkoutput = low_level_output; 80373a4: 6183 str r3, [r0, #24] { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 80373a6: 2306 movs r3, #6 * @return ERR_OK if the loopif is initialized * ERR_MEM if private data couldn't be allocated * any other err_t on error */ err_t ethernetif_init(struct netif *netif) { 80373a8: 4604 mov r4, r0 { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 80373aa: f880 3026 strb.w r3, [r0, #38] ; 0x26 /* set netif MAC hardware address */ SETTINGS_GetMac(mac); 80373ae: a804 add r0, sp, #16 80373b0: f7f1 fd58 bl 8028e64 netif->hwaddr[0] = mac[0]; 80373b4: f89d 3010 ldrb.w r3, [sp, #16] netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; s_pxNetIf =netif; /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 80373b8: 6829 ldr r1, [r5, #0] /* set netif MAC hardware address */ SETTINGS_GetMac(mac); netif->hwaddr[0] = mac[0]; 80373ba: f884 3027 strb.w r3, [r4, #39] ; 0x27 netif->hwaddr[1] = mac[1]; 80373be: f89d 3011 ldrb.w r3, [sp, #17] 80373c2: f884 3028 strb.w r3, [r4, #40] ; 0x28 netif->hwaddr[2] = mac[2]; 80373c6: f89d 3012 ldrb.w r3, [sp, #18] 80373ca: f884 3029 strb.w r3, [r4, #41] ; 0x29 netif->hwaddr[3] = mac[3]; 80373ce: f89d 3013 ldrb.w r3, [sp, #19] 80373d2: f884 302a strb.w r3, [r4, #42] ; 0x2a netif->hwaddr[4] = mac[4]; 80373d6: f89d 3014 ldrb.w r3, [sp, #20] 80373da: f884 302b strb.w r3, [r4, #43] ; 0x2b netif->hwaddr[5] = mac[5]; 80373de: f89d 3015 ldrb.w r3, [sp, #21] 80373e2: f884 302c strb.w r3, [r4, #44] ; 0x2c /* set netif maximum transfer unit */ netif->mtu = 1500; 80373e6: f240 53dc movw r3, #1500 ; 0x5dc 80373ea: 84a3 strh r3, [r4, #36] ; 0x24 /* Accept broadcast address and ARP traffic */ netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; 80373ec: 2322 movs r3, #34 ; 0x22 80373ee: f884 302d strb.w r3, [r4, #45] ; 0x2d s_pxNetIf =netif; 80373f2: 4b24 ldr r3, [pc, #144] ; (8037484 ) 80373f4: 601c str r4, [r3, #0] /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 80373f6: b919 cbnz r1, 8037400 { s_xSemaphore= xSemaphoreCreateCounting(20,0); 80373f8: 2014 movs r0, #20 80373fa: f7f3 fe5f bl 802b0bc 80373fe: 6028 str r0, [r5, #0] } /* initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(ETH_MAC_Address0, netif->hwaddr); 8037400: f104 0127 add.w r1, r4, #39 ; 0x27 8037404: 2000 movs r0, #0 8037406: f001 f93f bl 8038688 /* Initialize Tx Descriptors list: Chain Mode */ ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); 803740a: 481f ldr r0, [pc, #124] ; (8037488 ) 803740c: 491f ldr r1, [pc, #124] ; (803748c ) /* Enable Ethernet Rx interrrupt */ { for(i=0; i) /* initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(ETH_MAC_Address0, netif->hwaddr); /* Initialize Tx Descriptors list: Chain Mode */ ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); 8037410: 2205 movs r2, #5 8037412: f001 fa27 bl 8038864 /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); 8037416: 481e ldr r0, [pc, #120] ; (8037490 ) 8037418: 491e ldr r1, [pc, #120] ; (8037494 ) 803741a: 2205 movs r2, #5 803741c: f001 f9f6 bl 803880c /* Enable Ethernet Rx interrrupt */ { for(i=0; i /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); /* Enable Ethernet Rx interrrupt */ { for(i=0; i #ifdef CHECKSUM_BY_HARDWARE /* Enable the checksum insertion for the Tx frames */ { for(i=0; i) /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); /* Enable Ethernet Rx interrrupt */ { for(i=0; i } #ifdef CHECKSUM_BY_HARDWARE /* Enable the checksum insertion for the Tx frames */ { for(i=0; i } } #endif /* create the task that handles the ETH_MAC */ xTaskCreate(ethernetif_input, "Eth_if", netifINTERFACE_TASK_STACK_SIZE, NULL, 8037448: 2400 movs r4, #0 803744a: 2304 movs r3, #4 803744c: 2296 movs r2, #150 ; 0x96 803744e: e88d 0018 stmia.w sp, {r3, r4} 8037452: 4911 ldr r1, [pc, #68] ; (8037498 ) 8037454: 9402 str r4, [sp, #8] 8037456: 4623 mov r3, r4 8037458: 9403 str r4, [sp, #12] 803745a: 4810 ldr r0, [pc, #64] ; (803749c ) 803745c: f7f4 f88e bl 802b57c netifINTERFACE_TASK_PRIORITY,NULL); /* Enable MAC and DMA transmission and reception */ ETH_Start(); 8037460: f001 fa7c bl 803895c /* initialize the hardware */ low_level_init(netif); etharp_init(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8037464: f241 3088 movw r0, #5000 ; 0x1388 8037468: 490d ldr r1, [pc, #52] ; (80374a0 ) 803746a: 4622 mov r2, r4 803746c: f7fa fe92 bl 8032194 return ERR_OK; } 8037470: 4620 mov r0, r4 8037472: b007 add sp, #28 8037474: bd30 pop {r4, r5, pc} 8037476: bf00 nop 8037478: 08036f31 .word 0x08036f31 803747c: 2000c820 .word 0x2000c820 8037480: 0803731d .word 0x0803731d 8037484: 2000c81c .word 0x2000c81c 8037488: 200103dc .word 0x200103dc 803748c: 200122e8 .word 0x200122e8 8037490: 20012248 .word 0x20012248 8037494: 2001047c .word 0x2001047c 8037498: 0804507f .word 0x0804507f 803749c: 08037245 .word 0x08037245 80374a0: 08037229 .word 0x08037229 080374a4 : * int size -- Size of elements in the mailbox * Outputs: * sys_mbox_t -- Handle to new mailbox *---------------------------------------------------------------------------*/ err_t sys_mbox_new( sys_mbox_t *pxMailBox, int iSize ) { 80374a4: b510 push {r4, lr} err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 80374a6: 2200 movs r2, #0 * int size -- Size of elements in the mailbox * Outputs: * sys_mbox_t -- Handle to new mailbox *---------------------------------------------------------------------------*/ err_t sys_mbox_new( sys_mbox_t *pxMailBox, int iSize ) { 80374a8: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 80374aa: 4608 mov r0, r1 80374ac: 2104 movs r1, #4 80374ae: f7f3 fdde bl 802b06e 80374b2: 6020 str r0, [r4, #0] xReturn = ERR_OK; SYS_STATS_INC_USED( mbox ); } return xReturn; } 80374b4: 2800 cmp r0, #0 80374b6: bf14 ite ne 80374b8: 2000 movne r0, #0 80374ba: f06f 0000 mvneq.w r0, #0 80374be: bd10 pop {r4, pc} 080374c0 : * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80374c0: b51f push {r0, r1, r2, r3, r4, lr} err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80374c2: 4a0b ldr r2, [pc, #44] ; (80374f0 ) * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80374c4: 9101 str r1, [sp, #4] err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80374c6: 6812 ldr r2, [r2, #0] { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80374c8: 6800 ldr r0, [r0, #0] * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 80374ca: 2300 movs r3, #0 80374cc: 9303 str r3, [sp, #12] if( xInsideISR != pdFALSE ) { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80374ce: a901 add r1, sp, #4 err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80374d0: b11a cbz r2, 80374da { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80374d2: aa03 add r2, sp, #12 80374d4: f7f3 fecc bl 802b270 80374d8: e002 b.n 80374e0 } else { xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( TickType_t ) 0 ); 80374da: 4613 mov r3, r2 80374dc: f7f3 fe04 bl 802b0e8 80374e0: b2c0 uxtb r0, r0 xReturn = ERR_MEM; SYS_STATS_INC( mbox.err ); } return xReturn; } 80374e2: 3801 subs r0, #1 80374e4: bf18 it ne 80374e6: f06f 0000 mvnne.w r0, #0 80374ea: b005 add sp, #20 80374ec: bd00 pop {pc} 80374ee: bf00 nop 80374f0: 2000c828 .word 0x2000c828 080374f4 : * Outputs: * u32_t -- SYS_ARCH_TIMEOUT if timeout, else number * of milliseconds until received. *---------------------------------------------------------------------------*/ u32_t sys_arch_mbox_fetch( sys_mbox_t *pxMailBox, void **ppvBuffer, u32_t ulTimeOut ) { 80374f4: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 80374f8: 4607 mov r7, r0 80374fa: 460c mov r4, r1 80374fc: 4690 mov r8, r2 void *pvDummy; TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); 80374fe: f7f4 f9a5 bl 802b84c 8037502: 4605 mov r5, r0 if( NULL == ppvBuffer ) 8037504: b904 cbnz r4, 8037508 { ppvBuffer = &pvDummy; 8037506: ac01 add r4, sp, #4 } if( ulTimeOut != 0UL ) 8037508: f1b8 0f00 cmp.w r8, #0 803750c: d015 beq.n 803753a { configASSERT( xInsideISR == ( portBASE_TYPE ) 0 ); 803750e: 4b13 ldr r3, [pc, #76] ; (803755c ) 8037510: 681e ldr r6, [r3, #0] 8037512: b116 cbz r6, 803751a 8037514: f7f4 fd38 bl 802bf88 8037518: e7fe b.n 8037518 if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) ) 803751a: 6838 ldr r0, [r7, #0] 803751c: 4621 mov r1, r4 803751e: 4642 mov r2, r8 8037520: 4633 mov r3, r6 8037522: f7f3 ff21 bl 802b368 8037526: 2801 cmp r0, #1 8037528: d103 bne.n 8037532 { xEndTime = xTaskGetTickCount(); 803752a: f7f4 f98f bl 802b84c xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; 803752e: 1b40 subs r0, r0, r5 8037530: e011 b.n 8037556 ulReturn = xElapsed; } else { /* Timed out. */ *ppvBuffer = NULL; 8037532: 6026 str r6, [r4, #0] ulReturn = SYS_ARCH_TIMEOUT; 8037534: f04f 30ff mov.w r0, #4294967295 8037538: e00d b.n 8037556 } } else { while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) ); 803753a: 2300 movs r3, #0 803753c: 6838 ldr r0, [r7, #0] 803753e: 4621 mov r1, r4 8037540: f04f 32ff mov.w r2, #4294967295 8037544: f7f3 ff10 bl 802b368 8037548: 2801 cmp r0, #1 803754a: d1f6 bne.n 803753a xEndTime = xTaskGetTickCount(); 803754c: f7f4 f97e bl 802b84c xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) 8037550: 1b40 subs r0, r0, r5 8037552: bf08 it eq 8037554: 2001 moveq r0, #1 ulReturn = xElapsed; } return ulReturn; } 8037556: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 803755a: bf00 nop 803755c: 2000c828 .word 0x2000c828 08037560 : /** Create a new mutex * @param mutex pointer to the mutex to create * @return a new mutex */ err_t sys_mutex_new( sys_mutex_t *pxMutex ) { 8037560: b510 push {r4, lr} 8037562: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMutex = xSemaphoreCreateMutex(); 8037564: 2001 movs r0, #1 8037566: f7f3 fe59 bl 802b21c 803756a: 6020 str r0, [r4, #0] { SYS_STATS_INC( mutex.err ); } return xReturn; } 803756c: 2800 cmp r0, #0 803756e: bf14 ite ne 8037570: 2000 movne r0, #0 8037572: f06f 0000 mvneq.w r0, #0 8037576: bd10 pop {r4, pc} 08037578 : /** Lock a mutex * @param mutex the mutex to lock */ void sys_mutex_lock( sys_mutex_t *pxMutex ) { 8037578: b510 push {r4, lr} 803757a: 4604 mov r4, r0 while( xSemaphoreTake( *pxMutex, portMAX_DELAY ) != pdPASS ); 803757c: 2100 movs r1, #0 803757e: 6820 ldr r0, [r4, #0] 8037580: f04f 32ff mov.w r2, #4294967295 8037584: 460b mov r3, r1 8037586: f7f3 feef bl 802b368 803758a: 2801 cmp r0, #1 803758c: d1f6 bne.n 803757c } 803758e: bd10 pop {r4, pc} 08037590 : /** Unlock a mutex * @param mutex the mutex to unlock */ void sys_mutex_unlock(sys_mutex_t *pxMutex ) { xSemaphoreGive( *pxMutex ); 8037590: 2100 movs r1, #0 8037592: 6800 ldr r0, [r0, #0] 8037594: 460a mov r2, r1 8037596: 460b mov r3, r1 8037598: f7f3 bda6 b.w 802b0e8 0803759c : *---------------------------------------------------------------------------* * Description: * Initialize sys arch *---------------------------------------------------------------------------*/ void sys_init(void) { 803759c: 4770 bx lr 0803759e : } u32_t sys_now(void) { return xTaskGetTickCount(); 803759e: f7f4 b955 b.w 802b84c 080375a2 : * int prio -- Thread priority * Outputs: * sys_thread_t -- Pointer to per-thread timeouts. *---------------------------------------------------------------------------*/ sys_thread_t sys_thread_new( const char *pcName, void( *pxThread )( void *pvParameters ), void *pvArg, int iStackSize, int iPriority ) { 80375a2: b570 push {r4, r5, r6, lr} 80375a4: b086 sub sp, #24 80375a6: 4606 mov r6, r0 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 80375a8: 9c0a ldr r4, [sp, #40] ; 0x28 * int prio -- Thread priority * Outputs: * sys_thread_t -- Pointer to per-thread timeouts. *---------------------------------------------------------------------------*/ sys_thread_t sys_thread_new( const char *pcName, void( *pxThread )( void *pvParameters ), void *pvArg, int iStackSize, int iPriority ) { 80375aa: 4615 mov r5, r2 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 80375ac: 9400 str r4, [sp, #0] 80375ae: aa05 add r2, sp, #20 80375b0: 2400 movs r4, #0 80375b2: 9201 str r2, [sp, #4] 80375b4: 9402 str r4, [sp, #8] 80375b6: b29a uxth r2, r3 80375b8: 9403 str r4, [sp, #12] 80375ba: 4608 mov r0, r1 80375bc: 462b mov r3, r5 80375be: 4631 mov r1, r6 80375c0: f7f3 ffdc bl 802b57c if( xResult == pdPASS ) 80375c4: 2801 cmp r0, #1 { xReturn = xCreatedTask; 80375c6: bf0c ite eq 80375c8: 9805 ldreq r0, [sp, #20] } else { xReturn = NULL; 80375ca: 4620 movne r0, r4 } return xReturn; } 80375cc: b006 add sp, #24 80375ce: bd70 pop {r4, r5, r6, pc} 080375d0 : * operating system. * Outputs: * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ sys_prot_t sys_arch_protect( void ) { 80375d0: b508 push {r3, lr} if( xInsideISR == pdFALSE ) 80375d2: 4b03 ldr r3, [pc, #12] ; (80375e0 ) 80375d4: 681b ldr r3, [r3, #0] 80375d6: b90b cbnz r3, 80375dc { taskENTER_CRITICAL(); 80375d8: f7f4 fcde bl 802bf98 } return ( sys_prot_t ) 1; } 80375dc: 2001 movs r0, #1 80375de: bd08 pop {r3, pc} 80375e0: 2000c828 .word 0x2000c828 080375e4 : * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ void sys_arch_unprotect( sys_prot_t xValue ) { (void) xValue; if( xInsideISR == pdFALSE ) 80375e4: 4b02 ldr r3, [pc, #8] ; (80375f0 ) 80375e6: 681b ldr r3, [r3, #0] 80375e8: b90b cbnz r3, 80375ee { taskEXIT_CRITICAL(); 80375ea: f7f4 bd01 b.w 802bff0 80375ee: 4770 bx lr 80375f0: 2000c828 .word 0x2000c828 080375f4 : * Если флаг не устанавливается в положенное время, то сбрасывается * флаг sSettings.sFlags.netsettingsChanged, сохраняется вся структура * настроек в памяти и контроллер перезагружается. */ void vTaskWebReinit(void * pvParameters) { 80375f4: b538 push {r3, r4, r5, lr} static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 80375f6: 4c1b ldr r4, [pc, #108] ; (8037664 ) if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 80375f8: 4d1b ldr r5, [pc, #108] ; (8037668 ) static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 80375fa: 8823 ldrh r3, [r4, #0] 80375fc: 1c5a adds r2, r3, #1 80375fe: f5b3 7f16 cmp.w r3, #600 ; 0x258 8037602: 8022 strh r2, [r4, #0] 8037604: d90a bls.n 803761c { SetWebReinitFlag(false); 8037606: 2000 movs r0, #0 8037608: f7f0 ffda bl 80285c0 HTTP_SaveSettings(); 803760c: f7f7 f92c bl 802e868 vTaskDelay(1010); 8037610: f240 30f2 movw r0, #1010 ; 0x3f2 8037614: f7f4 fa4c bl 802bab0 Reboot(); 8037618: f7f2 f92a bl 8029870 } if (fConfirmWebParams) 803761c: 4b13 ldr r3, [pc, #76] ; (803766c ) 803761e: 781a ldrb r2, [r3, #0] 8037620: b1d2 cbz r2, 8037658 { fConfirmWebParams = false; 8037622: 2200 movs r2, #0 /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037624: 4812 ldr r0, [pc, #72] ; (8037670 ) Reboot(); } if (fConfirmWebParams) { fConfirmWebParams = false; 8037626: 701a strb r2, [r3, #0] /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037628: f895 3063 ldrb.w r3, [r5, #99] ; 0x63 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 803762c: f100 0131 add.w r1, r0, #49 ; 0x31 if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8037630: f885 3032 strb.w r3, [r5, #50] ; 0x32 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8037634: f7ea fd6a bl 802210c strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); 8037638: 480e ldr r0, [pc, #56] ; (8037674 ) 803763a: f100 0131 add.w r1, r0, #49 ; 0x31 803763e: f7ea fd65 bl 802210c strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 8037642: 480d ldr r0, [pc, #52] ; (8037678 ) 8037644: f100 0131 add.w r1, r0, #49 ; 0x31 8037648: f7ea fd60 bl 802210c HTTP_SaveSettings(); 803764c: f7f7 f90c bl 802e868 vTaskDelete(xHandleWebReinit); 8037650: 4b0a ldr r3, [pc, #40] ; (803767c ) 8037652: 6818 ldr r0, [r3, #0] 8037654: f7f4 f86a bl 802b72c } vTaskDelay(1000); 8037658: f44f 707a mov.w r0, #1000 ; 0x3e8 803765c: f7f4 fa28 bl 802bab0 } 8037660: e7cb b.n 80375fa 8037662: bf00 nop 8037664: 2000c838 .word 0x2000c838 8037668: 2000d414 .word 0x2000d414 803766c: 20000b2c .word 0x20000b2c 8037670: 2000d416 .word 0x2000d416 8037674: 2000d426 .word 0x2000d426 8037678: 2000d436 .word 0x2000d436 803767c: 2000c830 .word 0x2000c830 08037680 : * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8037680: b530 push {r4, r5, lr} DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); if (sSettings.sFlags.netsettingsChanged == true) 8037682: 4d48 ldr r5, [pc, #288] ; (80377a4 ) * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8037684: b085 sub sp, #20 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; uint8_t DHCP_state; DHCP_state = DHCP_START; 8037686: 2400 movs r4, #0 for (;;) { switch (DHCP_state) 8037688: b11c cbz r4, 8037692 803768a: 2c01 cmp r4, #1 803768c: f040 8085 bne.w 803779a 8037690: e004 b.n 803769c { case DHCP_START: { dhcp_start(&xnetif); 8037692: 4845 ldr r0, [pc, #276] ; (80377a8 ) 8037694: f7f7 fffc bl 802f690 DHCP_state = DHCP_WAIT_ADDRESS; 8037698: 2401 movs r4, #1 //PRINT_USART("\n\rLooking for DHCP server please wait...\n\r"); } break; 803769a: e07e b.n 803779a case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 803769c: 4842 ldr r0, [pc, #264] ; (80377a8 ) netmask = xnetif.netmask; 803769e: 6882 ldr r2, [r0, #8] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 80376a0: 6843 ldr r3, [r0, #4] netmask = xnetif.netmask; 80376a2: 9202 str r2, [sp, #8] gw = xnetif.gw; 80376a4: 68c2 ldr r2, [r0, #12] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 80376a6: 9301 str r3, [sp, #4] netmask = xnetif.netmask; gw = xnetif.gw; 80376a8: 9203 str r2, [sp, #12] if (ipaddr.addr != 0) 80376aa: 2b00 cmp r3, #0 80376ac: d045 beq.n 803773a { DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); 80376ae: f7f7 ffd7 bl 802f660 /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 80376b2: f895 3120 ldrb.w r3, [r5, #288] ; 0x120 { sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 80376b6: a801 add r0, sp, #4 DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 80376b8: b103 cbz r3, 80376bc 80376ba: e01b b.n 80376f4 sprintf(sSettings.sWebTempParams.mask, "%s", ipaddr_ntoa(&netmask)); sprintf(sSettings.sWebTempParams.gate, "%s", ipaddr_ntoa(&gw)); } else { sprintf(sSettings.sWebParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 80376bc: f7fb fa68 bl 8032b90 80376c0: 493a ldr r1, [pc, #232] ; (80377ac ) 80376c2: 4602 mov r2, r0 80376c4: 483a ldr r0, [pc, #232] ; (80377b0 ) 80376c6: f7f0 fb0f bl 8027ce8 sprintf(sSettings.sWebParams.mask, "%s", ipaddr_ntoa(&netmask)); 80376ca: a802 add r0, sp, #8 80376cc: f7fb fa60 bl 8032b90 80376d0: 4936 ldr r1, [pc, #216] ; (80377ac ) 80376d2: 4602 mov r2, r0 80376d4: 4837 ldr r0, [pc, #220] ; (80377b4 ) 80376d6: f7f0 fb07 bl 8027ce8 sprintf(sSettings.sWebParams.gate, "%s", ipaddr_ntoa(&gw)); 80376da: a803 add r0, sp, #12 80376dc: f7fb fa58 bl 8032b90 80376e0: 4932 ldr r1, [pc, #200] ; (80377ac ) 80376e2: 4602 mov r2, r0 80376e4: 4834 ldr r0, [pc, #208] ; (80377b8 ) 80376e6: f7f0 faff bl 8027ce8 /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 80376ea: f895 3032 ldrb.w r3, [r5, #50] ; 0x32 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 80376ee: a801 add r0, sp, #4 sprintf(sSettings.sWebParams.ip, "%s", ipaddr_ntoa(&ipaddr)); sprintf(sSettings.sWebParams.mask, "%s", ipaddr_ntoa(&netmask)); sprintf(sSettings.sWebParams.gate, "%s", ipaddr_ntoa(&gw)); /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 80376f0: f885 3063 strb.w r3, [r5, #99] ; 0x63 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 80376f4: f7fb fa4c bl 8032b90 80376f8: 492c ldr r1, [pc, #176] ; (80377ac ) 80376fa: 4602 mov r2, r0 80376fc: 482f ldr r0, [pc, #188] ; (80377bc ) 80376fe: f7f0 faf3 bl 8027ce8 sprintf(sSettings.sWebTempParams.mask, "%s", ipaddr_ntoa(&netmask)); 8037702: a802 add r0, sp, #8 8037704: f7fb fa44 bl 8032b90 8037708: 4928 ldr r1, [pc, #160] ; (80377ac ) 803770a: 4602 mov r2, r0 803770c: 482c ldr r0, [pc, #176] ; (80377c0 ) 803770e: f7f0 faeb bl 8027ce8 sprintf(sSettings.sWebTempParams.gate, "%s", ipaddr_ntoa(&gw)); 8037712: a803 add r0, sp, #12 8037714: f7fb fa3c bl 8032b90 8037718: 4924 ldr r1, [pc, #144] ; (80377ac ) 803771a: 4602 mov r2, r0 803771c: 4829 ldr r0, [pc, #164] ; (80377c4 ) 803771e: f7f0 fae3 bl 8027ce8 PRINT_USART("Gateway: "); PRINT_USART(ipaddr_ntoa(&gw)); PRINT_USART("\n\r"); vTaskDelay(50); 8037722: 2032 movs r0, #50 ; 0x32 8037724: f7f4 f9c4 bl 802bab0 /* Установлен динамический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8037728: 2004 movs r0, #4 803772a: f000 fad9 bl 8037ce0 vTaskDelete(xHandleDHCP); 803772e: 4b26 ldr r3, [pc, #152] ; (80377c8 ) 8037730: 6818 ldr r0, [r3, #0] 8037732: f7f3 fffb bl 802b72c netmask = xnetif.netmask; gw = xnetif.gw; if (ipaddr.addr != 0) { DHCP_state = DHCP_ADDRESS_ASSIGNED; 8037736: 2402 movs r4, #2 8037738: e02f b.n 803779a vTaskDelete(xHandleDHCP); } else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) 803773a: 6a03 ldr r3, [r0, #32] 803773c: 7b5b ldrb r3, [r3, #13] 803773e: 2b03 cmp r3, #3 8037740: d92b bls.n 803779a { DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); 8037742: f7f7 ff8d bl 802f660 if (sSettings.sFlags.netsettingsChanged == true) 8037746: f895 3120 ldrb.w r3, [r5, #288] ; 0x120 803774a: b14b cbz r3, 8037760 { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 803774c: 481b ldr r0, [pc, #108] ; (80377bc ) 803774e: f7fb f9cc bl 8032aea 8037752: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 8037754: 481a ldr r0, [pc, #104] ; (80377c0 ) 8037756: f7fb f9c8 bl 8032aea 803775a: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 803775c: 4819 ldr r0, [pc, #100] ; (80377c4 ) 803775e: e008 b.n 8037772 } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 8037760: 4813 ldr r0, [pc, #76] ; (80377b0 ) 8037762: f7fb f9c2 bl 8032aea 8037766: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8037768: 4812 ldr r0, [pc, #72] ; (80377b4 ) 803776a: f7fb f9be bl 8032aea 803776e: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 8037770: 4811 ldr r0, [pc, #68] ; (80377b8 ) 8037772: f7fb f9ba bl 8032aea } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 8037776: a901 add r1, sp, #4 8037778: aa02 add r2, sp, #8 803777a: ab03 add r3, sp, #12 } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 803777c: 9003 str r0, [sp, #12] } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 803777e: 480a ldr r0, [pc, #40] ; (80377a8 ) 8037780: f7f8 f9de bl 802fb40 PRINT_USART("DHCP timeout\n\r"); PRINT_USART("\n\rStatic IP address\n\r"); PRINT_USART(ipaddr_ntoa(&ipaddr)); PRINT_USART("\n\r"); vTaskDelay(50); 8037784: 2032 movs r0, #50 ; 0x32 8037786: f7f4 f993 bl 802bab0 /* Установлен статический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 803778a: 2004 movs r0, #4 803778c: f000 faa8 bl 8037ce0 vTaskDelete(xHandleDHCP); 8037790: 4b0d ldr r3, [pc, #52] ; (80377c8 ) 8037792: 6818 ldr r0, [r3, #0] 8037794: f7f3 ffca bl 802b72c else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) { DHCP_state = DHCP_TIMEOUT; 8037798: 2403 movs r4, #3 break; default: break; } vTaskDelay(250); 803779a: 20fa movs r0, #250 ; 0xfa 803779c: f7f4 f988 bl 802bab0 } 80377a0: e772 b.n 8037688 80377a2: bf00 nop 80377a4: 2000d414 .word 0x2000d414 80377a8: 200100d0 .word 0x200100d0 80377ac: 080402f4 .word 0x080402f4 80377b0: 2000d416 .word 0x2000d416 80377b4: 2000d436 .word 0x2000d436 80377b8: 2000d426 .word 0x2000d426 80377bc: 2000d447 .word 0x2000d447 80377c0: 2000d467 .word 0x2000d467 80377c4: 2000d457 .word 0x2000d457 80377c8: 2000c834 .word 0x2000c834 080377cc : TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 80377cc: b530 push {r4, r5, lr} struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 80377ce: 2000 movs r0, #0 /* Если настройки изменили, то используем временные параметры */ if (sSettings.sFlags.netsettingsChanged == true) 80377d0: 4c50 ldr r4, [pc, #320] ; (8037914 ) TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 80377d2: b08d sub sp, #52 ; 0x34 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 80377d4: 4601 mov r1, r0 80377d6: f7f7 f8f7 bl 802e9c8 /* Если настройки изменили, то используем временные параметры */ if (sSettings.sFlags.netsettingsChanged == true) 80377da: f894 3120 ldrb.w r3, [r4, #288] ; 0x120 80377de: 2b00 cmp r3, #0 80377e0: d032 beq.n 8037848 { if (sSettings.sWebTempParams.dhcpEnable) 80377e2: f894 5063 ldrb.w r5, [r4, #99] ; 0x63 80377e6: b12d cbz r5, 80377f4 { ipaddr.addr = 0; 80377e8: 2300 movs r3, #0 80377ea: 9304 str r3, [sp, #16] netmask.addr = 0; 80377ec: 9305 str r3, [sp, #20] gw.addr = 0; 80377ee: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 80377f0: 9300 str r3, [sp, #0] 80377f2: e015 b.n 8037820 netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 80377f4: f104 0033 add.w r0, r4, #51 ; 0x33 80377f8: f7fb f977 bl 8032aea 80377fc: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 80377fe: f104 0053 add.w r0, r4, #83 ; 0x53 8037802: f7fb f972 bl 8032aea 8037806: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037808: f104 0043 add.w r0, r4, #67 ; 0x43 803780c: f7fb f96d bl 8032aea sprintf(str, " %s\n\r", sSettings.sWebTempParams.ip); 8037810: 4941 ldr r1, [pc, #260] ; (8037918 ) } else { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8037812: 9006 str r0, [sp, #24] sprintf(str, " %s\n\r", sSettings.sWebTempParams.ip); 8037814: f104 0233 add.w r2, r4, #51 ; 0x33 8037818: a807 add r0, sp, #28 803781a: f7f0 fa65 bl 8027ce8 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 803781e: 9500 str r5, [sp, #0] 8037820: 4b3e ldr r3, [pc, #248] ; (803791c ) 8037822: 483f ldr r0, [pc, #252] ; (8037920 ) 8037824: 9301 str r3, [sp, #4] 8037826: 4b3f ldr r3, [pc, #252] ; (8037924 ) 8037828: a904 add r1, sp, #16 803782a: aa05 add r2, sp, #20 803782c: 9302 str r3, [sp, #8] 803782e: ab06 add r3, sp, #24 8037830: f7f8 f994 bl 802fb5c netif_set_default(&xnetif); 8037834: 483a ldr r0, [pc, #232] ; (8037920 ) 8037836: f7f8 f9b9 bl 802fbac netif_set_up(&xnetif); 803783a: 4839 ldr r0, [pc, #228] ; (8037920 ) 803783c: f7f8 f9c6 bl 802fbcc } if (sSettings.sWebTempParams.dhcpEnable) { 8037840: 4b34 ldr r3, [pc, #208] ; (8037914 ) 8037842: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 8037846: e043 b.n 80378d0 } } /* Настройки не менялись, используем обычне настройки из флеш памяти */ else { if (sSettings.sWebParams.dhcpEnable) 8037848: f894 5032 ldrb.w r5, [r4, #50] ; 0x32 803784c: b125 cbz r5, 8037858 { ipaddr.addr = 0; 803784e: 9304 str r3, [sp, #16] netmask.addr = 0; 8037850: 9305 str r3, [sp, #20] gw.addr = 0; 8037852: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8037854: 9300 str r3, [sp, #0] 8037856: e028 b.n 80378aa netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 8037858: 1ca0 adds r0, r4, #2 803785a: f7fb f946 bl 8032aea 803785e: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8037860: f104 0022 add.w r0, r4, #34 ; 0x22 8037864: f7fb f941 bl 8032aea 8037868: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 803786a: f104 0012 add.w r0, r4, #18 803786e: f7fb f93c bl 8032aea /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 8037872: f894 3032 ldrb.w r3, [r4, #50] ; 0x32 } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 8037876: 9006 str r0, [sp, #24] /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 8037878: 1ca1 adds r1, r4, #2 803787a: f104 0033 add.w r0, r4, #51 ; 0x33 ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); gw.addr = ipaddr_addr(sSettings.sWebParams.gate); /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 803787e: f884 3063 strb.w r3, [r4, #99] ; 0x63 strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 8037882: f7ea fc43 bl 802210c strcpy(sSettings.sWebTempParams.mask, sSettings.sWebParams.mask); 8037886: f104 0122 add.w r1, r4, #34 ; 0x22 803788a: f104 0053 add.w r0, r4, #83 ; 0x53 803788e: f7ea fc3d bl 802210c strcpy(sSettings.sWebTempParams.gate, sSettings.sWebParams.gate); 8037892: f104 0112 add.w r1, r4, #18 8037896: f104 0043 add.w r0, r4, #67 ; 0x43 803789a: f7ea fc37 bl 802210c sprintf(str, " %s\n\r", sSettings.sWebParams.ip); 803789e: a807 add r0, sp, #28 80378a0: 491d ldr r1, [pc, #116] ; (8037918 ) 80378a2: 1ca2 adds r2, r4, #2 80378a4: f7f0 fa20 bl 8027ce8 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 80378a8: 9500 str r5, [sp, #0] 80378aa: 4b1c ldr r3, [pc, #112] ; (803791c ) 80378ac: 481c ldr r0, [pc, #112] ; (8037920 ) 80378ae: 9301 str r3, [sp, #4] 80378b0: 4b1c ldr r3, [pc, #112] ; (8037924 ) 80378b2: a904 add r1, sp, #16 80378b4: aa05 add r2, sp, #20 80378b6: 9302 str r3, [sp, #8] 80378b8: ab06 add r3, sp, #24 80378ba: f7f8 f94f bl 802fb5c netif_set_default(&xnetif); 80378be: 4818 ldr r0, [pc, #96] ; (8037920 ) 80378c0: f7f8 f974 bl 802fbac netif_set_up(&xnetif); 80378c4: 4816 ldr r0, [pc, #88] ; (8037920 ) 80378c6: f7f8 f981 bl 802fbcc } if (sSettings.sWebParams.dhcpEnable) { 80378ca: 4b12 ldr r3, [pc, #72] ; (8037914 ) 80378cc: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 80378d0: b17b cbz r3, 80378f2 xTaskCreate(LwIP_DHCP_task, "DHCPClient", configMINIMAL_STACK_SIZE * 2, NULL, 80378d2: 2302 movs r3, #2 80378d4: 9300 str r3, [sp, #0] 80378d6: 4b14 ldr r3, [pc, #80] ; (8037928 ) 80378d8: 4814 ldr r0, [pc, #80] ; (803792c ) 80378da: 9301 str r3, [sp, #4] 80378dc: 2300 movs r3, #0 80378de: 9302 str r3, [sp, #8] 80378e0: 9303 str r3, [sp, #12] 80378e2: f44f 7280 mov.w r2, #256 ; 0x100 80378e6: 4912 ldr r1, [pc, #72] ; (8037930 ) 80378e8: f7f3 fe48 bl 802b57c tskIDLE_PRIORITY + 2, &xHandleDHCP); dhcp = true; 80378ec: 4b11 ldr r3, [pc, #68] ; (8037934 ) 80378ee: 2201 movs r2, #1 80378f0: 701a strb r2, [r3, #0] } } /* Если настройки изменились, запускаем задачу по отсчету времени реакции пользователя*/ if (sSettings.sFlags.netsettingsChanged == true) 80378f2: 4b08 ldr r3, [pc, #32] ; (8037914 ) 80378f4: f893 3120 ldrb.w r3, [r3, #288] ; 0x120 80378f8: b153 cbz r3, 8037910 xTaskCreate(vTaskWebReinit, "webReinit", configMINIMAL_STACK_SIZE, NULL, 80378fa: 4a0f ldr r2, [pc, #60] ; (8037938 ) 80378fc: 480f ldr r0, [pc, #60] ; (803793c ) 80378fe: 9201 str r2, [sp, #4] 8037900: 2300 movs r3, #0 8037902: 9300 str r3, [sp, #0] 8037904: 9302 str r3, [sp, #8] 8037906: 9303 str r3, [sp, #12] 8037908: 490d ldr r1, [pc, #52] ; (8037940 ) 803790a: 2280 movs r2, #128 ; 0x80 803790c: f7f3 fe36 bl 802b57c tskIDLE_PRIORITY, &xHandleWebReinit); } 8037910: b00d add sp, #52 ; 0x34 8037912: bd30 pop {r4, r5, pc} 8037914: 2000d414 .word 0x2000d414 8037918: 08045086 .word 0x08045086 803791c: 0803738d .word 0x0803738d 8037920: 200100d0 .word 0x200100d0 8037924: 0802e989 .word 0x0802e989 8037928: 2000c834 .word 0x2000c834 803792c: 08037681 .word 0x08037681 8037930: 0804508c .word 0x0804508c 8037934: 2000c82c .word 0x2000c82c 8037938: 2000c830 .word 0x2000c830 803793c: 080375f5 .word 0x080375f5 8037940: 08045097 .word 0x08045097 08037944 : /** * @brief Возвращает true если сетевые параметры изменились */ bool GetStateWebReinit(void) { 8037944: b510 push {r4, lr} /* Статус dhcp изменился? */ if (sSettings.sWebParams.dhcpEnable != sSettings.sWebTempParams.dhcpEnable) 8037946: 4c12 ldr r4, [pc, #72] ; (8037990 ) 8037948: f894 2032 ldrb.w r2, [r4, #50] ; 0x32 803794c: f894 3063 ldrb.w r3, [r4, #99] ; 0x63 8037950: 429a cmp r2, r3 8037952: d004 beq.n 803795e { /* Включили dhcp */ if (sSettings.sWebTempParams.dhcpEnable == 1) { /* Устанавилваем флаг */ SetWebReinitFlag(true); 8037954: 2001 movs r0, #1 8037956: f7f0 fe33 bl 80285c0 return true; 803795a: 2001 movs r0, #1 803795c: bd10 pop {r4, pc} return true; } } /* Изменился IP? */ if (strstr(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip) == 0) 803795e: 1ca0 adds r0, r4, #2 8037960: f104 0133 add.w r1, r4, #51 ; 0x33 8037964: f7ea feb0 bl 80226c8 8037968: 2800 cmp r0, #0 803796a: d0f3 beq.n 8037954 SetWebReinitFlag(true); return true; } /* Изменился шлюз? */ if (strstr(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate) == 0) 803796c: f104 0012 add.w r0, r4, #18 8037970: f104 0143 add.w r1, r4, #67 ; 0x43 8037974: f7ea fea8 bl 80226c8 8037978: 2800 cmp r0, #0 803797a: d0eb beq.n 8037954 SetWebReinitFlag(true); return true; } /* Изменилась маска? */ if (strstr(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask) == 0) 803797c: f104 0022 add.w r0, r4, #34 ; 0x22 8037980: f104 0153 add.w r1, r4, #83 ; 0x53 8037984: f7ea fea0 bl 80226c8 8037988: 2800 cmp r0, #0 803798a: d0e3 beq.n 8037954 /* Устанавилваем флаг */ SetWebReinitFlag(true); return true; } return false; 803798c: 2000 movs r0, #0 } 803798e: bd10 pop {r4, pc} 8037990: 2000d414 .word 0x2000d414 08037994 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_set_value (struct obj_def *od, u16_t len, void *value) { 8037994: b530 push {r4, r5, lr} 8037996: 4605 mov r5, r0 8037998: b087 sub sp, #28 803799a: 4614 mov r4, r2 uint32_t val; char *val_string; char str[20]; int8_t res = 0; memset(str, 0, 20); 803799c: a801 add r0, sp, #4 803799e: 2100 movs r1, #0 80379a0: 2214 movs r2, #20 80379a2: f7ea fa39 bl 8021e18 id = od->id_inst_ptr[0]; 80379a6: 68ab ldr r3, [r5, #8] switch (id) 80379a8: 781b ldrb r3, [r3, #0] 80379aa: 3b02 subs r3, #2 80379ac: 2b06 cmp r3, #6 80379ae: f200 8081 bhi.w 8037ab4 80379b2: e8df f003 tbb [pc, r3] 80379b6: 0a04 .short 0x0a04 80379b8: 3e27117f .word 0x3e27117f 80379bc: 60 .byte 0x60 80379bd: 00 .byte 0x00 { case 2: /* RestoreSignal */ val = *((s32_t*)value); if (val == 1) { 80379be: 6823 ldr r3, [r4, #0] 80379c0: 2b01 cmp r3, #1 80379c2: d177 bne.n 8037ab4 HTTP_ResetSettings(); 80379c4: f7f6 ff3c bl 802e840 80379c8: e074 b.n 8037ab4 } break; case 3: /* RebootSignal */ val = *((s32_t*)value); if (val == 1) 80379ca: 6823 ldr r3, [r4, #0] 80379cc: 2b01 cmp r3, #1 80379ce: d171 bne.n 8037ab4 HTTP_StartResetTask(false); 80379d0: 2000 movs r0, #0 80379d2: f7f6 ff7f bl 802e8d4 80379d6: e06d b.n 8037ab4 break; case 5: /* DO1 */ if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET){ 80379d8: 4b37 ldr r3, [pc, #220] ; (8037ab8 ) 80379da: f893 3374 ldrb.w r3, [r3, #884] ; 0x374 80379de: 2b03 cmp r3, #3 80379e0: d168 bne.n 8037ab4 val_string = (char*)value; SetROStr(val_string, 0); 80379e2: 2100 movs r1, #0 80379e4: 4620 mov r0, r4 80379e6: f7f0 ffc5 bl 8028974 if(val_string[0] == 0x31) 80379ea: 7823 ldrb r3, [r4, #0] 80379ec: 2b31 cmp r3, #49 ; 0x31 strcat(str, "Замкнуто"); 80379ee: bf0c ite eq 80379f0: 4932 ldreq r1, [pc, #200] ; (8037abc ) else strcat(str, "Разомкнуто"); 80379f2: 4933 ldrne r1, [pc, #204] ; (8037ac0 ) case 5: /* DO1 */ if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET){ val_string = (char*)value; SetROStr(val_string, 0); if(val_string[0] == 0x31) strcat(str, "Замкнуто"); 80379f4: a801 add r0, sp, #4 else strcat(str, "Разомкнуто"); 80379f6: f7ea fa75 bl 8021ee4 SNMP_SendUserTrap(DO0_TOGGLED); 80379fa: 2007 movs r0, #7 80379fc: f000 f970 bl 8037ce0 log_event_data(LOG_DO0_STATE, str); 8037a00: 2009 movs r0, #9 8037a02: e014 b.n 8037a2e } break; case 6: /* DO2 */ if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET){ 8037a04: 4b2c ldr r3, [pc, #176] ; (8037ab8 ) 8037a06: f893 3375 ldrb.w r3, [r3, #885] ; 0x375 8037a0a: 2b03 cmp r3, #3 8037a0c: d152 bne.n 8037ab4 val_string = (char*)value; SetROStr(val_string, 1); 8037a0e: 2101 movs r1, #1 8037a10: 4620 mov r0, r4 8037a12: f7f0 ffaf bl 8028974 if(val_string[0] == 0x31) 8037a16: 7823 ldrb r3, [r4, #0] 8037a18: 2b31 cmp r3, #49 ; 0x31 strcat(str, "Замкнуто"); 8037a1a: bf0c ite eq 8037a1c: 4927 ldreq r1, [pc, #156] ; (8037abc ) else strcat(str, "Разомкнуто"); 8037a1e: 4928 ldrne r1, [pc, #160] ; (8037ac0 ) case 6: /* DO2 */ if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET){ val_string = (char*)value; SetROStr(val_string, 1); if(val_string[0] == 0x31) strcat(str, "Замкнуто"); 8037a20: a801 add r0, sp, #4 else strcat(str, "Разомкнуто"); 8037a22: f7ea fa5f bl 8021ee4 SNMP_SendUserTrap(DO1_TOGGLED); 8037a26: 2008 movs r0, #8 8037a28: f000 f95a bl 8037ce0 log_event_data(LOG_DO1_STATE, str); 8037a2c: 200a movs r0, #10 8037a2e: a901 add r1, sp, #4 8037a30: e03e b.n 8037ab0 } break; case 7: /* BatTest */ val =*((s32_t*)value); 8037a32: 6823 ldr r3, [r4, #0] if(val == 0){ 8037a34: b93b cbnz r3, 8037a46 res = ups_metac_service_pdu(ups_cancel_test); 8037a36: 2008 movs r0, #8 8037a38: f7f1 fecc bl 80297d4 if(res == 1){ 8037a3c: b240 sxtb r0, r0 8037a3e: 2801 cmp r0, #1 8037a40: d138 bne.n 8037ab4 log_event_data(LOG_TEST_UPS, "Администратор(Останов)"); 8037a42: 2006 movs r0, #6 8037a44: e028 b.n 8037a98 } } else if(val > 0 && val < 100){ 8037a46: 1e5a subs r2, r3, #1 8037a48: 2a62 cmp r2, #98 ; 0x62 8037a4a: d80a bhi.n 8037a62 TimeParam = val; 8037a4c: 4a1d ldr r2, [pc, #116] ; (8037ac4 ) res = ups_metac_service_pdu(ups_test_time); 8037a4e: 2003 movs r0, #3 if(res == 1){ log_event_data(LOG_TEST_UPS, "Администратор(Останов)"); } } else if(val > 0 && val < 100){ TimeParam = val; 8037a50: 8013 strh r3, [r2, #0] res = ups_metac_service_pdu(ups_test_time); 8037a52: f7f1 febf bl 80297d4 if(res == 1){ 8037a56: b240 sxtb r0, r0 8037a58: 2801 cmp r0, #1 8037a5a: d12b bne.n 8037ab4 log_event_data(LOG_TEST_UPS, "Администратор (Запущен)"); 8037a5c: 2006 movs r0, #6 8037a5e: 491a ldr r1, [pc, #104] ; (8037ac8 ) 8037a60: e026 b.n 8037ab0 } } else if(val == 100){ 8037a62: 2b64 cmp r3, #100 ; 0x64 8037a64: d101 bne.n 8037a6a res = ups_metac_service_pdu(ups_test_10sec); 8037a66: 2001 movs r0, #1 8037a68: e7f3 b.n 8037a52 if(res == 1){ log_event_data(LOG_TEST_UPS, "Администратор (Запущен)"); } } else if(val == 999){ 8037a6a: f240 32e7 movw r2, #999 ; 0x3e7 8037a6e: 4293 cmp r3, r2 8037a70: d120 bne.n 8037ab4 res = ups_metac_service_pdu(ups_test_low_bat); 8037a72: 2002 movs r0, #2 8037a74: e7ed b.n 8037a52 } } break; case 8: /* Shutdown UPS */ val_string = (char*)value; float shtdn_val = atof(val_string); 8037a76: 4620 mov r0, r4 8037a78: f7ea f8aa bl 8021bd0 8037a7c: f7e9 f8be bl 8020bfc <__aeabi_d2f> if(shtdn_val == 0){ 8037a80: 2100 movs r1, #0 } } break; case 8: /* Shutdown UPS */ val_string = (char*)value; float shtdn_val = atof(val_string); 8037a82: 4604 mov r4, r0 if(shtdn_val == 0){ 8037a84: f7e9 fbac bl 80211e0 <__aeabi_fcmpeq> 8037a88: b140 cbz r0, 8037a9c res = ups_metac_service_pdu(ups_cancel_shut_down); 8037a8a: 2007 movs r0, #7 8037a8c: f7f1 fea2 bl 80297d4 if(res == 1) 8037a90: b240 sxtb r0, r0 8037a92: 2801 cmp r0, #1 8037a94: d10e bne.n 8037ab4 log_event_data(LOG_SHUTDOWN_UPS, "Администратор(Останов)"); 8037a96: 2007 movs r0, #7 8037a98: 490c ldr r1, [pc, #48] ; (8037acc ) 8037a9a: e009 b.n 8037ab0 } else{ TimeParamFloat = shtdn_val; 8037a9c: 4b0c ldr r3, [pc, #48] ; (8037ad0 ) res = ups_metac_service_pdu(ups_shutdown); 8037a9e: 2005 movs r0, #5 res = ups_metac_service_pdu(ups_cancel_shut_down); if(res == 1) log_event_data(LOG_SHUTDOWN_UPS, "Администратор(Останов)"); } else{ TimeParamFloat = shtdn_val; 8037aa0: 601c str r4, [r3, #0] res = ups_metac_service_pdu(ups_shutdown); 8037aa2: f7f1 fe97 bl 80297d4 if(res == 1) 8037aa6: b240 sxtb r0, r0 8037aa8: 2801 cmp r0, #1 8037aaa: d103 bne.n 8037ab4 log_event_data(LOG_SHUTDOWN_UPS, "Администратор"); 8037aac: 4909 ldr r1, [pc, #36] ; (8037ad4 ) 8037aae: 2007 movs r0, #7 8037ab0: f7f2 fbd8 bl 802a264 break; default : break; }; } 8037ab4: b007 add sp, #28 8037ab6: bd30 pop {r4, r5, pc} 8037ab8: 2000d414 .word 0x2000d414 8037abc: 08039322 .word 0x08039322 8037ac0: 08039333 .word 0x08039333 8037ac4: 20000b8c .word 0x20000b8c 8037ac8: 08040130 .word 0x08040130 8037acc: 0803ff7e .word 0x0803ff7e 8037ad0: 20000b88 .word 0x20000b88 8037ad4: 0803928f .word 0x0803928f 08037ad8 : char *val_string; int32_t val; LWIP_UNUSED_ARG(value); set_ok = 0; id = od->id_inst_ptr[0]; 8037ad8: 6883 ldr r3, [r0, #8] switch (id) 8037ada: 781b ldrb r3, [r3, #0] 8037adc: 3b02 subs r3, #2 \param value - указатель на значение переменной \return 0 - некорректное значение 1 - корректное значение ------------------------------------------------------------------------------*/ static u8_t signals_set_test (struct obj_def *od, u16_t len, void *value) { 8037ade: b510 push {r4, lr} LWIP_UNUSED_ARG(value); set_ok = 0; id = od->id_inst_ptr[0]; switch (id) 8037ae0: 2b06 cmp r3, #6 8037ae2: d838 bhi.n 8037b56 8037ae4: e8df f003 tbb [pc, r3] 8037ae8: 06370404 .word 0x06370404 8037aec: 2112 .short 0x2112 8037aee: 29 .byte 0x29 8037aef: 00 .byte 0x00 u8_t id, set_ok; char *val_string; int32_t val; LWIP_UNUSED_ARG(value); set_ok = 0; 8037af0: 2904 cmp r1, #4 8037af2: e016 b.n 8037b22 { set_ok = 1; } break; case 5: /* DO1 */ if ( len <= 1 ) 8037af4: 2901 cmp r1, #1 8037af6: d900 bls.n 8037afa 8037af8: e02d b.n 8037b56 { val_string = (char*)value; if(atoi(val_string) <= 1){ 8037afa: 4610 mov r0, r2 8037afc: f7ea f86c bl 8021bd8 8037b00: 2801 cmp r0, #1 8037b02: dc28 bgt.n 8037b56 if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET) 8037b04: 4b16 ldr r3, [pc, #88] ; (8037b60 ) 8037b06: f893 0374 ldrb.w r0, [r3, #884] ; 0x374 8037b0a: e009 b.n 8037b20 set_ok = 1; } } break; case 6: /* DO2 */ if ( len <= 1 ) 8037b0c: 2901 cmp r1, #1 8037b0e: d822 bhi.n 8037b56 { val_string = (char*)value; if(atoi(val_string) <= 1){ 8037b10: 4610 mov r0, r2 8037b12: f7ea f861 bl 8021bd8 8037b16: 2801 cmp r0, #1 8037b18: dc1d bgt.n 8037b56 if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET) 8037b1a: 4b11 ldr r3, [pc, #68] ; (8037b60 ) 8037b1c: f893 0375 ldrb.w r0, [r3, #885] ; 0x375 u8_t id, set_ok; char *val_string; int32_t val; LWIP_UNUSED_ARG(value); set_ok = 0; 8037b20: 2803 cmp r0, #3 8037b22: bf14 ite ne 8037b24: 2000 movne r0, #0 8037b26: 2001 moveq r0, #1 8037b28: bd10 pop {r4, pc} set_ok = 1; } } break; case 7: /* BatTest */ val = *((s32_t*)value); 8037b2a: 6813 ldr r3, [r2, #0] if((val >= 0 && val <= 100) || val == 999){ 8037b2c: 2b64 cmp r3, #100 ; 0x64 8037b2e: d914 bls.n 8037b5a 8037b30: f240 32e7 movw r2, #999 ; 0x3e7 8037b34: 4293 cmp r3, r2 8037b36: d10e bne.n 8037b56 8037b38: e00f b.n 8037b5a set_ok = 1; } break; case 8: /* Shutdown UPS */ if ( len <= 3 ) 8037b3a: 2903 cmp r1, #3 8037b3c: d80b bhi.n 8037b56 { val_string = (char*)value; if(atof(val_string) <= 10){ 8037b3e: 4610 mov r0, r2 8037b40: f7ea f846 bl 8021bd0 8037b44: 2200 movs r2, #0 8037b46: 4b07 ldr r3, [pc, #28] ; (8037b64 ) 8037b48: 2401 movs r4, #1 8037b4a: f7e8 fff1 bl 8020b30 <__aeabi_dcmple> 8037b4e: b900 cbnz r0, 8037b52 8037b50: 4604 mov r4, r0 u8_t id, set_ok; char *val_string; int32_t val; LWIP_UNUSED_ARG(value); set_ok = 0; 8037b52: b2e0 uxtb r0, r4 8037b54: bd10 pop {r4, pc} 8037b56: 2000 movs r0, #0 8037b58: bd10 pop {r4, pc} } break; case 7: /* BatTest */ val = *((s32_t*)value); if((val >= 0 && val <= 100) || val == 999){ set_ok = 1; 8037b5a: 2001 movs r0, #1 } break; }; return set_ok; } 8037b5c: bd10 pop {r4, pc} 8037b5e: bf00 nop 8037b60: 2000d414 .word 0x2000d414 8037b64: 40240000 .word 0x40240000 08037b68 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 8037b68: 4613 mov r3, r2 u8_t id; id = od->id_inst_ptr[0]; 8037b6a: 6882 ldr r2, [r0, #8] switch (id) 8037b6c: 7812 ldrb r2, [r2, #0] 8037b6e: 3a01 subs r2, #1 \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 8037b70: b510 push {r4, lr} 8037b72: 460c mov r4, r1 u8_t id; id = od->id_inst_ptr[0]; switch (id) 8037b74: 2a11 cmp r2, #17 8037b76: d814 bhi.n 8037ba2 8037b78: e8df f002 tbb [pc, r2] 8037b7c: 0c09090c .word 0x0c09090c 8037b80: 09090c0c .word 0x09090c0c 8037b84: 0c0c0c0c .word 0x0c0c0c0c 8037b88: 0c0c0c0c .word 0x0c0c0c0c 8037b8c: 0c0c .short 0x0c0c break; case 7: /* BatTest */ *((s32_t*)value) = 0; break; case 8: /* Shutdown UPS */ *((s32_t*)value) = 0; 8037b8e: 2200 movs r2, #0 8037b90: 601a str r2, [r3, #0] break; 8037b92: bd10 pop {r4, pc} break; case 17: /* ConnectMonitor */ ocstrncpy((u8_t*)value, (u8_t*)paramStr, len); break; case 18: /* Alarms */ ocstrncpy((u8_t*)value, (u8_t*)paramStr, len); 8037b94: 4903 ldr r1, [pc, #12] ; (8037ba4 ) 8037b96: 4618 mov r0, r3 8037b98: 4622 mov r2, r4 break; default : break; }; } 8037b9a: e8bd 4010 ldmia.w sp!, {r4, lr} break; case 17: /* ConnectMonitor */ ocstrncpy((u8_t*)value, (u8_t*)paramStr, len); break; case 18: /* Alarms */ ocstrncpy((u8_t*)value, (u8_t*)paramStr, len); 8037b9e: f7fc ba51 b.w 8034044 8037ba2: bd10 pop {r4, pc} 8037ba4: 2001021c .word 0x2001021c 08037ba8 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8037ba8: 2801 cmp r0, #1 \param ident - points to objectname.0 (object id trailer) \param od - points to object definition. указатель на описание переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_object_def (u8_t ident_len, s32_t *ident, struct obj_def *od) { 8037baa: b538 push {r3, r4, r5, lr} 8037bac: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8037bae: f040 8081 bne.w 8037cb4 { od->id_inst_len = ident_len; 8037bb2: 2302 movs r3, #2 8037bb4: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8037bb6: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8037bb8: 60a2 str r2, [r4, #8] id = ident[0]; switch (id) 8037bba: f811 2c04 ldrb.w r2, [r1, #-4] 8037bbe: 3a01 subs r2, #1 8037bc0: 2a11 cmp r2, #17 8037bc2: d877 bhi.n 8037cb4 8037bc4: e8df f002 tbb [pc, r2] 8037bc8: 0f242409 .word 0x0f242409 8037bcc: 2a241a15 .word 0x2a241a15 8037bd0: 453f3932 .word 0x453f3932 8037bd4: 5d57514b .word 0x5d57514b 8037bd8: 6963 .short 0x6963 { case 1: /* FWVersion */ GetVersionStr(paramStr, ¶mLength); 8037bda: 4d38 ldr r5, [pc, #224] ; (8037cbc ) 8037bdc: 4838 ldr r0, [pc, #224] ; (8037cc0 ) 8037bde: 4629 mov r1, r5 8037be0: f7f0 fadc bl 802819c 8037be4: e05e b.n 8037ca4 od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); break; case 4: /* UPSModel*/ GetUPSModelStr(paramStr, ¶mLength); 8037be6: 4d35 ldr r5, [pc, #212] ; (8037cbc ) 8037be8: 4835 ldr r0, [pc, #212] ; (8037cc0 ) 8037bea: 4629 mov r1, r5 8037bec: f7f0 fb42 bl 8028274 8037bf0: e058 b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 5: /* DO1*/ GetDOUTStatusStr(paramStr, ¶mLength, 0); 8037bf2: 4d32 ldr r5, [pc, #200] ; (8037cbc ) 8037bf4: 4832 ldr r0, [pc, #200] ; (8037cc0 ) 8037bf6: 4629 mov r1, r5 8037bf8: 2200 movs r2, #0 8037bfa: e003 b.n 8037c04 od->access = MIB_OBJECT_READ_WRITE; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 6: /* DO2*/ GetDOUTStatusStr(paramStr, ¶mLength, 1); 8037bfc: 4d2f ldr r5, [pc, #188] ; (8037cbc ) 8037bfe: 4830 ldr r0, [pc, #192] ; (8037cc0 ) 8037c00: 4629 mov r1, r5 8037c02: 2201 movs r2, #1 8037c04: f7f0 fa48 bl 8028098 od->instance = MIB_OBJECT_SCALAR; 8037c08: 2301 movs r3, #1 8037c0a: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 8037c0c: 2303 movs r3, #3 8037c0e: e04b b.n 8037ca8 od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 7: /* BatTest*/ od->instance = MIB_OBJECT_SCALAR; 8037c10: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; 8037c12: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_INTEG; 8037c14: 70a3 strb r3, [r4, #2] od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 7: /* BatTest*/ od->instance = MIB_OBJECT_SCALAR; 8037c16: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); 8037c18: 2304 movs r3, #4 8037c1a: e049 b.n 8037cb0 break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_WRITE_ONLY; 8037c1c: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 8037c1e: 2304 movs r3, #4 od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; 8037c20: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; 8037c22: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 8037c24: 4b25 ldr r3, [pc, #148] ; (8037cbc ) od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; 8037c26: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; 8037c28: 781b ldrb r3, [r3, #0] 8037c2a: e041 b.n 8037cb0 break; case 9: /* DIO*/ GetDINStatusStr(paramStr, ¶mLength, 0); 8037c2c: 4d23 ldr r5, [pc, #140] ; (8037cbc ) 8037c2e: 4824 ldr r0, [pc, #144] ; (8037cc0 ) 8037c30: 4629 mov r1, r5 8037c32: 2200 movs r2, #0 8037c34: f7f0 f9f6 bl 8028024 8037c38: e034 b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 10: /* IntTemp */ GetInternalTempStr(paramStr, ¶mLength); 8037c3a: 4d20 ldr r5, [pc, #128] ; (8037cbc ) 8037c3c: 4820 ldr r0, [pc, #128] ; (8037cc0 ) 8037c3e: 4629 mov r1, r5 8037c40: f7f0 f8ec bl 8027e1c 8037c44: e02e b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 11: /* InFreq */ GetInputFreqStr(paramStr, ¶mLength); 8037c46: 4d1d ldr r5, [pc, #116] ; (8037cbc ) 8037c48: 481d ldr r0, [pc, #116] ; (8037cc0 ) 8037c4a: 4629 mov r1, r5 8037c4c: f7f0 f858 bl 8027d00 8037c50: e028 b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 12: /* InVoltVAC */ GetInputVoltageStr(paramStr, ¶mLength); 8037c52: 4d1a ldr r5, [pc, #104] ; (8037cbc ) 8037c54: 481a ldr r0, [pc, #104] ; (8037cc0 ) 8037c56: 4629 mov r1, r5 8037c58: f7f0 f87e bl 8027d58 8037c5c: e022 b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 13: /* OutVoltVAC */ GetOutputVoltageStr(paramStr, ¶mLength); 8037c5e: 4d17 ldr r5, [pc, #92] ; (8037cbc ) 8037c60: 4817 ldr r0, [pc, #92] ; (8037cc0 ) 8037c62: 4629 mov r1, r5 8037c64: f7f0 f88e bl 8027d84 8037c68: e01c b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 14: /* Power */ GetPowerStr(paramStr, ¶mLength); 8037c6a: 4d14 ldr r5, [pc, #80] ; (8037cbc ) 8037c6c: 4814 ldr r0, [pc, #80] ; (8037cc0 ) 8037c6e: 4629 mov r1, r5 8037c70: f7f0 f89e bl 8027db0 8037c74: e016 b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 15: /* BatCap */ GetBatCapacityStr(paramStr, ¶mLength); 8037c76: 4d11 ldr r5, [pc, #68] ; (8037cbc ) 8037c78: 4811 ldr r0, [pc, #68] ; (8037cc0 ) 8037c7a: 4629 mov r1, r5 8037c7c: f7f0 f8aa bl 8027dd4 8037c80: e010 b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 16: /* BatTime */ GetRuntimeStr(paramStr, ¶mLength); 8037c82: 4d0e ldr r5, [pc, #56] ; (8037cbc ) 8037c84: 480e ldr r0, [pc, #56] ; (8037cc0 ) 8037c86: 4629 mov r1, r5 8037c88: f7f0 f8b6 bl 8027df8 8037c8c: e00a b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 17: /* ConnectMonitor */ GetConnectMonitorStr(paramStr, ¶mLength); 8037c8e: 4d0b ldr r5, [pc, #44] ; (8037cbc ) 8037c90: 480b ldr r0, [pc, #44] ; (8037cc0 ) 8037c92: 4629 mov r1, r5 8037c94: f7f0 f8ea bl 8027e6c 8037c98: e004 b.n 8037ca4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 18: /* Alarms */ GetAlarmStr(paramStr, ¶mLength); 8037c9a: 4d08 ldr r5, [pc, #32] ; (8037cbc ) 8037c9c: 4808 ldr r0, [pc, #32] ; (8037cc0 ) 8037c9e: 4629 mov r1, r5 8037ca0: f7f0 f8fc bl 8027e9c od->instance = MIB_OBJECT_SCALAR; 8037ca4: 2301 movs r3, #1 8037ca6: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8037ca8: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 8037caa: 2304 movs r3, #4 8037cac: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 8037cae: 782b ldrb r3, [r5, #0] 8037cb0: 80a3 strh r3, [r4, #4] break; 8037cb2: bd38 pop {r3, r4, r5, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("planar_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8037cb4: 2300 movs r3, #0 8037cb6: 7023 strb r3, [r4, #0] 8037cb8: bd38 pop {r3, r4, r5, pc} 8037cba: bf00 nop 8037cbc: 2000c83a .word 0x2000c83a 8037cc0: 2001021c .word 0x2001021c 08037cc4 : /** * @brief Системный тик SNMP. Таск должен вызываться с частотой 100Гц. * @retval */ void SNMP_SysUpTimeTask(void *arg) { 8037cc4: b513 push {r0, r1, r4, lr} TickType_t xLastWakeTime; const TickType_t xFrequency = 10; xLastWakeTime = xTaskGetTickCount(); 8037cc6: f7f3 fdc1 bl 802b84c 8037cca: ac02 add r4, sp, #8 8037ccc: f844 0d04 str.w r0, [r4, #-4]! while(1) { vTaskDelayUntil( &xLastWakeTime, xFrequency ); 8037cd0: 4620 mov r0, r4 8037cd2: 210a movs r1, #10 8037cd4: f7f3 ff1e bl 802bb14 snmp_inc_sysuptime(); 8037cd8: f7fc fad2 bl 8034280 8037cdc: e7f8 b.n 8037cd0 8037cde: 0000 movs r0, r0 08037ce0 : * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 8037ce0: b51f push {r0, r1, r2, r3, r4, lr} uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 8037ce2: 4b0d ldr r3, [pc, #52] ; (8037d18 ) * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 8037ce4: f88d 0007 strb.w r0, [sp, #7] uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 8037ce8: eb03 00c0 add.w r0, r3, r0, lsl #3 8037cec: 78c3 ldrb r3, [r0, #3] 8037cee: b193 cbz r3, 8037d16 { availableSpace = uxQueueSpacesAvailable(SNMP_TrapQueue); 8037cf0: 4c0a ldr r4, [pc, #40] ; (8037d1c ) 8037cf2: 6820 ldr r0, [r4, #0] 8037cf4: f7f3 fbdb bl 802b4ae if (availableSpace == 0) 8037cf8: b282 uxth r2, r0 8037cfa: b92a cbnz r2, 8037d08 xQueueReceive(SNMP_TrapQueue, &dummyTrap, 0); 8037cfc: 6820 ldr r0, [r4, #0] 8037cfe: f10d 010f add.w r1, sp, #15 8037d02: 4613 mov r3, r2 8037d04: f7f3 fb30 bl 802b368 xQueueSend(SNMP_TrapQueue, &trapName, 0); 8037d08: 2200 movs r2, #0 8037d0a: 6820 ldr r0, [r4, #0] 8037d0c: f10d 0107 add.w r1, sp, #7 8037d10: 4613 mov r3, r2 8037d12: f7f3 f9e9 bl 802b0e8 } } 8037d16: bd1f pop {r0, r1, r2, r3, r4, pc} 8037d18: 20010320 .word 0x20010320 8037d1c: 2001031c .word 0x2001031c 08037d20 : * @brief Установить SNMP Descriptor * @retval */ // TODO void SNMP_SetObjDescr(void) { 8037d20: b538 push {r3, r4, r5, lr} static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 8037d22: 4c19 ldr r4, [pc, #100] ; (8037d88 ) strcat(sSettings.sSnmp.sysDescr, " "); 8037d24: 4d19 ldr r5, [pc, #100] ; (8037d8c ) // TODO void SNMP_SetObjDescr(void) { static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 8037d26: f104 01fa add.w r1, r4, #250 ; 0xfa 8037d2a: 4620 mov r0, r4 8037d2c: f7ea f9ee bl 802210c strcat(sSettings.sSnmp.sysDescr, " "); 8037d30: 4629 mov r1, r5 8037d32: 4620 mov r0, r4 8037d34: f7ea f8d6 bl 8021ee4 strcat(sSettings.sSnmp.sysDescr, VERSION); 8037d38: 4620 mov r0, r4 8037d3a: 4915 ldr r1, [pc, #84] ; (8037d90 ) 8037d3c: f7ea f8d2 bl 8021ee4 strcat(sSettings.sSnmp.sysDescr, " "); 8037d40: 4629 mov r1, r5 8037d42: 4620 mov r0, r4 8037d44: f7ea f8ce bl 8021ee4 strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); 8037d48: f104 01c8 add.w r1, r4, #200 ; 0xc8 8037d4c: 4620 mov r0, r4 8037d4e: f7ea f8c9 bl 8021ee4 strcat(sSettings.sSnmp.sysDescr, " "); 8037d52: 4629 mov r1, r5 8037d54: 4620 mov r0, r4 8037d56: f7ea f8c5 bl 8021ee4 strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); 8037d5a: f1a4 0193 sub.w r1, r4, #147 ; 0x93 8037d5e: 4620 mov r0, r4 8037d60: f7ea f8c0 bl 8021ee4 strcat(sSettings.sSnmp.sysDescr, " "); 8037d64: 4629 mov r1, r5 8037d66: 4620 mov r0, r4 8037d68: f7ea f8bc bl 8021ee4 strcat(sSettings.sSnmp.sysDescr, UPS.model); 8037d6c: 4909 ldr r1, [pc, #36] ; (8037d94 ) 8037d6e: 4620 mov r0, r4 8037d70: f7ea f8b8 bl 8021ee4 len = strlen(sSettings.sSnmp.sysDescr); 8037d74: 4620 mov r0, r4 8037d76: f7ea fa27 bl 80221c8 8037d7a: 4907 ldr r1, [pc, #28] ; (8037d98 ) 8037d7c: 7008 strb r0, [r1, #0] snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 8037d7e: 4620 mov r0, r4 } 8037d80: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); strcat(sSettings.sSnmp.sysDescr, " "); strcat(sSettings.sSnmp.sysDescr, UPS.model); len = strlen(sSettings.sSnmp.sysDescr); snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 8037d84: f7fc ba68 b.w 8034258 8037d88: 2000d545 .word 0x2000d545 8037d8c: 080392c9 .word 0x080392c9 8037d90: 0803919c .word 0x0803919c 8037d94: 2000d7ed .word 0x2000d7ed 8037d98: 2000c83b .word 0x2000c83b 08037d9c : /** * @brief Установить SNMP Community для чтения */ void SNMP_SetReadCommunity(char *comm) { 8037d9c: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, comm); 8037d9e: 4801 ldr r0, [pc, #4] ; (8037da4 ) 8037da0: f7ea b9b4 b.w 802210c 8037da4: 2000d5e5 .word 0x2000d5e5 08037da8 : /** * @brief Установить SNMP Community для записи */ void SNMP_SetWriteCommunity(char *comm) { 8037da8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, comm); 8037daa: 4801 ldr r0, [pc, #4] ; (8037db0 ) 8037dac: f7ea b9ae b.w 802210c 8037db0: 2000d5f9 .word 0x2000d5f9 08037db4 : /** * @brief Установить SNMP SysContact * @retval */ void SNMP_SetSysContact(char *con) { 8037db4: b510 push {r4, lr} 8037db6: 4604 mov r4, r0 static uint8_t len; len = strlen(con); 8037db8: f7ea fa06 bl 80221c8 8037dbc: 4903 ldr r1, [pc, #12] ; (8037dcc ) 8037dbe: 7008 strb r0, [r1, #0] snmp_set_syscontact((u8_t*)con, &len); 8037dc0: 4620 mov r0, r4 } 8037dc2: e8bd 4010 ldmia.w sp!, {r4, lr} void SNMP_SetSysContact(char *con) { static uint8_t len; len = strlen(con); snmp_set_syscontact((u8_t*)con, &len); 8037dc6: f7fc baab b.w 8034320 8037dca: bf00 nop 8037dcc: 2000c83d .word 0x2000c83d 08037dd0 : /** * @brief Установить SNMP SysName * @retval */ void SNMP_SetSysName(char *name) { 8037dd0: b510 push {r4, lr} 8037dd2: 4604 mov r4, r0 static uint8_t len; len = strlen(name); 8037dd4: f7ea f9f8 bl 80221c8 8037dd8: 4903 ldr r1, [pc, #12] ; (8037de8 ) 8037dda: 7008 strb r0, [r1, #0] snmp_set_sysname((u8_t*)name, &len); 8037ddc: 4620 mov r0, r4 } 8037dde: e8bd 4010 ldmia.w sp!, {r4, lr} void SNMP_SetSysName(char *name) { static uint8_t len; len = strlen(name); snmp_set_sysname((u8_t*)name, &len); 8037de2: f7fc baa7 b.w 8034334 8037de6: bf00 nop 8037de8: 2000c83c .word 0x2000c83c 08037dec : /** * @brief Установить SNMP SysLocation * @retval */ void SNMP_SetSysLocation(char *loc) { 8037dec: b510 push {r4, lr} 8037dee: 4604 mov r4, r0 static uint8_t len; len = strlen(loc); 8037df0: f7ea f9ea bl 80221c8 8037df4: 4903 ldr r1, [pc, #12] ; (8037e04 ) 8037df6: 7008 strb r0, [r1, #0] snmp_set_syslocation((u8_t*)loc, &len); 8037df8: 4620 mov r0, r4 } 8037dfa: e8bd 4010 ldmia.w sp!, {r4, lr} void SNMP_SetSysLocation(char *loc) { static uint8_t len; len = strlen(loc); snmp_set_syslocation((u8_t*)loc, &len); 8037dfe: f7fc baa3 b.w 8034348 8037e02: bf00 nop 8037e04: 2000c83e .word 0x2000c83e 08037e08 : /** * @brief Установить SNMP SysManagerIP * @retval */ void SNMP_SetManagerIP(char *ip) { 8037e08: b510 push {r4, lr} static ip_addr_t trap_addr; ipaddr_aton(ip, &trap_addr); 8037e0a: 4c05 ldr r4, [pc, #20] ; (8037e20 ) 8037e0c: 4621 mov r1, r4 8037e0e: f7fa fdee bl 80329ee snmp_trap_dst_ip_set(0, &trap_addr); 8037e12: 2000 movs r0, #0 8037e14: 4621 mov r1, r4 } 8037e16: e8bd 4010 ldmia.w sp!, {r4, lr} void SNMP_SetManagerIP(char *ip) { static ip_addr_t trap_addr; ipaddr_aton(ip, &trap_addr); snmp_trap_dst_ip_set(0, &trap_addr); 8037e1a: f7fe bba5 b.w 8036568 8037e1e: bf00 nop 8037e20: 2000c840 .word 0x2000c840 08037e24 : /** * @brief Тестовый таск для проверки отправки трапов * @retval */ void snmp_trap_tread(void *arg) { 8037e24: b537 push {r0, r1, r2, r4, r5, lr} uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 8037e26: 4d1c ldr r5, [pc, #112] ; (8037e98 ) { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); SNMP_SendVarbindTrap(&traps[trapName]); 8037e28: 4c1c ldr r4, [pc, #112] ; (8037e9c ) { uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 8037e2a: 2200 movs r2, #0 8037e2c: 6828 ldr r0, [r5, #0] 8037e2e: f10d 0107 add.w r1, sp, #7 8037e32: 4613 mov r3, r2 8037e34: f7f3 fa98 bl 802b368 8037e38: 2801 cmp r0, #1 8037e3a: d1f6 bne.n 8037e2a { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8037e3c: 4818 ldr r0, [pc, #96] ; (8037ea0 ) 8037e3e: f7ff ffe3 bl 8037e08 SNMP_SendVarbindTrap(&traps[trapName]); 8037e42: f89d 0007 ldrb.w r0, [sp, #7] 8037e46: eb04 00c0 add.w r0, r4, r0, lsl #3 8037e4a: f000 fa41 bl 80382d0 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8037e4e: 4815 ldr r0, [pc, #84] ; (8037ea4 ) 8037e50: f7ff ffda bl 8037e08 SNMP_SendVarbindTrap(&traps[trapName]); 8037e54: f89d 0007 ldrb.w r0, [sp, #7] 8037e58: eb04 00c0 add.w r0, r4, r0, lsl #3 8037e5c: f000 fa38 bl 80382d0 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 8037e60: 4811 ldr r0, [pc, #68] ; (8037ea8 ) 8037e62: f7ff ffd1 bl 8037e08 SNMP_SendVarbindTrap(&traps[trapName]); 8037e66: f89d 0007 ldrb.w r0, [sp, #7] 8037e6a: eb04 00c0 add.w r0, r4, r0, lsl #3 8037e6e: f000 fa2f bl 80382d0 SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 8037e72: 480e ldr r0, [pc, #56] ; (8037eac ) 8037e74: f7ff ffc8 bl 8037e08 SNMP_SendVarbindTrap(&traps[trapName]); 8037e78: f89d 0007 ldrb.w r0, [sp, #7] 8037e7c: eb04 00c0 add.w r0, r4, r0, lsl #3 8037e80: f000 fa26 bl 80382d0 SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 8037e84: 480a ldr r0, [pc, #40] ; (8037eb0 ) 8037e86: f7ff ffbf bl 8037e08 SNMP_SendVarbindTrap(&traps[trapName]); 8037e8a: f89d 0007 ldrb.w r0, [sp, #7] 8037e8e: eb04 00c0 add.w r0, r4, r0, lsl #3 8037e92: f000 fa1d bl 80382d0 8037e96: e7c8 b.n 8037e2a 8037e98: 2001031c .word 0x2001031c 8037e9c: 20010320 .word 0x20010320 8037ea0: 2000d6c1 .word 0x2000d6c1 8037ea4: 2000d6d5 .word 0x2000d6d5 8037ea8: 2000d6e9 .word 0x2000d6e9 8037eac: 2000d6fd .word 0x2000d6fd 8037eb0: 2000d711 .word 0x2000d711 08037eb4 : */ void SNMP_SetObjID(void) { static struct snmp_obj_id my_object_id = {9, {1, 3, 6, 1, 4, 1, 41752, 911, 3}}; snmp_set_sysobjid(&my_object_id); 8037eb4: 4801 ldr r0, [pc, #4] ; (8037ebc ) 8037eb6: f7fc b9d9 b.w 803426c 8037eba: bf00 nop 8037ebc: 20000a40 .word 0x20000a40 08037ec0 : /** * @brief Вкл/выкл трапы * @retval */ void SNMP_SetTrapOnOff(uint8_t state) { 8037ec0: 4601 mov r1, r0 snmp_trap_dst_enable(0, (u8_t)state); 8037ec2: 2000 movs r0, #0 8037ec4: f7fe bb4a b.w 803655c 08037ec8 : /** * @brief Инициализация SNMP агента * @retval */ void SNMP_AgentInit(void) { 8037ec8: b510 push {r4, lr} SNMP_SetObjDescr(); SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 8037eca: 4c16 ldr r4, [pc, #88] ; (8037f24 ) * @brief Инициализация SNMP агента * @retval */ void SNMP_AgentInit(void) { SNMP_SetObjDescr(); 8037ecc: f7ff ff28 bl 8037d20 SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 8037ed0: 4620 mov r0, r4 8037ed2: f7ff ff63 bl 8037d9c SNMP_SetWriteCommunity(sSettings.sSnmp.writeCommunity); 8037ed6: f104 0014 add.w r0, r4, #20 8037eda: f7ff ff65 bl 8037da8 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 8037ede: f104 0028 add.w r0, r4, #40 ; 0x28 8037ee2: f7ff ff67 bl 8037db4 SNMP_SetSysName(sSettings.sSnmp.sysName); 8037ee6: f104 005a add.w r0, r4, #90 ; 0x5a 8037eea: f7ff ff71 bl 8037dd0 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 8037eee: f104 006e add.w r0, r4, #110 ; 0x6e 8037ef2: f7ff ff7b bl 8037dec SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8037ef6: f104 00dc add.w r0, r4, #220 ; 0xdc 8037efa: f7ff ff85 bl 8037e08 SNMP_SetObjID(); 8037efe: f7ff ffd9 bl 8037eb4 SNMP_SetTrapOnOff(1); 8037f02: 2001 movs r0, #1 8037f04: f7ff ffdc bl 8037ec0 SNMP_InitTrapsBase(); 8037f08: f000 f926 bl 8038158 snmp_init(); 8037f0c: f7fd fa04 bl 8035318 udp_init(); 8037f10: f7fa fa44 bl 803239c SNMP_TrapQueue = xQueueCreate(SNMP_TRAP_QUEUE_SIZE, sizeof(uint8_t)); 8037f14: 2064 movs r0, #100 ; 0x64 8037f16: 2101 movs r1, #1 8037f18: 2200 movs r2, #0 8037f1a: f7f3 f8a8 bl 802b06e 8037f1e: 4b02 ldr r3, [pc, #8] ; (8037f28 ) 8037f20: 6018 str r0, [r3, #0] 8037f22: bd10 pop {r4, pc} 8037f24: 2000d5e5 .word 0x2000d5e5 8037f28: 2001031c .word 0x2001031c 08037f2c : * @retval */ void SNMP_Init(void) { //SETTINGS_SetSnmpDef(); SNMP_AgentInit(); 8037f2c: f7ff bfcc b.w 8037ec8 08037f30 : SNTP_Enable(sSettings.sSNTP.sntpEnable); } static void recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port) { 8037f30: b570 push {r4, r5, r6, lr} 8037f32: 4616 mov r6, r2 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 8037f34: 8952 ldrh r2, [r2, #10] 8037f36: 2a30 cmp r2, #48 ; 0x30 SNTP_Enable(sSettings.sSNTP.sntpEnable); } static void recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port) { 8037f38: b094 sub sp, #80 ; 0x50 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 8037f3a: d149 bne.n 8037fd0 { int i; struct sntp_packet aligned; //myassert(p->len == p->tot_len); /* don't accept chained pbuf */ memcpy(&aligned, p->payload, sizeof(aligned)); 8037f3c: a808 add r0, sp, #32 8037f3e: 6871 ldr r1, [r6, #4] 8037f40: f7e9 feb0 bl 8021ca4 i = (aligned.status >> 3) & 7; 8037f44: f89d 3020 ldrb.w r3, [sp, #32] if ((i < 1) || (i > 4)) /* SNTP version 1..4 */ 8037f48: f3c3 02c2 ubfx r2, r3, #3, #3 8037f4c: 3a01 subs r2, #1 8037f4e: 2a03 cmp r2, #3 8037f50: d83e bhi.n 8037fd0 goto out; i = aligned.status & 7; if ((i != 4) && (i != 5)) /* mode 4 or 5: server or broadcast */ 8037f52: f003 0307 and.w r3, r3, #7 8037f56: 3b04 subs r3, #4 8037f58: 2b01 cmp r3, #1 8037f5a: d839 bhi.n 8037fd0 goto out; if (aligned.xmt == 0) 8037f5c: e9dd 4512 ldrd r4, r5, [sp, #72] ; 0x48 8037f60: ea54 0305 orrs.w r3, r4, r5 8037f64: d034 beq.n 8037fd0 goto out; utcSec = (int)(3600.0*sSettings.sSNTP.timeZone); 8037f66: 4b20 ldr r3, [pc, #128] ; (8037fe8 ) 8037f68: f8d3 0370 ldr.w r0, [r3, #880] ; 0x370 8037f6c: f7e8 fb10 bl 8020590 <__aeabi_f2d> 8037f70: a31b add r3, pc, #108 ; (adr r3, 8037fe0 ) 8037f72: e9d3 2300 ldrd r2, r3, [r3] 8037f76: f7e8 fb5f bl 8020638 <__aeabi_dmul> 8037f7a: f7e8 fdf7 bl 8020b6c <__aeabi_d2iz> 8037f7e: 4605 mov r5, r0 t = (ntohl(aligned.xmt) - 2208988800 + utcSec ); 8037f80: 4620 mov r0, r4 8037f82: f7f6 fd4f bl 802ea24 8037f86: 4b19 ldr r3, [pc, #100] ; (8037fec ) 8037f88: 18eb adds r3, r5, r3 TM_RTC_SetDataTimeUnix((uint32_t)t); 8037f8a: 1818 adds r0, r3, r0 8037f8c: f7ee fd78 bl 8026a80 /* Сохраним время последней синхронизации */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8037f90: a804 add r0, sp, #16 8037f92: 2100 movs r1, #0 8037f94: f7ee fc56 bl 8026844 memset(sSettings.sSNTP.data, 0, sizeof(sSettings.sSNTP.data)); 8037f98: 2100 movs r1, #0 8037f9a: 221e movs r2, #30 8037f9c: 4814 ldr r0, [pc, #80] ; (8037ff0 ) 8037f9e: f7e9 ff3b bl 8021e18 sprintf(sSettings.sSNTP.data, "%02d.%02d.%02d %02d:%02d:%02d", 8037fa2: f89d 1019 ldrb.w r1, [sp, #25] 8037fa6: f89d 2017 ldrb.w r2, [sp, #23] 8037faa: 9100 str r1, [sp, #0] 8037fac: f89d 1015 ldrb.w r1, [sp, #21] 8037fb0: f89d 3018 ldrb.w r3, [sp, #24] 8037fb4: 9101 str r1, [sp, #4] 8037fb6: f89d 1014 ldrb.w r1, [sp, #20] 8037fba: 480d ldr r0, [pc, #52] ; (8037ff0 ) 8037fbc: 9102 str r1, [sp, #8] 8037fbe: f89d 1010 ldrb.w r1, [sp, #16] 8037fc2: 9103 str r1, [sp, #12] 8037fc4: 490b ldr r1, [pc, #44] ; (8037ff4 ) 8037fc6: f7ef fe8f bl 8027ce8 data.date, data.month, data.year, data.hours, data.minutes, data.seconds); timeout = VALID_TIMEOUT; 8037fca: 4a0b ldr r2, [pc, #44] ; (8037ff8 ) 8037fcc: 4b0b ldr r3, [pc, #44] ; (8037ffc ) 8037fce: 601a str r2, [r3, #0] } out: pbuf_free(p); 8037fd0: 4630 mov r0, r6 8037fd2: f7f7 fe59 bl 802fc88 } 8037fd6: b014 add sp, #80 ; 0x50 8037fd8: bd70 pop {r4, r5, r6, pc} 8037fda: bf00 nop 8037fdc: f3af 8000 nop.w 8037fe0: 00000000 .word 0x00000000 8037fe4: 40ac2000 .word 0x40ac2000 8037fe8: 2000d414 .word 0x2000d414 8037fec: 7c558180 .word 0x7c558180 8037ff0: 2000d765 .word 0x2000d765 8037ff4: 08045220 .word 0x08045220 8037ff8: 01b77400 .word 0x01b77400 8037ffc: 2000c850 .word 0x2000c850 08038000 : void SNTP_Enable(bool enable) { 8038000: b538 push {r3, r4, r5, lr} if (enable) 8038002: 4605 mov r5, r0 8038004: 4c0f ldr r4, [pc, #60] ; (8038044 ) 8038006: b1b8 cbz r0, 8038038 { if (upcb == 0) 8038008: 6825 ldr r5, [r4, #0] 803800a: b9d5 cbnz r5, 8038042 { err_t ret; upcb = udp_new(); 803800c: f7fa fba4 bl 8032758 8038010: 6020 str r0, [r4, #0] if (upcb != 0) 8038012: b1b0 cbz r0, 8038042 { ret = udp_bind(upcb, IP_ADDR_ANY, port); 8038014: 227b movs r2, #123 ; 0x7b 8038016: 490c ldr r1, [pc, #48] ; (8038048 ) 8038018: f7fa fa86 bl 8032528 if (ret != ERR_OK) 803801c: 4602 mov r2, r0 { udp_remove(upcb); 803801e: 6820 ldr r0, [r4, #0] upcb = udp_new(); if (upcb != 0) { ret = udp_bind(upcb, IP_ADDR_ANY, port); if (ret != ERR_OK) 8038020: b11a cbz r2, 803802a { udp_remove(upcb); 8038022: f7fa fb7d bl 8032720 upcb = 0; 8038026: 6025 str r5, [r4, #0] 8038028: e002 b.n 8038030 } else { udp_recv(upcb, recv, 0); 803802a: 4908 ldr r1, [pc, #32] ; (803804c ) 803802c: f7fa fb74 bl 8032718 } timeout = 0; 8038030: 4b07 ldr r3, [pc, #28] ; (8038050 ) 8038032: 2200 movs r2, #0 8038034: 601a str r2, [r3, #0] 8038036: bd38 pop {r3, r4, r5, pc} } } } else if (upcb != 0) 8038038: 6820 ldr r0, [r4, #0] 803803a: b110 cbz r0, 8038042 { udp_remove(upcb); 803803c: f7fa fb70 bl 8032720 upcb = 0; 8038040: 6025 str r5, [r4, #0] 8038042: bd38 pop {r3, r4, r5, pc} 8038044: 2000c84c .word 0x2000c84c 8038048: 08044744 .word 0x08044744 803804c: 08037f31 .word 0x08037f31 8038050: 2000c850 .word 0x2000c850 08038054 : { return upcb != 0; } void SNTP_SetServerAddr(char *addr) { 8038054: b508 push {r3, lr} server.addr = ipaddr_addr(addr); 8038056: f7fa fd48 bl 8032aea 803805a: 4b01 ldr r3, [pc, #4] ; (8038060 ) 803805c: 6018 str r0, [r3, #0] 803805e: bd08 pop {r3, pc} 8038060: 2000c844 .word 0x2000c844 08038064 : /** * @brief Инициализация SNTP. * @retval */ void SNTP_Init(void) { 8038064: b508 push {r3, lr} SNTP_SetServerAddr(sSettings.sSNTP.ip); 8038066: 4805 ldr r0, [pc, #20] ; (803807c ) 8038068: f7ff fff4 bl 8038054 SNTP_Enable(sSettings.sSNTP.sntpEnable); 803806c: 4b04 ldr r3, [pc, #16] ; (8038080 ) 803806e: f893 0340 ldrb.w r0, [r3, #832] ; 0x340 } 8038072: e8bd 4008 ldmia.w sp!, {r3, lr} void SNTP_Init(void) { SNTP_SetServerAddr(sSettings.sSNTP.ip); SNTP_Enable(sSettings.sSNTP.sntpEnable); 8038076: f7ff bfc3 b.w 8038000 803807a: bf00 nop 803807c: 2000d755 .word 0x2000d755 8038080: 2000d414 .word 0x2000d414 08038084 : pbuf_free(psend); } } void SNTP_Poll(void) { 8038084: b530 push {r4, r5, lr} if (upcb) 8038086: 4d15 ldr r5, [pc, #84] ; (80380dc ) 8038088: 682b ldr r3, [r5, #0] pbuf_free(psend); } } void SNTP_Poll(void) { 803808a: b08d sub sp, #52 ; 0x34 if (upcb) 803808c: b31b cbz r3, 80380d6 static void send_request(void) { struct sntp_packet packet; struct pbuf* psend; memset(&packet, 0, sizeof(packet)); 803808e: 2100 movs r1, #0 8038090: 2230 movs r2, #48 ; 0x30 8038092: 4668 mov r0, sp 8038094: f7e9 fec0 bl 8021e18 packet.status = (3 << 3) /* SNTP vesion 3 */ | (3 << 0); /* Mode: client */ 8038098: 231b movs r3, #27 psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 803809a: 2003 movs r0, #3 803809c: 2130 movs r1, #48 ; 0x30 803809e: 2202 movs r2, #2 static void send_request(void) { struct sntp_packet packet; struct pbuf* psend; memset(&packet, 0, sizeof(packet)); packet.status = (3 << 3) /* SNTP vesion 3 */ | (3 << 0); /* Mode: client */ 80380a0: f88d 3000 strb.w r3, [sp] psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 80380a4: f7f7 fe3d bl 802fd22 if (psend != 0) 80380a8: 4604 mov r4, r0 80380aa: b1a0 cbz r0, 80380d6 { psend->payload = &packet; 80380ac: ab00 add r3, sp, #0 80380ae: 6043 str r3, [r0, #4] timeout = (udp_sendto(upcb, psend, &server, port) == ERR_OK) ? SENT_TIMEOUT : SENDFAIL_TIMEOUT; 80380b0: 4621 mov r1, r4 80380b2: 4a0b ldr r2, [pc, #44] ; (80380e0 ) 80380b4: 6828 ldr r0, [r5, #0] 80380b6: 237b movs r3, #123 ; 0x7b 80380b8: f7fa fae7 bl 803268a 80380bc: f64e 2360 movw r3, #60000 ; 0xea60 80380c0: f241 3288 movw r2, #5000 ; 0x1388 80380c4: 4907 ldr r1, [pc, #28] ; (80380e4 ) 80380c6: 2800 cmp r0, #0 80380c8: bf14 ite ne 80380ca: 4610 movne r0, r2 80380cc: 4618 moveq r0, r3 80380ce: 6008 str r0, [r1, #0] pbuf_free(psend); 80380d0: 4620 mov r0, r4 80380d2: f7f7 fdd9 bl 802fc88 void SNTP_Poll(void) { if (upcb) send_request(); } 80380d6: b00d add sp, #52 ; 0x34 80380d8: bd30 pop {r4, r5, pc} 80380da: bf00 nop 80380dc: 2000c84c .word 0x2000c84c 80380e0: 2000c844 .word 0x2000c844 80380e4: 2000c850 .word 0x2000c850 080380e8 : * @brief Периодическая синхронизация времени. * Выполняется раз в сутки с 0 часов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 80380e8: b530 push {r4, r5, lr} static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); if (sSettings.sSNTP.sntpEnable) 80380ea: 4d0f ldr r5, [pc, #60] ; (8038128 ) fSinhro = 1; //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) fSinhro = 0; 80380ec: 4c0f ldr r4, [pc, #60] ; (803812c ) * @brief Периодическая синхронизация времени. * Выполняется раз в сутки с 0 часов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 80380ee: b085 sub sp, #20 static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); 80380f0: f242 7010 movw r0, #10000 ; 0x2710 80380f4: f7f3 fcdc bl 802bab0 if (sSettings.sSNTP.sntpEnable) 80380f8: f895 3340 ldrb.w r3, [r5, #832] ; 0x340 80380fc: 2b00 cmp r3, #0 80380fe: d0f7 beq.n 80380f0 { TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8038100: 4668 mov r0, sp 8038102: 2100 movs r1, #0 8038104: f7ee fb9e bl 8026844 /* Если пришло время синхронизации */ if ((data.hours == 0) && (fSinhro == 0)) 8038108: f89d 3005 ldrb.w r3, [sp, #5] 803810c: b92b cbnz r3, 803811a 803810e: 7823 ldrb r3, [r4, #0] 8038110: b91b cbnz r3, 803811a { SNTP_Poll(); 8038112: f7ff ffb7 bl 8038084 fSinhro = 1; 8038116: 2301 movs r3, #1 8038118: 7023 strb r3, [r4, #0] //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) 803811a: f89d 3005 ldrb.w r3, [sp, #5] 803811e: 2b01 cmp r3, #1 8038120: d9e6 bls.n 80380f0 fSinhro = 0; 8038122: 2300 movs r3, #0 8038124: 7023 strb r3, [r4, #0] 8038126: e7e3 b.n 80380f0 8038128: 2000d414 .word 0x2000d414 803812c: 2000c848 .word 0x2000c848 08038130 : /** * @brief Синхронизация времени единоразово при включении контроллера * @retval */ void vTaskOnceSynchro(void *arg) { 8038130: b538 push {r3, r4, r5, lr} for (;;) { if (sSettings.sSNTP.sntpEnable) 8038132: 4d07 ldr r5, [pc, #28] ; (8038150 ) 8038134: 4c07 ldr r4, [pc, #28] ; (8038154 ) 8038136: f895 3340 ldrb.w r3, [r5, #832] ; 0x340 803813a: b12b cbz r3, 8038148 { vTaskDelay(7000); 803813c: f641 3058 movw r0, #7000 ; 0x1b58 8038140: f7f3 fcb6 bl 802bab0 SNTP_Poll(); 8038144: f7ff ff9e bl 8038084 //printf("Once time sinhro\n\r"); vTaskDelete(xHandleSntpOnceSinhro); } else vTaskDelete(xHandleSntpOnceSinhro); 8038148: 6820 ldr r0, [r4, #0] 803814a: f7f3 faef bl 802b72c 803814e: e7f2 b.n 8038136 8038150: 2000d414 .word 0x2000d414 8038154: 20000b20 .word 0x20000b20 08038158 : * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 8038158: 4b53 ldr r3, [pc, #332] ; (80382a8 ) traps[FW_VERSION_UPDATE].varbindId = 1; traps[FW_VERSION_UPDATE].trapEnable = true; traps[FW_VERSION_UPDATE].handle = GetVersionStr; /* FWVersion */ 803815a: 4954 ldr r1, [pc, #336] ; (80382ac ) /* 2. FWVersionUpdated */ // + traps[FW_VERSION_UPDATED].trapId = FW_VERSION_UPDATED; 803815c: 2002 movs r0, #2 /** * @brief Инициализация базы трапов * @retval */ void SNMP_InitTrapsBase(void) { 803815e: b570 push {r4, r5, r6, lr} traps[FW_VERSION_UPDATE].varbindId = 1; traps[FW_VERSION_UPDATE].trapEnable = true; traps[FW_VERSION_UPDATE].handle = GetVersionStr; /* FWVersion */ /* 2. FWVersionUpdated */ // + traps[FW_VERSION_UPDATED].trapId = FW_VERSION_UPDATED; 8038160: 7458 strb r0, [r3, #17] traps[FW_VERSION_UPDATED].varbindId = 1; traps[FW_VERSION_UPDATED].trapEnable = true; traps[FW_VERSION_UPDATED].handle = GetVersionStr; /* FWVersion */ /* 3. DeviceRestored */ // + traps[DEVICE_RESTORED].trapId = DEVICE_RESTORED; 8038162: 2003 movs r0, #3 8038164: 7658 strb r0, [r3, #25] traps[DEVICE_RESTORED].varbindId = 1; traps[DEVICE_RESTORED].trapEnable = true; traps[DEVICE_RESTORED].handle = GetVersionStr;//GetRestore; /* RestoreSignal */ /* 4. DeviceRebooted */ // + traps[DEVICE_REBOOTED].trapId = DEVICE_REBOOTED; 8038166: 2004 movs r0, #4 traps[DEVICE_REBOOTED].varbindId = 1; traps[DEVICE_REBOOTED].trapEnable = true; traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; 8038168: 2405 movs r4, #5 traps[DEVICE_RESTORED].varbindId = 1; traps[DEVICE_RESTORED].trapEnable = true; traps[DEVICE_RESTORED].handle = GetVersionStr;//GetRestore; /* RestoreSignal */ /* 4. DeviceRebooted */ // + traps[DEVICE_REBOOTED].trapId = DEVICE_REBOOTED; 803816a: f883 0021 strb.w r0, [r3, #33] ; 0x21 traps[DI0_NORM].varbindId = 9; traps[DI0_NORM].trapEnable = true; traps[DI0_NORM].handle = GetDIN0StatusStr; /* State DIN */ /* 6. DI0Alarm */ // + traps[DI0_ALARM].trapId = DI0_ALARM; 803816e: 2006 movs r0, #6 /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; traps[DI0_NORM].varbindId = 9; traps[DI0_NORM].trapEnable = true; traps[DI0_NORM].handle = GetDIN0StatusStr; /* State DIN */ 8038170: 4d4f ldr r5, [pc, #316] ; (80382b0 ) traps[DEVICE_REBOOTED].varbindId = 1; traps[DEVICE_REBOOTED].trapEnable = true; traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; 8038172: f883 4029 strb.w r4, [r3, #41] ; 0x29 traps[DI0_NORM].varbindId = 9; traps[DI0_NORM].trapEnable = true; traps[DI0_NORM].handle = GetDIN0StatusStr; /* State DIN */ /* 6. DI0Alarm */ // + traps[DI0_ALARM].trapId = DI0_ALARM; 8038176: f883 0031 strb.w r0, [r3, #49] ; 0x31 traps[DI0_ALARM].trapEnable = true; traps[DI0_ALARM].handle = GetDIN0StatusStr; /* State DIN */ /* 7. DO0Toggle */ // + traps[DO0_TOGGLED].trapId = DO0_TOGGLED; traps[DO0_TOGGLED].varbindId = 5; 803817a: f883 403a strb.w r4, [r3, #58] ; 0x3a traps[DO0_TOGGLED].trapEnable = true; traps[DO0_TOGGLED].handle = GetDOUT0StatusStr; /* State DO0 */ /* 8. DO1Toggle */ // + traps[DO1_TOGGLED].trapId = DO1_TOGGLED; traps[DO1_TOGGLED].varbindId = 6; 803817e: f883 0042 strb.w r0, [r3, #66] ; 0x42 /* 7. DO0Toggle */ // + traps[DO0_TOGGLED].trapId = DO0_TOGGLED; traps[DO0_TOGGLED].varbindId = 5; traps[DO0_TOGGLED].trapEnable = true; traps[DO0_TOGGLED].handle = GetDOUT0StatusStr; /* State DO0 */ 8038182: 4c4c ldr r4, [pc, #304] ; (80382b4 ) /* 8. DO1Toggle */ // + traps[DO1_TOGGLED].trapId = DO1_TOGGLED; traps[DO1_TOGGLED].varbindId = 6; traps[DO1_TOGGLED].trapEnable = true; traps[DO1_TOGGLED].handle = GetDOUT1StatusStr; /* State DO1 */ 8038184: 484c ldr r0, [pc, #304] ; (80382b8 ) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; traps[FW_VERSION_UPDATE].varbindId = 1; traps[FW_VERSION_UPDATE].trapEnable = true; traps[FW_VERSION_UPDATE].handle = GetVersionStr; /* FWVersion */ 8038186: 60d9 str r1, [r3, #12] * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 8038188: 2201 movs r2, #1 /* 2. FWVersionUpdated */ // + traps[FW_VERSION_UPDATED].trapId = FW_VERSION_UPDATED; traps[FW_VERSION_UPDATED].varbindId = 1; traps[FW_VERSION_UPDATED].trapEnable = true; traps[FW_VERSION_UPDATED].handle = GetVersionStr; /* FWVersion */ 803818a: 6159 str r1, [r3, #20] /* 3. DeviceRestored */ // + traps[DEVICE_RESTORED].trapId = DEVICE_RESTORED; traps[DEVICE_RESTORED].varbindId = 1; traps[DEVICE_RESTORED].trapEnable = true; traps[DEVICE_RESTORED].handle = GetVersionStr;//GetRestore; /* RestoreSignal */ 803818c: 61d9 str r1, [r3, #28] /* 4. DeviceRebooted */ // + traps[DEVICE_REBOOTED].trapId = DEVICE_REBOOTED; traps[DEVICE_REBOOTED].varbindId = 1; traps[DEVICE_REBOOTED].trapEnable = true; traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ 803818e: 6259 str r1, [r3, #36] ; 0x24 /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; traps[DI0_NORM].varbindId = 9; traps[DI0_NORM].trapEnable = true; traps[DI0_NORM].handle = GetDIN0StatusStr; /* State DIN */ 8038190: 62dd str r5, [r3, #44] ; 0x2c traps[DEVICE_REBOOTED].trapEnable = true; traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; traps[DI0_NORM].varbindId = 9; 8038192: 2109 movs r1, #9 /* 6. DI0Alarm */ // + traps[DI0_ALARM].trapId = DI0_ALARM; traps[DI0_ALARM].varbindId = 9; traps[DI0_ALARM].trapEnable = true; traps[DI0_ALARM].handle = GetDIN0StatusStr; /* State DIN */ 8038194: 635d str r5, [r3, #52] ; 0x34 /* 7. DO0Toggle */ // + traps[DO0_TOGGLED].trapId = DO0_TOGGLED; traps[DO0_TOGGLED].varbindId = 5; traps[DO0_TOGGLED].trapEnable = true; traps[DO0_TOGGLED].handle = GetDOUT0StatusStr; /* State DO0 */ 8038196: 63dc str r4, [r3, #60] ; 0x3c traps[DI0_ALARM].varbindId = 9; traps[DI0_ALARM].trapEnable = true; traps[DI0_ALARM].handle = GetDIN0StatusStr; /* State DIN */ /* 7. DO0Toggle */ // + traps[DO0_TOGGLED].trapId = DO0_TOGGLED; 8038198: 2507 movs r5, #7 traps[DO0_TOGGLED].varbindId = 5; traps[DO0_TOGGLED].trapEnable = true; traps[DO0_TOGGLED].handle = GetDOUT0StatusStr; /* State DO0 */ /* 8. DO1Toggle */ // + traps[DO1_TOGGLED].trapId = DO1_TOGGLED; 803819a: 2408 movs r4, #8 traps[DO1_TOGGLED].varbindId = 6; traps[DO1_TOGGLED].trapEnable = true; traps[DO1_TOGGLED].handle = GetDOUT1StatusStr; /* State DO1 */ 803819c: 6458 str r0, [r3, #68] ; 0x44 /* 9. BatteryTemperatureNorm */ // + traps[BATTERY_TEMPERATURE_NORM].trapId = BATTERY_TEMPERATURE_NORM; traps[BATTERY_TEMPERATURE_NORM].varbindId = 10; traps[BATTERY_TEMPERATURE_NORM].trapEnable = true; traps[BATTERY_TEMPERATURE_NORM].handle = GetInternalTempStr; /* BatteryTemperature */ 803819e: 4847 ldr r0, [pc, #284] ; (80382bc ) traps[DEVICE_REBOOTED].trapEnable = true; traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; traps[DI0_NORM].varbindId = 9; 80381a0: f883 102a strb.w r1, [r3, #42] ; 0x2a traps[DI0_NORM].trapEnable = true; traps[DI0_NORM].handle = GetDIN0StatusStr; /* State DIN */ /* 6. DI0Alarm */ // + traps[DI0_ALARM].trapId = DI0_ALARM; traps[DI0_ALARM].varbindId = 9; 80381a4: f883 1032 strb.w r1, [r3, #50] ; 0x32 traps[DI0_ALARM].trapEnable = true; traps[DI0_ALARM].handle = GetDIN0StatusStr; /* State DIN */ /* 7. DO0Toggle */ // + traps[DO0_TOGGLED].trapId = DO0_TOGGLED; 80381a8: f883 5039 strb.w r5, [r3, #57] ; 0x39 traps[DO0_TOGGLED].varbindId = 5; traps[DO0_TOGGLED].trapEnable = true; traps[DO0_TOGGLED].handle = GetDOUT0StatusStr; /* State DO0 */ /* 8. DO1Toggle */ // + traps[DO1_TOGGLED].trapId = DO1_TOGGLED; 80381ac: f883 4041 strb.w r4, [r3, #65] ; 0x41 * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 80381b0: 725a strb r2, [r3, #9] traps[FW_VERSION_UPDATE].varbindId = 1; 80381b2: 729a strb r2, [r3, #10] traps[FW_VERSION_UPDATE].trapEnable = true; 80381b4: 72da strb r2, [r3, #11] traps[FW_VERSION_UPDATE].handle = GetVersionStr; /* FWVersion */ /* 2. FWVersionUpdated */ // + traps[FW_VERSION_UPDATED].trapId = FW_VERSION_UPDATED; traps[FW_VERSION_UPDATED].varbindId = 1; 80381b6: 749a strb r2, [r3, #18] traps[FW_VERSION_UPDATED].trapEnable = true; 80381b8: 74da strb r2, [r3, #19] traps[FW_VERSION_UPDATED].handle = GetVersionStr; /* FWVersion */ /* 3. DeviceRestored */ // + traps[DEVICE_RESTORED].trapId = DEVICE_RESTORED; traps[DEVICE_RESTORED].varbindId = 1; 80381ba: 769a strb r2, [r3, #26] traps[DEVICE_RESTORED].trapEnable = true; 80381bc: 76da strb r2, [r3, #27] traps[DEVICE_RESTORED].handle = GetVersionStr;//GetRestore; /* RestoreSignal */ /* 4. DeviceRebooted */ // + traps[DEVICE_REBOOTED].trapId = DEVICE_REBOOTED; traps[DEVICE_REBOOTED].varbindId = 1; 80381be: f883 2022 strb.w r2, [r3, #34] ; 0x22 traps[DEVICE_REBOOTED].trapEnable = true; 80381c2: f883 2023 strb.w r2, [r3, #35] ; 0x23 traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; traps[DI0_NORM].varbindId = 9; traps[DI0_NORM].trapEnable = true; 80381c6: f883 202b strb.w r2, [r3, #43] ; 0x2b traps[DI0_NORM].handle = GetDIN0StatusStr; /* State DIN */ /* 6. DI0Alarm */ // + traps[DI0_ALARM].trapId = DI0_ALARM; traps[DI0_ALARM].varbindId = 9; traps[DI0_ALARM].trapEnable = true; 80381ca: f883 2033 strb.w r2, [r3, #51] ; 0x33 traps[DI0_ALARM].handle = GetDIN0StatusStr; /* State DIN */ /* 7. DO0Toggle */ // + traps[DO0_TOGGLED].trapId = DO0_TOGGLED; traps[DO0_TOGGLED].varbindId = 5; traps[DO0_TOGGLED].trapEnable = true; 80381ce: f883 203b strb.w r2, [r3, #59] ; 0x3b traps[DO0_TOGGLED].handle = GetDOUT0StatusStr; /* State DO0 */ /* 8. DO1Toggle */ // + traps[DO1_TOGGLED].trapId = DO1_TOGGLED; traps[DO1_TOGGLED].varbindId = 6; traps[DO1_TOGGLED].trapEnable = true; 80381d2: f883 2043 strb.w r2, [r3, #67] ; 0x43 traps[DO1_TOGGLED].handle = GetDOUT1StatusStr; /* State DO1 */ /* 9. BatteryTemperatureNorm */ // + traps[BATTERY_TEMPERATURE_NORM].trapId = BATTERY_TEMPERATURE_NORM; 80381d6: f883 1049 strb.w r1, [r3, #73] ; 0x49 traps[BATTERY_TEMPERATURE_NORM].varbindId = 10; 80381da: 210a movs r1, #10 80381dc: f883 104a strb.w r1, [r3, #74] ; 0x4a traps[BATTERY_TEMPERATURE_NORM].trapEnable = true; traps[BATTERY_TEMPERATURE_NORM].handle = GetInternalTempStr; /* BatteryTemperature */ 80381e0: 64d8 str r0, [r3, #76] ; 0x4c /* 10. BatteryTemperatureAlarm */ // + traps[BATTERY_TEMPERATURE_ALARM].trapId = BATTERY_TEMPERATURE_ALARM; 80381e2: f883 1051 strb.w r1, [r3, #81] ; 0x51 traps[BATTERY_TEMPERATURE_ALARM].varbindId = 10; 80381e6: f883 1052 strb.w r1, [r3, #82] ; 0x52 traps[BATTERY_TEMPERATURE_ALARM].trapEnable = true; traps[BATTERY_TEMPERATURE_ALARM].handle = GetInternalTempStr; /* BatteryTemperature */ 80381ea: 6558 str r0, [r3, #84] ; 0x54 /* 11. LineAlarm */ // + traps[LINE_ALARM].trapId = LINE_ALARM; 80381ec: 210b movs r1, #11 traps[LINE_ALARM].varbindId = 12; traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 80381ee: 4834 ldr r0, [pc, #208] ; (80382c0 ) traps[BATTERY_TEMPERATURE_ALARM].varbindId = 10; traps[BATTERY_TEMPERATURE_ALARM].trapEnable = true; traps[BATTERY_TEMPERATURE_ALARM].handle = GetInternalTempStr; /* BatteryTemperature */ /* 11. LineAlarm */ // + traps[LINE_ALARM].trapId = LINE_ALARM; 80381f0: f883 1059 strb.w r1, [r3, #89] ; 0x59 traps[LINE_ALARM].varbindId = 12; 80381f4: 210c movs r1, #12 traps[LOW_BAT_ALARM].varbindId = 15; traps[LOW_BAT_ALARM].trapEnable = true; traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ /* 14. LowBatNorm */ // + traps[LOW_BAT_NORM].trapId = LOW_BAT_NORM; 80381f6: 240e movs r4, #14 /* 15. PowerAlarm */ // + traps[POWER_ALARM].trapId = POWER_ALARM; traps[POWER_ALARM].varbindId = 14; traps[POWER_ALARM].trapEnable = true; traps[POWER_ALARM].handle = GetPowerStr; /* PowerAlarm */ 80381f8: 4d32 ldr r5, [pc, #200] ; (80382c4 ) traps[BATTERY_TEMPERATURE_ALARM].trapEnable = true; traps[BATTERY_TEMPERATURE_ALARM].handle = GetInternalTempStr; /* BatteryTemperature */ /* 11. LineAlarm */ // + traps[LINE_ALARM].trapId = LINE_ALARM; traps[LINE_ALARM].varbindId = 12; 80381fa: f883 105a strb.w r1, [r3, #90] ; 0x5a traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 80381fe: 65d8 str r0, [r3, #92] ; 0x5c /* 12. LineNorm */ // + traps[LINE_NORM].trapId = LINE_NORM; 8038200: f883 1061 strb.w r1, [r3, #97] ; 0x61 traps[LINE_NORM].varbindId = 12; 8038204: f883 1062 strb.w r1, [r3, #98] ; 0x62 traps[LINE_NORM].trapEnable = true; traps[LINE_NORM].handle = GetInputVoltageStr; /* LineNorm */ 8038208: 6658 str r0, [r3, #100] ; 0x64 /* 13. LowBatAlarm */ // + traps[LOW_BAT_ALARM].trapId = LOW_BAT_ALARM; 803820a: 210d movs r1, #13 traps[LOW_BAT_ALARM].varbindId = 15; traps[LOW_BAT_ALARM].trapEnable = true; traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 803820c: 482e ldr r0, [pc, #184] ; (80382c8 ) traps[LINE_NORM].varbindId = 12; traps[LINE_NORM].trapEnable = true; traps[LINE_NORM].handle = GetInputVoltageStr; /* LineNorm */ /* 13. LowBatAlarm */ // + traps[LOW_BAT_ALARM].trapId = LOW_BAT_ALARM; 803820e: f883 1069 strb.w r1, [r3, #105] ; 0x69 traps[LOW_BAT_ALARM].varbindId = 15; traps[LOW_BAT_ALARM].trapEnable = true; traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ /* 14. LowBatNorm */ // + traps[LOW_BAT_NORM].trapId = LOW_BAT_NORM; 8038212: f883 4071 strb.w r4, [r3, #113] ; 0x71 traps[LINE_NORM].trapEnable = true; traps[LINE_NORM].handle = GetInputVoltageStr; /* LineNorm */ /* 13. LowBatAlarm */ // + traps[LOW_BAT_ALARM].trapId = LOW_BAT_ALARM; traps[LOW_BAT_ALARM].varbindId = 15; 8038216: 210f movs r1, #15 traps[LOW_BAT_NORM].trapEnable = true; traps[LOW_BAT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ /* 15. PowerAlarm */ // + traps[POWER_ALARM].trapId = POWER_ALARM; traps[POWER_ALARM].varbindId = 14; 8038218: f883 407a strb.w r4, [r3, #122] ; 0x7a traps[POWER_ALARM].trapEnable = true; traps[POWER_ALARM].handle = GetPowerStr; /* PowerAlarm */ /* 16. PowerNorm */ // + traps[POWER_NORM].trapId = POWER_NORM; 803821c: 2610 movs r6, #16 traps[POWER_NORM].varbindId = 14; 803821e: f883 4082 strb.w r4, [r3, #130] ; 0x82 traps[POWER_NORM].trapEnable = true; traps[POWER_NORM].handle = GetPowerStr; /* PowerNorm */ /* 17. ConnectMonitorAlarm */ // traps[CONNECT_MONITOR_ALARM].trapId = CONNECT_MONITOR_ALARM; 8038222: 2411 movs r4, #17 /* 15. PowerAlarm */ // + traps[POWER_ALARM].trapId = POWER_ALARM; traps[POWER_ALARM].varbindId = 14; traps[POWER_ALARM].trapEnable = true; traps[POWER_ALARM].handle = GetPowerStr; /* PowerAlarm */ 8038224: 67dd str r5, [r3, #124] ; 0x7c /* 16. PowerNorm */ // + traps[POWER_NORM].trapId = POWER_NORM; 8038226: f883 6081 strb.w r6, [r3, #129] ; 0x81 traps[POWER_NORM].varbindId = 14; traps[POWER_NORM].trapEnable = true; traps[POWER_NORM].handle = GetPowerStr; /* PowerNorm */ 803822a: f8c3 5084 str.w r5, [r3, #132] ; 0x84 /* 17. ConnectMonitorAlarm */ // traps[CONNECT_MONITOR_ALARM].trapId = CONNECT_MONITOR_ALARM; 803822e: f883 4089 strb.w r4, [r3, #137] ; 0x89 traps[CONNECT_MONITOR_ALARM].varbindId = 17; 8038232: f883 408a strb.w r4, [r3, #138] ; 0x8a traps[CONNECT_MONITOR_ALARM].trapEnable = true; traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 8038236: 4d25 ldr r5, [pc, #148] ; (80382cc ) traps[DO1_TOGGLED].handle = GetDOUT1StatusStr; /* State DO1 */ /* 9. BatteryTemperatureNorm */ // + traps[BATTERY_TEMPERATURE_NORM].trapId = BATTERY_TEMPERATURE_NORM; traps[BATTERY_TEMPERATURE_NORM].varbindId = 10; traps[BATTERY_TEMPERATURE_NORM].trapEnable = true; 8038238: f883 204b strb.w r2, [r3, #75] ; 0x4b traps[BATTERY_TEMPERATURE_NORM].handle = GetInternalTempStr; /* BatteryTemperature */ /* 10. BatteryTemperatureAlarm */ // + traps[BATTERY_TEMPERATURE_ALARM].trapId = BATTERY_TEMPERATURE_ALARM; traps[BATTERY_TEMPERATURE_ALARM].varbindId = 10; traps[BATTERY_TEMPERATURE_ALARM].trapEnable = true; 803823c: f883 2053 strb.w r2, [r3, #83] ; 0x53 traps[BATTERY_TEMPERATURE_ALARM].handle = GetInternalTempStr; /* BatteryTemperature */ /* 11. LineAlarm */ // + traps[LINE_ALARM].trapId = LINE_ALARM; traps[LINE_ALARM].varbindId = 12; traps[LINE_ALARM].trapEnable = true; 8038240: f883 205b strb.w r2, [r3, #91] ; 0x5b traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ /* 12. LineNorm */ // + traps[LINE_NORM].trapId = LINE_NORM; traps[LINE_NORM].varbindId = 12; traps[LINE_NORM].trapEnable = true; 8038244: f883 2063 strb.w r2, [r3, #99] ; 0x63 traps[LINE_NORM].handle = GetInputVoltageStr; /* LineNorm */ /* 13. LowBatAlarm */ // + traps[LOW_BAT_ALARM].trapId = LOW_BAT_ALARM; traps[LOW_BAT_ALARM].varbindId = 15; 8038248: f883 106a strb.w r1, [r3, #106] ; 0x6a traps[LOW_BAT_ALARM].trapEnable = true; 803824c: f883 206b strb.w r2, [r3, #107] ; 0x6b traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8038250: 66d8 str r0, [r3, #108] ; 0x6c /* 14. LowBatNorm */ // + traps[LOW_BAT_NORM].trapId = LOW_BAT_NORM; traps[LOW_BAT_NORM].varbindId = 15; 8038252: f883 1072 strb.w r1, [r3, #114] ; 0x72 traps[LOW_BAT_NORM].trapEnable = true; 8038256: f883 2073 strb.w r2, [r3, #115] ; 0x73 traps[LOW_BAT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 803825a: 6758 str r0, [r3, #116] ; 0x74 /* 15. PowerAlarm */ // + traps[POWER_ALARM].trapId = POWER_ALARM; 803825c: f883 1079 strb.w r1, [r3, #121] ; 0x79 traps[POWER_ALARM].varbindId = 14; traps[POWER_ALARM].trapEnable = true; 8038260: f883 207b strb.w r2, [r3, #123] ; 0x7b traps[POWER_ALARM].handle = GetPowerStr; /* PowerAlarm */ /* 16. PowerNorm */ // + traps[POWER_NORM].trapId = POWER_NORM; traps[POWER_NORM].varbindId = 14; traps[POWER_NORM].trapEnable = true; 8038264: f883 2083 strb.w r2, [r3, #131] ; 0x83 traps[POWER_NORM].handle = GetPowerStr; /* PowerNorm */ /* 17. ConnectMonitorAlarm */ // traps[CONNECT_MONITOR_ALARM].trapId = CONNECT_MONITOR_ALARM; traps[CONNECT_MONITOR_ALARM].varbindId = 17; traps[CONNECT_MONITOR_ALARM].trapEnable = true; 8038268: f883 208b strb.w r2, [r3, #139] ; 0x8b traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; traps[CONNECT_MONITOR_NORM].varbindId = 17; 803826c: f883 4092 strb.w r4, [r3, #146] ; 0x92 traps[CONNECT_MONITOR_NORM].trapEnable = true; traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; 8038270: 2413 movs r4, #19 traps[CONNECT_MONITOR_ALARM].varbindId = 17; traps[CONNECT_MONITOR_ALARM].trapEnable = true; traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; 8038272: 2612 movs r6, #18 traps[CONNECT_MONITOR_NORM].varbindId = 17; traps[CONNECT_MONITOR_NORM].trapEnable = true; traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; 8038274: f883 4099 strb.w r4, [r3, #153] ; 0x99 traps[BATTERY_CONNECT_ALARM].varbindId = 15; traps[BATTERY_CONNECT_ALARM].trapEnable = true; traps[BATTERY_CONNECT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ /* 20. BatteryConnectNorm */ // + traps[BATTERY_CONNECT_NORM].trapId = BATTERY_CONNECT_NORM; 8038278: 2414 movs r4, #20 /* 17. ConnectMonitorAlarm */ // traps[CONNECT_MONITOR_ALARM].trapId = CONNECT_MONITOR_ALARM; traps[CONNECT_MONITOR_ALARM].varbindId = 17; traps[CONNECT_MONITOR_ALARM].trapEnable = true; traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 803827a: f8c3 508c str.w r5, [r3, #140] ; 0x8c /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; 803827e: f883 6091 strb.w r6, [r3, #145] ; 0x91 traps[CONNECT_MONITOR_NORM].varbindId = 17; traps[CONNECT_MONITOR_NORM].trapEnable = true; 8038282: f883 2093 strb.w r2, [r3, #147] ; 0x93 traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr;//GetConnectMonitorStr; /* ConnectMonitor */ 8038286: f8c3 5094 str.w r5, [r3, #148] ; 0x94 /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; traps[BATTERY_CONNECT_ALARM].varbindId = 15; 803828a: f883 109a strb.w r1, [r3, #154] ; 0x9a traps[BATTERY_CONNECT_ALARM].trapEnable = true; 803828e: f883 209b strb.w r2, [r3, #155] ; 0x9b traps[BATTERY_CONNECT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8038292: f8c3 009c str.w r0, [r3, #156] ; 0x9c /* 20. BatteryConnectNorm */ // + traps[BATTERY_CONNECT_NORM].trapId = BATTERY_CONNECT_NORM; 8038296: f883 40a1 strb.w r4, [r3, #161] ; 0xa1 traps[BATTERY_CONNECT_NORM].varbindId = 15; 803829a: f883 10a2 strb.w r1, [r3, #162] ; 0xa2 traps[BATTERY_CONNECT_NORM].trapEnable = true; 803829e: f883 20a3 strb.w r2, [r3, #163] ; 0xa3 traps[BATTERY_CONNECT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 80382a2: f8c3 00a4 str.w r0, [r3, #164] ; 0xa4 80382a6: bd70 pop {r4, r5, r6, pc} 80382a8: 20010320 .word 0x20010320 80382ac: 0802819d .word 0x0802819d 80382b0: 0802804d .word 0x0802804d 80382b4: 080280c1 .word 0x080280c1 80382b8: 080280e5 .word 0x080280e5 80382bc: 08027e1d .word 0x08027e1d 80382c0: 08027d59 .word 0x08027d59 80382c4: 08027db1 .word 0x08027db1 80382c8: 08027dd5 .word 0x08027dd5 80382cc: 08027e6d .word 0x08027e6d 080382d0 : /** * @brief Отправка трапа с переменной, зарегистрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 80382d0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} char msg[255]; uint8_t len = 0; 80382d4: 2500 movs r5, #0 /** * @brief Отправка трапа с переменной, зарегистрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 80382d6: f5ad 7d07 sub.w sp, sp, #540 ; 0x21c 80382da: 4681 mov r9, r0 char msg[255]; uint8_t len = 0; struct snmp_varbind *vb; struct snmp_obj_id trapObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 2, 1}}; 80382dc: 4629 mov r1, r5 80382de: 2284 movs r2, #132 ; 0x84 80382e0: a804 add r0, sp, #16 * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { char msg[255]; uint8_t len = 0; 80382e2: f88d 500f strb.w r5, [sp, #15] struct snmp_varbind *vb; struct snmp_obj_id trapObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 2, 1}}; 80382e6: f7e9 fd97 bl 8021e18 80382ea: 2202 movs r2, #2 80382ec: 2401 movs r4, #1 80382ee: 2603 movs r6, #3 80382f0: 230b movs r3, #11 80382f2: f04f 0804 mov.w r8, #4 80382f6: 2706 movs r7, #6 80382f8: f24a 3b18 movw fp, #41752 ; 0xa318 80382fc: f240 3a8f movw sl, #911 ; 0x38f 8038300: 920e str r2, [sp, #56] ; 0x38 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038302: 4629 mov r1, r5 8038304: 2284 movs r2, #132 ; 0x84 8038306: a825 add r0, sp, #148 ; 0x94 bool SNMP_SendVarbindTrap(TRAP_t *trap) { char msg[255]; uint8_t len = 0; struct snmp_varbind *vb; struct snmp_obj_id trapObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 2, 1}}; 8038308: f88d 3010 strb.w r3, [sp, #16] 803830c: 9606 str r6, [sp, #24] 803830e: 960d str r6, [sp, #52] ; 0x34 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038310: 9301 str r3, [sp, #4] bool SNMP_SendVarbindTrap(TRAP_t *trap) { char msg[255]; uint8_t len = 0; struct snmp_varbind *vb; struct snmp_obj_id trapObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 2, 1}}; 8038312: 9405 str r4, [sp, #20] 8038314: 9707 str r7, [sp, #28] 8038316: 9408 str r4, [sp, #32] 8038318: f8cd 8024 str.w r8, [sp, #36] ; 0x24 803831c: 940a str r4, [sp, #40] ; 0x28 803831e: f8cd b02c str.w fp, [sp, #44] ; 0x2c 8038322: f8cd a030 str.w sl, [sp, #48] ; 0x30 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038326: f7e9 fd77 bl 8021e18 803832a: 9b01 ldr r3, [sp, #4] 803832c: 9627 str r6, [sp, #156] ; 0x9c 803832e: f88d 3094 strb.w r3, [sp, #148] ; 0x94 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8038332: f899 3001 ldrb.w r3, [r9, #1] { char msg[255]; uint8_t len = 0; struct snmp_varbind *vb; struct snmp_obj_id trapObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 2, 1}}; struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038336: 962e str r6, [sp, #184] ; 0xb8 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8038338: 930f str r3, [sp, #60] ; 0x3c varObjId.id[varObjId.len - 1] = trap->varbindId; 803833a: f899 3002 ldrb.w r3, [r9, #2] { char msg[255]; uint8_t len = 0; struct snmp_varbind *vb; struct snmp_obj_id trapObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 2, 1}}; struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 803833e: 9426 str r4, [sp, #152] ; 0x98 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; 8038340: 9330 str r3, [sp, #192] ; 0xc0 trap->handle(msg, &len); 8038342: a846 add r0, sp, #280 ; 0x118 8038344: f8d9 3004 ldr.w r3, [r9, #4] { char msg[255]; uint8_t len = 0; struct snmp_varbind *vb; struct snmp_obj_id trapObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 2, 1}}; struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8038348: 9728 str r7, [sp, #160] ; 0xa0 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 803834a: f10d 010f add.w r1, sp, #15 { char msg[255]; uint8_t len = 0; struct snmp_varbind *vb; struct snmp_obj_id trapObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 2, 1}}; struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 803834e: 9429 str r4, [sp, #164] ; 0xa4 8038350: f8cd 80a8 str.w r8, [sp, #168] ; 0xa8 8038354: 942b str r4, [sp, #172] ; 0xac 8038356: f8cd b0b0 str.w fp, [sp, #176] ; 0xb0 803835a: f8cd a0b4 str.w sl, [sp, #180] ; 0xb4 803835e: 942f str r4, [sp, #188] ; 0xbc trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 8038360: 4798 blx r3 vb = snmp_varbind_alloc(&varObjId, SNMP_ASN1_OC_STR, len); 8038362: a825 add r0, sp, #148 ; 0x94 8038364: 4641 mov r1, r8 8038366: f89d 200f ldrb.w r2, [sp, #15] 803836a: f7fc fff9 bl 8035360 if(vb != NULL ) { 803836e: 4606 mov r6, r0 8038370: b198 cbz r0, 803839a memcpy(vb->value, msg, len); 8038372: f89d 200f ldrb.w r2, [sp, #15] 8038376: 6940 ldr r0, [r0, #20] 8038378: a946 add r1, sp, #280 ; 0x118 803837a: f7e9 fc93 bl 8021ca4 snmp_varbind_tail_add(&trap_msg.outvb, vb); 803837e: 4809 ldr r0, [pc, #36] ; (80383a4 ) 8038380: 4631 mov r1, r6 8038382: f7fd f899 bl 80354b8 snmp_send_trap(SNMP_GENTRAP_ENTERPRISESPC, &trapObjId, 0); 8038386: a904 add r1, sp, #16 8038388: 462a mov r2, r5 803838a: 4638 mov r0, r7 803838c: f7fe fa02 bl 8036794 snmp_varbind_list_free(&trap_msg.outvb); 8038390: 4804 ldr r0, [pc, #16] ; (80383a4 ) 8038392: f7fd f838 bl 8035406 return true; 8038396: 4620 mov r0, r4 8038398: e7ff b.n 803839a } else { return false; } } 803839a: f50d 7d07 add.w sp, sp, #540 ; 0x21c 803839e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80383a2: bf00 nop 80383a4: 200100a8 .word 0x200100a8 080383a8 : * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 80383a8: b570 push {r4, r5, r6, lr} { volatile uint32_t i; GPIO_InitTypeDef GPIO_InitStructure; /* Enable GPIOs clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB 80383aa: 2007 movs r0, #7 * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 80383ac: b0b4 sub sp, #208 ; 0xd0 { volatile uint32_t i; GPIO_InitTypeDef GPIO_InitStructure; /* Enable GPIOs clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB 80383ae: 2101 movs r1, #1 80383b0: f7ed fb58 bl 8025a64 | RCC_AHB1Periph_GPIOC, ENABLE); /* Enable SYSCFG clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); 80383b4: 2101 movs r1, #1 80383b6: f44f 4080 mov.w r0, #16384 ; 0x4000 80383ba: f7ed fb77 bl 8025aac /* MII/RMII Media interface selection --------------------------------------*/ SYSCFG_ETH_MediaInterfaceConfig(SYSCFG_ETH_MediaInterface_RMII); 80383be: 2001 movs r0, #1 80383c0: f7ed fd68 bl 8025e94 ETH_RST_PIN -------> PE2 - замена на PE13 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; 80383c4: 2386 movs r3, #134 ; 0x86 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 80383c6: 2400 movs r4, #0 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; 80383c8: 2502 movs r5, #2 ETH_RST_PIN -------> PE2 - замена на PE13 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; 80383ca: 9303 str r3, [sp, #12] GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; GPIO_Init(GPIOA, &GPIO_InitStructure); 80383cc: 4864 ldr r0, [pc, #400] ; (8038560 ) */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; 80383ce: f88d 5010 strb.w r5, [sp, #16] */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; 80383d2: 2303 movs r3, #3 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; GPIO_Init(GPIOA, &GPIO_InitStructure); 80383d4: a903 add r1, sp, #12 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; 80383d6: f88d 3011 strb.w r3, [sp, #17] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 80383da: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; 80383de: f88d 4013 strb.w r4, [sp, #19] GPIO_Init(GPIOA, &GPIO_InitStructure); 80383e2: f7ed fa5f bl 80258a4 GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH); 80383e6: 2101 movs r1, #1 80383e8: 220b movs r2, #11 80383ea: 485d ldr r0, [pc, #372] ; (8038560 ) 80383ec: f7ed faa3 bl 8025936 GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH); 80383f0: 220b movs r2, #11 80383f2: 485b ldr r0, [pc, #364] ; (8038560 ) 80383f4: 4629 mov r1, r5 80383f6: f7ed fa9e bl 8025936 GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH); 80383fa: 220b movs r2, #11 80383fc: 2107 movs r1, #7 80383fe: 4858 ldr r0, [pc, #352] ; (8038560 ) 8038400: f7ed fa99 bl 8025936 /* Configure PB10,PB11,PB12 and PB13 */ GPIO_InitStructure.GPIO_Pin = /* GPIO_Pin_10 | */ GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; 8038404: f44f 5360 mov.w r3, #14336 ; 0x3800 GPIO_Init(GPIOB, &GPIO_InitStructure); 8038408: 4856 ldr r0, [pc, #344] ; (8038564 ) GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH); /* Configure PB10,PB11,PB12 and PB13 */ GPIO_InitStructure.GPIO_Pin = /* GPIO_Pin_10 | */ GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; 803840a: 9303 str r3, [sp, #12] GPIO_Init(GPIOB, &GPIO_InitStructure); 803840c: a903 add r1, sp, #12 803840e: f7ed fa49 bl 80258a4 //GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_ETH); 8038412: 210b movs r1, #11 8038414: 460a mov r2, r1 8038416: 4853 ldr r0, [pc, #332] ; (8038564 ) 8038418: f7ed fa8d bl 8025936 GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_ETH); 803841c: 210c movs r1, #12 803841e: 220b movs r2, #11 8038420: 4850 ldr r0, [pc, #320] ; (8038564 ) 8038422: f7ed fa88 bl 8025936 GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_ETH); 8038426: 220b movs r2, #11 8038428: 210d movs r1, #13 803842a: 484e ldr r0, [pc, #312] ; (8038564 ) 803842c: f7ed fa83 bl 8025936 /* Configure PC1, PC4 and PC5 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5; 8038430: 2332 movs r3, #50 ; 0x32 GPIO_Init(GPIOC, &GPIO_InitStructure); 8038432: 484d ldr r0, [pc, #308] ; (8038568 ) GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_ETH); /* Configure PC1, PC4 and PC5 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5; 8038434: 9303 str r3, [sp, #12] GPIO_Init(GPIOC, &GPIO_InitStructure); 8038436: a903 add r1, sp, #12 8038438: f7ed fa34 bl 80258a4 GPIO_PinAFConfig(GPIOC, GPIO_PinSource1, GPIO_AF_ETH); 803843c: 484a ldr r0, [pc, #296] ; (8038568 ) 803843e: 2101 movs r1, #1 8038440: 220b movs r2, #11 8038442: f7ed fa78 bl 8025936 GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); 8038446: 4848 ldr r0, [pc, #288] ; (8038568 ) 8038448: 2104 movs r1, #4 803844a: 220b movs r2, #11 803844c: f7ed fa73 bl 8025936 GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); 8038450: 220b movs r2, #11 8038452: 4845 ldr r0, [pc, #276] ; (8038568 ) 8038454: 2105 movs r1, #5 8038456: f7ed fa6e bl 8025936 /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; 803845a: f44f 5600 mov.w r6, #8192 ; 0x2000 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 803845e: 2301 movs r3, #1 GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOE, &GPIO_InitStructure); 8038460: 4842 ldr r0, [pc, #264] ; (803856c ) GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 8038462: f88d 3010 strb.w r3, [sp, #16] GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOE, &GPIO_InitStructure); 8038466: a903 add r1, sp, #12 /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; 8038468: f88d 3013 strb.w r3, [sp, #19] GPIO_PinAFConfig(GPIOC, GPIO_PinSource1, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; 803846c: 9603 str r6, [sp, #12] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 803846e: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 8038472: f88d 5011 strb.w r5, [sp, #17] GPIO_Init(GPIOE, &GPIO_InitStructure); 8038476: f7ed fa15 bl 80258a4 GPIO_ResetBits(GPIOE, GPIO_Pin_13); 803847a: 483c ldr r0, [pc, #240] ; (803856c ) 803847c: 4631 mov r1, r6 803847e: f7ed fa58 bl 8025932 for (i = 0; i < 20000; i++); 8038482: 9401 str r4, [sp, #4] 8038484: f644 631f movw r3, #19999 ; 0x4e1f 8038488: e002 b.n 8038490 803848a: 9a01 ldr r2, [sp, #4] 803848c: 3201 adds r2, #1 803848e: 9201 str r2, [sp, #4] 8038490: 9a01 ldr r2, [sp, #4] 8038492: 429a cmp r2, r3 8038494: d9f9 bls.n 803848a GPIO_SetBits(GPIOE, GPIO_Pin_13); 8038496: 4835 ldr r0, [pc, #212] ; (803856c ) 8038498: f44f 5100 mov.w r1, #8192 ; 0x2000 803849c: f7ed fa47 bl 802592e for (i = 0; i < 20000; i++); 80384a0: 2300 movs r3, #0 80384a2: 9301 str r3, [sp, #4] 80384a4: f644 631f movw r3, #19999 ; 0x4e1f 80384a8: e002 b.n 80384b0 80384aa: 9a01 ldr r2, [sp, #4] 80384ac: 3201 adds r2, #1 80384ae: 9201 str r2, [sp, #4] 80384b0: 9a01 ldr r2, [sp, #4] 80384b2: 429a cmp r2, r3 80384b4: d9f9 bls.n 80384aa static void ETH_MACDMA_Config(void) { ETH_InitTypeDef ETH_InitStructure; /* Enable ETHERNET clock */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_ETH_MAC | RCC_AHB1Periph_ETH_MAC_Tx | 80384b6: f04f 6060 mov.w r0, #234881024 ; 0xe000000 80384ba: 2101 movs r1, #1 80384bc: f7ed fad2 bl 8025a64 RCC_AHB1Periph_ETH_MAC_Rx, ENABLE); /* Reset ETHERNET on AHB Bus */ ETH_DeInit(); 80384c0: f000 f868 bl 8038594 /* Software reset */ ETH_SoftwareReset(); 80384c4: f000 f9fe bl 80388c4 /* Wait for software reset */ while (ETH_GetSoftwareResetStatus() == SET); 80384c8: f000 fa04 bl 80388d4 80384cc: 2801 cmp r0, #1 80384ce: d0fb beq.n 80384c8 /* ETHERNET Configuration --------------------------------------------------*/ /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); 80384d0: a805 add r0, sp, #20 80384d2: f000 f86c bl 80385ae //ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Disable; // ETH_InitStructure.ETH_Speed = ETH_Speed_10M; // ETH_InitStructure.ETH_Mode = ETH_Mode_FullDuplex; ETH_InitStructure.ETH_LoopbackMode = ETH_LoopbackMode_Disable; ETH_InitStructure.ETH_RetryTransmission = ETH_RetryTransmission_Disable; 80384d6: f44f 7300 mov.w r3, #512 ; 0x200 80384da: 930f str r3, [sp, #60] ; 0x3c /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */ ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable; ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; 80384dc: f04f 7300 mov.w r3, #33554432 ; 0x2000000 80384e0: 9326 str r3, [sp, #152] ; 0x98 ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; 80384e2: 932e str r3, [sp, #184] ; 0xb8 ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; 80384e4: f44f 3380 mov.w r3, #65536 ; 0x10000 80384e8: 932f str r3, [sp, #188] ; 0xbc ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 80384ea: f44f 0380 mov.w r3, #4194304 ; 0x400000 /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); /* Fill ETH_InitStructure parametrs */ /*------------------------ MAC -----------------------------------*/ ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 80384ee: 2501 movs r5, #1 /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */ ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable; ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 80384f0: f44f 1200 mov.w r2, #2097152 ; 0x200000 ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 80384f4: 9330 str r3, [sp, #192] ; 0xc0 ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 80384f6: f44f 5300 mov.w r3, #8192 ; 0x2000 ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; //ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Disable; // ETH_InitStructure.ETH_Speed = ETH_Speed_10M; // ETH_InitStructure.ETH_Mode = ETH_Mode_FullDuplex; ETH_InitStructure.ETH_LoopbackMode = ETH_LoopbackMode_Disable; 80384fa: 2400 movs r4, #0 /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */ ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable; ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 80384fc: 9228 str r2, [sp, #160] ; 0xa0 ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 80384fe: 9331 str r3, [sp, #196] ; 0xc4 ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; 8038500: 2204 movs r2, #4 ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1; 8038502: f44f 4380 mov.w r3, #16384 ; 0x4000 /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 8038506: 4629 mov r1, r5 8038508: a805 add r0, sp, #20 ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; 803850a: 922d str r2, [sp, #180] ; 0xb4 ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1; 803850c: 9333 str r3, [sp, #204] ; 0xcc /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); /* Fill ETH_InitStructure parametrs */ /*------------------------ MAC -----------------------------------*/ ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 803850e: 9505 str r5, [sp, #20] //ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Disable; // ETH_InitStructure.ETH_Speed = ETH_Speed_10M; // ETH_InitStructure.ETH_Mode = ETH_Mode_FullDuplex; ETH_InitStructure.ETH_LoopbackMode = ETH_LoopbackMode_Disable; 8038510: 940c str r4, [sp, #48] ; 0x30 ETH_InitStructure.ETH_RetryTransmission = ETH_RetryTransmission_Disable; ETH_InitStructure.ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8038512: 9410 str r4, [sp, #64] ; 0x40 ETH_InitStructure.ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8038514: 9413 str r4, [sp, #76] ; 0x4c ETH_InitStructure.ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Enable; 8038516: 9416 str r4, [sp, #88] ; 0x58 ETH_InitStructure.ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8038518: 9418 str r4, [sp, #96] ; 0x60 ETH_InitStructure.ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 803851a: 9419 str r4, [sp, #100] ; 0x64 ETH_InitStructure.ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 803851c: 941a str r4, [sp, #104] ; 0x68 /*------------------------ DMA -----------------------------------*/ /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */ ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable; 803851e: 9425 str r4, [sp, #148] ; 0x94 ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; 8038520: 942a str r4, [sp, #168] ; 0xa8 ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8038522: 942b str r4, [sp, #172] ; 0xac ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1; /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 8038524: f000 fa80 bl 8038a28 8038528: 4e11 ldr r6, [pc, #68] ; (8038570 ) /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 803852a: 4629 mov r1, r5 ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1; /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 803852c: 6030 str r0, [r6, #0] /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 803852e: 4811 ldr r0, [pc, #68] ; (8038574 ) 8038530: f000 f9e2 bl 80388f8 void ETH_NVIC_Config(void) { NVIC_InitTypeDef NVIC_InitStructure; /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); 8038534: f44f 7040 mov.w r0, #768 ; 0x300 8038538: f7ed f834 bl 80255a4 /* Enable the Ethernet global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn; 803853c: 233d movs r3, #61 ; 0x3d 803853e: f88d 3008 strb.w r3, [sp, #8] NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 5; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); 8038542: a802 add r0, sp, #8 /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); /* Enable the Ethernet global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 5; 8038544: 2305 movs r3, #5 8038546: f88d 3009 strb.w r3, [sp, #9] NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; 803854a: f88d 400a strb.w r4, [sp, #10] NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 803854e: f88d 500b strb.w r5, [sp, #11] NVIC_Init(&NVIC_InitStructure); 8038552: f7ed f831 bl 80255b8 /* Configure the Ethernet MAC/DMA */ ETH_MACDMA_Config(); ETH_NVIC_Config(); if (EthInitStatus == 0) { 8038556: 6833 ldr r3, [r6, #0] 8038558: b903 cbnz r3, 803855c 803855a: e7fe b.n 803855a // LCD_DisplayStringLine(Line5, (uint8_t*)" Ethernet Init "); // LCD_DisplayStringLine(Line6, (uint8_t*)" failed "); // STM_EVAL_LEDOn(LED5); while(1); } } 803855c: b034 add sp, #208 ; 0xd0 803855e: bd70 pop {r4, r5, r6, pc} 8038560: 40020000 .word 0x40020000 8038564: 40020400 .word 0x40020400 8038568: 40020800 .word 0x40020800 803856c: 40021000 .word 0x40021000 8038570: 2000c854 .word 0x2000c854 8038574: 00010040 .word 0x00010040 08038578 : * @brief Inserts a delay time. * @param nCount: specifies the delay time length. * @retval None */ static void ETH_Delay(__IO uint32_t nCount) { 8038578: b084 sub sp, #16 __IO uint32_t index = 0; 803857a: 2300 movs r3, #0 * @brief Inserts a delay time. * @param nCount: specifies the delay time length. * @retval None */ static void ETH_Delay(__IO uint32_t nCount) { 803857c: 9001 str r0, [sp, #4] __IO uint32_t index = 0; 803857e: 9303 str r3, [sp, #12] for(index = nCount; index != 0; index--) 8038580: 9b01 ldr r3, [sp, #4] 8038582: e001 b.n 8038588 8038584: 9b03 ldr r3, [sp, #12] 8038586: 3b01 subs r3, #1 8038588: 9303 str r3, [sp, #12] 803858a: 9b03 ldr r3, [sp, #12] 803858c: 2b00 cmp r3, #0 803858e: d1f9 bne.n 8038584 { } } 8038590: b004 add sp, #16 8038592: 4770 bx lr 08038594 : * @brief Deinitializes the ETHERNET peripheral registers to their default reset values. * @param None * @retval None */ void ETH_DeInit(void) { 8038594: b508 push {r3, lr} RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, ENABLE); 8038596: 2101 movs r1, #1 8038598: f04f 7000 mov.w r0, #33554432 ; 0x2000000 803859c: f7ed fa92 bl 8025ac4 RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, DISABLE); 80385a0: f04f 7000 mov.w r0, #33554432 ; 0x2000000 80385a4: 2100 movs r1, #0 } 80385a6: e8bd 4008 ldmia.w sp!, {r3, lr} * @retval None */ void ETH_DeInit(void) { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, ENABLE); RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, DISABLE); 80385aa: f7ed ba8b b.w 8025ac4 080385ae : /* Ethernet interframe gap set to 96 bits */ ETH_InitStruct->ETH_InterFrameGap = ETH_InterFrameGap_96Bit; /* Carrier Sense Enabled in Half-Duplex mode */ ETH_InitStruct->ETH_CarrierSense = ETH_CarrierSense_Enable; /* PHY speed configured to 100Mbit/s */ ETH_InitStruct->ETH_Speed = ETH_Speed_100M; 80385ae: f44f 4280 mov.w r2, #16384 ; 0x4000 80385b2: 6142 str r2, [r0, #20] /* Receive own Frames in Half-Duplex mode enabled */ ETH_InitStruct->ETH_ReceiveOwn = ETH_ReceiveOwn_Enable; /* MAC MII loopback disabled */ ETH_InitStruct->ETH_LoopbackMode = ETH_LoopbackMode_Disable; /* Full-Duplex mode selected */ ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 80385b4: f44f 6200 mov.w r2, #2048 ; 0x800 80385b8: 6202 str r2, [r0, #32] /* Receive all frames disabled */ ETH_InitStruct->ETH_ReceiveAll = ETH_ReceiveAll_Disable; /* Source address filtering (on the optional MAC addresses) disabled */ ETH_InitStruct->ETH_SourceAddrFilter = ETH_SourceAddrFilter_Disable; /* Do not forward control frames that do not pass the address filtering */ ETH_InitStruct->ETH_PassControlFrames = ETH_PassControlFrames_BlockAll; 80385ba: 2240 movs r2, #64 ; 0x40 80385bc: 6402 str r2, [r0, #64] ; 0x40 /* Disable reception of Broadcast frames */ ETH_InitStruct->ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Disable; 80385be: 2220 movs r2, #32 80385c0: 6442 str r2, [r0, #68] ; 0x44 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; ETH_InitStruct->ETH_HashTableLow = 0x0; /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; 80385c2: 2280 movs r2, #128 ; 0x80 { /* ETH_InitStruct members default value */ /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 80385c4: 2301 movs r3, #1 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; ETH_InitStruct->ETH_HashTableLow = 0x0; /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; 80385c6: 6642 str r2, [r0, #100] ; 0x64 ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; /*---------------------- DMA Configuration -------------------------------*/ /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; 80385c8: f04f 6280 mov.w r2, #67108864 ; 0x4000000 { /* ETH_InitStruct members default value */ /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 80385cc: 6003 str r3, [r0, #0] ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; /*---------------------- DMA Configuration -------------------------------*/ /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; 80385ce: f8c0 2080 str.w r2, [r0, #128] ; 0x80 /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; /* MAC watchdog enabled: cuts-off long frame */ ETH_InitStruct->ETH_Watchdog = ETH_Watchdog_Enable; 80385d2: 2300 movs r3, #0 /*---------------------- DMA Configuration -------------------------------*/ /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; /* Store and forward mode enabled for receive */ ETH_InitStruct->ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; 80385d4: f04f 7200 mov.w r2, #33554432 ; 0x2000000 /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; /* MAC watchdog enabled: cuts-off long frame */ ETH_InitStruct->ETH_Watchdog = ETH_Watchdog_Enable; 80385d8: 6043 str r3, [r0, #4] /* MAC Jabber enabled in Half-duplex mode */ ETH_InitStruct->ETH_Jabber = ETH_Jabber_Enable; 80385da: 6083 str r3, [r0, #8] /* Ethernet interframe gap set to 96 bits */ ETH_InitStruct->ETH_InterFrameGap = ETH_InterFrameGap_96Bit; 80385dc: 60c3 str r3, [r0, #12] /* Carrier Sense Enabled in Half-Duplex mode */ ETH_InitStruct->ETH_CarrierSense = ETH_CarrierSense_Enable; 80385de: 6103 str r3, [r0, #16] /* PHY speed configured to 100Mbit/s */ ETH_InitStruct->ETH_Speed = ETH_Speed_100M; /* Receive own Frames in Half-Duplex mode enabled */ ETH_InitStruct->ETH_ReceiveOwn = ETH_ReceiveOwn_Enable; 80385e0: 6183 str r3, [r0, #24] /* MAC MII loopback disabled */ ETH_InitStruct->ETH_LoopbackMode = ETH_LoopbackMode_Disable; 80385e2: 61c3 str r3, [r0, #28] /* Full-Duplex mode selected */ ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; /* IPv4 and TCP/UDP/ICMP frame Checksum Offload disabled */ ETH_InitStruct->ETH_ChecksumOffload = ETH_ChecksumOffload_Disable; 80385e4: 6243 str r3, [r0, #36] ; 0x24 /* Retry Transmission enabled for half-duplex mode */ ETH_InitStruct->ETH_RetryTransmission = ETH_RetryTransmission_Enable; 80385e6: 6283 str r3, [r0, #40] ; 0x28 /* Automatic PAD/CRC strip disabled*/ ETH_InitStruct->ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 80385e8: 62c3 str r3, [r0, #44] ; 0x2c /* half-duplex mode retransmission Backoff time_limit = 10 slot times*/ ETH_InitStruct->ETH_BackOffLimit = ETH_BackOffLimit_10; 80385ea: 6303 str r3, [r0, #48] ; 0x30 /* half-duplex mode Deferral check disabled */ ETH_InitStruct->ETH_DeferralCheck = ETH_DeferralCheck_Disable; 80385ec: 6343 str r3, [r0, #52] ; 0x34 /* Receive all frames disabled */ ETH_InitStruct->ETH_ReceiveAll = ETH_ReceiveAll_Disable; 80385ee: 6383 str r3, [r0, #56] ; 0x38 /* Source address filtering (on the optional MAC addresses) disabled */ ETH_InitStruct->ETH_SourceAddrFilter = ETH_SourceAddrFilter_Disable; 80385f0: 63c3 str r3, [r0, #60] ; 0x3c /* Do not forward control frames that do not pass the address filtering */ ETH_InitStruct->ETH_PassControlFrames = ETH_PassControlFrames_BlockAll; /* Disable reception of Broadcast frames */ ETH_InitStruct->ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Disable; /* Normal Destination address filtering (not reverse addressing) */ ETH_InitStruct->ETH_DestinationAddrFilter = ETH_DestinationAddrFilter_Normal; 80385f2: 6483 str r3, [r0, #72] ; 0x48 /* Promiscuous address filtering mode disabled */ ETH_InitStruct->ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 80385f4: 64c3 str r3, [r0, #76] ; 0x4c /* Perfect address filtering for multicast addresses */ ETH_InitStruct->ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 80385f6: 6503 str r3, [r0, #80] ; 0x50 /* Perfect address filtering for unicast addresses */ ETH_InitStruct->ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 80385f8: 6543 str r3, [r0, #84] ; 0x54 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; 80385fa: 6583 str r3, [r0, #88] ; 0x58 ETH_InitStruct->ETH_HashTableLow = 0x0; 80385fc: 65c3 str r3, [r0, #92] ; 0x5c /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; 80385fe: 6603 str r3, [r0, #96] ; 0x60 ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; ETH_InitStruct->ETH_PauseLowThreshold = ETH_PauseLowThreshold_Minus4; 8038600: 6683 str r3, [r0, #104] ; 0x68 ETH_InitStruct->ETH_UnicastPauseFrameDetect = ETH_UnicastPauseFrameDetect_Disable; 8038602: 66c3 str r3, [r0, #108] ; 0x6c ETH_InitStruct->ETH_ReceiveFlowControl = ETH_ReceiveFlowControl_Disable; 8038604: 6703 str r3, [r0, #112] ; 0x70 ETH_InitStruct->ETH_TransmitFlowControl = ETH_TransmitFlowControl_Disable; 8038606: 6743 str r3, [r0, #116] ; 0x74 /* VLANtag config (VLAN field not checked) */ ETH_InitStruct->ETH_VLANTagComparison = ETH_VLANTagComparison_16Bit; 8038608: 6783 str r3, [r0, #120] ; 0x78 ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; 803860a: 67c3 str r3, [r0, #124] ; 0x7c /*---------------------- DMA Configuration -------------------------------*/ /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; /* Store and forward mode enabled for receive */ ETH_InitStruct->ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; 803860c: f8c0 2084 str.w r2, [r0, #132] ; 0x84 ETH_InitStruct->ETH_ReceiveThresholdControl = ETH_ReceiveThresholdControl_64Bytes; /* Disable Operate on second frame (transmit a second frame to FIFO without waiting status of previous frame*/ ETH_InitStruct->ETH_SecondFrameOperate = ETH_SecondFrameOperate_Disable; /* DMA works on 32-bit aligned start source and destinations addresses */ ETH_InitStruct->ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; 8038610: f8c0 20a4 str.w r2, [r0, #164] ; 0xa4 /* Enabled Fixed Burst Mode (mix of INC4, INC8, INC16 and SINGLE DMA transactions */ ETH_InitStruct->ETH_FixedBurst = ETH_FixedBurst_Enable; 8038614: f44f 3280 mov.w r2, #65536 ; 0x10000 8038618: f8c0 20a8 str.w r2, [r0, #168] ; 0xa8 /* DMA transfer max burst length = 32 beats = 32 x 32bits */ ETH_InitStruct->ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 803861c: f44f 0280 mov.w r2, #4194304 ; 0x400000 /* Store and forward mode enabled for receive */ ETH_InitStruct->ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; /* Flush received frame that created FIFO overflow */ ETH_InitStruct->ETH_FlushReceivedFrame = ETH_FlushReceivedFrame_Enable; /* Store and forward mode enabled for transmit */ ETH_InitStruct->ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8038620: f44f 1100 mov.w r1, #2097152 ; 0x200000 /* DMA works on 32-bit aligned start source and destinations addresses */ ETH_InitStruct->ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; /* Enabled Fixed Burst Mode (mix of INC4, INC8, INC16 and SINGLE DMA transactions */ ETH_InitStruct->ETH_FixedBurst = ETH_FixedBurst_Enable; /* DMA transfer max burst length = 32 beats = 32 x 32bits */ ETH_InitStruct->ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 8038624: f8c0 20ac str.w r2, [r0, #172] ; 0xac ETH_InitStruct->ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8038628: f44f 5200 mov.w r2, #8192 ; 0x2000 /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; /* Store and forward mode enabled for receive */ ETH_InitStruct->ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; /* Flush received frame that created FIFO overflow */ ETH_InitStruct->ETH_FlushReceivedFrame = ETH_FlushReceivedFrame_Enable; 803862c: f8c0 3088 str.w r3, [r0, #136] ; 0x88 /* Store and forward mode enabled for transmit */ ETH_InitStruct->ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8038630: f8c0 108c str.w r1, [r0, #140] ; 0x8c /* Threshold TXFIFO level set to 64 bytes (used when threshold mode is enabled) */ ETH_InitStruct->ETH_TransmitThresholdControl = ETH_TransmitThresholdControl_64Bytes; 8038634: f8c0 3090 str.w r3, [r0, #144] ; 0x90 /* Disable forwarding frames with errors (short frames, CRC,...)*/ ETH_InitStruct->ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; 8038638: f8c0 3094 str.w r3, [r0, #148] ; 0x94 /* Disable undersized good frames */ ETH_InitStruct->ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 803863c: f8c0 3098 str.w r3, [r0, #152] ; 0x98 /* Threshold RXFIFO level set to 64 bytes (used when Cut-through mode is enabled) */ ETH_InitStruct->ETH_ReceiveThresholdControl = ETH_ReceiveThresholdControl_64Bytes; 8038640: f8c0 309c str.w r3, [r0, #156] ; 0x9c /* Disable Operate on second frame (transmit a second frame to FIFO without waiting status of previous frame*/ ETH_InitStruct->ETH_SecondFrameOperate = ETH_SecondFrameOperate_Disable; 8038644: f8c0 30a0 str.w r3, [r0, #160] ; 0xa0 ETH_InitStruct->ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; /* Enabled Fixed Burst Mode (mix of INC4, INC8, INC16 and SINGLE DMA transactions */ ETH_InitStruct->ETH_FixedBurst = ETH_FixedBurst_Enable; /* DMA transfer max burst length = 32 beats = 32 x 32bits */ ETH_InitStruct->ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStruct->ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8038648: f8c0 20b0 str.w r2, [r0, #176] ; 0xb0 /* DMA Ring mode skip length = 0 */ ETH_InitStruct->ETH_DescriptorSkipLength = 0x0; 803864c: f8c0 30b4 str.w r3, [r0, #180] ; 0xb4 /* Equal priority (round-robin) between transmit and receive DMA engines */ ETH_InitStruct->ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_1_1; 8038650: f8c0 30b8 str.w r3, [r0, #184] ; 0xb8 8038654: 4770 bx lr 8038656: 0000 movs r0, r0 08038658 : * @param NewState: new state of the MAC transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACTransmissionCmd(FunctionalState NewState) { 8038658: 4b04 ldr r3, [pc, #16] ; (803866c ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 803865a: 681a ldr r2, [r3, #0] void ETH_MACTransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 803865c: b110 cbz r0, 8038664 { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 803865e: f042 0208 orr.w r2, r2, #8 8038662: e001 b.n 8038668 } else { /* Disable the MAC transmission */ ETH->MACCR &= ~ETH_MACCR_TE; 8038664: f022 0208 bic.w r2, r2, #8 8038668: 601a str r2, [r3, #0] 803866a: 4770 bx lr 803866c: 40028000 .word 0x40028000 08038670 : * @param NewState: new state of the MAC reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACReceptionCmd(FunctionalState NewState) { 8038670: 4b04 ldr r3, [pc, #16] ; (8038684 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8038672: 681a ldr r2, [r3, #0] void ETH_MACReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8038674: b110 cbz r0, 803867c { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8038676: f042 0204 orr.w r2, r2, #4 803867a: e001 b.n 8038680 } else { /* Disable the MAC reception */ ETH->MACCR &= ~ETH_MACCR_RE; 803867c: f022 0204 bic.w r2, r2, #4 8038680: 601a str r2, [r3, #0] 8038682: 4770 bx lr 8038684: 40028000 .word 0x40028000 08038688 : uint32_t tmpreg; /* Check the parameters */ assert_param(IS_ETH_MAC_ADDRESS0123(MacAddr)); /* Calculate the selected MAC address high register */ tmpreg = ((uint32_t)Addr[5] << 8) | (uint32_t)Addr[4]; 8038688: 790b ldrb r3, [r1, #4] 803868a: 794a ldrb r2, [r1, #5] 803868c: ea43 2202 orr.w r2, r3, r2, lsl #8 /* Load the selected MAC address high register */ (*(__IO uint32_t *) (ETH_MAC_ADDR_HBASE + MacAddr)) = tmpreg; 8038690: 4b07 ldr r3, [pc, #28] ; (80386b0 ) 8038692: 50c2 str r2, [r0, r3] /* Calculate the selected MAC address low register */ tmpreg = ((uint32_t)Addr[3] << 24) | ((uint32_t)Addr[2] << 16) | ((uint32_t)Addr[1] << 8) | Addr[0]; 8038694: 788a ldrb r2, [r1, #2] 8038696: 78cb ldrb r3, [r1, #3] 8038698: 0412 lsls r2, r2, #16 803869a: ea42 6203 orr.w r2, r2, r3, lsl #24 803869e: 780b ldrb r3, [r1, #0] 80386a0: 431a orrs r2, r3 80386a2: 784b ldrb r3, [r1, #1] 80386a4: ea42 2203 orr.w r2, r2, r3, lsl #8 /* Load the selected MAC address low register */ (*(__IO uint32_t *) (ETH_MAC_ADDR_LBASE + MacAddr)) = tmpreg; 80386a8: 4b02 ldr r3, [pc, #8] ; (80386b4 ) 80386aa: 50c2 str r2, [r0, r3] 80386ac: 4770 bx lr 80386ae: bf00 nop 80386b0: 40028040 .word 0x40028040 80386b4: 40028044 .word 0x40028044 080386b8 : * the receive frame (should be used with interrupt mode only) * @param None * @retval Structure of type FrameTypeDef */ FrameTypeDef ETH_Get_Received_Frame_interrupt(void) { 80386b8: b537 push {r0, r1, r2, r4, r5, lr} FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; 80386ba: 2300 movs r3, #0 80386bc: 9301 str r3, [sp, #4] /* check if first segment in frame */ if(((DMARxDescToGet->Status & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) { DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 80386be: 4b24 ldr r3, [pc, #144] ; (8038750 ) 80386c0: 681a ldr r2, [r3, #0] 80386c2: 4b24 ldr r3, [pc, #144] ; (8038754 ) DMA_RX_FRAME_infos->Seg_Count = 1; 80386c4: 2401 movs r4, #1 80386c6: 681b ldr r3, [r3, #0] { FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; /* scan descriptors owned by CPU */ while (((DMARxDescToGet->Status & ETH_DMARxDesc_OWN) == (uint32_t)RESET)&& 80386c8: e033 b.n 8038732 (descriptor_scan_counterStatus & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& 80386d0: 6819 ldr r1, [r3, #0] 80386d2: 0589 lsls r1, r1, #22 80386d4: d505 bpl.n 80386e2 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) 80386d6: 6819 ldr r1, [r3, #0] /* Just by security */ descriptor_scan_counter++; /* check if first segment in frame */ if(((DMARxDescToGet->Status & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& 80386d8: 05c9 lsls r1, r1, #23 80386da: d402 bmi.n 80386e2 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) { DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 80386dc: 6013 str r3, [r2, #0] DMA_RX_FRAME_infos->Seg_Count = 1; 80386de: 6094 str r4, [r2, #8] 80386e0: e009 b.n 80386f6 DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); } /* check if intermediate segment */ else if (((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)&& 80386e2: 6819 ldr r1, [r3, #0] 80386e4: 05c9 lsls r1, r1, #23 80386e6: d408 bmi.n 80386fa ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) 80386e8: 6819 ldr r1, [r3, #0] DMA_RX_FRAME_infos->Seg_Count = 1; DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); } /* check if intermediate segment */ else if (((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)&& 80386ea: 0589 lsls r1, r1, #22 80386ec: d500 bpl.n 80386f0 80386ee: e004 b.n 80386fa ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) { (DMA_RX_FRAME_infos->Seg_Count) ++; 80386f0: 6891 ldr r1, [r2, #8] 80386f2: 3101 adds r1, #1 80386f4: 6091 str r1, [r2, #8] DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 80386f6: 68db ldr r3, [r3, #12] 80386f8: e01b b.n 8038732 80386fa: 4a16 ldr r2, [pc, #88] ; (8038754 ) 80386fc: 6013 str r3, [r2, #0] /* should be last segment */ else { /* last segment */ DMA_RX_FRAME_infos->LS_Rx_Desc = DMARxDescToGet; 80386fe: 4a14 ldr r2, [pc, #80] ; (8038750 ) 8038700: 6812 ldr r2, [r2, #0] 8038702: 6053 str r3, [r2, #4] (DMA_RX_FRAME_infos->Seg_Count)++; 8038704: 6891 ldr r1, [r2, #8] 8038706: 3101 adds r1, #1 8038708: 6091 str r1, [r2, #8] /* first segment is last segment */ if ((DMA_RX_FRAME_infos->Seg_Count)==1) 803870a: 6891 ldr r1, [r2, #8] 803870c: 2901 cmp r1, #1 DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 803870e: bf08 it eq 8038710: 6013 streq r3, [r2, #0] /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ frame.length = ((DMARxDescToGet->Status & ETH_DMARxDesc_FL) >> ETH_DMARxDesc_FrameLengthShift) - 4; 8038712: 6819 ldr r1, [r3, #0] /* Get the address of the buffer start address */ /* Check if more than one segment in the frame */ if (DMA_RX_FRAME_infos->Seg_Count >1) 8038714: 6894 ldr r4, [r2, #8] /* first segment is last segment */ if ((DMA_RX_FRAME_infos->Seg_Count)==1) DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ frame.length = ((DMARxDescToGet->Status & ETH_DMARxDesc_FL) >> ETH_DMARxDesc_FrameLengthShift) - 4; 8038716: f3c1 410d ubfx r1, r1, #16, #14 803871a: 3904 subs r1, #4 /* Get the address of the buffer start address */ /* Check if more than one segment in the frame */ if (DMA_RX_FRAME_infos->Seg_Count >1) 803871c: 2c01 cmp r4, #1 { frame.buffer =(DMA_RX_FRAME_infos->FS_Rx_Desc)->Buffer1Addr; 803871e: bf8a itet hi 8038720: 6812 ldrhi r2, [r2, #0] } else { frame.buffer = DMARxDescToGet->Buffer1Addr; 8038722: 689a ldrls r2, [r3, #8] /* Get the address of the buffer start address */ /* Check if more than one segment in the frame */ if (DMA_RX_FRAME_infos->Seg_Count >1) { frame.buffer =(DMA_RX_FRAME_infos->FS_Rx_Desc)->Buffer1Addr; 8038724: 6892 ldrhi r2, [r2, #8] } frame.descriptor = DMARxDescToGet; /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8038726: 4c0b ldr r4, [pc, #44] ; (8038754 ) 8038728: 68dd ldr r5, [r3, #12] /* Return Frame */ return (frame); 803872a: e880 0006 stmia.w r0, {r1, r2} } frame.descriptor = DMARxDescToGet; /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 803872e: 6025 str r5, [r4, #0] 8038730: e007 b.n 8038742 { FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; /* scan descriptors owned by CPU */ while (((DMARxDescToGet->Status & ETH_DMARxDesc_OWN) == (uint32_t)RESET)&& 8038732: 6819 ldr r1, [r3, #0] 8038734: 2900 cmp r1, #0 8038736: da06 bge.n 8038746 8038738: 4a06 ldr r2, [pc, #24] ; (8038754 ) 803873a: 6013 str r3, [r2, #0] /* Return Frame */ return (frame); } } return (frame); 803873c: 2300 movs r3, #0 803873e: 6003 str r3, [r0, #0] 8038740: 6043 str r3, [r0, #4] 8038742: 6083 str r3, [r0, #8] 8038744: e003 b.n 803874e FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; /* scan descriptors owned by CPU */ while (((DMARxDescToGet->Status & ETH_DMARxDesc_OWN) == (uint32_t)RESET)&& (descriptor_scan_counterStatus & ETH_DMARxDesc_OWN) == (uint32_t)RESET)&& 8038748: 2904 cmp r1, #4 803874a: d9be bls.n 80386ca 803874c: e7f4 b.n 8038738 /* Return Frame */ return (frame); } } return (frame); } 803874e: bd3e pop {r1, r2, r3, r4, r5, pc} 8038750: 20012244 .word 0x20012244 8038754: 200103d4 .word 0x200103d4 08038758 : { uint32_t buf_count =0, size=0,i=0; __IO ETH_DMADESCTypeDef *DMATxNextDesc; /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ if((DMATxDescToSet->Status & ETH_DMATxDesc_OWN) != (u32)RESET) 8038758: 4b29 ldr r3, [pc, #164] ; (8038800 ) 803875a: 681b ldr r3, [r3, #0] 803875c: 681a ldr r2, [r3, #0] 803875e: 2a00 cmp r2, #0 * @brief Prepares DMA Tx descriptors to transmit an ethernet frame * @param FrameLength : length of the frame to send * @retval error status */ uint32_t ETH_Prepare_Transmit_Descriptors(u16 FrameLength) { 8038760: b5f0 push {r4, r5, r6, r7, lr} uint32_t buf_count =0, size=0,i=0; __IO ETH_DMADESCTypeDef *DMATxNextDesc; /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ if((DMATxDescToSet->Status & ETH_DMATxDesc_OWN) != (u32)RESET) 8038762: db48 blt.n 80387f6 return ETH_ERROR; } DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) 8038764: f240 52f4 movw r2, #1524 ; 0x5f4 8038768: 4290 cmp r0, r2 803876a: d917 bls.n 803879c { buf_count = FrameLength/ETH_TX_BUF_SIZE; 803876c: fbb0 f4f2 udiv r4, r0, r2 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8038770: fb02 0214 mls r2, r2, r4, r0 8038774: b292 uxth r2, r2 DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) { buf_count = FrameLength/ETH_TX_BUF_SIZE; 8038776: b2a1 uxth r1, r4 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8038778: b10a cbz r2, 803877e 803877a: 3101 adds r1, #1 803877c: e001 b.n 8038782 } else buf_count =1; if (buf_count ==1) 803877e: 2901 cmp r1, #1 8038780: d00c beq.n 803879c if (i== (buf_count-1)) { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; 8038782: 4d20 ldr r5, [pc, #128] ; (8038804 ) 8038784: f200 50f4 addw r0, r0, #1524 ; 0x5f4 8038788: fb05 0501 mla r5, r5, r1, r0 DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 803878c: 04ed lsls r5, r5, #19 803878e: 0ced lsrs r5, r5, #19 8038790: 461a mov r2, r3 8038792: 2000 movs r0, #0 /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); 8038794: f240 56f4 movw r6, #1524 ; 0x5f4 if (i== (buf_count-1)) 8038798: 1e4f subs r7, r1, #1 803879a: e00c b.n 80387b6 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 803879c: 681a ldr r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 803879e: 04c0 lsls r0, r0, #19 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 80387a0: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000 /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 80387a4: 0cc0 lsrs r0, r0, #19 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 80387a6: 601a str r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 80387a8: 6058 str r0, [r3, #4] /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; 80387aa: 681a ldr r2, [r3, #0] 80387ac: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 80387b0: 601a str r2, [r3, #0] DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); 80387b2: 68da ldr r2, [r3, #12] 80387b4: e014 b.n 80387e0 } else { for (i=0; i< buf_count; i++) { if (i==0) 80387b6: b918 cbnz r0, 80387c0 { /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; 80387b8: 681c ldr r4, [r3, #0] 80387ba: f044 5480 orr.w r4, r4, #268435456 ; 0x10000000 80387be: 601c str r4, [r3, #0] } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); if (i== (buf_count-1)) 80387c0: 42b8 cmp r0, r7 /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); 80387c2: 6056 str r6, [r2, #4] if (i== (buf_count-1)) 80387c4: d104 bne.n 80387d0 { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; 80387c6: 6814 ldr r4, [r2, #0] 80387c8: f044 5400 orr.w r4, r4, #536870912 ; 0x20000000 80387cc: 6014 str r4, [r2, #0] size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 80387ce: 6055 str r5, [r2, #4] } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; 80387d0: 6814 ldr r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 80387d2: 3001 adds r0, #1 size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; 80387d4: f044 4400 orr.w r4, r4, #2147483648 ; 0x80000000 80387d8: 6014 str r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 80387da: 4288 cmp r0, r1 } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; DMATxNextDesc = (ETH_DMADESCTypeDef *)(DMATxNextDesc->Buffer2NextDescAddr); 80387dc: 68d2 ldr r2, [r2, #12] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 80387de: d3ea bcc.n 80387b6 DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; DMATxNextDesc = (ETH_DMADESCTypeDef *)(DMATxNextDesc->Buffer2NextDescAddr); /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ } DMATxDescToSet = DMATxNextDesc ; 80387e0: 4b07 ldr r3, [pc, #28] ; (8038800 ) 80387e2: 601a str r2, [r3, #0] } /* When Tx Buffer unavailable flag is set: clear it and resume transmission */ if ((ETH->DMASR & ETH_DMASR_TBUS) != (u32)RESET) 80387e4: 4b08 ldr r3, [pc, #32] ; (8038808 ) 80387e6: 695a ldr r2, [r3, #20] 80387e8: 0750 lsls r0, r2, #29 80387ea: d506 bpl.n 80387fa { /* Clear TBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_TBUS; 80387ec: 2204 movs r2, #4 80387ee: 615a str r2, [r3, #20] /* Resume DMA transmission*/ ETH->DMATPDR = 0; 80387f0: 2200 movs r2, #0 80387f2: 605a str r2, [r3, #4] 80387f4: e001 b.n 80387fa /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ if((DMATxDescToSet->Status & ETH_DMATxDesc_OWN) != (u32)RESET) { /* Return ERROR: OWN bit set */ return ETH_ERROR; 80387f6: 2000 movs r0, #0 80387f8: bdf0 pop {r4, r5, r6, r7, pc} /* Resume DMA transmission*/ ETH->DMATPDR = 0; } /* Return SUCCESS */ return ETH_SUCCESS; 80387fa: 2001 movs r0, #1 } 80387fc: bdf0 pop {r4, r5, r6, r7, pc} 80387fe: bf00 nop 8038800: 200103d8 .word 0x200103d8 8038804: fffffa0c .word 0xfffffa0c 8038808: 40029000 .word 0x40029000 0803880c : { uint32_t i = 0; ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; 803880c: 4b11 ldr r3, [pc, #68] ; (8038854 ) * @param RxBuff: Pointer on the first RxBuffer list * @param RxBuffCount: Number of the used Rx desc in the list * @retval None */ void ETH_DMARxDescChainInit(ETH_DMADESCTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount) { 803880e: b5f0 push {r4, r5, r6, r7, lr} uint32_t i = 0; ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; 8038810: 6018 str r0, [r3, #0] /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 8038812: 2400 movs r4, #0 * @param DMARxDescTab: Pointer on the first Rx desc list * @param RxBuff: Pointer on the first RxBuffer list * @param RxBuffCount: Number of the used Rx desc in the list * @retval None */ void ETH_DMARxDescChainInit(ETH_DMADESCTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount) 8038814: f100 0320 add.w r3, r0, #32 for(i=0; i < RxBuffCount; i++) { /* Get the pointer on the ith member of the Rx Desc list */ DMARxDesc = DMARxDescTab+i; /* Set Own bit of the Rx descriptor Status */ DMARxDesc->Status = ETH_DMARxDesc_OWN; 8038818: f04f 4500 mov.w r5, #2147483648 ; 0x80000000 /* Set Buffer1 size and Second Address Chained bit */ DMARxDesc->ControlBufferSize = ETH_DMARxDesc_RCH | (uint32_t)ETH_RX_BUF_SIZE; 803881c: f244 56f4 movw r6, #17908 ; 0x45f4 /* Set Buffer1 address pointer */ DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i*ETH_RX_BUF_SIZE]); /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (RxBuffCount-1)) 8038820: 1e57 subs r7, r2, #1 ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 8038822: e00f b.n 8038844 /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (RxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab+i+1); 8038824: 42bc cmp r4, r7 8038826: bf2c ite cs 8038828: 4684 movcs ip, r0 803882a: 469c movcc ip, r3 DMARxDesc->Status = ETH_DMARxDesc_OWN; /* Set Buffer1 size and Second Address Chained bit */ DMARxDesc->ControlBufferSize = ETH_DMARxDesc_RCH | (uint32_t)ETH_RX_BUF_SIZE; /* Set Buffer1 address pointer */ DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i*ETH_RX_BUF_SIZE]); 803882c: f843 1c18 str.w r1, [r3, #-24] for(i=0; i < RxBuffCount; i++) { /* Get the pointer on the ith member of the Rx Desc list */ DMARxDesc = DMARxDescTab+i; /* Set Own bit of the Rx descriptor Status */ DMARxDesc->Status = ETH_DMARxDesc_OWN; 8038830: f843 5c20 str.w r5, [r3, #-32] /* Set Buffer1 size and Second Address Chained bit */ DMARxDesc->ControlBufferSize = ETH_DMARxDesc_RCH | (uint32_t)ETH_RX_BUF_SIZE; 8038834: f843 6c1c str.w r6, [r3, #-28] /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (RxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab+i+1); 8038838: f843 cc14 str.w ip, [r3, #-20] ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 803883c: 3401 adds r4, #1 803883e: 3320 adds r3, #32 8038840: f201 51f4 addw r1, r1, #1524 ; 0x5f4 8038844: 4294 cmp r4, r2 8038846: d1ed bne.n 8038824 DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 8038848: 4b03 ldr r3, [pc, #12] ; (8038858 ) DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 803884a: 4a04 ldr r2, [pc, #16] ; (803885c ) DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 803884c: 60d8 str r0, [r3, #12] DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 803884e: 4b04 ldr r3, [pc, #16] ; (8038860 ) 8038850: 601a str r2, [r3, #0] 8038852: bdf0 pop {r4, r5, r6, r7, pc} 8038854: 200103d4 .word 0x200103d4 8038858: 40029000 .word 0x40029000 803885c: 200103c8 .word 0x200103c8 8038860: 20012244 .word 0x20012244 08038864 : { uint32_t i = 0; ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; 8038864: 4b0e ldr r3, [pc, #56] ; (80388a0 ) * @param TxBuff: Pointer on the first TxBuffer list * @param TxBuffCount: Number of the used Tx desc in the list * @retval None */ void ETH_DMATxDescChainInit(ETH_DMADESCTypeDef *DMATxDescTab, uint8_t* TxBuff, uint32_t TxBuffCount) { 8038866: b5f0 push {r4, r5, r6, r7, lr} uint32_t i = 0; ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; 8038868: 6018 str r0, [r3, #0] /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 803886a: 2400 movs r4, #0 * @param DMATxDescTab: Pointer on the first Tx desc list * @param TxBuff: Pointer on the first TxBuffer list * @param TxBuffCount: Number of the used Tx desc in the list * @retval None */ void ETH_DMATxDescChainInit(ETH_DMADESCTypeDef *DMATxDescTab, uint8_t* TxBuff, uint32_t TxBuffCount) 803886c: f100 0320 add.w r3, r0, #32 for(i=0; i < TxBuffCount; i++) { /* Get the pointer on the ith member of the Tx Desc list */ DMATxDesc = DMATxDescTab + i; /* Set Second Address Chained bit */ DMATxDesc->Status = ETH_DMATxDesc_TCH; 8038870: f44f 1580 mov.w r5, #1048576 ; 0x100000 /* Set Buffer1 address pointer */ DMATxDesc->Buffer1Addr = (uint32_t)(&TxBuff[i*ETH_TX_BUF_SIZE]); /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (TxBuffCount-1)) 8038874: 1e56 subs r6, r2, #1 ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 8038876: e00d b.n 8038894 /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (TxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMATxDesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab+i+1); 8038878: 42b4 cmp r4, r6 803887a: bf2c ite cs 803887c: 4607 movcs r7, r0 803887e: 461f movcc r7, r3 DMATxDesc = DMATxDescTab + i; /* Set Second Address Chained bit */ DMATxDesc->Status = ETH_DMATxDesc_TCH; /* Set Buffer1 address pointer */ DMATxDesc->Buffer1Addr = (uint32_t)(&TxBuff[i*ETH_TX_BUF_SIZE]); 8038880: f843 1c18 str.w r1, [r3, #-24] for(i=0; i < TxBuffCount; i++) { /* Get the pointer on the ith member of the Tx Desc list */ DMATxDesc = DMATxDescTab + i; /* Set Second Address Chained bit */ DMATxDesc->Status = ETH_DMATxDesc_TCH; 8038884: f843 5c20 str.w r5, [r3, #-32] /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (TxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMATxDesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab+i+1); 8038888: f843 7c14 str.w r7, [r3, #-20] ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 803888c: 3401 adds r4, #1 803888e: 3320 adds r3, #32 8038890: f201 51f4 addw r1, r1, #1524 ; 0x5f4 8038894: 4294 cmp r4, r2 8038896: d1ef bne.n 8038878 DMATxDesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; } } /* Set Transmit Desciptor List Address Register */ ETH->DMATDLAR = (uint32_t) DMATxDescTab; 8038898: 4b02 ldr r3, [pc, #8] ; (80388a4 ) 803889a: 6118 str r0, [r3, #16] 803889c: bdf0 pop {r4, r5, r6, r7, pc} 803889e: bf00 nop 80388a0: 200103d8 .word 0x200103d8 80388a4: 40029000 .word 0x40029000 080388a8 : { /* Check the parameters */ assert_param(IS_ETH_DMA_TXDESC_CHECKSUM(DMATxDesc_Checksum)); /* Set the selected DMA Tx desc checksum insertion control */ DMATxDesc->Status |= DMATxDesc_Checksum; 80388a8: 6803 ldr r3, [r0, #0] 80388aa: 4319 orrs r1, r3 80388ac: 6001 str r1, [r0, #0] 80388ae: 4770 bx lr 080388b0 : * @param NewState: new state of the specified DMA Rx Desc interrupt. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMARxDescReceiveITConfig(ETH_DMADESCTypeDef *DMARxDesc, FunctionalState NewState) { 80388b0: 6843 ldr r3, [r0, #4] /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80388b2: b111 cbz r1, 80388ba { /* Enable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARxDesc_DIC); 80388b4: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000 80388b8: e001 b.n 80388be } else { /* Disable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize |= ETH_DMARxDesc_DIC; 80388ba: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 80388be: 6043 str r3, [r0, #4] 80388c0: 4770 bx lr 80388c2: 0000 movs r0, r0 080388c4 : */ void ETH_SoftwareReset(void) { /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ /* After reset all the registers holds their respective reset values */ ETH->DMABMR |= ETH_DMABMR_SR; 80388c4: 4b02 ldr r3, [pc, #8] ; (80388d0 ) 80388c6: 681a ldr r2, [r3, #0] 80388c8: f042 0201 orr.w r2, r2, #1 80388cc: 601a str r2, [r3, #0] 80388ce: 4770 bx lr 80388d0: 40029000 .word 0x40029000 080388d4 : * @retval The new state of DMA Bus Mode register SR bit (SET or RESET). */ FlagStatus ETH_GetSoftwareResetStatus(void) { FlagStatus bitstatus = RESET; if((ETH->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) 80388d4: 4b02 ldr r3, [pc, #8] ; (80388e0 ) 80388d6: 6818 ldr r0, [r3, #0] else { bitstatus = RESET; } return bitstatus; } 80388d8: f000 0001 and.w r0, r0, #1 80388dc: 4770 bx lr 80388de: bf00 nop 80388e0: 40029000 .word 0x40029000 080388e4 : FlagStatus ETH_GetDMAFlagStatus(uint32_t ETH_DMA_FLAG) { FlagStatus bitstatus = RESET; /* Check the parameters */ assert_param(IS_ETH_DMA_GET_IT(ETH_DMA_FLAG)); if ((ETH->DMASR & ETH_DMA_FLAG) != (uint32_t)RESET) 80388e4: 4b03 ldr r3, [pc, #12] ; (80388f4 ) 80388e6: 695b ldr r3, [r3, #20] 80388e8: 4218 tst r0, r3 else { bitstatus = RESET; } return bitstatus; } 80388ea: bf0c ite eq 80388ec: 2000 moveq r0, #0 80388ee: 2001 movne r0, #1 80388f0: 4770 bx lr 80388f2: bf00 nop 80388f4: 40029000 .word 0x40029000 080388f8 : * @param NewState: new state of the specified ETHERNET DMA interrupts. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMAITConfig(uint32_t ETH_DMA_IT, FunctionalState NewState) { 80388f8: 4b04 ldr r3, [pc, #16] ; (803890c ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 80388fa: 69da ldr r2, [r3, #28] { /* Check the parameters */ assert_param(IS_ETH_DMA_IT(ETH_DMA_IT)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80388fc: b109 cbz r1, 8038902 { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 80388fe: 4310 orrs r0, r2 8038900: e001 b.n 8038906 } else { /* Disable the selected ETHERNET DMA interrupts */ ETH->DMAIER &=(~(uint32_t)ETH_DMA_IT); 8038902: ea22 0000 bic.w r0, r2, r0 8038906: 61d8 str r0, [r3, #28] 8038908: 4770 bx lr 803890a: bf00 nop 803890c: 40029000 .word 0x40029000 08038910 : { /* Check the parameters */ assert_param(IS_ETH_DMA_IT(ETH_DMA_IT)); /* Clear the selected ETHERNET DMA IT */ ETH->DMASR = (uint32_t) ETH_DMA_IT; 8038910: 4b01 ldr r3, [pc, #4] ; (8038918 ) 8038912: 6158 str r0, [r3, #20] 8038914: 4770 bx lr 8038916: bf00 nop 8038918: 40029000 .word 0x40029000 0803891c : * @retval None */ void ETH_FlushTransmitFIFO(void) { /* Set the Flush Transmit FIFO bit */ ETH->DMAOMR |= ETH_DMAOMR_FTF; 803891c: 4b02 ldr r3, [pc, #8] ; (8038928 ) 803891e: 699a ldr r2, [r3, #24] 8038920: f442 1280 orr.w r2, r2, #1048576 ; 0x100000 8038924: 619a str r2, [r3, #24] 8038926: 4770 bx lr 8038928: 40029000 .word 0x40029000 0803892c : * @param NewState: new state of the DMA transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMATransmissionCmd(FunctionalState NewState) { 803892c: 4b04 ldr r3, [pc, #16] ; (8038940 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 803892e: 699a ldr r2, [r3, #24] void ETH_DMATransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8038930: b110 cbz r0, 8038938 { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 8038932: f442 5200 orr.w r2, r2, #8192 ; 0x2000 8038936: e001 b.n 803893c } else { /* Disable the DMA transmission */ ETH->DMAOMR &= ~ETH_DMAOMR_ST; 8038938: f422 5200 bic.w r2, r2, #8192 ; 0x2000 803893c: 619a str r2, [r3, #24] 803893e: 4770 bx lr 8038940: 40029000 .word 0x40029000 08038944 : * @param NewState: new state of the DMA reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMAReceptionCmd(FunctionalState NewState) { 8038944: 4b04 ldr r3, [pc, #16] ; (8038958 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 8038946: 699a ldr r2, [r3, #24] void ETH_DMAReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8038948: b110 cbz r0, 8038950 { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 803894a: f042 0202 orr.w r2, r2, #2 803894e: e001 b.n 8038954 } else { /* Disable the DMA reception */ ETH->DMAOMR &= ~ETH_DMAOMR_SR; 8038950: f022 0202 bic.w r2, r2, #2 8038954: 619a str r2, [r3, #24] 8038956: 4770 bx lr 8038958: 40029000 .word 0x40029000 0803895c : * @brief Enables ENET MAC and DMA reception/transmission * @param None * @retval None */ void ETH_Start(void) { 803895c: b508 push {r3, lr} /* Enable transmit state machine of the MAC for transmission on the MII */ ETH_MACTransmissionCmd(ENABLE); 803895e: 2001 movs r0, #1 8038960: f7ff fe7a bl 8038658 /* Flush Transmit FIFO */ ETH_FlushTransmitFIFO(); 8038964: f7ff ffda bl 803891c /* Enable receive state machine of the MAC for reception from the MII */ ETH_MACReceptionCmd(ENABLE); 8038968: 2001 movs r0, #1 803896a: f7ff fe81 bl 8038670 /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); 803896e: 2001 movs r0, #1 8038970: f7ff ffdc bl 803892c /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 8038974: 2001 movs r0, #1 } 8038976: e8bd 4008 ldmia.w sp!, {r3, lr} ETH_MACReceptionCmd(ENABLE); /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 803897a: f7ff bfe3 b.w 8038944 803897e: 0000 movs r0, r0 08038980 : * @arg More PHY register could be read depending on the used PHY * @retval ETH_ERROR: in case of timeout * MAC MIIDR register value: Data read from the selected PHY register (correct read ) */ uint16_t ETH_ReadPHYRegister(uint16_t PHYAddress, uint16_t PHYReg) { 8038980: b082 sub sp, #8 uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 8038982: 2300 movs r3, #0 8038984: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_ETH_PHY_ADDRESS(PHYAddress)); assert_param(IS_ETH_PHY_REG(PHYReg)); /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; 8038986: 4b11 ldr r3, [pc, #68] ; (80389cc ) 8038988: 691a ldr r2, [r3, #16] /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~MACMIIAR_CR_MASK; /* Prepare the MII address register value */ tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ 803898a: 06c0 lsls r0, r0, #27 assert_param(IS_ETH_PHY_REG(PHYReg)); /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~MACMIIAR_CR_MASK; 803898c: f002 021c and.w r2, r2, #28 /* Prepare the MII address register value */ tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 8038990: 0189 lsls r1, r1, #6 /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~MACMIIAR_CR_MASK; /* Prepare the MII address register value */ tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ 8038992: ea42 4210 orr.w r2, r2, r0, lsr #16 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 8038996: f401 61f8 and.w r1, r1, #1984 ; 0x7c0 tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ 803899a: 430a orrs r2, r1 tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ 803899c: f042 0201 orr.w r2, r2, #1 /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; 80389a0: 611a str r2, [r3, #16] /* Check for the Busy flag */ do { timeout++; tmpreg = ETH->MACMIIAR; } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); 80389a2: 4a0b ldr r2, [pc, #44] ; (80389d0 ) /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; /* Check for the Busy flag */ do { timeout++; 80389a4: 9901 ldr r1, [sp, #4] 80389a6: 3101 adds r1, #1 80389a8: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 80389aa: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); 80389ac: 07c9 lsls r1, r1, #31 80389ae: d502 bpl.n 80389b6 80389b0: 9901 ldr r1, [sp, #4] 80389b2: 4291 cmp r1, r2 80389b4: d9f6 bls.n 80389a4 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 80389b6: 4b07 ldr r3, [pc, #28] ; (80389d4 ) 80389b8: 9a01 ldr r2, [sp, #4] 80389ba: 429a cmp r2, r3 { return (uint16_t)ETH_ERROR; } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); 80389bc: bf1d ittte ne 80389be: 4b03 ldrne r3, [pc, #12] ; (80389cc ) 80389c0: 6958 ldrne r0, [r3, #20] 80389c2: b280 uxthne r0, r0 tmpreg = ETH->MACMIIAR; } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) { return (uint16_t)ETH_ERROR; 80389c4: 2000 moveq r0, #0 } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); } 80389c6: b002 add sp, #8 80389c8: 4770 bx lr 80389ca: bf00 nop 80389cc: 40028000 .word 0x40028000 80389d0: 0004fffe .word 0x0004fffe 80389d4: 0004ffff .word 0x0004ffff 080389d8 : * @param PHYValue: the value to write * @retval ETH_ERROR: in case of timeout * ETH_SUCCESS: for correct write */ uint32_t ETH_WritePHYRegister(uint16_t PHYAddress, uint16_t PHYReg, uint16_t PHYValue) { 80389d8: b513 push {r0, r1, r4, lr} uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 80389da: 2300 movs r3, #0 80389dc: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_ETH_PHY_ADDRESS(PHYAddress)); assert_param(IS_ETH_PHY_REG(PHYReg)); /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; 80389de: 4b0f ldr r3, [pc, #60] ; (8038a1c ) 80389e0: 691c ldr r4, [r3, #16] tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ /* Give the value to the MII data register */ ETH->MACMIIDR = PHYValue; 80389e2: 615a str r2, [r3, #20] assert_param(IS_ETH_PHY_REG(PHYReg)); /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~MACMIIAR_CR_MASK; 80389e4: f004 041c and.w r4, r4, #28 /* Prepare the MII register address value */ tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ 80389e8: f044 0403 orr.w r4, r4, #3 80389ec: 06c0 lsls r0, r0, #27 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 80389ee: 0189 lsls r1, r1, #6 80389f0: ea44 4410 orr.w r4, r4, r0, lsr #16 80389f4: f401 61f8 and.w r1, r1, #1984 ; 0x7c0 tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ 80389f8: 430c orrs r4, r1 /* Check for the Busy flag */ do { timeout++; tmpreg = ETH->MACMIIAR; } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); 80389fa: 4a09 ldr r2, [pc, #36] ; (8038a20 ) tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ /* Give the value to the MII data register */ ETH->MACMIIDR = PHYValue; /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; 80389fc: 611c str r4, [r3, #16] /* Check for the Busy flag */ do { timeout++; 80389fe: 9901 ldr r1, [sp, #4] 8038a00: 3101 adds r1, #1 8038a02: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 8038a04: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); 8038a06: 07c8 lsls r0, r1, #31 8038a08: d502 bpl.n 8038a10 8038a0a: 9901 ldr r1, [sp, #4] 8038a0c: 4291 cmp r1, r2 8038a0e: d9f6 bls.n 80389fe /* Return ERROR in case of timeout */ if(timeout == PHY_WRITE_TO) 8038a10: 9801 ldr r0, [sp, #4] return ETH_ERROR; } /* Return SUCCESS */ return ETH_SUCCESS; } 8038a12: 4b04 ldr r3, [pc, #16] ; (8038a24 ) 8038a14: 1ac0 subs r0, r0, r3 8038a16: bf18 it ne 8038a18: 2001 movne r0, #1 8038a1a: bd1c pop {r2, r3, r4, pc} 8038a1c: 40028000 .word 0x40028000 8038a20: 0004fffe .word 0x0004fffe 8038a24: 0004ffff .word 0x0004ffff 08038a28 : * @param PHYAddress: external PHY address * @retval ETH_ERROR: Ethernet initialization failed * ETH_SUCCESS: Ethernet successfully initialized */ uint32_t ETH_Init(ETH_InitTypeDef* ETH_InitStruct, uint16_t PHYAddress) { 8038a28: b5f0 push {r4, r5, r6, r7, lr} 8038a2a: b087 sub sp, #28 uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; 8038a2c: 2300 movs r3, #0 assert_param(IS_ETH_DMA_DESC_SKIP_LENGTH(ETH_InitStruct->ETH_DescriptorSkipLength)); assert_param(IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(ETH_InitStruct->ETH_DMAArbitration)); /*-------------------------------- MAC Config ------------------------------*/ /*---------------------- ETHERNET MACMIIAR Configuration -------------------*/ /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; 8038a2e: 4f90 ldr r7, [pc, #576] ; (8038c70 ) * ETH_SUCCESS: Ethernet successfully initialized */ uint32_t ETH_Init(ETH_InitTypeDef* ETH_InitStruct, uint16_t PHYAddress) { uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; 8038a30: 9300 str r3, [sp, #0] * @param PHYAddress: external PHY address * @retval ETH_ERROR: Ethernet initialization failed * ETH_SUCCESS: Ethernet successfully initialized */ uint32_t ETH_Init(ETH_InitTypeDef* ETH_InitStruct, uint16_t PHYAddress) { 8038a32: 4604 mov r4, r0 uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; RCC_ClocksTypeDef rcc_clocks; uint32_t hclk = 60000000; __IO uint32_t timeout = 0; 8038a34: 9301 str r3, [sp, #4] /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Clear CSR Clock Range CR[2:0] bits */ tmpreg &= MACMIIAR_CR_MASK; /* Get hclk frequency value */ RCC_GetClocksFreq(&rcc_clocks); 8038a36: a802 add r0, sp, #8 * @param PHYAddress: external PHY address * @retval ETH_ERROR: Ethernet initialization failed * ETH_SUCCESS: Ethernet successfully initialized */ uint32_t ETH_Init(ETH_InitTypeDef* ETH_InitStruct, uint16_t PHYAddress) { 8038a38: 460e mov r6, r1 assert_param(IS_ETH_DMA_DESC_SKIP_LENGTH(ETH_InitStruct->ETH_DescriptorSkipLength)); assert_param(IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(ETH_InitStruct->ETH_DMAArbitration)); /*-------------------------------- MAC Config ------------------------------*/ /*---------------------- ETHERNET MACMIIAR Configuration -------------------*/ /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; 8038a3a: 693d ldr r5, [r7, #16] /* Clear CSR Clock Range CR[2:0] bits */ tmpreg &= MACMIIAR_CR_MASK; /* Get hclk frequency value */ RCC_GetClocksFreq(&rcc_clocks); 8038a3c: f7ec ffae bl 802599c hclk = rcc_clocks.HCLK_Frequency; 8038a40: 9b03 ldr r3, [sp, #12] /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) 8038a42: 4a8c ldr r2, [pc, #560] ; (8038c74 ) 8038a44: 498c ldr r1, [pc, #560] ; (8038c78 ) 8038a46: 189a adds r2, r3, r2 8038a48: 428a cmp r2, r1 /*-------------------------------- MAC Config ------------------------------*/ /*---------------------- ETHERNET MACMIIAR Configuration -------------------*/ /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Clear CSR Clock Range CR[2:0] bits */ tmpreg &= MACMIIAR_CR_MASK; 8038a4a: f025 051c bic.w r5, r5, #28 /* Get hclk frequency value */ RCC_GetClocksFreq(&rcc_clocks); hclk = rcc_clocks.HCLK_Frequency; /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) 8038a4e: d802 bhi.n 8038a56 { /* CSR Clock Range between 20-35 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16; 8038a50: f045 0508 orr.w r5, r5, #8 8038a54: e015 b.n 8038a82 } else if((hclk >= 35000000)&&(hclk < 60000000)) 8038a56: 4a89 ldr r2, [pc, #548] ; (8038c7c ) 8038a58: 4989 ldr r1, [pc, #548] ; (8038c80 ) 8038a5a: 189a adds r2, r3, r2 8038a5c: 428a cmp r2, r1 8038a5e: d802 bhi.n 8038a66 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26; 8038a60: f045 050c orr.w r5, r5, #12 8038a64: e00d b.n 8038a82 } else if((hclk >= 60000000)&&(hclk < 100000000)) 8038a66: 4a87 ldr r2, [pc, #540] ; (8038c84 ) 8038a68: 4987 ldr r1, [pc, #540] ; (8038c88 ) 8038a6a: 189a adds r2, r3, r2 8038a6c: 428a cmp r2, r1 8038a6e: d908 bls.n 8038a82 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; } else if((hclk >= 100000000)&&(hclk < 150000000)) 8038a70: 4a86 ldr r2, [pc, #536] ; (8038c8c ) 8038a72: 189a adds r2, r3, r2 8038a74: 4b86 ldr r3, [pc, #536] ; (8038c90 ) 8038a76: 429a cmp r2, r3 { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; 8038a78: bf94 ite ls 8038a7a: f045 0504 orrls.w r5, r5, #4 } else /* ((hclk >= 150000000)&&(hclk <= 168000000)) */ { /* CSR Clock Range between 150-168 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div102; 8038a7e: f045 0510 orrhi.w r5, r5, #16 } /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ ETH->MACMIIAR = (uint32_t)tmpreg; 8038a82: 613d str r5, [r7, #16] /*-------------------- PHY initialization and configuration ----------------*/ /* Put the PHY in reset mode */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_Reset))) 8038a84: 4630 mov r0, r6 8038a86: 2100 movs r1, #0 8038a88: f44f 4200 mov.w r2, #32768 ; 0x8000 8038a8c: f7ff ffa4 bl 80389d8 8038a90: b908 cbnz r0, 8038a96 { /* Return ERROR in case of write timeout */ return ETH_ERROR; 8038a92: 2000 movs r0, #0 8038a94: e0e9 b.n 8038c6a } /* Delay to assure PHY reset */ _eth_delay_(PHY_RESET_DELAY); 8038a96: 487f ldr r0, [pc, #508] ; (8038c94 ) 8038a98: f7ff fd6e bl 8038578 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) 8038a9c: 6821 ldr r1, [r4, #0] 8038a9e: 2900 cmp r1, #0 8038aa0: d050 beq.n 8038b44 { /* We wait for linked status... */ do { timeout++; } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8038aa2: 4d7d ldr r5, [pc, #500] ; (8038c98 ) if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8038aa4: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8038aa6: 4630 mov r0, r6 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8038aa8: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8038aaa: 2101 movs r1, #1 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8038aac: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8038aae: f7ff ff67 bl 8038980 8038ab2: f000 0004 and.w r0, r0, #4 8038ab6: b280 uxth r0, r0 8038ab8: b910 cbnz r0, 8038ac0 8038aba: 9b01 ldr r3, [sp, #4] 8038abc: 42ab cmp r3, r5 8038abe: d9f1 bls.n 8038aa4 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8038ac0: 9a01 ldr r2, [sp, #4] 8038ac2: 4b76 ldr r3, [pc, #472] ; (8038c9c ) 8038ac4: 429a cmp r2, r3 8038ac6: d0e4 beq.n 8038a92 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8038ac8: 2100 movs r1, #0 /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 8038aca: 4630 mov r0, r6 8038acc: f44f 5280 mov.w r2, #4096 ; 0x1000 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8038ad0: 9101 str r1, [sp, #4] /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 8038ad2: f7ff ff81 bl 80389d8 8038ad6: 2800 cmp r0, #0 8038ad8: d0db beq.n 8038a92 /* Wait until the auto-negotiation will be completed */ do { timeout++; } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8038ada: 4d6f ldr r5, [pc, #444] ; (8038c98 ) } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8038adc: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8038ade: 4630 mov r0, r6 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8038ae0: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8038ae2: 2101 movs r1, #1 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8038ae4: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8038ae6: f7ff ff4b bl 8038980 8038aea: f000 0020 and.w r0, r0, #32 8038aee: b280 uxth r0, r0 8038af0: b910 cbnz r0, 8038af8 8038af2: 9b01 ldr r3, [sp, #4] 8038af4: 42ab cmp r3, r5 8038af6: d9f1 bls.n 8038adc /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8038af8: 9a01 ldr r2, [sp, #4] 8038afa: 4b68 ldr r3, [pc, #416] ; (8038c9c ) 8038afc: 429a cmp r2, r3 8038afe: d0c8 beq.n 8038a92 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8038b00: 2500 movs r5, #0 /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8038b02: 211f movs r1, #31 8038b04: 4630 mov r0, r6 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8038b06: 9501 str r5, [sp, #4] /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8038b08: f7ff ff3a bl 8038980 switch (RegValue & PHY_DUPLEX_SPEED_STATUS_MASK) 8038b0c: f000 001c and.w r0, r0, #28 8038b10: 2808 cmp r0, #8 8038b12: d00b beq.n 8038b2c 8038b14: d802 bhi.n 8038b1c 8038b16: 2804 cmp r0, #4 8038b18: d123 bne.n 8038b62 8038b1a: e010 b.n 8038b3e 8038b1c: 280e cmp r0, #14 8038b1e: d00a beq.n 8038b36 8038b20: 2812 cmp r0, #18 8038b22: d11e bne.n 8038b62 { case PHY_100BTX_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 8038b24: f44f 6300 mov.w r3, #2048 ; 0x800 8038b28: 6223 str r3, [r4, #32] 8038b2a: e000 b.n 8038b2e ETH_InitStruct->ETH_Speed = ETH_Speed_100M; break; case PHY_100BTX_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 8038b2c: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_100M; 8038b2e: f44f 4380 mov.w r3, #16384 ; 0x4000 8038b32: 6163 str r3, [r4, #20] break; 8038b34: e015 b.n 8038b62 case PHY_10M_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 8038b36: f44f 6300 mov.w r3, #2048 ; 0x800 8038b3a: 6223 str r3, [r4, #32] 8038b3c: e000 b.n 8038b40 ETH_InitStruct->ETH_Speed = ETH_Speed_10M; break; case PHY_10M_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 8038b3e: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_10M; 8038b40: 6165 str r5, [r4, #20] break; 8038b42: e00e b.n 8038b62 break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 8038b44: 6a22 ldr r2, [r4, #32] (uint16_t)(ETH_InitStruct->ETH_Speed >> 1)))) 8038b46: 6963 ldr r3, [r4, #20] break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 8038b48: 08d2 lsrs r2, r2, #3 8038b4a: ea42 0253 orr.w r2, r2, r3, lsr #1 8038b4e: 4630 mov r0, r6 8038b50: b292 uxth r2, r2 8038b52: f7ff ff41 bl 80389d8 8038b56: 2800 cmp r0, #0 8038b58: d09b beq.n 8038a92 { /* Return ERROR in case of write timeout */ return ETH_ERROR; } /* Delay to assure PHY configuration */ _eth_delay_(PHY_CONFIG_DELAY); 8038b5a: f06f 407f mvn.w r0, #4278190080 ; 0xff000000 8038b5e: f7ff fd0b bl 8038578 } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 8038b62: 4b43 ldr r3, [pc, #268] ; (8038c70 ) /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= MACCR_CLEAR_MASK; 8038b64: 4a4e ldr r2, [pc, #312] ; (8038ca0 ) _eth_delay_(PHY_CONFIG_DELAY); } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 8038b66: 6819 ldr r1, [r3, #0] /* Set the IPCO bit according to ETH_ChecksumOffload value */ /* Set the DR bit according to ETH_RetryTransmission value */ /* Set the ACS bit according to ETH_AutomaticPadCRCStrip value */ /* Set the BL bit according to ETH_BackOffLimit value */ /* Set the DC bit according to ETH_DeferralCheck value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_Watchdog | 8038b68: 68a0 ldr r0, [r4, #8] } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= MACCR_CLEAR_MASK; 8038b6a: 400a ands r2, r1 /* Set the IPCO bit according to ETH_ChecksumOffload value */ /* Set the DR bit according to ETH_RetryTransmission value */ /* Set the ACS bit according to ETH_AutomaticPadCRCStrip value */ /* Set the BL bit according to ETH_BackOffLimit value */ /* Set the DC bit according to ETH_DeferralCheck value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_Watchdog | 8038b6c: 6861 ldr r1, [r4, #4] 8038b6e: 4308 orrs r0, r1 ETH_InitStruct->ETH_Jabber | 8038b70: 68e1 ldr r1, [r4, #12] 8038b72: 4308 orrs r0, r1 ETH_InitStruct->ETH_InterFrameGap | 8038b74: 6921 ldr r1, [r4, #16] 8038b76: 4308 orrs r0, r1 ETH_InitStruct->ETH_CarrierSense | 8038b78: 6961 ldr r1, [r4, #20] 8038b7a: 4308 orrs r0, r1 ETH_InitStruct->ETH_Speed | 8038b7c: 69a1 ldr r1, [r4, #24] 8038b7e: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveOwn | 8038b80: 69e1 ldr r1, [r4, #28] 8038b82: 4308 orrs r0, r1 ETH_InitStruct->ETH_LoopbackMode | 8038b84: 6a21 ldr r1, [r4, #32] 8038b86: 4308 orrs r0, r1 ETH_InitStruct->ETH_Mode | 8038b88: 6a61 ldr r1, [r4, #36] ; 0x24 8038b8a: 4308 orrs r0, r1 ETH_InitStruct->ETH_ChecksumOffload | 8038b8c: 6aa1 ldr r1, [r4, #40] ; 0x28 8038b8e: 4308 orrs r0, r1 ETH_InitStruct->ETH_RetryTransmission | 8038b90: 6ae1 ldr r1, [r4, #44] ; 0x2c 8038b92: 4308 orrs r0, r1 ETH_InitStruct->ETH_AutomaticPadCRCStrip | 8038b94: 6b21 ldr r1, [r4, #48] ; 0x30 8038b96: 4308 orrs r0, r1 /* Set the IPCO bit according to ETH_ChecksumOffload value */ /* Set the DR bit according to ETH_RetryTransmission value */ /* Set the ACS bit according to ETH_AutomaticPadCRCStrip value */ /* Set the BL bit according to ETH_BackOffLimit value */ /* Set the DC bit according to ETH_DeferralCheck value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_Watchdog | 8038b98: 6b61 ldr r1, [r4, #52] ; 0x34 8038b9a: 4301 orrs r1, r0 8038b9c: 430a orrs r2, r1 ETH_InitStruct->ETH_RetryTransmission | ETH_InitStruct->ETH_AutomaticPadCRCStrip | ETH_InitStruct->ETH_BackOffLimit | ETH_InitStruct->ETH_DeferralCheck); /* Write to ETHERNET MACCR */ ETH->MACCR = (uint32_t)tmpreg; 8038b9e: 601a str r2, [r3, #0] /* Set the DAIF bit according to ETH_DestinationAddrFilter value */ /* Set the PR bit according to ETH_PromiscuousMode value */ /* Set the PM, HMC and HPF bits according to ETH_MulticastFramesFilter value */ /* Set the HUC and HPF bits according to ETH_UnicastFramesFilter value */ /* Write to ETHERNET MACFFR */ ETH->MACFFR = (uint32_t)(ETH_InitStruct->ETH_ReceiveAll | 8038ba0: 6ba2 ldr r2, [r4, #56] ; 0x38 8038ba2: 6be1 ldr r1, [r4, #60] ; 0x3c 8038ba4: 4311 orrs r1, r2 ETH_InitStruct->ETH_SourceAddrFilter | 8038ba6: 6c22 ldr r2, [r4, #64] ; 0x40 8038ba8: 4311 orrs r1, r2 ETH_InitStruct->ETH_PassControlFrames | 8038baa: 6c62 ldr r2, [r4, #68] ; 0x44 8038bac: 4311 orrs r1, r2 ETH_InitStruct->ETH_BroadcastFramesReception | 8038bae: 6ca2 ldr r2, [r4, #72] ; 0x48 8038bb0: 4311 orrs r1, r2 ETH_InitStruct->ETH_DestinationAddrFilter | 8038bb2: 6ce2 ldr r2, [r4, #76] ; 0x4c 8038bb4: 4311 orrs r1, r2 ETH_InitStruct->ETH_PromiscuousMode | 8038bb6: 6d22 ldr r2, [r4, #80] ; 0x50 8038bb8: 4311 orrs r1, r2 /* Set the DAIF bit according to ETH_DestinationAddrFilter value */ /* Set the PR bit according to ETH_PromiscuousMode value */ /* Set the PM, HMC and HPF bits according to ETH_MulticastFramesFilter value */ /* Set the HUC and HPF bits according to ETH_UnicastFramesFilter value */ /* Write to ETHERNET MACFFR */ ETH->MACFFR = (uint32_t)(ETH_InitStruct->ETH_ReceiveAll | 8038bba: 6d62 ldr r2, [r4, #84] ; 0x54 8038bbc: 430a orrs r2, r1 8038bbe: 605a str r2, [r3, #4] ETH_InitStruct->ETH_PromiscuousMode | ETH_InitStruct->ETH_MulticastFramesFilter | ETH_InitStruct->ETH_UnicastFramesFilter); /*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/ /* Write to ETHERNET MACHTHR */ ETH->MACHTHR = (uint32_t)ETH_InitStruct->ETH_HashTableHigh; 8038bc0: 6da2 ldr r2, [r4, #88] ; 0x58 8038bc2: 609a str r2, [r3, #8] /* Write to ETHERNET MACHTLR */ ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; 8038bc4: 6de2 ldr r2, [r4, #92] ; 0x5c 8038bc6: 60da str r2, [r3, #12] /* Set the DZPQ bit according to ETH_ZeroQuantaPause value */ /* Set the PLT bit according to ETH_PauseLowThreshold value */ /* Set the UP bit according to ETH_UnicastPauseFrameDetect value */ /* Set the RFE bit according to ETH_ReceiveFlowControl value */ /* Set the TFE bit according to ETH_TransmitFlowControl value */ tmpreg |= (uint32_t)((ETH_InitStruct->ETH_PauseTime << 16) | 8038bc8: 6e62 ldr r2, [r4, #100] ; 0x64 8038bca: 6ea1 ldr r1, [r4, #104] ; 0x68 ETH->MACHTHR = (uint32_t)ETH_InitStruct->ETH_HashTableHigh; /* Write to ETHERNET MACHTLR */ ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; /*----------------------- ETHERNET MACFCR Configuration --------------------*/ /* Get the ETHERNET MACFCR value */ tmpreg = ETH->MACFCR; 8038bcc: 6998 ldr r0, [r3, #24] /* Set the DZPQ bit according to ETH_ZeroQuantaPause value */ /* Set the PLT bit according to ETH_PauseLowThreshold value */ /* Set the UP bit according to ETH_UnicastPauseFrameDetect value */ /* Set the RFE bit according to ETH_ReceiveFlowControl value */ /* Set the TFE bit according to ETH_TransmitFlowControl value */ tmpreg |= (uint32_t)((ETH_InitStruct->ETH_PauseTime << 16) | 8038bce: 4311 orrs r1, r2 ETH_InitStruct->ETH_ZeroQuantaPause | 8038bd0: 6ee2 ldr r2, [r4, #108] ; 0x6c 8038bd2: 4311 orrs r1, r2 ETH_InitStruct->ETH_PauseLowThreshold | 8038bd4: 6f22 ldr r2, [r4, #112] ; 0x70 8038bd6: 4311 orrs r1, r2 ETH_InitStruct->ETH_UnicastPauseFrameDetect | 8038bd8: 6f62 ldr r2, [r4, #116] ; 0x74 8038bda: 4311 orrs r1, r2 ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; /*----------------------- ETHERNET MACFCR Configuration --------------------*/ /* Get the ETHERNET MACFCR value */ tmpreg = ETH->MACFCR; /* Clear xx bits */ tmpreg &= MACFCR_CLEAR_MASK; 8038bdc: f64f 7241 movw r2, #65345 ; 0xff41 8038be0: 4002 ands r2, r0 /* Set the DZPQ bit according to ETH_ZeroQuantaPause value */ /* Set the PLT bit according to ETH_PauseLowThreshold value */ /* Set the UP bit according to ETH_UnicastPauseFrameDetect value */ /* Set the RFE bit according to ETH_ReceiveFlowControl value */ /* Set the TFE bit according to ETH_TransmitFlowControl value */ tmpreg |= (uint32_t)((ETH_InitStruct->ETH_PauseTime << 16) | 8038be2: 430a orrs r2, r1 8038be4: 6e21 ldr r1, [r4, #96] ; 0x60 8038be6: ea42 4101 orr.w r1, r2, r1, lsl #16 ETH_InitStruct->ETH_PauseLowThreshold | ETH_InitStruct->ETH_UnicastPauseFrameDetect | ETH_InitStruct->ETH_ReceiveFlowControl | ETH_InitStruct->ETH_TransmitFlowControl); /* Write to ETHERNET MACFCR */ ETH->MACFCR = (uint32_t)tmpreg; 8038bea: 6199 str r1, [r3, #24] /*----------------------- ETHERNET MACVLANTR Configuration -----------------*/ /* Set the ETV bit according to ETH_VLANTagComparison value */ /* Set the VL bit according to ETH_VLANTagIdentifier value */ ETH->MACVLANTR = (uint32_t)(ETH_InitStruct->ETH_VLANTagComparison | 8038bec: 6fe1 ldr r1, [r4, #124] ; 0x7c 8038bee: 6fa2 ldr r2, [r4, #120] ; 0x78 8038bf0: 430a orrs r2, r1 8038bf2: 61da str r2, [r3, #28] ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 8038bf4: f503 5380 add.w r3, r3, #4096 ; 0x1000 /* Clear xx bits */ tmpreg &= DMAOMR_CLEAR_MASK; 8038bf8: 4a2a ldr r2, [pc, #168] ; (8038ca4 ) ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 8038bfa: 6999 ldr r1, [r3, #24] /* Set the TTC bit according to ETH_TransmitThresholdControl value */ /* Set the FEF bit according to ETH_ForwardErrorFrames value */ /* Set the FUF bit according to ETH_ForwardUndersizedGoodFrames value */ /* Set the RTC bit according to ETH_ReceiveThresholdControl value */ /* Set the OSF bit according to ETH_SecondFrameOperate value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame | 8038bfc: f8d4 0084 ldr.w r0, [r4, #132] ; 0x84 /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; /* Clear xx bits */ tmpreg &= DMAOMR_CLEAR_MASK; 8038c00: 400a ands r2, r1 /* Set the TTC bit according to ETH_TransmitThresholdControl value */ /* Set the FEF bit according to ETH_ForwardErrorFrames value */ /* Set the FUF bit according to ETH_ForwardUndersizedGoodFrames value */ /* Set the RTC bit according to ETH_ReceiveThresholdControl value */ /* Set the OSF bit according to ETH_SecondFrameOperate value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame | 8038c02: f8d4 1080 ldr.w r1, [r4, #128] ; 0x80 8038c06: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveStoreForward | 8038c08: f8d4 1088 ldr.w r1, [r4, #136] ; 0x88 8038c0c: 4308 orrs r0, r1 ETH_InitStruct->ETH_FlushReceivedFrame | 8038c0e: f8d4 108c ldr.w r1, [r4, #140] ; 0x8c 8038c12: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitStoreForward | 8038c14: f8d4 1090 ldr.w r1, [r4, #144] ; 0x90 8038c18: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitThresholdControl | 8038c1a: f8d4 1094 ldr.w r1, [r4, #148] ; 0x94 8038c1e: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardErrorFrames | 8038c20: f8d4 1098 ldr.w r1, [r4, #152] ; 0x98 8038c24: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardUndersizedGoodFrames | 8038c26: f8d4 109c ldr.w r1, [r4, #156] ; 0x9c 8038c2a: 4308 orrs r0, r1 /* Set the TTC bit according to ETH_TransmitThresholdControl value */ /* Set the FEF bit according to ETH_ForwardErrorFrames value */ /* Set the FUF bit according to ETH_ForwardUndersizedGoodFrames value */ /* Set the RTC bit according to ETH_ReceiveThresholdControl value */ /* Set the OSF bit according to ETH_SecondFrameOperate value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame | 8038c2c: f8d4 10a0 ldr.w r1, [r4, #160] ; 0xa0 8038c30: 4301 orrs r1, r0 8038c32: 430a orrs r2, r1 ETH_InitStruct->ETH_ForwardErrorFrames | ETH_InitStruct->ETH_ForwardUndersizedGoodFrames | ETH_InitStruct->ETH_ReceiveThresholdControl | ETH_InitStruct->ETH_SecondFrameOperate); /* Write to ETHERNET DMAOMR */ ETH->DMAOMR = (uint32_t)tmpreg; 8038c34: 619a str r2, [r3, #24] /* Set the FB bit according to ETH_FixedBurst value */ /* Set the RPBL and 4*PBL bits according to ETH_RxDMABurstLength value */ /* Set the PBL and 4*PBL bits according to ETH_TxDMABurstLength value */ /* Set the DSL bit according to ETH_DesciptorSkipLength value */ /* Set the PR and DA bits according to ETH_DMAArbitration value */ ETH->DMABMR = (uint32_t)(ETH_InitStruct->ETH_AddressAlignedBeats | 8038c36: f8d4 20a8 ldr.w r2, [r4, #168] ; 0xa8 8038c3a: f8d4 10a4 ldr.w r1, [r4, #164] ; 0xa4 8038c3e: 4311 orrs r1, r2 ETH_InitStruct->ETH_FixedBurst | ETH_InitStruct->ETH_RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ 8038c40: f8d4 20ac ldr.w r2, [r4, #172] ; 0xac /* Set the RPBL and 4*PBL bits according to ETH_RxDMABurstLength value */ /* Set the PBL and 4*PBL bits according to ETH_TxDMABurstLength value */ /* Set the DSL bit according to ETH_DesciptorSkipLength value */ /* Set the PR and DA bits according to ETH_DMAArbitration value */ ETH->DMABMR = (uint32_t)(ETH_InitStruct->ETH_AddressAlignedBeats | ETH_InitStruct->ETH_FixedBurst | 8038c44: f441 0100 orr.w r1, r1, #8388608 ; 0x800000 ETH_InitStruct->ETH_RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ 8038c48: 4311 orrs r1, r2 ETH_InitStruct->ETH_TxDMABurstLength | 8038c4a: f8d4 20b0 ldr.w r2, [r4, #176] ; 0xb0 8038c4e: 4311 orrs r1, r2 (ETH_InitStruct->ETH_DescriptorSkipLength << 2) | 8038c50: f8d4 20b8 ldr.w r2, [r4, #184] ; 0xb8 8038c54: 430a orrs r2, r1 8038c56: f8d4 10b4 ldr.w r1, [r4, #180] ; 0xb4 /* Set the FB bit according to ETH_FixedBurst value */ /* Set the RPBL and 4*PBL bits according to ETH_RxDMABurstLength value */ /* Set the PBL and 4*PBL bits according to ETH_TxDMABurstLength value */ /* Set the DSL bit according to ETH_DesciptorSkipLength value */ /* Set the PR and DA bits according to ETH_DMAArbitration value */ ETH->DMABMR = (uint32_t)(ETH_InitStruct->ETH_AddressAlignedBeats | 8038c5a: ea42 0281 orr.w r2, r2, r1, lsl #2 8038c5e: 601a str r2, [r3, #0] ETH_InitStruct->ETH_DMAArbitration | ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ #ifdef USE_ENHANCED_DMA_DESCRIPTORS /* Enable the Enhanced DMA descriptors */ ETH->DMABMR |= ETH_DMABMR_EDE; 8038c60: 681a ldr r2, [r3, #0] 8038c62: f042 0280 orr.w r2, r2, #128 ; 0x80 8038c66: 601a str r2, [r3, #0] #endif /* USE_ENHANCED_DMA_DESCRIPTORS */ /* Return Ethernet configuration success */ return ETH_SUCCESS; 8038c68: 2001 movs r0, #1 } 8038c6a: b007 add sp, #28 8038c6c: bdf0 pop {r4, r5, r6, r7, pc} 8038c6e: bf00 nop 8038c70: 40028000 .word 0x40028000 8038c74: feced300 .word 0xfeced300 8038c78: 00e4e1bf .word 0x00e4e1bf 8038c7c: fde9f140 .word 0xfde9f140 8038c80: 017d783f .word 0x017d783f 8038c84: fc6c7900 .word 0xfc6c7900 8038c88: 026259ff .word 0x026259ff 8038c8c: fa0a1f00 .word 0xfa0a1f00 8038c90: 02faf07f .word 0x02faf07f 8038c94: 000fffff .word 0x000fffff 8038c98: 0004fffe .word 0x0004fffe 8038c9c: 0004ffff .word 0x0004ffff 8038ca0: ff20810f .word 0xff20810f 8038ca4: f8de3f23 .word 0xf8de3f23 08038ca8 <_write>: Write a character to a file. `libc' subroutines will use this system routine for output to all files, including stdout Returns -1 on error or number of bytes sent */ int _write(int file, char *ptr, int len) { int n; switch (file) { 8038ca8: 2801 cmp r0, #1 /* write Write a character to a file. `libc' subroutines will use this system routine for output to all files, including stdout Returns -1 on error or number of bytes sent */ int _write(int file, char *ptr, int len) { 8038caa: b530 push {r4, r5, lr} int n; switch (file) { 8038cac: d00c beq.n 8038cc8 <_write+0x20> 8038cae: 2802 cmp r0, #2 8038cb0: d120 bne.n 8038cf4 <_write+0x4c> 8038cb2: e019 b.n 8038ce8 <_write+0x40> case STDOUT_FILENO: /*stdout*/ for (n = 0; n < len; n++) { #if STDOUT_USART == 1 while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {} 8038cb4: 8805 ldrh r5, [r0, #0] 8038cb6: f005 0540 and.w r5, r5, #64 ; 0x40 8038cba: b2ad uxth r5, r5 8038cbc: 2d00 cmp r5, #0 8038cbe: d0f9 beq.n 8038cb4 <_write+0xc> USART1->DR = (*ptr++ & (uint16_t)0x01FF); 8038cc0: 5ccd ldrb r5, [r1, r3] */ int _write(int file, char *ptr, int len) { int n; switch (file) { case STDOUT_FILENO: /*stdout*/ for (n = 0; n < len; n++) { 8038cc2: 3301 adds r3, #1 #if STDOUT_USART == 1 while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {} USART1->DR = (*ptr++ & (uint16_t)0x01FF); 8038cc4: 80a5 strh r5, [r4, #4] 8038cc6: e002 b.n 8038cce <_write+0x26> int n; switch (file) { case STDOUT_FILENO: /*stdout*/ for (n = 0; n < len; n++) { #if STDOUT_USART == 1 while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {} 8038cc8: 480e ldr r0, [pc, #56] ; (8038d04 <_write+0x5c>) Write a character to a file. `libc' subroutines will use this system routine for output to all files, including stdout Returns -1 on error or number of bytes sent */ int _write(int file, char *ptr, int len) { int n; switch (file) { 8038cca: 2300 movs r3, #0 case STDOUT_FILENO: /*stdout*/ for (n = 0; n < len; n++) { #if STDOUT_USART == 1 while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {} 8038ccc: 4604 mov r4, r0 */ int _write(int file, char *ptr, int len) { int n; switch (file) { case STDOUT_FILENO: /*stdout*/ for (n = 0; n < len; n++) { 8038cce: 4293 cmp r3, r2 8038cd0: dbf0 blt.n 8038cb4 <_write+0xc> 8038cd2: e014 b.n 8038cfe <_write+0x56> } break; case STDERR_FILENO: /* stderr */ for (n = 0; n < len; n++) { #if STDERR_USART == 1 while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {} 8038cd4: 8805 ldrh r5, [r0, #0] 8038cd6: f005 0540 and.w r5, r5, #64 ; 0x40 8038cda: b2ad uxth r5, r5 8038cdc: 2d00 cmp r5, #0 8038cde: d0f9 beq.n 8038cd4 <_write+0x2c> USART1->DR = (*ptr++ & (uint16_t)0x01FF); 8038ce0: 5ccd ldrb r5, [r1, r3] ITM_SendChar(*ptr++ & (uint16_t)0x00FF); #endif } break; case STDERR_FILENO: /* stderr */ for (n = 0; n < len; n++) { 8038ce2: 3301 adds r3, #1 #if STDERR_USART == 1 while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {} USART1->DR = (*ptr++ & (uint16_t)0x01FF); 8038ce4: 80a5 strh r5, [r4, #4] 8038ce6: e002 b.n 8038cee <_write+0x46> } break; case STDERR_FILENO: /* stderr */ for (n = 0; n < len; n++) { #if STDERR_USART == 1 while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {} 8038ce8: 4806 ldr r0, [pc, #24] ; (8038d04 <_write+0x5c>) Write a character to a file. `libc' subroutines will use this system routine for output to all files, including stdout Returns -1 on error or number of bytes sent */ int _write(int file, char *ptr, int len) { int n; switch (file) { 8038cea: 2300 movs r3, #0 } break; case STDERR_FILENO: /* stderr */ for (n = 0; n < len; n++) { #if STDERR_USART == 1 while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {} 8038cec: 4604 mov r4, r0 ITM_SendChar(*ptr++ & (uint16_t)0x00FF); #endif } break; case STDERR_FILENO: /* stderr */ for (n = 0; n < len; n++) { 8038cee: 4293 cmp r3, r2 8038cf0: dbf0 blt.n 8038cd4 <_write+0x2c> 8038cf2: e004 b.n 8038cfe <_write+0x56> ITM_SendChar(*ptr++ & (uint16_t)0x00FF); #endif } break; default: errno = EBADF; 8038cf4: 4b04 ldr r3, [pc, #16] ; (8038d08 <_write+0x60>) 8038cf6: 2209 movs r2, #9 8038cf8: 601a str r2, [r3, #0] return -1; 8038cfa: f04f 32ff mov.w r2, #4294967295 } return len; } 8038cfe: 4610 mov r0, r2 8038d00: bd30 pop {r4, r5, pc} 8038d02: bf00 nop 8038d04: 40011000 .word 0x40011000 8038d08: 200140ac .word 0x200140ac 08038d0c <_sbrk>: /* sbrk Increase program data space. Malloc and related functions depend on this */ caddr_t _sbrk(int incr) { 8038d0c: b508 push {r3, lr} extern char _ebss; // Defined by the linker extern char __bss_end__; static char *heap_end; char *prev_heap_end; if (heap_end == 0) { 8038d0e: 4b0d ldr r3, [pc, #52] ; (8038d44 <_sbrk+0x38>) 8038d10: 681a ldr r2, [r3, #0] 8038d12: b90a cbnz r2, 8038d18 <_sbrk+0xc> //heap_end = &_ebss; heap_end = &__bss_end__; 8038d14: 4a0c ldr r2, [pc, #48] ; (8038d48 <_sbrk+0x3c>) 8038d16: 601a str r2, [r3, #0] } prev_heap_end = heap_end; 8038d18: 681b ldr r3, [r3, #0] */ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void) { register uint32_t result; __ASM volatile ("MRS %0, msp\n" : "=r" (result) ); 8038d1a: f3ef 8208 mrs r2, MSP char * stack = (char*) __get_MSP(); if (heap_end + incr > stack) 8038d1e: 1818 adds r0, r3, r0 8038d20: 4290 cmp r0, r2 8038d22: d90a bls.n 8038d3a <_sbrk+0x2e> { _write (STDERR_FILENO, "Heap and stack collision\n", 25); 8038d24: 2219 movs r2, #25 8038d26: 2002 movs r0, #2 8038d28: 4908 ldr r1, [pc, #32] ; (8038d4c <_sbrk+0x40>) 8038d2a: f7ff ffbd bl 8038ca8 <_write> errno = ENOMEM; 8038d2e: 4b08 ldr r3, [pc, #32] ; (8038d50 <_sbrk+0x44>) 8038d30: 220c movs r2, #12 8038d32: 601a str r2, [r3, #0] return (caddr_t) -1; 8038d34: f04f 33ff mov.w r3, #4294967295 8038d38: e001 b.n 8038d3e <_sbrk+0x32> //abort (); } heap_end += incr; 8038d3a: 4a02 ldr r2, [pc, #8] ; (8038d44 <_sbrk+0x38>) 8038d3c: 6010 str r0, [r2, #0] return (caddr_t) prev_heap_end; } 8038d3e: 4618 mov r0, r3 8038d40: bd08 pop {r3, pc} 8038d42: bf00 nop 8038d44: 2000c858 .word 0x2000c858 8038d48: 200141b0 .word 0x200141b0 8038d4c: 08045253 .word 0x08045253 8038d50: 200140ac .word 0x200140ac 08038d54 : .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 8038d54: 2100 movs r1, #0 b LoopCopyDataInit 8038d56: f000 b804 b.w 8038d62 08038d5a : CopyDataInit: ldr r3, =_sidata 8038d5a: 4b0d ldr r3, [pc, #52] ; (8038d90 ) ldr r3, [r3, r1] 8038d5c: 585b ldr r3, [r3, r1] str r3, [r0, r1] 8038d5e: 5043 str r3, [r0, r1] adds r1, r1, #4 8038d60: 3104 adds r1, #4 08038d62 : LoopCopyDataInit: ldr r0, =_sdata 8038d62: 480c ldr r0, [pc, #48] ; (8038d94 ) ldr r3, =_edata 8038d64: 4b0c ldr r3, [pc, #48] ; (8038d98 ) adds r2, r0, r1 8038d66: 1842 adds r2, r0, r1 cmp r2, r3 8038d68: 429a cmp r2, r3 bcc CopyDataInit 8038d6a: f4ff aff6 bcc.w 8038d5a ldr r2, =_sbss 8038d6e: 4a0b ldr r2, [pc, #44] ; (8038d9c ) b LoopFillZerobss 8038d70: f000 b803 b.w 8038d7a 08038d74 : /* Zero fill the bss segment. */ FillZerobss: movs r3, #0 8038d74: 2300 movs r3, #0 str r3, [r2], #4 8038d76: f842 3b04 str.w r3, [r2], #4 08038d7a : LoopFillZerobss: ldr r3, = _ebss 8038d7a: 4b09 ldr r3, [pc, #36] ; (8038da0 ) cmp r2, r3 8038d7c: 429a cmp r2, r3 bcc FillZerobss 8038d7e: f4ff aff9 bcc.w 8038d74 /* Call the clock system intitialization function.*/ bl SystemInit 8038d82: f7ed f9dd bl 8026140 /* Call static constructors */ bl __libc_init_array 8038d86: f7e8 ff2f bl 8021be8 <__libc_init_array> /* Call the application's entry point.*/ bl main 8038d8a: f7ee fb35 bl 80273f8
bx lr 8038d8e: 4770 bx lr /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit CopyDataInit: ldr r3, =_sidata 8038d90: 080452dc .word 0x080452dc ldr r3, [r3, r1] str r3, [r0, r1] adds r1, r1, #4 LoopCopyDataInit: ldr r0, =_sdata 8038d94: 20000000 .word 0x20000000 ldr r3, =_edata 8038d98: 20000ac4 .word 0x20000ac4 adds r2, r0, r1 cmp r2, r3 bcc CopyDataInit ldr r2, =_sbss 8038d9c: 20000ac4 .word 0x20000ac4 FillZerobss: movs r3, #0 str r3, [r2], #4 LoopFillZerobss: ldr r3, = _ebss 8038da0: 200141b0 .word 0x200141b0 08038da4 : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8038da4: f7ff bffe b.w 8038da4 08038da8 <_ctype_>: 8038da8: 2000 2020 2020 2020 2020 2828 2828 2028 . ((((( 8038db8: 2020 2020 2020 2020 2020 2020 2020 2020 8038dc8: 8820 1010 1010 1010 1010 1010 1010 1010 ............... 8038dd8: 0410 0404 0404 0404 0404 1004 1010 1010 ................ 8038de8: 1010 4141 4141 4141 0101 0101 0101 0101 ..AAAAAA........ 8038df8: 0101 0101 0101 0101 0101 0101 1010 1010 ................ 8038e08: 1010 4242 4242 4242 0202 0202 0202 0202 ..BBBBBB........ 8038e18: 0202 0202 0202 0202 0202 0202 1010 1010 ................ 8038e28: 0020 0000 0000 0000 0000 0000 0000 0000 ............... 8038e38: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038e48: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038e58: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038e68: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038e78: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038e88: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038e98: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038ea8: 0000 0000 0000 0000 ........ 08038eb0 : 8038eb0: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 8038ec0: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 8038ed0: 6f43 64ac 0628 0e18 Co.d(... 08038ed8 : 8038ed8: 0005 0000 0019 0000 007d 0000 0000 0000 ........}....... 08038ee8 <__mprec_tens>: 8038ee8: 0000 0000 0000 3ff0 0000 0000 0000 4024 .......?......$@ 8038ef8: 0000 0000 0000 4059 0000 0000 4000 408f ......Y@.....@.@ 8038f08: 0000 0000 8800 40c3 0000 0000 6a00 40f8 .......@.....j.@ 8038f18: 0000 0000 8480 412e 0000 0000 12d0 4163 .......A......cA 8038f28: 0000 0000 d784 4197 0000 0000 cd65 41cd .......A....e..A 8038f38: 0000 2000 a05f 4202 0000 e800 4876 4237 ... _..B....vH7B 8038f48: 0000 a200 1a94 426d 0000 e540 309c 42a2 ......mB..@..0.B 8038f58: 0000 1e90 bcc4 42d6 0000 2634 6bf5 430c .......B..4&.k.C 8038f68: 8000 37e0 c379 4341 a000 85d8 3457 4376 ...7y.AC....W4vC 8038f78: c800 674e c16d 43ab 3d00 6091 58e4 43e1 ..Ngm..C.=.`.X.C 8038f88: 8c40 78b5 af1d 4415 ef50 d6e2 1ae4 444b @..x...DP.....KD 8038f98: d592 064d f0cf 4480 4af6 c7e1 2d02 44b5 ..M....D.J...-.D 8038fa8: 9db4 79d9 7843 44ea ...yCx.D 08038fb0 <__mprec_tinytens>: 8038fb0: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 8038fc0: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 8038fd0: 6f43 64ac 0628 0ac8 Co.d(... 08038fd8 <__mprec_bigtens>: 8038fd8: 8000 37e0 c379 4341 6e17 b505 b8b5 4693 ...7y.AC.n.....F 8038fe8: f9f5 e93f 4f03 4d38 1d32 f930 7748 5a82 ..?..O8M2.0.Hw.Z 8038ff8: bf3c 7f73 4fdd 7515 a1d0 b1d0 80d1 bed0 <.s..O.u........ 8039008: 81d1 d020 20ba b7d0 b0d0 b2d0 bed0 b4d0 .. .. .......... 8039018: 81d1 bad0 bed0 bcd0 83d1 4c00 4445 425f ...........LED_B 8039028: 696c 6b6e 4200 7475 6f74 736e 5500 5350 link.Buttons.UPS 8039038: 4d5f 6e6f 7469 726f 7300 6d6e 5370 7379 _Monitor.snmpSys 8039048: 7055 6954 656d 7300 6d6e 5470 6172 5470 UpTime.snmpTrapT 8039058: 7365 0074 6e73 7074 6e4f 6563 6953 686e est.sntpOnceSinh 8039068: 6f72 7300 746e 5070 7265 6f69 6964 5363 ro.sntpPeriodicS 8039078: 6e69 7268 006f 6e49 7469 6154 6b73 4800 inhro.InitTask.H 8039088: 7261 4664 7561 746c 0a3a 000d 0d0a 6552 ardFault:.....Re 8039098: 6967 7473 7265 3a73 0d0a 5300 2050 2020 gisters:...SP 80390a8: 2020 2020 2020 3020 2578 3830 786c 0d0a 0x%08lx.. 80390b8: 5200 2030 2020 2020 2020 2020 3020 2578 .R0 0x% 80390c8: 3830 786c 0d0a 5200 2031 2020 2020 2020 08lx...R1 80390d8: 2020 3020 2578 3830 786c 0d0a 5200 2032 0x%08lx...R2 80390e8: 2020 2020 2020 2020 3020 2578 3830 786c 0x%08lx 80390f8: 0d0a 5200 2033 2020 2020 2020 2020 3020 ...R3 0 8039108: 2578 3830 786c 0d0a 5200 3231 2020 2020 x%08lx...R12 8039118: 2020 2020 3020 2578 3830 786c 0d0a 4c00 0x%08lx...L 8039128: 2052 2020 2020 2020 2020 3020 2578 3830 R 0x%08 8039138: 786c 0d0a 5000 2043 2020 2020 2020 2020 lx...PC 8039148: 3020 2578 3830 786c 0d0a 5000 5253 2020 0x%08lx...PSR 8039158: 2020 2020 2020 3020 2578 3830 786c 0d0a 0x%08lx.. 8039168: 2500 2e30 6631 2500 0064 3025 6934 252d .%0.1f.%d.%04i-% 8039178: 3230 2d69 3025 6932 2500 2064 b4d0 bdd0 02i-%02i.%d .... 8039188: 202e 6425 d120 2e87 2520 2064 bcd0 b8d0 . %d ... %d .... 8039198: bdd0 002e 2e31 0030 6146 736c 0065 7274 ....1.0.False.tr 80391a8: 6575 6600 6c61 6573 6f00 006e 302d 2d31 ue.false.on.-01- 80391b8: 3025 6932 253a 3230 0069 3025 6932 252d %02i:%02i.%02i-% 80391c8: 3230 2d69 3025 6932 302d 2d31 3100 3239 02i-%02i-01-.192 80391d8: 312e 3836 312e 382e 3100 3239 312e 3836 .168.1.8.192.168 80391e8: 312e 312e 3200 3535 322e 3535 322e 3535 .1.1.255.255.255 80391f8: 302e 3100 3239 312e 3836 312e 322e 7000 .0.192.168.1.2.p 8039208: 6275 696c 0063 5442 3736 3230 3000 302e ublic.BT6702.0.0 8039218: 302e 302e 3000 2e39 3730 322e 3130 0037 .0.0.09.07.2017. 8039228: 4345 342d 2d43 4434 302d 2d30 3030 302d EC-4C-4D-00-00-0 8039238: 0041 3037 3032 3030 0030 6461 696d 006e A.7020000.admin. 8039248: 3231 3433 0035 7375 7265 3100 3332 0034 12345.user.1234. 8039258: 3838 312e 3734 322e 3435 322e 3533 6e00 88.147.254.235.n 8039268: 6e6f 0065 a3d0 81d1 bfd0 b5d0 88d1 bdd0 one............. 8039278: bed0 5400 4f32 004b 6f52 6574 006b 3030 ...T2OK.Rotek.00 8039288: 302e 2e30 3030 d000 d090 d0b4 d0bc d0b8 .00.00.......... 8039298: d0bd d1b8 d181 d182 d080 d1b0 d082 d1be ................ 80392a8: 0080 7325 2530 0d66 2500 2e73 6625 000d ..%s0%f..%s.%f.. 80392b8: 7325 6625 000d 7325 252e 2564 2573 0d64 %s%f..%s.%d%s%d. 80392c8: 2000 5200 4d54 2050 4949 4100 4b43 4e00 . .RTMP II.ACK.N 80392d8: 4b43 7200 7165 6575 7473 745f 7361 006b CK.request_task. 80392e8: 3151 000d 4c54 000d 0054 0d51 5300 5200 Q1..TL..T.Q..S.R 80392f8: 4300 000d 5443 000d 0d49 4600 000d 3251 .C..CT..I..F..Q2 8039308: 000d 90d0 b2d0 b0d0 80d1 b8d0 8fd1 d000 ................ 8039318: d09d d1be d080 d0bc 00b0 97d0 b0d0 bcd0 ................ 8039328: bad0 bdd0 83d1 82d1 bed0 d000 d0a0 d0b0 ................ 8039338: d0b7 d0be d0bc d0ba d1bd d183 d082 00be ................ 8039348: 6f6c 5f67 6174 6b73 2500 3230 2e69 3025 log_task.%02i.%0 8039358: 6932 252e 3230 2069 3025 6932 253a 3230 2i.%02i %02i:%02 8039368: 3a69 3025 6932 2200 002c 003b 9fd0 b5d0 i:%02i.",.;..... 8039378: 80d1 b5d0 b7d0 b0d0 b3d0 80d1 83d1 b7d0 ................ 8039388: bad0 b0d0 d020 d0ba d0be d1bd d182 d080 .... ........... 8039398: d0be d0bb d0bb d1b5 d080 00b0 a1d0 b1d0 ................ 80393a8: 80d1 bed0 81d1 d020 d0bd d1b0 d181 d182 ...... ......... 80393b8: d080 d0be d0b5 00ba 9ed0 b1d0 bdd0 bed0 ................ 80393c8: b2d0 bbd0 b5d0 bdd0 b8d0 b5d0 d020 d09f ............ ... 80393d8: 009e a1d0 bcd0 b5d0 bdd0 b0d0 d020 d0bf ............ ... 80393e8: d1b0 d080 d0be d1bb 008f a1d0 bed0 85d1 ................ 80393f8: 80d1 b0d0 bdd0 b5d0 bdd0 b8d0 b5d0 d020 .............. . 8039408: d0bd d1b0 d181 d182 d080 d0be d0b5 00ba ................ 8039418: 90d0 b2d0 82d1 bed0 80d1 b8d0 b7d0 b0d0 ................ 8039428: 86d1 b8d0 8fd1 d000 d0a2 d1b5 d181 2082 ............... 8039438: 98d0 91d0 9fd0 d000 d19e d082 d0ba 2ebb ................ 8039448: d020 d0bd d0b0 d1b3 d180 d083 d0b7 d0ba ............... 8039458: 20b8 98d0 91d0 9fd0 d000 d090 d0b2 d1b0 . .............. 8039468: d080 d1b8 208f b4d0 b8d0 81d1 bad0 80d1 ..... .......... 8039478: 202e b2d0 85d1 bed0 b4d0 b0d0 3120 d000 . .......... 1.. 8039488: d0a1 d1be d181 d082 d1be d08f d0bd d0b8 ................ 8039498: 20b5 b2d0 8bd1 85d1 bed0 b4d0 b0d0 3120 . ............ 1 80394a8: d000 d0a1 d1be d181 d082 d1be d08f d0bd ................ 80394b8: d0b8 20b5 b2d0 8bd1 85d1 bed0 b4d0 b0d0 ... ............ 80394c8: 3220 d000 d090 d0b2 d1b0 d080 d1b8 208f 2............. 80394d8: 82d1 b5d0 bcd0 bfd0 b5d0 80d1 b0d0 82d1 ................ 80394e8: 83d1 80d1 8bd1 d000 d090 d0b2 d1b0 d080 ................ 80394f8: d1b8 208f b2d0 85d1 202e bdd0 b0d0 bfd0 ... ..... ...... 8039508: 80d1 8fd1 b6d0 b5d0 bdd0 b8d0 8fd1 d000 ................ 8039518: d09d d0b8 d0b7 d0ba d0b8 20b9 b7d0 b0d0 ........... .... 8039528: 80d1 8fd1 b4d0 d020 d090 d09a 0091 90d0 ...... ......... 8039538: b2d0 b0d0 80d1 b8d0 8fd1 d020 d0bd d0b0 .......... ..... 8039548: d1b3 d180 d083 d0b7 d0ba 00b8 90d0 b2d0 ................ 8039558: b0d0 80d1 b8d0 8fd1 d120 d081 d1b2 d08f ........ ....... 8039568: d0b7 20b8 81d1 d020 d098 d091 009f 90d0 ... .. ......... 8039578: b2d0 b0d0 80d1 b8d0 8fd1 d020 d1be d082 .......... ..... 8039588: d0ba d1bb d18e d087 d0b5 d0bd d1b8 208f ............... 8039598: 90d0 9ad0 91d0 7200 6e69 6667 5f73 7061 .......ringfs_ap 80395a8: 6570 646e 203a 6f63 7272 7075 6574 2064 pend: corrupted 80395b8: 6966 656c 7973 7473 6d65 0a0d 5400 726d filesystem...Tmr 80395c8: 5320 6376 4900 4c44 0045 2509 0963 7525 Svc.IDLE..%c.%u 80395d8: 2509 0975 7525 0a0d 2f00 .%u.%u... 080395e1 : 80395e1: 722f 746f 6b65 702e 676e 0000 5448 5054 /rotek.png..HTTP 80395f1: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8039601: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8039611: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8039621: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8039631: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8039641: 6e65 2d74 654c 676e 6874 203a 3935 3935 ent-Length: 5959 8039651: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8039661: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8039671: 3a65 6920 616d 6567 702f 676e 0a0d 6143 e: image/png..Ca 8039681: 6863 2d65 6f43 746e 6f72 3a6c 7020 6972 che-Control: pri 8039691: 6176 6574 202c 616d 2d78 6761 3d65 3638 vate, max-age=86 80396a1: 3034 0d30 0d0a 890a 4e50 0d47 1a0a 000a 400.....PNG..... 80396b1: 0000 490d 4448 0052 0100 0057 0000 08ae ...IHDR...W..... 80396c1: 0006 0000 db82 7d4e 0000 0e17 4449 5441 ......N}....IDAT 80396d1: da78 9ded ac7d 672c c059 a1cf 7a80 3285 x...}.,gY....z.2 80396e1: 4b45 1014 4db6 a62d ae0a b68a 52d8 45c7 EK...M-......R.E 80396f1: 4131 1b2d 1045 0b7a 7a53 bc69 6060 634d 1A-.E.z.Szi.``Mc 8039701: d894 c326 6c55 d2ac c6c5 285e 2c91 951f ..&.Ul....^(.,.. 8039711: 4a92 885d 4ad5 dd02 6a3f 9352 1ba2 36ac .J]..J..?jR....6 8039721: a246 011b 6d69 e76b 72d2 71fb 7729 df7d F...imk..r.q)w}. 8039731: 7793 9c75 cece 9fbc b333 7e7b fc7f 6f72 .wu.....3.{~..ro 8039741: 39ce fb3b bf39 e67d 9e79 79f7 9677 e5cb .9;.9.}.y..yw... 8039751: 000e f800 1785 0001 b900 0002 5720 0000 ............ W.. 8039761: 0ae4 0000 15c8 0000 02b9 2000 0057 4000 ........... W..@ 8039771: 00ae c800 0015 b900 0002 7200 0005 ae40 ...........r..@. 8039781: 0000 15c8 0000 2b90 0000 0572 4000 00ae .......+..r..@.. 8039791: 8000 015c 9000 002b 7200 0005 e400 000a ..\...+..r...... 80397a1: 5c80 0001 2b90 0000 5720 0000 0ae4 8000 .\...+.. W...... 80397b1: 015c 0000 02b9 2000 0057 e400 000a c800 \...... W....... 80397c1: 0015 b900 0002 5720 0000 eae4 c19f 5f6b ...... W......k_ 80397d1: 96b7 8fdd bede 440d 3882 9a47 ff23 def3 .......D.8G.#... 80397e1: 3c96 d6df ed38 377d 7e56 009e c824 3375 .<..8.}7V~..$.u3 80397f1: dae5 8c17 1304 5cc1 b4b0 de40 aa6e 138e .......\..@.n... 8039801: 4d23 0ae4 75c8 ca3f 4655 89a5 6192 2966 #M...u?.UF...af) 8039811: 3ad3 7532 44fc 1fdd 4522 80ae b75c ae56 .:2u.D.."E..\.V. 8039821: 8ab1 974e 202d 3b45 a644 15c8 eb90 c936 ..N.- E;D.....6. 8039831: 4655 8b8f a496 645a 3441 5c8b b901 ba6e UF....ZdA4.\..n. 8039841: bb5c d524 b4b2 08c1 22b9 4057 9bae d724 \.$......"W@..$. 8039851: a1d8 5530 2cc5 2450 231b e457 c801 cbb5 ..0U.,P$.#W..... 8039861: 9572 da97 0763 cdd1 edd5 1557 48ff 5db3 r...c.....W..H.] 8039871: 512b 9bb7 e63b 2364 0ae4 5c80 26bb bed7 +Q..;.d#...\.&.. 8039881: 0a45 5320 ae05 47a1 45b1 78ea 8b13 844e E. S...G.E.x..N. 8039891: 3f6c bd16 2b90 d720 caee 6475 7971 54df l?...+ ...udqy.T 80398a1: 2951 48b1 8c27 2b91 7200 5b6d 13ae a943 Q).H'..+.rm[..C. 80398b1: 95b6 ecdf 3c59 08d6 02b9 d720 e5a6 191a ....Y<.... ..... 80398c1: 38e4 1d67 1a2a 0cf5 d922 7ef9 2c10 0572 .8g.*..."..~.,r. 80398d1: dae4 b91d 8aea b5d5 a9dd 9857 1023 9c7b ..........W.#.{. 80398e1: 302b ccd4 cec9 7db7 017e 0572 dae4 b90d +0.....}~.r..... 80398f1: 8aea 6675 a521 caa1 ce77 722c 63b8 c28b ..uf!...w.,r.c.. 8039901: a458 04ba 75f6 8b04 015c b6b9 572f b15d X....u..\.../W]. 8039911: 86a6 9d42 faee ea5f 189a bd16 adf6 9160 ..B..._.......`. 8039921: 202b 4d57 06b9 ec14 53d4 532b d2a4 a105 + WM.....S+S.... 8039931: 6f57 4a65 3af4 ec52 a46b e609 15c8 2b90 WoeJ.:R.k......+ 8039941: f572 58cd 6443 8efd 892e 34cd 69a3 c11d r..XCd.....4.i.. 8039951: 904e 202b e457 8bea 07a1 f6b1 2d03 f55f N.+ W........-_. 8039961: d4bd 4755 09b0 0572 8ae4 7d5c 59e4 4733 ..UG..r...\}.Y3G 8039971: 8eb1 bb76 b435 7525 6c14 4db6 041d 15c8 ..v.5.%u.l.M.... 8039981: ab90 5c81 0a3d 2eb6 1acf 88d7 6279 9059 ...\=.......ybY. 8039991: 6b4a 0be6 e6ac 8c0a 872c d76e 122d 13a8 Jk......,.n.-... 80399a1: 0cec 02b9 4572 a1ae 01d2 4f23 0c8b 4bf2 ....rE....#O...K 80399b1: 5d62 af1f e749 5d41 4007 f0e2 91fc 202b b]..I.A].@....+ 80399c1: e457 56ba 8b8e e89a 87d2 2758 2e01 4db1 W..V......X'...M 80399d1: ba96 09d6 5c76 1e93 9088 202b 7dd7 5726 ....v\....+ .}&W 80399e1: c147 35a6 a185 51c8 f3ac 9606 eac4 752e G..5...Q.......u 80399f1: 13ad 7cec bb9b 9007 202b e6d7 5ae4 c457 ...|....+ ...ZW. 8039a01: 1d8a b472 8ba6 9a0c da9a af35 bfc9 dd56 ..r.......5...V. 8039a11: 87b6 015c eeb9 b933 0a5a b536 074c 01a4 ..\...3.Z.6.L... 8039a21: a5e6 9e46 0ae6 f6b8 8eb0 35b7 457a 80ae ..F........5zE.. 8039a31: 9b5c 6b91 d45d abda dad8 c7c5 8322 2155 \..k].......".U! 8039a41: 6749 b5d8 f6e9 3ad9 1d82 7e7a 905d 202b Ig.....:..z~].+ 8039a51: 6dd7 ab95 60a1 8b13 f9cb e2ba 8e97 2358 .m...`........X# 8039a61: fc75 376c 52ec 9d57 d61e 22c8 f732 ea91 u.l7.RW...."2... 8039a71: 0d58 f1ad 58c5 ae3d 2ab4 afda 6b91 8824 X....X=..*...k$. 8039a81: a905 2c60 8198 9277 6bc2 323e bdbc 07ae ..`,..w..k>2.... 8039a91: de5c 1ebf 7572 ec17 22c2 ab3a 074b 1ac4 \...ru...":.K... 8039aa1: 542d 52b6 19b5 5873 d827 4589 baf4 20f0 -T.R..sX'..E... 8039ab1: a6d7 a956 f38d 65ef 5c89 7523 cf82 4b05 ..V....e.\#u...K 8039ac1: ce08 f0a8 cffa 6e0c 2bab 89d7 63e5 04cb .......n.+...c.. 8039ad1: 227d 7757 f6b9 842d 73d3 85ec 049d 4892 }"Ww..-..s.....H 8039ae1: 22dd c481 48b2 5a95 14a4 5f5c 50fb d7c8 ."...H.Z..\_.P.. 8039af1: ca3e b5c9 70e7 8212 713d 5ce1 0ccd 3b6e >....p..=q.\..n; 8039b01: 280e c5d6 ac4a d5c8 b05d 4555 be9b 36c5 .(..J...].UE...6 8039b11: 332f 8b8f 6c0c 9377 2c8d 1b3b be6c 5c4c /3...lw..,;.l.L\ 8039b21: 5b0a ddc3 e696 082d c6b9 24ea 7445 90ed .[....-....$Et.. 8039b31: 473f 8e7b 6f51 0af1 f6c4 63ea 6eae ce4f ?G{.Qo.....c.nO. 8039b41: 93d5 1760 6d86 914a fae5 26fb aac4 5823 ..`..mJ....&..#X 8039b51: 22db b4d5 39e2 e887 0e2b 77ca e07c cb33 ."...9..+..w|.3. 8039b61: 5f0b 3177 6b92 4587 fce1 1d8c 5ea3 621f ._w1.k.E.....^.b 8039b71: 169d 8ac5 dd5c dae4 b8b3 1fb4 1659 7478 ....\.......Y.xt 8039b81: a897 3aae 7a01 8f25 6875 0ab8 a6cb 7607 ...:.z%.uh.....v 8039b91: 916c b052 185d dd31 716d cd98 bf99 07fd l.R.].1.mq...... 8039ba1: ae88 8a1d d339 f0d4 91f6 b167 e84e 7016 ....9.....g.N..p 8039bb1: ab6c 9430 cf4c d230 aaad 8fb8 fd76 892e l.0.L.0.....v... 8039bc1: 348d cd66 6dd6 bd97 8c30 a344 5d00 8b03 .4f..m..0.D..].. 8039bd1: e536 8cfa bd3f d10d 43b5 90ea 5d1f 9c94 6...?....C...].. 8039be1: 7ddb 9cc3 6ead 018a 3ab9 7608 5862 ef05 .}...n...:.vbX.. 8039bf1: 885b a7ac 06d1 5b65 8a14 3a35 fa0e 8b1e [.....e[..5:.... 8039c01: 3354 d3cf 5ab2 c51f a3f8 de87 ec85 679a T3...Z.........g 8039c11: 3858 e72f 510e 8baf 1358 5cfa ca3d 20b5 X8/..Q..X..\=.. 8039c21: 45d8 915d f0a6 a9f7 a445 f13b c8b4 f7c0 .E].....E.;..... 8039c31: c098 a2c8 5548 fcf5 be6d 9018 feeb 5fa4 ....HU..m......_ 8039c41: 2738 a36d d8de ac52 c959 4063 beae 7ae4 8'm...R.Y.c@...z 8039c51: fae0 4ee9 d4dd 57fd e9bc 45ad cf21 f2ea ...N...W...E!... 8039c61: 059b d719 6cb5 1af9 52e2 d827 61be 73ce .....l...R'..a.s 8039c71: 2161 d344 892f a2c4 accd 508a cd72 9537 a!D./......Pr.7. 8039c81: 102f f7a3 814e 65be 99b4 68f8 42b5 feae /...N..e...h.B.. 8039c91: dae5 7213 891d 9c76 a4a5 144c eff2 72f2 ...r..v...L....r 8039ca1: 2715 4ee1 ce5d dcf1 2e4b 8937 7d74 720f .'.N]...K.7.t}.r 8039cb1: 5919 a244 8255 0c8b dda3 7038 80a7 61af .YD.U.....8p...a 8039cc1: 3a35 cd72 8454 5654 8938 241d 6b1b 5a92 5:r.T.TV8..$.k.Z 8039cd1: 0de4 0363 ab4c b1e8 f267 e7af 22d0 b5ea ..c.L...g....".. 8039ce1: eb15 cd7c 8a7b 2b5c 845e 87fc 5532 881f ..|.{.\+^...2U.. 8039cf1: b455 9b61 598f b90a ab66 88e3 7093 ab26 U.a..Y..f....p&. 8039d01: dfcb d577 f7fb 2c84 795b 62f2 8f91 2563 ..w....,[y.b..c% 8039d11: 9cd7 8d60 5f8a f43f dff6 79da afe5 dc1c ..`.._?....y.... 8039d21: c9f9 5e37 23ba 6bee 95e7 bfaf ef64 1e98 ..7^.#.k....d... 8039d31: 440a 4599 c4b7 593a 9e66 2cbe 8666 6b51 .D.E..:Yf..,f.Qk 8039d41: e388 7f2e cde2 56bf 0276 6af6 ba4e 52c8 .......Vv..jN..R 8039d51: b1b0 49e6 3a9d 8244 1a3b dd8f f8a5 9be4 ...I.:D.;....... 8039d61: e2d4 78f1 b56b ae42 27ff 9ed7 d6fa bb1a ...xk.B..'...... 8039d71: d38a f217 14e4 9412 258f 2215 564c 1c97 .........%."LV.. 8039d81: e235 8b4a 7d42 a5f9 bebf ae56 1fa2 e773 5.J.B}....V...s. 8039d91: 5ffc f64d e67e a970 f7dd cb24 2799 9ab9 ._M.~.p...$..'.. 8039da1: fd2c 849d ab92 6443 fb13 4cae 98e7 563a ,.....Cd...L..:V 8039db1: 7dcf ee3e b038 675c 9c0d 13a7 b706 cbd4 .}>.8.\g........ 8039dc1: dd35 bc94 9092 5ce4 ba46 5fa7 e1fd 96bd 5......\F.._.... 8039dd1: b29f 97e2 a894 5ca9 166b 4444 7d16 a6bb .......\k.DD.}.. 8039de1: 9cb2 8c5a 3465 9c79 e2ae 6ed6 92ef 8def ..Z.e4y....n.... 8039df1: 914d b2c3 6dca 0512 0c2e b223 9190 1462 M....m....#...b. 8039e01: ae58 f3a1 c9d8 a980 db58 d725 08b2 ecf7 X.......X.%..... 8039e11: 8e2b 9dec 52d0 e72e 3c1d 2d64 9ad7 7608 +....R..... ..\.. 8039e91: d542 5738 4ac0 bf2d f351 9fb7 28f8 5982 B.8W.J-.Q....(.Y 8039ea1: 10a6 4216 e3ae 6895 e575 26ba 9045 806e ...B...hu..&E.n. 8039eb1: 275c 9116 3aeb 3646 68cb 850b 91ac c9e5 \'...:F6.h...... 8039ec1: 0717 ab90 2569 34dc d195 eb76 7155 6b86 ....i%.4..v.Uq.k 8039ed1: c8c8 4235 0dae 62b7 d019 2753 fc90 a7c0 ..5B...b..S'.... 8039ee1: 70aa 0f35 5a2d d119 810a b6f6 ae58 36b3 .p5.-Z......X..6 8039ef1: 0e17 d214 4b01 ee8d 2680 3ae5 841e 14eb .....K...&.:.... 8039f01: b7e8 d620 c799 bae7 341c e9dc 5c80 621b .. ......4...\.b 8039f11: b425 07dc 1135 dbd2 5ceb 3108 4961 5cca %...5....\.1aI.\ 8039f21: 2076 c954 44b5 33b0 82c3 1b53 ed72 5892 v T..D.3..S.r..X 8039f31: 0ee7 099f 28d3 e473 b2f9 167d 8d38 fa11 .....(s...}.8... 8039f41: 3cf2 8a74 39c2 457a edae 75c8 290f f93d ...6 8039fc1: 5791 145d ba15 7fc1 82da e35c f38a edaf .W].......\..... 8039fd1: 1a82 0d72 d724 62b4 b91d a8f7 1577 cad9 ..r.$..b....w... 8039fe1: aa7c bc8f caad c6ff b905 2d8e cb06 ee84 |..........-.... 8039ff1: 6d8b 407d 5cb6 b74d 6a26 6d75 3792 c2f9 .m}@.\M.&jum.7.. 803a001: 0c5c 6fda 6ff0 3663 d442 a742 8b00 5a08 \..o.oc6B.B....Z 803a011: 6b96 586c 8824 7894 b927 84ee 50c8 7bae .klX$..x'....P.{ 803a021: 009d d2ea f7be 8b8a 1b2f 4929 16ba 620c ......../.)I...b 803a031: 8dcb 6304 de8b 9b52 c37d 1f5a 2d90 d823 ...c..R.}.Z..-#. 803a041: 8235 95b5 30eb 09c0 ba1e bfc1 1ded da07 5....0.......... 803a051: 514c 90f4 736b ed72 445b d904 0f9a f690 LQ..ksr.[D...... 803a061: 59e5 ae4e 423b 7bae d3b9 6895 225d 1fda .YN.;B.{...h]".. 803a071: cb7f 4ce1 15e6 c50d 3a67 b042 a1e7 7fd1 ...L....g:B..... 803a081: 56de ab31 dbd0 2aea d357 fc66 e7a1 6663 .V1....*W.f...cf 803a091: 3b81 4c1b c187 d194 b00f e081 32dc 9f02 .;.L.........2.. 803a0a1: d720 0b66 a65a b879 a7a9 fa0f 391e eeb9 .f.Z.y......9.. 803a0b1: 3ffd 8b97 6d4a e12f 7e64 30b1 a654 09aa .?..Jm/.d~.0T... 803a0c1: 6e7f 9c58 1c4a fd1b 1f5b 2d90 dcbe 2c7c .nX.J...[..-..|, 803a0d1: 348f 17cd 0166 b872 e9a6 d0ab b3fd cca6 .4..f.r......... 803a0e1: c52d 391a c54c 21ea e6d7 3ae4 5c33 9daf -..9L..!...:3\.. 803a0f1: 4458 2326 bc75 d551 9b9b eb93 bbff bcf4 XD&#u.Q......... 803a101: f5e0 b66f 422a b9c8 6a06 c1a6 3578 a620 ..o.*B...j..x5 . 803a111: 55d0 b7d0 cb58 363f 3b4c 2eb8 1d7b 1c56 .U..X.?6L;..{.V. 803a121: 3527 fe1c c7b2 0ecb a6ff 6a8f 34f2 d450 '5.........j.4P. 803a131: b214 1e0a 7fb2 67d6 a360 1afb 1236 22bd .......g`...6.." 803a141: 7b57 86c6 4691 1964 2c49 690a b184 646e W{...Fd.I,.i..nd 803a151: e420 8f9a 8d66 0e3a 9464 2226 54d9 faae ...f.:.d.&".T.. 803a161: 912a c4eb 8262 c2d6 6871 e98b ec80 c6be *...b...qh...... 803a171: 5792 4dd7 b309 11c0 6ea0 64c4 343b a77a .W.M.....n.d;4z. 803a181: 5103 cfb1 9c94 14ae 26d3 57a2 6ae4 d0cf .Q.......&.W.j.. 803a191: ef22 b53a e378 15fa ff09 d14a b92a 4f16 ".:.x.....J.*..O 803a1a1: a36e 6d6f a139 2e4b cdad b5c9 772a f0ba n.om9.K.....*w.. 803a1b1: 53b8 136e b203 8ea7 3572 6969 d9b2 69af .Sn.....r5ii...i 803a1c1: 0832 2053 cd33 6715 0683 ebaa 9e81 7f6b 2.S 3..g......k. 803a1d1: a04d 8593 5e8e ab91 913d 65c5 6257 8df9 M....^..=..eWb.. 803a1e1: 175f acf1 630a df5a a2ac 3580 8934 d446 _....cZ....54.F. 803a1f1: b20a e554 2746 b79e ef14 b6ed 2037 48db ..T.F'......7 .H 803a201: 15d8 badb 45d4 a382 91c0 9752 6406 7977 .....E....R..dwy 803a211: 185b cb1f 6367 dae4 0acc 99ad 1145 6162 [...gc......E.ba 803a221: 1559 189e 965c 3525 cd72 8157 0667 ec51 Y...\.%5r.W.g.Q. 803a231: a2a2 a0ab 7b6a 85f0 be63 d435 ec80 d778 ....j{..c.5...x. 803a241: 9edf 9359 89c2 b7d7 52b9 6cb0 eff2 80d2 ..Y......R.l.... 803a251: 2eec f731 5858 4e34 207b 3757 1646 ad79 ..1.XX4N{ W7F.y. 803a261: 61c4 b33d 8449 a992 e76f 855e ad5c 2b24 .a=.I...o.^.\.$+ 803a271: abb7 2831 c564 5b16 bb8a 0a76 21a4 1ae4 ..1(d..[..v..!.. 803a281: 0662 8584 5c14 e7ab 07a1 7764 ba89 3ae7 b....\....dw...: 803a291: 1909 22bd 70d7 81a9 6599 3af4 c8d5 6539 ...".p...e.:..9e 803a2a1: 1f16 58b2 4a33 8ad1 64b4 9714 25db 2aa1 ...X3J...d...%.* 803a2b1: 9d6a faec f5d9 c435 6c80 e5a3 0db4 2109 j.....5..l.....! 803a2c1: 68b3 09fb ecb9 9375 9ae5 fc0e c716 a28c .h....u......... 803a2d1: e457 ceea e2d4 ae1b 292e d63f fa90 32c4 W........)?....2 803a2e1: d222 14a9 3a27 9702 9c91 01da b477 1ada "...':......w... 803a2f1: a07c 3dbf dcf8 df70 df2c b203 728d f2ae |..=..p.,....r.. 803a301: a48b b121 03f6 b65f 0e9b 4ec8 5836 f1ae ..!..._....N6X.. 803a311: 6fc0 8427 b1d1 6b91 a5d8 33b0 3c87 8e99 .o'....k...3.<.. 803a321: 7b04 b24a 91a6 42ec 1073 5688 22d4 6ea7 .{J....Bs..V.".n 803a331: 96c9 12ad 4eb9 862c b8c1 ceae 42ca d16c .....N,......Bl. 803a341: bf2d 3a44 d628 1a26 7bfc 2c1b 5ed7 9cc0 -.D:(.&..{.,.^.. 803a351: 0cf2 36b9 7233 6170 0df1 d3a7 620e 0972 ...63rpa.....br. 803a361: 1c37 dfac 36d9 edcb 30c0 5c34 de57 f9d3 7....6...04\W... 803a371: 9776 5b2d e3ab f46a 6691 6286 e935 3573 v.-[..j..f.b5.s5 803a381: 0d99 ed3b 5c88 0e17 9aab 7642 b40a bdb9 ..;..\....Bv.... 803a391: c84b 014e 435f 6269 1ae4 ae5e 6589 5675 K.N._Cib..^..euV 803a3a1: 5be7 3273 bf08 a68b bcae bab3 b1d9 1252 .[s2..........R. 803a3b1: be2f daf2 d6ba d4a9 ae42 edba e358 00dd /.......B...X... 803a3c1: 1abb 9404 d4eb fdf1 a26d dfc1 47a6 6db7 ........m....G.m 803a3d1: 0d66 3ea4 c866 99b5 d961 cb0b 3408 ccd1 f..>f...a....4.. 803a3e1: f695 203b 48d8 3fa3 1330 9d72 44d6 91ad ..; .H.?0.r..D.. 803a3f1: 5ca5 8d23 3368 2109 35d7 5b83 a35c a1d5 .\#.h3.!.5.[\... 803a401: f787 a9a4 ff06 4b7e 0763 1a9b 9d74 8ef9 ......~Kc...t... 803a411: 915e 336b d7b9 5cba 6e97 7343 301a cd8a ^.k3...\.nCs.0.. 803a421: 58e7 35a7 aaf9 aeda ef82 723d 75d4 5645 .X.5......=r.uEV 803a431: 0b5d 64d5 1e4d de36 b40d 971f e8a7 316d ]..dM.6.......m1 803a441: b0f0 736d 9d43 6502 919f 8a91 bad8 da2e ..msC..e........ 803a451: a0d1 ae99 0588 6d72 b226 399b 9114 ab74 ......rm&..9..t. 803a461: 99ff c967 1546 07b3 eeaa 36a7 3d8a 8afb ..g.F......6.=.. 803a471: ae23 021d 229d 9727 c5b9 3809 b1f6 057b #...."'....8..{. 803a481: 0e6c d5c8 f6ff 992f 0f43 c8eb 5f22 5897 l...../.C..."_.X 803a491: 768a d9a8 5069 f977 995a 958b 0c63 a32d .v..iPw.Z...c.-. 803a4a1: 2eca b5ca e5f8 ab12 2cf7 435d 91dc 397c .........,]C..|9 803a4b1: d720 d8ad 30a0 cc75 0d7b 2f2d e73f 9db9 ....0u.{.-/?... 803a4c1: 860e c325 d387 375c cd81 4fe5 26bf 9dfa ..%...\7...O.&.. 803a4d1: 08d5 3c76 df28 7671 e553 800a 5b5c fdd8 ..v<(.qvS...\[.. 803a4e1: 4eb5 8960 0446 ef3c ee48 a4ca b698 8bf6 .N`.F.<.H....... 803a4f1: bce5 8783 ad8a c85a 9015 722b cab5 6663 ......Z...+r..cf 803a501: f703 0245 a0e9 16dd 9b18 4802 f15c f798 ..E........H\... 803a511: 8b04 015c 22b9 90d7 03dd f2ba 39ea 980c ..\..".......9.. 803a521: d970 b2f1 f9a7 8cd8 6f22 d8b9 a1c0 0b15 p......."o...... 803a531: 02b9 4572 daae ac3d bdba 3d87 3395 150d ..rE..=....=.3.. 803a541: 66c9 5206 77cd ac37 e45b 3550 c0ff dfa8 .f.R.w7.[.P5.... 803a551: b912 7202 ae45 fdb6 7373 49c3 8948 14ea ...rE...ss.IH... 803a561: 21f0 d35a 838e e2b2 5555 365e 16dd 22c1 .!Z.....UU^6..." 803a571: 400c ddae ab92 0f6e 666b f8d1 5abc 3339 .@....n.kf...Z93 803a581: f752 d551 bddc 2f9a c930 09b5 5cf9 9b02 R.Q..../0....\.. 803a591: cc59 ddb0 c128 0c22 ae40 93dd e9ab 024e Y...(.".@.....N. 803a5a1: 8ebd 507d 037a 69fd 89f7 fae1 64f4 0453 ..}Pz..i.....dS. 803a5b1: 308b b900 5376 a6ae 2203 1dc6 4068 0c8f .0..vS..."..h@.. 803a5c1: 163b 1ac6 7651 3ae6 1463 02b9 4572 d6ae ;...Qv.:c...rE.. 803a5d1: a883 3507 b55b 1034 9aa9 81b6 0625 9ec7 ...5[.4.....%... 803a5e1: 98fb 8a65 015c 22b9 b2d7 ce08 9174 d4c0 ..e.\.."....t... 803a5f1: c0f3 aa8f b125 67a1 4691 cf25 617f a913 ....%..g.F%..a.. 803a601: 5723 ae40 d5c8 7c66 badf 7668 da25 87be #W@...f|..hv%... 803a611: 3508 d819 66ed 3ae0 b48b b04c f3b6 9146 .5...f.:..L...F. 803a621: 202b e457 bf6a 6029 174d b8c0 ae62 ac40 + W.j.)`M...b.@. 803a631: 9e7e 2f9f d2e0 e5c6 166b 9969 c760 c72e ~../....k.i.`... 803a641: ae44 5c80 6b91 96d7 b6ba ee31 9d70 8760 D..\.k....1.p.`. 803a651: 5e21 e463 c80a 7f75 d5ca 3aa6 c5df b125 !^c...u....:..%. 803a661: 043e 859b 94e8 ae40 5c80 aff7 8b5c 5d92 >.....@..\..\..] 803a671: 2474 6d52 5ba2 df21 35a6 7221 e405 5c8a t$Rm.[!..5!r...\ 803a681: 3343 6834 f7e0 69b9 d25e 73c2 bbed 5ce6 C34h...i^..s...\ 803a691: 2b91 5720 6ae4 cd13 5aae 7ca5 b447 750b .+ W.j...Z.|G..u 803a6a1: 64dc c5b0 f393 2b91 5720 aae4 db2b 0ed5 .d.....+ W..+... 803a6b1: 7503 0573 12f2 a99d 74c8 59d5 dbd0 1f2f .us......t.Y../. 803a6c1: e476 c80a 0015 9000 002b 7200 0005 ae40 v.......+..r..@. 803a6d1: 0000 5c80 0001 2b90 0000 0572 0000 0ae4 ...\...+..r..... 803a6e1: 8000 015c 9000 002b 2000 0057 e400 000a ..\...+.. W..... 803a6f1: 5c80 0001 b900 0002 5720 0000 0ae4 0000 .\...... W...... 803a701: 15c8 0000 02b9 2000 0057 4000 00ae c800 ....... W..@.... 803a711: 0015 b900 0002 7200 0005 ae40 0000 15c8 .......r..@..... 803a721: 0000 2b90 0000 0572 4000 00ae fb00 ae5c ...+..r..@....\. 803a731: f63f 6685 ca79 1883 db0e 3781 001f 6b90 ?..fy......7...k 803a741: b940 75b6 9aff 3f92 cb76 ad45 89c3 d002 @..u...?v.E..... 803a751: b96d 761e eb90 0433 0917 283e 82f8 41e0 m..v..3...>(...A 803a761: 49c1 23c1 7f82 dc13 7822 e087 0d79 f5cb .I.#...."x..y... 803a771: 824d 3af3 d72c 0b97 412e 00ae 2bdb 8bd7 M..:,....A...+.. 803a781: 9905 5c85 2e9f 4cb8 9ff0 a582 2706 d704 ...\...L.....'.. 803a791: be0b 01bb 1eb9 7c10 7045 60a7 83b7 dd72 .......|Ep.`..r. 803a7a1: dc15 f821 e09a c859 6015 e4fb 103a 213c ..!...Y..`..:...\?.F.:r.[ 803aa91: 0a70 0572 2308 a4d7 9044 ac7f d621 9577 p.r..#..D...!.w. 803aaa1: eedc 6a4b 9665 c8e9 7cc1 7ae4 8543 de8c ..Kje....|.zC... 803aab1: 905d 3dd7 bfaa 4ab5 7160 e661 8980 0f5c ]..=...J`qa...\. 803aac1: f455 eab4 75c8 eea9 943f 2f5c b5c8 d95e U....u..?.\/..^. 803aad1: 55c8 1872 02b9 9184 6cab fffa 495c d4fb .Ur......l..\I.. 803aae1: 2a6b 7924 e091 92c9 0245 5967 73ce e7cd k*$y....E.gY.s.. 803aaf1: 6f5c 235b b7a2 a417 eff5 456a 9d56 df20 \o[#......jEV. . 803ab01: 996a 3d73 7055 079f ceb9 8a4b 3e6c 2ae4 j.s=Up....K.l>.* 803ab11: 0317 55dc 4d21 b95d 2fde 9088 402b 8298 ...U!M]../..+@.. 803ab21: 19d6 8782 b20b 4fbc 3df0 c31a 9658 572a .......O.=..X.*W 803ab31: ae7b b0c3 7cec c0b7 3531 35bf a12f 8583 {....|..15.5/... 803ab41: a725 0472 59e1 c59a 8fa8 6ee5 9377 5c81 %.r..Y.....nw..\ 803ab51: a9af bc99 2ba5 65d7 12e5 7b5e 26b9 c215 .....+.e..^{.&.. 803ab61: 9134 e4ab e45a 100a 5bae 6de0 9725 b7f9 4...Z....[.m%... 803ab71: c8a9 f576 cf37 7c13 f0a5 4f37 48aa 65d6 ..v.7..|..7O.H.e 803ab81: 8227 3eaa d7d7 9e0a fdcc 01ee 4795 6dd5 '..>.........G.m 803ab91: fffc 45ba eb9f 0bf7 f71e d728 52ff b091 ...E......(..R.. 803aba1: b92f 5b3e af70 b947 109e 04bc 02b9 9184 /.>[p.G......... 803abb1: 94ab 5fe8 0897 a476 7f7e 64a0 cb18 1653 ..._..v.~..d..S. 803abc1: 3809 f36c b652 eb42 8555 5909 6252 1ae7 .8l.R.B.U..YRb.. 803abd1: fe34 5717 3d68 5357 53ae 998d 26b1 9572 4..Wh=WS.S...&r. 803abe1: a1fc b947 5d5e 4b23 b953 6e4a ae45 e100 ..G.^]#KS.JnE... 803abf1: 1116 5f3c 50f0 9e41 0b8f 447e 5370 5889 ..<_.PA...~DpS.X 803ac01: f3af 87b8 a0d6 3664 f1c0 d4c2 9fa9 1036 ......d6......6. 803ac11: 4beb ab0a 74b3 0b67 4abc 2073 a9b7 1f5c .K...tg..Js ..\. 803ac21: 1157 abb1 cf5c f350 7d59 55cb 6af2 0ae4 W...\.P.Y}.U.j.. 803ac31: 6e10 d685 4b1b fa24 4988 ab2f 06c3 7f85 .n...K$..I/..... 803ac41: 46b5 324c fd7a 0379 cab1 b4bd a5fe dfd0 .FL2z.y......... 803ac51: 02fa b90d c2ca ddd3 729a e995 9b89 2715 .........r.....' 803ac61: 6f34 69f3 720f 94fd 28a6 a84f ae19 0792 4o.i.r...(O..... 803ac71: 6f34 8f73 e9e0 15c8 dc20 d7f2 28b2 cf35 4os..... ....(5. 803ac81: aabc d597 ae41 2e2f 73cc ed5d f040 0306 ....A./..s].@... 803ac91: feb1 daa0 70b4 9a59 ad6b eb96 cb61 656d .....pY.k...a.me 803aca1: f84c 0719 c6b9 929a e174 c89d 2015 5c9c L.......t.... .\ 803acb1: 134f 797c 588d 4165 85eb b701 2ed6 89db O.|y.XeA........ 803acc1: e640 cf40 28d6 fd5e c39e 044e c872 fdcb @.@..(^...N.r... 803acd1: 9206 57bc e4f5 50de 78f2 b8ab 6d5b 68bc ...W...P.x..[m.h 803ace1: d72a d453 563c 495d 213e 41b8 af71 edc1 *.S.!.Aq... 803acf1: 141e 177c 0572 3708 65b8 3250 f03e d511 ..|.r..7.eP2>... 803ad01: b58a 5013 abae b43d 978e b044 0bb7 54ae ...P..=...D....T 803ad11: 3fbf ed5f 25a5 cda3 af8f 7bc9 6f5e 87b0 .?_..%.....{^o.. 803ad21: b5d6 1186 69a8 35ce 61cf b90b 321e 408c .....i.5.a...2.@ 803ad31: 726d 2bae 43ae 00ae a761 bd62 b6cf cae5 mr.+.C..a.b..... 803ad41: ae51 be92 eec3 8faf ee18 fafe 0603 d379 Q.............y. 803ad51: dcfc 33d6 0f15 de1b 01f6 2915 caeb 54f5 ...3.......)...T 803ad61: ecd5 226f 87c8 6705 ee2a bc32 1cad 7dae ..o"...g*.2....} 803ad71: 720e 0805 5727 6339 1fe0 5c95 f0af 9e31 .r..'W9c...\..1. 803ad81: 40d0 3bae f2ea f2f9 90c2 2aea a84e f568 .@.;.......*N.h. 803ad91: ed74 fd35 dd4f a65e c629 7206 a3fd 7206 t.5.O.^.)..r...r 803ada1: 45ad 8b3e 015c cec2 7d73 bad9 81f1 c80d .E>.\...s}...... 803adb1: 3f35 fb14 9522 94df 5a83 541e fa82 5a86 5?.."....Z.T...Z 803adc1: fb06 8217 a877 012e 21b3 76d5 bfbb c3fa ....w....!.v.... 803add1: b0df 60ec a270 9800 3ff3 637f aecb 24e6 ...`p....?.c...$ 803ade1: 24ed 0000 0000 4549 444e 42ae 8260 .$....IEND.B`. 0803adef : 803adef: 722f 6c6f 2e65 736a 0000 0000 5448 5054 /role.js....HTTP 803adff: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803ae0f: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803ae1f: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803ae2f: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803ae3f: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803ae4f: 6e65 2d74 654c 676e 6874 203a 3332 3934 ent-Length: 2349 803ae5f: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803ae6f: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803ae7f: 3a65 6120 7070 696c 6163 6974 6e6f 782f e: application/x 803ae8f: 6a2d 7661 7361 7263 7069 0d74 430a 6e6f -javascript..Con 803ae9f: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803aeaf: 697a 0d70 430a 6361 6568 432d 6e6f 7274 zip..Cache-Contr 803aebf: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803aecf: 612d 6567 383d 3436 3030 0a0d 0a0d 8b1f -age=86400...... 803aedf: 0008 0000 0000 0a04 58b5 8eef c6db 7f11 .........X...... 803aeef: de15 b8c6 2d23 2d1e a939 8b0b 13c7 677c ....#-.-9.....|g 803aeff: 7637 b3e0 9c83 a68a 1838 72c6 2577 47d1 7v......8..rw%.G 803af0f: 5971 a972 7ab3 a027 d035 2d4f b410 8a9f qYr..z'.5.O-.... 803af1f: 687e 37d0 8b48 0818 26d0 a0cf a37b 76fe ~h.7H....&..{..v 803af2f: 8a49 ce94 8db2 8502 44ed 9ddc 9d99 3f9d I........D.....? 803af3f: 99bf 51d9 3091 c915 62c4 a099 9c4a e116 ...Q.0...b..J... 803af4f: 3a33 c68b af54 ced9 8ce5 1666 b80d c564 3:..T.....f...d. 803af5f: 2454 2bca 1e89 42c5 d97f 4784 e233 d4f8 T$.+...B...G3... 803af6f: 3163 f3cd 7467 022a 1792 4261 c467 8cd7 c1..gt*...aBg... 803af7f: 56e1 22c6 5f06 e6d8 9303 7f85 cd21 35f6 .V."._......!..5 803af8f: 4bbf 9a3d 22a6 c7e1 2893 76e6 18e8 2c81 .K=.."...(.v..., 803af9f: db38 4aa6 111c 7dc7 e6df 9f0b 759d 785f 8..J...}.....u_x 803afaf: 9251 ec88 f0f1 69e4 77b0 ad40 2649 0146 Q......i.w@.I&F. 803afbf: 4499 92b9 dcd9 a89b 4c69 970e 58ff b4fe .D......iL...X.. 803afcf: e7fc 1ff5 dfaf 7f2c feb8 5ac6 0dfe 3f9f ......,....Z...? 803afdf: bf5e feb9 fe1d 6fff 79fc 5f8b 1ddf a1dc ^......o.y._.... 803afef: 7b87 3b2e bdeb 625b e691 6f2f bd4a 3dfe .{.;..[b../oJ..= 803afff: fe64 fd74 f2cd e5c7 cb0f d6b7 aff2 3fcb d.t............? 803b00f: bf2f 252d 3b91 e46b 7041 2511 5e5c b178 /.-%.;k.Ap.%\^x. 803b01f: c664 5e15 d54a 8124 0785 16e6 832d b853 d..^J.$.....-.S. 803b02f: 266f 9f48 b9dc e871 2976 bbbb d1b6 a6fd o&H...q.v)...... 803b03f: c71c d70d af2c bb8f d6b9 dac3 bb2d f672 ....,.......-.r. 803b04f: 3888 2c6b 59d4 ea8c baa8 5365 32e7 aa13 .8k,.Y....eS.2.. 803b05f: 12c8 e56b b19d 5550 1d08 9fcd 5070 f434 ..k...PU....pP4. 803b06f: 170c 8f3e 4892 3e69 0b16 3d9a 9449 66c8 ..>..Hi>...=I..f 803b07f: b634 3455 b215 8e50 0acb 6bb8 ac7a 4129 4.U4..P....kz.)A 803b08f: 56e5 41eb d42e b68a e245 c4f6 ada7 6203 .V.A....E......b 803b09f: 7e39 285e 7644 54a5 292c faff e9e4 c943 9~^(Dv.T,)....C. 803b0af: 826c 1c3d b1e0 3471 9d20 1813 cbdc bc28 l.=...q4 .....(. 803b0bf: b530 971d fe7c 4868 fadc 605a 22e7 4a16 0...|.hH..Z`.".J 803b0cf: 4b1c 1e79 9b09 3264 3a16 d6fe 2316 a58e .Ky...d2.:...#.. 803b0df: 3f4d 1196 0777 4547 1949 0b70 ddc7 35e9 M?..w.GEI.p....5 803b0ef: 6816 4429 d0dd 2e65 b32f f850 0ea2 e80a .h)D..e./.P..... 803b0ff: 58fb f4a9 f12b 429b 6ae4 8890 6b0b a97d .X..+..B.j...k}. 803b10f: 97af 93aa 981f f8f8 79fa 4af8 a430 49ec .........y.J0..I 803b11f: 32c4 cb99 f291 cb34 f870 7425 9e14 aa44 .2....4.p.%t..D. 803b12f: a1d9 dd4b ae9d 84fe 2b29 8fe1 e505 b322 ..K.....)+....". 803b13f: b1c9 1b84 b512 9c3f 82a7 04b8 19b9 6547 ......?.......Ge 803b14f: de64 9579 04cb acd9 7e13 43e4 0254 e120 d.y......~.CT. . 803b15f: 5cf3 4d01 84d8 6326 b411 f6cc 1059 cf08 .\.M..&c....Y... 803b16f: 9c10 026a e1c4 0b08 b89a ddc8 ddbb 106e ..j...........n. 803b17f: 068c 7a76 9fc1 c7e4 cb32 b1a0 cf21 9953 ..vz....2...!.S. 803b18f: 62e4 5e28 972b c2d4 1048 2828 4723 db16 .b(^+...H.((#G.. 803b19f: 65dd 003a b9e3 1c2d cfa7 0b40 2077 c675 .e:...-...@.w u. 803b1af: 7936 6594 2332 b38e b730 b84a 5bcd 40b1 6y.e2#..0.J..[.@ 803b1bf: 3f39 9995 b509 cc91 0dec 6ac8 34a2 9a3f 9?.........j.4?. 803b1cf: d71f 8708 07a0 0d0b bf8d d059 d9f5 e841 ..........Y...A. 803b1df: 22c5 ab19 cf89 1d3a 3c27 2f63 083c 347e ."....:.'.W.>.?....4 803b34f: 4016 a465 ad3c e5bd e8a1 32a4 9db5 2e01 .@e.<......2.... 803b35f: 2031 fc7d 9777 bcf8 b244 ad12 8745 84bc 1 }.w...D...E... 803b36f: ecbd d8da 634e 8361 2073 2f7e e956 a340 ....Nca.s ~/V.@. 803b37f: f0ae 5981 1d7c d0b3 ad11 1661 d81d d022 ...Y|.....a...". 803b38f: 4126 ce99 6172 f26b b306 3e50 604b ae42 &A..rak...P>K`B. 803b39f: 8802 8ac0 06be ab8e cc91 1362 cec1 499f ..........b....I 803b3af: 8d15 a8e6 442c 8565 55c0 a09b 8927 0850 ....,De..U..'.P. 803b3bf: 0513 e77f 4b2f 454c 1969 c818 597b a06f ..../KLEi...{Yo. 803b3cf: 41b3 3b8e 8dfd 1455 2854 0284 5bd6 c917 .A.;..U.T(...[.. 803b3df: 2cc5 6262 945f 38f8 3f28 9a5f 5acf dad2 .,bb_..8(?_..Z.. 803b3ef: 255a 51a7 ea1a 497d 3a33 51d5 5ce0 6056 Z%.Q..}I3:.Q.\V` 803b3ff: 5f84 461a 6eac 4abf ea94 da2e c96f 3534 ._.F.n.J....o.45 803b40f: 6318 def5 39b1 cbcd bbbd f737 94c4 f146 .c...9....7...F. 803b41f: 39a2 0b98 4d16 3c69 4794 4251 b9b3 c006 .9...Mi<.GQB.... 803b42f: 30f2 1e9b 221e 90c5 551e dc6e d96d 3438 .0..."...Un.m.84 803b43f: 43c4 b0f9 6ee4 2cb8 32e3 0e74 48b8 819b .C...n.,.2t..H.. 803b44f: fa85 bd04 4b8a 50e9 8160 666e e33c c12c .....K.P`.nf<.,. 803b45f: bd07 d77e 30af 1d82 841c 7e8d cb34 dce8 ..~..0.....~4... 803b46f: 9ef0 5cd0 2877 3b86 6a0c 8481 5d85 a1d2 ...\w(.;.j...].. 803b47f: 2a2e 6b2d f62f 62f4 a9cf 6e85 bc2a ed79 .*-k/..b...n*.y. 803b48f: 8af0 9a21 3156 c264 2aa7 47c9 75f2 b6a9 ..!.V1d..*.G.u.. 803b49f: d941 6008 9ae4 325f a5d5 0f23 41c2 bfd8 A..`.._2..#..A.. 803b4af: b85c 2a64 9cf2 058e 1289 bdab 757f b765 \.d*.........ue. 803b4bf: bd3f 2c8a 1b20 f467 c7ad 8e22 f5a5 992b ?.., .g..."...+. 803b4cf: 7cc5 2507 848b 2663 d463 0fdb ac08 02c8 .|.%..c&c....... 803b4df: 49f2 7bb7 feff 7bbd 559a b8a1 147f 8af3 .I.{...{.U...... 803b4ef: ec10 11a3 4f7a e497 7913 a1f1 3533 a04d ....zO...y..35M. 803b4ff: 1bbb 6452 87f1 4188 ec12 9cf4 2b45 cb05 ..Rd...A....E+.. 803b50f: ef0e aaea a4b5 bbfb 2bab eed2 b6e5 dc77 .........+....w. 803b51f: ea30 5b87 c741 a07d c783 334b a4a9 6eee 0..[A.}...K3...n 803b52f: 8a90 bc5c 3e7e f702 9d96 8ea0 d280 61e3 ..\.~>.........a 803b53f: 5e10 755d 9557 6aaf ea22 e4fe f430 4b9d .^]uW..j"...0..K 803b54f: 38d4 deed 10b3 ae65 73a9 dfa1 84e9 7955 .8....e..s....Uy 803b55f: efdb ca2d ae7e ad6a 1ddb 7377 739e 1f59 ..-.~.j...ws.sY. 803b56f: d16d 9d26 5eec 90f7 480e 0317 7109 b43a m.&..^...H...q:. 803b57f: d009 4310 dd5c 5374 d43b ac58 a02b 38ed ...C\.tS;.X.+..8 803b58f: e21d f421 a5cb f413 1399 e9db caf4 4355 ..!...........UC 803b59f: 8bf6 8e22 8d7f 0049 c4cb 515a 963e 9645 .."...I...ZQ>.E. 803b5af: ee1b 6afe 24ed d04a 6d42 9eae b40a 5c84 ...j.$J.Bm.....\ 803b5bf: 2eaf 1e4c 19d7 ab56 a75f 7728 5045 0ad7 ..L...V._.(wEP.. 803b5cf: a29f 5d35 4b95 dae8 581e cdd0 f661 e508 ..5].K...X..a... 803b5df: d46b 5ca0 d1cd ca6b b294 cd48 a003 0a2c k..\..k...H...,. 803b5ef: 2d76 a804 d06f 2cbe a8eb b7e6 ac1b 3a71 v-..o..,......q: 803b5ff: c4f7 b767 5d79 7e92 132b 7cf1 0234 4398 ..g.y].~+..|4..C 803b60f: e04d d882 68e7 5bc4 f692 6b59 ddbc cfae M....h.[..Yk.... 803b61f: 6a47 4cdd a6c1 2d34 b616 57e3 29e1 3d13 Gj.L..4-...W.).= 803b62f: b481 8cdd 5980 f20b ed9d be51 0bbb 63cf .....Y....Q....c 803b63f: 95bf b425 1350 e034 0406 2f5b 9b09 d057 ..%.P.4...[/..W. 803b64f: 3f43 e50a 17d6 3303 b3df dbad cd14 f31b C?.....3........ 803b65f: e1ca 15ea d19d 659c aa51 33fa 7119 ebbb .......eQ..3.q.. 803b66f: c4f8 ad65 9fc9 ff2c f182 0ffe e798 b7bf ..e...,......... 803b67f: d26c 2969 e85b 1b11 4b71 cd1c 1321 b6d3 l.i)[...qK..!... 803b68f: 99a3 33d6 0623 4063 3569 1224 b57c e786 ...3#.c@i5$.|... 803b69f: 7272 8bd4 bf28 57ab b80b f36c 6319 70b1 rr..(..W..l..c.p 803b6af: 5037 2d74 23d9 61b5 9df8 255b 4716 d9dc 7Pt-.#.a..[%.G.. 803b6bf: 5ddd 6543 680d ac37 e5ba 067d 1b7a 88de .]Ce.h7...}.z... 803b6cf: a143 da96 e989 f639 2475 a363 e50c b290 C.....9.u$c..... 803b6df: 71f3 0b26 bd3c 2c68 192f caab 55e1 bdc8 .q&.<.h,/....U.. 803b6ef: 3622 bd88 b24e 67c2 b8d3 776d 5a68 dbb6 "6..N..g..mwhZ.. 803b6ff: a7a1 aa19 72f1 525d 7755 d86e ad70 7998 .....r]RUwn.p..y 803b70f: eac0 3eba f2af c375 980c 94ab 9919 fb58 ...>..u.......X. 803b71f: a1f2 2c4a dbfc 7ae7 cd46 a3f6 2664 2532 ..J,...zF...d&2% 803b72f: 76b8 5b7c b225 56fc 0a07 6e5e 65fe 7e9e .v|[%..V..^n.e.~ 803b73f: c7be d0ab eb9b 693f 6432 6b6b a9c6 05a2 ......?i2dkk.... 803b74f: 71d3 846b 23df 359d 41af 0edb 73d9 f0f7 .qk..#.5.A...s.. 803b75f: b09c 5ae7 ca45 8101 6a29 83b0 5fe0 158f ...ZE...)j..._.. 803b76f: 2ce6 a42a ba06 ba98 31ed 309a 1f11 db99 .,*......1.0.... 803b77f: 7794 70c6 e5b0 6e69 6775 aefe 5f3b 2cd0 .w.p..inug..;_., 803b78f: 3741 bad9 6eb4 3568 4d92 8669 8997 62a7 A7...nh5.Mi....b 803b79f: 02a4 b3f2 7114 37c1 f1ac 5877 3fe2 b7cb .....q.7..wX.?.. 803b7af: c378 4efa fe6f 360f af28 cbf1 b68f 4604 x..No..6(......F 803b7bf: d5f6 432d e7c9 e4c8 ae1c 123a ef98 ca04 ..-C......:..... 803b7cf: fade d326 860f 24cf b917 b979 e11a e2fd ..&....$..y..... 803b7df: 6249 6937 bce4 0537 9b4d 91bb 2d83 0ade Ib7i..7.M....-.. 803b7ef: 9ac5 7f15 f0fd 4c4c 4ce5 6f94 7896 5ad6 ......LL.L.o.x.Z 803b7ff: fff8 8b05 d809 5f38 0015 0000 a800 ......8_..... 0803b80c : 803b80c: 13a8 0804 cad2 0803 cade 0803 2925 0000 ............%).. 803b81c: 0001 0000 .... 0803b820 : 803b820: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803b830: 0000 0000 .... 0803b834 : 803b834: 4388 0804 95e1 0803 95ed 0803 1802 0000 .C.............. 803b844: 0001 0000 .... 0803b848 : 803b848: 4374 0804 f403 0803 f40f 0803 04e3 0000 tC.............. 803b858: 0001 0000 .... 0803b85c : 803b85c: bbef 00bf .... 0803b860 : 803b860: 732f 7465 6974 676e 2e73 7468 6c6d 0000 /settings.html.. 803b870: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803b880: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803b890: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803b8a0: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803b8b0: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803b8c0: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803b8d0: 3534 3433 0a0d 6f43 6e6e 6365 6974 6e6f 4534..Connection 803b8e0: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803b8f0: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 803b900: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 803b910: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 803b920: 0000 0000 0a04 5bdd 736b d51b fe19 cb2b .......[ks....+. 803b930: 3286 d8f2 2d92 205f 9638 343a 9949 14cc .2...-_ 8.:4I... 803b940: 10f0 e053 6793 ad2d 25ad aed2 5dd8 49d9 ..S..g-..%...].I 803b950: 6619 8172 8742 4214 9680 10a1 bd08 a17e .fr.B..B......~. 803b960: 2435 e701 fe66 eac2 f51f de79 f673 6926 5$..f.....y.s.&i 803b970: 2565 fa71 1fa1 ef64 9ced 9cf3 fef7 e7be e%q...d......... 803b980: 959c 4e27 74bc ed7c d5f5 4693 ec2b ebb4 ..'N.t|....F+... 803b990: fc2b b46b 772d 66ab b89a adb3 7d66 63a5 +.k.-w.f....f}.c 803b9a0: 9687 68d1 7e59 8760 b335 6e17 8f96 9de2 ...hY~`.5..n.... 803b9b0: 6d3c 6185 6cb7 d9bf b673 e66b e56b 9e57 ..nGw...Y.f.. 803ba30: 67b8 968c 6f6f ccd6 e58e 95b8 1046 8698 .g..oo......F... 803ba40: b76f 666b 9e10 db6b cb41 43b6 13f4 7c34 o.kf..k.A..C..4| 803ba50: 1ba7 e11a 2eb9 86c0 d9f6 f670 6b0d 52db ..........p..k.R 803ba60: 4d4f f023 351b f7d3 76da 8de5 1f00 aacf OM#..5...v...... 803ba70: b8e7 2450 f0db e79a 2bea 674d 70db 359a ..P$.....+Mg.p.5 803ba80: e1b3 dcf5 bcb0 5be3 7c5d 7b9a f4d8 5c76 .......[]|.{..v\ 803ba90: eb3c a3d6 802f bef3 7bc6 ba37 dd1b 9fea <.../....{7..... 803baa0: a237 fbef a297 b89b 68bc 3f44 49f3 2b74 7........hD?.It+ 803bab0: 29fa 8dda f46e e3cf 8fc5 bbb8 f46f 8bdf .)..n.......o... 803bac0: 185f 412b 72d7 0333 bdba 86ce 9bed 25f5 _.+A.r3........% 803bad0: c3c0 ba9b bfd1 2680 d077 7ef4 b374 32b2 .......&w..~t..2 803bae0: 05db a05c 40c9 816a f6f1 15aa 3b04 df9e ..\..@j......;.. 803baf0: ae04 cf4d 18ef 2356 3c74 f217 8060 2de5 ..M...V#t<..`..- 803bb00: f30f 7ae9 2901 d404 a3d7 447b ed11 e012 ...z.)....{D.... 803bb10: 10ae 6efb 23ff 3d43 a1f9 2eff 7526 88d3 ...n.#C=....&u.. 803bb20: e07e 7bc8 0764 be3e bfd7 6064 f852 596c ~..{d.>...d`R.lY 803bb30: 0420 db76 846e 1286 b68a e5b7 ebb8 36bc .v.n..........6 803bb40: 44d5 8872 015e 21b3 6d2e ac00 c499 a656 .Dr.^..!.m....V. 803bb50: 8188 000b 75e3 d289 b6d8 3dda cbf0 47ac .....u.....=...G 803bb60: fb57 441f 0bdf f66d 2e38 ee01 d463 a0cb W..D..m.8...c... 803bb70: 7ee0 03f4 12c0 500c ccac a6aa 5d83 b250 .~.....P.....]P. 803bb80: 3acc 16ff 617d 3b35 b80e ff27 6fd2 d566 .:..}a5;..'..of. 803bb90: ea84 1b2b fabe 6e39 17b7 6cca 76bc bbb3 ..+...9n...l.v.. 803bba0: 34d3 4cb5 6375 8f3a 919c 6dd1 0d5b 85bb .4.Luc:....m[... 803bbb0: b626 335f 6fa3 e715 7ffa f688 dba2 6259 &._3.o........Yb 803bbc0: 4e5f 2208 83b4 3a64 03bf e601 c0e7 eb2e _N."..d:........ 803bbd0: db6c b776 52a0 f566 5369 9853 3018 2830 l.v..Rf.iSS..00( 803bbe0: 8c36 85cf 3e46 be24 48af 5054 91fc 71b0 6...F>$..HTP...q 803bbf0: f1fc 7cd8 6bbb 305b 4a19 1f2b 8288 0b5f ...|.k[0.J+..._. 803bc00: 8bc2 3ed1 14a4 d112 4cbf 3d29 d03c 2b2f ...>.....L)=<./+ 803bc10: 8364 5564 3740 617a b9e8 a45a 5edb 9760 d.dU@7za..Z..^`. 803bc20: bd09 9b0c 7d0a 184b 11b8 06ba e57e 9f26 .....}K.....~.&. 803bc30: 65fa ddc7 fdb6 86d0 68bc 8ea1 41ae b566 .e.......h...Af. 803bc40: 99be 6375 0945 1a96 e821 746d da1c a552 ..ucE...!.mt..R. 803bc50: 711c 4157 d1af 31b0 da52 e797 da36 e34e .qWA...1R...6.N. 803bc60: 8c0c 1d97 7cf6 7617 6edd 399c d4ae d5ec .....|.v.n.9.... 803bc70: a513 99a9 aa27 01f9 067f 76bd 30a1 3342 ....'......v.0B3 803bc80: cd88 152c b62f a91c d0fd bb03 f6d6 e586 ..,./........... 803bc90: d643 aff8 b4dc ad37 9b5e 2dca 9bb7 59ce C.....7.^..-...Y 803bca0: 59bb bd0e 0cd8 dae6 6994 a939 b472 f590 .Y.......i9.r... 803bcb0: 4b15 689b 6dc7 67da 742b c94b 20e4 1ee8 .K.h.m.g+tK.. .. 803bcc0: 5881 1479 8b71 8a23 1dce eddb 1d95 0818 .Xy.q.#......... 803bcd0: 69fd 1daf 0713 6268 b844 5f54 a2f3 d70e .i....hbD.T_.... 803bce0: 7230 7ae0 b5f4 b718 525d 369f ffba 1a81 0r.z....]R.6.... 803bcf0: df9d db67 41c0 8e86 15bb f1e4 80d2 c36e ..g..A........n. 803bd00: 8dfb 49f2 c39c 2f60 bb8e a9e9 ea1e e7d1 ...I..`/........ 803bd10: 0a70 88ef decc 8403 83df 300b a358 b51a p..........0X... 803bd20: 209c fcf4 7173 3fbb 2ff5 6f81 cc30 ddd1 . ..sq.?./.o0... 803bd30: fbf4 1ed9 fc3c cb10 97e8 34ba caac 8955 ....<......4..U. 803bd40: 06cf 5a2d 91d5 f180 0578 e4a4 10b7 a74b ..-Z....x.....K. 803bd50: 6709 b9ef 0de5 2cef ccc9 c5fe f067 2f35 .g.....,....g.5/ 803bd60: 4b20 fbb1 6848 d8d3 5272 b257 d2fa 35e9 K..Hh..rRW....5 803bd70: 8cb4 629d 6d68 3be0 d2b4 a1a2 d5ee 3207 ...bhm.;.......2 803bd80: fa6e 1c1c 15a3 92cb 48ff 76e0 a9ba 2812 n........H.v...( 803bd90: afba 1b59 fd66 8bf4 ac2f 74a6 b5c8 5c71 ..Y.f.../..t..q\ 803bda0: 07af 166f 075d dec5 7585 a785 03b8 00bb ..o.]....u...... 803bdb0: 0c5f dde2 b701 780b c47d c3b5 b61d 48a3 _......x}......H 803bdc0: 3ac0 fad3 9789 1ba1 503c 8e52 afc0 cc30 .:........0...U.?. 803be80: c2f2 9084 1e17 641f 1840 bc80 1630 e2f2 .......d@...0... 803be90: 9084 1f17 641f 1840 bc80 1638 d2f2 9084 .....d@...8..... 803bea0: b211 2e3f 0649 0184 4bc8 e409 df21 2430 ..?.I....K..!.0$ 803beb0: 59be f4f5 b0e1 1bd7 a75e 43d3 7692 78ae .Y......^..C.v.x 803bec0: 2f66 3be3 8903 faa1 d0ee 3667 4308 6ecd f/.;......g6.C.n 803bed0: 69f0 1836 274e d19c 1d84 09df 49ed f3a6 .i6.N'.......I.. 803bee0: 3f2a 8c7c 19f3 a202 3426 78f4 8cf4 0b14 *?|.....&4.x.... 803bef0: 7fb3 df63 1caa 6c5d b5c3 078d 8beb fb0d ..c...]l........ 803bf00: 9f58 5878 bef6 18b5 4a43 6d84 fb5e e882 X.xX....CJ.m^... 803bf10: 6653 708d 70c2 f061 f77b 8795 69d5 fd25 Sf.p.pa.{....i%. 803bf20: 6b72 f911 333e b8ff b90b 9cc1 9542 8786 rk..>3......B... 803bf30: c148 56c2 5c92 872b 428e 4b40 463d 82d2 H..V.\+..B@K=F.. 803bf40: 11ae 4958 c85e e06c 3316 7dd5 54c9 fbf7 ..XI^.l..3.}.T.. 803bf50: 211f 427e a03c 9fbe 5f65 2968 9115 e550 .!~B<...e_h)..P. 803bf60: d2f7 b37d b70e a213 c24c 2e5f 6d99 083a ..}.....L._..m:. 803bf70: e864 e55d bb42 9cc5 198f 39cc bf51 be88 d.].B......9Q... 803bf80: 1c01 a8a6 10f7 dc86 4c47 3172 2d4d 39f3 ........GLr1M-.9 803bf90: 156e ff1f 2259 a18d 930f 541c 6980 0ae8 n...Y".....T.i.. 803bfa0: acf3 2890 04f6 de19 d427 3c4f 38f1 7cce ...(....'.O<.8.| 803bfb0: e4c3 bf19 29db 3e57 e950 21fe e5f0 cd73 .....)W>P..!..s. 803bfc0: f780 0184 1e77 019a a7be 2019 9317 8030 ....w...... ..0. 803bfd0: fd34 3202 92c1 9ec1 5694 7e20 b408 d250 4..2.....V ~..P. 803bfe0: 0e60 d0c4 224e d1f0 0325 5878 f8c4 b12c `...N"..%.xX..,. 803bff0: 6c3c 700f 0c78 8d55 27d3 52d7 8fb6 a6e0 N..!.7!....D 803c070: 99b8 d058 e616 1f24 5355 871d 1228 fc67 ..X...$.US..(.g. 803c080: d3a5 9ab5 644d 5a8d 12ba b1f8 c8f9 808f ....Md.Z........ 803c090: 93a1 ac6a 3768 2994 3be9 8e4b 0a98 3771 ..j.h7.).;K...q7 803c0a0: e9b9 101f c7ad 9490 d4c3 b177 cba9 df40 ..........w...@. 803c0b0: 99da f618 a0fb 87da b5cc 1d0e 412c a028 ............,A(. 803c0c0: 1ab8 b201 0563 8a67 4661 825f 6253 549b ....c.g.aF_.Sb.T 803c0d0: f361 6e26 23e8 8653 161d 1551 850e ae54 a.&n.#S...Q...T. 803c0e0: ac63 a559 d753 521c 49b2 db9d b2c6 5931 c.Y.S..R.I....1Y 803c0f0: 01ac 49fc 8c1a 469e 2604 960f 324c 1879 ...I...F.&..L2y. 803c100: c2e7 c0ae b3b2 8e18 3482 c0eb 7f94 d000 .........4...... 803c110: c641 a2f7 b408 b7f7 5348 1a06 88aa 4ba7 A.......HS.....K 803c120: 718f 4f45 7f4b 6f5c 05d3 d32f ca48 1b6c .qEOK.\o../.H.l. 803c130: b856 0766 e961 cdad db9e 7e58 cdea 179e V.f.a.....X~.... 803c140: 431e a6a5 aeab 86de a272 c7ac f8ca 2aae .C......r......* 803c150: d247 18dd 85b8 f25a cae1 1aac e509 c3be G.....Z......... 803c160: bf1b 04e9 ce5c b2d9 2033 4918 4cfc 8d2d ....\...3 .I.L-. 803c170: 64ee 6786 7ea5 00df 1015 a093 f5ec 6e11 .d.g.~.........n 803c180: 0f1f d0a4 68e9 3334 5cbc b27e b0a4 a085 .....h43.\~..... 803c190: 7add 72fa 22aa 50b5 db21 c468 c109 99b2 .z.r.".P!.h..... 803c1a0: 18ca 4a3d 23ea 59d9 6097 f708 fba2 8753 ..=J.#.Y.`....S. 803c1b0: f4aa 8aba cd5b e657 9851 caa7 f324 4c4c ....[.W.Q...$.LL 803c1c0: aa41 2352 ec2d d241 623d e93d c421 d098 A.R#-.A.=b=.!... 803c1d0: 4794 5759 f995 f468 4f8a f542 1407 f653 .GYW..h..OB...S. 803c1e0: f58f b2be 6f6f 1e78 55cb 8b5f c815 732e ....oox..U_....s 803c1f0: 44fd 788d fed4 5d7b 2a14 6c59 86bb 2135 .D.x..{].*Yl..5! 803c200: fb29 f44b f12a 9d3d b5e3 8064 fae1 de68 ).K.*.=...d...h. 803c210: 1db3 7744 3bac f5ea 0d39 e1fc c74d ab2b ..Dw.;..9...M.+. 803c220: 57a7 1dbd 7fdb 7369 6733 143e 32b1 9bba .W....is3g>..2.. 803c230: 1759 6030 2ec4 6282 5af0 5f0c 4019 f4b3 Y.0`...b.Z._.@.. 803c240: 88f7 a446 8908 b9b7 60a9 58cc a19b 27ed ..F......`.X...' 803c250: db5a 06eb 6f5d 9e5d f7a9 bd59 da25 a018 Z...]o]...Y.%... 803c260: 2304 bc09 5509 7756 c950 7dae effe 3635 .#...UVwP..}..56 803c270: c733 9d01 3acd d8c6 ea25 ee12 7903 91c4 3....:..%....y.. 803c280: ded5 eb31 8798 34e1 2459 e31c 5f34 ee7e ..1....4Y$..4_~. 803c290: a9c4 4e57 42cb 38b2 b86b 656c 3855 d8cf ..WN.B.8k.leU8.. 803c2a0: 3d4e 4452 07eb b6eb 94cb eb1e b45e d90e N=RD........^... 803c2b0: 34fb 05ba 9d39 905e 6f89 0eaf 548a d851 .4..9.^..o...TQ. 803c2c0: fe8a 7a58 2ccf e724 9bf5 1c39 fa4b a6ba ..Xz.,$...9.K... 803c2d0: a87c 401e 27cf 5f1e 54c5 a029 b038 44ca |..@.'._.T).8..D 803c2e0: 78aa f7a9 a848 bd75 ac61 ec08 98e1 2451 .x..H.u.a.....Q$ 803c2f0: 13d0 32ce 51e2 e962 e464 a504 9202 3aa9 ...2.Qb.d......: 803c300: 2c8d b1a3 d71d 6390 1861 a0c4 d297 2964 .,.....ca.....d) 803c310: c1fe 1f41 e2b0 09ab 002c dc52 3380 b49a ..A.....,.R..3.. 803c320: ec67 5531 d94b 7191 6b13 5c20 7d40 485c g.1UK..q.k \@}\H 803c330: 4105 9482 3177 03d2 ffdc 7a01 6a3a c93b .A..w1.....z:j;. 803c340: 2b21 b06a f563 96c2 d252 3af8 5055 2bbe !+j.c...R..:UP.+ 803c350: cf56 e124 9a84 25ed 592b 261f ce54 d05a V.$....%+Y.&T.Z. 803c360: 75ec 4d6c 6d65 162b 89b1 8bb2 0ebf d8c5 .ulMem+......... 803c370: 650c bab9 4467 067b d596 e818 b5ab 8475 .e..gD{.......u. 803c380: 87fb 4965 9a33 0bdc 631b e294 929f 71cd ..eI3....c.....q 803c390: 0a5f 2b76 8989 4247 e582 49c0 5a94 1cd7 _.v+..GB...I.Z.. 803c3a0: c2b5 eae5 3a8b 94c1 a9b1 bc1b ac18 9639 .....:........9. 803c3b0: f3ab d415 4b1d bfcf 66b0 7ae0 6e79 ca6e .....K...f.zynn. 803c3c0: be88 ca93 571b 58d5 b815 6333 a040 b190 .....W.X..3c@... 803c3d0: 6683 e23f 2eaf a5fc aa15 617c 5cb2 66ad .f?.......|a.\.f 803c3e0: ac7a 1eaa c925 9501 4731 c903 1eeb 0f6a z...%...1G....j. 803c3f0: fa97 8c7f a36e ebeb f2e8 5e1e ca20 5d1b ....n......^ ..] 803c400: 2b57 e757 1d32 a9ce 3f0e 2b41 ba42 fccd W+W.2....?A+B... 803c410: a0ac b3dd b369 5567 2bab ea92 e249 d85c ....i.gU.+..I.\. 803c420: 68ea eada 6aa8 2df5 28a2 65ee 2902 2620 .h...j.-.(.e.) & 803c430: d4c8 2698 0ee1 bdeb 725a 2150 612c ff22 ...&....ZrP!,a". 803c440: ae8a 3c88 c17d f08f 8c83 8921 4028 4cf7 ...<}.....!.(@.L 803c450: ce3a f133 249c 7d05 9ee4 4e9f 7e7b f55a :.3..$.}...N{~Z. 803c460: 0ffc 82c6 badc 5000 04dc 8aa5 13dd 07a0 .......P........ 803c470: be7f 1884 6570 331c 9c2e 52cb e23a 1a92 ....pe.3...R:... 803c480: 6af1 4752 1967 4277 615a 8fb4 edf1 890d .jRGg.wBZa...... 803c490: 7762 f771 8c17 a28b e154 8bb8 b8e9 6a8b bwq.....T......j 803c4a0: 2bdc d910 c2bb 6ca3 7709 fc68 872c 0e30 .+.....l.wh.,.0. 803c4b0: 856e c836 fa35 6417 dddc b8b2 282a 0161 n.6.5..d....*(a. 803c4c0: 16fb 702a 4a80 166d 1796 35a8 f55f 232f ..*p.Jm....5_./# 803c4d0: 7eec 5d07 16c8 9d3b dc62 d31c a243 0b78 .~.]..;.b...C.x. 803c4e0: fc0a 02c7 27e2 fa4c 032e 9277 d443 0404 .....'L...w.C... 803c4f0: 5fec 6328 fffd 3e36 6940 2f00 853e 522a ._(c..6>@i./>.*R 803c500: a05a 9892 0cb1 3859 4650 b5c3 5f82 3f67 Z.....Y8PF..._g? 803c510: 8b68 972c 41dc 05d7 0364 0a2b cdbb b9aa h.,..A..d.+..... 803c520: 3e26 2e97 8f10 3d50 2b64 6005 d48b b4d1 &>....P=d+.`.... 803c530: 9f91 7bb9 eb03 6a17 8119 8202 2091 fd6b ...{...j..... k. 803c540: d00f 90b8 89df 001d 25b5 17ff 831d b1a6 .........%...... 803c550: ff42 8899 3ef3 2277 070a 89b1 3303 5fc4 B....>w".....3._ 803c560: e3b9 43fe 8cf4 4ffc 213d d5c7 48bd 000b ...C...O=!...H.. 803c570: 8e17 ce9a 5a73 335b 09f0 669c dc87 7843 ....sZ[3...f..Cx 803c580: 0319 df30 1ec6 0c4d 0379 dc83 15e0 a29e ..0...M.y....... 803c590: 274a 5645 3b98 a9dc 445d d17b 458f 4d14 J'EV.;..]D{..E.M 803c5a0: 34f9 f9ad 05f4 18c9 20fd d003 92f0 fc5f .4....... ...._. 803c5b0: 0b61 bb28 f3c6 437f 340e ae01 dff4 63c1 a.(....C.4.....c 803c5c0: 6a2a 54e1 1216 997d 22d6 25f7 8279 8a26 *j.T..}..".%y.&. 803c5d0: b43f f7c5 edb9 d285 eb4f 48cf db18 f150 ?.......O..H..P. 803c5e0: 06f7 fb06 e658 ab06 4326 d77f 5f3f be8e ....X...&C..?_.. 803c5f0: a0a1 8546 9e42 096a 1406 e12d 4656 07d0 ..F.B.j...-.VF.. 803c600: 623d 22a8 a44a 3d7a 18bd 168b 9460 f621 =b."J.z=....`.!. 803c610: e164 b01e a97c 55aa e360 dc45 867d 40fe d...|..U`.E.}..@ 803c620: f628 71a9 b6a2 ab87 f96f 68b5 b613 16a0 (..q....o..h.... 803c630: 168f 32ab 1346 9090 d90e 8b7d 53dd d5a3 ...2F.....}..S.. 803c640: 353f d378 e0da 467d 6bba 918a 2945 b0d5 ?5x...}F.k..E).. 803c650: 059e 7404 c472 68ae 0187 0148 e416 e505 ...tr..h..H..... 803c660: ff6e b47d 2317 3c5d 8264 4972 a4a1 bcad n.}..#]...dD..S.... 803c720: 9090 d242 9b3c 1fb8 230c 7b32 d605 8c8e ..B.<....#2{.... 803c730: 45dd 50e7 7451 7a04 0ba3 ddec 562c 4cb4 .E.PQt.z....,V.L 803c740: 3568 d55d d5a1 e955 ce84 f101 04a8 8ace h5]...U......... 803c750: 79d6 2e97 9736 0a35 e165 3ac5 cb89 04fa .y..6.5.e..:.... 803c760: 8253 17b0 27d1 1d13 574e 3db5 98a5 c0de S....'..NW.=.... 803c770: b00f 0985 41d7 2523 241c ecb8 1dd2 1df0 .....A#%.$...... 803c780: dd98 7c57 1981 f4c2 e88b f263 ee62 c955 ..W|......c.b.U. 803c790: b46b 66da dd82 38e9 bdd8 7606 a430 6885 k..f...8...v0..h 803c7a0: d7a3 42ab 6543 6f69 8c40 b794 9bf8 f4d0 ...BCeio@....... 803c7b0: 5147 0e56 0f76 4b8a 8095 a5b0 4cf3 6a17 GQV.v..K.....L.j 803c7c0: 8125 44c8 48ff c658 ff44 60df 7448 924d %..D.HX.D..`HtM. 803c7d0: 4e1d 2fc0 31c3 97e0 348b 632b 1d21 2bfb .N./.1...4+c!..+ 803c7e0: 70d7 a1a6 6214 28c7 1f56 3606 cbce 040e .p...b.(V..6.... 803c7f0: bb48 d98a a76e 5373 8ce4 22b7 9d73 975c H...n.sS..."s.\. 803c800: 94a7 837a 3ce6 a088 7efc 59a6 4931 20a4 ..z..<...~.Y1I. 803c810: 252b 5e1e a7ad 7bdb 6b87 141c d163 49e7 +%.^...{.k..c..I 803c820: 93a8 15dd c6ad 9318 e519 2441 77c9 7386 ..........A$.w.s 803c830: 9924 d12e 6ae3 cc2c 2964 3261 6636 aa81 $....j,.d)a26f.. 803c840: 4651 cd02 039d b568 3b96 789d 30dd 6d0f QF....h..;.x.0.m 803c850: 7814 5fb0 99f6 35ea e4e2 ec76 1e34 fab8 .x._...5..v.4... 803c860: 7075 9a02 ac0c 9928 4db9 5365 b696 c25f up....(..MeS.._. 803c870: 1b06 40bf 9f34 56ad e7e6 ae9f 1754 67e4 ...@4..V....T..g 803c880: d1d6 b54b 8412 15be 3af6 15f3 57bf ab24 ..K......:...W$. 803c890: 8f47 aa56 cf8b e654 1697 f32b a80b a09b G.V...T...+..... 803c8a0: fcdd b703 4383 bb44 4985 79da 039c e3f4 .....CD..I.y.... 803c8b0: 7853 4ba1 6ab0 4df0 b429 7d62 8140 0c2f Sx.K.j.M).b}@./. 803c8c0: b9ce 29d8 0b1b f65c 58c9 b18e c806 8308 ...)..\..X...... 803c8d0: eff6 0a3e 1f07 40b1 9b0b 7fdf 0e97 7604 ..>....@.......v 803c8e0: ad2d 60b1 e02d 9541 80e8 f745 4a2c c0d3 -..`-.A...E.,J.. 803c8f0: a2d2 6f14 e9b9 5d49 7225 2d99 64e4 bbaf ...o..I]%r.-.d.. 803c900: 9c86 aabb 7299 6be2 3ab9 f737 b40b 6499 .....r.k.:7....d 803c910: b3b5 3beb cb1d 373f 74e6 3a83 f116 ec6b ...;..?7.t.:..k. 803c920: 0deb d1d4 ac06 8130 cc26 6929 f3ef 0fcb ......0.&.)i.... 803c930: ae13 0d5d ce9e 9da0 6b55 3058 52ad fe3d ..].....UkX0.R=. 803c940: 649e f967 2f46 a8bb 56a3 ccac 75d4 696d .dg.F/...V...umi 803c950: 6d56 9ac6 8ce0 1c99 cb51 319f db1b 7eaa Vm......Q..1...~ 803c960: f5e2 d717 3d5f abf9 1aca d2b6 8057 d7a8 ...._=......W... 803c970: bd2d 34e5 4d97 c994 6b64 0cfd 348e f71d -..4.M..dk...4.. 803c980: 33bc 1d8e 3f2c f731 d4f6 6db1 d79e 0d88 .3..,?1....m.... 803c990: 6fc5 7e79 18ea 943e 0c73 9fcf 035c 9ed9 .oy~..>.s...\... 803c9a0: c92c f4fc da1a 0554 2b3a 4847 a2b8 7dcd ,.....T.:+GH...} 803c9b0: a5dd b7a9 cc70 d362 3bf1 5325 4f85 2e20 ....p.b..;%S.O . 803c9c0: 476b c15c 7146 e24d 9d25 2605 db47 2670 kG\.FqM.%..&G.p& 803c9d0: 018c b8bb b83d 0476 e2b1 b5e7 4623 214a ....=.v.....#FJ! 803c9e0: 72cb 34bf 9ea7 aa7a f6d4 e6ac 2f6b e6fc .r.4..z.....k/.. 803c9f0: d784 9928 3b9b 0aeb 8548 08e7 4c66 3440 ..(..;..H...fL@4 803ca00: 66a7 78c4 f2ac cafc dbd4 9bc4 b35d 091c .f.x........]... 803ca10: df98 a7a4 a6f2 d7a0 fa38 8157 c2cc 9edc ........8.W..... 803ca20: 99ab 6d1b 71af 4cc6 5a7b cf8d 156a a97c ...m.q.L{Z..j.|. 803ca30: 1d06 d93a 3853 f0f4 36b1 42bd a386 1c6b ..:.S8...6.B..k. 803ca40: 9f55 cb14 d43f b3c7 3d46 e7d4 f2a2 c6af U...?...F=...... 803ca50: d04d b0f5 6a1b f992 87c9 bd32 c654 4e47 M....j....2.T.GN 803ca60: 962b 0306 8e3b dade b1c1 6f1d 02a7 ca2a +...;......o..*. 803ca70: 90f9 3a8a 096e 97e3 1f3d 76f3 56b5 b2db ...:n...=..v.V.. 803ca80: e3c3 9fcf e12a 1234 09de c14b 5c70 c1ae ....*.4...K.p\.. 803ca90: e20a 465c 9ec9 daa9 8a0b 99a7 e275 0091 ..\F........u... 803caa0: c728 f938 56a6 a547 63ab 00e9 e536 7268 (.8..VG..c..6.hr 803cab0: 53a6 e434 666c bf01 8467 fcb6 f4a2 1cc4 .S4.lf..g....... 803cac0: ee64 f658 2804 d20f 17fe 6770 e11c 3b58 d.X..(....pg..X; 803cad0: 0000 .. 0803cad2 : 803cad2: 6d2f 6961 2e6e 736a 0000 0000 5448 5054 /main.js....HTTP 803cae2: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803caf2: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803cb02: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803cb12: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803cb22: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803cb32: 6e65 2d74 654c 676e 6874 203a 3031 3033 ent-Length: 1030 803cb42: 0d36 430a 6e6f 656e 7463 6f69 3a6e 4320 6..Connection: C 803cb52: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 803cb62: 6570 203a 7061 6c70 6369 7461 6f69 2f6e pe: application/ 803cb72: 2d78 616a 6176 6373 6972 7470 0a0d 6f43 x-javascript..Co 803cb82: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803cb92: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 803cba2: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 803cbb2: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 803cbc2: 088b 0000 0000 0400 ed0a 097d 1b73 7649 ..........}.s.Iv 803cbd2: 5fe6 9629 297b 59a0 7100 02f1 4258 eae8 ._).{).Y.q..XB.. 803cbe2: 396e 5974 4f52 4bdb 1871 0175 1128 82a8 n9tYRO.Kq.u.(... 803cbf2: 0aaa 28a4 1192 3d3d 7b1e a622 bdc3 bb31 ...(..==.{"...1. 803cc02: bbb1 b1b1 3de3 417e dc8f c8f2 687d fc22 .....=~A....}h". 803cc12: c00b e47f bdef accc 0003 6a29 a7ba 09ed ..........)j.... 803cc22: 423b 2b22 5f33 2f5e be5f 577c 7b26 c093 ;B"+3_^/_.|W&{.. 803cc32: fc49 d030 2bde e559 c8e3 264b a051 a1b9 I.0..+Y...K&Q... 803cc42: 1933 4179 ed52 c97b a1ad 9f47 8fd7 bb6e 3.yAR.{...G...n. 803cc52: 3880 29ed 9ef8 7ae5 83b7 6a98 d559 3938 .8.)...z...jY.89 803cc62: 7a1a 70d5 396c 727e d664 148c 2eca 8f95 .z.pl9~rd....... 803cc72: ac0f 7348 b1cc c515 07de d0c3 4a4a f033 ..Hs........JJ3. 803cc82: 8ee5 2bdf 9c95 b315 6b5a af96 97d6 a5cc ...+....Zk...... 803cc92: 7cda 4e9b 9a87 cd71 3f43 c370 6ac3 3de4 .|.N..q.C?p..j.= 803cca2: 789b f271 6441 bc8d 2e92 7a53 e3b9 ec96 .xq.Ad....Sz.... 803ccb2: e9f2 2969 4e37 4ad7 0fac ac78 4a18 8c2f ..i)7N.J..x..J/. 803ccc2: d44a 658e 58ee e18e 863a ec1f 50f5 08db J..e.X..:....P.. 803ccd2: 8927 18f8 461f 6d86 7b25 358e 6146 45e0 '....F.m%{.5Fa.E 803cce2: 897b 1a37 5653 8fe2 a1bc 4bd7 f88c 7841 {.7.SV.....K..Ax 803ccf2: 45e8 7c46 791d 745e 6bb4 66d8 63ad 5b6f .EF|.y^t.k.f.co[ 803cd02: a1d5 f417 4193 5ec7 2959 d8a7 b1d9 7377 .....A.^Y)....ws 803cd12: f983 f1e8 3bdd e44e 8959 7847 91a3 66d8 .....;N.Y.Gx...f 803cd22: 6c8a 7051 e253 531e 13eb 4be2 c365 8599 .lQpS..S...Ke... 803cd32: 6b91 d252 ff5d 9300 59a6 5539 2d1e 6075 .kR.]....Y9U.-u` 803cd42: 1d5a daa7 a3f3 b938 f031 6e87 6ca7 ad57 Z.....8.1..n.lW. 803cd52: d8f1 5c0b 024e 2b32 772b 8ae4 b3db 5b0b ...\N.2++w.....[ 803cd62: 0cb2 7e7b 6a15 5a86 d73b c78f eb43 b4c8 ..{~.j.Z;...C... 803cd72: 4e4f 7b74 3a18 7afb e8b6 5c8e fb74 8bad ONt{.:.z...\t... 803cd82: d36e afa2 bb9d f6e8 1765 99dd 7459 6460 n.......e...Yt`d 803cd92: 13f4 e86b f163 db41 3872 9198 4581 3c37 ..k.c.A.r8...E7< 803cda2: 67a3 8df4 e181 4f1b 7d8d 6863 3a8c f996 .g.....O.}ch.:.. 803cdb2: 111e e591 39ee 68e1 0934 c440 197a 8acb .....9.h4.@.z... 803cdc2: c3dc 4fc8 42bc 43b6 23d9 b02b 5efa fb74 ...O.B.C.#+..^t. 803cdd2: e001 42dc 0346 5e39 a721 9c89 215e 85a7 ...BF.9^!...^!.. 803cde2: 7e9c 6721 390d ca03 c7f1 eb96 4846 94f9 .~!g.9......FH.. 803cdf2: 1fea ebe2 80a9 f78c bdf1 df4f bc51 7b17 ..........O.Q..{ 803ce02: 81d1 6047 9943 0e31 04a3 91c9 ee4c 987b ..G`C.1.....L.{. 803ce12: 6301 c02f 5276 8cab eeba 19c0 e5eb 33aa .c/.vR.........3 803ce22: 9cf0 cf7d 393d 4929 7934 1fb7 c750 1c5e ..}.=9)I4y..P.^. 803ce32: 0697 ae86 7edd 9950 397e eafd d3ec abe9 .....~P.~9...... 803ce42: 9fb3 6769 3f3f d9fb 67d9 bc48 fe99 7d13 ..ig??...gH....} 803ce52: 5f4d bf4e cbd4 8ca8 ebc6 6365 09be be7f M_N.......ec.... 803ce62: 5f89 bf4e fb39 e9bb deef f152 a1a9 bf4f ._N.9.....R...O. 803ce72: a6d4 7bff e5fa cfd9 5fa6 e7d3 d1ef 57e9 ...{....._.....W 803ce82: bc48 b742 b3af cb4e 4086 1784 f658 73d0 H.B...N..@..X..s 803ce92: 29b3 2f2d 982f fed2 78dc 5e1e 79bb e3fb .)-//....x.^.y.. 803cea2: 1a47 fc37 e629 0af3 5bb3 a734 937b ed91 G.7.)....[4.{... 803ceb2: a545 1a21 fe98 e99f b39b cf4f d33e 5b2e E.!.......O.>..[ 803cec2: daf7 3c70 02b0 d270 77c8 234a e16a d17f ..p<..p..wJ#j... 803ced2: 3464 8e4c f990 fa7a 205b 33f6 d24c 1c72 d4L...z.[ .3L.r. 803cee2: fe20 ed6d 422e 43b4 fead 1e3f cf3d 7b41 .m..B.C..?.=.A{ 803cef2: ef74 03ee 9ead 29e1 9c5d 60c2 432c 087f t......)]..`,C.. 803cf02: d772 646e 3ee4 9ab7 0a85 a1b6 427f e13b r.nd.>.......B;. 803cf12: 1ac2 0919 0bb9 8587 31ad 4bd7 c756 585b .........1.KV.[X 803cf22: 9b07 82e7 bd3a 7585 bdb0 a82e 5fd3 0758 ....:..u....._X. 803cf32: 301b 13ad cc64 9e70 99b4 8a2f 6d23 7386 .0..d.p.../.#m.s 803cf42: 5ca7 e879 ef63 c649 e79a facb 37f4 57d3 .\y.c.I......7.W 803cf52: dfd3 a513 e281 635e 7c43 fd3e fa6e a346 ......^cC|>.n.F. 803cf62: 315d 0afd bfff 57d3 15ec 497d 5637 5a7f ]1.....W..}I7V.Z 803cf72: ac6a d4ed 6b2a 27bb fc0d ed6a c7e2 eed6 j...*k.'..j..... 803cf82: 4ec9 bead e5db fe4f 2dd1 a93f ebfe bdc0 .N....O..-?..... 803cf92: 5ab7 704d e2fc 3f24 86b0 af13 5ddc b5aa .ZMp..$?.....].. 803cfa2: d84b 4890 9e49 b15b e7c3 94d8 8385 6ca7 K..HI.[........l 803cfb2: 5b80 e3cc 6e56 1fb1 b109 ee95 13ce bab7 .[..Vn.......... 803cfc2: 52bb b6ea 4abd 89f7 52bb feee b3a0 6c29 .R...J...R....)l 803cfd2: 4b9b 09ce c847 4fea 4969 caad 6b8b ff95 .K..G..OiI...k.. 803cfe2: bbbc def2 62ea 01fa 9a07 337e a57d 9d31 .....b....~3}.1. 803cff2: d368 916f 47fc 8ce2 c7c4 59c0 0f98 23fc h.o..G.....Y...# 803d002: 97b3 35cf 1670 8300 bec4 1226 86fb 4172 ...5p.....&...rA 803d012: df73 f201 fc6b a57e f711 e7c1 b3cb 695f s...k.~......._i 803d022: d7d3 d9da 4cdf 9f5f 35fd dbd8 74af fdc3 .....L_..5...t.. 803d032: 1601 9e37 23d8 f93f e700 8c70 d7e3 0309 ..7..#?...p..... 803d042: 1d08 92a3 fd3e ba35 bf43 e182 c2be 9070 ....>.5.C.....p. 803d052: 5bfc aa1a f676 b00b 0c57 ff11 3831 25da .[..v...W...18.% 803d062: 31af 8041 d650 e7d9 3e1a 2870 63a8 2688 .1A.P....>p(.c.& 803d072: d5d1 e0cb 20f6 20bb 5719 00fc 5ae7 a49a ..... . .W...Z.. 803d082: d1f3 83a7 1c2e 0493 ef10 7734 a905 f9d2 ..........4w.... 803d092: 8298 ea4b 6635 85c5 802e 0f28 b47c 262a ..K.5f....(.|.*& 803d0a2: 2a52 17b7 b791 7b90 2c95 0524 1ca1 f389 R*.....{.,$..... 803d0b2: fb31 93e0 409b aa01 e13b 4824 872a 4591 1....@..;.$H*..E 803d0c2: 5b03 9558 350e 8286 1b8c 0b9c 4294 e5e4 .[X..5.......B.. 803d0d2: ee5c 06ea 9bce 27be 143a 2e72 2835 ad32 \......':.r.5(2. 803d0e2: 3e38 230c 63f7 06a0 f32d 15be 4e22 7438 8>.#.c..-..."N8t 803d0f2: 87c7 8274 3c8a 6f96 ef02 9f30 22c7 c88e ..t..<.o..0..".. 803d102: bc8b e431 14d7 9bda dca7 699a b69a 8614 ..1........i.... 803d112: 4e4f e528 5214 4cae ad75 17a1 a025 a609 ON(..R.Lu...%... 803d122: b3ea 682f b185 c4f2 e90c ffd0 9286 2044 ../h..........D 803d132: 7a4b edb9 992c dba6 cd2d 80d6 026c 37a8 Kz..,...-...l..7 803d142: c444 6fd3 5649 12f8 c364 845b d492 6f1c D..oIV..d.[....o 803d152: 978c 4254 f61c efec 3ece 7343 e684 ace2 ..TB.....>Cs.... 803d162: 5d4d cca7 b4e2 990b 79c5 a8a3 d6dc cc75 M].......y....u. 803d172: 4acd 01a7 aee6 48f1 cb7e fe1c 213b d0bb .J.....H~...;!.. 803d182: fc0e 0d1d 3791 2be0 91da 861a 0df2 17cd .....7.+........ 803d192: 933b 9f48 fcc7 b40f 694b 6fc6 31b0 15b1 ;.H.....Ki.o.1.. 803d1a2: 4300 8ff4 f17d e2b3 4836 7927 39f6 c661 .C..}...6H'y.9a. 803d1b2: 9b13 06d5 cbed 274f 74fb 5dcb 5c68 5fee ......O'.t.]h\._ 803d1c2: bdde b503 5142 1602 eab6 fdf4 04ee 1094 ....BQ.......... 803d1d2: 7f40 f532 6b15 5f45 8426 4680 c290 b419 @.2..kE_&..F.... 803d1e2: 984c 2910 1888 de1f 9c7a f789 65a0 0cb1 L..)....z....e.. 803d1f2: c0c9 a18f c588 ec63 ef2f f7b1 293c 521b ......c./...<).R 803d202: 833b c03e 3782 a94a 907b b969 5b9d b93b ;.>..7J.{.i..[;. 803d212: 8448 f488 13e4 9f73 1b3b a87f cab5 1d4e H.....s.;.....N. 803d222: e352 2f62 7c79 6634 8c1d 13c8 0d3a 3b34 R.b/y|4f....:.4; 803d232: f127 dbdc eb81 ef3d 964a 7822 dec8 b410 '.....=.J."x.... 803d242: 0cee 8b81 c07b 8ad5 6ba9 df03 bd75 d040 ....{....k..u.@. 803d252: 324b 394e 65cd d060 b5f1 8924 7b7c 0d02 K2N9.e`...$.|{.. 803d262: da10 2c5b 5784 fb23 da64 194c ca54 04cf ..[,.W#.d.L.T... 803d272: bb7b 1c68 e212 3d12 1770 5098 1f12 ee91 {.h....=p..P.... 803d282: f23f 9c2e 1e62 02f0 404c 9ad3 c769 2704 ?...b...L@..i..' 803d292: 6a1b d8f1 f60a 7bea 6f61 c1af 2318 7cb8 .j.....{ao...#.| 803d2a2: 2633 da33 0e0a 2488 870a 320c a43f 4dc5 3&3....$...2?..M 803d2b2: dc11 9a5b bd92 de45 3c28 16f0 9e61 2171 ..[...E.(<..a.q! 803d2c2: ba1b 0a00 4be4 41dc 76ad 6111 478b 0297 .....K.A.v.a.G.. 803d2d2: 65bf 7988 0bb8 c046 69dc 98ee 259b 058b .e.y..F..i...%.. 803d2e2: 4cd8 0969 f19b 2c5c 85bc 1624 f0cf ca3c .Li...\,..$...<. 803d2f2: 3058 7988 98ea 48d9 64b3 5331 4f3c 0b12 X0.y...H.d1S]..0..%.. 803d342: a5be 581a 2cc1 1d77 5e44 d4cf c157 ed23 ...X.,w.D^..W.#. 803d352: 28ab 2bb7 1a15 90bd a032 4276 056f 324a .(.+....2.vBo.J2 803d362: 90b3 d86d 46a7 6bdd 06e6 d64d 4780 9909 ..m..F.k..M..G.. 803d372: 58a3 2940 071a 0f98 7b2a 5804 a5e4 1758 .X@)....*{.X..X. 803d382: 2c59 0b2e b23b a6c8 1971 b168 d2ff 5cb1 Y,..;...q.h....\ 803d392: c940 0184 c31e 605b df64 4017 d0e5 5914 @.....[`d..@...Y 803d3a2: 3fae 7389 8288 6605 f0ce e8c0 99ca 2e66 .?.s...f......f. 803d3b2: 6fda 4a34 0a80 cda3 0065 3e59 60bb b2b0 .o4J....e.Y>.`.. 803d3c2: 3641 5cfb 9ed4 6440 947e 5c97 6cd7 efb4 A6.\..@d~..\.l.. 803d3d2: 8150 7d47 7879 fa31 c04b 96e7 9ac6 8324 P.G}yx1.K.....$. 803d3e2: c2dc 87c4 4194 409c b818 a2d4 ab64 76f5 .....A.@....d..v 803d3f2: 6624 b2b0 3211 f348 0001 6424 9785 a718 $f...2H...$d.... 803d402: 955c 4eac 20da 66ac a205 e4ca 3f13 85e8 \..N. .f.....?.. 803d412: 493f 68d5 4bec e396 74c9 cc29 e094 b330 ?I.h.K...t)...0. 803d422: bc02 1d62 7698 844e 5327 ec26 2ac7 9a53 ..b..vN.'S&..*S. 803d432: 3352 a063 c4ec 2bcb 0dac 7d98 a3a1 b691 R3c....+...}.... 803d442: da48 e924 679a c37f 1196 60b7 2be9 81d6 H.$..g.....`.+.. 803d452: 0871 3b16 0a18 9849 b295 2b3b 90a6 a167 q..;..I...;+..g. 803d462: be69 3eb5 4c24 8cb6 2b7d 5d04 42b4 e212 i..>$L..}+.].B.. 803d472: 696b 13ee bb3d 8619 1bce ec38 6fd5 cbb7 ki..=.....8..o.. 803d482: a8cc 4fda 5234 47b6 16ff 6db4 9fd8 ac96 ...O4R.G...m.... 803d492: c83f 2290 d454 20db 901c 0fcb 6aa2 86bf ?.."T.. .....j.. 803d4a2: 2e60 6f74 7fa1 217f ed54 da59 3d24 0c99 `.to...!T.Y.$=.. 803d4b2: 948e 8c4f 759c 3ffe 5550 ab86 cfe9 dd1f ..O..u.?PU...... 803d4c2: 47bf 077e 11c3 e92b 5276 0f7f 9834 928f .G~...+.vR..4... 803d4d2: fc64 b850 ba7d 4ed0 62b4 9b56 e4b2 7901 d.P.}..N.bV....y 803d4e2: 520d 81ed 97f7 edf7 10a7 4bea 5dfa 89df .R.........K.].. 803d4f2: 38c2 25ec aa55 f8f2 03f1 981c 0c2e 5e03 .8.%U..........^ 803d502: 1250 8d9a 6065 5383 4056 803e 98a3 440e P...e`.SV@>....D 803d512: 34a1 b99b 5b43 43ec d3af 2682 160a 400b .4..C[.C...&...@ 803d522: 3be6 9738 642d a550 6c49 6a34 2850 6eac .;8.-dP.Il4jP(.n 803d532: 33c9 3269 7655 957a 3c08 25af 25d9 0caf .3i2Uvz..<.%.%.. 803d542: 1695 4282 14f9 c6dd cd70 35e4 c9f9 c498 ...B....p..5.... 803d552: 3195 0bfc f76a 6a9b a387 64c1 3a40 355b .1..j..j...d@:[5 803d562: fa1e 578e 1baa b595 2772 f43e 6713 7240 ...W....r'>..g@r 803d572: 6387 9ec5 c60e f894 3f41 dbd6 7af8 210c .c......A?...z.! 803d582: ce19 92ad 84ca c72a 4032 c6c7 f614 5c3b ......*.2@....;\ 803d592: 7a01 125c 4746 1b7a f06b ba80 2925 1262 .z\.FGz.k...%)b. 803d5a2: e045 341e c50a e041 5163 d0e8 7900 c3e3 E..4..A.cQ...y.. 803d5b2: a9db 03a8 24e6 1a64 5178 13d0 97a9 8dd0 .....$d.xQ...... 803d5c2: e02d 31c6 99df a120 92f0 fd06 bf06 cb33 -..1.. .......3. 803d5d2: 508f 5f15 5e92 7c8c c169 645a 2a11 181b .P._.^.|i.Zd.*.. 803d5e2: 1d83 df86 1073 6360 12e4 c578 ea1a c03f ....s.`c..x...?. 803d5f2: f62e 7c73 e189 f02c bc86 fec1 c740 e562 ..s|..,.....@.b. 803d602: dfbe 49ec 17ff 0d36 7b35 8a52 9cdf 12fd ...I..6.5{R..... 803d612: f10c f4e5 b3eb 2f9f c6f4 ff70 b74e 2b64 ......./..p.N.d+ 803d622: 6907 7771 ff7c 630d 6fcf 5b18 2e52 9eed .iqw|..c.o.[R... 803d632: 41f6 bbe8 2d5a 9023 436b f60b 9cbe b3fd .A..Z-#.kC...... 803d642: 2d64 b7d7 edb7 d5f2 76ab 6dca 7033 cd10 d-.......v.m3p.. 803d652: 106d dc0a e4c9 2476 745f 704e 75d5 7176 m.....v$_tNp.uvq 803d662: e60a c7ae 9fd0 3e83 2bc8 0a81 f61f bb34 .......>.+....4. 803d672: 1f0b db6b 6306 75af 6ddc 6a65 b8ea c2f0 ..k..c.u.mej.... 803d682: 79f2 9de0 3deb 3325 97bd 87eb b047 ece3 .y...=%3....G... 803d692: bbb8 55bb 09df ec0c f632 936b 0e4b de5d ...U....2.k.K.]. 803d6a2: f381 d4d7 b5eb 73f1 451d 9f89 3d0c 5f33 .......s.E...=3_ 803d6b2: 7385 e470 ec63 b379 97b7 37df 0860 28d6 .sp.c.y....7`..( 803d6c2: e87e e9c1 0f1c bdb0 d715 e9d3 0e23 3603 ~...........#..6 803d6d2: e8cc 772b cdb1 91ab 5705 08f7 5ffe ebb5 ..+w.....W..._.. 803d6e2: edd2 ae66 d558 9ec9 2845 7386 8918 4c91 ..f.X...E(.s...L 803d6f2: e6b8 2ece 8fbc d1f8 c533 d80a 1ac6 1af9 ........3....... 803d702: a255 5385 7d46 906f 51cb 9a25 71e4 0954 U..SF}o..Q%..qT. 803d712: 2748 d34f 3ac4 1d79 4955 dca3 7301 76b8 H'O..:y.UI...s.v 803d722: 3c03 5321 0a2c fdae 376b 2bca 49f0 9afd .B.......L.Iu. 803dc62: 6443 ea97 e2d9 d2e0 7d84 8287 a4a3 c3c3 Cd.......}...... 803dc72: ef8f b686 5b8f fe34 47fd 1c25 99e4 8336 .....[4..G%...6. 803dc82: 7820 ada9 1690 c8bb 2bfc dcc2 7ece a101 x.......+...~.. 803dc92: 6492 f639 50d9 1a30 a93e e92e 9f40 2341 .d9..P0.>...@.A# 803dca2: 3dfa de32 db40 6561 e203 6237 b121 1d11 .=2.@.ae..7b!... 803dcb2: 24ba 5b02 4eff 376d 94af 2740 a7d0 cf7f .$.[.Nm7..@'.... 803dcc2: f896 612f a691 3540 9488 e8b0 a598 dc9e ../a..@5........ 803dcd2: 06dd 5cf9 c26e 8157 377b ea66 a876 c142 ...\n.W.{7f.v.B. 803dce2: a3a1 eece edda dd3e 2220 1288 fc94 7d3d ......>. "....=} 803dcf2: d385 2177 c317 99f6 7c65 4e14 4422 ca89 ..w!....e|.N"D.. 803dd02: 3f52 7040 2514 82a9 01b8 3032 1de7 303e R?@p.%....20..>0 803dd12: ea57 cdd2 94a0 4c0d 3aad c70e 72a5 f117 W......L.:...r.. 803dd22: 5d6c 4dbd 6d51 677a b790 fb5c 1568 59ca l].MQmzg..\.h..Y 803dd32: 1d29 0d39 9490 1280 5034 5c98 9f95 a606 ).9.....4P.\.... 803dd42: 9365 39c2 926d 81e4 2824 8b05 87c2 810a e..9m...$(...... 803dd52: 835b ec2a b7c4 b00e 77ee 50e0 60f1 2945 [.*......w.P.`E) 803dd62: 14e9 56fe 9d08 a22b 0ebc 93e1 cc4d be87 ...V..+.....M... 803dd72: 0c9b 73b0 c58a 15c5 3d31 7c51 0781 94fb ...s....1=Q|.... 803dd82: 1126 d406 a9ab 00d8 05ce afdc c762 c994 &...........b... 803dd92: 7b21 55c2 1825 2d82 d4b2 e9bc 5626 9f61 !{.U%..-....&Va. 803dda2: 9194 9521 8cae 47dc 23f1 c0eb 1fbb 87dd ..!....G.#...... 803ddb2: ed0b 703a 7e54 442b e609 d879 87da 77b1 ..:pT~+D..y....w 803ddc2: 612c fdd9 fb86 9c64 9427 8fdf de1f 8aa9 ,a....d.'....... 803ddd2: 503b 73c2 3487 736e 4c81 d01d 79e2 f6b1 ;P.s.4ns.L...y.. 803dde2: a550 bd3b 472a e0c2 8f5e a6c0 1fa9 b1f8 P.;.*G..^....... 803ddf2: cd8f 7b84 6d3c ad15 abd7 7052 630e 35c6 ...{.u.V..*\3.... 803def2: c86f 9c6d 4cbf 4296 0b15 7408 e2ee 0a59 o.m..L.B...t..Y. 803df02: 533b c042 2769 db64 4813 f5ce 28dc e080 ;SB.i'd..H...(.. 803df12: cd46 483c 00b3 5ad2 d204 802a bee0 7ccc F.... 803dfd2: e600 8fb9 7b0a 1b4f 09fa 35f1 5f2c 919a .....{O....5,_.. 803dfe2: 3eb2 5275 e5aa 4864 043e f055 5a4a be67 .>uR..dH>.U.JZg. 803dff2: 9991 8821 2cc9 916c 9bb4 e249 f6e4 5228 ..!..,l...I...(R 803e002: 5734 66c8 3c69 ed07 2409 9b29 365c 6039 4W.fi<...$).\69` 803e012: 524a 4cf6 af84 10e8 56a7 762e 225c 5730 JR.L.....V.v\"0W 803e022: 1319 6830 3daf 7112 c5a5 3738 1723 67af ..0h.=.q..87#..g 803e032: 3750 6d64 50a5 f47c 8a86 4514 2721 8284 P7dm.P|....E!'.. 803e042: c43f 50e3 f1b0 6c16 99b5 fd40 eece bc81 ?..P...l..@..... 803e052: 13d1 29ee 01f2 43ca 0594 492a 748e a415 ...)...C..*I.t.. 803e062: 7c7d e46a 10f3 3026 96f2 7597 8e19 a4bb }|j...&0...u.... 803e072: 1682 c016 65cc dd5d 2ada 48cb 3561 9cf6 .....e]..*.Ha5.. 803e082: 3771 7777 c482 29fa 1fdf 0979 e00d 8c95 q7ww...)..y..... 803e092: c2dc 5965 f416 2b49 fd4b 6c02 b53a 50ca ..eY..I+K..l:..P 803e0a2: 9c96 9d15 14bc 7fb0 94b2 e36c 8eca 2988 ..........l....) 803e0b2: 19aa ba95 1154 0220 3f93 d30f 13e5 43af ....T. ..?.....C 803e0c2: 0ae2 4b02 e26e 892e 124b 0af6 ff22 ef66 ...Kn...K...".f. 803e0d2: f086 9434 493c 42b7 fde4 b998 e17c cd5d ..4.A.......B 803e182: b15a 9874 9d33 ca17 f014 4c22 a011 d6c0 Z.t.3....."L.... 803e192: 4dbf a796 0546 c02d aa0b a1ac 6f6e 6fac .M..F.-.....no.o 803e1a2: 24c1 0c03 1b40 bcc4 71c5 745d 717d 0384 .$..@....q]t}q.. 803e1b2: 8f22 1527 870a 5000 b018 953e 4829 37ec ".'....P..>.)H.7 803e1c2: bf3b 9301 9c45 f6f9 f2bb 657e 675b db17 ;...E.....~e[g.. 803e1d2: 7329 8b37 7be5 338a 73c2 541e 8291 d482 )s7..{.3.s.T.... 803e1e2: 1eb3 4e94 7743 37d2 283e 8b37 31af 0510 ...NCw.7>(7..1.. 803e1f2: 3943 0c1c 9ea3 a0fe 620c 787d 8405 535b C9.......b}x..[S 803e202: 1111 41a2 4295 8011 8768 bbd0 aa20 a50e ...A.B..h... ... 803e212: 28f7 c503 a9e2 2a10 5f11 7594 045d 7098 .(.....*._.u]..p 803e222: fca6 0d96 a1e1 1b91 6270 10dd eba1 1a46 ........pb....F. 803e232: 6002 7fea ebd6 d5ad 6ad6 9870 d073 5fd4 .`.......jp.s.._ 803e242: badd e773 27fe 5d94 dcb3 bc16 228d 239b ..s..'.].....".# 803e252: 90a8 6cdb 4e3a c00d cee4 7234 2fde 4773 ...l:N....4r./sG 803e262: ec1f c241 46b1 ba7b 4f81 c398 4482 d27c ..A..F{..O...D|. 803e272: e54e eb81 06bb a5d1 79f0 3b98 bec7 06db N........y.;.... 803e282: 2724 000f 06ca 1156 c5de 686a 1a5b 4f6f $'....V...jh[.oO 803e292: 3c8d ef64 a052 0358 9ab8 01df 49d4 0007 ./ 803e362: 0ce9 5153 ba30 0c71 38f1 9786 d118 bf43 ..SQ0.q..8....C. 803e372: 8c86 d747 c981 8bbc 152b 7a46 3885 4f7f ..G.....+.Fz.8.O 803e382: 8a5e 1424 4052 a5af a2bc c8cb bf67 3320 ^.$.R@......g. 3 803e392: 7670 fe71 f4d5 716b 76d5 9af6 0231 0063 pvq...kq.v..1.c. 803e3a2: 714a 5f32 aea1 9fb8 2b8f 30c8 7f1c d55e Jq2_.....+.0..^. 803e3b2: ffa6 1b93 d481 2103 8688 5e20 f80f 228a .......!.. ^..." 803e3c2: a805 113b fdaf 124b e88a 8139 f497 c0f8 ..;...K...9..... 803e3d2: 252b 0124 5eba c7a3 e80a 01f5 a854 66c2 +%$..^......T..f 803e3e2: e7d4 d070 3136 c136 c8ab ad8b 9af2 26cd ..p.616........& 803e3f2: 4d38 6c34 10e3 77e6 8403 126c c20f b6c3 8M4l...w..l..... 803e402: 943c 9260 da51 ae01 428d d977 c06e 29f6 <.`.Q....Bw.n..) 803e412: 8b82 38f6 68b8 8a31 e18b 1747 1821 7ab3 ...8.h1...G.!..z 803e422: f679 f4c5 8877 c21e 732d a688 9cc2 098e y...w...-s...... 803e432: 35d0 5a17 ba07 8dd3 320b 1984 d93c 4d91 .5.Z.....2..<..M 803e442: 03c9 6df3 e9ae 7e46 bd4a 4f5e 00c7 fe6f ...m..F~J.^O..o. 803e452: bdd5 4fbd 5d6e e537 93ef e393 8ed3 aefc ...On]7......... 803e462: e5b2 3cd8 b486 4ed3 700d 06b3 6ee5 08ca ...<...N.p...n.. 803e472: 6bd8 a300 b1ea e26b 9f15 3aa5 046c c0b3 .k....k....:l... 803e482: 92b0 b9e1 f2a3 b669 a45b 01ab 49a0 3962 ......i.[....Ib9 803e492: ee03 6711 4061 3c82 5fec b086 6587 8bdd ...ga@.<._...e.. 803e4a2: c174 7da4 08e1 c016 305f d708 385b 9b88 t..}...._0..[8.. 803e4b2: eff7 c5c2 4d9d 6534 1679 582b 0092 ecf8 .....M4ey.+X.... 803e4c2: a4c2 1813 bd0d 4f04 a8b7 084f 716a 48e4 .......O..O.jq.H 803e4d2: 659b 1019 05e4 39c3 5377 cf04 6430 2b31 .e.....9wS..0d1+ 803e4e2: 982f 7d28 9e0b 7a00 4d09 e0e8 2ec0 373c /.(}...z.M....<7 803e4f2: 16d4 49ee 1f8c 7844 0ce7 22de 91f8 b1b8 ...I..Dx...".... 803e502: bc99 6b7c 1990 c0ad 86f1 27d7 8236 7084 ..|k.......'6..p 803e512: 8c8d 391a e8a5 c78c ec3c 2cc2 8b71 70e4 ...9....<..,q..p 803e522: 718f 655d 4014 9205 9bfa 9a9a 6a72 fb91 .q]e.@......rj.. 803e532: 1aa9 f640 cd26 e219 e918 386e a491 14a5 ..@.&.....n8.... 803e542: 0942 8df8 2aa2 4bb1 63cc 9570 6f5c c774 B....*.K.cp.\ot. 803e552: bc46 2584 3a4c 0e78 a3ab aaf4 b034 9c9e F..%L:x.....4... 803e562: 7d6f 46de c937 d04c 2727 63c8 3708 f625 o}.F7.L.''.c.7%. 803e572: f0e2 7957 d1a5 df7a 7f79 46bd e8ff 296a ..Wy..z.y..F..j) 803e582: ca22 30fb 7f66 f778 f0b1 91d5 255b 66a5 "..0f.x.....[%.f 803e592: 2387 4d08 65b8 79a0 017a 0fb9 7e3f 1b78 .#.M.e.yz...?~x. 803e5a2: 106f 05e1 0c01 c61e 95fe a0d2 77ab ef34 o............w4. 803e5b2: d8f9 0a87 a809 1e01 4059 4bae 74b9 05f7 ........Y@.K.t.. 803e5c2: 1059 2848 a3cb c42c 5bc7 407e 89ad 444c Y.H(..,..[~@..LD 803e5d2: 7722 bc60 f045 879c 4f28 241d 5c0d e6e7 "w`.E...(O.$.\.. 803e5e2: f39d 1655 555e 81e3 3749 6ad2 49e7 dabc ..U.^U..I7.j.I.. 803e5f2: b0c7 1311 8147 7c16 0093 65a6 a4db 2194 ....G..|...e...! 803e602: b75e 9e50 9e41 594b e9a9 25c2 9c5a d493 ^.P.A.KY...%Z... 803e612: 95aa 7433 0ea5 905b 2878 9cae 123e 2144 ..3t..[.x(..>.D! 803e622: b8c8 e409 730d 1543 a0d7 1240 0562 4fc9 .....sC...@.b..O 803e632: 8a05 92c0 462c c967 a1ce 16c8 70d8 280a ....,Fg......p.( 803e642: 3872 8733 c7dd 8983 d5a1 95ea b73f ca82 r83.........?... 803e652: 4d46 d5ab f4da aeaf f161 b980 848c 4e3e FM......a.....>N 803e662: 21fc 5d28 1451 c125 26a6 3afc 615d d2c0 .!(]Q.%..&.:]a.. 803e672: cee0 06c6 3436 78d8 6e7a c560 0ff7 da03 ....64.xzn`..... 803e682: 3034 1fdf 97c1 bcb6 44bc 0756 84cc 997e 40.......DV...~. 803e692: ade4 3ac7 97bd 296b f1dd 54e9 7931 a3b9 ...:..k)...T1y.. 803e6a2: 3bd5 1984 ad33 b63e 9cec 05f7 ac4b 289e .;..3.>.....K..( 803e6b2: 40b4 c751 096c 8c80 d024 6318 64ab 6109 .@Q.l...$..c.d.a 803e6c2: b1aa a7d9 8880 d713 6943 752e a272 829a ........Ci.ur... 803e6d2: a5dc 3aec 9ec1 d745 b0cb 0023 661c 73a9 ...:..E...#..f.s 803e6e2: 2180 24b9 9002 66be 4880 1ca7 90ee 6497 .!.$...f.H.....d 803e6f2: fd97 e070 0430 a255 f29c ca69 008b a264 ..p.0.U...i...d. 803e702: 627f 2165 451c 7be4 9639 a1f1 a11c 228e .be!.E.{9......" 803e712: 793c 8f98 e44b 6abb 94ea d2a9 c18a ad9f u(...:qL.jvh<"? 803e772: a3e8 0781 e732 3802 00fe 3a68 36f0 60e1 ....2..8..h:.6.` 803e782: 4e93 6348 a1de 82aa 2c0f e274 58ed 1dbb .NHc.....,t..X.. 803e792: 4d0b 7b93 2dd7 9251 7742 0ee1 1d9b 7e5e .M.{.-Q.Bw....^~ 803e7a2: 122e e7cf db10 f2f2 8282 faf8 63d1 4fab .............c.O 803e7b2: 820f b6c0 4137 4094 0fcf 08f0 6a5d 4bde ....7A.@....]j.K 803e7c2: 4119 bf7e 9ece 27cf 6927 b9cb 58f3 0a05 .A~....''i...X.. 803e7d2: 8740 1fcd f283 e44a dbdc 4685 8460 7eb8 @.....J....F`..~ 803e7e2: 7448 ece4 631a f27c 62e9 d8c7 c669 1c33 Ht...c|..b..i.3. 803e7f2: 4886 91c2 849a 591f 85b8 cca1 e51e 48ce .H.....Y.......H 803e802: f114 f701 e201 fe29 8262 0f4b 6792 66a3 ......).b.K..g.f 803e812: db98 9825 90c3 20ba 54b5 0ad0 a6da 42eb ..%.... .T.....B 803e822: eea3 3da8 0eec 0699 0b53 4463 60eb 778e ...=....S.cD.`.w 803e832: dda2 844e 0095 f475 2c29 9c04 1e1b d9b3 ..N...u.),...... 803e842: e0f1 443a f220 7878 7a48 4a44 e583 67e5 ..:D .xxHzDJ...g 803e852: d9a6 c743 7f38 4590 c3c1 dc70 0053 2e01 ..C.8..E..p.S... 803e862: 6133 474f c747 d403 af7b d704 041f 8468 3aOGG...{.....h. 803e872: c45c a1d8 c14f 9ea5 009a 7d41 da8b 01b9 \...O.....A}.... 803e882: 754b c25c 72c3 65bc d03d 3d35 9511 c22b Ku\..r.e=.5=..+. 803e892: 8753 e8a2 c201 f96c 28f9 c1d8 cdc4 7347 S.....l..(....Gs 803e8a2: 5a9f c412 1687 84d8 f791 19f9 2de0 7292 .Z...........-.r 803e8b2: 2e52 4581 75c2 884e 37a9 81c8 b9ec c725 R..E.uN..7....%. 803e8c2: fba0 786c b490 f90f 7caa 63ea e446 8017 ..lx.....|.cF... 803e8d2: 587b c74c 132f 1747 c153 b777 bfb4 bcbc {XL./.G.S.w..... 803e8e2: 708f 0076 4f62 2181 10dd 4183 fb43 7f24 .pv.bO.!...AC.$. 803e8f2: 8480 cd16 5f29 3332 ac25 9aa4 5f90 2f6e ....)_23%...._n/ 803e902: fda1 e8a7 d731 6e52 4f34 8571 8731 7ca9 ....1.Rn4Oq.1..| 803e912: 04ab 1595 6c0b 9ae5 5146 cc48 b990 3897 .....l..FQH....8 803e922: 8975 6489 0cbb 62c8 3f27 1d09 008c 5f9b u..d...b'?....._ 803e932: 5d7d caf2 00c9 437c 0da3 8b7b 04ee f494 }]....|C..{..... 803e942: a17b 7b06 5d0a d75d 9a38 fe06 2d5d 6341 {..{.]].8...]-Ac 803e952: a25e 8ae1 0f61 6ccf 08b8 20f4 43b6 4531 ^...a..l... .C1E 803e962: c9d9 3d80 b8c9 5da1 8f09 6586 4543 65c6 ...=...]...eCE.e 803e972: 7d1c 5782 4065 f958 a877 7616 6b2a b068 .}.We@X.w..v*kh. 803e982: 7ac3 1ba2 330a c386 f65c 9d4e 562a 5101 .z...3..\.N.*V.Q 803e992: fe00 42b6 92df 401f 238b 23b1 0447 1219 ...B...@.#.#G... 803e9a2: 7a1c 547a 5c0a 4f66 8050 9d87 b621 b82f .zzT.\fOP...!./. 803e9b2: 20e2 fa7f 6680 1c08 8417 84f3 83d0 5f6b . ...f........k_ 803e9c2: 682e 2081 66c4 ac28 875f c9b6 4acc 1103 .h. .f(._....J.. 803e9d2: 8a05 bb97 a7c7 7273 1d66 5372 20d0 5ec6 ......srf.rS. .^ 803e9e2: 3449 3930 4397 35d1 ab6c f1d0 0671 70ba I409.C.5l...q..p 803e9f2: 255b c203 5550 bb63 7d15 b46a 3585 014b [%..PUc..}j..5K. 803ea02: b4fb ea5e 4b34 8f47 9668 8141 d0c9 6845 ..^.4KG.h.A...Eh 803ea12: d4a5 68f5 28c5 2592 6c3d 3615 2848 a5b5 ...h.(.%=l.6H(.. 803ea22: 0c80 e53e 88cc 24f7 426f 3756 2872 f0cb ..>....$oBV7r(.. 803ea32: 4a4f 930e 2ba1 5048 00ac 915a b27b 438c OJ...+HP..Z.{..C 803ea42: 864f 3004 c0e3 962b edc5 2f90 b94c d88a O..0..+..../L... 803ea52: a70c fee2 e08a 598f 0897 200d 47ba 0bf8 .......Y... .G.. 803ea62: 713a 6288 83e0 dc3b 0c7b 167a ec34 0691 :q.b..;.{.z.4... 803ea72: 8b87 e2a6 84ba 4c81 a075 a9d1 aae9 92b3 .......Lu....... 803ea82: 4fe5 cd4a 9fcb 386d 14cd 725d 1e48 4fe4 .OJ...m8..]rH..O 803ea92: 48a0 7338 8a16 6a9d 842d 99d8 3d62 6a37 .H8s...j-...b=7j 803eaa2: 2d30 2881 9a8c f6f9 a1a2 9483 6511 68b4 0-.(.........e.h 803eab2: 7de8 7a1e b77f 17d3 0027 3ded a777 d08f .}.z....'..=w... 803eac2: 194f 0750 99b1 7d86 994c 0fa4 49b4 c503 O.P....}L....I.. 803ead2: 951d d3ea c7d0 7cad 0342 4fdf f53f d2c0 .......|B..O?... 803eae2: da3d 062b 523f 7046 d832 6b03 ea26 b1e1 =.+.?RFp2..k&... 803eaf2: 4c63 4321 762b 5f0d a3e9 7187 714e bffa cL!C+v._...qNq.. 803eb02: 324d 49ca 963a a381 1fc5 10e5 91c1 3232 M2.I:.........22 803eb12: 30ec be95 04aa 70a4 e50e a90c d292 56d5 .0.....p.......V 803eb22: fa7f 5e24 c139 f7ff fb56 5d8a 5510 b1e1 ..$^9...V..].U.. 803eb32: dc64 b7d7 560d c44a 44f5 85ff 5a27 face d....VJ..D..'Z.. 803eb42: 6c53 5cd2 127d 8da3 137c 8bdc 4e5d a29b Sl.\}...|...]N.. 803eb52: 5f97 d389 63a8 6b2e 8e84 c11c 596d 7b79 ._...c.k....mYy{ 803eb62: f5e8 3d6f 971f 27f4 6c4f 6f60 7f85 7a1b ..o=...'Ol`o...z 803eb72: 89e1 f252 e1f0 e04c 272b 3ec4 1953 9d44 ..R...L.+'.>S.D. 803eb82: 5937 bce3 7287 2827 b1a5 f946 2020 9189 7Y...r'(..F. .. 803eb92: 165c 176e 88ea c5f9 7368 683b cda6 381c \.n.....hs;h...8 803eba2: e776 860c edf2 60cf 9c40 5236 c83b 019f v......`@.6R;... 803ebb2: fb59 ecd2 27c1 0206 534c 06fb 47b8 8581 Y....'..LS...G.. 803ebc2: c7a7 5a87 f3db 49ca 8735 8dd2 afa7 cfdf ...Z...I5....... 803ebd2: ab5c eef2 9d35 0564 8394 094c 8cf5 4872 \...5.d...L...rH 803ebe2: 3340 aa6d c363 5ba6 b8da 8584 c10d 46bb @3m.c..[.......F 803ebf2: e5be e947 badc 5890 37c0 295c 3b3f 588e ..G....X.7\)?;.X 803ec02: 5dcd ca24 7015 3e50 98c6 9411 2d29 4a28 .]$..pP>....)-(J 803ec12: ec16 83c8 4e99 ba54 6fd2 0e45 27e4 95f5 .....NT..oE..'.. 803ec22: 596e 7a0a 1045 b1f0 6d03 0046 37a9 e028 nY.zE....mF..7(. 803ec32: 1206 6bdc c739 3cbd c64c f1d9 3b76 609e ...k9........ 803ecc2: 93bb 0caa 66dc cae9 6093 111b fb70 5e1a .....f...`..p..^ 803ecd2: 445a d215 62a1 a1d2 4af0 7021 ea60 f057 ZD...b...J!p`.W. 803ece2: 23b4 f659 11b2 9c3c bd0c 070b d330 d5ff .#Y...<.....0... 803ecf2: 6d2b aafd a8be ee5f cb4d 0142 a157 a1ce +m...._.M.B.W... 803ed02: 8743 935e 5edc d2e5 f3ab 182c a227 9792 C.^..^....,.'... 803ed12: 9b35 f414 4534 c6cf 09a7 c55b 2b45 9f0c 5...4E....[.E+.. 803ed22: d89c 12dd c1ec cc31 d5bd 2b43 480a a1c1 ......1...C+.H.. 803ed32: 2797 41f2 d4d5 ac84 b4f0 436b f573 920c .'.A......kCs... 803ed42: eb7a 44a7 74e3 1fea f67a 9fbe 67c8 ae64 z..D.t..z....gd. 803ed52: 3e05 4c24 f1d8 cff8 b008 2014 92ff 4cc0 .>$L....... ...L 803ed62: cf49 8b14 9d21 e6a0 fac6 3d26 03d4 60bb I...!.....&=...` 803ed72: 5cdf b92a 7978 0c93 d05f bdcf a708 8237 .\*.xy.._.....7. 803ed82: 1cf1 bbaf 6f54 d52f 4828 8719 d913 e0ca ....To/.(H...... 803ed92: d2ed 58fc 3db3 6792 8261 2170 6944 8696 ...X.=.ga.p!Di.. 803eda2: 7337 3c62 e11c 484f c4e6 2b93 67fc 8a0d 7sb<..OH...+.g.. 803edb2: 6bdd 0a2e 1093 f6c0 cfa4 16f2 52e4 1f78 .k...........Rx. 803edc2: 75b4 2064 1b76 2e42 9eb4 65e5 4be8 4503 .ud v.B....e.K.E 803edd2: 4090 1644 48cd b87f b8e1 6b70 ff2d 1c87 .@D..H....pk-... 803ede2: 7f72 808a 7cec bd60 3887 1d32 df93 18a0 r....|`..82..... 803edf2: cf59 cf4b ea56 a0eb d553 3674 fc9f 7693 Y.K.V...S.t6...v 803ee02: e956 4999 e684 7054 a740 d8ab d6cb 5ae3 V..I..Tp@......Z 803ee12: 5914 9947 0305 847f 8860 0d48 3c68 b5a6 .YG.....`.H.h<.. 803ee22: b883 9e48 beb7 ee12 9c9e 3b58 2c81 3acd ..H.......X;.,.: 803ee32: 9d00 75c8 0f15 d08d df95 7b1d bc65 7e0b ...u.......{e..~ 803ee42: 9f26 291e 7523 e272 9819 d77a ef6b 65e3 &..)#ur...z.k..e 803ee52: 6cd4 fd1c 6922 21f1 e4a6 b72c 6ce3 932b .l.."i.!..,..l+. 803ee62: c75c dc11 6d0a 9d43 25de 4701 4a7e 4479 \....mC..%.G~JyD 803ee72: c20e 8265 87a2 1436 6656 37a7 c6b2 52dd ..e...6.Vf.7...R 803ee82: 9700 38dc 049b 4156 dfd4 6fd1 5db0 8718 ...8..VA...o.].. 803ee92: f882 0490 efa9 2b16 d660 d5f2 0b02 7727 .......+`.....'w 803eea2: b648 7a0c 1ff1 1308 6576 2f81 273c 0784 H..z....ve./<'.. 803eeb2: 601b e04d bba9 21ed 571e a6c8 af4e c88c .`M....!.W..N... 803eec2: 2751 0bc0 2456 f32b 32b3 2860 7fcb fc8a Q'..V$+..2`(.... 803eed2: af04 e2ed 5da8 8f40 dc90 6195 48bb a6a8 .....]@....a.H.. 803eee2: 678b ced2 84ab cf8e 86ab cbbe 508c 6bfe .g...........P.k 803eef2: b00c ec08 b220 05e4 2390 2b76 d25c a9a1 .... ....#v+\... 803ef02: bb17 d782 d4d4 d615 4256 3a58 466a 1d84 ........VBX:jF.. 803ef12: 7a88 b732 6f08 a2c4 a050 a67b 312c 3111 .z2..o..P.{.,1.1 803ef22: 14b4 77ab d494 202e a79b 10dc a2a6 14e8 ...w... ........ 803ef32: 8b61 106e 7160 62b0 a4fc 4492 de9c 94e6 a.n.`q.b...D.... 803ef42: 1ede 5899 fc87 4b9b 0172 8051 c845 d017 ...X...Kr.Q.E... 803ef52: 1903 b007 635e 640d bcb6 dbf6 d39e e4d0 ....^c.d........ 803ef62: 994c 417b a32f 85bf 2d82 5c45 0826 b013 L.{A/....-E\&... 803ef72: 620b 55cd 6070 fcb9 53a3 e43d b127 b7b2 .b.Up`...S=.'... 803ef82: f873 a776 655a c76e f6c4 7c45 6a4b 4ad2 s.v.Zen...E|Kj.J 803ef92: 01bd 6a42 1ee8 4a9f 41f9 bc08 fefc ac0d ..Bj...J.A...... 803efa2: 3891 f782 c7db 3478 7da7 3b65 203e 452e .8....x4.}e;> .E 803efb2: 19f7 46f4 070d e791 07f7 e3b8 df4e be07 ...F........N... 803efc2: 0877 a757 c3a9 acdc 37d5 1ab6 43fc 9ed7 w.W......7...C.. 803efd2: 868f cc01 03fd f13c 5ed5 3d5d 3c3c 1eac ......<..^]=<<.. 803efe2: ab36 d461 c55f 85b5 2ada c41a 679d ff32 6.a._....*...g2. 803eff2: 8783 77eb c2e9 b690 6ad6 b41d 9b5a d0cf ...w.....j..Z... 803f002: ab4c a5b2 9a35 a549 d4d1 06b6 6695 f6a3 L...5.I......f.. 803f012: 52ac 696f a435 5b2b 6549 bf0b 2a0f adeb .Roi5.+[Ie...*.. 803f022: 3567 a5ca 4254 8305 a346 5075 ae69 6635 g5..TB..F.uPi.5f 803f032: 01f3 b549 a2d1 95b6 c350 462f faad a6ba ..I.....P./F.... 803f042: 3720 1b2b 4acd 0363 d5dd 36b7 3ff9 3212 7+..Jc....6.?.2 803f052: c34f 7217 2a35 68d9 286a 0e40 92ff b9b9 O..r5*.hj(@..... 803f062: 022c 2d90 3550 bec0 6118 5a48 330d d46a ,..-P5...aHZ.3j. 803f072: 2ab6 f3b8 35a4 d737 6baa d798 56c6 0d75 .*...57..k...Vu. 803f082: f155 c2b3 7059 36a7 17c5 8981 f972 2d33 U...Yp.6....r.3- 803f092: 60c9 4d64 0ad1 cfd7 271a 5128 7f2e 9a52 .`dM.....'(Q..R. 803f0a2: 5e61 50e8 87f7 2990 acae 63e4 564e 0e48 a^.P...)...cNVH. 803f0b2: e1c1 d07e 7abf f105 789b 8902 b69f 8578 ..~..z...x....x. 803f0c2: e867 9ee1 e726 7d30 eb88 af4a becf 0880 g...&.0}..J..... 803f0d2: 7857 e56e 23c7 4d91 432c b5a3 0079 129c Wxn..#.M,C..y... 803f0e2: d746 30b1 0b5a 6cc8 01ad 83ed 634a fd6d F..0Z..l....Jcm. 803f0f2: a559 0eb1 692a a1ad 5688 5f13 1507 a706 Y...*i...V._.... 803f102: 4e02 5c27 2038 8260 0345 4fc8 a5b8 a317 .N'\8 `.E..O.... 803f112: 0826 b6aa 3eb6 34ac 3536 0408 3a20 a6ea &....>.465.. :.. 803f122: c351 895a f08e db31 5615 3a90 2023 4774 Q.Z...1..V.:# tG 803f132: 2b55 2aa2 b977 b9c1 ab49 60c5 a203 d164 U+.*w...I..`..d. 803f142: 322d 63b8 a000 b9ed c1a5 4a1b d70b bfe5 -2.c.......J.... 803f152: a3f0 78e3 9149 4217 54a8 da3f 340a b6b6 ...xI..B.T?..4.. 803f162: cdb4 737a 6958 1a35 fe1a 3f03 025b 34ab ..zsXi5....?[..4 803f172: 8115 2076 ab60 ff45 50a9 03fe 18ee 43f7 ..v `.E..P.....C 803f182: 736c b820 8cf1 304b c26d 2f1c b0c0 dade ls ...K0m../.... 803f192: aec0 00df aec9 ec81 16d7 d441 59c0 2eb8 ..........A..Y.. 803f1a2: a33a b47f 7222 eadd baad d9b6 6de4 efff :..."r.......m.. 803f1b2: 3376 a473 42d8 f99a 6e0d 7dfa 814a d826 v3s..B...n.}J.&. 803f1c2: eaba a5c1 8d1f d666 5bd7 e6da 3ad6 f531 ......f..[...:1. 803f1d2: f5b5 3aca d436 26d6 0dd6 0db9 3fac 6bfe ...:6..&.....?.k 803f1e2: 06f8 6cbd eb6a fa75 1005 25ca fe08 df4f ...lj.u....%..O. 803f1f2: 84a2 7796 a1b3 d26d 6b46 c0b6 1bf2 f8eb ...w..m.Fk...... 803f202: 6c6a 9ed4 c0b5 1b3a 16da 2b38 4098 d9b2 jl....:...8+.@.. 803f212: 96c4 ab5a 433d ab56 5e81 da90 0fc2 27d0 ..Z.=CV..^.....' 803f222: dcf1 7c4d ab3e bba0 b40d 56bf 4e47 b37d ..M|>......VGN}. 803f232: 549e a8d6 a352 87c1 ad4f b5a5 cb68 9783 .T..R...O...h... 803f242: 5aa3 46bd ead5 04eb 7f20 1c8a cd2a 5601 .Z.F.... ...*..V 803f252: 1d44 0382 738d fa1d 4989 4d50 042a a2b5 D....s...IPM*... 803f262: 4d0a 51a3 0ee7 9ac1 1708 0a34 ad4c 0cfe .M.Q......4.L... 803f272: 0afb e113 e271 2c06 a6fa 57c1 f068 9acf ....q..,...Wh... 803f282: 4af5 89ab 57c1 6ad6 16c9 8a46 d21d 4702 .J...W.j..F....G 803f292: e1ab 2334 6034 d4df c212 068c bccc e118 ..4#4`.......... 803f2a2: ac6c 1711 c03a 606f 0d7e 6ecd 5b6a 9c35 l...:.o`~..nj[5. 803f2b2: 359c 051c 89f8 fd34 aadb 31d1 900a 5aca .5....4....1...Z 803f2c2: 1443 5c24 5806 e924 56df d2ed 09ac 067f C.$\.X$..V...... 803f2d2: 18a4 8d49 6267 394f 529a bdbc 80b5 9ae4 ..I.gbO9.R...... 803f2e2: 147f 6259 81ab 6f29 3fac 6b5b bf82 316f ..Yb..)o.?[k..o1 803f2f2: c052 9365 b126 4a5a 341e e937 5900 d503 R.e.&.ZJ.47..Y.. 803f302: 2ca8 0cc2 0f21 83e9 3afa 6ce1 bd7d 2c42 .,..!....:.l}.B, 803f312: 4ea9 4152 a9bd 36b5 5806 3a22 d661 84e9 .NRA...6.X":a... 803f322: 1641 418a 1b52 79f4 d950 3aa2 2454 1232 A..AR..yP..:T$2. 803f332: 3e51 1ae0 8154 421a 2259 a49a 5e2e 308c Q>..T..BY"...^.0 803f342: 7a82 f203 66ca 4d0b 3637 5071 826d 20fc .z...f.M76qPm.. 803f352: b0d1 837c 8513 1a44 a9d9 7e14 be20 60b0 ..|...D....~ ..` 803f362: c074 81fd 6a61 262c 94b1 7dc4 3149 4207 t...aj,&...}I1.B 803f372: 9092 d091 00e4 5f6d 0d7a 837f fe93 5877 ......m_z.....wX 803f382: 3c45 435b 9297 e53f 2880 008a 7f13 01d7 E<[C..?..(...... 803f392: 666f 417e 8092 5758 33ba 60b1 ff51 0278 of~A..XW.3.`Q.x. 803f3a2: bd62 db55 801c 0f5e 5f08 a203 03dc dc9a b.U...^.._...... 803f3b2: 7088 0158 0732 4624 42ca e4fe 8052 2171 .pX.2.$F.B..R.q! 803f3c2: 6480 7d19 1171 e0ea 68dc 901c b034 a240 .d.}q....h..4.@. 803f3d2: 83a8 2d79 2916 7e08 a456 e860 9979 3b82 ..y-.).~V.`.y..; 803f3e2: d3ff e1ee e41d ffc6 188f 0a41 7ba6 692d ..........A..{-i 803f3f2: 0647 ea37 a7a7 7f9d c101 087e 973c 0072 G.7.......~.<.r. 803f402: 2f00 . 0803f403 : 803f403: 692f 646e 7865 682e 6d74 006c 5448 5054 /index.html.HTTP 803f413: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803f423: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803f433: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803f443: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803f453: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803f463: 6e65 2d74 654c 676e 6874 203a 3031 3937 ent-Length: 1079 803f473: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803f483: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803f493: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 803f4a3: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803f4b3: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 803f4c3: 0a04 56bd 6f5d 44e3 fd14 832b 6979 baa5 ...V]o.D..+.yi.. 803f4d3: fba1 2084 54b6 8bba 4fb4 10ac f620 9a29 ... .T...O.. .). 803f4e3: 93d8 1678 ed7f 9278 6fb4 60fd 5161 8291 ..x...x..o.`aQ.. 803f4f3: a010 e17d 17f3 8174 9a40 dda6 30bf 47fe ..}...t.@....0.G 803f503: 3b9c bb8e 3521 5961 7d89 93b0 e7b1 7bde .;..!5aY.}.....{ 803f513: b9ee 5ee7 fb4f dbb5 edef 707d deff 161d ...^O.....}p.... 803f523: 24e9 dbf6 6774 4f31 9efb 60e3 7825 b7e8 .$..tg1O...`%x.. 803f533: a113 0b39 ae22 a10a 673d 7ba0 9bee 6778 ..9."...=g.{..xg 803f543: 469f e75a 78ae 9038 cf43 d8f9 70fd ddd7 .FZ..x8.C....p.. 803f553: 92cb 6b9c 8dd9 c385 2c82 22d5 c985 3bdd ...k.....,."...; 803f563: 089e a2fb 4a36 2279 673c c528 cf28 5e94 ....6Jy"...Vc...nN.. 803f853: fc2b 9a94 7ece 5783 0387 a0e5 2265 b13a +....~.W....e":. 803f863: d9e8 b581 273a 07fe 4045 3f09 e923 d047 ....:'..E@.?#.G. 803f873: ea2c c20e 0c41 d78d c599 8f58 f0d7 5655 ,...A.....X...UV 803f883: 1bfe ccb4 0011 3580 2140 9e45 8913 7e76 .......5@!E...v~ 803f893: f435 284f d677 fd55 7027 817f 76cb e564 5.O(w.U.'p...vd. 803f8a3: 3169 d8a8 834e 9537 acbd 5bb7 de8d 356e i1..N.7....[..n5 803f8b3: 6b61 e3aa cba2 d3ab 0bd2 b81c 79ec efed ak...........y.. 803f8c3: ae07 56b5 c87e 7f35 c717 bba7 c6e9 56e6 ...V~.5........V 803f8d3: 15ce 8a4f 05f7 7c86 6d11 be6c ae8d 67b1 ..O....|.ml....g 803f8e3: b43c 3d8f fefc 4905 2b6e 0ce6 000b 2f00 <..=...In+..... 0803f8f2 : 803f8f2: 662f 7661 6369 6e6f 692e 6f63 0000 0000 /favicon.ico.... 803f902: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803f912: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803f922: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803f932: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803f942: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803f952: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803f962: 3131 3035 0a0d 6f43 6e6e 6365 6974 6e6f 1150..Connection 803f972: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803f982: 742d 7079 3a65 6920 616d 6567 782f 692d -type: image/x-i 803f992: 6f63 0d6e 430a 6361 6568 432d 6e6f 7274 con..Cache-Contr 803f9a2: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803f9b2: 612d 6567 383d 3436 3030 0a0d 0a0d 0000 -age=86400...... 803f9c2: 0001 0001 1010 0000 0000 0020 0468 0000 .......... .h... 803f9d2: 0016 0000 0028 0000 0010 0000 0020 0000 ....(....... ... 803f9e2: 0001 0020 0000 0000 0440 0000 0000 0000 .. .....@....... 803f9f2: 0000 0000 0000 0000 0000 0000 ffff 01ff ................ 803fa02: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fa12: ffff 01ff ffff 01ff d2d2 ffd2 d2d2 ffd2 ................ 803fa22: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fa32: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fa42: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fa52: 8d8d ff8d 8484 ff84 8989 ff89 8989 ff89 ................ 803fa62: 8484 ff84 8d8d ff8d ffff 01ff ffff 01ff ................ 803fa72: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fa82: ffff 01ff ffff 01ff a4a4 ffa4 8484 ff84 ................ 803fa92: aeae ffae ffff 01ff ffff 01ff ffff 01ff ................ 803faa2: ffff 01ff aeae ffae 8484 ff84 a4a4 ffa4 ................ 803fab2: ffff 01ff ffff 01ff 8181 ff81 ffff 01ff ................ 803fac2: ffff 01ff a0a0 ffa0 9a9a ff9a ffff 01ff ................ 803fad2: c7c7 ffc7 8f8f ff8f 8585 ff85 8585 ff85 ................ 803fae2: 8f8f ff8f caca ffca ffff 01ff d5d5 ffd5 ................ 803faf2: ffff 01ff 7777 ff77 ffff 01ff ffff 01ff ....www......... 803fb02: d5d5 ffd5 8484 ff84 ffff 01ff a8a8 ffa8 ................ 803fb12: 8c8c ff8c bbbb ffbb ffff 01ff ffff 01ff ................ 803fb22: baba ffba afaf ffaf ffff 01ff ffff 01ff ................ 803fb32: 6465 ff5b ffff 01ff ffff 01ff ffff 01ff ed[............. 803fb42: 9898 ff98 b0b0 ffb0 d5d5 ffd5 8484 ff84 ................ 803fb52: dada ffda 9595 ff95 8484 ff84 9d9d ff9d ................ 803fb62: d7d7 ffd7 ffff 01ff 9898 ff97 7a7b ff73 ............{zs. 803fb72: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803fb82: 9393 ff93 ffff 01ff a4a4 ffa4 bebe ffbe ................ 803fb92: bdbd ffbd d1d1 ffd1 ffff 01ff ffff 01ff ................ 803fba2: b4b5 ffae 5f5f ff5d 979d ff6b c0d2 ff55 ....__]...k...U. 803fbb2: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803fbc2: f0f0 fff0 ffff 01ff f1f1 fff1 ffff 01ff ................ 803fbd2: d5d5 ffd5 cfd0 ffce 8585 ff85 6060 ff60 ............```. 803fbe2: 9194 ff85 b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803fbf2: ffff 01ff b4c9 ff33 ffff 01ff 6262 ff62 ......3.....bbb. 803fc02: 5d5e ff5c 5c5c ff5c 5d5e ff5c 6161 ff60 ^]\.\\\.^]\.aa`. 803fc12: 6567 ff5b 8486 ff7b ffff 01ff ffff 01ff ge[...{......... 803fc22: ffff 01ff b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803fc32: ffff 01ff b4c9 ff33 ffff 01ff ffff 01ff ......3......... 803fc42: b5c9 ff35 ffff 01ff c0d2 ff55 ffff 01ff ..5.......U..... 803fc52: c4d4 ff5e c3d4 ff5c ffff 01ff ffff 01ff ..^...\......... 803fc62: c3d4 ff5c c4d4 ff5e cedb ff79 c0d2 ff55 ..\...^...y...U. 803fc72: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803fc82: c0d1 ff54 cfdc ff7d ffff 01ff b4c9 ff33 ..T...}.......3. 803fc92: ffff 01ff bed0 ff50 b4c9 ff33 b4c9 ff33 ......P...3...3. 803fca2: c0d2 ff55 ffff 01ff b4c9 ff33 ffff 01ff ..U.......3..... 803fcb2: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803fcc2: ffff 01ff b4c9 ff33 ffff 01ff cad9 ff6f ......3.......o. 803fcd2: b9cc ff41 d6e1 ff8f ffff 01ff ffff 01ff ..A............. 803fce2: d5e0 ff8c b9cc ff40 cedb ff79 ffff 01ff ......@...y..... 803fcf2: b4c9 ff33 ffff 01ff ffff 01ff ffff 01ff ..3............. 803fd02: ffff 01ff c5d5 ff62 c1d2 ff58 ffff 01ff ......b...X..... 803fd12: ffff 01ff bbce ff46 b5c9 ff35 b5c9 ff35 ......F...5...5. 803fd22: bbce ff46 ffff 01ff ffff 01ff c0d2 ff55 ..F...........U. 803fd32: c5d5 ff62 ffff 01ff ffff 01ff ffff 01ff ..b............. 803fd42: ffff 01ff ffff 01ff c8d7 ff69 b4c9 ff33 ..........i...3. 803fd52: cedb ff79 ffff 01ff ffff 01ff ffff 01ff ..y............. 803fd62: ffff 01ff cedb ff79 b4c9 ff33 c8d7 ff69 ......y...3...i. 803fd72: ffff 01ff ffff 01ff ffff 01ff ffff 0dff ................ 803fd82: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fd92: b9cd ff42 b4c9 ff33 b7cb ff3b b7cb ff3b ..B...3...;...;. 803fda2: b4c9 ff33 b9cd ff42 ffff 01ff ffff 01ff ..3...B......... 803fdb2: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fdc2: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fdd2: ffff 01ff ffff 01ff e4eb ffb5 e4eb ffb5 ................ 803fde2: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803fdf2: ffff 01ff ffff 01ff ffff 01ff 0000 ffff ................ 803fe02: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803fe12: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803fe22: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803fe32: 0000 ffff 0000 ffff 0000 ffff 5825 4c00 ............%X.L 803fe42: 676f 756f 5474 726d 3f00 4800 5454 2f50 ogoutTmr.?.HTTP/ 803fe52: 2e31 2030 3032 2030 4b4f 0a0d 6f43 746e 1.0 200 OK..Cont 803fe62: 6e65 2d74 7954 6570 743a 7865 2f74 7468 ent-Type:text/ht 803fe72: 6c6d 0a0d 6553 2d74 6f43 6b6f 6569 203a ml..Set-Cookie: 803fe82: 6e75 6d61 3d65 0d00 530a 7465 432d 6f6f uname=...Set-Coo 803fe92: 696b 3a65 6920 3d64 0d00 530a 7465 432d kie: id=...Set-C 803fea2: 6f6f 696b 3a65 7220 6c6f 3d65 0030 0a0d ookie: role=0... 803feb2: 6553 2d74 6f43 6b6f 6569 203a 7561 6874 Set-Cookie: auth 803fec2: 303d 3c00 4421 434f 5954 4550 6820 6d74 =0......& 803ff32: 6c00 676f 6e69 003d 6170 7373 6f77 6472 .login=.password 803ff42: 003d 0a0d 6553 2d74 6f43 6b6f 6569 203a =...Set-Cookie: 803ff52: 6f72 656c 003d 9fd0 bed0 bbd0 8cd1 b7d0 role=........... 803ff62: bed0 b2d0 b0d0 82d1 b5d0 bbd0 8cd1 6600 ...............f 803ff72: 6e75 3d63 7200 6265 6f6f 0074 90d0 b4d0 unc=.reboot..... 803ff82: bcd0 b8d0 bdd0 b8d0 81d1 82d1 80d1 b0d0 ................ 803ff92: 82d1 bed0 80d1 d028 d19e d181 d082 d0b0 ......(......... 803ffa2: d0bd d0be 29b2 d000 d192 d08b d0ba d1bb .....).......... 803ffb2: d18e d087 d0b5 d0bd d0b8 20b5 bdd0 b0d0 ........... .... 803ffc2: b3d0 80d1 83d1 b7d0 bad0 b8d0 d020 d098 ............ ... 803ffd2: d091 209f bed0 82d1 bcd0 b5d0 bdd0 b5d0 ... ............ 803ffe2: bdd0 bed0 0021 92d0 8bd1 bad0 bbd0 8ed1 ....!........... 803fff2: 87d1 b5d0 bdd0 b8d0 b5d0 d020 d0bd d0b0 .......... ..... 8040002: d1b3 d180 d083 d0b7 d0ba 20b8 98d0 91d0 ........... .... 8040012: 9fd0 d020 d0bd 20b5 83d1 b4d0 b0d0 bbd0 .. .... ........ 8040022: bed0 81d1 8cd1 d020 d1be d082 d0bc d0b5 ...... ......... 8040032: d0bd d1b8 d182 218c 6f00 6666 6100 7466 .......!.off.aft 8040042: 7265 003d 9ed0 82d1 bad0 bbd0 8ed1 87d1 er=............. 8040052: b5d0 bdd0 b8d0 b5d0 d020 d0bd d0b0 d1b3 ........ ....... 8040062: d180 d083 d0b7 d0ba 20b8 98d0 91d0 9fd0 ......... ...... 8040072: 0021 9ed0 82d1 bad0 bbd0 8ed1 87d1 b5d0 !............... 8040082: bdd0 b8d0 b5d0 d020 d0bd d0b0 d1b3 d180 ...... ......... 8040092: d083 d0b7 d0ba 20b8 98d0 91d0 9fd0 d020 ....... ...... . 80400a2: d0bd 20b5 83d1 b4d0 b0d0 bbd0 bed0 81d1 ... ............ 80400b2: 8cd1 0021 7473 706f d000 d0a2 d1b5 d181 ..!.stop........ 80400c2: 2082 bed0 81d1 82d1 b0d0 bdd0 bed0 b2d0 . .............. 80400d2: bbd0 b5d0 bdd0 0021 a2d0 b5d0 81d1 82d1 ......!......... 80400e2: d020 d0bd 20b5 83d1 b4d0 b0d0 bbd0 bed0 .... .......... 80400f2: 81d1 8cd1 d020 d1be d181 d082 d0b0 d0bd .... ........... 8040102: d0be d0b2 d1b8 d182 218c 6400 7369 6863 .........!.disch 8040112: 7261 6567 d000 d0a2 d1b5 d181 2082 b7d0 arge......... .. 8040122: b0d0 bfd0 83d1 89d1 b5d0 bdd0 0021 90d0 ............!... 8040132: b4d0 bcd0 b8d0 bdd0 b8d0 81d1 82d1 80d1 ................ 8040142: b0d0 82d1 bed0 80d1 2820 97d0 b0d0 bfd0 ........ (...... 8040152: 83d1 89d1 b5d0 bdd0 0029 a2d0 b5d0 81d1 ........)....... 8040162: 82d1 d020 d0bd 20b5 83d1 b4d0 b0d0 bbd0 .. .... ........ 8040172: bed0 81d1 8cd1 d020 d0b7 d0b0 d1bf d183 ...... ......... 8040182: d181 d082 d1b8 d182 218c 7400 6d69 0065 .........!.time. 8040192: 776f 656e 3d72 7300 7379 6f4c 6163 6974 owner=.sysLocati 80401a2: 6e6f 003d 6f63 6d6d 6e65 3d74 7200 6165 on=.comment=.rea 80401b2: 5f64 6f63 6d6d 6e75 7469 3d79 7700 6972 d_community=.wri 80401c2: 6574 635f 6d6f 756d 696e 7974 003d 616d te_community=.ma 80401d2: 616e 6567 4972 3d50 6d00 6e61 6761 7265 nagerIP=.manager 80401e2: 5049 3d32 6d00 6e61 6761 7265 5049 3d33 IP2=.managerIP3= 80401f2: 6d00 6e61 6761 7265 5049 3d34 6d00 6e61 .managerIP4=.man 8040202: 6761 7265 5049 3d35 6400 6368 3d70 6900 agerIP5=.dhcp=.i 8040212: 6170 6464 3d72 6700 3d77 6d00 7361 3d6b paddr=.gw=.mask= 8040222: 7300 6177 7475 3d68 7200 5f73 6e65 6261 .swauth=.rs_enab 8040232: 656c 3d64 7200 5f73 6573 7672 7265 003d led=.rs_server=. 8040242: 7372 705f 726f 3d74 7200 5f73 7770 3d64 rs_port=.rs_pwd= 8040252: 7200 5f73 656b 3d79 6400 3169 003d 6f72 .rs_key=.di1=.ro 8040262: 3d31 7200 326f 003d 746e 3d70 6e00 7074 1=.ro2=.ntp=.ntp 8040272: 6573 7672 7069 003d 6974 656d 003d 7475 servip=.time=.ut 8040282: 3d63 4800 5454 0050 7270 646f 7461 3d65 c=.HTTP.prodate= 8040292: 4800 5454 2f50 2e31 2030 3032 2030 4b4f .HTTP/1.0 200 OK 80402a2: 0a0d 6f43 746e 6e65 2d74 7954 6570 743a ..Content-Type:t 80402b2: 7865 2f74 7468 6c6d 0a0d 0a0d 7254 6575 ext/html....True 80402c2: 7000 6761 3d65 6100 6c6c 4800 5454 2f50 .page=.all.HTTP/ 80402d2: 2e31 2031 3032 2030 4b4f 0a0d 6f43 746e 1.1 200 OK..Cont 80402e2: 6e65 2d74 654c 676e 6874 253a 756c 0a0d ent-Length:%lu.. 80402f2: 0a0d 7325 7500 6573 6e72 6d61 3d65 6f00 ..%s.username=.o 8040302: 646c 6170 7373 003d 656e 7077 7361 3d73 ldpass=.newpass= 8040312: d000 d09f d1b0 d080 d0be d1bb 208c 83d1 ............. .. 8040322: 81d1 bfd0 b5d0 88d1 bdd0 bed0 d020 d0b8 ............ ... 8040332: d0b7 d0bc d0b5 d1bd d091 00bd 92d0 b2d0 ................ 8040342: b5d0 b4d0 b5d0 bdd0 8bd1 d020 d0bd d0b5 .......... ..... 8040352: d0ba d1be d180 d080 d0b5 d1ba d082 d1bd ................ 8040362: d08b 20b5 b4d0 b0d0 bdd0 bdd0 8bd1 b5d0 ... ............ 8040372: 0021 92d0 b2d0 b5d0 b4d0 91d1 bdd0 d020 !............. . 8040382: d0bd d0b5 d0b2 d1b5 d080 d1bd d08b 20b9 ............... 8040392: bfd0 b0d0 80d1 bed0 bbd0 8cd1 0021 4547 ............!.GE 80403a2: 2054 6d2f 6961 2e6e 7363 0073 4547 2054 T /main.css.GET 80403b2: 722f 746f 6b65 702e 676e 4700 5445 2f20 /rotek.png.GET / 80403c2: 6166 6976 6f63 2e6e 6369 006f 4547 2054 favicon.ico.GET 80403d2: 722f 6c6f 2e65 736a 5000 534f 2054 6c2f /role.js.POST /l 80403e2: 676f 6e69 632e 6967 2f00 6f6c 6967 2e6e ogin.cgi./login. 80403f2: 7468 6c6d 5400 6f6f 6c20 6e6f 2067 4f50 html.Too long PO 8040402: 5453 7220 7165 6575 7473 0d21 000a 4547 ST request!...GE 8040412: 2054 6d2f 6961 2e6e 736a 4700 5445 2f20 T /main.js.GET / 8040422: 6573 7474 6e69 7367 682e 6d74 006c 692f settings.html./i 8040432: 646e 7865 682e 6d74 006c 4547 2054 692f ndex.html.GET /i 8040442: 666e 2e6f 7468 6c6d 4700 5445 2f20 6968 nfo.html.GET /hi 8040452: 7473 726f 2e79 7468 6c6d 4700 5445 2f20 story.html.GET / 8040462: 7075 5f73 6968 7473 726f 2e79 7468 6c6d ups_history.html 8040472: 4700 5445 2f20 6567 4a74 6f73 2e6e 6763 .GET /getJson.cg 8040482: 0069 4547 2054 732f 7465 6974 676e 2e73 i.GET /settings. 8040492: 6763 0069 4f50 5453 2f20 6573 7474 6e69 cgi.POST /settin 80404a2: 7367 632e 6967 6d00 6e61 6761 7265 5049 gs.cgi.managerIP 80404b2: 4800 5454 2f50 2e31 2031 3032 2030 4b4f .HTTP/1.1 200 OK 80404c2: 0a0d 3c00 4421 434f 5954 4550 6820 6d74 ...< 8040522: 682f 6165 3e64 2f3c 7468 6c6d 0d3e 0d0a /head>... 8040532: 000a 4547 2054 692f 666e 2e6f 6763 0069 ..GET /info.cgi. 8040542: 4f50 5453 2f20 6e69 6f66 632e 6967 6f00 POST /info.cgi.o 8040552: 6e77 7265 3c00 4421 434f 5954 4550 6820 wner. 8040572: 683c 6165 3e64 6d3c 7465 2061 7468 7074 ..... 80405c2: 4547 2054 682f 7369 6f74 7972 632e 6967 GET /history.cgi 80405d2: 4700 5445 2f20 7075 5f73 6968 7473 726f .GET /ups_histor 80405e2: 2e79 6763 0069 4547 2054 622f 7461 745f y.cgi.GET /bat_t 80405f2: 7365 2e74 6763 0069 4547 2054 752f 7370 est.cgi.GET /ups 8040602: 705f 776f 7265 632e 6967 4700 5445 2f20 _power.cgi.GET / 8040612: 6572 6573 2e74 6763 0069 4547 2054 722f reset.cgi.GET /r 8040622: 6265 6f6f 2e74 6763 0069 4547 2054 632f eboot.cgi.GET /c 8040632: 6e6f 6966 6d72 632e 6967 4700 5445 2f20 onfirm.cgi.GET / 8040642: 7766 755f 6470 7461 2e65 6763 0069 4547 fw_update.cgi.GE 8040652: 2054 632f 6168 676e 7065 6477 632e 6967 T /changepwd.cgi 8040662: 4700 5445 2f20 6573 5074 6f72 6164 6574 .GET /setProdate 8040672: 632e 6967 0000 .cgi.. 08040678 : 8040678: b834 0803 b860 0803 b870 0803 1262 0000 4...`...p...b... 8040688: 0001 0000 .... 0804068c : 804068c: 0678 0804 13bc 0804 13d0 0804 0541 0000 x...........A... 804069c: 0001 0000 .... 080406a0 : 80406a0: 6c2f 676f 6e69 682e 6d74 006c 5448 5054 /login.html.HTTP 80406b0: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 80406c0: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 80406d0: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 80406e0: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 80406f0: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8040700: 6e65 2d74 654c 676e 6874 203a 3835 0d37 ent-Length: 587. 8040710: 430a 6e6f 656e 7463 6f69 3a6e 4320 6f6c .Connection: Clo 8040720: 6573 0a0d 6f43 746e 6e65 2d74 7974 6570 se..Content-type 8040730: 203a 6574 7478 682f 6d74 0d6c 430a 6e6f : text/html..Con 8040740: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 8040750: 697a 0d70 0d0a 1f0a 088b 0000 0000 0400 zip............. 8040760: 7d0a cd54 d46e 1030 157e 2463 754e 7bb7 .}T.n.0.~.c$Nu.{ 8040770: a841 91c4 e950 1381 401c a382 cc93 5c6e A...P....@....n\ 8040780: db1c 93d8 eeec e2ad 09c0 c409 2415 015e .............$^. 8040790: 03d1 8845 433e 8df6 2718 6ddb a423 e21e ..E.>C...'.m#... 80407a0: d8f5 e333 67ef d9b4 a7bd 4fcf be5e 7179 ..3..g.....O^.yq 80407b0: 6aca 4c6c a59e 1995 9765 7392 408a 7955 .jlL....e..s.@Uy 80407c0: 00d6 562a 2ad6 4044 5bc9 885c 7447 9c37 ..*V.*D@.[\.Gt7. 80407d0: 88d6 c05e 56bb 9277 16bf 9eaf 1388 78d7 ..^..Vw........x 80407e0: ba85 c030 e959 822c 92a5 a767 aa12 5c25 ..0.Y.,...g...%\ 80407f0: 5917 80d5 9de4 9586 0177 e56f 74ad b585 .Y......w.o..t.. 8040800: a0ac 25d3 2188 d038 a356 4656 52c4 9019 ...%.!8.V.VF.R.. 8040810: 83f3 ad46 d375 fb36 8db8 8610 d140 f293 ..F.u.6.....@... 8040820: 9e88 8d40 f206 5bfe d57f edff b72f fbef ..@....[..../... 8040830: edab 7f79 fb49 6c8b de36 4665 b7db 0eac ..y.I..l6.eF.... 8040840: 90b0 51bc 1eda 3196 1672 48c0 711e 2063 ...Q...1r..H.qc 8040850: 00d6 9d48 1962 47b4 1b86 704f d611 3b38 ..H.b..G..Op..8; 8040860: 9d53 4f1a 8b39 94a1 383c 8703 9167 6792 S..O9...<8..g..g 8040870: 39e3 466d 0ad1 6d57 acf2 1dd2 8d2b 518a .9mF..Wm....+..Q 8040880: ab72 42ba 3605 88fe 160a 35aa 1d78 f42e r..B.6.....5x... 8040890: 2a1a ce81 a753 6aff ea44 6108 cabc b533 .*..S..jD..a..3. 80408a0: 7e83 949f 5b1b b71b 0974 a282 aa8f eba7 .~...[..t....... 80408b0: 76ad a0ab a7bc 4c46 9257 dcef baa1 9e7a .v....FLW.....z. 80408c0: 9ff7 9ffb a97b f57e b63f 481f 4fba 65c4 ....{.~.?..H.O.e 80408d0: c13e 95e3 c305 f586 c19a f014 9578 d3b8 >...........x... 80408e0: c2f9 8685 12a9 b3b5 1392 a4c6 52f4 4673 .............RsF 80408f0: 5393 423b 5de0 ee4c 39ef 2b68 0952 1a55 .S;B.]L..9h+R.U. 8040900: d055 143b eaec de78 257f 2f3f 8f92 0fc7 U.;...x..%?/.... 8040910: 116c e3fd 366c e524 b699 bdbe d26d 63be l...l6$.....m..c 8040920: 25ea 4b12 8932 d093 e869 1406 ff23 96dd .%.K2...i...#... 8040930: ca06 5d80 dcd2 f9f1 7243 0d35 1a40 408b ...]....Cr5.@..@ 8040940: 4570 cbd0 8f1a fcd9 afc8 a8a7 593c a04a pE..........hB...S. 8040980: 2a25 17fd f802 cc9b 24bd b30a ca24 3e74 %*.......$..$.t> 8040990: 1376 ce33 6ceb 17f8 07f8 a233 8ac5 0415 v.3..l....3..... 80409a0: 0000 .. 080409a2 : 80409a2: 692f 666e 2e6f 7468 6c6d 0000 5448 5054 /info.html..HTTP 80409b2: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 80409c2: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 80409d2: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 80409e2: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 80409f2: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8040a02: 6e65 2d74 654c 676e 6874 203a 3031 3839 ent-Length: 1098 8040a12: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8040a22: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8040a32: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 8040a42: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 8040a52: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 8040a62: 0a04 569d 6edd 36db 7e14 5615 69bb 2881 ...V.n.6.~.V.i.( 8040a72: 766e 6035 8096 2b22 0286 1aeb 1da0 5eb0 nv5`.."+.......^ 8040a82: b40d db44 256c 9352 c728 4bbe adb2 68bb ..D.l%R.(..K...h 8040a92: 0e81 30c1 4114 aed7 827b 6b74 b4b6 d389 ...0.A..{.tk.... 8040aa2: a057 68de 21df 272d 9c5e e7ec 3642 c88f W..h.!-'^...B6.. 8040ab2: f7f3 ef9d aa1c e57b 3b93 f7eb 6fee 64dc ......{..;...o.d 8040ac2: 9343 7167 7e97 c659 20d5 020a 8248 71a7 C.gq.~Y.. ..H..q 8040ad2: 1737 b386 c864 4acb 2898 4da8 fc3f 7b08 7...d..J.(.M?..{ 8040ae2: edee 98d0 1422 d75f 1472 5f05 5f86 08dc ...."._.r.._._.. 8040af2: 75d7 705e 7b23 0899 a258 1195 2a0a 6eb7 .u^p#{..X....*.n 8040b02: 2246 881d 4956 5cf1 c144 8a48 42cd e697 F"..VI.\D.H..B.. 8040b12: b9cc 994d 619a 8a94 4c91 e844 1584 a4a9 ..M..a...LD..... 8040b22: 3c91 ab0b 6784 5a22 c95b 58f9 75e6 973e .<...g"Z[..X.u>. 8040b32: 4aeb 4e94 70e0 5d19 0b87 4d23 6226 ccfb .J.N.p.]..#M&b.. 8040b42: 9b4e ed6f b349 8f65 7eed c8f3 361e bb4f N.o.I.e..~...6O. 8040b52: bf1d cdd7 7aa4 86c8 e8a5 4147 a5ce 4d5a .....z....GA..ZM 8040b62: 2aaa a560 a2c8 32a0 4c93 4354 0c21 552c .*`....2.LTC!.,U 8040b72: 2949 c30b a4cc b840 8c46 e74d 1f01 ff71 I)....@.F.M...q. 8040b82: 6036 9955 4144 33a9 fab1 c2a0 8ee1 8f7f 6`U.DA.3........ 8040b92: 0785 a7ad 49d3 4ddc 88e5 1925 aaaf 5028 .....I.M..%...(P 8040ba2: d47c 25e3 7ff3 2a61 bcfa 4cce f62b 58e5 |..%..a*...L+..X 8040bb2: a1a4 05d1 9d2c 09d3 a2c9 fd28 dc56 b3e5 ....,.....(.V... 8040bc2: a5d0 c54a 9578 060a bd08 4c8f 340f c2c5 ..J.x......L.4.. 8040bd2: c0f1 fb4c 6adb 107c 9930 6722 eaa1 a250 ..L..j|.0."g..P. 8040be2: b33a 75a3 ead6 b823 2236 fd2c 5a69 80c4 :..u..#.6",.iZ.. 8040bf2: a96c d8e3 04be 5bba 1f76 1f28 3b34 56cd l......[v.(.4;.V 8040c02: d8f3 a77b 67f3 4075 231d a0d5 f1f2 f6c6 ..{..gu@.#...... 8040c12: a867 936d 3d82 6fb1 3bed b87b 4d5c beaa g.m..=.o.;{.\M.. 8040c22: 4c5e 2791 8e46 a540 05e5 c4a6 eeff 287a ^L.'F.@.......z( 8040c32: a32b 49cb f9eb e6a7 781b 229d a3e4 9f53 +..I.....x."..S. 8040c42: 1a9d f7dc 9d90 7f81 e4b3 0145 1de0 336a ..........E...j3 8040c52: 0336 e18b 05da b1de 05d1 8498 88f1 3267 6.............g2 8040c62: 2345 1568 f4f6 8098 0f26 5d7d 6ee6 eefb E#h.....&.}].n.. 8040c72: b7e7 2837 80b7 3e51 455a cb81 1934 80c8 ..7(..Q>ZE..4... 8040c82: b1a1 1a86 3626 dcee 07bd 4345 6ecc e40b ....&6....EC.n.. 8040c92: 5985 735c 9912 e85e e18c 27b0 299f 8969 .Y\s..^....'.)i. 8040ca2: cc06 82aa f8c3 c087 0f6b 4f48 8867 d91f ........k.HOg... 8040cb2: 9423 0b6b 310d 6444 1a74 d72b c6eb d6f3 #.k..1Ddt.+..... 8040cc2: 4819 af5b 2b4a 3481 474a bb42 f80b ec0e .H[.J+.4JGB..... 8040cd2: f371 b994 bfc2 9346 50ed 0dd9 8546 aa59 q.....F..P..F.Y. 8040ce2: 52e3 0bae 7323 019a a0ee ea73 c4bd 39f6 .R..#s....s....9 8040cf2: 7b42 9b03 cd47 b993 4719 9d54 6c8a c6a9 B{..G....GT..l.. 8040d02: a08f 8ecf 67dd bdf6 d063 fda1 fed3 4646 .....g..c.....FF 8040d12: 5388 ed58 982f 4a29 528d 772c 4bbd 3438 .SX./.)J.R,w.K84 8040d22: 34db 181e fcb8 4162 bfb1 1239 8565 2cf2 .4....bA..9.e.., 8040d32: e18b 8df6 0675 bd12 3421 ed9a bd05 279c ....u...!4.....' 8040d42: 4d3c 61a9 e7cf 8afa da1c 9043 da7e b63c ... 8040d92: 0060 6b07 69d7 9e90 fd8f 6539 800a ec4f `..k.i....9e..O. 8040da2: 3c7b 7847 40fe 5318 7364 cff0 5461 ea93 {..o.K.b....s 8040e92: daf5 67c7 09bf e3e8 2fea 307b 75b5 096c ...g...../{0.ul. 8040ea2: 0000 .. 08040ea4 : 8040ea4: 682f 7369 6f74 7972 682e 6d74 006c 0000 /history.html... 8040eb4: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 8040ec4: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 8040ed4: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 8040ee4: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 8040ef4: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 8040f04: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 8040f14: 3031 3339 0a0d 6f43 6e6e 6365 6974 6e6f 1093..Connection 8040f24: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 8040f34: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 8040f44: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 8040f54: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 8040f64: 0000 0000 0a04 568d 8f5f 44db ff10 5b2a .......V_..D..*[ 8040f74: 9d53 2962 2e4e 05e2 d891 0a15 a87d a084 S.b)N.......}... 8040f84: 2952 a782 dad3 d89e 5bdb baef 6bbb 02e7 R).......[...k.. 8040f94: 4487 e05b 48a5 7895 bc40 c420 3837 4e90 .D[..H.x@. .78.N 8040fa4: d2ba 7deb e706 311b b5eb 8f83 c746 4a29 ...}...1....F.)J 8040fb4: dff6 cecc 6fcc 337e c59b 8f9d 5b3f fe7e .....o~3....?[~. 8040fc4: c3d5 24fb 0537 168f 97f6 2a70 d0b2 70f3 ...$7.....p*...p 8040fd4: 3405 168d 1805 924a 2a9c 260d 2af4 0ab3 .4....J..*.&.*.. 8040fe4: c03e 76b3 3737 0ca6 69e0 eac5 fbd0 7832 >..v77...i....2x 8040ff4: 51fc 94b0 4945 8b0d 7839 9124 80c2 9540 .Q..EI..9x$...@. 8041004: f707 4843 e833 0495 202d 6af4 eb06 2a52 ..CH3...- .j..R* 8041014: 9033 b35b e4d4 0a61 4b35 6820 6317 9826 3.[...a.5K h.c&. 8041024: 9461 3a07 1ca1 d9c2 a0b8 ac27 8aa8 badd a..:......'..... 8041034: a0d2 05da 9345 21e1 309a 70cc 9a88 b65f ....E..!.0.p.._. 8041044: b62f 35df 9b6f e6b3 d90d 6b3e 9aae b73f /..5o.....>k..?. 8041054: b72f 9bcf e68b 6935 c6fe dbe5 73ed bf3c /.....5i.....s<. 8041064: de6a e7e0 671c 8b67 d3a9 705c 8e26 ae49 j....gg...\p&.I. 8041074: 1560 057a 6265 6892 11ed 3c05 b4f4 70d9 `.z.eb.h...<...p 8041084: 39d0 4180 3a3b ac51 c434 4a6c c60c 89c0 .9.A;:Q.4.lJ.... 8041094: 3e99 35a1 bb75 d11e 092a 253d 4c39 689e .>.5u...*.=%9L.h 80410a4: 9e14 7dba 389c 6348 6e99 45a2 6aca 7092 ...}.8Hc.n.E.j.p 80410b4: 75aa 09e8 c75a 1154 0437 ac29 c568 bf4d .u..Z.T.7.).h.M. 80410c4: b15c 4813 2303 bc4b 1de9 c09d 08de 1dca \..H.#K......... 80410d4: 0b45 b9da 44ce 270a 9b13 044e d9d8 32e0 E....D.'..N....2 80410e4: d693 8a17 bc5f ffa6 35ed f3de 4b08 6631 ...._....5...K1f 80410f4: 5510 30c0 9d77 c568 7d7b ae74 08f7 4ea7 .U.0w.h.{}t....N 8041104: 4eda 8422 af6c a8e1 bdf9 b339 36d8 8897 .N".l.....9..6.. 8041114: e231 7dbd ace9 f95b 0ea1 cb12 9130 e769 1..}..[.....0.i. 8041124: d46f 86fc cf6a 04ba c6bd 5d74 57ec 6263 o...j.....t].Wcb 8041134: 7b25 5f95 a331 37df 6857 12ed 7f95 2e6c %{._1..7Wh....l. 8041144: afb6 2bf6 4ce5 a91b d736 a1a1 6189 1235 ...+.L..6....a5. 8041154: 4874 7f9b a7d5 5615 8386 006c a5bf f237 tH.....V..l...7. 8041164: a103 716f 55d3 608c 10ac 2e8d 89d7 6a02 ..oq.U.`.......j 8041174: 51e0 7f15 6b4a 6196 4851 f231 03e7 b42a .Q..Jk.aQH1...*. 8041184: 1839 b85c b456 fb2c baeb c1e2 f2eb 35d9 9.\.V.,........5 8041194: 6eb7 66cb 1b54 c592 02d8 1409 52e8 dd0a .n.fT........R.. 80411a4: bac6 b768 df5a d9db 278e bf6e a6f3 22e7 ..h.Z....'n...." 80411b4: 623a 771c b28d 9ed3 6514 a88e 31fd afa8 :b.w.....e...1.. 80411c4: 2c73 7ca4 849f 28cd e826 1615 45e5 5fb3 s,.|...(&....E._ 80411d4: 67ea df4c 7379 5369 ef67 5a98 3853 bb6b .gL.ysiSg..ZS8k. 80411e4: b190 d335 db7a f065 a528 a286 d35b c4f6 ..5.z.e.(...[... 80411f4: 368e 1c44 b877 3a5a 1c5b 0eb1 116d a85a .6D.w.Z:[...m.Z. 8041204: 16ed a9a6 c7cb e42e 88d8 5320 b2b2 1615 .......... S.... 8041214: c657 d148 87c7 c427 769e e925 2911 ce12 W.H...'..v%..).. 8041224: e392 cbd0 3cc0 19a4 668c 2a3e 92e9 420a .....<...f>*...B 8041234: a315 ce41 14d2 b604 5504 a121 0f4e 7d38 ..A......U!.N.8} 8041244: 495a 769b 4094 dce7 11ed b5b9 5299 dd41 ZI.v.@.......RA. 8041254: b9da 0cc9 515a 1dea c323 97fc 6334 25a2 ....ZQ..#...4c.% 8041264: 7a21 44cb 0d59 975b 7063 2952 fd85 251a !z.DY.[.cpR)...% 8041274: 79b1 f66b f635 99b5 1d17 5888 f397 1ba9 .yk.5......X.... 8041284: 9c5c 4416 c52b c159 15b0 ee1e 6b82 bf91 \..D+.Y......k.. 8041294: 7e2d 7b02 ffe6 a607 05f6 7b76 faf4 9524 -~.{......v{..$. 80412a4: f5f6 207a e8cc e8ee f300 e661 ff3b d2dd ..z ......a.;... 80412b4: d89f be16 2f74 7f96 d423 4daa e9e8 e82e ....t/..#..M.... 80412c4: a32e ef1d 47f6 2a5f 5056 09b5 a898 1941 .....G_*VP....A. 80412d4: 1d48 29e0 3497 ea3d 3ce8 5660 65cc 09fc H..).4=..<`V.e.. 80412e4: 751e f6ae 2b1d d8c9 eb3d 4876 7739 8f5e .u...+..=.vH9w^. 80412f4: b0dd d013 b775 706f c26b 5dd2 361c 3163 ....u.opk..].6c1 8041304: b23f ba31 dd72 d0fe 65f6 452c b36c 913f ?.1.r....e,El.?. 8041314: 2fe6 7cb2 45f4 521f 285f b1a8 9c62 6123 ./.|.E.R_(..b.#a 8041324: f7ba 7ae2 fda8 fb66 dd96 39e2 5f6c ebd3 ...z..f....9l_.. 8041334: e1cf 5a8d 9f51 99bc be3f f23b f486 27f4 ...ZQ...?.;....' 8041344: 1c52 06c3 036b cf1f 2555 7db0 7763 ff05 R...k...U%.}cw.. 8041354: 381b 1d3d b841 d7c6 ae4f 5027 9d23 79fd .8=.A...O.'P#..y 8041364: 1f6d 10d6 a826 94b0 4a29 64c0 b39d 9f24 m...&...)J.d..$. 8041374: 302b 1295 ecde 2f7d c50c 51bd 6e6f 95c0 +0....}/...Qon.. 8041384: 18ff 29ad c0af c7f7 6677 87fe 64b5 3929 ...)....wf...d)9 8041394: 76fc d0d8 bfdb ff50 1100 94f1 524b 0009 .v....P.....KR.. 80413a4: 0000 0000 .... 080413a8 : 80413a8: 1950 0804 1964 0804 1970 0804 2a04 0000 P...d...p....*.. 80413b8: 0001 0000 .... 080413bc : 80413bc: 752f 7370 685f 7369 6f74 7972 682e 6d74 /ups_history.htm 80413cc: 006c 0000 5448 5054 312f 312e 3220 3030 l...HTTP/1.1 200 80413dc: 4f20 0d4b 530a 7265 6576 3a72 6c20 4977 OK..Server: lwI 80413ec: 2f50 2e31 2e33 2031 6828 7474 3a70 2f2f P/1.3.1 (http:// 80413fc: 6173 6176 6e6e 6861 6e2e 6e6f 6e67 2e75 savannah.nongnu. 804140c: 726f 2f67 7270 6a6f 6365 7374 6c2f 6977 org/projects/lwi 804141c: 2970 0a0d 6f43 746e 6e65 2d74 654c 676e p)..Content-Leng 804142c: 6874 203a 3131 3337 0a0d 6f43 6e6e 6365 th: 1173..Connec 804143c: 6974 6e6f 203a 6c43 736f 0d65 430a 6e6f tion: Close..Con 804144c: 6574 746e 742d 7079 3a65 7420 7865 2f74 tent-type: text/ 804145c: 7468 6c6d 0a0d 6f43 746e 6e65 2d74 6e45 html..Content-En 804146c: 6f63 6964 676e 203a 7a67 7069 0a0d 0a0d coding: gzip.... 804147c: 8b1f 0008 0000 0000 0a04 568d 6edd 44dc ...........V.n.D 804148c: 7e14 d715 d154 8a5a 59bd 41b8 ed64 850a .~..T.Z..Y.Ad... 804149c: 545e 1042 1429 55c1 b634 aecf 99a7 bb1d ^TB.)..U4....... 80414ac: b1e3 5b37 9482 14a4 8a2e 9a54 540b a121 ..7[......T..T!. 80414bc: 3caa 0441 28aa 6d3f 615f 46fc 999c 17b1 ...h 804150c: ba1d f95f 3f77 77f6 59f2 2441 198d 4eb8 .._.w?.w.YA$...N 804151c: 7392 1c09 ee59 0edc 9d21 c742 c9c4 420c .s..Y...!.B....B 804152c: a6b7 2f30 2172 747b 9a73 2cca a14c 09a6 ..0/r!{ts..,L... 804153c: 66f8 49b3 9539 3094 4cbf 8308 b470 2339 .f.I9..0.L..p.9# 804154c: 7487 cd56 fb96 04aa 3661 5504 5b86 42a8 .tV.....a6.U.[.B 804155c: c952 5220 373f 9b0f f563 9d5a 7fab e69c R. R?7..c.Z..... 804156c: bd44 4e69 539a 7ffc 4782 9aaf 8e27 a67a D.iN.S...G..'.z. 804157c: aa9e e3e7 a5a1 331e 0fca 4c9c 24c0 6774 .......3...L.$tg 804158c: f284 2920 d74b c011 b742 0b94 6506 2006 .. )K...B....e. 804159c: 7651 0899 485a 2e47 740a c240 1ca1 23de Qv..ZHG..t@....# 80415ac: b135 aea7 8a53 7424 ce45 b820 2257 d0f1 5...S.$tE. .W".. 80415bc: e39e 86c2 ce31 45d3 4e34 ed69 8c24 6594 ....1..E4Ni.$..e 80415cc: 72e8 c752 3844 e3f6 30a7 1521 dd93 4276 .rR.D8...0!...vB 80415dc: 210f 65f5 a05e 4ba4 be3c 0896 5ec2 6345 .!.e^..K<....^Ec 80415ec: 9ad2 794e 870a 4e81 0621 ead5 f960 d734 ..Ny...N!...`.4. 80415fc: 10b6 a1fc ee98 e3bf cf78 6875 3e8a af03 ........x.uh.>.. 804160c: 8a7c 6af9 2b49 f1d6 71a3 459d b4b8 7ad4 |..jI+...q.E...z 804161c: 6111 56c8 8e2a 73d4 8e75 3f91 ff57 97aa .a.V*..su..?W... 804162c: 69cd dc73 b63c 35da 9f7d c107 2924 969f .is.<..5}...$).. 804163c: ded6 fd48 6c8a 2398 7d64 fea3 7f52 57ab ..H..l.#d}..R..W 804164c: d9ab 9f28 1de4 33cb baf5 0ef9 7a93 ba8c ..(....3.....z.. 804165c: 9bce 75ef 5762 5533 b945 d19f e652 7162 ...ubW3UE...R.bq 804166c: 3c31 9124 46b4 f660 f2e1 88bf 8561 6115 1<$..F`.....a..a 804167c: d6c3 814b 3586 0462 6fc3 5762 3156 6406 ..K..5b..obWV1.d 804168c: 1182 f369 089d 1220 aaf6 33f8 d352 1629 ..i... ....3R.). 804169c: ce43 de07 0f76 260e 3d0f 7381 8a41 13a2 C...v..&.=.sA... 80416ac: 16d7 8a0d 46cb cc17 0eba 48c5 07da d489 .....F.....H.... 80416bc: e0c5 280b 9c8b c697 b1bf 3239 9af6 12d5 ...(......92.... 80416cc: f61f b5bc c3a0 2a20 1697 52b3 65e8 8607 ...... *...R.e.. 80416dc: 7b22 431f d675 0a3c 531c 6f59 e39b 4b00 "{.Cu.<..SYo...K 80416ec: bb28 834c 54c9 d6fa 39d0 77ea 5964 784d (.L..T...9.wdYMx 80416fc: 3cd6 535e 1fdc a508 ea87 444f f9c6 a255 .<^S......OD..U. 804170c: aed0 07e6 230b c544 55e9 ef84 f718 fa93 .....#D..U...... 804171c: 3d45 2d5d 37f2 12f5 f5a1 8116 808c 6c46 E=]-.7........Fl 804172c: 96ea 8572 17f6 9f5a 3921 2d59 0ceb 5179 ..r...Z.!9Y-..yQ 804173c: 869a 8ea8 50d8 1687 a657 4ac3 1bdd 764c .....P..W..J..Lv 804174c: 945a a7ee 1244 c34c dcd0 afe8 294e 977e Z...D.L.....N)~. 804175c: d1d8 ab65 82b1 46fd 1b37 270d 847d 6c50 ..e....F7..'}.Pl 804176c: b731 714c b92c 153f a579 493b 495c f399 1.Lq,.?.y.;I\I.. 804177c: 9f2e e378 dbe8 f5b6 4eb8 13ce 9346 d083 ..x......N..F... 804178c: 829d bbbc b7bb a64b 1830 c879 1657 3b84 ......K.0.y.W..; 804179c: 5044 67e2 4d34 6381 13f7 d615 d1cd 2306 DP.g4M.c.......# 80417ac: abf7 a35c 291b 3ed0 20ab d672 54d6 a808 ..\..).>. r..T.. 80417bc: 553b 69d7 4542 5c42 d3d2 7d47 a641 9b94 ;U.iBEB\..G}A... 80417cc: 4372 2983 aa2f a37e b5b6 549a e042 4244 rC.)/.~....TB.DB 80417dc: 1c4a 254f 807d 7c5d 46e4 3c1b 8b2e a1ed J.O%}.]|.F.<.... 80417ec: 58fd 7557 3528 a315 8a33 7f8d e96b 899f .XWu(5..3...k... 80417fc: baff e451 2138 f2d6 ac4d 6df2 18fd b2f6 ..Q.8!..M..m.... 804180c: e855 7d29 cb87 cdc1 06c1 4626 2f6e b0bd U.)}......&Fn/.. 804181c: 2f5b 63d0 c76b 664e daef 0b80 d993 a5a3 [/.ck.Nf........ 804182c: 6deb 5b6a ae0c 418e e821 888c 4f85 0d79 .mj[...A!....Oy. 804183c: 4242 c36a b29e a49c 035d a1ee 662c fc79 BBj.....]...,fy. 804184c: 5e29 a6b5 bbf6 3274 b7a5 e9b4 6121 5acc )^....t2....!a.Z 804185c: 69be 173f ca88 bdba 5893 0137 974d e8fe .i?......X7.M... 804186c: c5fc 5f6c 8afb eb1d 7605 4783 74ba f0cd ..l_.....v.G.t.. 804187c: 6d3f c47e e48e ecec d97d d6b9 0f15 4c72 ?m~.....}.....rL 804188c: 6328 9f08 5676 745e 3bb9 7334 8d7c 80a7 (c..vV^t.;4s|... 804189c: 4979 7c5c 5c0a 15cb f2f5 f238 6f36 dc0e yI\|.\....8.6o.. 80418ac: 5e3e 20bd 07e7 c0b0 c17a c3b7 e2a4 b938 >^. ....z.....8. 80418bc: b070 f780 1c0d 0d1d 9c20 f0e3 e7cf d401 p....... ....... 80418cc: 6f88 bb6f efd6 108a 6402 c9d8 a453 6080 .oo......d..S..` 80418dc: d19e db24 2016 c12b d1dd 6e07 f218 835b ..$.. +....n..[. 80418ec: c69e 721e d1de 135b 8156 6de7 18de 1f79 ...r..[.V..m..y. 80418fc: 39d5 9d4d 6fad e3fb 3ccc ff1c 2503 ce74 .9M..o...<...%t. 804190c: 4891 000a 0000 0000 .H...... 08041914 : 8041914: 0000 0000 f8f2 0803 f902 0803 053c 0000 ............<... 8041924: 0001 0000 .... 08041928 : 8041928: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 8041938: 0d0a 000a .... 0804193c : 804193c: b848 0803 09a2 0804 09ae 0804 04f6 0000 H............... 804194c: 0001 0000 .... 08041950 : 8041950: 193c 0804 06a0 0804 06ac 0804 02f6 0000 <............... 8041960: 0001 0000 .... 08041964 : 8041964: 6d2f 6961 2e6e 7363 0073 0000 5448 5054 /main.css...HTTP 8041974: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8041984: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8041994: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 80419a4: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 80419b4: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 80419c4: 6e65 2d74 654c 676e 6874 203a 3031 3435 ent-Length: 1054 80419d4: 0d35 430a 6e6f 656e 7463 6f69 3a6e 4320 5..Connection: C 80419e4: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 80419f4: 6570 203a 6574 7478 632f 7373 0a0d 6f43 pe: text/css..Co 8041a04: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 8041a14: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 8041a24: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 8041a34: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 8041a44: 088b 0000 0000 0400 d50a 6b7d 238f 7239 ..........}k.#9r 8041a54: 5fe0 a791 e7d0 6dae a349 bd57 d854 79c2 ._.....mI.W.T..y 8041a64: f6c6 80f9 c05b bd80 da9f 418d 994a ca55 ....[......AJ.U. 8041a74: 496d 4829 eeaa d1aa 3fe9 0718 3818 70e0 mI)H.....?...8.p 8041a84: ec7e f01f e95f e49f 9278 2641 a533 ef6a ~..._...x.A&3.j. 8041a94: bb87 9dad 2519 119f 88c1 3060 2418 fc7f .....%....`0.$.. 8041aa4: 9fcd d675 76d5 2d95 5fcb fe8b b77c 7ceb ..u..v.-._..|..| 8041ab4: f719 fd07 e751 767f f77e ffdf f3be ca3f ....Q..v~.....?. 8041ac4: b179 15de f5f0 ee54 65fb a3f5 db2b cdf9 y.....T..e..+... 8041ad4: fd8f f565 7554 edb3 9cbe 8b2f b66e f32b ..e.Tu..../.n.+. 8041ae4: 9ba2 fb17 5cac baee e58f 3cd3 ecdb 6acb .....\.....<...j 8041af4: 3f8d b79f f745 aab1 c5f6 bbb6 b228 ff1c .?..E.......(... 8041b04: b4f3 9ead dd37 5655 bbae 62ab dcfd 675d ....7.UV...b..]g 8041b14: ba5f 62bb 354e cf76 55ab 7db6 e43d 6ee5 _..bN5v..U.}=..n 8041b24: ccb3 a75e 65b3 ff35 ec7c 36ef 7ae5 bd56 ..^..e5.|..6.zV. 8041b34: 2efc 7edb e6ee eb8f 63c3 deb5 76f7 d7fb ...~.....c...v.. 8041b44: 3165 f72d c080 d8fc 5687 d966 bbb6 9e7b e1-......Vf...{. 8041b54: 3fc1 c39b daa6 d895 74e2 2c5b 7db3 a5f9 .?.......t[,.}.. 8041b64: 12a0 cb0f 21f2 f6eb d937 58ba 10f6 729e .....!..7..X...r 8041b74: d4fd efed d9b3 78b2 e3d8 c3f7 0b7e fa3f .......x....~.?. 8041b84: c59b 5961 01ec dee8 936e a1cd b4d0 183f ..aY....n.....?. 8041b94: ab15 3f63 3003 14bf fedd bf6c 3fee f356 ..c?.0....l..?V. 8041ba4: 1de7 9cfd 9f9a ea8b 200b e089 6750 e59a ......... ..Pg.. 8041bb4: 29be b0ff 5e2f bdf6 98bc 5b57 0e00 5ca0 .)../^....W[...\ 8041bc4: 6b57 b086 bcfb 7844 f8a0 b0ee 772c 258a Wk....Dx....,w.% 8041bd4: 23e7 7e19 5eaa 44ba f80f 29d1 9bd7 7de7 .#.~.^.D...)...} 8041be4: fe97 71fd baff 7e29 2bbb edb2 f17c d0e9 ...q..)~.+..|... 8041bf4: 5afb 3ecc fb97 b65e 40d9 b64a 179e c5d2 .Z.>..^..@J..... 8041c04: cb2c 189f c3fe 45d7 2fb9 4108 fccc cdba ,......E./.A.... 8041c14: 4736 89c0 aa86 634f cd34 711e fadc 3832 6G....Oc4..q..28 8041c24: 1807 6ceb 9d3b fb55 b1c5 3d5c 9775 53c5 ...l;.U...\=u..S 8041c34: ceb1 b30f 0b6a 3ac3 1c1d bbf9 cfbb fbbb ....j..:........ 8041c44: 61c5 e593 5c48 5e48 57ec 1e4b c7b0 556c .a..H\H^.WK...lU 8041c54: 5f2e 7fa7 2db1 65b3 6ff7 e58a 0297 27f8 ._...-.e.o.....' 8041c64: eeeb f5b2 b7ae b62b e3e5 82bd e44d 01d9 ......+.....M... 8041c74: f65f fcb2 cf0f fdbb 3874 bc18 efbb 76ad _.......t8.....v 8041c84: 64bd 71ce e556 07af 9c60 72a7 1d3d cfdc .d.qV...`..r=... 8041c94: f9b2 4467 9d60 e6f7 b2d5 4eda fe2f f6ea ..gD`......N/... 8041ca4: 7eaf ebfa bde1 8d7c e3c7 1c7b c7a5 f565 .~....|...{...e. 8041cb4: f7b5 dd3a b7cd 72d5 bf79 ca28 05a7 74f7 ..:....ry.(....t 8041cc4: 9ecc b2f3 ceea f5b3 6c97 ddd7 ab6c 6da7 .........l..l..m 8041cd4: dbb1 bf75 9b00 8e57 cb35 b2f5 175c e23d ..u...W.5...\.=. 8041ce4: 7bd0 0d68 5971 80f6 9f19 d3d6 b659 302b .{h.qY......Y.+0 8041cf4: 1b97 ea02 dfee 9c7f cf03 4742 4fbb ae97 ..........BG.O.. 8041d04: 1c09 ed55 7077 b8fc f328 58bc ea7f 8bee ..U.wp..(..X.... 8041d14: 3015 beff ca08 b31d 0d43 3daf 2c8c e830 .0......C..=.,0. 8041d24: 58b6 8fef 54d9 3378 329b 558b 7bcf 0104 .X...Tx3.2.U.{.. 8041d34: 2046 cd9b 1fb6 e5f7 597e 927c ead1 20c1 F ......~Y|.... 8041d44: abee 74d5 79b8 e4e9 b3f0 8fc8 6eb3 d9b5 ...t.y.......n.. 8041d54: 68b3 00ee f5ce 8f13 57d9 caa6 00cd 7206 .h.......W.....r 8041d64: 24a8 5fee 14df ceab 9ee0 10c5 6986 c28a .$._.........i.. 8041d74: f401 7cff 1210 060f 1876 17a6 8f8f e383 ...|....v....... 8041d84: 540e 708d 0e02 f4ed f076 a8ee eae2 ba5b .T.p....v.....[. 8041d94: 7ab9 4f77 9584 18f1 d234 c516 5f7c a66d .zwO....4...|_m. 8041da4: febd f415 2d0e 7201 5584 3faf 94a2 4f2f .....-.r.U.?../O 8041db4: f944 16e9 fa98 a0f2 3e23 3265 591f 2939 D.......#>e2.Y9) 8041dc4: 434a 6840 d832 1cbc db17 eb83 d959 5411 JC@h2.......Y..T 8041dd4: 0f4f 4640 c67e 0451 0372 5f01 1f80 5fab O.@F~.Q.r.._..._ 8041de4: 47f1 2f2a 7c9d 80dc 443a 8616 cb31 443c .G*/.|..:D..1. 8041e24: 909d c520 e5a7 017a b772 c117 2f90 c969 .. ...z.r..../i. 8041e34: f783 dca5 a095 b521 6007 686d 5592 7118 ......!..`mh.U.q 8041e44: 23e0 22cc 5ea2 cd54 e935 1458 d254 39b1 .#.".^T.5.X.T..9 8041e54: d8e8 e6b4 f6ed 1551 8a6d 076d 8e18 ddc4 ......Q.m.m..... 8041e64: f277 e98c 1073 852e 9505 6b0b d641 4c7f w...s......kA..L 8041e74: 4f84 054c 024e 2dd1 41f6 b00a aaca 27dc .OL.N..-.A.....' 8041e84: 2495 bfd7 3f9f 776f 37a0 5536 a309 95bd .$...?ow.76U.... 8041e94: 3ece a4c2 3384 fe45 6ba9 75ba 0789 94a9 .>...3E..k.u.... 8041ea4: 8f17 f3d9 7f72 5a34 be79 e628 819f 0223 ....r.4Zy.(...#. 8041eb4: b628 fb30 1e54 c308 ac30 9351 662c d2b2 (.0.T...0.Q.,f.. 8041ec4: bc15 35de affd 579f 62b3 69fb 553a 2e86 ...5...W.b.i:U.. 8041ed4: 6bd7 db9a 75ca b2cf 130d 56ac 341a 5849 .k...u.....V.4IX 8041ee4: 255a f884 f4d6 cf13 063e ffc4 dc9c 89b8 Z%......>....... 8041ef4: ccc1 c867 8f1a b165 2dcc 05a5 8f02 2729 ..g...e..-....)' 8041f04: 40f4 cf95 ca61 23af 54db cfc1 2dcd e973 .@..a..#.T...-s. 8041f14: dd7e 8d23 53d9 fff5 8680 a701 e4e9 12e9 ~.#..S.......... 8041f24: 8592 0566 0f08 c7cf 7dbd 2d55 84c1 15b1 ..f......}U-.... 8041f34: 4935 d18b fc0c be58 1968 edf7 800a 8354 5I....X.h.....T. 8041f44: 0561 f5c3 7cb8 732e 2e57 ae4a af15 9c15 a....|.sW.J..... 8041f54: 916a 0c1c 6aa5 fe5b 2d8a 3b2c 6bb9 96b2 j....j[..-,;.k.. 8041f64: 15ae 1b50 2ad8 5360 4240 5060 15b4 66d1 ..P..*`S@B`P...f 8041f74: 5556 d30e db29 0a23 905d 05a6 e541 3e68 VU..).#.]...A.h> 8041f84: 34fe 40c9 344c 9600 66d9 9857 4122 5472 .4.@L4...fW."ArT 8041f94: 6d9c a8d4 24b0 4586 32c3 dbae f64d c604 .m...$.E.2..M... 8041fa4: 1890 fc4e f5a1 ead8 0d44 f3e8 0ed1 14a5 ..N.....D....... 8041fb4: b42d bead 2e6a e4fe 6764 9008 0aa5 9ada -...j...dg...... 8041fc4: a0e6 0fe9 1f9d f798 7cc1 9526 e2ac e46d .........|&...m. 8041fd4: 28ce 788c 32ba c959 6a0a ca0d 0914 b9fc .(.x.2Y..j...... 8041fe4: 5e99 364d 7f2f ae56 d536 9f76 f7ad a4f7 .^M6/.V.6.v..... 8041ff4: d99e d9e4 f5a2 ff74 ccb5 0bf7 d6b6 12c4 ......t......... 8042004: 7c78 3c7c 7aea ec00 5342 5963 ee3c 8fb5 x||<.z..BScY<... 8042014: 3e87 4522 ab9c 63a6 5a8f b684 5260 cbce .>"E...c.Z..`R.. 8042024: 0f2f e6b4 7038 a307 d5c9 45e6 a72d fc5b /...8p.....E-.[. 8042034: f32d 951a 92e6 5ade 3e9a 976f b7ef d860 -......Z.>o...`. 8042044: ee7e d66f 974f 1e9d e854 86f4 eff8 d575 ~.o.O...T.....u. 8042054: 16db 2260 9007 fccb da8f 29cd df1e ce1a ..`".......).... 8042064: 05f6 01d8 f320 0162 7378 66d3 bd55 9d74 .... .b.xs.fU.t. 8042074: ea64 8fb1 13d6 8f58 ecab 5d0f 1bf7 4856 d.....X....]..VH 8042084: 1bfc 76ac 55f9 767d c0cc a796 fc50 d3da ...v.U}v....P... 8042094: 0863 2463 30f4 d434 1c14 11c5 0014 37e3 c.c$.04........7 80420a4: 4fdb 0c79 6fa8 d968 1683 6c93 e9d0 8cdd .Oy..oh....l.... 80420b4: 7a03 b2f9 904c 0de1 dab4 bdb9 d181 f032 .z..L.........2. 80420c4: 34b7 bbd9 0ac2 d3df f66c b687 c766 d5df .4......l...f... 80420d4: 502c adb8 21d1 f7d0 b04d 2a82 3d02 5873 ,P...!..M..*.=sX 80420e4: 0cc1 17eb 4816 ce1b b580 591f a609 5d4f .....H.....Y..O] 80420f4: 80ab dcc0 3c93 b22e 341c a0c0 4683 f23a .....<...4...F:. 8042104: f6ea 9669 1fbd f174 3faf 8cba ea5b cb68 ..i...t..?..[.h. 8042114: 5833 e414 876a c78f d937 a6ec acbd a259 3X..j...7.....Y. 8042124: 6aa2 c814 f6c2 4d64 32a1 0d9d a387 7b9b .j....dM.2.....{ 8042134: 02c3 619c 23d7 4e0a 1cdc 002a ee85 a6e6 ...a.#.N..*..... 8042144: 3419 13a0 a02d 1561 ab0c a52c b161 5b12 .4..-.a...,.a..[ 8042154: 82f5 b331 3036 008a 17a9 773f ab7b 3114 ..1.60....?w{..1 8042164: 3d63 b07e 2f9c 01a3 91ff 5664 6a63 3b25 c=~../....dVcj%; 8042174: 31c2 0d34 1955 b14e 48bc a24d ba1a 04d7 .14.U.N..HM..... 8042184: 6b5d 22a1 aa43 0538 c287 cb07 ee55 a60c ]k."C.8.....U... 8042194: 5a01 0cbc d5ee c1f7 4c0b 02aa 783d 4297 .Z.......L..=x.B 80421a4: b7dd aae1 bb88 a184 c87d a7b4 04e9 8265 ........}.....e. 80421b4: a375 89e6 432b 6287 9a32 5e3c 804d 70f1 u...+C.b2.<^M..p 80421c4: af31 80b0 e922 aaec 9965 2e77 c306 386c 1..."...e.w...l8 80421d4: 142b df27 6760 0b7c 2d68 d24b cfb9 0f7b +.'.`g|.h-K...{. 80421e4: 365b 9a83 3860 a3de 21c2 b07a 1f3e 2b01 [6..`8...!z.>..+ 80421f4: b23b ccc6 c0c1 5b49 bf00 165f 6ff6 e861 ;.....I[.._..oa. 8042204: 719d c11b cb49 6cd8 28b7 fbf2 7b5f 3ae5 .q..I..l.(.._{.: 8042214: 5e2f c7a0 91d1 4b66 1458 4a12 c8ea 7581 /^....fKX..J...u 8042224: 2729 cb38 5760 12c0 961a eddb 2cfc 9873 )'8.`W.......,s. 8042234: 9492 1986 5750 9498 9864 5224 dc42 30cd ....PW..d.$RB..0 8042244: 6998 c7f1 3b1f ecab 67a5 c252 1ff1 9b11 .i...;...gR..... 8042254: b550 bd87 2e5f b5b9 4b92 cbf2 3427 7892 P..._....K..'4.x 8042264: e551 b94a 5f24 b9ca 60b7 912a 5de6 f792 Q.J.$_...`*..].. 8042274: 20d7 81fc f5c4 a327 abdb e19b 1c64 c3af . ....'.....d... 8042284: e057 58ad d102 9a98 ca34 5d9e 3cf2 263f W..X....4..]..A.h. 8042334: 25e5 39ea 1338 5cf5 8e9e 3927 ace5 8400 .%.98..\..'9.... 8042344: 18d8 f53f ad39 5e89 7d12 6c03 e3a0 4e0a ..?.9..^.}.l...N 8042354: 72be 4663 ba75 2fde d57a 0f63 c8dd abef .rcFu../z.c..... 8042364: bf3c b14c ddc5 fc23 0b69 66e4 c474 0b14 <.L...#.i..ft... 8042374: 66a1 5c13 5e3c 1fe1 e32b 480e c7d4 32f9 .f.\<^..+..H...2 8042384: eddb f37e f85b fbd9 e7e4 dd8b c41e ee7b ..~.[.........{. 8042394: 3266 1a46 3cca d6af ab62 0f92 199c 9f77 f2F..<..b.....w. 80423a4: ad07 2574 1175 9ea4 bb6a a700 db2f ec02 ..t%u...j.../... 80423b4: a75d 1c46 a03e 702d c01b 57ac 3f60 fc04 ].F.>.-p...W`?.. 80423c4: aa20 ffdd e7e2 c69f 5b3f a727 dfb3 1f6e .......?['...n. 80423d4: efe1 bd3e 207f f87d 6f41 8374 6c8d 68d7 ..>.. }.Aot..l.h 80423e4: d429 a7a7 ec0b ba08 2a02 93a1 205b 39a2 )........*..[ .9 80423f4: dc53 13b6 db70 90b2 32c3 b767 d6a9 d83b S...p....2g...;. 8042404: b0bd 6946 307f e77c e17d 57e0 4f40 7fe4 ..Fi.0|.}..W@O.. 8042414: 155d 9979 c075 5e2f eb14 580e 9d93 7ef7 ].y.u./^...X...~ 8042424: baca 06b9 ff13 50f2 b56f 4671 85c3 ef96 .......Po.qF.... 8042434: 55e3 affc cde4 9f57 ecac a0e5 1f83 0021 .U....W.......!. 8042444: 2d0f 5af8 ec7b 0798 4dcb 8866 c906 98f0 .-.Z{....Mf..... 8042454: 883d 0b42 d467 0904 a0a4 6c1d 1499 9d0d =.B.g......l.... 8042464: 85ea 689c bad7 d87c f93b 5277 56d9 ada8 ...h..|.;.wR.V.. 8042474: c725 6d1c b92d 8b42 3ee4 f10e 1d59 a717 %..m-.B..>..Y... 8042484: 6513 706e 46f3 514b 244b 593b 1235 75cc .enp.FKQK$;Y5..u 8042494: 6a62 de2e d35a f393 6bbb b9be 474f fcd3 bj..Z....k..OG.. 80424a4: 7dad 9aba 9f41 013a 9db3 175f 6144 14b0 .}..A.:..._.Da.. 80424b4: f2bd 2829 b149 de5b e848 55b7 7434 cefe ..)(I.[.H..U4t.. 80424c4: 8b8a 8237 68ea 56f5 5d1c db45 d2a3 1798 ..7..h.V.]E..... 80424d4: cd17 5ea2 b227 db01 865b c8e7 5041 59b1 ...^'...[...AP.Y 80424e4: 4d90 428f a0e4 b362 9f70 a8a8 0276 e314 .M.B..b.p...v... 80424f4: e305 b611 c0b2 0e0d 1cbb d9a4 0f59 740f ............Y..t 8042504: e261 9816 31b8 164a 0a11 f93d 0f22 9ea1 a....1J...=."... 8042514: 95c4 6a47 2192 047f f1ed 3ae2 2d8b b313 ..Gj.!.....:.-.. 8042524: f7d2 322e 09dc 736b 0c5a 2eaf 8401 85d3 ...2..ksZ....... 8042534: bc04 6d1e ca59 124e ffb8 3770 379c 1928 ...mY.N...p7.7(. 8042544: 07fc c7d9 e987 5c8f b6bc 8448 629a 2e4c .......\..H..bL. 8042554: 9800 745a 4715 d30b 4d0e 4c50 251b 1a6a ..Zt.G...MPL.%j. 8042564: 60d3 55a2 9128 a12d 87c9 be7e 36ad b1e0 .`.U(.-...~..6.. 8042574: 7759 2fdc 2458 3d3e 8041 0084 f16a e461 Yw./X$>=A...j.a. 8042584: fa1e 29b4 141a 3490 a71f d540 cfe2 3d44 ...)...4..@...D= 8042594: 824a 3345 a943 799b 6fb6 0aa5 18ad d722 J.E3C..y.o....". 80425a4: a289 bc83 6c5a 0453 6ef2 a14e 9883 421f ....ZlS..nN....B 80425b4: d4b9 900a ccd8 4b8e 0cc7 0f63 0fc2 6e56 .......K..c...Vn 80425c4: d978 9e3b cb1a 1d5a 7995 38b1 2980 b595 x.;...Z..y.8.).. 80425d4: b87b f6a9 73bc 6e1c b6bb bd3a a4d6 3ccd {....s.n..:....< 80425e4: 2403 bc5b 2db5 9505 ee29 d529 39c3 a141 .$[..-..).)..9A. 80425f4: c705 88aa 7a26 d815 6b67 64f2 0264 bc5c ....&z..gk.dd.\. 8042604: aeae ef77 cef3 c4c1 6e97 496b 50f1 a39d ..w......nkI.P.. 8042614: f2f0 0d77 28e4 423b 21d6 63c4 022e a1f4 ..w..(;B.!.c.... 8042624: 9c45 a0eb 7599 c2bd b486 3db3 a639 11a8 E....u.....=9... 8042634: d415 d781 da26 332f 8abe 03a2 17ca 1b3c ....&./3......<. 8042644: d108 82c0 aca6 1bb2 82c7 354c db97 b860 ..........L5..`. 8042654: e4a9 fd2a 1efd 444c 2f4c d440 4752 5eb7 ..*...LDL/@.RG.^ 8042664: b898 7162 53a4 73eb 969f 6d53 dba0 6809 ..bq.S.s..Sm...h 8042674: abd0 9377 1b8c a0d4 2011 2ce8 c0f8 b8f6 ..w...... .,.... 8042684: 8e43 dbc7 98e4 5d2e 8221 075b cb05 3986 C......]!.[....9 8042694: 8aa6 642d a098 4cb6 2d10 0d44 4db3 e56a ..-d...L.-D..Mj. 80426a4: 3c17 f667 83b3 a25e d637 5370 8932 23b9 ... T.. 80427d4: bbf8 0bec b8b4 1b5f 8138 0336 6ac5 e054 ......_.8.6..jT. 80427e4: 91df 00a2 a37a ff2e 6c77 dbf6 7cdc bb23 ....z...wl...|#. 80427f4: b448 824b 0331 91bd 04c4 6e4c 49de b1fd H.K.1.....Ln.I.. 8042804: 8ca4 c021 5b90 349a 84b7 1973 cc0f d268 ..!..[.4..s...h. 8042814: 409f 0e05 740f ecbb 0a48 c433 c615 ef03 .@...t..H.3..... 8042824: 515f 15b4 2539 1582 5193 7f0e 22f7 aa43 _Q..9%...Q..."C. 8042834: c515 48db 4018 b34c 08a3 caaf 564e 5e3f ...H.@L.....NV?^ 8042844: b860 af74 ac04 e803 fc04 642b dd31 1d27 `.t.......+d1.'. 8042854: 07e0 373b 3ba9 3123 dd53 a3cb da70 79ea ..;7.;#1S...p..y 8042864: e8be c0e1 1041 2af2 975b 679b 970c d6ae ....A..*[..g.... 8042874: 6db0 94d7 0613 b9c7 dfe5 8433 42f0 2f18 .m........3..B./ 8042884: a206 3f10 7070 2244 d775 25ab 09c6 cd10 ...?ppD"u..%.... 8042894: de4a 8365 57b1 d354 c98b 0264 94de 7819 J.e..WT...d....x 80428a4: 330d f8d8 d542 dbc2 665f 555e 9816 e3bc .3..B..._f^U.... 80428b4: 613d 520e 1761 d52e d72d d58f bac9 0aea =a.Ra...-....... 80428c4: d6ad d7cb 66ce d10b 0780 d7d9 6896 87db .....f.......h.. 80428d4: 25e7 cc6d 9382 7e12 c306 0c72 272a a99d .%m....~..r.*'.. 80428e4: e99d 35cd b86c 37a9 82d5 e8d3 8e17 44f6 ...5l..7.......D 80428f4: 2a31 efd7 0e92 10fb 9b98 13e2 ac1b bc7c 1*............|. 8042904: 2f98 f5b2 f153 e0b7 ff86 bc0a 85d7 886f ./..S.........o. 8042914: fc4f 26fd 4d87 4c50 5eec 316c 1f1c 0abc O..&.MPL.^l1.... 8042924: dddb d5cf 021a bb65 cf17 881b c917 0eff ......e......... 8042934: e282 ad61 a3bb dbb8 e0e1 179d dd0c 3dd2 ..a............= 8042944: 974d 177b ef9a 88b6 becd 5bae 6264 30cc M.{........[db.0 8042954: 4206 e390 8401 f754 6504 da23 01ab 60da .B....T..e#....` 8042964: fa36 0af5 c522 2efd c830 6c29 e32a 3fee 6..."...0.)l*..? 8042974: 2def d1bb 965a c1d6 be2e bf7d 201d 4542 .-..Z.....}.. BE 8042984: dcaa e781 3ada 6fb5 822d f32f 6d37 402f .....:.o-./.7m/@ 8042994: 3f5c 1040 2302 a39a 74ee 28b8 e28a aa98 \?@..#...t.(.... 80429a4: 3961 d13c 3609 b10f 8e02 830f 9761 39be a9<..6......a..9 80429b4: c15a 0cf2 4b04 7aab bd45 6dc6 e898 8c01 Z....K.zE..m.... 80429c4: 368d 1ae9 6039 b225 c1b8 d53f 41e6 0130 .6..9`%...?..A0. 80429d4: 032b a1a5 0b6f a4c7 8e95 fef1 d9cd 37d4 +...o..........7 80429e4: 19b8 a4cc 9d67 65d1 8632 7368 6d05 a1d0 ....g..e2.hs.m.. 80429f4: f240 c623 d270 8eb1 8e5e b262 8885 dc02 @.#.p...^.b..... 8042a04: 2e73 7b72 23fa d3ce 7be8 000a b415 f2c2 s.r{.#...{...... 8042a14: f01c 9413 1d43 6e94 c83d ea09 1680 d302 ....C..n=....... 8042a24: 35e2 5b68 82d2 bb72 f9e7 0e1c a42d 8f9b .5h[..r.....-... 8042a34: 8333 5f9a edb3 b71a 925f c768 b699 85a6 3.._...._.h..... 8042a44: a5c9 9b57 ed62 637d 11e2 2a63 d485 f6ed ..W.b.}c..c*.... 8042a54: 8a5b f132 8ada 1404 2b6b c428 2b6a 9312 [.2.....k+(.j+.. 8042a64: ada7 4c6c 5c10 686c c2ac 8943 73e7 aa38 ..lL.\lh..C..s8. 8042a74: 371a 3f12 2745 8c77 d431 5183 927d 3a43 .7.?E'w.1..Q}.C: 8042a84: b317 2fe5 e58f 6612 e016 9544 db11 adae .../...f..D..... 8042a94: d627 862a ca59 1dbe 564d 7cc1 4103 7968 '.*.Y...MV.|.Ahy 8042aa4: 05f1 740e 36f1 4eb0 7e3b 2f6b 85cc 19d8 ...t.6.N;~k/.... 8042ab4: fc88 e4b9 886c 85fd 4f7d 09b2 a03a d67d ....l...}O..:.}. 8042ac4: 0ef9 0a5c 6485 c06a cae9 b0f7 5f29 a620 ..\..dj.....)_ . 8042ad4: 8e95 4d35 3087 81b3 0136 b749 f406 4c1d ..5M.0..6.I....L 8042ae4: 2779 3964 fd08 78c1 3046 9e97 50f1 4694 y'd9...xF0...P.F 8042af4: 8f9e 4661 93b0 e70f cc52 4d5a e1bf b7a6 ..aF....R.ZM.... 8042b04: b508 9a1f 32ee 159b 34f6 ff4a 740e 1845 .....2...4J..tE. 8042b14: c57a 7b67 ac94 1ec1 cf28 6cda aa7f 2ab5 z.g{....(..l...* 8042b24: 9dff e988 4d11 b81d 513a 38be 9578 0433 .....M..:Q.8x.3. 8042b34: eee8 3f43 9cbc f1ab b85b 4041 a8ce 993f ..C?....[.A@..?. 8042b44: a400 7df5 5869 d451 744f 04e9 8c6a f9cb ...}iXQ.Ot..j... 8042b54: ae7c 1a7a 420f 2cc9 8e42 e333 52b8 6b50 |.z..B.,B.3..RPk 8042b64: 1c2c e3c6 c7f5 0b00 4cf6 bf71 e1f2 43b1 ,........Lq....C 8042b74: 20e4 ac57 0052 ce1d f909 5ff9 e68f 9025 . W.R......_..%. 8042b84: 0d49 4284 757d 6575 59cc 495d 6b7a 9c81 I..B}uue.Y]Izk.. 8042b94: b080 90b8 0a18 57c4 6490 21a3 4395 9b8e .......W.d.!.C.. 8042ba4: 0d44 c199 5553 559c 080f 1caa dd98 128d D...SU.U........ 8042bb4: 6662 1df6 de8e ea44 e8db c1cd ec0d 4084 bf....D........@ 8042bc4: 37b5 3f14 e45e 8068 b2fd 5d80 0a90 480e .7.?^.h....]...H 8042bd4: 233a 11ca 1651 0331 0913 528c 5762 2401 :#..Q.1....RbW.$ 8042be4: ec05 30b4 1527 cd58 51c8 5803 eb6f 67ec ...0'.X..Q.Xo..g 8042bf4: b853 5452 b492 e49b 63f8 9d8b d965 c881 S.RT.....c..e... 8042c04: 1f3d 8c5e 0cea 35d9 b301 69da a423 6886 =.^....5...i#..h 8042c14: 6bb2 3088 beb8 aa39 1412 1a69 d2e8 5106 .k.0..9...i....Q 8042c24: c872 0b3b c712 046f 0942 1761 5314 0da9 r.;...o.B.a..S.. 8042c34: 0d0f e1ca 0c01 593b 0e31 be61 c09b 0750 ......;Y1.a...P. 8042c44: c793 ca29 67f7 933e b4d9 617e 5182 226d ..)..g>...~a.Qm" 8042c54: bd78 4a53 f7ae c9c5 1771 ca9c 432d bc48 x.SJ....q...-CH. 8042c64: f6b4 70b7 f59a 08a0 088f a761 3060 f96c ...p......a.`0l. 8042c74: 2acd d866 4ebf 986a 87ff 8c17 3d75 7767 .*f..Nj.....u=gw 8042c84: 5528 ddfc 90e6 531b 28a2 9f8f 0275 cd83 (U.....S.(..u... 8042c94: 7fba 6c6f 4bed bca6 ca77 03c6 567b ba13 ..ol.K..w...{V.. 8042ca4: e841 05b6 3043 015a 8820 8de2 cbc5 0c00 A...C0Z. ....... 8042cb4: bf3f 477c 074b 11a1 e6fa 4d48 06ea f394 ?.|GK.....HM.... 8042cc4: 8aed 2c77 34cc 65e2 e949 c509 3494 35bb ..w,.4.eI....4.5 8042cd4: 4a42 1293 0120 3124 af74 0ed7 470a 3d04 BJ.. .$1t....G.= 8042ce4: da51 a7d0 3e0d 894b 76e4 1092 c822 7433 Q....>K..v..".3t 8042cf4: bde8 88ec 0114 6ea4 eba4 7230 878a 0988 .......n..0r.... 8042d04: d714 a33e 151e 9b39 8845 cdc3 5c28 e0d6 ..>...9.E...(\.. 8042d14: 6b68 420f 3f84 8833 3b2f 9825 884e 0b44 hk.B.?3./;%.N.D. 8042d24: 4dd1 f870 0f4b 4bc9 9e8a 0036 988a d14c .Mp.K..K..6...L. 8042d34: f580 5314 7f9c f41e 335c 5b9f ecee e517 ...S....\3.[.... 8042d44: 5efa 74d3 a61e 815e 618f 4315 0ab3 58bb .^.t..^..a.C...X 8042d54: ea71 9290 e910 08f8 f3f3 47b4 9111 2c11 q..........G..., 8042d64: e61e d8f0 f903 b198 b9ac 4005 7700 0d50 ...........@.wP. 8042d74: 3f9c 312c e3b9 1a09 2200 05b0 a386 2a30 .?,1....."....0* 8042d84: ed42 a686 4cb2 3d5d 4a75 f063 bf51 c13e B....L]=uJc.Q.>. 8042d94: 0b8d 091c 93e2 4268 a987 4e97 f6b2 2f8a ......hB...N.../ 8042da4: cc60 60ef e164 b9e0 f1f8 1180 1c20 8e1b `..`d....... ... 8042db4: 43c2 3cf4 3aac f360 9a7f 372d ec8b b8bd .C.<.:`...-7.... 8042dc4: 7f3a 0d7b 2a00 0d61 d452 fc46 eead fed1 :.{..*a.R.F..... 8042dd4: 15f5 848b 852c 320f 1bb9 538b d052 233c ....,..2...SR.<# 8042de4: cd5d 35d7 2400 fe9d d778 e029 2f90 40ac ]..5.$..x.)../.@ 8042df4: 307b 415e 9643 baf6 3234 a35c c149 2a8c {0^AC...42\.I..* 8042e04: 1830 7256 64c5 3e96 f2b9 e00c 3e77 b52a 0.Vr.d.>....w>*. 8042e14: 8b3d fc6b 3993 1348 1cb3 42ff 75e0 58a0 =.k..9H....B.u.X 8042e24: d474 a04d 49a9 5cdc e7a6 854a afbe 2979 t.M..I.\..J...y) 8042e34: 7d6c 5b66 6345 08a5 9e34 0273 7d20 0a72 l}f[Ec..4.s. }r. 8042e44: 934a ef5b 67cd e0a6 b934 55ad d219 fe06 J.[..g..4..U.... 8042e54: 8a56 f134 e6bf ec2b 9a27 8611 513a b14a V.4...+.'...:QJ. 8042e64: 5539 d18c 553a f08a 2f4b 23ec 02c6 0989 9U..:U..K/.#.... 8042e74: 2ab8 22de b743 8d69 5545 f577 fdc4 0ca1 .*."C.i.EUw..... 8042e84: cb4d 44a6 3c69 1636 3bf5 f9ce 192c 65ce M..Di<6..;..,..e 8042e94: 5e2d 2b28 298d 94c7 99a6 d6d1 93a4 28d2 -^(+.).........( 8042ea4: db05 1f81 3081 b066 2444 b1d7 e34a e7e8 .....0f.D$..J... 8042eb4: dbab d85b b035 abc0 30f8 4ba3 4edb 946e ..[.5....0.K.Nn. 8042ec4: 9257 1255 ba48 ca8a c917 568a c509 f23d W.U.H......V..=. 8042ed4: 136c e340 a3a5 3921 a505 94af d300 a667 l.@...!9......g. 8042ee4: 34e0 f5b9 31f1 ed99 28d2 3588 a34a 2e22 .4...1...(.5J.". 8042ef4: 68f3 6893 b168 0176 5292 cd8a c689 fe84 .h.hh.v..R...... 8042f04: 4aa7 4935 9ca3 0c3a 2b79 1821 4c91 b56a .J5I..:.y+!..Lj. 8042f14: a09a dba1 f2ce 7389 2aba 738b 75db 4e81 .......s.*.s.u.N 8042f24: 6f2c 8a74 3125 6b3d 154e b9d2 534e e4cc ,ot.%1=kN...NS.. 8042f34: eb33 e10c 94f2 49f8 1254 ef2c 9e2b f22b 3......IT.,.+.+. 8042f44: 86ae 2612 b8ad 95ce d77d 2b5c 0eca 66ad ...&....}.\+...f 8042f54: 20fb a126 e0d5 a5c6 249b d38c 8118 7b6c . &......$....l{ 8042f64: 54d0 b53f e8c2 491a 7ac8 29bd 9187 83d1 .T?....I.z.).... 8042f74: 5289 432d faed 684b d72b d792 6914 7cd4 .R-C..Kh+....i.| 8042f84: 2b7e a66e 0b58 be44 2b54 a676 79d8 9d8d ~+n.X.D.T+v..y.. 8042f94: e3a5 ca1c 94a7 2b9d 18a8 509f be41 433c .......+...PA.. 8043784: 8f04 2945 ca82 8188 c34f 8e30 e2c2 394e ..E)....O.0...N9 8043794: 9b9a d01f 0f86 5297 21ee d383 bda6 92d7 .......R.!...... 80437a4: 863e 8eb3 05c9 fc1a 9f8c 2d3f 1df7 36c6 >.........?-...6 80437b4: 51b4 ab5b 12a2 7fc6 63e2 21c3 fe85 b7bf .Q[......c.!.... 80437c4: edff c370 6da3 a0f8 7822 e6b1 a2c5 825a ..p..m.."x....Z. 80437d4: 50ab cde7 3bbb ce58 c5c8 704b 37a2 84a8 .P...;X...Kp.7.. 80437e4: 5287 09d9 ae93 1518 4f37 c1e0 0cd5 9d0d .R......7O...... 80437f4: ead5 1f40 0bc5 7798 b1b9 c595 3336 51de ..@....w....63.Q 8043804: 10e5 6330 882d 811f e58d c0dd 1d30 80de ..0c-.......0... 8043814: 71cc 4c9e db1f 4db2 bbd4 1bc5 9a62 6268 .q.L...M....b.hb 8043824: 4c3a 45b9 8683 87eb 8ec0 4aa8 7df1 00ca :L.E.......J.}.. 8043834: 83d8 3fa8 115a 3e80 dc49 af11 8f9c b1c6 ...?Z..>I....... 8043844: e5cc 32f6 c188 21e5 43d4 dd78 bed0 155c ...2...!.Cx...\. 8043854: 783d 37e3 7e5b ba0a 86eb e145 cbcd a2fd =x.7[~....E..... 8043864: 04b5 d636 005a 0a7b 200b f838 ab3f c625 ..6.Z.{.. 8.?.%. 8043874: d778 f784 cada cdba 44af 199c aaa8 6d89 x........D.....m 8043884: 330e a183 d45e 4709 2a0d 3bb4 92dc 5830 .3..^..G.*.;..0X 8043894: f204 bd87 831d 3ba6 d85f 72e8 535d 2dc2 .......;_..r]S.- 80438a4: fa22 d653 5690 6be3 9416 35e2 69a7 1281 ".S..V.k...5.i.. 80438b4: 2334 9751 3df3 6eb6 6d45 03f0 fd02 9dc3 4#Q..=.nEm...... 80438c4: c822 d5de e410 0e0f 813a 03e0 7203 8d30 ".......:....r0. 80438d4: 0be0 9e6c 0222 1489 2f97 450f e68d 74c1 ..l."..../.E...t 80438e4: e0d0 5284 4832 1e6b 64a8 0267 76a2 206d ...R2Hk..dg..vm 80438f4: cf75 1133 34aa 3bdd a4fc dbb8 f4a4 e2e3 u.3..4.;........ 8043904: 8292 aec1 2797 c782 5385 ab32 48e8 6d7b .....'...S2..H{m 8043914: 1445 54c1 e619 f608 3451 b7e6 5034 a5e7 E..T....Q4..4P.. 8043924: 2b44 90a6 9d82 f878 61d4 35dd 99e5 8d01 D+....x..a.5.... 8043934: 32fe ae79 64ad 974d 2beb baeb 1cde 3d70 .2y..dM..+....p= 8043944: 4a06 ee86 2b8f 56e7 50fa d5fe a2ec 1aad .J...+.V.P...... 8043954: 0cf4 998a d7a1 6174 7092 0888 00f8 e76e ......ta.p....n. 8043964: fbe0 e075 68ad 4338 f7cb c1e9 6355 dc15 ..u..h8C....Uc.. 8043974: f6a2 364a c254 616a 82af ff75 c15c 1d73 ..J6T.ja..u.\.s. 8043984: 4c60 af3e 39f7 64ba 364f 50ca dac0 d695 `L>..9.dO6.P.... 8043994: b4aa 8e44 7e0d ab68 5787 1d5e 6154 11b1 ..D..~h..W^.Ta.. 80439a4: afa7 c3a3 a25b ec70 1d97 ecbc 1182 1523 ....[.p.......#. 80439b4: ead7 c981 adeb 993c acf8 0265 9e76 405e ......<...e.v.^@ 80439c4: 1501 0687 8689 9d7e 634c 13d7 4ae8 394d ......~.Lc...JM9 80439d4: 687c e74f 7a51 4f74 efd6 b16d d624 6a7e |hO.QztO..m.$.~j 80439e4: 8d74 0018 ee47 1235 ef7e 4524 10e7 8f6e t...G.5.~.$E..n. 80439f4: dc3c 789e 6d77 d62d 780b 13a6 7a5e 7fdc <..xwm-..x..^z.. 8043a04: 96a9 21fb 9cdc bfe7 c146 38d7 9af8 a21c ...!....F..8.... 8043a14: 9550 7861 f9e4 704f 5f45 c07a e13d 9661 P.ax..OpE_z.=.a. 8043a24: 6797 e4b8 3bf2 0a1c 32b8 7853 b95b 198a .g...;...2Sx[... 8043a34: 4c77 4a17 06a6 d709 327a 6d46 d051 1d6f wL.J....z2FmQ.o. 8043a44: ff23 bb42 518c 677c 7461 a121 332c 340c #.B..Q|gat!.,3.4 8043a54: f1ec 8f00 5f22 651c 5004 194c ee7c e53b ...."_.e.PL.|.;. 8043a64: c242 8865 4fb9 e74a 272d 36eb 2f93 529b B.e..OJ.-'.6./.R 8043a74: 5439 10be 8b67 2c35 6168 8aab 2904 764d 9T..g.5,ha...)Mv 8043a84: 2682 4318 7781 222a a587 0448 bdef ff59 .&.C.w*"..H...Y. 8043a94: bd0c a4ad bcb9 35be c5d9 fe15 d805 883c .......5......<. 8043aa4: 088b 13df 4830 64fa f2b9 2140 69e3 da0f ....0H.d..@!.i.. 8043ab4: dc54 6f70 8bdc 3a83 ff28 887a 017f 9a20 T.po...:(.z... . 8043ac4: 3705 6b12 68ba 3518 1314 9ecb add4 0307 .7.k.h.5........ 8043ad4: 7fbc 3dc0 ceb5 4c0f b6e8 5343 f3f9 6e9b ...=...L..CS...n 8043ae4: 4ea0 3fa7 1b07 df78 244a 7329 2590 8c20 .N.?..x.J$)s.% . 8043af4: e2aa 4f4c 59ff 2ef2 734b 09ab 6edc aba6 ..LO.Y..Ks...n.. 8043b04: 8a46 8021 c2f5 82b2 602d 19b8 bb7a 7612 F.!.....-`..z..v 8043b14: f153 9153 95a3 f336 0df0 0786 0af8 f8d6 S.S...6......... 8043b24: 4b73 6efb 0143 26eb 49c1 38c3 1a0e 8f6f sK.nC..&.I.8..o. 8043b34: d7d3 f50a b8da 3083 484e 701b dae6 8225 .......0NH.p..%. 8043b44: 9fed 26a3 008c b386 d927 7f82 7c02 ca70 ...&....'....|p. 8043b54: f8f2 5344 15b4 29b7 f5dd 43a6 2ee0 4a05 ..DS...)...C...J 8043b64: 0083 48a3 c58f f01b 4c75 19b0 ec78 6bf6 ...H....uL..x..k 8043b74: 6eef a300 6fa6 de3a 86f1 3c00 50d7 553d .n...o:....<.P=U 8043b84: ca4d 5bc3 f2b7 19ee 04aa c59a 1e75 0fa5 M..[........u... 8043b94: a9d3 3997 19be 2135 3444 c7b5 4292 4689 ...9..5!D4...B.F 8043ba4: e81c f8db 6849 866f a454 f17b ef15 f3d9 ....Iho.T.{..... 8043bb4: a137 80aa fde0 8ab6 6e39 f8d4 ac3a 4504 7.......9n..:..E 8043bc4: bb03 6787 7cc8 64b2 fb57 8d89 b0e8 0dbe ...g.|.dW....... 8043bd4: 887c 1355 8ec8 a7b9 41e6 06ae 2276 e324 |.U......A..v"$. 8043be4: 16a7 dc84 16fe f802 4a3d ddcf fd4d 1a3d ........=J..M.=. 8043bf4: c8ef ef3c 4ce9 97ef 09da 7fa1 e777 086e ..<..L......w.n. 8043c04: bf7e fb72 7749 30b7 c12b 89b5 69ff 78f2 ~.r.Iw.0+....i.x 8043c14: 40fe 9bff 4ff1 26b1 130d 5963 cbe0 d1ad .@...O.&..cY.... 8043c24: d169 2f9b f9cb 2ee7 fb6e e875 ebc6 8913 i../....n.u..... 8043c34: 7d32 5b44 e296 1b71 fedc 3adc c9bd 9834 2}D[..q....:..4. 8043c44: 53d3 e4ae bafe 2a80 5d70 b973 2321 edda .S.....*p]s.!#.. 8043c54: b8c6 a985 cb4a 7070 2b8d 9535 d1c1 9a0d ....J.pp.+5..... 8043c64: ca91 c4ad b184 18fc 6891 19b6 111d 43bd .........h.....C 8043c74: e810 99b1 cb4a 5408 1930 f2d6 e762 ba27 ....J..T0...b.'. 8043c84: 1d0c 7d3e 7a10 1055 ff28 03b4 73e5 3a69 ..>}.zU.(....si: 8043c94: 7cd7 fcb3 6a14 99f4 5a5a 1b00 c960 7cd2 .|...j..ZZ..`..| 8043ca4: a2ac 54b9 6c3d 5f9f 7220 8d22 663e 72f3 ...T=l._ r".>f.r 8043cb4: 8438 780d a5e6 4f74 9d40 1ee5 f06f 274f 8..x..tO@...o.O' 8043cc4: b577 bc61 583d f0cc f34f 6d71 4fc7 08f3 w.a.=X..O.qm.O.. 8043cd4: d080 6d0c 3a31 ee10 0404 0247 4ab0 60b6 ...m1:....G..J.` 8043ce4: c350 6803 00cc 2df2 943b 6e75 9350 9d97 P..h...-;.unP... 8043cf4: ac32 dd3c 81c5 22ee 6633 bac6 4edf 211e 2.<...."3f...N.! 8043d04: 6324 78f6 5bb1 5f54 b6e1 1cc5 eef6 05f9 $c.x.[T_........ 8043d14: 6d02 7adc 621f 5548 8929 06de 29b3 112e .m.z.bHU)....).. 8043d24: aeef a0fe 51e4 6f55 c8aa 0708 3b58 f45a .....QUo....X;Z. 8043d34: 4871 b21b 7388 f21a 4f80 1c82 b1f0 46ca qH...s...O.....F 8043d44: e76f 0707 722c 94a6 9402 99e8 deb1 8d10 o...,r.......... 8043d54: e240 91a3 245b b2b0 2ce5 21d1 5350 03f9 @...[$...,.!PS.. 8043d64: b6dd 54b5 6cbb abe4 48af 7115 b22f 0ea9 ...T.l...H.q/... 8043d74: 8bd3 b132 4407 e728 ecd9 cc5e cf08 f5db ..2..D(...^..... 8043d84: ccde e225 fd32 bbd4 d4b0 8ba2 f1cd 7106 ..%.2..........q 8043d94: 1469 9671 006e 9012 4c50 6d50 c689 025b i.q.n...PLPm..[. 8043da4: 6a57 d24f b01b d6c5 01db b109 c925 9865 WjO.........%.e. 8043db4: 009a ade0 a25a ba65 2675 8e9c c7aa 3086 ....Z.e.u&.....0 8043dc4: 9445 7243 7e9a 4870 9855 7704 2e19 ebd1 E.Cr.~pHU..w.... 8043dd4: a066 8c83 7b08 aa3f 2c01 2a82 6442 2dc8 f....{?..,.*Bd.- 8043de4: 4003 346b 48be 24e0 b418 a481 838c 2df5 .@k4.H.$.......- 8043df4: 88b2 8d21 0c8c fb62 46a8 12e8 eb45 9ac8 ..!...b..F..E... 8043e04: 46e4 0d54 821c 4328 f4c1 d115 5832 f732 .FT...(C....2X2. 8043e14: f4b4 b16f dbe4 0379 96a7 1053 fc0f 4316 ..o...y...S....C 8043e24: a990 fa26 7c18 4658 81c5 a00e 6417 6df9 ..&..|XF.....d.m 8043e34: 0d11 91fe 9878 ceb7 d2d8 d088 4797 ca7a ....x........Gz. 8043e44: 9baf 8c50 b16d 3bb3 22ef 304c 08dd c40c ..P.m..;."L0.... 8043e54: 6ec7 9dba a85e 8153 c079 224f 96da 7698 .n..^.S.y.O"...v 8043e64: 501c 87bb 01c6 bd61 b072 df87 cc41 253b .P....a.r...A.;% 8043e74: 05c4 04f8 cb46 e3f5 4b58 1469 a7c2 9fe2 ....F...XKi..... 8043e84: 49bc 1781 1cc5 4a0b d990 dd38 b400 fbe6 .I.....J..8..... 8043e94: a865 336b faf5 48fd 2ed3 4d4c c1b4 8864 e.k3...H..LM..d. 8043ea4: 49a0 f275 9cb8 0c88 adce 235a cf98 ac69 .Iu.......Z#..i. 8043eb4: 2422 41d4 4ef1 0f58 4f92 c1ab b264 1ea2 "$.A.NX..O..d... 8043ec4: 4e7c 2a0d d593 895c 4ae1 a938 a429 8917 |N.*..\..J8.)... 8043ed4: 78db c310 588e 035b 6fc2 456d f614 32d6 .x...X[..omE...2 8043ee4: 448c 916b 40a6 f9a1 ff10 5e74 4112 ebd2 .Dk..@....t^.A.. 8043ef4: 9e0b 3fb6 37fd 7fb3 43e8 491a 9fe6 c5b6 ...?.7...C.I.... 8043f04: 702b 9652 f13f d0bb 0cde e671 fa33 a258 +pR.?.....q.3.X. 8043f14: 5900 538c 8eb6 9beb 20c1 6cdc d2b7 f35c .Y.S..... .l..\. 8043f24: a74b 258f 8604 eb34 7a23 8acc 9b60 ab16 K..%..4.#z..`... 8043f34: fecd a0f5 1836 622e ff89 2621 4085 b677 ....6..b..!&.@w. 8043f44: f7a0 d26f 0d74 0e6a 00c2 88b1 209c 2fd1 ..o.t.j...... ./ 8043f54: a526 39d1 6504 76ec 970b 4231 dea7 536e &..9.e.v..1B..nS 8043f64: a6c0 8501 ea06 788b c0a8 c979 fa4c 035b .......x..y.L.[. 8043f74: cc85 f19d 8863 bc1b d03c 7093 ff7d 7432 ....c...<..p}.2t 8043f84: 128f 11f0 c6b8 7a1c 7d98 28be f997 b87b .......z.}.(..{. 8043f94: df4f 53db 8974 3f27 5eab f06b ebf4 c650 O..St.'?.^k...P. 8043fa4: 35fc 133e 28b3 1242 9cfb 7e86 f6e0 d855 .5>..(B....~..U. 8043fb4: 0ec3 0587 5576 1719 2c19 ae44 b69e dde0 ....vU...,D..... 8043fc4: 5d57 d1a2 1bcb 91e7 3a60 c02b 564f 3e80 W]......`:+.OV.> 8043fd4: bb66 cff5 fdbf b7e3 05ff fcff b7eb fdff f............... 8043fe4: dfed bcff d011 d0dc 7471 6f59 5fe4 81a8 ........qtYo._.. 8043ff4: a67f ff7f dbf1 7d3f e3fb 4d79 138d fd4d ......?}..yM..M. 8044004: 542b 3fff fedf bce9 2606 0689 edfe 3fdb +T.?.....&.....? 8044014: fb7f 6fb7 847f ff7f b7fb 0bff 9d68 d4d9 ...o........h... 8044024: f2f0 2e2c 9d1a 6c57 5e7c c9b1 aea5 78df ..,...Wl|^.....x 8044034: 0031 399b 8d67 50c1 3ef1 6613 b119 4ab3 1..9g..P.>.f...J 8044044: 41bb ab39 1fb4 a701 9c45 017f b7ad 3229 .A9.....E.....)2 8044054: 6aa7 7143 a3c1 8bbc c0f2 6d2b bf81 3aad .jCq......+m...: 8044064: 419c 4af4 1133 811a 3ada a241 6c05 0b63 .A.J3....:A..lc. 8044074: 3af0 eeaf 39df 1775 5b99 b000 1a31 9a8c .:...9u..[..1... 8044084: b5d3 7a8b 8ccd b3c4 041b 087d d441 e8d1 ...z......}.A... 8044094: 0212 7822 85b7 d41d 9d4d f053 6f1e aa45 .."x....M.S..oE. 80440a4: 4758 61f1 2d6a 0d91 1a15 3074 b979 a818 XG.aj-....t0y... 80440b4: 7f66 110c 31f9 955b d7cb 2ee9 ef5b bde0 f....1[.....[... 80440c4: 6db1 5189 e563 f8b2 bd3d 9550 4d20 eb1c .m.Qc...=.P. M.. 80440d4: 4a6c efb3 b05c 55f3 f0dd 9ae3 2064 06cb lJ..\..U....d .. 80440e4: 048d 0480 6f45 22e0 c070 925b 3aba 7079 ....Eo."p.[..:yp 80440f4: bc69 b428 1405 28cd 821c 5dde 57ec eb4b i.(....(...].WK. 8044104: 97c7 f4c8 6b60 80bc d1d0 1f60 3d5d ead3 ....`k....`.]=.. 8044114: caa4 9b36 db22 eb66 3179 fae5 2191 ac7f ..6.".f.y1...!.. 8044124: 1836 e7d2 a6ed 2ac0 b9c0 ab96 1c49 d916 6......*....I... 8044134: 1023 b00b b62e 470c 5d3d 1f25 c248 057c #......G=]%.H.|. 8044144: fc11 63b4 041f ae3f 5761 5b23 0672 1ed1 ...c..?.aW#[r... 8044154: e29e 155a 26dc 136f 76b8 d4d0 6f20 f19d ..Z..&o..v.. o.. 8044164: 253d 44ce 6dc5 65d9 428d eb02 dd2b d497 =%.D.m.e.B..+... 8044174: e7d8 e388 98d4 6f60 3991 48c2 0828 6c64 ......`o.9.H(.dl 8044184: 8d0f 2bd0 dbab c4e1 a1d4 8dbc 0f60 3b43 ...+........`.C; 8044194: 8716 e07b 7560 a402 4faf 0729 b491 3a0d ..{.`u...O)....: 80441a4: 1ac8 6274 cd4b 582f caac ca6e bc18 9662 ..tbK./X..n...b. 80441b4: e9c1 8350 5607 b57b f2e8 a005 a491 c11f ..P..V{......... 80441c4: 9848 bba3 df02 8373 cb83 f960 52d6 45e8 H.....s...`..R.E 80441d4: b56e 746c 86e5 cb98 9ae8 c84e 8b34 d45b n.lt......N.4.[. 80441e4: 1871 6ed1 cab1 ef5d 7795 dc36 8bf7 201c q..n..]..w6.... 80441f4: 7270 7ec4 b8cb 8635 9e86 dd71 5fed fc97 pr.~..5...q.._.. 8044204: 1238 46af ca39 9501 6bb3 3fa3 43c6 705f 8..F9....k.?.C_p 8044214: 78ef faa0 f4a6 5a92 877f d9ef b3c1 4a89 .x.....Z.......J 8044224: 2f76 c7cb 9d3e e4a9 79a5 3e57 0b22 87e3 v/..>....yW>"... 8044234: ee1f 5795 44c8 3a91 5f87 6aab 8535 4478 ...W.D.:._.j5.xD 8044244: af50 e6a1 5316 e090 4663 0e99 e1df 305b P....S..cF....[0 8044254: e0ef 0aff ef31 c08f 2ee0 ba26 a4b6 c313 ....1.....&..... 8044264: 6ae8 65ff 4bf4 f8f5 be8b 496c 26e7 5c20 .j.e.K....lI.& \ 8044274: d218 3687 727d 4efb cd0d b87a f3bd 4f85 ...6}r.N..z....O 8044284: 4764 a101 c034 06c0 6f89 4f10 25ff 957b dG..4....o.O.%{. 8044294: 6352 56ec d59f e034 9810 7e9a dd7d 421f Rc.V..4....~}..B 80442a4: b368 5769 c673 fea3 fae8 b02d d07a c0e0 h.iWs.....-.z... 80442b4: 0799 3f4d e0ea 1100 dcb9 2104 289d b8a2 ..M?.......!.(.. 80442c4: 854f 4988 97aa 8b2e 3e97 74d8 e933 9003 O..I.....>.t3... 80442d4: 3ba6 98cd f5dc 9a47 0341 19a0 71a3 4dff .;....G.A....q.M 80442e4: e043 9ad1 b458 83f4 d2d0 3a8f e0c8 c33e C...X......:..>. 80442f4: fe55 d903 f4dc e5e0 5e02 ec89 aaef a52d U........^....-. 8044304: b86b 9353 c6db be1f 7317 b680 4856 c093 k.S......s..VH.. 8044314: d133 03b0 0185 60b7 28c8 b3ab 331e 189e 3......`.(...3.. 8044324: 6b33 af8b 83ae 4e2f 96b3 77bd 0156 1487 3k..../N...wV... 8044334: f689 c3d0 c834 f633 624a e689 af8d 37fa ....4.3.Jb.....7 8044344: a9f3 3fa8 6298 c221 a00f aafc 8ea7 21fa ...?.b!........! 8044354: 0fc8 d6ba f489 0e96 0d3d 38d8 733e 57e0 ........=..8>s.W 8044364: f736 26a1 5527 1ff4 d92c ab43 a31b 0000 6..&'U..,.C..... 08044374 : 8044374: 1914 0804 0ea4 0804 0eb4 0804 04f1 0000 ................ 8044384: 0001 0000 .... 08044388 : 8044388: b80c 0803 adef 0803 adfb 0803 0a0f 0000 ................ 8044398: 0001 0000 5448 5054 312f 302e 3220 3030 ....HTTP/1.0 200 80443a8: 4f20 0d4b 430a 6e6f 6574 746e 542d 7079 OK..Content-Typ 80443b8: 3a65 6574 7478 682f 6d74 0d6c 0d0a 000a e:text/html..... 80443c8: 227b 4341 3a22 0022 2c22 4422 2243 223a {"AC":".","DC":" 80443d8: 2200 222c 6e69 665f 6572 2271 223a 2200 .","in_freq":"." 80443e8: 222c 756f 5f74 7266 7165 3a22 0022 2c22 ,"out_freq":".", 80443f8: 7022 7277 3a22 0022 2c22 6222 7461 635f "pwr":".","bat_c 8044408: 7061 3a22 0022 2c22 6922 6e6e 7265 745f ap":".","inner_t 8044418: 6d65 2270 223a 2200 222c 6162 5f74 6974 emp":".","bat_ti 8044428: 656d 6c5f 6665 2274 223a 2200 222c 6964 me_left":".","di 8044438: 2231 223a 2200 222c 6f72 2231 223a 2200 1":".","ro1":"." 8044448: 222c 6f72 2232 223a 2200 222c 5f6d 6c61 ,"ro2":".","m_al 8044458: 7261 226d 223a 2200 222c 5f75 6c61 7261 arm":".","u_alar 8044468: 226d 223a 2200 222c 656e 7374 7465 6974 m":".","netsetti 8044478: 676e 5f73 6863 6e61 6567 2264 223a 2200 ngs_changed":"." 8044488: 007d 227b 6572 6461 635f 6d6f 756d 696e }.{"read_communi 8044498: 7974 3a22 0022 2c22 7722 6972 6574 635f ty":".","write_c 80444a8: 6d6f 756d 696e 7974 3a22 0022 2c22 6d22 ommunity":".","m 80444b8: 6e61 6761 7265 5049 3a22 0022 2c22 6d22 anagerIP":".","m 80444c8: 6e61 6761 7265 5049 2232 223a 2200 222c anagerIP2":"."," 80444d8: 616d 616e 6567 4972 3350 3a22 0022 2c22 managerIP3":".", 80444e8: 6d22 6e61 6761 7265 5049 2234 223a 2200 "managerIP4":"." 80444f8: 222c 616d 616e 6567 4972 3550 3a22 0022 ,"managerIP5":". 8044508: 2c22 6922 6170 6464 2272 223a 2200 222c ","ipaddr":"."," 8044518: 7767 3a22 0022 2c22 6d22 7361 226b 223a gw":".","mask":" 8044528: 2200 222c 6864 7063 3a22 2c00 7322 6177 .","dhcp":.,"swa 8044538: 7475 2268 003a 222c 7372 735f 7265 6576 uth":.,"rs_serve 8044548: 2272 223a 2200 222c 7372 705f 726f 2274 r":".","rs_port" 8044558: 223a 2200 222c 7372 705f 6477 3a22 0022 :".","rs_pwd":". 8044568: 2c22 7222 5f73 656b 2279 223a 2200 222c ","rs_key":"."," 8044578: 7372 655f 616e 6c62 6465 3a22 2c00 6422 rs_enabled":.,"d 8044588: 7461 2265 223a 2200 222c 6974 656d 3a22 ate":".","time": 8044598: 0022 2c22 6e22 7074 3a22 0022 2c22 6e22 ".","ntp":".","n 80445a8: 7074 6573 7672 7069 3a22 0022 2c22 7522 tpservip":".","u 80445b8: 6374 3a22 0022 2c22 7522 6d74 3a22 0022 tc":".","utm":". 80445c8: 2c22 6c22 7361 7374 6e79 7463 6d69 2265 ","lastsynctime" 80445d8: 223a 7b00 7522 7470 6d69 2265 223a 2200 :".{"uptime":"." 80445e8: 222c 6f6d 6564 226c 223a 2200 222c 7270 ,"model":".","pr 80445f8: 646f 7461 2265 223a 2200 222c 7766 6576 odate":".","fwve 8044608: 7372 6f69 226e 223a 2200 222c 616d 6163 rsion":".","maca 8044618: 6464 2272 223a 2200 222c 6573 6e72 226f ddr":".","serno" 8044628: 223a 2200 222c 776f 656e 2272 223a 2200 :".","owner":"." 8044638: 222c 7973 4c73 636f 7461 6f69 226e 223a ,"sysLocation":" 8044648: 2200 222c 6f63 6d6d 6e65 2274 223a 2200 .","comment":"." 8044658: 222c 7075 5f73 6f6d 6564 226c 223a 2200 ,"ups_model":"." 8044668: 222c 7075 5f73 7766 6576 7372 6f69 226e ,"ups_fwversion" 8044678: 223a 4800 5454 2f50 2e31 2031 3032 2030 :".HTTP/1.1 200 8044688: 4b4f 0a0d 6f43 746e 6e65 2d74 7954 6570 OK..Content-Type 8044698: 743a 7865 2f74 7468 6c6d 0a0d 0a0d 7b00 :text/html.....{ 80446a8: 7022 6761 2265 203a 005b 6925 5d00 222c "page": [.%i.]," 80446b8: 6170 6567 2273 223a 5200 6265 6f6f 5474 pages":".RebootT 80446c8: 7361 006b 6374 6970 5f70 6874 6572 6461 ask.tcpip_thread 80446d8: 0000 .. 080446da : 80446da: 0004 0006 000c 0005 0019 0010 0006 0008 ................ 80446ea: 0014 000a 001e 0032 0005 0009 0032 0019 ......2.....2... 080446fa : 80446fa: 001c 0020 0094 001c 0010 0010 002c 0014 .. .........,... 804470a: 0014 0010 0020 0010 0024 0080 0010 0614 .... ...$....... 804471a: 0000 .. 0804471c : 804471c: ff28 2000 ff30 2000 ff20 2000 ff34 2000 (.. 0.. .. 4.. 0804472c : 804472c: 0201 0403 0605 0707 0707 0707 0307 ............. 08044739 : 8044739: 0603 180c 6030 ff78 ....0`x 08044740 : 8044740: ffff ffff .... 08044744 : 8044744: 0000 0000 .... 08044748 : 8044748: 0000 0000 .... 0804474c : 804474c: 3fcd 0803 3a81 0803 4011 0803 3b95 0803 .?...:...@...;.. 804475c: 0001 0000 .... 08044760 : 8044760: 0784 2000 0784 2000 ... ... 08044768 : 8044768: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044778: 0002 0001 4898 0804 49c0 0804 .....H...I.. 08044784 : 8044784: 4f90 0804 4b58 0804 074c 2000 5034 0804 .O..XK..L.. 4P.. 8044794: 4958 0804 4b28 0804 4d84 0804 48f4 0804 XI..(K...M...H.. 080447a4 : 80447a4: 07b4 2000 07b4 2000 07b4 2000 07b4 2000 ... ... ... ... 80447b4: 07b4 2000 07b4 2000 07b4 2000 07b4 2000 ... ... ... ... 80447c4: 07b4 2000 07b4 2000 07b4 2000 07b4 2000 ... ... ... ... 80447d4: 07b4 2000 ... 080447d8 : 80447d8: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 80447e8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80447f8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044808: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044818: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044828: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044838: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044848: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044858: 0000 0000 .... 0804485c : 804485c: 5146 4e44 752d 6b6e 0000 0000 FQDN-unk.... 08044868 : 8044868: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 08044878 : 8044878: 36d5 0803 36f5 0803 3623 0803 3627 0803 .6...6..#6..'6.. 8044888: 0001 0000 .... 0804488c : 804488c: 0000 0000 .... 08044890 : 8044890: 0001 0000 0002 0000 ........ 08044898 : 8044898: 0001 0000 .... 0804489c : 804489c: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 80448ac: 0002 0001 4f8c 0804 4d80 0804 .....O...M.. 080448b8 : 80448b8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80448c8: 0005 0000 0006 0000 0007 0000 000b 0000 ................ 080448d8 : 80448d8: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 80448e8: 0002 0008 48b8 0804 4784 0804 .....H...G.. 080448f4 : 80448f4: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044904: 0002 001c 4e78 0804 4d10 0804 ....xN...M.. 08044910 : 8044910: 3f41 0803 3979 0803 3623 0803 3627 0803 A?..y9..#6..'6.. 8044920: 0001 0000 .... 08044924 : 8044924: 4a64 0804 4a64 0804 4a64 0804 4a64 0804 dJ..dJ..dJ..dJ.. 8044934: 4a64 0804 4a64 0804 4a64 0804 dJ..dJ..dJ.. 08044940 : 8044940: 0002 0000 .... 08044944 : 8044944: 49ac 0804 49ac 0804 49ac 0804 49ac 0804 .I...I...I...I.. 8044954: 0768 2000 h.. 08044958 : 8044958: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044968: 0002 001a 4c24 0804 4ab4 0804 ....$L...J.. 08044974 : 8044974: 3e55 0803 3709 0803 37c9 0803 3627 0803 U>...7...7..'6.. 8044984: 0001 0000 .... 08044988 : 8044988: 0001 0000 0002 0000 ........ 08044990 : 8044990: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 80449a0: 0002 0004 4868 0804 4b48 0804 ....hH..HK.. 080449ac : 80449ac: 3a1d 0803 3a49 0803 3623 0803 3627 0803 .:..I:..#6..'6.. 80449bc: 0001 0000 .... 080449c0 : 80449c0: 4a48 0804 HJ.. 080449c4 : 80449c4: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 80449d4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80449e4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80449f4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044a04: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044a14: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044a24: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044a34: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8044a44: 0000 0000 .... 08044a48 : 8044a48: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044a58: 0002 0003 4ba8 0804 4ca0 0804 .....K...L.. 08044a64 : 8044a64: 3629 0803 42ad 0803 3db9 0803 4059 0803 )6...B...=..Y@.. 8044a74: 0001 0000 .... 08044a78 : 8044a78: 4910 0804 4910 0804 4910 0804 4910 0804 .I...I...I...I.. 8044a88: 4910 0804 4910 0804 4910 0804 4910 0804 .I...I...I...I.. 8044a98: 4910 0804 4910 0804 4910 0804 4910 0804 .I...I...I...I.. 8044aa8: 08b4 2000 4910 0804 4910 0804 ... .I...I.. 08044ab4 : 8044ab4: 4f5c 0804 4f5c 0804 4f5c 0804 4f5c 0804 \O..\O..\O..\O.. 8044ac4: 4f5c 0804 4f5c 0804 4f5c 0804 4f5c 0804 \O..\O..\O..\O.. 8044ad4: 4f5c 0804 4f5c 0804 4f5c 0804 4f5c 0804 \O..\O..\O..\O.. 8044ae4: 4f5c 0804 4f5c 0804 4f5c 0804 4f5c 0804 \O..\O..\O..\O.. 8044af4: 4f5c 0804 4f5c 0804 4f5c 0804 4f5c 0804 \O..\O..\O..\O.. 8044b04: 4f5c 0804 4f5c 0804 4f5c 0804 4f5c 0804 \O..\O..\O..\O.. 8044b14: 4f5c 0804 4f5c 0804 \O..\O.. 08044b1c : 8044b1c: 0004 0000 .... 08044b20 : 8044b20: 4878 0804 0954 2000 xH..T.. 08044b28 : 8044b28: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044b38: 0002 000f 4cd4 0804 4a78 0804 .....L..xJ.. 08044b44 : 8044b44: 0000 0000 .... 08044b48 : 8044b48: 0a18 2000 0a18 2000 0a18 2000 0a18 2000 ... ... ... ... 08044b58 : 8044b58: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044b68: 0002 0002 4890 0804 4b20 0804 .....H.. K.. 08044b74 : 8044b74: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044b84: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8044b94: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8044ba4: 000d 0000 .... 08044ba8 : 8044ba8: 0001 0000 0002 0000 0003 0000 ............ 08044bb4 : 8044bb4: 08dc 2000 08dc 2000 08dc 2000 08dc 2000 ... ... ... ... 8044bc4: 08dc 2000 ... 08044bc8 : 8044bc8: 4974 0804 4974 0804 4974 0804 4974 0804 tI..tI..tI..tI.. 8044bd8: 4974 0804 4974 0804 4974 0804 4974 0804 tI..tI..tI..tI.. 8044be8: 4974 0804 4974 0804 4974 0804 4974 0804 tI..tI..tI..tI.. 8044bf8: 4974 0804 4974 0804 4974 0804 4974 0804 tI..tI..tI..tI.. 8044c08: 4974 0804 4974 0804 4974 0804 0908 2000 tI..tI..tI..... 8044c18: 0970 2000 0730 2000 4974 0804 p.. 0.. tI.. 08044c24 : 8044c24: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044c34: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8044c44: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8044c54: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8044c64: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8044c74: 0015 0000 0016 0000 0017 0000 0018 0000 ................ 8044c84: 0019 0000 001a 0000 ........ 08044c8c : 8044c8c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044c9c: 0005 0000 .... 08044ca0 : 8044ca0: 0928 2000 0928 2000 0928 2000 (.. (.. (.. 08044cac : 8044cac: 0884 2000 0884 2000 0884 2000 0884 2000 ... ... ... ... 8044cbc: 0884 2000 ... 08044cc0 : 8044cc0: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044cd0: 0005 0000 .... 08044cd4 : 8044cd4: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044ce4: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8044cf4: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8044d04: 000d 0000 000e 0000 000f 0000 ............ 08044d10 : 8044d10: 474c 0804 474c 0804 474c 0804 474c 0804 LG..LG..LG..LG.. 8044d20: 474c 0804 474c 0804 474c 0804 474c 0804 LG..LG..LG..LG.. 8044d30: 474c 0804 474c 0804 474c 0804 474c 0804 LG..LG..LG..LG.. 8044d40: 474c 0804 474c 0804 474c 0804 474c 0804 LG..LG..LG..LG.. 8044d50: 474c 0804 474c 0804 474c 0804 474c 0804 LG..LG..LG..LG.. 8044d60: 474c 0804 474c 0804 474c 0804 474c 0804 LG..LG..LG..LG.. 8044d70: 474c 0804 474c 0804 474c 0804 474c 0804 LG..LG..LG..LG.. 08044d80 : 8044d80: 48d8 0804 .H.. 08044d84 : 8044d84: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044d94: 0002 0005 4c8c 0804 4944 0804 .....L..DI.. 08044da0 : 8044da0: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044db0: 0002 000d 4b74 0804 47a4 0804 ....tK...G.. 08044dbc : 8044dbc: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044dcc: 0002 0016 4f04 0804 4fdc 0804 .....O...O.. 08044dd8 : 8044dd8: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044de8: 0002 0002 4988 0804 4760 0804 .....I..`G.. 08044df4 : 8044df4: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044e04: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8044e14: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8044e24: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8044e34: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8044e44: 0015 0000 0016 0000 0017 0000 ............ 08044e50 : 8044e50: 776c 5049 0800 lwIP. 08044e55 : 8044e55: 0008 1b00 ... 08044e58 : 8044e58: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044e68: 0002 0005 4fc8 0804 4bb4 0804 .....O...K.. 08044e74 : 8044e74: 0000 0000 .... 08044e78 : 8044e78: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044e88: 0005 0000 0006 0000 0008 0000 0009 0000 ................ 8044e98: 000a 0000 000b 0000 000c 0000 000d 0000 ................ 8044ea8: 000e 0000 000f 0000 0010 0000 0011 0000 ................ 8044eb8: 0012 0000 0013 0000 0014 0000 0015 0000 ................ 8044ec8: 0016 0000 0018 0000 0019 0000 001a 0000 ................ 8044ed8: 001b 0000 001c 0000 001d 0000 001e 0000 ................ 08044ee8 : 8044ee8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044ef8: 0005 0000 0006 0000 0007 0000 ............ 08044f04 : 8044f04: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044f14: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8044f24: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8044f34: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8044f44: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8044f54: 0015 0000 0016 0000 ........ 08044f5c : 8044f5c: 3851 0803 387d 0803 3623 0803 3627 0803 Q8..}8..#6..'6.. 8044f6c: 0001 0000 .... 08044f70 : 8044f70: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044f80: 0002 0002 08fc 2000 5050 0804 ....... PP.. 08044f8c : 8044f8c: 0001 0000 .... 08044f90 : 8044f90: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044fa0: 0002 0007 4ee8 0804 4924 0804 .....N..$I.. 08044fac : 8044fac: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8044fbc: 0002 0005 4cc0 0804 4cac 0804 .....L...L.. 08044fc8 : 8044fc8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8044fd8: 0005 0000 .... 08044fdc : 8044fdc: 07dc 2000 07dc 2000 07dc 2000 07dc 2000 ... ... ... ... 8044fec: 07dc 2000 07dc 2000 07dc 2000 07dc 2000 ... ... ... ... 8044ffc: 07dc 2000 07dc 2000 07dc 2000 07dc 2000 ... ... ... ... 804500c: 07dc 2000 07dc 2000 07dc 2000 07dc 2000 ... ... ... ... 804501c: 07dc 2000 07dc 2000 07dc 2000 07dc 2000 ... ... ... ... 804502c: 07dc 2000 07dc 2000 ... ... 08045034 : 8045034: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8045044: 0002 0017 4df4 0804 4bc8 0804 .....M...K.. 08045050 : 8045050: 489c 0804 513c 0804 .H..: 8045058: 0001 0000 0003 0000 0006 0000 0001 0000 ................ 08045068 : 8045068: 0000 0000 .... 0804506c : 804506c: 7570 6c62 6369 ff00 public. 08045073 : 8045073: ffff ffff ffff ...... 08045079 : 8045079: 0000 0000 0000 7445 5f68 6669 2000 7325 ......Eth_if. %s 8045089: 0d0a 4400 4348 4350 696c 6e65 0074 6577 ...DHCPClient.we 8045099: 5262 6965 696e 0074 6552 6e69 7469 6557 bReinit.ReinitWe 80450a9: 0062 1800 b.. 080450ac : 80450ac: a318 0000 .... 080450b0 : 80450b0: 0001 0000 .... 080450b4 : 80450b4: 5104 0804 .Q.. 080450b8 : 80450b8: 51a0 0804 .Q.. 080450bc : 80450bc: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80450cc: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80450dc: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80450ec: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80450fc: 0011 0000 0012 0000 ........ 08045104 : 8045104: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8045114: 0002 0001 50b0 0804 5218 0804 .....P...R.. 08045120 : 8045120: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 8045130: 0002 0001 521c 0804 50b8 0804 .....R...P.. 0804513c : 804513c: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 804514c: 0002 0001 51bc 0804 51c4 0804 .....Q...Q.. 08045158 : 8045158: 5204 0804 5204 0804 5204 0804 5204 0804 .R...R...R...R.. 8045168: 5204 0804 5204 0804 5204 0804 5204 0804 .R...R...R...R.. 8045178: 5204 0804 5204 0804 5204 0804 5204 0804 .R...R...R...R.. 8045188: 5204 0804 5204 0804 5204 0804 5204 0804 .R...R...R...R.. 8045198: 5204 0804 5204 0804 .R...R.. 080451a0 : 80451a0: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 80451b0: 0002 0001 51c0 0804 50b4 0804 .....Q...P.. 080451bc : 80451bc: 0001 0000 .... 080451c0 : 80451c0: 0003 0000 .... 080451c4 : 80451c4: 51c8 0804 .Q.. 080451c8 : 80451c8: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 80451d8: 0002 0001 50ac 0804 51e4 0804 .....P...Q.. 080451e4 : 80451e4: 5120 0804 Q.. 080451e8 : 80451e8: 361b 0803 3621 0803 3623 0803 3627 0803 .6..!6..#6..'6.. 80451f8: 0002 0012 50bc 0804 5158 0804 .....P..XQ.. 08045204 : 8045204: 7ba9 0803 7b69 0803 7ad9 0803 7995 0803 .{..i{...z...y.. 8045214: 0001 0000 .... 08045218 : 8045218: 51e8 0804 .Q.. 0804521c : 804521c: 038f 0000 3025 6432 252e 3230 2e64 3025 ....%02d.%02d.%0 804522c: 6432 2520 3230 3a64 3025 6432 253a 3230 2d %02d:%02d:%02 804523c: 0064 6425 252e 2e64 6425 2520 3a64 6425 d.%d.%d.%d %d:%d 804524c: 253a 2064 0d0a 4800 6165 2070 6e61 2064 :%d ...Heap and 804525c: 7473 6361 206b 6f63 6c6c 7369 6f69 0a6e stack collision. 804526c: 6500 6978 0074 0000 666e 0000 6e69 7469 .exit...nf..init 804527c: 0079 0000 6e61 0000 4241 4443 4645 0000 y...an..ABCDEF.. 804528c: 6261 6463 6665 0000 3130 3332 3534 3736 abcdef..01234567 804529c: 3938 0000 0043 0000 4f50 4953 0058 0000 89..C...POSIX... 80452ac: 0000 0000 002e 0000 ........ 080452b4 <_init>: 80452b4: b5f8 push {r3, r4, r5, r6, r7, lr} 80452b6: bf00 nop 80452b8: bcf8 pop {r3, r4, r5, r6, r7} 80452ba: bc08 pop {r3} 80452bc: 469e mov lr, r3 80452be: 4770 bx lr 080452c0 <_fini>: 80452c0: b5f8 push {r3, r4, r5, r6, r7, lr} 80452c2: bf00 nop 80452c4: bcf8 pop {r3, r4, r5, r6, r7} 80452c6: bc08 pop {r3} 80452c8: 469e mov lr, r3 80452ca: 4770 bx lr